kdpa-components 1.42.1 → 1.42.2
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.
- package/dist/dist.rar +0 -0
- package/dist/index.js +39 -39
- package/dist/types/designerKit/components/Form/KdFormContainer/KdFormContainer.d.ts +2 -1
- package/dist/types/designerKit/components/Form/KdFormContainer/KdFormContainer.d.ts.map +1 -1
- package/dist/types/designerKit/components/Form/KdFormField/KdFormField.d.ts +2 -1
- package/dist/types/designerKit/components/Form/KdFormField/KdFormField.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -557,9 +557,9 @@ html body {
|
|
|
557
557
|
* See the License for the specific language governing permissions and
|
|
558
558
|
* limitations under the License.
|
|
559
559
|
*/(function(e,t){var n;function r(i,a){var s=[],c=0;function f(m){return s.push(m),a}function p(){return s[c++]}return{tokenize:function(m){return m.replace(i,f)},detokenize:function(m){return m.replace(new RegExp("("+a+")","g"),p)}}}function o(){var i="`TMP`",a="`NOFLIP_SINGLE`",s="`NOFLIP_CLASS`",c="`COMMENT`",f="[^\\u0020-\\u007e]",p="(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)",m="(?:[0-9]*\\.[0-9]+|[0-9]+)",v="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",y="direction\\s*:\\s*",w="[!#$%&*-~]",C=`['"]?\\s*`,k="(^|[^a-zA-Z])",T="[^\\}]*?",E="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",_="\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/",R="(?:"+p+"|\\\\[^\\r\\n\\f0-9a-f])",P="(?:[_a-z]|"+f+"|"+R+")",$="(?:[_a-z0-9-]|"+f+"|"+R+")",z="-?"+P+$+"*",q=m+"(?:\\s*"+v+"|"+z+")?",Y="((?:-?"+q+")|(?:inherit|auto))",J="((?:margin|padding|border-width)\\s*:\\s*)",K="((?:-color|border-style)\\s*:\\s*)",ee="(#?"+$+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",re="(?:"+w+"|"+f+"|"+R+")*?",ne="(?![a-zA-Z])",oe="(?!("+$+`|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|"[^"]*"|`+c+")*?{)",fe="(?!"+re+C+"\\))",se="(?="+re+C+"\\))",ue="(\\s*(?:!important\\s*)?[;}])",le=/`TMP`/g,ce=new RegExp(_,"gi"),Se=new RegExp("("+E+oe+"[^;}]+;?)","gi"),Me=new RegExp("("+E+T+"})","gi"),ze=new RegExp("("+y+")ltr","gi"),ke=new RegExp("("+y+")rtl","gi"),pe=new RegExp(k+"(left)"+ne+fe+oe,"gi"),Oe=new RegExp(k+"(right)"+ne+fe+oe,"gi"),Ae=new RegExp(k+"(left)"+se,"gi"),Pe=new RegExp(k+"(right)"+se,"gi"),Ve=new RegExp(k+"(ltr)"+se,"gi"),Le=new RegExp(k+"(rtl)"+se,"gi"),Ne=new RegExp(k+"([ns]?)e-resize","gi"),Te=new RegExp(k+"([ns]?)w-resize","gi"),He=new RegExp(J+Y+"(\\s+)"+Y+"(\\s+)"+Y+"(\\s+)"+Y+ue,"gi"),Ie=new RegExp(K+ee+"(\\s+)"+ee+"(\\s+)"+ee+"(\\s+)"+ee+ue,"gi"),Ge=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+q+")","gi"),tt=new RegExp("(background-position-x\\s*:\\s*)(-?"+m+"%)","gi"),ot=new RegExp("(border-radius\\s*:\\s*)"+Y+"(?:(?:\\s+"+Y+")(?:\\s+"+Y+")?(?:\\s+"+Y+")?)?(?:(?:(?:\\s*\\/\\s*)"+Y+")(?:\\s+"+Y+")?(?:\\s+"+Y+")?(?:\\s+"+Y+")?)?"+ue,"gi"),Fe=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+Y,"gi"),$e=new RegExp("(text-shadow\\s*:\\s*)"+Y+"(\\s*)"+ee,"gi"),Ce=new RegExp("(text-shadow\\s*:\\s*)"+ee+"(\\s*)"+Y,"gi"),De=new RegExp("(text-shadow\\s*:\\s*)"+Y,"gi"),We=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+Y+"(\\s*\\))","gi"),ft=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+Y+"((?:\\s*,\\s*"+Y+"){0,2}\\s*\\))","gi");function Ze(wt,Lt,Et){var At,ct;return Et.slice(-1)==="%"&&(At=Et.indexOf("."),At!==-1?(ct=Et.length-At-2,Et=100-parseFloat(Et),Et=Et.toFixed(ct)+"%"):Et=100-parseFloat(Et)+"%"),Lt+Et}function ht(wt){switch(wt.length){case 4:wt=[wt[1],wt[0],wt[3],wt[2]];break;case 3:wt=[wt[1],wt[0],wt[1],wt[2]];break;case 2:wt=[wt[1],wt[0]];break;case 1:wt=[wt[0]];break}return wt.join(" ")}function it(wt,Lt){var Et,At=[].slice.call(arguments),ct=At.slice(2,6).filter(function(Bt){return Bt}),gt=At.slice(6,10).filter(function(Bt){return Bt}),$t=At[10]||"";return gt.length?Et=ht(ct)+" / "+ht(gt):Et=ht(ct),Lt+Et+$t}function yt(wt){return parseFloat(wt)===0?wt:wt[0]==="-"?wt.slice(1):"-"+wt}function Qe(wt,Lt,Et){return Lt+yt(Et)}function et(wt,Lt,Et,At,ct){return Lt+Et+yt(At)+ct}function at(wt,Lt,Et,At,ct){return Lt+Et+At+yt(ct)}return{transform:function(wt,Lt){var Et=new r(Se,a),At=new r(Me,s),ct=new r(ce,c);return wt=ct.tokenize(At.tokenize(Et.tokenize(wt.replace("`","%60")))),Lt.transformDirInUrl&&(wt=wt.replace(Ve,"$1"+i).replace(Le,"$1ltr").replace(le,"rtl")),Lt.transformEdgeInUrl&&(wt=wt.replace(Ae,"$1"+i).replace(Pe,"$1left").replace(le,"right")),wt=wt.replace(ze,"$1"+i).replace(ke,"$1ltr").replace(le,"rtl").replace(pe,"$1"+i).replace(Oe,"$1left").replace(le,"right").replace(Ne,"$1$2"+i).replace(Te,"$1$2e-resize").replace(le,"w-resize").replace(ot,it).replace(Fe,Qe).replace($e,at).replace(Ce,at).replace(De,Qe).replace(We,et).replace(ft,et).replace(He,"$1$2$3$8$5$6$7$4$9").replace(Ie,"$1$2$3$8$5$6$7$4$9").replace(Ge,Ze).replace(tt,Ze),wt=Et.detokenize(At.detokenize(ct.detokenize(wt))),wt}}}n=new o,e.exports?t.transform=function(i,a,s){var c;return typeof a=="object"?c=a:(c={},typeof a=="boolean"&&(c.transformDirInUrl=a),typeof s=="boolean"&&(c.transformEdgeInUrl=s)),n.transform(i,c)}:typeof window<"u"&&(window.cssjanus=n)})(WT,WT.exports);var Gke=WT.exports,Xke=ro(Gke);function EB(e,t,n){switch(e.type){case _ke:case FT:case $T:return e.return=e.return||e.value;case Xg:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(o){o.type===$T&&(o.children=o.value)})}var r=kB(Array.prototype.concat(e.children),EB);return Ql(r)?e.return=e.value+"{"+r+"}":""}function TB(e,t,n,r){if(e.type===gB||e.type===Rke||e.type===Xg&&(!e.parent||e.parent.type===Nke||e.parent.type===Xg)){var o=Xke.transform(EB(e));e.children=o?Uke(o)[0].children:[],e.return=""}}Object.defineProperty(TB,"name",{value:"stylisRTLPlugin"});function Zke(e){const t=Ur(()=>aC({key:"kdpa",stylisPlugins:[Kke,TB],container:e?.container}),[]);return W(JM,{value:t,children:e.children})}const Jke=Pt.forwardRef((e,t)=>W(IS,{direction:"up",ref:t,...e}));function Qke({children:e,...t}){return W(rd,{TransitionComponent:Jke,fullScreen:!0,...t,children:e})}function eEe(e){return ir({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]})(e)}function tEe(e){return ir({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]})(e)}function nEe({children:e,label:t="",maxLength:n=23,expandable:r=!1,defaultOpen:o=!0,...i}){const a=Math.min(n,t.length)*7,[s,c]=Tn(o??!0),p=Wu().palette?.primary?.main||"var(--bs-primary,#7367AA)",m=()=>{c(v=>!v)};return W(ik,{sx:{...i.style,...i.sx,width:"100%"},children:mt(ik,{xs:12,container:!0,sx:{border:"1px solid #ebe9f1 !important",position:"relative",marginLeft:"0.1rem",marginRight:"0.1rem",borderRadius:"0.357rem !important",borderTopWidth:"0px !important",padding:"1rem 0.1rem","::before":{content:'""',background:"#ebe9f1",position:"absolute",top:0,right:"2px",width:`calc(${a===0?"100%":`90% - ${a}px`})`,height:"0.7px"},"::after":{content:'""',background:"#ebe9f1",position:"absolute",top:0,right:"2px",width:"20px",height:"0.7px"}},children:[W("span",{style:{position:"absolute",top:"-10px",right:"10px",fontSize:"80%",padding:"0 13px",width:`calc(100px + ${a}px)`},children:W(Wl,{title:t,children:W("span",{children:t.length>n?mt(Or,{children:[t.substring(0,n)," ..."]}):t})})}),r&&W("div",{style:{position:"absolute",top:"-8px",left:"20px",fontSize:"80%",padding:"0 16px",width:"20px",color:p},children:s?W(eEe,{size:18,onClick:m}):W(tEe,{size:18,onClick:m})}),W(X5,{in:r?s:!0,style:{width:"100%"},children:W(Pt.Fragment,{children:e})})]})})}function rEe(e){return ir({tag:"svg",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"}},{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"}},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"}},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"}}]})(e)}function DB(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}},{tag:"polyline",attr:{points:"17 8 12 3 7 8"}},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"}}]})(e)}function oEe({onUpload:e,label:t,multiple:n=!1,...r}){const o=i=>{const a=i.target.files;a&&e(a)};return mt("label",{className:"kdpa-file-uploader",htmlFor:"kdpaFileUploader",children:[t&&W("span",{className:"kdpa-file-uploader__label",children:t}),W(Tg,{component:"label",htmlFor:"kdpaFileUploader",sx:{padding:"7px 7px",minWidth:"36px"},children:W(DB,{size:20})}),W("input",{id:"kdpaFileUploader",type:"file",...r,hidden:!0,multiple:!0,onChange:o})]})}function iEe({style:e,sx:t,children:n,onSubmit:r,loading:o=!1,defaultValues:i,errorHandlingMode:a="onChange"},s){const c=vY({mode:a,defaultValues:i});return SM(s,()=>({formState:c})),W(TM,{...c,children:mt("form",{className:"kdpa-form-container",onSubmit:c.handleSubmit(r),style:{...t,...e},children:[n,o&&W("div",{className:"kdpa-form-container__loading",children:W(ja,{})})]})})}var aEe=or(iEe);function sEe({name:e="",rules:t={},Component:n,...r}){const{control:o}=em(),{field:i,fieldState:{error:a}}=tm({control:o,name:e,rules:t,shouldUnregister:!0,defaultValue:r?.defaultValue});function s(...c){//! this will change in the future
|
|
560
|
-
r.autoComplete?i.onChange(c[1]):i.onChange(...c),r?.onChange?.(...c)}return mt("div",{children:[W(n,{...i,...r,onChange:s}),a&&a.message&&W("span",{style:{color:"red"},children:a.message})]})}function lEe({children:e,handleClose:t,open:n,...r}){return W(rd,{open:n,onClose:t,...r,children:e})}function cEe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"File_On"},child:[{tag:"path",attr:{d:"M19.485,7.35l-4.97-4.86a1.466,1.466,0,0,0-1.05-.43h-6.9a2.5,2.5,0,0,0-2.5,2.5V19.44a2.507,2.507,0,0,0,2.5,2.5h10.87a2.507,2.507,0,0,0,2.5-2.5V8.42A1.49,1.49,0,0,0,19.485,7.35Zm-1.27.15h-2.34a1.5,1.5,0,0,1-1.5-1.5V3.75Zm.72,11.94a1.5,1.5,0,0,1-1.5,1.5H6.565a1.5,1.5,0,0,1-1.5-1.5V4.56a1.5,1.5,0,0,1,1.5-1.5h6.81V6a2.5,2.5,0,0,0,2.5,2.5h3.06Z"}}]}]})(e)}function uEe(e){return mt(Li,{sx:{position:"relative",display:"inline-flex"},children:[W(ja,{variant:"determinate",...e}),W(Li,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:W(Zo,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e.value)}%`})})]})}function YT({progress:e}){return W("div",{className:"kdpa-uploading-file",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:W("div",{className:"parent",style:{position:"relative",borderRadius:"8px"},children:mt("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:[W(cEe,{style:{position:"absolute",height:"100%",width:"100%",opacity:.2}}),W(uEe,{variant:e===0?"indeterminate":"determinate",value:e})]})})})}function dEe({name:e="",rules:t={},Component:n,...r}){const{control:o,setValue:i}=em(),{field:a,fieldState:{error:s}}=tm({control:o,name:e,rules:t,shouldUnregister:!0,defaultValue:r?.defaultValue});dn(()=>{(r?.defaultValue!==null||r?.defaultValue!==void 0)&&i(e,r?.defaultValue)},[r?.defaultValue]);function c(...f){a.onChange(...f),r?.onChange?.(...f)}return mt(Or,{children:[W(n,{...a,...r,error:s,onChange:c}),s&&s.message&&W(qa,{variant:"caption",sx:{color:"red"},children:s.message})]})}function AB({style:e,sx:t,children:n,onSubmit:r,loading:o=!1,submitLoading:i=!1,formState:a}){return W(TM,{...a,children:mt("form",{className:"kdpa-form-container",onSubmit:s=>(s&&(typeof s.preventDefault=="function"&&s.preventDefault(),typeof s.stopPropagation=="function"&&s.stopPropagation()),a?.handleSubmit(async c=>{r?.(c)})(s)),style:{...t,...e},children:[o?W(ja,{}):n,i&&W("div",{className:"kdpa-form-container__loading",children:W(ja,{})})]})})}function OB({name:e="",rules:t={},options:n,multiple:r=!1,defaultValue:o,valueField:i,labelField:a,loading:s=!1,getOptionValue:c,getOptionImage:f,basePathImages:p,imageSize:m="md",...v}){const{control:y,setValue:w,getValues:C}=em(),k=Ur(()=>{if(!o)return r?[]:null;if(r)if(i&&a){const R=o[i],P=o[a];return!P||!R?[]:R?.map((z,q)=>{const Y={[a]:P[q],[i]:z};return i==="EnumTitle"&&(Y.id=z),Y})}else return[];else return o},[]),{field:T,fieldState:{error:E}}=tm({control:y,name:e,rules:t,shouldUnregister:!0,defaultValue:k});dn(()=>{o&&w(e,k)},[k]);function _(...R){T.onChange(R[1]),v?.onChange?.(R[1])}return mt(Or,{children:[W(Eg,{...T,...v,getOptionKey:c,defaultValue:k,multiple:r,options:n,renderOption:f?(R,P)=>{const $=f(P);return cn("div",{...R,key:c?.(P),style:{padding:"10px",cursor:"pointer",display:"flex",flexDirection:"row",gap:"8px"}},W("img",{src:(p?.basePathStream??"")+$,style:{maxWidth:m==="lg"?"100px":m==="md"?"75px":"50px"}}),v.getOptionLabel?.(P))}:void 0,onChange:_,renderInput:R=>cn(Km,{...R,size:"small",key:v?.key,placeholder:v?.placeholder,variant:v?.variant,label:v.label,error:!!E,required:!!v?.required,helperText:E?void 0:v?.helperText,InputProps:{...R.InputProps,...v?.InputProps,endAdornment:mt(Or,{children:[s?W(ja,{color:"inherit",size:20}):null,R.InputProps.endAdornment]})}})}),E&&E.message&&W(qa,{variant:"caption",sx:{color:"red"},children:E.message})]})}function fEe({onScrollEnd:e,onSearch:t,limitCharacterSearch:n=3,delaySearch:r=700,...o}){let i,a;function s(m,v,y){clearTimeout(i),clearTimeout(a),v.length===0&&(a=setTimeout(()=>{t&&t(v)},350)),v.length>=n&&(i=setTimeout(()=>{t&&t(v)},r))}const c=Yt(null),f=Yt(0),p=m=>{const v=m.target;f.current!==v.scrollTop&&(f.current=v.scrollTop,v.scrollTop+v.clientHeight===v.scrollHeight&&!o?.loading&&e&&e())};return dn(()=>{c.current&&(c.current.scrollTop=f.current)},[o?.options]),W(OB,{...o,onInputChange:s,ListboxComponent:m=>W("ul",{onScroll:p,ref:v=>{c.current=v},...m,style:{maxHeight:"200px"},children:m.children})})}function hEe({name:e="",rules:t={},options:n,multiple:r=!1,defaultValueKey:o="",defaultValue:i="",...a}){const{control:s}=em(),c=Ur(()=>r&&Array.isArray(i)?n?.filter(v=>i.includes(v[o])):n?.find(v=>v[o]===i),[n,i]),{field:f,fieldState:{error:p}}=tm({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:c});function m(...v){f.onChange(v[1]),a?.onChange?.(v[1])}return mt(Or,{children:[W(cj,{...f,...a,error:!!p,multiple:r,options:n,onChange:m}),p&&p.message&&W(qa,{variant:"caption",sx:{color:"red"},children:p.message})]})}const pEe=()=>{const e=({data:r,getOptionLabel:o=c=>c.label,getOptionIcon:i=c=>c.icon,getOptionValue:a=c=>c.value,getOptionParent:s=c=>c.parent})=>{const c=[];return r?.forEach(f=>{a(f)&&c.push({value:a(f),label:mt(Or,{children:[i(f),o(f)]}),parent:s(f)})}),c},t=(r=[],o)=>{const i=[];for(const a of r){const s=a;if(!o&&!s?.parent||s?.parent===o){const c=t(r,s.value);c.length>0&&(s.children=c),i.push(s)}}return i},n=(r,o)=>{const i=[];if(!o)return[];const a=r.find(s=>s.value===o);return a&&(i.push(a.value),i.push(...n(r,a.parent))),i};return{renderTreeToSpecificFieldName:e,buildTree:t,findAllExpanded:n}};function mEe({data:e,defaultValue:t=[],onExpand:n,multiSelect:r=!0,getOptionValue:o,getOptionIcon:i,getOptionLabel:a,getOptionParent:s,noDataText:c="no data",...f}){const p=Er(),{buildTree:m,renderTreeToSpecificFieldName:v,findAllExpanded:y}=pEe(),w=v({data:e,getOptionLabel:a,getOptionIcon:i,getOptionValue:o,getOptionParent:s}),C=m(w),[k,T]=Tn([]),[E,_]=Tn([C?.[0]?.value]);dn(()=>{if(t)if(typeof t=="string")_(y(w,t)),T([t]);else{const $=[];t.forEach(z=>{$.push(...y(w,z))}),_($),T([...t])}},[]),dn(()=>{f?.onChange&&(r?f.onChange(k):f.onChange(k[0]))},[k]);function R($,z){if(r)T($);else if(z.isLeaf){const q=!!k.find(Y=>Y===z.value);T(q?[]:[z.value])}}function P($,z){n&&n($,z),_($)}return W("div",{className:"KdTreeField",children:C?.length>0?W(nF,{...f,icons:{leaf:W("span",{}),parentOpen:W("span",{}),parentClose:W("span",{}),check:W(S$,{size:24,color:p?.palette?.primary?.main}),expandOpen:W(x$,{size:24}),uncheck:W(C$,{size:24}),expandClose:W(w$,{size:24}),halfCheck:W(k$,{color:p?.palette?.primary?.main,size:24})},nodes:C,onCheck:R,checked:k,expanded:E,onExpand:P,showNodeIcon:!0}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})}function gEe({name:e="",rules:t={},options:n,getOptionValue:r=s=>s.value,defaultValue:o,split:i,...a}){const{control:s,setValue:c}=em(),f=Ur(()=>o||null,[o]);dn(()=>{c(e,f)},[f]);const{field:p,fieldState:{error:m}}=tm({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:f});function v(...y){i&&i?.length>0?(p.onChange(y[1]?.join(i)),a?.onChange?.(y[1]?.join(i))):(p.onChange(y[1]),a?.onChange?.(y[1]))}return mt(Or,{children:[W(Eg,{...p,...a,value:i&&i?.length>0&&p?.value?p?.value?.split(i):[],error:!!m,multiple:!0,freeSolo:!0,options:n?.map(y=>r(y))??[],onChange:v}),m&&m.message&&W(qa,{variant:"caption",sx:{color:"red"},children:m.message})]})}var MB={exports:{}};/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */(function(e,t){(function(n,r){e.exports=r()})(bo,function(){const{entries:n,setPrototypeOf:r,isFrozen:o,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:s,seal:c,create:f}=Object,{apply:p,construct:m}=typeof Reflect<"u"&&Reflect;s||(s=function(Ce){return Ce}),c||(c=function(Ce){return Ce}),p||(p=function(Ce,De,We){return Ce.apply(De,We)}),m||(m=function(Ce,De){return new Ce(...De)});const v=q(Array.prototype.forEach),y=q(Array.prototype.pop),w=q(Array.prototype.push),C=q(String.prototype.toLowerCase),k=q(String.prototype.toString),T=q(String.prototype.match),E=q(String.prototype.replace),_=q(String.prototype.indexOf),R=q(String.prototype.trim),P=q(Object.prototype.hasOwnProperty),$=q(RegExp.prototype.test),z=Y(TypeError);function q($e){return function(Ce){for(var De=arguments.length,We=new Array(De>1?De-1:0),ft=1;ft<De;ft++)We[ft-1]=arguments[ft];return p($e,Ce,We)}}function Y($e){return function(){for(var Ce=arguments.length,De=new Array(Ce),We=0;We<Ce;We++)De[We]=arguments[We];return m($e,De)}}function J($e,Ce){let De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C;r&&r($e,null);let We=Ce.length;for(;We--;){let ft=Ce[We];if(typeof ft=="string"){const Ze=De(ft);Ze!==ft&&(o(Ce)||(Ce[We]=Ze),ft=Ze)}$e[ft]=!0}return $e}function K($e){for(let Ce=0;Ce<$e.length;Ce++)P($e,Ce)||($e[Ce]=null);return $e}function ee($e){const Ce=f(null);for(const[De,We]of n($e))P($e,De)&&(Array.isArray(We)?Ce[De]=K(We):We&&typeof We=="object"&&We.constructor===Object?Ce[De]=ee(We):Ce[De]=We);return Ce}function re($e,Ce){for(;$e!==null;){const We=a($e,Ce);if(We){if(We.get)return q(We.get);if(typeof We.value=="function")return q(We.value)}$e=i($e)}function De(){return null}return De}const ne=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),oe=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fe=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),se=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ue=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),le=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ce=s(["#text"]),Se=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Me=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ze=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pe=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Oe=c(/<%[\w\W]*|[\w\W]*%>/gm),Ae=c(/\${[\w\W]*}/gm),Pe=c(/^data-[\-\w.\u00B7-\uFFFF]/),Ve=c(/^aria-[\-\w]+$/),Le=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ne=c(/^(?:\w+script|data):/i),Te=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),He=c(/^html$/i);var Ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:pe,ERB_EXPR:Oe,TMPLIT_EXPR:Ae,DATA_ATTR:Pe,ARIA_ATTR:Ve,IS_ALLOWED_URI:Le,IS_SCRIPT_OR_DATA:Ne,ATTR_WHITESPACE:Te,DOCTYPE_NAME:He});const Ge=function(){return typeof window>"u"?null:window},tt=function(Ce,De){if(typeof Ce!="object"||typeof Ce.createPolicy!="function")return null;let We=null;const ft="data-tt-policy-suffix";De&&De.hasAttribute(ft)&&(We=De.getAttribute(ft));const Ze="dompurify"+(We?"#"+We:"");try{return Ce.createPolicy(Ze,{createHTML(ht){return ht},createScriptURL(ht){return ht}})}catch{return console.warn("TrustedTypes policy "+Ze+" could not be created."),null}};function ot(){let $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ge();const Ce=An=>ot(An);if(Ce.version="3.0.9",Ce.removed=[],!$e||!$e.document||$e.document.nodeType!==9)return Ce.isSupported=!1,Ce;let{document:De}=$e;const We=De,ft=We.currentScript,{DocumentFragment:Ze,HTMLTemplateElement:ht,Node:it,Element:yt,NodeFilter:Qe,NamedNodeMap:et=$e.NamedNodeMap||$e.MozNamedAttrMap,HTMLFormElement:at,DOMParser:wt,trustedTypes:Lt}=$e,Et=yt.prototype,At=re(Et,"cloneNode"),ct=re(Et,"nextSibling"),gt=re(Et,"childNodes"),$t=re(Et,"parentNode");if(typeof ht=="function"){const An=De.createElement("template");An.content&&An.content.ownerDocument&&(De=An.content.ownerDocument)}let Bt,an="";const{implementation:sn,createNodeIterator:Sn,createDocumentFragment:Pn,getElementsByTagName:Nn}=De,{importNode:qe}=We;let we={};Ce.isSupported=typeof n=="function"&&typeof $t=="function"&&sn&&sn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:dt,ERB_EXPR:Ue,TMPLIT_EXPR:Dt,DATA_ATTR:Vt,ARIA_ATTR:Nt,IS_SCRIPT_OR_DATA:Ye,ATTR_WHITESPACE:Re}=Ie;let{IS_ALLOWED_URI:Je}=Ie,lt=null;const Tt=J({},[...ne,...oe,...fe,...ue,...ce]);let kt=null;const vn=J({},[...Se,...Me,...ze,...ke]);let nn=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ln=null,Jt=null,pt=!0,_e=!0,rt=!1,St=!0,Ft=!1,_t=!1,ae=!1,l=!1,d=!1,h=!1,g=!1,b=!0,x=!1;const S="user-content-";let D=!0,N=!1,I={},L=null;const F=J({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let U=null;const X=J({},["audio","video","img","source","image","track"]);let Q=null;const ie=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",ye="http://www.w3.org/2000/svg",O="http://www.w3.org/1999/xhtml";let B=O,Z=!1,he=null;const be=J({},[me,ye,O],k);let xe=null;const Be=["application/xhtml+xml","text/html"],je="text/html";let st=null,Ct=null;const vt=De.createElement("form"),Wt=function(ut){return ut instanceof RegExp||ut instanceof Function},Qt=function(){let ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ct&&Ct===ut)){if((!ut||typeof ut!="object")&&(ut={}),ut=ee(ut),xe=Be.indexOf(ut.PARSER_MEDIA_TYPE)===-1?je:ut.PARSER_MEDIA_TYPE,st=xe==="application/xhtml+xml"?k:C,lt=P(ut,"ALLOWED_TAGS")?J({},ut.ALLOWED_TAGS,st):Tt,kt=P(ut,"ALLOWED_ATTR")?J({},ut.ALLOWED_ATTR,st):vn,he=P(ut,"ALLOWED_NAMESPACES")?J({},ut.ALLOWED_NAMESPACES,k):be,Q=P(ut,"ADD_URI_SAFE_ATTR")?J(ee(ie),ut.ADD_URI_SAFE_ATTR,st):ie,U=P(ut,"ADD_DATA_URI_TAGS")?J(ee(X),ut.ADD_DATA_URI_TAGS,st):X,L=P(ut,"FORBID_CONTENTS")?J({},ut.FORBID_CONTENTS,st):F,ln=P(ut,"FORBID_TAGS")?J({},ut.FORBID_TAGS,st):{},Jt=P(ut,"FORBID_ATTR")?J({},ut.FORBID_ATTR,st):{},I=P(ut,"USE_PROFILES")?ut.USE_PROFILES:!1,pt=ut.ALLOW_ARIA_ATTR!==!1,_e=ut.ALLOW_DATA_ATTR!==!1,rt=ut.ALLOW_UNKNOWN_PROTOCOLS||!1,St=ut.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=ut.SAFE_FOR_TEMPLATES||!1,_t=ut.WHOLE_DOCUMENT||!1,d=ut.RETURN_DOM||!1,h=ut.RETURN_DOM_FRAGMENT||!1,g=ut.RETURN_TRUSTED_TYPE||!1,l=ut.FORCE_BODY||!1,b=ut.SANITIZE_DOM!==!1,x=ut.SANITIZE_NAMED_PROPS||!1,D=ut.KEEP_CONTENT!==!1,N=ut.IN_PLACE||!1,Je=ut.ALLOWED_URI_REGEXP||Le,B=ut.NAMESPACE||O,nn=ut.CUSTOM_ELEMENT_HANDLING||{},ut.CUSTOM_ELEMENT_HANDLING&&Wt(ut.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nn.tagNameCheck=ut.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ut.CUSTOM_ELEMENT_HANDLING&&Wt(ut.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nn.attributeNameCheck=ut.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ut.CUSTOM_ELEMENT_HANDLING&&typeof ut.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nn.allowCustomizedBuiltInElements=ut.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(_e=!1),h&&(d=!0),I&&(lt=J({},ce),kt=[],I.html===!0&&(J(lt,ne),J(kt,Se)),I.svg===!0&&(J(lt,oe),J(kt,Me),J(kt,ke)),I.svgFilters===!0&&(J(lt,fe),J(kt,Me),J(kt,ke)),I.mathMl===!0&&(J(lt,ue),J(kt,ze),J(kt,ke))),ut.ADD_TAGS&&(lt===Tt&&(lt=ee(lt)),J(lt,ut.ADD_TAGS,st)),ut.ADD_ATTR&&(kt===vn&&(kt=ee(kt)),J(kt,ut.ADD_ATTR,st)),ut.ADD_URI_SAFE_ATTR&&J(Q,ut.ADD_URI_SAFE_ATTR,st),ut.FORBID_CONTENTS&&(L===F&&(L=ee(L)),J(L,ut.FORBID_CONTENTS,st)),D&&(lt["#text"]=!0),_t&&J(lt,["html","head","body"]),lt.table&&(J(lt,["tbody"]),delete ln.tbody),ut.TRUSTED_TYPES_POLICY){if(typeof ut.TRUSTED_TYPES_POLICY.createHTML!="function")throw z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ut.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Bt=ut.TRUSTED_TYPES_POLICY,an=Bt.createHTML("")}else Bt===void 0&&(Bt=tt(Lt,ft)),Bt!==null&&typeof an=="string"&&(an=Bt.createHTML(""));s&&s(ut),Ct=ut}},rn=J({},["mi","mo","mn","ms","mtext"]),Dn=J({},["foreignobject","desc","title","annotation-xml"]),$n=J({},["title","style","font","a","script"]),Rn=J({},[...oe,...fe,...se]),Wn=J({},[...ue,...le]),Gn=function(ut){let Zt=$t(ut);(!Zt||!Zt.tagName)&&(Zt={namespaceURI:B,tagName:"template"});const Mn=C(ut.tagName),Ar=C(Zt.tagName);return he[ut.namespaceURI]?ut.namespaceURI===ye?Zt.namespaceURI===O?Mn==="svg":Zt.namespaceURI===me?Mn==="svg"&&(Ar==="annotation-xml"||rn[Ar]):!!Rn[Mn]:ut.namespaceURI===me?Zt.namespaceURI===O?Mn==="math":Zt.namespaceURI===ye?Mn==="math"&&Dn[Ar]:!!Wn[Mn]:ut.namespaceURI===O?Zt.namespaceURI===ye&&!Dn[Ar]||Zt.namespaceURI===me&&!rn[Ar]?!1:!Wn[Mn]&&($n[Mn]||!Rn[Mn]):!!(xe==="application/xhtml+xml"&&he[ut.namespaceURI]):!1},pr=function(ut){w(Ce.removed,{element:ut});try{ut.parentNode.removeChild(ut)}catch{ut.remove()}},Vr=function(ut,Zt){try{w(Ce.removed,{attribute:Zt.getAttributeNode(ut),from:Zt})}catch{w(Ce.removed,{attribute:null,from:Zt})}if(Zt.removeAttribute(ut),ut==="is"&&!kt[ut])if(d||h)try{pr(Zt)}catch{}else try{Zt.setAttribute(ut,"")}catch{}},ko=function(ut){let Zt=null,Mn=null;if(l)ut="<remove></remove>"+ut;else{const go=T(ut,/^[\r\n\t ]+/);Mn=go&&go[0]}xe==="application/xhtml+xml"&&B===O&&(ut='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ut+"</body></html>");const Ar=Bt?Bt.createHTML(ut):ut;if(B===O)try{Zt=new wt().parseFromString(Ar,xe)}catch{}if(!Zt||!Zt.documentElement){Zt=sn.createDocument(B,"template",null);try{Zt.documentElement.innerHTML=Z?an:Ar}catch{}}const no=Zt.body||Zt.documentElement;return ut&&Mn&&no.insertBefore(De.createTextNode(Mn),no.childNodes[0]||null),B===O?Nn.call(Zt,_t?"html":"body")[0]:_t?Zt.documentElement:no},Vo=function(ut){return Sn.call(ut.ownerDocument||ut,ut,Qe.SHOW_ELEMENT|Qe.SHOW_COMMENT|Qe.SHOW_TEXT,null)},Yr=function(ut){return ut instanceof at&&(typeof ut.nodeName!="string"||typeof ut.textContent!="string"||typeof ut.removeChild!="function"||!(ut.attributes instanceof et)||typeof ut.removeAttribute!="function"||typeof ut.setAttribute!="function"||typeof ut.namespaceURI!="string"||typeof ut.insertBefore!="function"||typeof ut.hasChildNodes!="function")},Kr=function(ut){return typeof it=="function"&&ut instanceof it},hn=function(ut,Zt,Mn){we[ut]&&v(we[ut],Ar=>{Ar.call(Ce,Zt,Mn,Ct)})},Fn=function(ut){let Zt=null;if(hn("beforeSanitizeElements",ut,null),Yr(ut))return pr(ut),!0;const Mn=st(ut.nodeName);if(hn("uponSanitizeElement",ut,{tagName:Mn,allowedTags:lt}),ut.hasChildNodes()&&!Kr(ut.firstElementChild)&&$(/<[/\w]/g,ut.innerHTML)&&$(/<[/\w]/g,ut.textContent))return pr(ut),!0;if(!lt[Mn]||ln[Mn]){if(!ln[Mn]&&Zr(Mn)&&(nn.tagNameCheck instanceof RegExp&&$(nn.tagNameCheck,Mn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Mn)))return!1;if(D&&!L[Mn]){const Ar=$t(ut)||ut.parentNode,no=gt(ut)||ut.childNodes;if(no&&Ar){const go=no.length;for(let Ho=go-1;Ho>=0;--Ho)Ar.insertBefore(At(no[Ho],!0),ct(ut))}}return pr(ut),!0}return ut instanceof yt&&!Gn(ut)||(Mn==="noscript"||Mn==="noembed"||Mn==="noframes")&&$(/<\/no(script|embed|frames)/i,ut.innerHTML)?(pr(ut),!0):(Ft&&ut.nodeType===3&&(Zt=ut.textContent,v([dt,Ue,Dt],Ar=>{Zt=E(Zt,Ar," ")}),ut.textContent!==Zt&&(w(Ce.removed,{element:ut.cloneNode()}),ut.textContent=Zt)),hn("afterSanitizeElements",ut,null),!1)},Hr=function(ut,Zt,Mn){if(b&&(Zt==="id"||Zt==="name")&&(Mn in De||Mn in vt))return!1;if(!(_e&&!Jt[Zt]&&$(Vt,Zt))){if(!(pt&&$(Nt,Zt))){if(!kt[Zt]||Jt[Zt]){if(!(Zr(ut)&&(nn.tagNameCheck instanceof RegExp&&$(nn.tagNameCheck,ut)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(ut))&&(nn.attributeNameCheck instanceof RegExp&&$(nn.attributeNameCheck,Zt)||nn.attributeNameCheck instanceof Function&&nn.attributeNameCheck(Zt))||Zt==="is"&&nn.allowCustomizedBuiltInElements&&(nn.tagNameCheck instanceof RegExp&&$(nn.tagNameCheck,Mn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Mn))))return!1}else if(!Q[Zt]){if(!$(Je,E(Mn,Re,""))){if(!((Zt==="src"||Zt==="xlink:href"||Zt==="href")&&ut!=="script"&&_(Mn,"data:")===0&&U[ut])){if(!(rt&&!$(Ye,E(Mn,Re,"")))){if(Mn)return!1}}}}}}return!0},Zr=function(ut){return ut!=="annotation-xml"&&ut.indexOf("-")>0},jr=function(ut){hn("beforeSanitizeAttributes",ut,null);const{attributes:Zt}=ut;if(!Zt)return;const Mn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};let Ar=Zt.length;for(;Ar--;){const no=Zt[Ar],{name:go,namespaceURI:Ho,value:ua}=no,ls=st(go);let Go=go==="value"?ua:R(ua);if(Mn.attrName=ls,Mn.attrValue=Go,Mn.keepAttr=!0,Mn.forceKeepAttr=void 0,hn("uponSanitizeAttribute",ut,Mn),Go=Mn.attrValue,Mn.forceKeepAttr||(Vr(go,ut),!Mn.keepAttr))continue;if(!St&&$(/\/>/i,Go)){Vr(go,ut);continue}Ft&&v([dt,Ue,Dt],uf=>{Go=E(Go,uf," ")});const cf=st(ut.nodeName);if(Hr(cf,ls,Go)){if(x&&(ls==="id"||ls==="name")&&(Vr(go,ut),Go=S+Go),Bt&&typeof Lt=="object"&&typeof Lt.getAttributeType=="function"&&!Ho)switch(Lt.getAttributeType(cf,ls)){case"TrustedHTML":{Go=Bt.createHTML(Go);break}case"TrustedScriptURL":{Go=Bt.createScriptURL(Go);break}}try{Ho?ut.setAttributeNS(Ho,go,Go):ut.setAttribute(go,Go),y(Ce.removed)}catch{}}}hn("afterSanitizeAttributes",ut,null)},zs=function An(ut){let Zt=null;const Mn=Vo(ut);for(hn("beforeSanitizeShadowDOM",ut,null);Zt=Mn.nextNode();)hn("uponSanitizeShadowNode",Zt,null),!Fn(Zt)&&(Zt.content instanceof Ze&&An(Zt.content),jr(Zt));hn("afterSanitizeShadowDOM",ut,null)};return Ce.sanitize=function(An){let ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Zt=null,Mn=null,Ar=null,no=null;if(Z=!An,Z&&(An="<!-->"),typeof An!="string"&&!Kr(An))if(typeof An.toString=="function"){if(An=An.toString(),typeof An!="string")throw z("dirty is not a string, aborting")}else throw z("toString is not a function");if(!Ce.isSupported)return An;if(ae||Qt(ut),Ce.removed=[],typeof An=="string"&&(N=!1),N){if(An.nodeName){const ua=st(An.nodeName);if(!lt[ua]||ln[ua])throw z("root node is forbidden and cannot be sanitized in-place")}}else if(An instanceof it)Zt=ko("<!---->"),Mn=Zt.ownerDocument.importNode(An,!0),Mn.nodeType===1&&Mn.nodeName==="BODY"||Mn.nodeName==="HTML"?Zt=Mn:Zt.appendChild(Mn);else{if(!d&&!Ft&&!_t&&An.indexOf("<")===-1)return Bt&&g?Bt.createHTML(An):An;if(Zt=ko(An),!Zt)return d?null:g?an:""}Zt&&l&&pr(Zt.firstChild);const go=Vo(N?An:Zt);for(;Ar=go.nextNode();)Fn(Ar)||(Ar.content instanceof Ze&&zs(Ar.content),jr(Ar));if(N)return An;if(d){if(h)for(no=Pn.call(Zt.ownerDocument);Zt.firstChild;)no.appendChild(Zt.firstChild);else no=Zt;return(kt.shadowroot||kt.shadowrootmode)&&(no=qe.call(We,no,!0)),no}let Ho=_t?Zt.outerHTML:Zt.innerHTML;return _t&<["!doctype"]&&Zt.ownerDocument&&Zt.ownerDocument.doctype&&Zt.ownerDocument.doctype.name&&$(He,Zt.ownerDocument.doctype.name)&&(Ho="<!DOCTYPE "+Zt.ownerDocument.doctype.name+`>
|
|
561
|
-
`+Ho),Ft&&v([dt,Ue,Dt],ua=>{Ho=E(Ho,ua," ")}),Bt&&g?Bt.createHTML(Ho):Ho},Ce.setConfig=function(){let An=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qt(An),ae=!0},Ce.clearConfig=function(){Ct=null,ae=!1},Ce.isValidAttribute=function(An,ut,Zt){Ct||Qt({});const Mn=st(An),Ar=st(ut);return Hr(Mn,Ar,Zt)},Ce.addHook=function(An,ut){typeof ut=="function"&&(we[An]=we[An]||[],w(we[An],ut))},Ce.removeHook=function(An){if(we[An])return y(we[An])},Ce.removeHooks=function(An){we[An]&&(we[An]=[])},Ce.removeAllHooks=function(){we={}},Ce}var Fe=ot();return Fe})})(MB);var vEe=MB.exports,UT=ro(vEe),l1={exports:{}};/*! https://mths.be/he v1.2.0 by @mathias | MIT license */l1.exports,function(e,t){(function(n){var r=t,o=e&&e.exports==r&&e,i=typeof bo=="object"&&bo;(i.global===i||i.window===i)&&(n=i);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,f=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,p={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},m=/["&'<>`]/g,v={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},y=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,w=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,k={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
562
|
-
`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},T={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},E={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],R=String.fromCharCode,P={},$=P.hasOwnProperty,z=function(le,ce){return $.call(le,ce)},q=function(le,ce){for(var Se=-1,Me=le.length;++Se<Me;)if(le[Se]==ce)return!0;return!1},Y=function(le,ce){if(!le)return ce;var Se={},Me;for(Me in ce)Se[Me]=z(le,Me)?le[Me]:ce[Me];return Se},J=function(le,ce){var Se="";return le>=55296&&le<=57343||le>1114111?(ce&&re("character reference outside the permissible Unicode range"),"\uFFFD"):z(E,le)?(ce&&re("disallowed character reference"),E[le]):(ce&&q(_,le)&&re("disallowed character reference"),le>65535&&(le-=65536,Se+=R(le>>>10&1023|55296),le=56320|le&1023),Se+=R(le),Se)},K=function(le){return"&#x"+le.toString(16).toUpperCase()+";"},ee=function(le){return"&#"+le+";"},re=function(le){throw Error("Parse error: "+le)},ne=function(le,ce){ce=Y(ce,ne.options);var Se=ce.strict;Se&&w.test(le)&&re("forbidden code point");var Me=ce.encodeEverything,ze=ce.useNamedReferences,ke=ce.allowUnsafeSymbols,pe=ce.decimal?ee:K,Oe=function(Ae){return pe(Ae.charCodeAt(0))};return Me?(le=le.replace(s,function(Ae){return ze&&z(p,Ae)?"&"+p[Ae]+";":Oe(Ae)}),ze&&(le=le.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),ze&&(le=le.replace(f,function(Ae){return"&"+p[Ae]+";"}))):ze?(ke||(le=le.replace(m,function(Ae){return"&"+p[Ae]+";"})),le=le.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),le=le.replace(f,function(Ae){return"&"+p[Ae]+";"})):ke||(le=le.replace(m,Oe)),le.replace(a,function(Ae){var Pe=Ae.charCodeAt(0),Ve=Ae.charCodeAt(1),Le=(Pe-55296)*1024+Ve-56320+65536;return pe(Le)}).replace(c,Oe)};ne.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var oe=function(le,ce){ce=Y(ce,oe.options);var Se=ce.strict;return Se&&y.test(le)&&re("malformed character reference"),le.replace(C,function(Me,ze,ke,pe,Oe,Ae,Pe,Ve,Le){var Ne,Te,He,Ie,Ge,tt;return ze?(Ge=ze,k[Ge]):ke?(Ge=ke,tt=pe,tt&&ce.isAttributeValue?(Se&&tt=="="&&re("`&` did not start a character reference"),Me):(Se&&re("named character reference was not terminated by a semicolon"),T[Ge]+(tt||""))):Oe?(He=Oe,Te=Ae,Se&&!Te&&re("character reference was not terminated by a semicolon"),Ne=parseInt(He,10),J(Ne,Se)):Pe?(Ie=Pe,Te=Ve,Se&&!Te&&re("character reference was not terminated by a semicolon"),Ne=parseInt(Ie,16),J(Ne,Se)):(Se&&re("named character reference was not terminated by a semicolon"),Me)})};oe.options={isAttributeValue:!1,strict:!1};var fe=function(le){return le.replace(m,function(ce){return v[ce]})},se={version:"1.2.0",encode:ne,decode:oe,escape:fe,unescape:oe};if(r&&!r.nodeType)if(o)o.exports=se;else for(var ue in se)z(se,ue)&&(r[ue]=se[ue]);else n.he=se})(bo)}(l1,l1.exports);var bEe=l1.exports,c1=ro(bEe);const yEe=(e,t)=>{if(!e)return e;switch(t.type){case"string":return xEe(e,t);case"number":return wEe(e,t);case"date":return CEe(e,t);case"time":return SEe(e,t);case"date-time":return kEe(e,t);case"boolean":return EEe(e);case"html":return TEe(e,t);default:return e}},xEe=(e,t)=>t.maxLength&&typeof t.maxLength!="number"?e:Jg(c1.unescape(String(e)),"rtl",t.maxLength),Jg=(e,t,n)=>n&&e.length>n?t==="rtl"?W(Or,{children:e.substring(0,n)+" ..."}):W(Or,{children:"..."+e.substring(0,n)}):W(Or,{children:e}),wEe=(e,t)=>{switch(t.typeNumber){case"int":return Jg(String(parseInt(String(e))),"ltr",t.maxLength);case"float":return Jg(String(parseFloat(String(e))),"ltr",t.maxLength);case"cost":{if(Number.isNaN(parseFloat(String(e))))return e;const n=String(e),[r,o]=n.split("."),i=r.replace(/\B(?=(\d{3})+(?!\d))/g,","),a=o?`${i}.${o}`:i;return Jg(a,"ltr",t.maxLength)}default:return Jg(String(parseFloat(String(e))),"ltr",t.maxLength)}},CEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Date value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Date value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"YYYY/MM/DD",en:"YYYY-MM-DD",ar:"YYYY/MM/DD"},a=t.format||(i[o]??"YYYY/MM/DD");let s;try{s=Jm(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Date value is not a valid date (jalali moment)"),e}return s},SEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Time value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Time value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"HH:mm:ss",en:"hh:mm:ss a",ar:"hh:mm:ss a"},a=t.formatTime||(i[o]??"HH:mm:ss");let s;try{s=Jm(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Time value is not a valid date (jalali moment)"),e}return s},kEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Date Time value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Date Time value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"YYYY/MM/DD HH:mm:ss",en:"YYYY-MM-DD hh:mm:ss a",ar:"YYYY/MM/DD hh:mm:ss a"},a=t.formatDateTime||(i[o]??"YYYY/MM/DD HH:mm:ss");let s;try{s=Jm(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Date Time value is not a valid date (jalali moment)"),e}return s},EEe=e=>e?"true":"false",TEe=(e,t)=>{if(typeof e!="string")return e;const n=UT.sanitize(c1.unescape(e),{USE_PROFILES:{html:!0}});return W("div",{dangerouslySetInnerHTML:{__html:t.ignoreTags?n:e}})},DEe=({type:e="string",...t})=>{const n={type:e,maxLength:t.maxLength,typeNumber:t.typeNumber,format:t.format,formatTime:t.formatTime,formatDateTime:t.formatDateTime,loc:t.loc,ignoreTags:t.ignoreTags??!0};return W(qa,{...t,children:yEe(t.children,n)})};function AEe(e,t){if(t){let n=[];return e.image&&(e.image==="ALL"?n=n.concat(t.image):n=n.concat(e?.image?.filter(r=>t?.image?.includes(r)))),e.video&&(e.video==="ALL"?n=n.concat(t.video):n=n.concat(e?.video?.filter(r=>t?.video?.includes(r)))),e.text&&(e.text==="ALL"?n=n.concat(t.text):n=n.concat(e?.text?.filter(r=>t?.text?.includes(r)))),e.compress&&(e.compress==="ALL"?n=n.concat(t.compress):n=n.concat(e?.compress?.filter(r=>t?.compress?.includes(r)))),n.map(r=>`.${r}`).join(",")}else return"*"}const Di={image:["jpg","jpeg","gif","png","svg","ico"],font:["ttf","eot","woff","woff2"],text:["doc","pdf","xls","ppt","txt","htm","docx","bmp","xlsx","pptx","tif","xml","epub","bpmn","cmmn","csv"],video:["mp4","wmv","mpg","divx","div","tix","qt","mov","avi","mpa","mpe","m1v","bmp"],compress:["zip","rar","tar","gz","tar.gz","tar.xz"]};function PB(e,t){return{thumbnail_URL:t?.[0]==="$"?`${e}${ml.upload}${Td.thumbnailTempPath}${t}`:`${e}${ml.upload}${Td.thumbnailstreamPath}${t}`,larg_URL:t?.[0]==="$"?`${e}${ml.upload}${Td.tempPath}${t}`:`${e}${ml.upload}${Td.streamPath}${t}`}}async function qT(e,t,n){if(!t||t.length===0)return[];try{const r={method:"GET",headers:{sessionId:n??""},credentials:"include"};return(await(await fetch(`${e}${ml.upload}${t?.[0]?.[0]==="$"?Td.restTempUrlFileProperty:Td.restStreamUrlFileProperty}${t.join(",")}`,r)).json())?.data}catch(r){return console.error("Error:",r),[]}}const ml={upload:"/upload/rest"},Td={streamPath:"/api/v1/fileupload/download/stream/",thumbnailstreamPath:"/api/v1/fileupload/thumbnail/stream/",tempPath:"/api/v1/fileupload/download/temp/",thumbnailTempPath:"/api/v1/fileupload/thumbnail/temp/",restStreamUrlFileProperty:"/api/v1/fileupload/property/stream/",restTempUrlFileProperty:"/api/v1/fileupload/property/temp/",exportPath:"/api/v1/export/download/"},u1={pathFileUpload:"/api/v1/fileupload/",pathForUploadCunk:"/api/v1/fileupload/upload/session/",pathForGetFile:"/api/v1/fileupload/upload/"},OEe="/auth/api/v1/bpmsCaptcha/image?rnd=";function MEe({label:e,defaultValue:t,placeholder:n,multiple:r=!1,accept:o,fileCountLimit:i,fileSizeLimit:a,onError:s,pathProp:c,inputStyle:f,style:p,required:m,downloadSmallSize:v,...y}){const{files:w,removeFile:C,uploadingFiles:k,handleFileChange:T,fileExtension:E,APIURL:_}=aM({multiple:r,APIURL:c?.APIURL,sessionId:c?.sessionId,onError:s,fileSizeLimit:a,fileCountLimit:i}),[R,P]=Tn([]);dn(()=>{y?.value===null&&R.length>0&&(R.forEach(z=>C(z.session)),P([]))},[y?.value]),dn(()=>{(async()=>{if(t){const q=Array.isArray(t)?[...t]:[t],Y=await qT(_,q,c?.sessionId);P(q.map(J=>({fileName:(Y??[]).find(K=>K.guid===J)?.fileName,session:J})))}else P([])})()},[t]),dn(()=>{w&&(r?P(z=>[...z,...w.filter(q=>!R.find(Y=>Y.session===q.session)).map(q=>({fileName:q.fileName,session:q.session}))??[]]):w.length>0&&P([{fileName:w[0]?.fileName,session:w[0]?.session}]))},[w]),dn(()=>{y.onChange&&(r?y.onChange((R??[]).map(z=>z.session)):R.length>0?y.onChange(R[R.length-1]?.session):y.onChange())},[R]);const $=z=>{P(q=>q.filter(Y=>Y.session!==z)),w?.find(q=>q.session===z)&&C&&C(z)};return mt("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"10px",alignItems:"center",width:"100%",...p},children:[mt(qa,{children:[e," ",m&&"*"]}),W("label",{htmlFor:`icon-button-file-${y.name}`,children:mt(Tg,{component:"span",style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"5px",...f,...y?.disabled&&{opacity:"0.5"}},children:[W(DB,{}),n]})}),W("input",{style:{display:"none"},accept:E&&o?AEe(o,E):"*",id:`icon-button-file-${y.name}`,type:"file",multiple:r,onChange:z=>{T(z,o)},disabled:y?.disabled}),W("input",{type:"hidden",...y,value:R?.map(z=>z.session)}),R&&R.map(z=>{const q=PB(_,z.session);return W(lM,{sessionId:z?.session,smallUrl:q.thumbnail_URL,largeUrl:q.larg_URL,fileName:z?.fileName,onDelete:y.disabled?void 0:$,downloadSmallSize:v,modal:!0,extention:z.fileName?.split(".").pop()})}),k&&(r||R.length===0)&&k.map(z=>W(YT,{progress:z.progress}))]})}function PEe(e,t){if(t){const n={};return e.image&&(e.image==="ALL"?n["image/*"]=t.image.map(r=>`.${r}`):e.image.forEach(r=>{t?.image?.includes(r)&&(n["image/"+r]=["."+r])})),e.video&&(e.video==="ALL"?n["video/*"]=t.video.map(r=>`.${r}`):e.video.forEach(r=>{t?.video?.includes(r)&&(n["video/"+r]=["."+r])})),e.text&&(e.text==="ALL"?n["text/*"]=t.text.map(r=>`.${r}`):e.text.forEach(r=>{t?.text?.includes(r)&&(n["text/"+r]=["."+r])})),e.compress&&(e.compress==="ALL"?n["text/*"]=[...n["text/*"]??[],...t.compress.map(r=>`.${r}`)??[]]:e.compress.forEach(r=>{t?.compress?.includes(r)&&(n["text/"+r]=["."+r])})),n}else return"*"}const NEe=({label:e="\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0631\u0627 \u062F\u0631 \u0627\u06CC\u0646 \u062C\u0639\u0628\u0647 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u0631\u0648\u06CC \u062C\u0639\u0628\u0647 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",defaultValue:t,multiple:n=!1,accept:r,fileCountLimit:o=20,fileSizeLimit:i,onError:a,required:s,pathProp:c,downloadSmallSize:f,...p})=>{const{files:m,removeFile:v,uploadingFiles:y,handleFileChange:w,fileExtension:C,APIURL:k}=aM({multiple:n,APIURL:c?.APIURL,sessionId:c?.sessionId,onError:a,fileSizeLimit:i,fileCountLimit:o}),[T,E]=Tn([]);dn(()=>{p?.value===null&&T.length>0&&(T.forEach(K=>v(K.session)),E([]))},[p?.value]),dn(()=>{(async()=>{if(t){const ee=Array.isArray(t)?[...t]:[t],re=await qT(k,ee,c?.sessionId);E(ee.map(ne=>({fileName:(re??[]).find(oe=>oe.guid===ne)?.fileName,session:ne})))}else E([])})()},[t]),dn(()=>{m&&(n?E(K=>[...K,...m.filter(ee=>!T.find(re=>re.session===ee.session)).map(ee=>({fileName:ee.fileName,session:ee.session}))??[]]):m.length>0&&E([{fileName:m[0]?.fileName,session:m[0]?.session}]))},[m]),dn(()=>{p.onChange&&(n?p.onChange((T??[]).map(K=>K.session)):T.length>0?p.onChange(T[T.length-1].session):p.onChange())},[T]);const _=Zn(K=>{const ee={target:{files:K}};if(K.length+T.length>o){a?.(`\u062D\u062F\u0627\u06A9\u062B\u0631 ${o} \u0641\u0627\u06CC\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F.`);return}else w(ee,r)},[T]),R=K=>{E(ee=>ee.filter(re=>re.session!==K)),m?.find(ee=>ee.session===K)&&v&&v(K)},{getRootProps:P,getInputProps:$,isDragAccept:z,isDragReject:q,open:Y,inputRef:J}=TE({onDropAccepted:_,accept:r?PEe(r,C??null):void 0,maxFiles:9999,noClick:!0,multiple:n,disabled:p?.disabled});return dn(()=>{if(!J.current)return;const K=async ee=>{const re=ee.clipboardData?.files;re&&re.length>0&&J.current&&(J.current.files=re,J.current.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",K),()=>{document.removeEventListener("paste",K)}},[J]),W(Li,{children:mt(Li,{component:"section",sx:{mb:1,border:2,borderStyle:"dashed",borderRadius:3,borderColor:K=>K.palette.primary.main,transition:"all 0.3s ease-in-ease-out",...z&&{borderColor:K=>K.palette.success.main},...z&&{bgcolor:K=>K.palette.success.light},...q&&{borderColor:K=>K.palette.warning.main},...q&&{bgcolor:K=>K.palette.warning.light},...p.sx},...P(),children:[W("input",{...$(),...p["aria-id"]&&{"aria-id":p["aria-id"]}}),mt(Li,{sx:{p:2,display:"flex",flexDirection:"column",justifyContent:"center"},children:[mt(qa,{sx:{display:"flex",justifyContent:"center"},children:[e," ",s&&"*"]}),W(Li,{sx:{display:"flex",justifyContent:"center"},children:W(Qi,{sx:{color:K=>K.palette.primary.main,...z&&{color:K=>K.palette.success.main},...q&&{color:K=>K.palette.warning.main},...p?.disabled&&{opacity:"0.5"}},onClick:Y,children:W(E$,{size:45})})}),W(vE,{in:T?.length!==0||y?.length!==0,children:mt("div",{style:{display:"flex",flexDirection:"row",gap:"10px",flexWrap:"wrap"},children:[T&&T.map(K=>{const ee=PB(k,K.session);return W(lM,{sessionId:K.session,smallUrl:ee.thumbnail_URL,largeUrl:ee.larg_URL,fileName:K.fileName,onDelete:p.disabled?void 0:R,downloadSmallSize:f,modal:!0,extention:K.fileName?.split(".").pop()})}),y&&(n||T.length===0)&&y.map(K=>W(YT,{progress:K.progress}))]})})]})]})})};function _Ee(e,t,n,r){const o=Array.from(new Set(e.map(s=>s[t])));return o.length===1&&o[0]===void 0?{series:[],uniqueCategoryArray:[]}:{series:Array.from(new Set(e.map(s=>s[n]))).map(s=>({name:s,data:o.map(c=>{const f=e.find(p=>p[n]===s&&p[t]===c);return f&&!Number.isNaN(parseInt(f[r]))?parseInt(f[r]):0})})),uniqueCategoryArray:o}}var NB={},KT={exports:{}};/*!
|
|
560
|
+
r.autoComplete?i.onChange(c[1]):i.onChange(...c),r?.onChange?.(...c)}return mt("div",{children:[W(n,{...i,...r,onChange:s}),a&&a.message&&W("span",{style:{color:"red"},children:a.message})]})}function lEe({children:e,handleClose:t,open:n,...r}){return W(rd,{open:n,onClose:t,...r,children:e})}function cEe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"File_On"},child:[{tag:"path",attr:{d:"M19.485,7.35l-4.97-4.86a1.466,1.466,0,0,0-1.05-.43h-6.9a2.5,2.5,0,0,0-2.5,2.5V19.44a2.507,2.507,0,0,0,2.5,2.5h10.87a2.507,2.507,0,0,0,2.5-2.5V8.42A1.49,1.49,0,0,0,19.485,7.35Zm-1.27.15h-2.34a1.5,1.5,0,0,1-1.5-1.5V3.75Zm.72,11.94a1.5,1.5,0,0,1-1.5,1.5H6.565a1.5,1.5,0,0,1-1.5-1.5V4.56a1.5,1.5,0,0,1,1.5-1.5h6.81V6a2.5,2.5,0,0,0,2.5,2.5h3.06Z"}}]}]})(e)}function uEe(e){return mt(Li,{sx:{position:"relative",display:"inline-flex"},children:[W(ja,{variant:"determinate",...e}),W(Li,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:W(Zo,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e.value)}%`})})]})}function YT({progress:e}){return W("div",{className:"kdpa-uploading-file",style:{display:"flex",flexDirection:"column",alignItems:"center"},children:W("div",{className:"parent",style:{position:"relative",borderRadius:"8px"},children:mt("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:[W(cEe,{style:{position:"absolute",height:"100%",width:"100%",opacity:.2}}),W(uEe,{variant:e===0?"indeterminate":"determinate",value:e})]})})})}function dEe({name:e="",rules:t={},Component:n,...r}){const{control:o,setValue:i}=em(),{field:a,fieldState:{error:s}}=tm({control:o,name:e,rules:t,shouldUnregister:!0,defaultValue:r?.defaultValue});dn(()=>{(r?.defaultValue!==null||r?.defaultValue!==void 0)&&i(e,r?.defaultValue)},[r?.defaultValue]);function c(...f){a.onChange(...f),r?.onChange?.(...f)}return mt(Or,{children:[W(n,{...a,...r,error:s,onChange:c}),s&&s.message&&W(qa,{variant:"caption",sx:{color:"red"},children:s.message})]})}var fEe=Pt.memo(dEe);function hEe({style:e,sx:t,children:n,onSubmit:r,loading:o=!1,submitLoading:i=!1,formState:a}){return W(TM,{...a,children:mt("form",{className:"kdpa-form-container",onSubmit:s=>(s&&(typeof s.preventDefault=="function"&&s.preventDefault(),typeof s.stopPropagation=="function"&&s.stopPropagation()),a?.handleSubmit(async c=>{r?.(c)})(s)),style:{...t,...e},children:[o?W(ja,{}):n,i&&W("div",{className:"kdpa-form-container__loading",children:W(ja,{})})]})})}var AB=Pt.memo(hEe);function OB({name:e="",rules:t={},options:n,multiple:r=!1,defaultValue:o,valueField:i,labelField:a,loading:s=!1,getOptionValue:c,getOptionImage:f,basePathImages:p,imageSize:m="md",...v}){const{control:y,setValue:w,getValues:C}=em(),k=Ur(()=>{if(!o)return r?[]:null;if(r)if(i&&a){const R=o[i],P=o[a];return!P||!R?[]:R?.map((z,q)=>{const Y={[a]:P[q],[i]:z};return i==="EnumTitle"&&(Y.id=z),Y})}else return[];else return o},[]),{field:T,fieldState:{error:E}}=tm({control:y,name:e,rules:t,shouldUnregister:!0,defaultValue:k});dn(()=>{o&&w(e,k)},[k]);function _(...R){T.onChange(R[1]),v?.onChange?.(R[1])}return mt(Or,{children:[W(Eg,{...T,...v,getOptionKey:c,defaultValue:k,multiple:r,options:n,renderOption:f?(R,P)=>{const $=f(P);return cn("div",{...R,key:c?.(P),style:{padding:"10px",cursor:"pointer",display:"flex",flexDirection:"row",gap:"8px"}},W("img",{src:(p?.basePathStream??"")+$,style:{maxWidth:m==="lg"?"100px":m==="md"?"75px":"50px"}}),v.getOptionLabel?.(P))}:void 0,onChange:_,renderInput:R=>cn(Km,{...R,size:"small",key:v?.key,placeholder:v?.placeholder,variant:v?.variant,label:v.label,error:!!E,required:!!v?.required,helperText:E?void 0:v?.helperText,InputProps:{...R.InputProps,...v?.InputProps,endAdornment:mt(Or,{children:[s?W(ja,{color:"inherit",size:20}):null,R.InputProps.endAdornment]})}})}),E&&E.message&&W(qa,{variant:"caption",sx:{color:"red"},children:E.message})]})}function pEe({onScrollEnd:e,onSearch:t,limitCharacterSearch:n=3,delaySearch:r=700,...o}){let i,a;function s(m,v,y){clearTimeout(i),clearTimeout(a),v.length===0&&(a=setTimeout(()=>{t&&t(v)},350)),v.length>=n&&(i=setTimeout(()=>{t&&t(v)},r))}const c=Yt(null),f=Yt(0),p=m=>{const v=m.target;f.current!==v.scrollTop&&(f.current=v.scrollTop,v.scrollTop+v.clientHeight===v.scrollHeight&&!o?.loading&&e&&e())};return dn(()=>{c.current&&(c.current.scrollTop=f.current)},[o?.options]),W(OB,{...o,onInputChange:s,ListboxComponent:m=>W("ul",{onScroll:p,ref:v=>{c.current=v},...m,style:{maxHeight:"200px"},children:m.children})})}function mEe({name:e="",rules:t={},options:n,multiple:r=!1,defaultValueKey:o="",defaultValue:i="",...a}){const{control:s}=em(),c=Ur(()=>r&&Array.isArray(i)?n?.filter(v=>i.includes(v[o])):n?.find(v=>v[o]===i),[n,i]),{field:f,fieldState:{error:p}}=tm({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:c});function m(...v){f.onChange(v[1]),a?.onChange?.(v[1])}return mt(Or,{children:[W(cj,{...f,...a,error:!!p,multiple:r,options:n,onChange:m}),p&&p.message&&W(qa,{variant:"caption",sx:{color:"red"},children:p.message})]})}const gEe=()=>{const e=({data:r,getOptionLabel:o=c=>c.label,getOptionIcon:i=c=>c.icon,getOptionValue:a=c=>c.value,getOptionParent:s=c=>c.parent})=>{const c=[];return r?.forEach(f=>{a(f)&&c.push({value:a(f),label:mt(Or,{children:[i(f),o(f)]}),parent:s(f)})}),c},t=(r=[],o)=>{const i=[];for(const a of r){const s=a;if(!o&&!s?.parent||s?.parent===o){const c=t(r,s.value);c.length>0&&(s.children=c),i.push(s)}}return i},n=(r,o)=>{const i=[];if(!o)return[];const a=r.find(s=>s.value===o);return a&&(i.push(a.value),i.push(...n(r,a.parent))),i};return{renderTreeToSpecificFieldName:e,buildTree:t,findAllExpanded:n}};function vEe({data:e,defaultValue:t=[],onExpand:n,multiSelect:r=!0,getOptionValue:o,getOptionIcon:i,getOptionLabel:a,getOptionParent:s,noDataText:c="no data",...f}){const p=Er(),{buildTree:m,renderTreeToSpecificFieldName:v,findAllExpanded:y}=gEe(),w=v({data:e,getOptionLabel:a,getOptionIcon:i,getOptionValue:o,getOptionParent:s}),C=m(w),[k,T]=Tn([]),[E,_]=Tn([C?.[0]?.value]);dn(()=>{if(t)if(typeof t=="string")_(y(w,t)),T([t]);else{const $=[];t.forEach(z=>{$.push(...y(w,z))}),_($),T([...t])}},[]),dn(()=>{f?.onChange&&(r?f.onChange(k):f.onChange(k[0]))},[k]);function R($,z){if(r)T($);else if(z.isLeaf){const q=!!k.find(Y=>Y===z.value);T(q?[]:[z.value])}}function P($,z){n&&n($,z),_($)}return W("div",{className:"KdTreeField",children:C?.length>0?W(nF,{...f,icons:{leaf:W("span",{}),parentOpen:W("span",{}),parentClose:W("span",{}),check:W(S$,{size:24,color:p?.palette?.primary?.main}),expandOpen:W(x$,{size:24}),uncheck:W(C$,{size:24}),expandClose:W(w$,{size:24}),halfCheck:W(k$,{color:p?.palette?.primary?.main,size:24})},nodes:C,onCheck:R,checked:k,expanded:E,onExpand:P,showNodeIcon:!0}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})}function bEe({name:e="",rules:t={},options:n,getOptionValue:r=s=>s.value,defaultValue:o,split:i,...a}){const{control:s,setValue:c}=em(),f=Ur(()=>o||null,[o]);dn(()=>{c(e,f)},[f]);const{field:p,fieldState:{error:m}}=tm({control:s,name:e,rules:t,shouldUnregister:!0,defaultValue:f});function v(...y){i&&i?.length>0?(p.onChange(y[1]?.join(i)),a?.onChange?.(y[1]?.join(i))):(p.onChange(y[1]),a?.onChange?.(y[1]))}return mt(Or,{children:[W(Eg,{...p,...a,value:i&&i?.length>0&&p?.value?p?.value?.split(i):[],error:!!m,multiple:!0,freeSolo:!0,options:n?.map(y=>r(y))??[],onChange:v}),m&&m.message&&W(qa,{variant:"caption",sx:{color:"red"},children:m.message})]})}var MB={exports:{}};/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */(function(e,t){(function(n,r){e.exports=r()})(bo,function(){const{entries:n,setPrototypeOf:r,isFrozen:o,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:s,seal:c,create:f}=Object,{apply:p,construct:m}=typeof Reflect<"u"&&Reflect;s||(s=function(Ce){return Ce}),c||(c=function(Ce){return Ce}),p||(p=function(Ce,De,We){return Ce.apply(De,We)}),m||(m=function(Ce,De){return new Ce(...De)});const v=q(Array.prototype.forEach),y=q(Array.prototype.pop),w=q(Array.prototype.push),C=q(String.prototype.toLowerCase),k=q(String.prototype.toString),T=q(String.prototype.match),E=q(String.prototype.replace),_=q(String.prototype.indexOf),R=q(String.prototype.trim),P=q(Object.prototype.hasOwnProperty),$=q(RegExp.prototype.test),z=Y(TypeError);function q($e){return function(Ce){for(var De=arguments.length,We=new Array(De>1?De-1:0),ft=1;ft<De;ft++)We[ft-1]=arguments[ft];return p($e,Ce,We)}}function Y($e){return function(){for(var Ce=arguments.length,De=new Array(Ce),We=0;We<Ce;We++)De[We]=arguments[We];return m($e,De)}}function J($e,Ce){let De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C;r&&r($e,null);let We=Ce.length;for(;We--;){let ft=Ce[We];if(typeof ft=="string"){const Ze=De(ft);Ze!==ft&&(o(Ce)||(Ce[We]=Ze),ft=Ze)}$e[ft]=!0}return $e}function K($e){for(let Ce=0;Ce<$e.length;Ce++)P($e,Ce)||($e[Ce]=null);return $e}function ee($e){const Ce=f(null);for(const[De,We]of n($e))P($e,De)&&(Array.isArray(We)?Ce[De]=K(We):We&&typeof We=="object"&&We.constructor===Object?Ce[De]=ee(We):Ce[De]=We);return Ce}function re($e,Ce){for(;$e!==null;){const We=a($e,Ce);if(We){if(We.get)return q(We.get);if(typeof We.value=="function")return q(We.value)}$e=i($e)}function De(){return null}return De}const ne=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),oe=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fe=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),se=s(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ue=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),le=s(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ce=s(["#text"]),Se=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Me=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ze=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pe=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Oe=c(/<%[\w\W]*|[\w\W]*%>/gm),Ae=c(/\${[\w\W]*}/gm),Pe=c(/^data-[\-\w.\u00B7-\uFFFF]/),Ve=c(/^aria-[\-\w]+$/),Le=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ne=c(/^(?:\w+script|data):/i),Te=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),He=c(/^html$/i);var Ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:pe,ERB_EXPR:Oe,TMPLIT_EXPR:Ae,DATA_ATTR:Pe,ARIA_ATTR:Ve,IS_ALLOWED_URI:Le,IS_SCRIPT_OR_DATA:Ne,ATTR_WHITESPACE:Te,DOCTYPE_NAME:He});const Ge=function(){return typeof window>"u"?null:window},tt=function(Ce,De){if(typeof Ce!="object"||typeof Ce.createPolicy!="function")return null;let We=null;const ft="data-tt-policy-suffix";De&&De.hasAttribute(ft)&&(We=De.getAttribute(ft));const Ze="dompurify"+(We?"#"+We:"");try{return Ce.createPolicy(Ze,{createHTML(ht){return ht},createScriptURL(ht){return ht}})}catch{return console.warn("TrustedTypes policy "+Ze+" could not be created."),null}};function ot(){let $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ge();const Ce=An=>ot(An);if(Ce.version="3.0.9",Ce.removed=[],!$e||!$e.document||$e.document.nodeType!==9)return Ce.isSupported=!1,Ce;let{document:De}=$e;const We=De,ft=We.currentScript,{DocumentFragment:Ze,HTMLTemplateElement:ht,Node:it,Element:yt,NodeFilter:Qe,NamedNodeMap:et=$e.NamedNodeMap||$e.MozNamedAttrMap,HTMLFormElement:at,DOMParser:wt,trustedTypes:Lt}=$e,Et=yt.prototype,At=re(Et,"cloneNode"),ct=re(Et,"nextSibling"),gt=re(Et,"childNodes"),$t=re(Et,"parentNode");if(typeof ht=="function"){const An=De.createElement("template");An.content&&An.content.ownerDocument&&(De=An.content.ownerDocument)}let Bt,an="";const{implementation:sn,createNodeIterator:Sn,createDocumentFragment:Pn,getElementsByTagName:Nn}=De,{importNode:qe}=We;let we={};Ce.isSupported=typeof n=="function"&&typeof $t=="function"&&sn&&sn.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:dt,ERB_EXPR:Ue,TMPLIT_EXPR:Dt,DATA_ATTR:Vt,ARIA_ATTR:Nt,IS_SCRIPT_OR_DATA:Ye,ATTR_WHITESPACE:Re}=Ie;let{IS_ALLOWED_URI:Je}=Ie,lt=null;const Tt=J({},[...ne,...oe,...fe,...ue,...ce]);let kt=null;const vn=J({},[...Se,...Me,...ze,...ke]);let nn=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ln=null,Jt=null,pt=!0,_e=!0,rt=!1,St=!0,Ft=!1,_t=!1,ae=!1,l=!1,d=!1,h=!1,g=!1,b=!0,x=!1;const S="user-content-";let D=!0,N=!1,I={},L=null;const F=J({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let U=null;const X=J({},["audio","video","img","source","image","track"]);let Q=null;const ie=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),me="http://www.w3.org/1998/Math/MathML",ye="http://www.w3.org/2000/svg",O="http://www.w3.org/1999/xhtml";let B=O,Z=!1,he=null;const be=J({},[me,ye,O],k);let xe=null;const Be=["application/xhtml+xml","text/html"],je="text/html";let st=null,Ct=null;const vt=De.createElement("form"),Wt=function(ut){return ut instanceof RegExp||ut instanceof Function},Qt=function(){let ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ct&&Ct===ut)){if((!ut||typeof ut!="object")&&(ut={}),ut=ee(ut),xe=Be.indexOf(ut.PARSER_MEDIA_TYPE)===-1?je:ut.PARSER_MEDIA_TYPE,st=xe==="application/xhtml+xml"?k:C,lt=P(ut,"ALLOWED_TAGS")?J({},ut.ALLOWED_TAGS,st):Tt,kt=P(ut,"ALLOWED_ATTR")?J({},ut.ALLOWED_ATTR,st):vn,he=P(ut,"ALLOWED_NAMESPACES")?J({},ut.ALLOWED_NAMESPACES,k):be,Q=P(ut,"ADD_URI_SAFE_ATTR")?J(ee(ie),ut.ADD_URI_SAFE_ATTR,st):ie,U=P(ut,"ADD_DATA_URI_TAGS")?J(ee(X),ut.ADD_DATA_URI_TAGS,st):X,L=P(ut,"FORBID_CONTENTS")?J({},ut.FORBID_CONTENTS,st):F,ln=P(ut,"FORBID_TAGS")?J({},ut.FORBID_TAGS,st):{},Jt=P(ut,"FORBID_ATTR")?J({},ut.FORBID_ATTR,st):{},I=P(ut,"USE_PROFILES")?ut.USE_PROFILES:!1,pt=ut.ALLOW_ARIA_ATTR!==!1,_e=ut.ALLOW_DATA_ATTR!==!1,rt=ut.ALLOW_UNKNOWN_PROTOCOLS||!1,St=ut.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ft=ut.SAFE_FOR_TEMPLATES||!1,_t=ut.WHOLE_DOCUMENT||!1,d=ut.RETURN_DOM||!1,h=ut.RETURN_DOM_FRAGMENT||!1,g=ut.RETURN_TRUSTED_TYPE||!1,l=ut.FORCE_BODY||!1,b=ut.SANITIZE_DOM!==!1,x=ut.SANITIZE_NAMED_PROPS||!1,D=ut.KEEP_CONTENT!==!1,N=ut.IN_PLACE||!1,Je=ut.ALLOWED_URI_REGEXP||Le,B=ut.NAMESPACE||O,nn=ut.CUSTOM_ELEMENT_HANDLING||{},ut.CUSTOM_ELEMENT_HANDLING&&Wt(ut.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nn.tagNameCheck=ut.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ut.CUSTOM_ELEMENT_HANDLING&&Wt(ut.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nn.attributeNameCheck=ut.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ut.CUSTOM_ELEMENT_HANDLING&&typeof ut.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nn.allowCustomizedBuiltInElements=ut.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(_e=!1),h&&(d=!0),I&&(lt=J({},ce),kt=[],I.html===!0&&(J(lt,ne),J(kt,Se)),I.svg===!0&&(J(lt,oe),J(kt,Me),J(kt,ke)),I.svgFilters===!0&&(J(lt,fe),J(kt,Me),J(kt,ke)),I.mathMl===!0&&(J(lt,ue),J(kt,ze),J(kt,ke))),ut.ADD_TAGS&&(lt===Tt&&(lt=ee(lt)),J(lt,ut.ADD_TAGS,st)),ut.ADD_ATTR&&(kt===vn&&(kt=ee(kt)),J(kt,ut.ADD_ATTR,st)),ut.ADD_URI_SAFE_ATTR&&J(Q,ut.ADD_URI_SAFE_ATTR,st),ut.FORBID_CONTENTS&&(L===F&&(L=ee(L)),J(L,ut.FORBID_CONTENTS,st)),D&&(lt["#text"]=!0),_t&&J(lt,["html","head","body"]),lt.table&&(J(lt,["tbody"]),delete ln.tbody),ut.TRUSTED_TYPES_POLICY){if(typeof ut.TRUSTED_TYPES_POLICY.createHTML!="function")throw z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ut.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Bt=ut.TRUSTED_TYPES_POLICY,an=Bt.createHTML("")}else Bt===void 0&&(Bt=tt(Lt,ft)),Bt!==null&&typeof an=="string"&&(an=Bt.createHTML(""));s&&s(ut),Ct=ut}},rn=J({},["mi","mo","mn","ms","mtext"]),Dn=J({},["foreignobject","desc","title","annotation-xml"]),$n=J({},["title","style","font","a","script"]),Rn=J({},[...oe,...fe,...se]),Wn=J({},[...ue,...le]),Gn=function(ut){let Zt=$t(ut);(!Zt||!Zt.tagName)&&(Zt={namespaceURI:B,tagName:"template"});const Mn=C(ut.tagName),Ar=C(Zt.tagName);return he[ut.namespaceURI]?ut.namespaceURI===ye?Zt.namespaceURI===O?Mn==="svg":Zt.namespaceURI===me?Mn==="svg"&&(Ar==="annotation-xml"||rn[Ar]):!!Rn[Mn]:ut.namespaceURI===me?Zt.namespaceURI===O?Mn==="math":Zt.namespaceURI===ye?Mn==="math"&&Dn[Ar]:!!Wn[Mn]:ut.namespaceURI===O?Zt.namespaceURI===ye&&!Dn[Ar]||Zt.namespaceURI===me&&!rn[Ar]?!1:!Wn[Mn]&&($n[Mn]||!Rn[Mn]):!!(xe==="application/xhtml+xml"&&he[ut.namespaceURI]):!1},pr=function(ut){w(Ce.removed,{element:ut});try{ut.parentNode.removeChild(ut)}catch{ut.remove()}},Vr=function(ut,Zt){try{w(Ce.removed,{attribute:Zt.getAttributeNode(ut),from:Zt})}catch{w(Ce.removed,{attribute:null,from:Zt})}if(Zt.removeAttribute(ut),ut==="is"&&!kt[ut])if(d||h)try{pr(Zt)}catch{}else try{Zt.setAttribute(ut,"")}catch{}},ko=function(ut){let Zt=null,Mn=null;if(l)ut="<remove></remove>"+ut;else{const go=T(ut,/^[\r\n\t ]+/);Mn=go&&go[0]}xe==="application/xhtml+xml"&&B===O&&(ut='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ut+"</body></html>");const Ar=Bt?Bt.createHTML(ut):ut;if(B===O)try{Zt=new wt().parseFromString(Ar,xe)}catch{}if(!Zt||!Zt.documentElement){Zt=sn.createDocument(B,"template",null);try{Zt.documentElement.innerHTML=Z?an:Ar}catch{}}const no=Zt.body||Zt.documentElement;return ut&&Mn&&no.insertBefore(De.createTextNode(Mn),no.childNodes[0]||null),B===O?Nn.call(Zt,_t?"html":"body")[0]:_t?Zt.documentElement:no},Vo=function(ut){return Sn.call(ut.ownerDocument||ut,ut,Qe.SHOW_ELEMENT|Qe.SHOW_COMMENT|Qe.SHOW_TEXT,null)},Yr=function(ut){return ut instanceof at&&(typeof ut.nodeName!="string"||typeof ut.textContent!="string"||typeof ut.removeChild!="function"||!(ut.attributes instanceof et)||typeof ut.removeAttribute!="function"||typeof ut.setAttribute!="function"||typeof ut.namespaceURI!="string"||typeof ut.insertBefore!="function"||typeof ut.hasChildNodes!="function")},Kr=function(ut){return typeof it=="function"&&ut instanceof it},hn=function(ut,Zt,Mn){we[ut]&&v(we[ut],Ar=>{Ar.call(Ce,Zt,Mn,Ct)})},Fn=function(ut){let Zt=null;if(hn("beforeSanitizeElements",ut,null),Yr(ut))return pr(ut),!0;const Mn=st(ut.nodeName);if(hn("uponSanitizeElement",ut,{tagName:Mn,allowedTags:lt}),ut.hasChildNodes()&&!Kr(ut.firstElementChild)&&$(/<[/\w]/g,ut.innerHTML)&&$(/<[/\w]/g,ut.textContent))return pr(ut),!0;if(!lt[Mn]||ln[Mn]){if(!ln[Mn]&&Zr(Mn)&&(nn.tagNameCheck instanceof RegExp&&$(nn.tagNameCheck,Mn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Mn)))return!1;if(D&&!L[Mn]){const Ar=$t(ut)||ut.parentNode,no=gt(ut)||ut.childNodes;if(no&&Ar){const go=no.length;for(let Ho=go-1;Ho>=0;--Ho)Ar.insertBefore(At(no[Ho],!0),ct(ut))}}return pr(ut),!0}return ut instanceof yt&&!Gn(ut)||(Mn==="noscript"||Mn==="noembed"||Mn==="noframes")&&$(/<\/no(script|embed|frames)/i,ut.innerHTML)?(pr(ut),!0):(Ft&&ut.nodeType===3&&(Zt=ut.textContent,v([dt,Ue,Dt],Ar=>{Zt=E(Zt,Ar," ")}),ut.textContent!==Zt&&(w(Ce.removed,{element:ut.cloneNode()}),ut.textContent=Zt)),hn("afterSanitizeElements",ut,null),!1)},Hr=function(ut,Zt,Mn){if(b&&(Zt==="id"||Zt==="name")&&(Mn in De||Mn in vt))return!1;if(!(_e&&!Jt[Zt]&&$(Vt,Zt))){if(!(pt&&$(Nt,Zt))){if(!kt[Zt]||Jt[Zt]){if(!(Zr(ut)&&(nn.tagNameCheck instanceof RegExp&&$(nn.tagNameCheck,ut)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(ut))&&(nn.attributeNameCheck instanceof RegExp&&$(nn.attributeNameCheck,Zt)||nn.attributeNameCheck instanceof Function&&nn.attributeNameCheck(Zt))||Zt==="is"&&nn.allowCustomizedBuiltInElements&&(nn.tagNameCheck instanceof RegExp&&$(nn.tagNameCheck,Mn)||nn.tagNameCheck instanceof Function&&nn.tagNameCheck(Mn))))return!1}else if(!Q[Zt]){if(!$(Je,E(Mn,Re,""))){if(!((Zt==="src"||Zt==="xlink:href"||Zt==="href")&&ut!=="script"&&_(Mn,"data:")===0&&U[ut])){if(!(rt&&!$(Ye,E(Mn,Re,"")))){if(Mn)return!1}}}}}}return!0},Zr=function(ut){return ut!=="annotation-xml"&&ut.indexOf("-")>0},jr=function(ut){hn("beforeSanitizeAttributes",ut,null);const{attributes:Zt}=ut;if(!Zt)return;const Mn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};let Ar=Zt.length;for(;Ar--;){const no=Zt[Ar],{name:go,namespaceURI:Ho,value:ua}=no,ls=st(go);let Go=go==="value"?ua:R(ua);if(Mn.attrName=ls,Mn.attrValue=Go,Mn.keepAttr=!0,Mn.forceKeepAttr=void 0,hn("uponSanitizeAttribute",ut,Mn),Go=Mn.attrValue,Mn.forceKeepAttr||(Vr(go,ut),!Mn.keepAttr))continue;if(!St&&$(/\/>/i,Go)){Vr(go,ut);continue}Ft&&v([dt,Ue,Dt],uf=>{Go=E(Go,uf," ")});const cf=st(ut.nodeName);if(Hr(cf,ls,Go)){if(x&&(ls==="id"||ls==="name")&&(Vr(go,ut),Go=S+Go),Bt&&typeof Lt=="object"&&typeof Lt.getAttributeType=="function"&&!Ho)switch(Lt.getAttributeType(cf,ls)){case"TrustedHTML":{Go=Bt.createHTML(Go);break}case"TrustedScriptURL":{Go=Bt.createScriptURL(Go);break}}try{Ho?ut.setAttributeNS(Ho,go,Go):ut.setAttribute(go,Go),y(Ce.removed)}catch{}}}hn("afterSanitizeAttributes",ut,null)},zs=function An(ut){let Zt=null;const Mn=Vo(ut);for(hn("beforeSanitizeShadowDOM",ut,null);Zt=Mn.nextNode();)hn("uponSanitizeShadowNode",Zt,null),!Fn(Zt)&&(Zt.content instanceof Ze&&An(Zt.content),jr(Zt));hn("afterSanitizeShadowDOM",ut,null)};return Ce.sanitize=function(An){let ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Zt=null,Mn=null,Ar=null,no=null;if(Z=!An,Z&&(An="<!-->"),typeof An!="string"&&!Kr(An))if(typeof An.toString=="function"){if(An=An.toString(),typeof An!="string")throw z("dirty is not a string, aborting")}else throw z("toString is not a function");if(!Ce.isSupported)return An;if(ae||Qt(ut),Ce.removed=[],typeof An=="string"&&(N=!1),N){if(An.nodeName){const ua=st(An.nodeName);if(!lt[ua]||ln[ua])throw z("root node is forbidden and cannot be sanitized in-place")}}else if(An instanceof it)Zt=ko("<!---->"),Mn=Zt.ownerDocument.importNode(An,!0),Mn.nodeType===1&&Mn.nodeName==="BODY"||Mn.nodeName==="HTML"?Zt=Mn:Zt.appendChild(Mn);else{if(!d&&!Ft&&!_t&&An.indexOf("<")===-1)return Bt&&g?Bt.createHTML(An):An;if(Zt=ko(An),!Zt)return d?null:g?an:""}Zt&&l&&pr(Zt.firstChild);const go=Vo(N?An:Zt);for(;Ar=go.nextNode();)Fn(Ar)||(Ar.content instanceof Ze&&zs(Ar.content),jr(Ar));if(N)return An;if(d){if(h)for(no=Pn.call(Zt.ownerDocument);Zt.firstChild;)no.appendChild(Zt.firstChild);else no=Zt;return(kt.shadowroot||kt.shadowrootmode)&&(no=qe.call(We,no,!0)),no}let Ho=_t?Zt.outerHTML:Zt.innerHTML;return _t&<["!doctype"]&&Zt.ownerDocument&&Zt.ownerDocument.doctype&&Zt.ownerDocument.doctype.name&&$(He,Zt.ownerDocument.doctype.name)&&(Ho="<!DOCTYPE "+Zt.ownerDocument.doctype.name+`>
|
|
561
|
+
`+Ho),Ft&&v([dt,Ue,Dt],ua=>{Ho=E(Ho,ua," ")}),Bt&&g?Bt.createHTML(Ho):Ho},Ce.setConfig=function(){let An=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qt(An),ae=!0},Ce.clearConfig=function(){Ct=null,ae=!1},Ce.isValidAttribute=function(An,ut,Zt){Ct||Qt({});const Mn=st(An),Ar=st(ut);return Hr(Mn,Ar,Zt)},Ce.addHook=function(An,ut){typeof ut=="function"&&(we[An]=we[An]||[],w(we[An],ut))},Ce.removeHook=function(An){if(we[An])return y(we[An])},Ce.removeHooks=function(An){we[An]&&(we[An]=[])},Ce.removeAllHooks=function(){we={}},Ce}var Fe=ot();return Fe})})(MB);var yEe=MB.exports,UT=ro(yEe),l1={exports:{}};/*! https://mths.be/he v1.2.0 by @mathias | MIT license */l1.exports,function(e,t){(function(n){var r=t,o=e&&e.exports==r&&e,i=typeof bo=="object"&&bo;(i.global===i||i.window===i)&&(n=i);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,f=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,p={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},m=/["&'<>`]/g,v={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},y=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,w=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,k={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
562
|
+
`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},T={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},E={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],R=String.fromCharCode,P={},$=P.hasOwnProperty,z=function(le,ce){return $.call(le,ce)},q=function(le,ce){for(var Se=-1,Me=le.length;++Se<Me;)if(le[Se]==ce)return!0;return!1},Y=function(le,ce){if(!le)return ce;var Se={},Me;for(Me in ce)Se[Me]=z(le,Me)?le[Me]:ce[Me];return Se},J=function(le,ce){var Se="";return le>=55296&&le<=57343||le>1114111?(ce&&re("character reference outside the permissible Unicode range"),"\uFFFD"):z(E,le)?(ce&&re("disallowed character reference"),E[le]):(ce&&q(_,le)&&re("disallowed character reference"),le>65535&&(le-=65536,Se+=R(le>>>10&1023|55296),le=56320|le&1023),Se+=R(le),Se)},K=function(le){return"&#x"+le.toString(16).toUpperCase()+";"},ee=function(le){return"&#"+le+";"},re=function(le){throw Error("Parse error: "+le)},ne=function(le,ce){ce=Y(ce,ne.options);var Se=ce.strict;Se&&w.test(le)&&re("forbidden code point");var Me=ce.encodeEverything,ze=ce.useNamedReferences,ke=ce.allowUnsafeSymbols,pe=ce.decimal?ee:K,Oe=function(Ae){return pe(Ae.charCodeAt(0))};return Me?(le=le.replace(s,function(Ae){return ze&&z(p,Ae)?"&"+p[Ae]+";":Oe(Ae)}),ze&&(le=le.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),ze&&(le=le.replace(f,function(Ae){return"&"+p[Ae]+";"}))):ze?(ke||(le=le.replace(m,function(Ae){return"&"+p[Ae]+";"})),le=le.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),le=le.replace(f,function(Ae){return"&"+p[Ae]+";"})):ke||(le=le.replace(m,Oe)),le.replace(a,function(Ae){var Pe=Ae.charCodeAt(0),Ve=Ae.charCodeAt(1),Le=(Pe-55296)*1024+Ve-56320+65536;return pe(Le)}).replace(c,Oe)};ne.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var oe=function(le,ce){ce=Y(ce,oe.options);var Se=ce.strict;return Se&&y.test(le)&&re("malformed character reference"),le.replace(C,function(Me,ze,ke,pe,Oe,Ae,Pe,Ve,Le){var Ne,Te,He,Ie,Ge,tt;return ze?(Ge=ze,k[Ge]):ke?(Ge=ke,tt=pe,tt&&ce.isAttributeValue?(Se&&tt=="="&&re("`&` did not start a character reference"),Me):(Se&&re("named character reference was not terminated by a semicolon"),T[Ge]+(tt||""))):Oe?(He=Oe,Te=Ae,Se&&!Te&&re("character reference was not terminated by a semicolon"),Ne=parseInt(He,10),J(Ne,Se)):Pe?(Ie=Pe,Te=Ve,Se&&!Te&&re("character reference was not terminated by a semicolon"),Ne=parseInt(Ie,16),J(Ne,Se)):(Se&&re("named character reference was not terminated by a semicolon"),Me)})};oe.options={isAttributeValue:!1,strict:!1};var fe=function(le){return le.replace(m,function(ce){return v[ce]})},se={version:"1.2.0",encode:ne,decode:oe,escape:fe,unescape:oe};if(r&&!r.nodeType)if(o)o.exports=se;else for(var ue in se)z(se,ue)&&(r[ue]=se[ue]);else n.he=se})(bo)}(l1,l1.exports);var xEe=l1.exports,c1=ro(xEe);const wEe=(e,t)=>{if(!e)return e;switch(t.type){case"string":return CEe(e,t);case"number":return SEe(e,t);case"date":return kEe(e,t);case"time":return EEe(e,t);case"date-time":return TEe(e,t);case"boolean":return DEe(e);case"html":return AEe(e,t);default:return e}},CEe=(e,t)=>t.maxLength&&typeof t.maxLength!="number"?e:Jg(c1.unescape(String(e)),"rtl",t.maxLength),Jg=(e,t,n)=>n&&e.length>n?t==="rtl"?W(Or,{children:e.substring(0,n)+" ..."}):W(Or,{children:"..."+e.substring(0,n)}):W(Or,{children:e}),SEe=(e,t)=>{switch(t.typeNumber){case"int":return Jg(String(parseInt(String(e))),"ltr",t.maxLength);case"float":return Jg(String(parseFloat(String(e))),"ltr",t.maxLength);case"cost":{if(Number.isNaN(parseFloat(String(e))))return e;const n=String(e),[r,o]=n.split("."),i=r.replace(/\B(?=(\d{3})+(?!\d))/g,","),a=o?`${i}.${o}`:i;return Jg(a,"ltr",t.maxLength)}default:return Jg(String(parseFloat(String(e))),"ltr",t.maxLength)}},kEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Date value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Date value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"YYYY/MM/DD",en:"YYYY-MM-DD",ar:"YYYY/MM/DD"},a=t.format||(i[o]??"YYYY/MM/DD");let s;try{s=Jm(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Date value is not a valid date (jalali moment)"),e}return s},EEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Time value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Time value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"HH:mm:ss",en:"hh:mm:ss a",ar:"hh:mm:ss a"},a=t.formatTime||(i[o]??"HH:mm:ss");let s;try{s=Jm(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Time value is not a valid date (jalali moment)"),e}return s},TEe=(e,t)=>{if(typeof e!="string")return console.error("Kdpa Typography error: Date Time value is not a string"),e;const n=new Date(e);if(isNaN(n.getTime()))return console.error("Kdpa Typography error: Date Time value is not a valid date (new Date)"),e;const r=localStorage.getItem("i18nextLng")??"fa",o=t.loc||r,i={fa:"YYYY/MM/DD HH:mm:ss",en:"YYYY-MM-DD hh:mm:ss a",ar:"YYYY/MM/DD hh:mm:ss a"},a=t.formatDateTime||(i[o]??"YYYY/MM/DD HH:mm:ss");let s;try{s=Jm(n).locale(o).format(a)}catch{return console.error("Kdpa Typography error: Date Time value is not a valid date (jalali moment)"),e}return s},DEe=e=>e?"true":"false",AEe=(e,t)=>{if(typeof e!="string")return e;const n=UT.sanitize(c1.unescape(e),{USE_PROFILES:{html:!0}});return W("div",{dangerouslySetInnerHTML:{__html:t.ignoreTags?n:e}})},OEe=({type:e="string",...t})=>{const n={type:e,maxLength:t.maxLength,typeNumber:t.typeNumber,format:t.format,formatTime:t.formatTime,formatDateTime:t.formatDateTime,loc:t.loc,ignoreTags:t.ignoreTags??!0};return W(qa,{...t,children:wEe(t.children,n)})};function MEe(e,t){if(t){let n=[];return e.image&&(e.image==="ALL"?n=n.concat(t.image):n=n.concat(e?.image?.filter(r=>t?.image?.includes(r)))),e.video&&(e.video==="ALL"?n=n.concat(t.video):n=n.concat(e?.video?.filter(r=>t?.video?.includes(r)))),e.text&&(e.text==="ALL"?n=n.concat(t.text):n=n.concat(e?.text?.filter(r=>t?.text?.includes(r)))),e.compress&&(e.compress==="ALL"?n=n.concat(t.compress):n=n.concat(e?.compress?.filter(r=>t?.compress?.includes(r)))),n.map(r=>`.${r}`).join(",")}else return"*"}const Di={image:["jpg","jpeg","gif","png","svg","ico"],font:["ttf","eot","woff","woff2"],text:["doc","pdf","xls","ppt","txt","htm","docx","bmp","xlsx","pptx","tif","xml","epub","bpmn","cmmn","csv"],video:["mp4","wmv","mpg","divx","div","tix","qt","mov","avi","mpa","mpe","m1v","bmp"],compress:["zip","rar","tar","gz","tar.gz","tar.xz"]};function PB(e,t){return{thumbnail_URL:t?.[0]==="$"?`${e}${ml.upload}${Td.thumbnailTempPath}${t}`:`${e}${ml.upload}${Td.thumbnailstreamPath}${t}`,larg_URL:t?.[0]==="$"?`${e}${ml.upload}${Td.tempPath}${t}`:`${e}${ml.upload}${Td.streamPath}${t}`}}async function qT(e,t,n){if(!t||t.length===0)return[];try{const r={method:"GET",headers:{sessionId:n??""},credentials:"include"};return(await(await fetch(`${e}${ml.upload}${t?.[0]?.[0]==="$"?Td.restTempUrlFileProperty:Td.restStreamUrlFileProperty}${t.join(",")}`,r)).json())?.data}catch(r){return console.error("Error:",r),[]}}const ml={upload:"/upload/rest"},Td={streamPath:"/api/v1/fileupload/download/stream/",thumbnailstreamPath:"/api/v1/fileupload/thumbnail/stream/",tempPath:"/api/v1/fileupload/download/temp/",thumbnailTempPath:"/api/v1/fileupload/thumbnail/temp/",restStreamUrlFileProperty:"/api/v1/fileupload/property/stream/",restTempUrlFileProperty:"/api/v1/fileupload/property/temp/",exportPath:"/api/v1/export/download/"},u1={pathFileUpload:"/api/v1/fileupload/",pathForUploadCunk:"/api/v1/fileupload/upload/session/",pathForGetFile:"/api/v1/fileupload/upload/"},PEe="/auth/api/v1/bpmsCaptcha/image?rnd=";function NEe({label:e,defaultValue:t,placeholder:n,multiple:r=!1,accept:o,fileCountLimit:i,fileSizeLimit:a,onError:s,pathProp:c,inputStyle:f,style:p,required:m,downloadSmallSize:v,...y}){const{files:w,removeFile:C,uploadingFiles:k,handleFileChange:T,fileExtension:E,APIURL:_}=aM({multiple:r,APIURL:c?.APIURL,sessionId:c?.sessionId,onError:s,fileSizeLimit:a,fileCountLimit:i}),[R,P]=Tn([]);dn(()=>{y?.value===null&&R.length>0&&(R.forEach(z=>C(z.session)),P([]))},[y?.value]),dn(()=>{(async()=>{if(t){const q=Array.isArray(t)?[...t]:[t],Y=await qT(_,q,c?.sessionId);P(q.map(J=>({fileName:(Y??[]).find(K=>K.guid===J)?.fileName,session:J})))}else P([])})()},[t]),dn(()=>{w&&(r?P(z=>[...z,...w.filter(q=>!R.find(Y=>Y.session===q.session)).map(q=>({fileName:q.fileName,session:q.session}))??[]]):w.length>0&&P([{fileName:w[0]?.fileName,session:w[0]?.session}]))},[w]),dn(()=>{y.onChange&&(r?y.onChange((R??[]).map(z=>z.session)):R.length>0?y.onChange(R[R.length-1]?.session):y.onChange())},[R]);const $=z=>{P(q=>q.filter(Y=>Y.session!==z)),w?.find(q=>q.session===z)&&C&&C(z)};return mt("div",{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:"10px",alignItems:"center",width:"100%",...p},children:[mt(qa,{children:[e," ",m&&"*"]}),W("label",{htmlFor:`icon-button-file-${y.name}`,children:mt(Tg,{component:"span",style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"5px",...f,...y?.disabled&&{opacity:"0.5"}},children:[W(DB,{}),n]})}),W("input",{style:{display:"none"},accept:E&&o?MEe(o,E):"*",id:`icon-button-file-${y.name}`,type:"file",multiple:r,onChange:z=>{T(z,o)},disabled:y?.disabled}),W("input",{type:"hidden",...y,value:R?.map(z=>z.session)}),R&&R.map(z=>{const q=PB(_,z.session);return W(lM,{sessionId:z?.session,smallUrl:q.thumbnail_URL,largeUrl:q.larg_URL,fileName:z?.fileName,onDelete:y.disabled?void 0:$,downloadSmallSize:v,modal:!0,extention:z.fileName?.split(".").pop()})}),k&&(r||R.length===0)&&k.map(z=>W(YT,{progress:z.progress}))]})}function _Ee(e,t){if(t){const n={};return e.image&&(e.image==="ALL"?n["image/*"]=t.image.map(r=>`.${r}`):e.image.forEach(r=>{t?.image?.includes(r)&&(n["image/"+r]=["."+r])})),e.video&&(e.video==="ALL"?n["video/*"]=t.video.map(r=>`.${r}`):e.video.forEach(r=>{t?.video?.includes(r)&&(n["video/"+r]=["."+r])})),e.text&&(e.text==="ALL"?n["text/*"]=t.text.map(r=>`.${r}`):e.text.forEach(r=>{t?.text?.includes(r)&&(n["text/"+r]=["."+r])})),e.compress&&(e.compress==="ALL"?n["text/*"]=[...n["text/*"]??[],...t.compress.map(r=>`.${r}`)??[]]:e.compress.forEach(r=>{t?.compress?.includes(r)&&(n["text/"+r]=["."+r])})),n}else return"*"}const REe=({label:e="\u0641\u0627\u06CC\u0644(\u0647\u0627) \u0631\u0627 \u062F\u0631 \u0627\u06CC\u0646 \u062C\u0639\u0628\u0647 \u0631\u0647\u0627 \u06A9\u0646\u06CC\u062F\u060C \u06CC\u0627 \u0631\u0648\u06CC \u062C\u0639\u0628\u0647 \u06A9\u0644\u06CC\u06A9 \u06A9\u0646\u06CC\u062F",defaultValue:t,multiple:n=!1,accept:r,fileCountLimit:o=20,fileSizeLimit:i,onError:a,required:s,pathProp:c,downloadSmallSize:f,...p})=>{const{files:m,removeFile:v,uploadingFiles:y,handleFileChange:w,fileExtension:C,APIURL:k}=aM({multiple:n,APIURL:c?.APIURL,sessionId:c?.sessionId,onError:a,fileSizeLimit:i,fileCountLimit:o}),[T,E]=Tn([]);dn(()=>{p?.value===null&&T.length>0&&(T.forEach(K=>v(K.session)),E([]))},[p?.value]),dn(()=>{(async()=>{if(t){const ee=Array.isArray(t)?[...t]:[t],re=await qT(k,ee,c?.sessionId);E(ee.map(ne=>({fileName:(re??[]).find(oe=>oe.guid===ne)?.fileName,session:ne})))}else E([])})()},[t]),dn(()=>{m&&(n?E(K=>[...K,...m.filter(ee=>!T.find(re=>re.session===ee.session)).map(ee=>({fileName:ee.fileName,session:ee.session}))??[]]):m.length>0&&E([{fileName:m[0]?.fileName,session:m[0]?.session}]))},[m]),dn(()=>{p.onChange&&(n?p.onChange((T??[]).map(K=>K.session)):T.length>0?p.onChange(T[T.length-1].session):p.onChange())},[T]);const _=Zn(K=>{const ee={target:{files:K}};if(K.length+T.length>o){a?.(`\u062D\u062F\u0627\u06A9\u062B\u0631 ${o} \u0641\u0627\u06CC\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F.`);return}else w(ee,r)},[T]),R=K=>{E(ee=>ee.filter(re=>re.session!==K)),m?.find(ee=>ee.session===K)&&v&&v(K)},{getRootProps:P,getInputProps:$,isDragAccept:z,isDragReject:q,open:Y,inputRef:J}=TE({onDropAccepted:_,accept:r?_Ee(r,C??null):void 0,maxFiles:9999,noClick:!0,multiple:n,disabled:p?.disabled});return dn(()=>{if(!J.current)return;const K=async ee=>{const re=ee.clipboardData?.files;re&&re.length>0&&J.current&&(J.current.files=re,J.current.dispatchEvent(new Event("change",{bubbles:!0})))};return document.addEventListener("paste",K),()=>{document.removeEventListener("paste",K)}},[J]),W(Li,{children:mt(Li,{component:"section",sx:{mb:1,border:2,borderStyle:"dashed",borderRadius:3,borderColor:K=>K.palette.primary.main,transition:"all 0.3s ease-in-ease-out",...z&&{borderColor:K=>K.palette.success.main},...z&&{bgcolor:K=>K.palette.success.light},...q&&{borderColor:K=>K.palette.warning.main},...q&&{bgcolor:K=>K.palette.warning.light},...p.sx},...P(),children:[W("input",{...$(),...p["aria-id"]&&{"aria-id":p["aria-id"]}}),mt(Li,{sx:{p:2,display:"flex",flexDirection:"column",justifyContent:"center"},children:[mt(qa,{sx:{display:"flex",justifyContent:"center"},children:[e," ",s&&"*"]}),W(Li,{sx:{display:"flex",justifyContent:"center"},children:W(Qi,{sx:{color:K=>K.palette.primary.main,...z&&{color:K=>K.palette.success.main},...q&&{color:K=>K.palette.warning.main},...p?.disabled&&{opacity:"0.5"}},onClick:Y,children:W(E$,{size:45})})}),W(vE,{in:T?.length!==0||y?.length!==0,children:mt("div",{style:{display:"flex",flexDirection:"row",gap:"10px",flexWrap:"wrap"},children:[T&&T.map(K=>{const ee=PB(k,K.session);return W(lM,{sessionId:K.session,smallUrl:ee.thumbnail_URL,largeUrl:ee.larg_URL,fileName:K.fileName,onDelete:p.disabled?void 0:R,downloadSmallSize:f,modal:!0,extention:K.fileName?.split(".").pop()})}),y&&(n||T.length===0)&&y.map(K=>W(YT,{progress:K.progress}))]})})]})]})})};function IEe(e,t,n,r){const o=Array.from(new Set(e.map(s=>s[t])));return o.length===1&&o[0]===void 0?{series:[],uniqueCategoryArray:[]}:{series:Array.from(new Set(e.map(s=>s[n]))).map(s=>({name:s,data:o.map(c=>{const f=e.find(p=>p[n]===s&&p[t]===c);return f&&!Number.isNaN(parseInt(f[r]))?parseInt(f[r]):0})})),uniqueCategoryArray:o}}var NB={},KT={exports:{}};/*!
|
|
563
563
|
* ApexCharts v3.46.0
|
|
564
564
|
* (c) 2018-2024 ApexCharts
|
|
565
565
|
* Released under the MIT License.
|
|
@@ -1261,7 +1261,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1261
1261
|
|
|
1262
1262
|
.apexcharts-rangebar-goals-markers{
|
|
1263
1263
|
pointer-events: none
|
|
1264
|
-
}`;var I=((N=l.opts.chart)===null||N===void 0?void 0:N.nonce)||l.w.config.chart.nonce;I&&l.css.setAttribute("nonce",I),x?b.prepend(l.css):S.head.appendChild(l.css)}}var L=l.create(l.w.config.series,{});if(!L)return d(l);l.mount(L).then(function(){typeof l.w.config.chart.events.mounted=="function"&&l.w.config.chart.events.mounted(l,l.w),l.events.fireEvent("mounted",[l,l.w]),d(L)}).catch(function(F){h(F)})}else h(new Error("Element not found"))})}},{key:"create",value:function(l,d){var h=this.w;new rt(this).initModules();var g=this.w.globals;if(g.noData=!1,g.animationEnded=!1,this.responsive.checkResponsiveConfig(d),h.config.xaxis.convertedCatToNumeric&&new ue(h.config).convertCatToNumericXaxis(h.config,this.ctx),this.el===null||(this.core.setupElements(),h.config.chart.type==="treemap"&&(h.config.grid.show=!1,h.config.yaxis[0].show=!1),g.svgWidth===0))return g.animationEnded=!0,null;var b=$.checkComboSeries(l);g.comboCharts=b.comboCharts,g.comboBarCount=b.comboBarCount;var x=l.every(function(I){return I.data&&I.data.length===0});(l.length===0||x)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(l),this.theme.init(),new ze(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),g.noData&&g.collapsedSeries.length!==g.series.length&&!h.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),g.axisCharts&&(this.core.coreCalculations(),h.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=h.globals.minX,this.ctx.toolbar.maxX=h.globals.maxX),this.formatters.heatmapLabelFormatters(),new $(this).getLargestMarkerSize(),this.dimensions.plotCoords();var S=this.core.xySettings();this.grid.createGridMask();var D=this.core.plotChartType(l,S),N=new pe(this);return N.bringForward(),h.config.dataLabels.background.enabled&&N.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:D,xyRatios:S,dimensions:{plot:{left:h.globals.translateX,top:h.globals.translateY,width:h.globals.gridWidth,height:h.globals.gridHeight}}}}},{key:"mount",value:function(){var l=this,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,h=this,g=h.w;return new Promise(function(b,x){if(h.el===null)return x(new Error("Not enough data to display or target element not found"));(d===null||g.globals.allSeriesCollapsed)&&h.series.handleNoData(),h.grid=new Ne(h);var S,D,N=h.grid.drawGrid();if(h.annotations=new re(h),h.annotations.drawImageAnnos(),h.annotations.drawTextAnnos(),g.config.grid.position==="back"&&(N&&g.globals.dom.elGraphical.add(N.el),N!=null&&(S=N.elGridBorders)!==null&&S!==void 0&&S.node&&g.globals.dom.elGraphical.add(N.elGridBorders)),Array.isArray(d.elGraph))for(var I=0;I<d.elGraph.length;I++)g.globals.dom.elGraphical.add(d.elGraph[I]);else g.globals.dom.elGraphical.add(d.elGraph);g.config.grid.position==="front"&&(N&&g.globals.dom.elGraphical.add(N.el),N!=null&&(D=N.elGridBorders)!==null&&D!==void 0&&D.node&&g.globals.dom.elGraphical.add(N.elGridBorders)),g.config.xaxis.crosshairs.position==="front"&&h.crosshairs.drawXCrosshairs(),g.config.yaxis[0].crosshairs.position==="front"&&h.crosshairs.drawYCrosshairs(),g.config.chart.type!=="treemap"&&h.axes.drawAxis(g.config.chart.type,N);var L=new Le(l.ctx,N),F=new Ie(l.ctx,N);if(N!==null&&(L.xAxisLabelCorrections(N.xAxisTickWidth),F.setYAxisTextAlignments(),g.config.yaxis.map(function(X,Q){g.globals.ignoreYAxisIndexes.indexOf(Q)===-1&&F.yAxisTitleRotate(Q,X.opposite)})),h.annotations.drawAxesAnnotations(),!g.globals.noData){if(g.config.tooltip.enabled&&!g.globals.noData&&h.w.globals.tooltip.drawTooltip(d.xyRatios),g.globals.axisCharts&&(g.globals.isXNumeric||g.config.xaxis.convertedCatToNumeric||g.globals.isRangeBar))(g.config.chart.zoom.enabled||g.config.chart.selection&&g.config.chart.selection.enabled||g.config.chart.pan&&g.config.chart.pan.enabled)&&h.zoomPanSelection.init({xyRatios:d.xyRatios});else{var U=g.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(X){U[X]=!1})}g.config.chart.toolbar.show&&!g.globals.allSeriesCollapsed&&h.toolbar.createToolbar()}g.globals.memory.methodsToExec.length>0&&g.globals.memory.methodsToExec.forEach(function(X){X.method(X.params,!1,X.context)}),g.globals.axisCharts||g.globals.noData||h.core.resizeNonAxisCharts(),b(h)})}},{key:"destroy",value:function(){var l,d;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,l=this.parentResizeHandler,(d=Ft.get(l))&&(d.disconnect(),Ft.delete(l));var h=this.w.config.chart.id;h&&Apex._chartInstances.forEach(function(g,b){g.id===E.escapeString(h)&&Apex._chartInstances.splice(b,1)}),new St(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(l){var d=this,h=arguments.length>1&&arguments[1]!==void 0&&arguments[1],g=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],b=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],x=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],S=this.w;return S.globals.selection=void 0,l.series&&(this.series.resetSeries(!1,!0,!1),l.series.length&&l.series[0].data&&(l.series=l.series.map(function(D,N){return d.updateHelpers._extendSeries(D,N)})),this.updateHelpers.revertDefaultAxisMinMax()),l.xaxis&&(l=this.updateHelpers.forceXAxisUpdate(l)),l.yaxis&&(l=this.updateHelpers.forceYAxisUpdate(l)),S.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),l.theme&&(l=this.theme.updateThemeOptions(l)),this.updateHelpers._updateOptions(l,h,g,b,x)}},{key:"updateSeries",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(l,d,h)}},{key:"appendSeries",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],g=this.w.config.series.slice();return g.push(l),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(g,d,h)}},{key:"appendData",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=this;h.w.globals.dataChanged=!0,h.series.getPreviousPaths();for(var g=h.w.config.series.slice(),b=0;b<g.length;b++)if(l[b]!==null&&l[b]!==void 0)for(var x=0;x<l[b].data.length;x++)g[b].data.push(l[b].data[x]);return h.w.config.series=g,d&&(h.w.globals.initialSeries=E.clone(h.w.config.series)),this.update()}},{key:"update",value:function(l){var d=this;return new Promise(function(h,g){new St(d.ctx).clear({isUpdating:!0});var b=d.create(d.w.config.series,l);if(!b)return h(d);d.mount(b).then(function(){typeof d.w.config.chart.events.updated=="function"&&d.w.config.chart.events.updated(d,d.w),d.events.fireEvent("updated",[d,d.w]),d.w.globals.isDirty=!0,h(d)}).catch(function(x){g(x)})})}},{key:"getSyncedCharts",value:function(){var l=this.getGroupedCharts(),d=[this];return l.length&&(d=[],l.forEach(function(h){d.push(h)})),d}},{key:"getGroupedCharts",value:function(){var l=this;return Apex._chartInstances.filter(function(d){if(d.group)return!0}).map(function(d){return l.w.config.chart.group===d.group?d.chart:l})}},{key:"toggleSeries",value:function(l){return this.series.toggleSeries(l)}},{key:"highlightSeriesOnLegendHover",value:function(l,d){return this.series.toggleSeriesOnHover(l,d)}},{key:"showSeries",value:function(l){this.series.showSeries(l)}},{key:"hideSeries",value:function(l){this.series.hideSeries(l)}},{key:"isSeriesHidden",value:function(l){this.series.isSeriesHidden(l)}},{key:"resetSeries",value:function(){var l=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(l,d)}},{key:"addEventListener",value:function(l,d){this.events.addEventListener(l,d)}},{key:"removeEventListener",value:function(l,d){this.events.removeEventListener(l,d)}},{key:"addXaxisAnnotation",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,g=this;h&&(g=h),g.annotations.addXaxisAnnotationExternal(l,d,g)}},{key:"addYaxisAnnotation",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,g=this;h&&(g=h),g.annotations.addYaxisAnnotationExternal(l,d,g)}},{key:"addPointAnnotation",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,g=this;h&&(g=h),g.annotations.addPointAnnotationExternal(l,d,g)}},{key:"clearAnnotations",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,d=this;l&&(d=l),d.annotations.clearAnnotations(d)}},{key:"removeAnnotation",value:function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,h=this;d&&(h=d),h.annotations.removeAnnotation(h,l)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(l,d){return this.coreUtils.getSeriesTotalsXRange(l,d)}},{key:"getHighestValueInSeries",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new He(this.ctx).getMinYMaxY(l).highestY}},{key:"getLowestValueInSeries",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new He(this.ctx).getMinYMaxY(l).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(l,d){return this.updateHelpers.toggleDataPointSelection(l,d)}},{key:"zoomX",value:function(l,d){this.ctx.toolbar.zoomUpdateOptions(l,d)}},{key:"setLocale",value:function(l){this.localization.setCurrentLocaleValues(l)}},{key:"dataURI",value:function(l){return new Ve(this.ctx).dataURI(l)}},{key:"exportToCSV",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Ve(this.ctx).exportToCSV(l)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var l=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){l.w.globals.resized=!0,l.w.globals.dataChanged=!1,l.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var l=this.w.config.chart.redrawOnWindowResize;typeof l=="function"&&(l=l()),l&&this._windowResize()}}],[{key:"getChartByID",value:function(l){var d=E.escapeString(l);if(Apex._chartInstances){var h=Apex._chartInstances.filter(function(g){return g.id===d})[0];return h&&h.chart}}},{key:"initOnLoad",value:function(){for(var l=document.querySelectorAll("[data-apexcharts]"),d=0;d<l.length;d++)new ae(l[d],JSON.parse(l[d].getAttribute("data-options"))).render()}},{key:"exec",value:function(l,d){var h=this.getChartByID(l);if(h){h.w.globals.isExecCalled=!0;var g=null;if(h.publicMethods.indexOf(d)!==-1){for(var b=arguments.length,x=new Array(b>2?b-2:0),S=2;S<b;S++)x[S-2]=arguments[S];g=h[d].apply(h,x)}return g}}},{key:"merge",value:function(l,d){return E.extend(l,d)}}]),ae}();e.exports=_t})(KT,KT.exports);var REe=KT.exports,_B;Object.defineProperty(NB,"__esModule",{value:!0});var IEe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},LEe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$Ee=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),FEe=REe,RB=GT(FEe),IB=Pt,Qg=GT(IB),BEe=CC,ec=GT(BEe);function GT(e){return e&&e.__esModule?e:{default:e}}function zEe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VEe(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function HEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jEe(e,t){if(e)return!t||typeof t!="object"&&typeof t!="function"?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function WEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}window.ApexCharts=RB.default;var LB=function(){function e(t){HEe(this,e);var n=jEe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return Qg.default.createRef?n.chartRef=Qg.default.createRef():n.setRef=function(r){return n.chartRef=r},n.chart=null,n}return WEe(e,IB.Component),$Ee(e,[{key:"render",value:function(){var t=VEe(this.props,[]);return Qg.default.createElement("div",LEe({ref:Qg.default.createRef?this.chartRef:this.setRef},t))}},{key:"componentDidMount",value:function(){var t=Qg.default.createRef?this.chartRef.current:this.chartRef;this.chart=new RB.default(t,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var i=this.props,t=i.type,n=i.height,r=i.width,o=i.series,i=i.options;return this.extend(i,{chart:{type:t,height:n,width:r},series:o})}},{key:"isObject",value:function(t){return t&&(t===void 0?"undefined":IEe(t))==="object"&&!Array.isArray(t)&&t!=null}},{key:"extend",value:function(t,n){var r=this,o=(typeof Object.assign!="function"&&(Object.assign=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(i),s=1;s<arguments.length;s++){var c=arguments[s];if(c!=null)for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f])}return a}),Object.assign({},t));return this.isObject(t)&&this.isObject(n)&&Object.keys(n).forEach(function(i){r.isObject(n[i])&&i in t?o[i]=r.extend(t[i],n[i]):Object.assign(o,zEe({},i,n[i]))}),o}},{key:"componentDidUpdate",value:function(t){if(!this.chart)return null;var o=this.props,s=o.options,n=o.series,r=o.height,o=o.width,i=JSON.stringify(t.options),a=JSON.stringify(t.series),s=JSON.stringify(s),c=JSON.stringify(n);i===s&&a===c&&r===t.height&&o===t.width||(a!==c&&i===s&&r===t.height&&o===t.width?this.chart.updateSeries(n):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&typeof this.chart.destroy=="function"&&this.chart.destroy()}}]),e}();(_B=NB.default=LB).propTypes={type:ec.default.string.isRequired,width:ec.default.oneOfType([ec.default.string,ec.default.number]),height:ec.default.oneOfType([ec.default.string,ec.default.number]),series:ec.default.array.isRequired,options:ec.default.object.isRequired},LB.defaultProps={type:"line",width:"100%",height:"auto"};const $B=({titleText:e,titleProps:t,xaxisTitle:n,yaxisTitle:r,toolbar:o=!0,stacked:i=!1,stackType:a="normal",barHorizontal:s=!1,noDataText:c="\u0628\u062F\u0648\u0646 \u062F\u0627\u062F\u0647",noDataProps:f,labels:p,colors:m,onClick:v,...y})=>W(_B,{...y,options:{colors:m,labels:p??[],...y.options,noData:{text:c,align:"center",verticalAlign:"middle",style:{fontSize:"1rem",fontFamily:"inherit"},...f},xaxis:{tickPlacement:o?"on":void 0,...y.options?.xaxis,title:{text:n,...y.options?.xaxis?.title}},yaxis:{...y.options?.yaxis,title:{text:r,...y.options?.yaxis?.title}},chart:{fontFamily:"inherit",stacked:i,stackType:a,...y.options?.chart,events:{dataPointSelection(w,C,k){v&&v(k)},...y.options?.chart?.events},toolbar:{show:o,tools:{reset:!0,download:!0,pan:!0,selection:!0,zoomin:!0,zoom:!0,zoomout:!0},...y.options?.chart?.toolbar}},plotOptions:{...y.options?.plotOptions,bar:{horizontal:s,...y.options?.plotOptions?.bar}},title:{text:e,align:"center",...t}},style:{direction:"ltr",...y.style}}),YEe=({data:e=[],groupBy:t="",seriesBy:n="",valueBy:r="",...o})=>{const{series:i,uniqueCategoryArray:a}=_Ee(e,t,n,r);return W($B,{noDataText:e.length===0?"\u0628\u062F\u0648\u0646 \u062F\u0627\u062F\u0647":"\u062F\u0627\u062F\u0647 \u0647\u0627\u06CC \u0634\u0645\u0627 \u0633\u0627\u0632\u06AF\u0627\u0631 \u0646\u06CC\u0633\u062A",labels:a??[],series:i,...o})};function UEe(e,t,n){const r=Array.from(new Set(e.map(i=>i[t])));return r.length===1&&r[0]===void 0?{series:[],uniqueCategoryArray:[]}:{series:r.map(i=>{const a=e.find(s=>s[t]===i);return a&&!Number.isNaN(parseInt(a[n]))?parseInt(a[n]):0}),uniqueCategoryArray:r}}const qEe=({data:e=[],groupBy:t="",valueBy:n="",...r})=>{const{series:o,uniqueCategoryArray:i}=UEe(e,t,n);return W($B,{noDataText:e.length===0?"\u0628\u062F\u0648\u0646 \u062F\u0627\u062F\u0647":"\u062F\u0627\u062F\u0647 \u0647\u0627\u06CC \u0634\u0645\u0627 \u0633\u0627\u0632\u06AF\u0627\u0631 \u0646\u06CC\u0633\u062A",series:o,labels:i??[],...r})};let d1=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}});var XT={exports:{}};(function(e,t){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(f){var p=new Error;r(f,"stack",{configurable:!0,get:function(){var v=p.stack;return r(this,"stack",{configurable:!0,value:v,writable:!0}),v},set:function(v){r(f,"stack",{configurable:!0,value:v,writable:!0})}})});function i(c){c!==void 0&&r(this,"message",{configurable:!0,value:c,writable:!0});var f=this.constructor.name;f!==void 0&&f!==this.name&&r(this,"name",{configurable:!0,value:f,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var a=function(){function c(p,m){return r(p,"name",{configurable:!0,value:m})}try{var f=function(){};if(c(f,"foo"),f.name==="foo")return c}catch{}}();function s(c,f){if(f==null||f===Error)f=i;else if(typeof f!="function")throw new TypeError("super_ should be a function");var p;if(typeof c=="string")p=c,c=n!==void 0?function(){return n(f,arguments,this.constructor)}:function(){f.apply(this,arguments)},a!==void 0&&(a(c,p),p=void 0);else if(typeof c!="function")throw new TypeError("constructor should be either a string or a function");c.super_=c.super=f;var m={constructor:{configurable:!0,value:c,writable:!0}};return p!==void 0&&(m.name={configurable:!0,value:p,writable:!0}),c.prototype=Object.create(f.prototype,m),c}t=e.exports=s,t.BaseError=i})(XT,XT.exports);var FB=XT.exports,BB="ProseMirror-selectednode",zB="\uFFFC",tu="\0",VB="__state_override__",KEe={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},jn=KEe,tc=Symbol.for("__remirror__"),oi=(e=>(e.PlainExtension="RemirrorPlainExtension",e.NodeExtension="RemirrorNodeExtension",e.MarkExtension="RemirrorMarkExtension",e.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",e.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",e.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",e.Manager="RemirrorManager",e.Preset="RemirrorPreset",e.PresetConstructor="RemirrorPresetConstructor",e))(oi||{}),Fr=(e=>(e[e.Critical=1e6]="Critical",e[e.Highest=1e5]="Highest",e[e.High=1e4]="High",e[e.Medium=1e3]="Medium",e[e.Default=100]="Default",e[e.Low=10]="Low",e[e.Lowest=0]="Lowest",e))(Fr||{}),na=(e=>(e[e.None=0]="None",e[e.Create=1]="Create",e[e.EditorView=2]="EditorView",e[e.Runtime=3]="Runtime",e[e.Destroy=4]="Destroy",e))(na||{}),on=(e=>(e.Undo="_|undo|_",e.Redo="_|redo|_",e.Bold="_|bold|_",e.Italic="_|italic|_",e.Underline="_|underline|_",e.Strike="_|strike|_",e.Code="_|code|_",e.Paragraph="_|paragraph|_",e.H1="_|h1|_",e.H2="_|h2|_",e.H3="_|h3|_",e.H4="_|h4|_",e.H5="_|h5|_",e.H6="_|h6|_",e.TaskList="_|task|_",e.BulletList="_|bullet|_",e.OrderedList="_|number|_",e.Quote="_|quote|_",e.Divider="_|divider|_",e.Codeblock="_|codeblock|_",e.ClearFormatting="_|clear|_",e.Superscript="_|sup|_",e.Subscript="_|sub|_",e.LeftAlignment="_|left-align|_",e.CenterAlignment="_|center-align|_",e.RightAlignment="_|right-align|_",e.JustifyAlignment="_|justify-align|_",e.InsertLink="_|link|_",e.Find="_|find|_",e.FindBackwards="_|find-backwards|_",e.FindReplace="_|find-replace|_",e.AddFootnote="_|footnote|_",e.AddComment="_|comment|_",e.ContextMenu="_|context-menu|_",e.IncreaseFontSize="_|inc-font-size|_",e.DecreaseFontSize="_|dec-font-size|_",e.IncreaseIndent="_|indent|_",e.DecreaseIndent="_|dedent|_",e.Shortcuts="_|shortcuts|_",e.Copy="_|copy|_",e.Cut="_|cut|_",e.Paste="_|paste|_",e.PastePlain="_|paste-plain|_",e.SelectAll="_|select-all|_",e.Format="_|format|_",e))(on||{}),tn=(e=>(e.PROD="RMR0000",e.UNKNOWN="RMR0001",e.INVALID_COMMAND_ARGUMENTS="RMR0002",e.CUSTOM="RMR0003",e.CORE_HELPERS="RMR0004",e.MUTATION="RMR0005",e.INTERNAL="RMR0006",e.MISSING_REQUIRED_EXTENSION="RMR0007",e.MANAGER_PHASE_ERROR="RMR0008",e.INVALID_GET_EXTENSION="RMR0010",e.INVALID_MANAGER_ARGUMENTS="RMR0011",e.SCHEMA="RMR0012",e.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",e.INVALID_MANAGER_EXTENSION="RMR0014",e.DUPLICATE_COMMAND_NAMES="RMR0016",e.DUPLICATE_HELPER_NAMES="RMR0017",e.NON_CHAINABLE_COMMAND="RMR0018",e.INVALID_EXTENSION="RMR0019",e.INVALID_CONTENT="RMR0021",e.INVALID_NAME="RMR0050",e.EXTENSION="RMR0100",e.EXTENSION_SPEC="RMR0101",e.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",e.INVALID_SET_EXTENSION_OPTIONS="RMR0103",e.REACT_PROVIDER_CONTEXT="RMR0200",e.REACT_GET_ROOT_PROPS="RMR0201",e.REACT_EDITOR_VIEW="RMR0202",e.REACT_CONTROLLED="RMR0203",e.REACT_NODE_VIEW="RMR0204",e.REACT_GET_CONTEXT="RMR0205",e.REACT_COMPONENTS="RMR0206",e.REACT_HOOKS="RMR0207",e.I18N_CONTEXT="RMR0300",e))(tn||{}),GEe=function(t){return XEe(t)&&!ZEe(t)};function XEe(e){return!!e&&typeof e=="object"}function ZEe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||eTe(e)}var JEe=typeof Symbol=="function"&&Symbol.for,QEe=JEe?Symbol.for("react.element"):60103;function eTe(e){return e.$$typeof===QEe}function tTe(e){return Array.isArray(e)?[]:{}}function ev(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Yh(tTe(e),e,t):e}function nTe(e,t,n){return e.concat(t).map(function(r){return ev(r,n)})}function rTe(e,t){if(!t.customMerge)return Yh;var n=t.customMerge(e);return typeof n=="function"?n:Yh}function oTe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function HB(e){return Object.keys(e).concat(oTe(e))}function jB(e,t){try{return t in e}catch{return!1}}function iTe(e,t){return jB(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function aTe(e,t,n){var r={};return n.isMergeableObject(e)&&HB(e).forEach(function(o){r[o]=ev(e[o],n)}),HB(t).forEach(function(o){iTe(e,o)||(jB(e,o)&&n.isMergeableObject(t[o])?r[o]=rTe(o,n)(e[o],t[o],n):r[o]=ev(t[o],n))}),r}function Yh(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||nTe,n.isMergeableObject=n.isMergeableObject||GEe,n.cloneUnlessOtherwiseSpecified=ev;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):aTe(e,t,n):ev(t,n)}Yh.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Yh(r,o,n)},{})};var sTe=Yh,lTe=sTe,cTe=ro(lTe),uTe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n},dTe=ro(uTe);/*!
|
|
1264
|
+
}`;var I=((N=l.opts.chart)===null||N===void 0?void 0:N.nonce)||l.w.config.chart.nonce;I&&l.css.setAttribute("nonce",I),x?b.prepend(l.css):S.head.appendChild(l.css)}}var L=l.create(l.w.config.series,{});if(!L)return d(l);l.mount(L).then(function(){typeof l.w.config.chart.events.mounted=="function"&&l.w.config.chart.events.mounted(l,l.w),l.events.fireEvent("mounted",[l,l.w]),d(L)}).catch(function(F){h(F)})}else h(new Error("Element not found"))})}},{key:"create",value:function(l,d){var h=this.w;new rt(this).initModules();var g=this.w.globals;if(g.noData=!1,g.animationEnded=!1,this.responsive.checkResponsiveConfig(d),h.config.xaxis.convertedCatToNumeric&&new ue(h.config).convertCatToNumericXaxis(h.config,this.ctx),this.el===null||(this.core.setupElements(),h.config.chart.type==="treemap"&&(h.config.grid.show=!1,h.config.yaxis[0].show=!1),g.svgWidth===0))return g.animationEnded=!0,null;var b=$.checkComboSeries(l);g.comboCharts=b.comboCharts,g.comboBarCount=b.comboBarCount;var x=l.every(function(I){return I.data&&I.data.length===0});(l.length===0||x)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(l),this.theme.init(),new ze(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),g.noData&&g.collapsedSeries.length!==g.series.length&&!h.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),g.axisCharts&&(this.core.coreCalculations(),h.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=h.globals.minX,this.ctx.toolbar.maxX=h.globals.maxX),this.formatters.heatmapLabelFormatters(),new $(this).getLargestMarkerSize(),this.dimensions.plotCoords();var S=this.core.xySettings();this.grid.createGridMask();var D=this.core.plotChartType(l,S),N=new pe(this);return N.bringForward(),h.config.dataLabels.background.enabled&&N.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:D,xyRatios:S,dimensions:{plot:{left:h.globals.translateX,top:h.globals.translateY,width:h.globals.gridWidth,height:h.globals.gridHeight}}}}},{key:"mount",value:function(){var l=this,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,h=this,g=h.w;return new Promise(function(b,x){if(h.el===null)return x(new Error("Not enough data to display or target element not found"));(d===null||g.globals.allSeriesCollapsed)&&h.series.handleNoData(),h.grid=new Ne(h);var S,D,N=h.grid.drawGrid();if(h.annotations=new re(h),h.annotations.drawImageAnnos(),h.annotations.drawTextAnnos(),g.config.grid.position==="back"&&(N&&g.globals.dom.elGraphical.add(N.el),N!=null&&(S=N.elGridBorders)!==null&&S!==void 0&&S.node&&g.globals.dom.elGraphical.add(N.elGridBorders)),Array.isArray(d.elGraph))for(var I=0;I<d.elGraph.length;I++)g.globals.dom.elGraphical.add(d.elGraph[I]);else g.globals.dom.elGraphical.add(d.elGraph);g.config.grid.position==="front"&&(N&&g.globals.dom.elGraphical.add(N.el),N!=null&&(D=N.elGridBorders)!==null&&D!==void 0&&D.node&&g.globals.dom.elGraphical.add(N.elGridBorders)),g.config.xaxis.crosshairs.position==="front"&&h.crosshairs.drawXCrosshairs(),g.config.yaxis[0].crosshairs.position==="front"&&h.crosshairs.drawYCrosshairs(),g.config.chart.type!=="treemap"&&h.axes.drawAxis(g.config.chart.type,N);var L=new Le(l.ctx,N),F=new Ie(l.ctx,N);if(N!==null&&(L.xAxisLabelCorrections(N.xAxisTickWidth),F.setYAxisTextAlignments(),g.config.yaxis.map(function(X,Q){g.globals.ignoreYAxisIndexes.indexOf(Q)===-1&&F.yAxisTitleRotate(Q,X.opposite)})),h.annotations.drawAxesAnnotations(),!g.globals.noData){if(g.config.tooltip.enabled&&!g.globals.noData&&h.w.globals.tooltip.drawTooltip(d.xyRatios),g.globals.axisCharts&&(g.globals.isXNumeric||g.config.xaxis.convertedCatToNumeric||g.globals.isRangeBar))(g.config.chart.zoom.enabled||g.config.chart.selection&&g.config.chart.selection.enabled||g.config.chart.pan&&g.config.chart.pan.enabled)&&h.zoomPanSelection.init({xyRatios:d.xyRatios});else{var U=g.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(X){U[X]=!1})}g.config.chart.toolbar.show&&!g.globals.allSeriesCollapsed&&h.toolbar.createToolbar()}g.globals.memory.methodsToExec.length>0&&g.globals.memory.methodsToExec.forEach(function(X){X.method(X.params,!1,X.context)}),g.globals.axisCharts||g.globals.noData||h.core.resizeNonAxisCharts(),b(h)})}},{key:"destroy",value:function(){var l,d;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,l=this.parentResizeHandler,(d=Ft.get(l))&&(d.disconnect(),Ft.delete(l));var h=this.w.config.chart.id;h&&Apex._chartInstances.forEach(function(g,b){g.id===E.escapeString(h)&&Apex._chartInstances.splice(b,1)}),new St(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(l){var d=this,h=arguments.length>1&&arguments[1]!==void 0&&arguments[1],g=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],b=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],x=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],S=this.w;return S.globals.selection=void 0,l.series&&(this.series.resetSeries(!1,!0,!1),l.series.length&&l.series[0].data&&(l.series=l.series.map(function(D,N){return d.updateHelpers._extendSeries(D,N)})),this.updateHelpers.revertDefaultAxisMinMax()),l.xaxis&&(l=this.updateHelpers.forceXAxisUpdate(l)),l.yaxis&&(l=this.updateHelpers.forceYAxisUpdate(l)),S.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),l.theme&&(l=this.theme.updateThemeOptions(l)),this.updateHelpers._updateOptions(l,h,g,b,x)}},{key:"updateSeries",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(l,d,h)}},{key:"appendSeries",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],g=this.w.config.series.slice();return g.push(l),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(g,d,h)}},{key:"appendData",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=this;h.w.globals.dataChanged=!0,h.series.getPreviousPaths();for(var g=h.w.config.series.slice(),b=0;b<g.length;b++)if(l[b]!==null&&l[b]!==void 0)for(var x=0;x<l[b].data.length;x++)g[b].data.push(l[b].data[x]);return h.w.config.series=g,d&&(h.w.globals.initialSeries=E.clone(h.w.config.series)),this.update()}},{key:"update",value:function(l){var d=this;return new Promise(function(h,g){new St(d.ctx).clear({isUpdating:!0});var b=d.create(d.w.config.series,l);if(!b)return h(d);d.mount(b).then(function(){typeof d.w.config.chart.events.updated=="function"&&d.w.config.chart.events.updated(d,d.w),d.events.fireEvent("updated",[d,d.w]),d.w.globals.isDirty=!0,h(d)}).catch(function(x){g(x)})})}},{key:"getSyncedCharts",value:function(){var l=this.getGroupedCharts(),d=[this];return l.length&&(d=[],l.forEach(function(h){d.push(h)})),d}},{key:"getGroupedCharts",value:function(){var l=this;return Apex._chartInstances.filter(function(d){if(d.group)return!0}).map(function(d){return l.w.config.chart.group===d.group?d.chart:l})}},{key:"toggleSeries",value:function(l){return this.series.toggleSeries(l)}},{key:"highlightSeriesOnLegendHover",value:function(l,d){return this.series.toggleSeriesOnHover(l,d)}},{key:"showSeries",value:function(l){this.series.showSeries(l)}},{key:"hideSeries",value:function(l){this.series.hideSeries(l)}},{key:"isSeriesHidden",value:function(l){this.series.isSeriesHidden(l)}},{key:"resetSeries",value:function(){var l=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(l,d)}},{key:"addEventListener",value:function(l,d){this.events.addEventListener(l,d)}},{key:"removeEventListener",value:function(l,d){this.events.removeEventListener(l,d)}},{key:"addXaxisAnnotation",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,g=this;h&&(g=h),g.annotations.addXaxisAnnotationExternal(l,d,g)}},{key:"addYaxisAnnotation",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,g=this;h&&(g=h),g.annotations.addYaxisAnnotationExternal(l,d,g)}},{key:"addPointAnnotation",value:function(l){var d=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,g=this;h&&(g=h),g.annotations.addPointAnnotationExternal(l,d,g)}},{key:"clearAnnotations",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,d=this;l&&(d=l),d.annotations.clearAnnotations(d)}},{key:"removeAnnotation",value:function(l){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,h=this;d&&(h=d),h.annotations.removeAnnotation(h,l)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(l,d){return this.coreUtils.getSeriesTotalsXRange(l,d)}},{key:"getHighestValueInSeries",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new He(this.ctx).getMinYMaxY(l).highestY}},{key:"getLowestValueInSeries",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new He(this.ctx).getMinYMaxY(l).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(l,d){return this.updateHelpers.toggleDataPointSelection(l,d)}},{key:"zoomX",value:function(l,d){this.ctx.toolbar.zoomUpdateOptions(l,d)}},{key:"setLocale",value:function(l){this.localization.setCurrentLocaleValues(l)}},{key:"dataURI",value:function(l){return new Ve(this.ctx).dataURI(l)}},{key:"exportToCSV",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Ve(this.ctx).exportToCSV(l)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var l=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){l.w.globals.resized=!0,l.w.globals.dataChanged=!1,l.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var l=this.w.config.chart.redrawOnWindowResize;typeof l=="function"&&(l=l()),l&&this._windowResize()}}],[{key:"getChartByID",value:function(l){var d=E.escapeString(l);if(Apex._chartInstances){var h=Apex._chartInstances.filter(function(g){return g.id===d})[0];return h&&h.chart}}},{key:"initOnLoad",value:function(){for(var l=document.querySelectorAll("[data-apexcharts]"),d=0;d<l.length;d++)new ae(l[d],JSON.parse(l[d].getAttribute("data-options"))).render()}},{key:"exec",value:function(l,d){var h=this.getChartByID(l);if(h){h.w.globals.isExecCalled=!0;var g=null;if(h.publicMethods.indexOf(d)!==-1){for(var b=arguments.length,x=new Array(b>2?b-2:0),S=2;S<b;S++)x[S-2]=arguments[S];g=h[d].apply(h,x)}return g}}},{key:"merge",value:function(l,d){return E.extend(l,d)}}]),ae}();e.exports=_t})(KT,KT.exports);var LEe=KT.exports,_B;Object.defineProperty(NB,"__esModule",{value:!0});var $Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FEe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},BEe=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),zEe=LEe,RB=GT(zEe),IB=Pt,Qg=GT(IB),VEe=CC,ec=GT(VEe);function GT(e){return e&&e.__esModule?e:{default:e}}function HEe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jEe(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function WEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YEe(e,t){if(e)return!t||typeof t!="object"&&typeof t!="function"?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function UEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}window.ApexCharts=RB.default;var LB=function(){function e(t){WEe(this,e);var n=YEe(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return Qg.default.createRef?n.chartRef=Qg.default.createRef():n.setRef=function(r){return n.chartRef=r},n.chart=null,n}return UEe(e,IB.Component),BEe(e,[{key:"render",value:function(){var t=jEe(this.props,[]);return Qg.default.createElement("div",FEe({ref:Qg.default.createRef?this.chartRef:this.setRef},t))}},{key:"componentDidMount",value:function(){var t=Qg.default.createRef?this.chartRef.current:this.chartRef;this.chart=new RB.default(t,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var i=this.props,t=i.type,n=i.height,r=i.width,o=i.series,i=i.options;return this.extend(i,{chart:{type:t,height:n,width:r},series:o})}},{key:"isObject",value:function(t){return t&&(t===void 0?"undefined":$Ee(t))==="object"&&!Array.isArray(t)&&t!=null}},{key:"extend",value:function(t,n){var r=this,o=(typeof Object.assign!="function"&&(Object.assign=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(i),s=1;s<arguments.length;s++){var c=arguments[s];if(c!=null)for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f])}return a}),Object.assign({},t));return this.isObject(t)&&this.isObject(n)&&Object.keys(n).forEach(function(i){r.isObject(n[i])&&i in t?o[i]=r.extend(t[i],n[i]):Object.assign(o,HEe({},i,n[i]))}),o}},{key:"componentDidUpdate",value:function(t){if(!this.chart)return null;var o=this.props,s=o.options,n=o.series,r=o.height,o=o.width,i=JSON.stringify(t.options),a=JSON.stringify(t.series),s=JSON.stringify(s),c=JSON.stringify(n);i===s&&a===c&&r===t.height&&o===t.width||(a!==c&&i===s&&r===t.height&&o===t.width?this.chart.updateSeries(n):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&typeof this.chart.destroy=="function"&&this.chart.destroy()}}]),e}();(_B=NB.default=LB).propTypes={type:ec.default.string.isRequired,width:ec.default.oneOfType([ec.default.string,ec.default.number]),height:ec.default.oneOfType([ec.default.string,ec.default.number]),series:ec.default.array.isRequired,options:ec.default.object.isRequired},LB.defaultProps={type:"line",width:"100%",height:"auto"};const $B=({titleText:e,titleProps:t,xaxisTitle:n,yaxisTitle:r,toolbar:o=!0,stacked:i=!1,stackType:a="normal",barHorizontal:s=!1,noDataText:c="\u0628\u062F\u0648\u0646 \u062F\u0627\u062F\u0647",noDataProps:f,labels:p,colors:m,onClick:v,...y})=>W(_B,{...y,options:{colors:m,labels:p??[],...y.options,noData:{text:c,align:"center",verticalAlign:"middle",style:{fontSize:"1rem",fontFamily:"inherit"},...f},xaxis:{tickPlacement:o?"on":void 0,...y.options?.xaxis,title:{text:n,...y.options?.xaxis?.title}},yaxis:{...y.options?.yaxis,title:{text:r,...y.options?.yaxis?.title}},chart:{fontFamily:"inherit",stacked:i,stackType:a,...y.options?.chart,events:{dataPointSelection(w,C,k){v&&v(k)},...y.options?.chart?.events},toolbar:{show:o,tools:{reset:!0,download:!0,pan:!0,selection:!0,zoomin:!0,zoom:!0,zoomout:!0},...y.options?.chart?.toolbar}},plotOptions:{...y.options?.plotOptions,bar:{horizontal:s,...y.options?.plotOptions?.bar}},title:{text:e,align:"center",...t}},style:{direction:"ltr",...y.style}}),qEe=({data:e=[],groupBy:t="",seriesBy:n="",valueBy:r="",...o})=>{const{series:i,uniqueCategoryArray:a}=IEe(e,t,n,r);return W($B,{noDataText:e.length===0?"\u0628\u062F\u0648\u0646 \u062F\u0627\u062F\u0647":"\u062F\u0627\u062F\u0647 \u0647\u0627\u06CC \u0634\u0645\u0627 \u0633\u0627\u0632\u06AF\u0627\u0631 \u0646\u06CC\u0633\u062A",labels:a??[],series:i,...o})};function KEe(e,t,n){const r=Array.from(new Set(e.map(i=>i[t])));return r.length===1&&r[0]===void 0?{series:[],uniqueCategoryArray:[]}:{series:r.map(i=>{const a=e.find(s=>s[t]===i);return a&&!Number.isNaN(parseInt(a[n]))?parseInt(a[n]):0}),uniqueCategoryArray:r}}const GEe=({data:e=[],groupBy:t="",valueBy:n="",...r})=>{const{series:o,uniqueCategoryArray:i}=KEe(e,t,n);return W($B,{noDataText:e.length===0?"\u0628\u062F\u0648\u0646 \u062F\u0627\u062F\u0647":"\u062F\u0627\u062F\u0647 \u0647\u0627\u06CC \u0634\u0645\u0627 \u0633\u0627\u0632\u06AF\u0627\u0631 \u0646\u06CC\u0633\u062A",series:o,labels:i??[],...r})};let d1=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}});var XT={exports:{}};(function(e,t){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,o=Error.captureStackTrace;o===void 0&&(o=function(f){var p=new Error;r(f,"stack",{configurable:!0,get:function(){var v=p.stack;return r(this,"stack",{configurable:!0,value:v,writable:!0}),v},set:function(v){r(f,"stack",{configurable:!0,value:v,writable:!0})}})});function i(c){c!==void 0&&r(this,"message",{configurable:!0,value:c,writable:!0});var f=this.constructor.name;f!==void 0&&f!==this.name&&r(this,"name",{configurable:!0,value:f,writable:!0}),o(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var a=function(){function c(p,m){return r(p,"name",{configurable:!0,value:m})}try{var f=function(){};if(c(f,"foo"),f.name==="foo")return c}catch{}}();function s(c,f){if(f==null||f===Error)f=i;else if(typeof f!="function")throw new TypeError("super_ should be a function");var p;if(typeof c=="string")p=c,c=n!==void 0?function(){return n(f,arguments,this.constructor)}:function(){f.apply(this,arguments)},a!==void 0&&(a(c,p),p=void 0);else if(typeof c!="function")throw new TypeError("constructor should be either a string or a function");c.super_=c.super=f;var m={constructor:{configurable:!0,value:c,writable:!0}};return p!==void 0&&(m.name={configurable:!0,value:p,writable:!0}),c.prototype=Object.create(f.prototype,m),c}t=e.exports=s,t.BaseError=i})(XT,XT.exports);var FB=XT.exports,BB="ProseMirror-selectednode",zB="\uFFFC",tu="\0",VB="__state_override__",XEe={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},jn=XEe,tc=Symbol.for("__remirror__"),oi=(e=>(e.PlainExtension="RemirrorPlainExtension",e.NodeExtension="RemirrorNodeExtension",e.MarkExtension="RemirrorMarkExtension",e.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",e.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",e.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",e.Manager="RemirrorManager",e.Preset="RemirrorPreset",e.PresetConstructor="RemirrorPresetConstructor",e))(oi||{}),Fr=(e=>(e[e.Critical=1e6]="Critical",e[e.Highest=1e5]="Highest",e[e.High=1e4]="High",e[e.Medium=1e3]="Medium",e[e.Default=100]="Default",e[e.Low=10]="Low",e[e.Lowest=0]="Lowest",e))(Fr||{}),na=(e=>(e[e.None=0]="None",e[e.Create=1]="Create",e[e.EditorView=2]="EditorView",e[e.Runtime=3]="Runtime",e[e.Destroy=4]="Destroy",e))(na||{}),on=(e=>(e.Undo="_|undo|_",e.Redo="_|redo|_",e.Bold="_|bold|_",e.Italic="_|italic|_",e.Underline="_|underline|_",e.Strike="_|strike|_",e.Code="_|code|_",e.Paragraph="_|paragraph|_",e.H1="_|h1|_",e.H2="_|h2|_",e.H3="_|h3|_",e.H4="_|h4|_",e.H5="_|h5|_",e.H6="_|h6|_",e.TaskList="_|task|_",e.BulletList="_|bullet|_",e.OrderedList="_|number|_",e.Quote="_|quote|_",e.Divider="_|divider|_",e.Codeblock="_|codeblock|_",e.ClearFormatting="_|clear|_",e.Superscript="_|sup|_",e.Subscript="_|sub|_",e.LeftAlignment="_|left-align|_",e.CenterAlignment="_|center-align|_",e.RightAlignment="_|right-align|_",e.JustifyAlignment="_|justify-align|_",e.InsertLink="_|link|_",e.Find="_|find|_",e.FindBackwards="_|find-backwards|_",e.FindReplace="_|find-replace|_",e.AddFootnote="_|footnote|_",e.AddComment="_|comment|_",e.ContextMenu="_|context-menu|_",e.IncreaseFontSize="_|inc-font-size|_",e.DecreaseFontSize="_|dec-font-size|_",e.IncreaseIndent="_|indent|_",e.DecreaseIndent="_|dedent|_",e.Shortcuts="_|shortcuts|_",e.Copy="_|copy|_",e.Cut="_|cut|_",e.Paste="_|paste|_",e.PastePlain="_|paste-plain|_",e.SelectAll="_|select-all|_",e.Format="_|format|_",e))(on||{}),tn=(e=>(e.PROD="RMR0000",e.UNKNOWN="RMR0001",e.INVALID_COMMAND_ARGUMENTS="RMR0002",e.CUSTOM="RMR0003",e.CORE_HELPERS="RMR0004",e.MUTATION="RMR0005",e.INTERNAL="RMR0006",e.MISSING_REQUIRED_EXTENSION="RMR0007",e.MANAGER_PHASE_ERROR="RMR0008",e.INVALID_GET_EXTENSION="RMR0010",e.INVALID_MANAGER_ARGUMENTS="RMR0011",e.SCHEMA="RMR0012",e.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",e.INVALID_MANAGER_EXTENSION="RMR0014",e.DUPLICATE_COMMAND_NAMES="RMR0016",e.DUPLICATE_HELPER_NAMES="RMR0017",e.NON_CHAINABLE_COMMAND="RMR0018",e.INVALID_EXTENSION="RMR0019",e.INVALID_CONTENT="RMR0021",e.INVALID_NAME="RMR0050",e.EXTENSION="RMR0100",e.EXTENSION_SPEC="RMR0101",e.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",e.INVALID_SET_EXTENSION_OPTIONS="RMR0103",e.REACT_PROVIDER_CONTEXT="RMR0200",e.REACT_GET_ROOT_PROPS="RMR0201",e.REACT_EDITOR_VIEW="RMR0202",e.REACT_CONTROLLED="RMR0203",e.REACT_NODE_VIEW="RMR0204",e.REACT_GET_CONTEXT="RMR0205",e.REACT_COMPONENTS="RMR0206",e.REACT_HOOKS="RMR0207",e.I18N_CONTEXT="RMR0300",e))(tn||{}),ZEe=function(t){return JEe(t)&&!QEe(t)};function JEe(e){return!!e&&typeof e=="object"}function QEe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||nTe(e)}var eTe=typeof Symbol=="function"&&Symbol.for,tTe=eTe?Symbol.for("react.element"):60103;function nTe(e){return e.$$typeof===tTe}function rTe(e){return Array.isArray(e)?[]:{}}function ev(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Yh(rTe(e),e,t):e}function oTe(e,t,n){return e.concat(t).map(function(r){return ev(r,n)})}function iTe(e,t){if(!t.customMerge)return Yh;var n=t.customMerge(e);return typeof n=="function"?n:Yh}function aTe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function HB(e){return Object.keys(e).concat(aTe(e))}function jB(e,t){try{return t in e}catch{return!1}}function sTe(e,t){return jB(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function lTe(e,t,n){var r={};return n.isMergeableObject(e)&&HB(e).forEach(function(o){r[o]=ev(e[o],n)}),HB(t).forEach(function(o){sTe(e,o)||(jB(e,o)&&n.isMergeableObject(t[o])?r[o]=iTe(o,n)(e[o],t[o],n):r[o]=ev(t[o],n))}),r}function Yh(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||oTe,n.isMergeableObject=n.isMergeableObject||ZEe,n.cloneUnlessOtherwiseSpecified=ev;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):lTe(e,t,n):ev(t,n)}Yh.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Yh(r,o,n)},{})};var cTe=Yh,uTe=cTe,dTe=ro(uTe),fTe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n},hTe=ro(fTe);/*!
|
|
1265
1265
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
1266
1266
|
*
|
|
1267
1267
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
@@ -1271,58 +1271,58 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1271
1271
|
*
|
|
1272
1272
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
1273
1273
|
* Released under the MIT License.
|
|
1274
|
-
*/var
|
|
1274
|
+
*/var pTe=WB;function YB(e){return pTe(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var mTe=function(t){var n,r;return!(YB(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,YB(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*!
|
|
1275
1275
|
* is-extendable <https://github.com/jonschlinkert/is-extendable>
|
|
1276
1276
|
*
|
|
1277
1277
|
* Copyright (c) 2015-2017, Jon Schlinkert.
|
|
1278
1278
|
* Released under the MIT License.
|
|
1279
|
-
*/var
|
|
1279
|
+
*/var gTe=mTe,vTe=function(t){return gTe(t)||typeof t=="function"||Array.isArray(t)};/*!
|
|
1280
1280
|
* object.omit <https://github.com/jonschlinkert/object.omit>
|
|
1281
1281
|
*
|
|
1282
1282
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
1283
1283
|
* Released under the MIT License.
|
|
1284
|
-
*/var
|
|
1284
|
+
*/var bTe=vTe,yTe=function(t,n,r){if(!bTe(t))return{};typeof n=="function"&&(r=n,n=[]),typeof n=="string"&&(n=[n]);for(var o=typeof r=="function",i=Object.keys(t),a={},s=0;s<i.length;s++){var c=i[s],f=t[c];(!n||n.indexOf(c)===-1&&(!o||r(f,c,t)))&&(a[c]=f)}return a},ZT=ro(yTe);/*!
|
|
1285
1285
|
* object.pick <https://github.com/jonschlinkert/object.pick>
|
|
1286
1286
|
*
|
|
1287
1287
|
* Copyright (c) 2014-2015 Jon Schlinkert, contributors.
|
|
1288
1288
|
* Licensed under the MIT License
|
|
1289
|
-
*/var
|
|
1289
|
+
*/var xTe=WB,wTe=function(t,n){if(!xTe(t)&&typeof t!="function")return{};var r={};if(typeof n=="string")return n in t&&(r[n]=t[n]),r;for(var o=n.length,i=-1;++i<o;){var a=n[i];a in t&&(r[a]=t[a])}return r},JT=ro(wTe);const UB=/^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g,CTe=/\S+/g;function STe(e,t){const n={parts:[],prefixes:[]},r=e.matchAll(t);let o=0;for(const a of r){if(typeof a.index!="number")continue;const s=a[0];n.parts.push(s);const c=e.slice(o,a.index).trim();n.prefixes.push(c),o=a.index+s.length}const i=e.slice(o).trim();return i&&(n.parts.push(""),n.prefixes.push(i)),n}function qB(e,t){const{keepSpecialCharacters:n=!1,keep:r,prefix:o=""}=t||{},i=e.trim().normalize("NFC"),a=i.includes(" "),c=STe(i,a?CTe:UB);return c.parts.map((f,p)=>{let m=c.prefixes[p]||"",v=f;return n===!1&&(r&&(v=v.normalize("NFD").replace(new RegExp(`[^a-zA-Z\xD8\xDF\xF80-9${r.join("")}]`,"g"),"")),r||(v=v.normalize("NFD").replace(/[^a-zA-ZØßø0-9]/g,""),m="")),r&&(m=m.replace(new RegExp(`[^${r.join("")}]`,"g"),"")),p===0?m+v:!m&&!v?"":a&&!m&&o.match(/\s/)?" "+v:(m||o)+v}).filter(Boolean)}function kTe(e){const t=e.matchAll(UB).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function KB(e,t){return qB(e,t).reduce((n,r)=>n+kTe(r),"")}function GB(e,t){return qB(e,{...t,prefix:"-"}).join("").toLowerCase()}function QT(e,t,n,r){var o,i=!1,a=0;function s(){o&&clearTimeout(o)}function c(){s(),i=!0}typeof t!="boolean"&&(r=n,n=t,t=void 0);function f(){for(var p=arguments.length,m=new Array(p),v=0;v<p;v++)m[v]=arguments[v];var y=this,w=Date.now()-a;if(i)return;function C(){a=Date.now(),n.apply(y,m)}function k(){o=void 0}r&&!o&&C(),s(),r===void 0&&w>e?C():t!==!0&&(o=setTimeout(r?k:C,r===void 0?e-w:e))}return f.cancel=c,f}function XB(e,t,n){return n===void 0?QT(e,t,!1):QT(e,n,t!==!1)}function DUe(e){return e}function mo(e,t,n){const r=e[t];return ZB(!h1(r),n),r}function ZB(e,t){if(!e)throw new ETe(t)}var ETe=class extends FB.BaseError{constructor(){super(...arguments),this.name="AssertionError"}};function Qo(e){return Object.entries(e)}function Uh(e){return Object.keys(e)}function f1(e){return Object.values(e)}function Za(e,t,n){return e.includes(t,n)}function In(e){return Object.assign(Object.create(null),e)}function JB(e){return Object.prototype.toString.call(e)}function QB(e){return JB(e).slice(8,-1)}function tv(e,t){return n=>typeof n!==e?!1:t?t(n):!0}function eD(e){return t=>QB(t)===e}var h1=tv("undefined"),Bn=tv("string"),wi=tv("number",e=>!Number.isNaN(e)),Br=tv("function");function TTe(e){return e===null}function tD(e){return e===!0||e===!1}function Dd(e){if(QB(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function DTe(e){return e==null||/^[bns]/.test(typeof e)}function nc(e){return TTe(e)||h1(e)}function ii(e){return!nc(e)&&(Br(e)||tv("object")(e))}var ATe=eD("RegExp");function OTe(e){return eD("Map")(e)}function MTe(e){return eD("Set")(e)}function p1(e){return ii(e)&&!OTe(e)&&!MTe(e)&&Object.keys(e).length===0}var Fo=Array.isArray;function ks(e){return Fo(e)&&e.length===0}function ez(e){return Fo(e)&&e.length>0}function nv(e,t,n=r=>!!r){t.lastIndex=0;const r=[],o=t.flags;let i;o.includes("g")||(t=new RegExp(t.source,`g${o}`));do i=t.exec(e),i&&r.push(i);while(n(i));return t.lastIndex=0,r}function m1(){const e=Date.now(),t=m1.last||e;return m1.last=e>t?e:t+1}m1.last=0;function rv(e=""){return`${e}${m1().toString(36)}`}function tz(e){return ZT(e,t=>!h1(t))}function PTe(e){if(!Dd(e))throw new Error("An invalid value was passed into this clone utility. Expected a plain object");return{...e}}var NTe=hTe;function ov(e,t=!1){const n=t?[...e].reverse():e,r=new Set(n);return t?[...r].reverse():[...r]}function nz(e){const t=[];for(const n of e){const r=Fo(n)?nz(n):[n];t.push(...r)}return t}function rz(){}function _Te(...e){return dTe.all(e,{isMergeableObject:Dd})}function g1({min:e,max:t,value:n}){return n<e?e:n>t?t:n}function oz(e){return e[e.length-1]}function Ad(e,t){return[...e].map((n,r)=>({value:n,index:r})).sort((n,r)=>t(n.value,r.value)||n.index-r.index).map(({value:n})=>n)}function RTe(e,t,n){try{if(Bn(t)&&t in e)return e[t];Fo(t)&&(t=`['${t.join("']['")}']`);let r=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(o,i,a,s,c,f)=>(r=r[a||s||c||f],"")),r===void 0?n:r}catch{return n}}function ITe(e,t){const n=PTe(t);let r=n;for(const[o,i]of e.entries()){const a=o>=e.length-1;let s=r[i];if(a){if(Fo(r)){const c=Number.parseInt(i.toString(),10);wi(c)&&r.splice(c,1)}else Reflect.deleteProperty(r,i);return n}if(DTe(s))return n;s=Fo(s)?[...s]:{...s},r[i]=s,r=s}return n}function LTe(e){return t=>RTe(t,e)}function iz(e,t,n=!1){const r=[],o=new Set,i=Br(t)?t:LTe(t),a=n?[...e].reverse():e;for(const s of a){const c=i(s);o.has(c)||(o.add(c),r.push(s))}return n?r.reverse():r}function nD(e,t){const n=Fo(e)?e[0]:e;return wi(t)?n<=t?Array.from({length:t+1-n},(r,o)=>o+n):Array.from({length:n+1-t},(r,o)=>-1*o+n):Array.from({length:Math.abs(n)},(r,o)=>(n<0?-1:1)*o)}function az(e,...t){const n=t.filter(wi);return e>=Math.min(...n)&&e<=Math.max(...n)}function sz(e){return Br(e)?e():e}var lz="https://remirror.io/docs/errors",$Te={[tn.UNKNOWN]:"An error occurred but we're not quite sure why. \u{1F9D0}",[tn.INVALID_COMMAND_ARGUMENTS]:"The arguments passed to the command method were invalid.",[tn.CUSTOM]:"This is a custom error, possibly thrown by an external library.",[tn.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[tn.MUTATION]:"Mutation of immutable value detected.",[tn.INTERNAL]:"This is an error which should not occur and is internal to the remirror codebase.",[tn.MISSING_REQUIRED_EXTENSION]:"Your editor is missing a required extension.",[tn.MANAGER_PHASE_ERROR]:"This occurs when accessing a method or property before it is available.",[tn.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[tn.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[tn.SCHEMA]:"There is a problem with the schema or you are trying to access a node / mark that doesn't exists.",[tn.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[tn.INVALID_MANAGER_EXTENSION]:"You requested an invalid extension from the manager.",[tn.DUPLICATE_COMMAND_NAMES]:"Command method names must be unique within the editor.",[tn.DUPLICATE_HELPER_NAMES]:"Helper method names must be unique within the editor.",[tn.NON_CHAINABLE_COMMAND]:"Attempted to chain a non chainable command.",[tn.INVALID_EXTENSION]:"The provided extension is invalid.",[tn.INVALID_CONTENT]:"The content provided to the editor is not supported.",[tn.INVALID_NAME]:"An invalid name was used for the extension.",[tn.EXTENSION]:"An error occurred within an extension. More details should be made available.",[tn.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[tn.EXTENSION_EXTRA_ATTRIBUTES]:"Extra attributes must either be a string or an object.",[tn.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[tn.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the `<Remirror />`.",[tn.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[tn.REACT_EDITOR_VIEW]:"A problem occurred adding the editor view to the dom.",[tn.REACT_CONTROLLED]:"There is a problem with your controlled editor setup.",[tn.REACT_NODE_VIEW]:"Something went wrong with your custom ReactNodeView Component.",[tn.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[tn.REACT_COMPONENTS]:"An error occurred within a remirror component.",[tn.REACT_HOOKS]:"An error occurred within a remirror hook.",[tn.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function FTe(e){return Bn(e)&&Za(f1(tn),e)}function BTe(e,t){const n=$Te[e],r=n?`${n}
|
|
1290
1290
|
|
|
1291
1291
|
`:"",o=t?`${t}
|
|
1292
1292
|
|
|
1293
|
-
`:"";return`${r}${o}For more information visit ${lz}#${e.toLowerCase()}`}var cz=class extends FB.BaseError{constructor({code:e,message:t,disableLogging:n=!1}={}){const r=LTe(e)?e:tn.CUSTOM;super($Te(r,t)),this.errorCode=r,this.url=`${lz}#${r.toLowerCase()}`,n||console.error(this.message)}static create(e={}){return new cz(e)}};function _n(e,t){if(!e)throw cz.create(t)}function FTe(e){if(typeof e!="object"||e===null)return e;const t=Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Module"?e.default??e:e;return t&&typeof e=="object"&&"__esModule"in t&&t.__esModule&&t.default!==void 0?t.default:t}function Od(e,t={}){return process.env.NODE_ENV==="production"?e:(_n(ii(e)||Fo(e),{message:"`freeze` only supports objects and arrays.",code:tn.CORE_HELPERS}),new Proxy(e,{get:(n,r,o)=>(_n(r in n||!t.requireKeys,{message:`The prop: '${r.toString()}' you are trying to access does not yet exist on the target.`}),Reflect.get(n,r,o)),set:(n,r)=>{_n(!1,{message:`It seems you're trying to set the value of the property (${String(r)}) on a frozen object. For your protection this object does not allow direct mutation.`,code:tn.MUTATION})}}))}function Ci(e){this.content=e}Ci.prototype={constructor:Ci,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return o==-1?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new Ci(i)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ci(n)},addToStart:function(e,t){return new Ci([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ci(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(i==-1?o.length:i,0,t,n),new Ci(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Ci.from(e),e.size?new Ci(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ci.from(e),e.size?new Ci(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ci.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Ci.from=function(e){if(e instanceof Ci)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ci(t)};function uz(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){let a=uz(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function dz(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=e.child(--o),s=t.child(--i),c=a.nodeSize;if(a==s){n-=c,r-=c;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let f=0,p=Math.min(a.text.length,s.text.length);for(;f<p&&a.text[a.text.length-f-1]==s.text[s.text.length-f-1];)f++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let f=dz(a.content,s.content,n-1,r-1);if(f)return f}n-=c,r-=c}}class Ht{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,o=0,i){for(let a=0,s=0;s<n;a++){let c=this.content[a],f=s+c.nodeSize;if(f>t&&r(c,o+s,i||null,a)!==!1&&c.content.size){let p=s+1;c.nodesBetween(Math.max(0,t-p),Math.min(c.content.size,n-p),r,o+p)}s=f}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",a=!0;return this.nodesBetween(t,n,(s,c)=>{let f=s.isText?s.text.slice(Math.max(t,c)-c,n-c):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=f},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new Ht(o,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],o=0;if(n>t)for(let i=0,a=0;a<n;i++){let s=this.content[i],c=a+s.nodeSize;c>t&&((a<t||c>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=c}return new Ht(r,o)}cutByIndex(t,n){return t==n?Ht.empty:t==0&&n==this.content.length?this:new Ht(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new Ht(o,i)}addToStart(t){return new Ht([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Ht(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];t(o,r,n),r+=o.nodeSize}}findDiffStart(t,n=0){return uz(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return dz(this,t,n,r)}findIndex(t,n=-1){if(t==0)return v1(0,t);if(t==this.size)return v1(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=t)return a==t||n>0?v1(r+1,a):v1(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Ht.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ht(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Ht.empty;let n,r=0;for(let o=0;o<t.length;o++){let i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Ht(n||t,r)}static from(t){if(!t)return Ht.empty;if(t instanceof Ht)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Ht([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ht.empty=new Ht([],0);const rD={index:0,offset:0};function v1(e,t){return rD.index=e,rD.offset=t,rD}function b1(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!b1(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!b1(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class vr{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(this.eq(i))return t;if(this.type.excludes(i.type))n||(n=t.slice(0,o));else{if(i.type.excludes(this.type))return t;!r&&i.type.rank>this.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&b1(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return vr.none;if(t instanceof vr)return[t];let n=t.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}}vr.none=[];class y1 extends Error{}class gn{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=hz(this.content,t+this.openStart,n);return r&&new gn(r,this.openStart,this.openEnd)}removeBetween(t,n){return new gn(fz(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return gn.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new gn(Ht.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new gn(t,r,o)}}gn.empty=new gn(Ht.empty,0,0);function fz(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(o==t||i.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(fz(i.content,t-o-1,n-o-1)))}function hz(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),a=e.maybeChild(o);if(i==t||a.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=hz(a.content,t-i-1,n);return s&&e.replaceChild(o,a.copy(s))}function BTe(e,t,n){if(n.openStart>e.depth)throw new y1("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new y1("Inconsistent open depths");return pz(e,t,n,0)}function pz(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let a=pz(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Pd(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=zTe(n,e);return Pd(i,gz(e,a,s,t,r))}else return Pd(i,x1(e,t,r))}function mz(e,t){if(!t.type.compatibleContent(e.type))throw new y1("Cannot join "+t.type.name+" onto "+e.type.name)}function oD(e,t,n){let r=e.node(n);return mz(r,t.node(n)),r}function Md(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function iv(e,t,n,r){let o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Md(e.nodeAfter,r),i++));for(let s=i;s<a;s++)Md(o.child(s),r);t&&t.depth==n&&t.textOffset&&Md(t.nodeBefore,r)}function Pd(e,t){return e.type.checkContent(t),e.copy(t)}function gz(e,t,n,r,o){let i=e.depth>o&&oD(e,t,o+1),a=r.depth>o&&oD(n,r,o+1),s=[];return iv(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(mz(i,a),Md(Pd(i,gz(e,t,n,r,o+1)),s)):(i&&Md(Pd(i,x1(e,t,o+1)),s),iv(t,n,o,s),a&&Md(Pd(a,x1(n,r,o+1)),s)),iv(r,null,o,s),new Ht(s)}function x1(e,t,n){let r=[];if(iv(null,e,n,r),e.depth>n){let o=oD(e,t,n+1);Md(Pd(o,x1(e,t,n+1)),r)}return iv(t,null,n,r),new Ht(r)}function zTe(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(Ht.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class Lp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<t;i++)o+=r.child(i).nodeSize;return o}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return vr.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),o=t.maybeChild(n);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=t.parent.maybeChild(t.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Nd(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=t;;){let{index:s,offset:c}=a.content.findIndex(i),f=i-c;if(r.push(a,s,o+c),!f||(a=a.child(s),a.isText))break;i=f-1,o+=c+1}return new Lp(n,r,i)}static resolveCached(t,n){for(let o=0;o<iD.length;o++){let i=iD[o];if(i.pos==n&&i.doc==t)return i}let r=iD[aD]=Lp.resolve(t,n);return aD=(aD+1)%VTe,r}}let iD=[],aD=0,VTe=12;class Nd{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const HTe=Object.create(null);let nu=class cM{constructor(t,n,r,o=vr.none){this.type=t,this.attrs=n,this.marks=o,this.content=r||Ht.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,o=0){this.content.nodesBetween(t,n,r,o,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,o){return this.content.textBetween(t,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&b1(this.attrs,n||t.defaultAttrs||HTe)&&vr.sameSet(this.marks,r||vr.none)}copy(t=null){return t==this.content?this:new cM(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new cM(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return gn.empty;let o=this.resolve(t),i=this.resolve(n),a=r?0:o.sharedDepth(n),s=o.start(a),f=o.node(a).content.cut(o.pos-s,i.pos-s);return new gn(f,o.depth-a,i.depth-a)}replace(t,n,r){return BTe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(o==t||n.isText)return n;t-=o+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(t){return Lp.resolveCached(this,t)}resolveNoCache(t){return Lp.resolve(this,t)}rangeHasMark(t,n,r){let o=!1;return n>t&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),vz(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Ht.empty,o=0,i=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let c=o;c<i;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(t,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(t).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=vr.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!vr.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=Ht.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};nu.prototype.text=void 0;class qw extends nu{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):vz(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new qw(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new qw(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function vz(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class af{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new jTe(t,n);if(r.next==null)return af.empty;let o=bz(r);r.next&&r.err("Unexpected trailing text");let i=XTe(GTe(o));return ZTe(i,r),i}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(t.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let o=[this];function i(a,s){let c=a.matchFragment(t,r);if(c&&(!n||c.validEnd))return Ht.from(s.map(f=>f.createAndFill()));for(let f=0;f<a.next.length;f++){let{type:p,next:m}=a.next[f];if(!(p.isText||p.hasRequiredAttrs())&&o.indexOf(m)==-1){o.push(m);let v=i(m,s.concat(p));if(v)return v}}return null}return i(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(t)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:c}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o<r.next.length;o++)t.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),t.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return i}).join(`
|
|
1294
|
-
`)}}af.empty=new af(!0);class jTe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function bz(e){let t=[];do t.push(WTe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function WTe(e){let t=[];do t.push(YTe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function YTe(e){let t=KTe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=UTe(e,t);else break;return t}function yz(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function UTe(e,t){let n=yz(e),r=n;return e.eat(",")&&(e.next!="}"?r=yz(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function qTe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function KTe(e){if(e.eat("(")){let t=bz(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=qTe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function GTe(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,c){let f={term:c,to:s};return t[a].push(f),f}function o(a,s){a.forEach(c=>c.to=s)}function i(a,s){if(a.type=="choice")return a.exprs.reduce((c,f)=>c.concat(i(f,s)),[]);if(a.type=="seq")for(let c=0;;c++){let f=i(a.exprs[c],s);if(c==a.exprs.length-1)return f;o(f,s=n())}else if(a.type=="star"){let c=n();return r(s,c),o(i(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return o(i(a.expr,s),c),o(i(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(s)].concat(i(a.expr,s));if(a.type=="range"){let c=s;for(let f=0;f<a.min;f++){let p=n();o(i(a.expr,c),p),c=p}if(a.max==-1)o(i(a.expr,c),c);else for(let f=a.min;f<a.max;f++){let p=n();r(c,p),o(i(a.expr,c),p),c=p}return[r(c)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function xz(e,t){return t-e}function wz(e,t){let n=[];return r(t),n.sort(xz);function r(o){let i=e[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let a=0;a<i.length;a++){let{term:s,to:c}=i[a];!s&&n.indexOf(c)==-1&&r(c)}}}function XTe(e){let t=Object.create(null);return n(wz(e,0));function n(r){let o=[];r.forEach(a=>{e[a].forEach(({term:s,to:c})=>{if(!s)return;let f;for(let p=0;p<o.length;p++)o[p][0]==s&&(f=o[p][1]);wz(e,c).forEach(p=>{f||o.push([s,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let i=t[r.join(",")]=new af(r.indexOf(e.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(xz);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}function ZTe(e,t){for(let n=0,r=[e];n<r.length;n++){let o=r[n],i=!o.validEnd,a=[];for(let s=0;s<o.next.length;s++){let{type:c,next:f}=o.next[s];a.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),r.indexOf(f)==-1&&r.push(f)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Cz(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Sz(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(o===void 0){let i=e[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function kz(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new JTe(e[n]);return t}let sD=class vW{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=kz(r.attrs),this.defaultAttrs=Cz(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==af.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Sz(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new nu(this,this.computeAttrs(t),Ht.from(n),vr.setFrom(r))}createChecked(t=null,n,r){return n=Ht.from(n),this.checkContent(n),new nu(this,this.computeAttrs(t),n,vr.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Ht.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Ht.empty,!0);return i?new nu(this,t,n.append(i),vr.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:vr.none:t}static compile(t,n){let r=Object.create(null);t.forEach((i,a)=>r[i]=new vW(i,n,a));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class JTe{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class bb{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=kz(o.attrs),this.excluded=null;let i=Cz(this.attrs);this.instance=i?new vr(this,i):null}create(t=null){return!t&&this.instance?this.instance:new vr(this,Sz(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,a)=>r[i]=new bb(i,o++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}let QTe=class{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Ci.from(t.nodes),n.marks=Ci.from(t.marks||{}),this.nodes=sD.compile(this.spec.nodes,this),this.marks=bb.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=r[a]||(r[a]=af.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=s=="_"?null:s?Ez(this,s.split(" ")):s==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:Ez(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof sD){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new qw(r,r.defaultAttrs,t,vr.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return nu.fromJSON(this,t)}markFromJSON(t){return vr.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Ez(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(let s in e.marks){let c=e.marks[s];(o=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}let lD=class uM{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new Oz(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Oz(this,n,!0);return r.addAll(t,n.from,n.to),gn.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(nDe(t,i.tag)&&(i.namespace===void 0||t.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(t,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let a=this.styles[i],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let c=a.getAttrs(n);if(c===!1)continue;a.attrs=c||void 0}return a}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<i)break}n.splice(a,0,o)}for(let o in t.marks){let i=t.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Mz(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Mz(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new uM(t,uM.schemaRules(t)))}};const Tz={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},eDe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dz={ol:!0,ul:!0},w1=1,C1=2,av=4;function Az(e,t,n){return t!=null?(t?w1:0)|(t==="full"?C1:0):e&&e.whitespace=="pre"?w1|C1:n&~av}class S1{constructor(t,n,r,o,i,a,s){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=vr.none,this.stashMarks=[],this.match=a||(s&av?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ht.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&w1)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Ht.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ht.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let o=r[n];(this.type?this.type.allowsMarkType(o.type):oDe(o.type,t))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Tz.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Oz{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let o=n.topNode,i,a=Az(null,n.preserveWhitespace,0)|(r?av:0);o?i=new S1(o.type,o.attrs,vr.none,vr.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new S1(null,null,vr.none,vr.none,!0,null,a):i=new S1(t.schema.topNodeType,null,vr.none,vr.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){t.nodeType==3?this.addTextNode(t):t.nodeType==1&&this.addElement(t)}withStyleRules(t,n){let r=t.getAttribute("style");if(!r)return n();let o=this.readStyles(rDe(r));if(!o)return;let[i,a]=o,s=this.top;for(let c=0;c<a.length;c++)this.removePendingMark(a[c],s);for(let c=0;c<i.length;c++)this.addPendingMark(i[c]);n();for(let c=0;c<i.length;c++)this.removePendingMark(i[c],s);for(let c=0;c<a.length;c++)this.addPendingMark(a[c])}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&C1||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&w1)r.options&C1?n=n.replace(/\r\n?/g,`
|
|
1295
|
-
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],i=t.previousSibling;(!o||i&&i.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),o;Dz.hasOwnProperty(r)&&this.parser.normalizeLists&&
|
|
1296
|
-
`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=vr.none,r=vr.none;for(let o=0;o<t.length;o+=2)for(let i=void 0;;){let a=this.parser.matchStyle(t[o],t[o+1],this,i);if(!a)break;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(s=>{a.clearMark(s)&&(r=s.addToSet(r))}):n=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),a.consuming===!1)i=a;else break}return[n,r]}addElementByRule(t,n,r){let o,i,a;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}o&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],a=i.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=i,!a.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;o<n.length;o++)this.enterInner(n[o],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let o=0;o<t.marks.length;o++)(!n.type||n.type.allowsMarkType(t.marks[o].type))&&(r=t.marks[o].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let o=this.findPlace(t.create(n));return o&&this.enterInner(t,n,!0,r),o}enterInner(t,n=null,r=!1,o){this.closeExtra();let i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t);let a=Az(t,o,i.options);i.options&av&&i.content.length==0&&(a|=av),this.nodes.push(new S1(t,n,i.activeMarks,i.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&t.nodeType==1&&t.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=(s,c)=>{for(;s>=0;s--){let f=n[s];if(f==""){if(s==n.length-1||s==0)continue;for(;c>=i;c--)if(a(s-1,c))return!0;return!1}else{let p=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!p||p.name!=f&&p.groups.indexOf(f)==-1)return!1;c--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=iDe(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let a=o.popFromStashMark(t);a&&o.type&&o.type.allowsMarkType(a.type)&&(o.activeMarks=a.addToSet(o.activeMarks))}if(o==n)break}}}function tDe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&Dz.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function nDe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function rDe(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function Mz(e){let t={};for(let n in e)t[n]=e[n];return t}function oDe(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],a=s=>{i.push(s);for(let c=0;c<s.edgeCount;c++){let{type:f,next:p}=s.edge(c);if(f==t||i.indexOf(p)<0&&a(p))return!0}};if(a(o.contentMatch))return!0}}function iDe(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class $s{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=cD(n).createDocumentFragment());let o=r,i=[];return t.forEach(a=>{if(i.length||a.marks.length){let s=0,c=0;for(;s<i.length&&c<a.marks.length;){let f=a.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(i[s][0])||f.type.spec.spanning===!1)break;s++,c++}for(;s<i.length;)o=i.pop()[1];for(;c<a.marks.length;){let f=a.marks[c++],p=this.serializeMark(f,a.isInline,n);p&&(i.push([f,o]),o.appendChild(p.dom),o=p.contentDOM||p.dom)}}o.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:o}=$s.renderSpec(cD(n),this.nodes[t.type.name](t));if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,o)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let o=t.marks.length-1;o>=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&$s.renderSpec(cD(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let a,s=r?t.createElementNS(r,o):t.createElement(o),c=n[1],f=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){f=2;for(let p in c)if(c[p]!=null){let m=p.indexOf(" ");m>0?s.setAttributeNS(p.slice(0,m),p.slice(m+1),c[p]):s.setAttribute(p,c[p])}}for(let p=f;p<n.length;p++){let m=n[p];if(m===0){if(p<n.length-1||p>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}else{let{dom:v,contentDOM:y}=$s.renderSpec(t,m,r);if(s.appendChild(v),y){if(a)throw new RangeError("Multiple content holes");a=y}}}return{dom:s,contentDOM:a}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new $s(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Pz(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Pz(t.marks)}}function Pz(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function cD(e){return e.document||window.document}const Nz=65535,_z=Math.pow(2,16);function aDe(e,t){return e+t*_z}function Rz(e){return e&Nz}function sDe(e){return(e-(e&Nz))/_z}const Iz=1,Lz=2,k1=4,$z=8;class uD{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$z)>0}get deletedBefore(){return(this.delInfo&(Iz|k1))>0}get deletedAfter(){return(this.delInfo&(Lz|k1))>0}get deletedAcross(){return(this.delInfo&k1)>0}}class Oa{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Oa.empty)return Oa.empty}recover(t){let n=0,r=Rz(t);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+sDe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let o=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?o:0);if(c>t)break;let f=this.ranges[s+i],p=this.ranges[s+a],m=c+f;if(t<=m){let v=f?t==c?-1:t==m?1:n:n,y=c+o+(v<0?0:p);if(r)return y;let w=t==(n<0?c:m)?null:aDe(s/3,t-c),C=t==c?Lz:t==m?Iz:k1;return(n<0?t!=c:t!=m)&&(C|=$z),new uD(y,C,w)}o+=p-f}return r?t+o:new uD(t+o,0,null)}touches(t,n){let r=0,o=Rz(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?r:0);if(c>t)break;let f=this.ranges[s+i],p=c+f;if(t<=p&&s==o*3)return!0;r+=this.ranges[s+a]-f}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let a=this.ranges[o],s=a-(this.inverted?i:0),c=a+(this.inverted?0:i),f=this.ranges[o+n],p=this.ranges[o+r];t(s,s+f,c,c+p),i+=p-f}}invert(){return new Oa(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Oa.empty:new Oa(t<0?[0,-t,0]:[0,0,t])}}Oa.empty=new Oa([]);class $p{constructor(t=[],n,r=0,o=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=o}slice(t=0,n=this.maps.length){return new $p(this.maps,this.mirror,t,n)}copy(){return new $p(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let o=t.getMirror(n);this.appendMap(t.maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new $p;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this.maps[i],s=a.mapResult(t,n);if(s.recover!=null){let c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,t=this.maps[c].recover(s.recover);continue}}o|=s.delInfo,t=s.pos}return r?t:new uD(t,o,null)}}const dD=Object.create(null);class ei{getMap(){return Oa.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=dD[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in dD)throw new RangeError("Duplicate use of step JSON ID "+t);return dD[t]=n,n.prototype.jsonID=t,n}}class zo{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new zo(t,null)}static fail(t){return new zo(null,t)}static fromReplace(t,n,r,o){try{return zo.ok(t.replace(n,r,o))}catch(i){if(i instanceof y1)return zo.fail(i.message);throw i}}}function fD(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(fD(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return Ht.fromArray(r)}class xc extends ei{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new gn(fD(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),n.openStart,n.openEnd);return zo.fromReplace(t,this.from,this.to,i)}invert(){return new Fs(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new xc(n.pos,r.pos,this.mark)}merge(t){return t instanceof xc&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new xc(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new xc(n.from,n.to,t.markFromJSON(n.mark))}}ei.jsonID("addMark",xc);class Fs extends ei{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new gn(fD(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return zo.fromReplace(t,this.from,this.to,r)}invert(){return new xc(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Fs(n.pos,r.pos,this.mark)}merge(t){return t instanceof Fs&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Fs(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Fs(n.from,n.to,t.markFromJSON(n.mark))}}ei.jsonID("removeMark",Fs);class _u extends ei{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zo.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return zo.fromReplace(t,this.pos,this.pos+1,new gn(Ht.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new _u(this.pos,n.marks[o]);return new _u(this.pos,this.mark)}}return new Fp(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new _u(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new _u(n.pos,t.markFromJSON(n.mark))}}ei.jsonID("addNodeMark",_u);class Fp extends ei{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zo.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return zo.fromReplace(t,this.pos,this.pos+1,new gn(Ht.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new _u(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Fp(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Fp(n.pos,t.markFromJSON(n.mark))}}ei.jsonID("removeNodeMark",Fp);class di extends ei{constructor(t,n,r,o=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=o}apply(t){return this.structure&&hD(t,this.from,this.to)?zo.fail("Structure replace would overwrite content"):zo.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Oa([this.from,this.to-this.from,this.slice.size])}invert(t){return new di(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new di(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof di)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?gn.empty:new gn(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new di(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?gn.empty:new gn(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new di(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new di(n.from,n.to,gn.fromJSON(t,n.slice),!!n.structure)}}ei.jsonID("replace",di);class Bo extends ei{constructor(t,n,r,o,i,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(t){if(this.structure&&(hD(t,this.from,this.gapFrom)||hD(t,this.gapTo,this.to)))return zo.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return zo.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?zo.fromReplace(t,this.from,this.to,r):zo.fail("Content does not fit in gap")}getMap(){return new Oa([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Bo(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new Bo(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Bo(n.from,n.to,n.gapFrom,n.gapTo,gn.fromJSON(t,n.slice),n.insert,!!n.structure)}}ei.jsonID("replaceAround",Bo);function hD(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function lDe(e,t,n,r){let o=[],i=[],a,s;e.doc.nodesBetween(t,n,(c,f,p)=>{if(!c.isInline)return;let m=c.marks;if(!r.isInSet(m)&&p.type.allowsMarkType(r.type)){let v=Math.max(f,t),y=Math.min(f+c.nodeSize,n),w=r.addToSet(m);for(let C=0;C<m.length;C++)m[C].isInSet(w)||(a&&a.to==v&&a.mark.eq(m[C])?a.to=y:o.push(a=new Fs(v,y,m[C])));s&&s.to==v?s.to=y:i.push(s=new xc(v,y,r))}}),o.forEach(c=>e.step(c)),i.forEach(c=>e.step(c))}function cDe(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(a,s)=>{if(!a.isInline)return;i++;let c=null;if(r instanceof bb){let f=a.marks,p;for(;p=r.isInSet(f);)(c||(c=[])).push(p),f=p.removeFromSet(f)}else r?r.isInSet(a.marks)&&(c=[r]):c=a.marks;if(c&&c.length){let f=Math.min(s+a.nodeSize,n);for(let p=0;p<c.length;p++){let m=c[p],v;for(let y=0;y<o.length;y++){let w=o[y];w.step==i-1&&m.eq(o[y].style)&&(v=w)}v?(v.to=f,v.step=i):o.push({style:m,from:Math.max(s,t),to:f,step:i})}}}),o.forEach(a=>e.step(new Fs(a.from,a.to,a.style)))}function uDe(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],a=t+1;for(let s=0;s<o.childCount;s++){let c=o.child(s),f=a+c.nodeSize,p=r.matchType(c.type);if(!p)i.push(new di(a,f,gn.empty));else{r=p;for(let m=0;m<c.marks.length;m++)n.allowsMarkType(c.marks[m].type)||e.step(new Fs(a,f,c.marks[m]));if(c.isText&&!n.spec.code){let m,v=/\r?\n|\r/g,y;for(;m=v.exec(c.text);)y||(y=new gn(Ht.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),i.push(new di(a+m.index,a+m.index+m[0].length,y))}}a=f}if(!r.validEnd){let s=r.fillBefore(Ht.empty,!0);e.replace(a,a,new gn(s,0,0))}for(let s=i.length-1;s>=0;s--)e.step(i[s])}function dDe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function qh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&o.canReplace(i,a,n))return r;if(r==0||o.type.spec.isolating||!dDe(o,i,a))break}return null}function fDe(e,t,n){let{$from:r,$to:o,depth:i}=t,a=r.before(i+1),s=o.after(i+1),c=a,f=s,p=Ht.empty,m=0;for(let w=i,C=!1;w>n;w--)C||r.index(w)>0?(C=!0,p=Ht.from(r.node(w).copy(p)),m++):c--;let v=Ht.empty,y=0;for(let w=i,C=!1;w>n;w--)C||o.after(w+1)<o.end(w)?(C=!0,v=Ht.from(o.node(w).copy(v)),y++):f++;e.step(new Bo(c,f,a,s,new gn(p.append(v),m,y),p.size-m,!0))}function pD(e,t,n=null,r=e){let o=hDe(e,t),i=o&&pDe(r,t);return i?o.map(Fz).concat({type:t,attrs:n}).concat(i.map(Fz)):null}function Fz(e){return{type:e,attrs:null}}function hDe(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function pDe(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;let c=(a.length?a[a.length-1]:t).contentMatch;for(let f=r;c&&f<o;f++)c=c.matchType(n.child(f).type);return!c||!c.validEnd?null:a}function mDe(e,t,n){let r=Ht.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let s=n[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ht.from(n[a].type.create(n[a].attrs,r))}let o=t.start,i=t.end;e.step(new Bo(o,i,o,i,new gn(r,0,0),n.length,!0))}function gDe(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(a,s)=>{if(a.isTextblock&&!a.hasMarkup(r,o)&&vDe(e.doc,e.mapping.slice(i).map(s),r)){e.clearIncompatible(e.mapping.slice(i).map(s,1),r);let c=e.mapping.slice(i),f=c.map(s,1),p=c.map(s+a.nodeSize,1);return e.step(new Bo(f,p,f+1,p-1,new gn(Ht.from(r.create(o,null,a.marks)),0,0),1,!0)),!1}})}function vDe(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function bDe(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Bo(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new gn(Ht.from(a),0,0),1,!0))}function Kh(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let f=o.depth-1,p=n-2;f>i;f--,p--){let m=o.node(f),v=o.index(f);if(m.type.spec.isolating)return!1;let y=m.content.cutByIndex(v,m.childCount),w=r&&r[p+1];w&&(y=y.replaceChild(0,w.type.create(w.attrs)));let C=r&&r[p]||m;if(!m.canReplace(v+1,m.childCount)||!C.type.validContent(y))return!1}let s=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(s,s,c?c.type:o.node(i+1).type)}function yDe(e,t,n=1,r){let o=e.doc.resolve(t),i=Ht.empty,a=Ht.empty;for(let s=o.depth,c=o.depth-n,f=n-1;s>c;s--,f--){i=Ht.from(o.node(s).copy(i));let p=r&&r[f];a=Ht.from(p?p.type.create(p.attrs,a):o.node(s).copy(a))}e.step(new di(t,t,new gn(i.append(a),n,n),!0))}function sv(e,t){let n=e.resolve(t),r=n.index();return xDe(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function xDe(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function wDe(e,t,n){let r=new di(t-n,t+n,gn.empty,!0);e.step(r)}function Bz(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function CDe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(s>0?1:0),f=r.node(a),p=!1;if(i==1)p=f.canReplace(c,c,o);else{let m=f.contentMatchAt(c).findWrapping(o.firstChild.type);p=m&&f.canReplaceWith(c,c,m[0])}if(p)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function mD(e,t,n=t,r=gn.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return zz(o,i,r)?new di(t,n,r):new SDe(o,i,r).fit()}function zz(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class SDe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Ht.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=Ht.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,a=r.depth,s=o.depth;for(;a&&s&&i.childCount==1;)i=i.firstChild.content,a--,s--;let c=new gn(i,a,s);return t>-1?new Bo(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new di(r.pos,o.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<t;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=gD(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let a=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:c,match:f}=this.frontier[s],p,m=null;if(n==1&&(a?f.matchType(a.type)||(m=f.fillBefore(Ht.from(a),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:s,parent:i,inject:m};if(n==2&&a&&(p=f.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:i,wrap:p};if(i&&f.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=gD(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new gn(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=gD(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new gn(lv(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new gn(lv(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let C=0;C<i.length;C++)this.openFrontierNode(i[C]);let a=this.unplaced,s=r?r.content:a.content,c=a.openStart-t,f=0,p=[],{match:m,type:v}=this.frontier[n];if(o){for(let C=0;C<o.childCount;C++)p.push(o.child(C));m=m.matchFragment(o)}let y=s.size+t-(a.content.size-a.openEnd);for(;f<s.childCount;){let C=s.child(f),k=m.matchType(C.type);if(!k)break;f++,(f>1||c==0||C.content.size)&&(m=k,p.push(Vz(C.mark(v.allowedMarks(C.marks)),f==1?c:0,f==s.childCount?y:-1)))}let w=f==s.childCount;w||(y=-1),this.placed=cv(this.placed,n,Ht.from(p)),this.frontier[n].match=m,w&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let C=0,k=s;C<y;C++){let T=k.lastChild;this.frontier.push({type:T.type,match:T.contentMatchAt(T.childCount)}),k=T.content}this.unplaced=w?t==0?gn.empty:new gn(lv(a.content,t-1,1),t-1,y<0?a.openEnd:t-1):new gn(lv(a.content,t,f),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!vD(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=vD(t,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:c,type:f}=this.frontier[s],p=vD(t,s,f,c,!0);if(!p||p.childCount)continue e}return{depth:n,fit:a,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=cv(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=cv(this.placed,this.depth,Ht.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ht.empty,!0);n.childCount&&(this.placed=cv(this.placed,this.frontier.length,n))}}function lv(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(lv(e.firstChild.content,t-1,n)))}function cv(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(cv(e.lastChild.content,t-1,n)))}function gD(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Vz(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Vz(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Ht.empty,!0)))),e.copy(r)}function vD(e,t,n,r,o){let i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!kDe(n,i.content,a)?s:null}function kDe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function EDe(e){return e.spec.defining||e.spec.definingForContent}function TDe(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(zz(o,i,r))return e.step(new di(t,n,r));let a=jz(o,e.doc.resolve(n));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let v=o.depth,y=o.pos-1;v>0;v--,y--){let w=o.node(v).type.spec;if(w.defining||w.definingAsContext||w.isolating)break;a.indexOf(v)>-1?s=v:o.before(v)==y&&a.splice(1,0,-v)}let c=a.indexOf(s),f=[],p=r.openStart;for(let v=r.content,y=0;;y++){let w=v.firstChild;if(f.push(w),y==r.openStart)break;v=w.content}for(let v=p-1;v>=0;v--){let y=f[v],w=EDe(y.type);if(w&&!y.sameMarkup(o.node(Math.abs(s)-1)))p=v;else if(w||!y.type.isTextblock)break}for(let v=r.openStart;v>=0;v--){let y=(v+p+1)%(r.openStart+1),w=f[y];if(w)for(let C=0;C<a.length;C++){let k=a[(C+c)%a.length],T=!0;k<0&&(T=!1,k=-k);let E=o.node(k-1),_=o.index(k-1);if(E.canReplaceWith(_,_,w.type,w.marks))return e.replace(o.before(k),T?i.after(k):n,new gn(Hz(r.content,0,r.openStart,y),y,r.openEnd))}}let m=e.steps.length;for(let v=a.length-1;v>=0&&(e.replace(t,n,r),!(e.steps.length>m));v--){let y=a[v];y<0||(t=o.before(y),n=i.after(y))}}function Hz(e,t,n,r,o){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(Hz(i.content,t+1,n,r,i)))}if(t>r){let i=o.contentMatchAt(0),a=i.fillBefore(e).append(e);e=a.append(i.matchFragment(a).fillBefore(Ht.empty,!0))}return e}function DDe(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=Bz(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new gn(Ht.from(r),0,0))}function ADe(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=jz(r,o);for(let a=0;a<i.length;a++){let s=i[a],c=a==i.length-1;if(c&&s==0||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(c||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&o.end(a)-n!=o.depth-a)return e.delete(r.before(a),n);e.delete(t,n)}function jz(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(i<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Bp extends ei{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return zo.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return zo.fromReplace(t,this.pos,this.pos+1,new gn(Ht.from(o),0,n.isLeaf?0:1))}getMap(){return Oa.empty}invert(t){return new Bp(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Bp(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Bp(n.pos,n.attr,n.value)}}ei.jsonID("attr",Bp);class yb extends ei{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return zo.ok(r)}getMap(){return Oa.empty}invert(t){return new yb(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new yb(n.attr,n.value)}}ei.jsonID("docAttr",yb);let Gh=class extends Error{};Gh=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},Gh.prototype=Object.create(Error.prototype),Gh.prototype.constructor=Gh,Gh.prototype.name="TransformError";class ODe{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new $p}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Gh(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=gn.empty){let o=mD(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new gn(Ht.from(r),0,0))}delete(t,n){return this.replace(t,n,gn.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return TDe(this,t,n,r),this}replaceRangeWith(t,n,r){return DDe(this,t,n,r),this}deleteRange(t,n){return ADe(this,t,n),this}lift(t,n){return fDe(this,t,n),this}join(t,n=1){return wDe(this,t,n),this}wrap(t,n){return mDe(this,t,n),this}setBlockType(t,n=t,r,o=null){return gDe(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return bDe(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Bp(t,n,r)),this}setDocAttribute(t,n){return this.step(new yb(t,n)),this}addNodeMark(t,n){return this.step(new _u(t,n)),this}removeNodeMark(t,n){if(!(n instanceof vr)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Fp(t,n)),this}split(t,n=1,r){return yDe(this,t,n,r),this}addMark(t,n,r){return lDe(this,t,n,r),this}removeMark(t,n,r){return cDe(this,t,n,r),this}clearIncompatible(t,n,r){return uDe(this,t,n,r),this}}const bD=Object.create(null);class ur{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new MDe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=gn.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let i=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:c,$to:f}=a[s],p=t.mapping.slice(i);t.replaceRange(p.map(c.pos),p.map(f.pos),s?gn.empty:n),s==0&&Uz(t,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],c=t.mapping.slice(r),f=c.map(a.pos),p=c.map(s.pos);i?t.deleteRange(f,p):(t.replaceRangeWith(f,p,n),Uz(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let o=t.parent.inlineContent?new Vn(t):Xh(t.node(0),t.parent,t.pos,t.index(),n,r);if(o)return o;for(let i=t.depth-1;i>=0;i--){let a=n<0?Xh(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):Xh(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new qi(t.node(0))}static atStart(t){return Xh(t,t,0,0,1)||new qi(t)}static atEnd(t){return Xh(t,t,t.content.size,t.childCount,-1)||new qi(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=bD[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in bD)throw new RangeError("Duplicate use of selection JSON ID "+t);return bD[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Vn.between(this.$anchor,this.$head).getBookmark()}}ur.prototype.visible=!0;class MDe{constructor(t,n){this.$from=t,this.$to=n}}let Wz=!1;function Yz(e){!Wz&&!e.parent.inlineContent&&(Wz=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Vn extends ur{constructor(t,n=t){Yz(t),Yz(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ur.near(r);let o=t.resolve(n.map(this.anchor));return new Vn(o.parent.inlineContent?o:r,r)}replace(t,n=gn.empty){if(super.replace(t,n),n==gn.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Vn&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Kw(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Vn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=ur.findFrom(n,r,!0)||ur.findFrom(n,-r,!0);if(i)n=i.$head;else return ur.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(ur.findFrom(t,-r,!0)||ur.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=o<0&&(t=n))),new Vn(t,n)}}ur.jsonID("text",Vn);class Kw{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Kw(t.map(this.anchor),t.map(this.head))}resolve(t){return Vn.between(t.resolve(this.anchor),t.resolve(this.head))}}class zn extends ur{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=t.resolve(o);return r?ur.near(i):new zn(i)}content(){return new gn(Ht.from(this.node),0,0)}eq(t){return t instanceof zn&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new dM(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new zn(t.resolve(n.anchor))}static create(t,n){return new zn(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}zn.prototype.visible=!1,ur.jsonID("node",zn);class dM{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Kw(r,r):new dM(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&zn.isSelectable(r)?new zn(n):ur.near(n)}}class qi extends ur{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=gn.empty){if(n==gn.empty){t.delete(0,t.doc.content.size);let r=ur.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new qi(t)}map(t){return new qi(t)}eq(t){return t instanceof qi}getBookmark(){return PDe}}ur.jsonID("all",qi);const PDe={map(){return this},resolve(e){return new qi(e)}};function Xh(e,t,n,r,o,i=!1){if(t.inlineContent)return Vn.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let s=t.child(a);if(s.isAtom){if(!i&&zn.isSelectable(s))return zn.create(e,n-(o<0?s.nodeSize:0))}else{let c=Xh(e,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}return null}function Uz(e,t,n){let r=e.steps.length-1;if(r<t)return;let o=e.steps[r];if(!(o instanceof di||o instanceof Bo))return;let i=e.mapping.maps[r],a;i.forEach((s,c,f,p)=>{a==null&&(a=p)}),e.setSelection(ur.near(e.doc.resolve(a),n))}const qz=1,E1=2,Kz=4;class NDe extends ODe{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|qz)&~E1,this.storedMarks=null,this}get selectionSet(){return(this.updated&qz)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=E1,this}ensureMarks(t){return vr.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&E1)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~E1,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||vr.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(ur.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Kz,this}get scrolledIntoView(){return(this.updated&Kz)>0}}function Gz(e,t){return!t||!e?e:e.bind(t)}class uv{constructor(t,n,r){this.name=t,this.init=Gz(n.init,r),this.apply=Gz(n.apply,r)}}const _De=[new uv("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new uv("selection",{init(e,t){return e.selection||ur.atStart(t.doc)},apply(e){return e.selection}}),new uv("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new uv("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class yD{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=_De.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new uv(r.key,r.spec.state,r))})}}class sf{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),o=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let c=o?o[a].n:0,f=o?o[a].state:this,p=c<n.length&&s.spec.appendTransaction.call(s,c?n.slice(c):n,f,r);if(p&&r.filterTransaction(p,a)){if(p.setMeta("appendedTransaction",t),!o){o=[];for(let m=0;m<this.config.plugins.length;m++)o.push(m<a?{state:r,n:n.length}:{state:this,n:0})}n.push(p),r=r.applyInner(p),i=!0}o&&(o[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new sf(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new NDe(this)}static create(t){let n=new yD(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new sf(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}reconfigure(t){let n=new yD(this.schema,t.plugins),r=n.fields,o=new sf(n);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new yD(t.schema,t.plugins),i=new sf(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=nu.fromJSON(t.schema,n.doc);else if(a.name=="selection")i.selection=ur.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let c=r[s],f=c.spec.state;if(c.key==a.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){i[a.name]=f.fromJSON.call(c,t,n[s],i);return}}i[a.name]=a.init(t,i)}}),i}}function Xz(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Xz(o,t,{})),n[r]=o}return n}class rc{constructor(t){this.spec=t,this.props={},t.props&&Xz(t.props,this,this.props),this.key=t.key?t.key.key:Zz("plugin")}getState(t){return t[this.key]}}const xD=Object.create(null);function Zz(e){return e in xD?e+"$"+ ++xD[e]:(xD[e]=0,e+"$")}class _d{constructor(t="key"){this.key=Zz(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var RDe=/[A-Z]/g,IDe=/^ms-/,wD={};function LDe(e){return"-"+e.toLowerCase()}function $De(e){if(wD.hasOwnProperty(e))return wD[e];var t=e.replace(RDe,LDe);return wD[e]=IDe.test(t)?"-"+t:t}function FDe(e){return $De(e)}function BDe(e,t){return FDe(e)+":"+t}function zDe(e){var t="";for(var n in e){var r=e[n];typeof r!="string"&&typeof r!="number"||(t&&(t+=";"),t+=BDe(n,r))}return t}function Jz(){return typeof document<"u"?document:null}function Qz(e,t){if(typeof e!="string")return[e];var n=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;r.forEach(function(c){var f=new RegExp(["\\",c[0],"[^\\",c[0],"\\",c[1],"]*\\",c[1]].join("")),p=[];function m(v,y,w){var C=n.push(v.slice(c[0].length,-c[1].length))-1;return p.push(C),o+C+o}n.forEach(function(v,y){for(var w,C=0;v!=w;)if(w=v,v=v.replace(f,m),C++>1e4)throw Error("References have circular dependency. Please, check them.");n[y]=v}),p=p.reverse(),n=n.map(function(v){return p.forEach(function(y){v=v.replace(new RegExp("(\\"+o+y+"\\"+o+")","g"),c[0]+"$1"+c[1])}),v})});var a=new RegExp("\\"+o+"([0-9]+)\\"+o);function s(c,f,p){for(var m=[],v,y=0;v=a.exec(c);){if(y++>1e4)throw Error("Circular references in parenthesis");m.push(c.slice(0,v.index)),m.push(s(f[v[1]],f)),c=c.slice(v.index+v[0].length)}return m.push(c),m}return i?n:s(n[0],n)}function e8(e,t){if(t&&t.flat){var n=t&&t.escape||"___",r=e[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;r!=o;){if(a++>1e4)throw Error("Circular references in "+e);o=r,r=r.replace(i,s)}return r}return e.reduce(function c(f,p){return Array.isArray(p)&&(p=p.reduce(c,"")),f+p},"");function s(c,f){if(e[f]==null)throw Error("Reference "+f+"is undefined");return e[f]}}function CD(e,t){return Array.isArray(e)?e8(e,t):Qz(e,t)}CD.parse=Qz,CD.stringify=e8;var VDe=CD,HDe=ro(VDe);const jDe={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},WDe={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},YDe={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},UDe={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},qDe={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},KDe={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},GDe={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},XDe={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var ru=Object.freeze({__proto__:null,COPY_DESCRIPTION:WDe,COPY_LABEL:jDe,CUT_DESCRIPTION:UDe,CUT_LABEL:YDe,PASTE_DESCRIPTION:KDe,PASTE_LABEL:qDe,SELECT_ALL_DESCRIPTION:XDe,SELECT_ALL_LABEL:GDe});const ZDe={id:"extension.command.set-text-direction.label",message:`{dir, select, ltr {Left-To-Right}
|
|
1293
|
+
`:"";return`${r}${o}For more information visit ${lz}#${e.toLowerCase()}`}var cz=class extends FB.BaseError{constructor({code:e,message:t,disableLogging:n=!1}={}){const r=FTe(e)?e:tn.CUSTOM;super(BTe(r,t)),this.errorCode=r,this.url=`${lz}#${r.toLowerCase()}`,n||console.error(this.message)}static create(e={}){return new cz(e)}};function _n(e,t){if(!e)throw cz.create(t)}function zTe(e){if(typeof e!="object"||e===null)return e;const t=Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Module"?e.default??e:e;return t&&typeof e=="object"&&"__esModule"in t&&t.__esModule&&t.default!==void 0?t.default:t}function Od(e,t={}){return process.env.NODE_ENV==="production"?e:(_n(ii(e)||Fo(e),{message:"`freeze` only supports objects and arrays.",code:tn.CORE_HELPERS}),new Proxy(e,{get:(n,r,o)=>(_n(r in n||!t.requireKeys,{message:`The prop: '${r.toString()}' you are trying to access does not yet exist on the target.`}),Reflect.get(n,r,o)),set:(n,r)=>{_n(!1,{message:`It seems you're trying to set the value of the property (${String(r)}) on a frozen object. For your protection this object does not allow direct mutation.`,code:tn.MUTATION})}}))}function Ci(e){this.content=e}Ci.prototype={constructor:Ci,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return o==-1?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new Ci(i)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Ci(n)},addToStart:function(e,t){return new Ci([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Ci(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(i==-1?o.length:i,0,t,n),new Ci(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Ci.from(e),e.size?new Ci(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Ci.from(e),e.size?new Ci(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Ci.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Ci.from=function(e){if(e instanceof Ci)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ci(t)};function uz(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){let a=uz(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function dz(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=e.child(--o),s=t.child(--i),c=a.nodeSize;if(a==s){n-=c,r-=c;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let f=0,p=Math.min(a.text.length,s.text.length);for(;f<p&&a.text[a.text.length-f-1]==s.text[s.text.length-f-1];)f++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let f=dz(a.content,s.content,n-1,r-1);if(f)return f}n-=c,r-=c}}class Ht{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,o=0,i){for(let a=0,s=0;s<n;a++){let c=this.content[a],f=s+c.nodeSize;if(f>t&&r(c,o+s,i||null,a)!==!1&&c.content.size){let p=s+1;c.nodesBetween(Math.max(0,t-p),Math.min(c.content.size,n-p),r,o+p)}s=f}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",a=!0;return this.nodesBetween(t,n,(s,c)=>{let f=s.isText?s.text.slice(Math.max(t,c)-c,n-c):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=f},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new Ht(o,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],o=0;if(n>t)for(let i=0,a=0;a<n;i++){let s=this.content[i],c=a+s.nodeSize;c>t&&((a<t||c>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=c}return new Ht(r,o)}cutByIndex(t,n){return t==n?Ht.empty:t==0&&n==this.content.length?this:new Ht(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new Ht(o,i)}addToStart(t){return new Ht([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Ht(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];t(o,r,n),r+=o.nodeSize}}findDiffStart(t,n=0){return uz(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return dz(this,t,n,r)}findIndex(t,n=-1){if(t==0)return v1(0,t);if(t==this.size)return v1(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=t)return a==t||n>0?v1(r+1,a):v1(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Ht.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ht(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Ht.empty;let n,r=0;for(let o=0;o<t.length;o++){let i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Ht(n||t,r)}static from(t){if(!t)return Ht.empty;if(t instanceof Ht)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Ht([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ht.empty=new Ht([],0);const rD={index:0,offset:0};function v1(e,t){return rD.index=e,rD.offset=t,rD}function b1(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!b1(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!b1(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class vr{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(this.eq(i))return t;if(this.type.excludes(i.type))n||(n=t.slice(0,o));else{if(i.type.excludes(this.type))return t;!r&&i.type.rank>this.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&b1(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return vr.none;if(t instanceof vr)return[t];let n=t.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}}vr.none=[];class y1 extends Error{}class gn{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=hz(this.content,t+this.openStart,n);return r&&new gn(r,this.openStart,this.openEnd)}removeBetween(t,n){return new gn(fz(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return gn.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new gn(Ht.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new gn(t,r,o)}}gn.empty=new gn(Ht.empty,0,0);function fz(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(o==t||i.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(fz(i.content,t-o-1,n-o-1)))}function hz(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),a=e.maybeChild(o);if(i==t||a.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=hz(a.content,t-i-1,n);return s&&e.replaceChild(o,a.copy(s))}function VTe(e,t,n){if(n.openStart>e.depth)throw new y1("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new y1("Inconsistent open depths");return pz(e,t,n,0)}function pz(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let a=pz(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Pd(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=HTe(n,e);return Pd(i,gz(e,a,s,t,r))}else return Pd(i,x1(e,t,r))}function mz(e,t){if(!t.type.compatibleContent(e.type))throw new y1("Cannot join "+t.type.name+" onto "+e.type.name)}function oD(e,t,n){let r=e.node(n);return mz(r,t.node(n)),r}function Md(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function iv(e,t,n,r){let o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Md(e.nodeAfter,r),i++));for(let s=i;s<a;s++)Md(o.child(s),r);t&&t.depth==n&&t.textOffset&&Md(t.nodeBefore,r)}function Pd(e,t){return e.type.checkContent(t),e.copy(t)}function gz(e,t,n,r,o){let i=e.depth>o&&oD(e,t,o+1),a=r.depth>o&&oD(n,r,o+1),s=[];return iv(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(mz(i,a),Md(Pd(i,gz(e,t,n,r,o+1)),s)):(i&&Md(Pd(i,x1(e,t,o+1)),s),iv(t,n,o,s),a&&Md(Pd(a,x1(n,r,o+1)),s)),iv(r,null,o,s),new Ht(s)}function x1(e,t,n){let r=[];if(iv(null,e,n,r),e.depth>n){let o=oD(e,t,n+1);Md(Pd(o,x1(e,t,n+1)),r)}return iv(t,null,n,r),new Ht(r)}function HTe(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(Ht.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class Lp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<t;i++)o+=r.child(i).nodeSize;return o}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return vr.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),o=t.maybeChild(n);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=t.parent.maybeChild(t.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Nd(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=t;;){let{index:s,offset:c}=a.content.findIndex(i),f=i-c;if(r.push(a,s,o+c),!f||(a=a.child(s),a.isText))break;i=f-1,o+=c+1}return new Lp(n,r,i)}static resolveCached(t,n){for(let o=0;o<iD.length;o++){let i=iD[o];if(i.pos==n&&i.doc==t)return i}let r=iD[aD]=Lp.resolve(t,n);return aD=(aD+1)%jTe,r}}let iD=[],aD=0,jTe=12;class Nd{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const WTe=Object.create(null);let nu=class cM{constructor(t,n,r,o=vr.none){this.type=t,this.attrs=n,this.marks=o,this.content=r||Ht.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,o=0){this.content.nodesBetween(t,n,r,o,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,o){return this.content.textBetween(t,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&b1(this.attrs,n||t.defaultAttrs||WTe)&&vr.sameSet(this.marks,r||vr.none)}copy(t=null){return t==this.content?this:new cM(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new cM(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return gn.empty;let o=this.resolve(t),i=this.resolve(n),a=r?0:o.sharedDepth(n),s=o.start(a),f=o.node(a).content.cut(o.pos-s,i.pos-s);return new gn(f,o.depth-a,i.depth-a)}replace(t,n,r){return VTe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(o==t||n.isText)return n;t-=o+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(t){return Lp.resolveCached(this,t)}resolveNoCache(t){return Lp.resolve(this,t)}rangeHasMark(t,n,r){let o=!1;return n>t&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),vz(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Ht.empty,o=0,i=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let c=o;c<i;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(t,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(t).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=vr.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!vr.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=Ht.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};nu.prototype.text=void 0;class qw extends nu{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):vz(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new qw(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new qw(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function vz(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class af{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new YTe(t,n);if(r.next==null)return af.empty;let o=bz(r);r.next&&r.err("Unexpected trailing text");let i=JTe(ZTe(o));return QTe(i,r),i}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(t.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let o=[this];function i(a,s){let c=a.matchFragment(t,r);if(c&&(!n||c.validEnd))return Ht.from(s.map(f=>f.createAndFill()));for(let f=0;f<a.next.length;f++){let{type:p,next:m}=a.next[f];if(!(p.isText||p.hasRequiredAttrs())&&o.indexOf(m)==-1){o.push(m);let v=i(m,s.concat(p));if(v)return v}}return null}return i(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(t)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:c}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o<r.next.length;o++)t.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),t.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return i}).join(`
|
|
1294
|
+
`)}}af.empty=new af(!0);class YTe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function bz(e){let t=[];do t.push(UTe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function UTe(e){let t=[];do t.push(qTe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function qTe(e){let t=XTe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=KTe(e,t);else break;return t}function yz(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function KTe(e,t){let n=yz(e),r=n;return e.eat(",")&&(e.next!="}"?r=yz(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function GTe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function XTe(e){if(e.eat("(")){let t=bz(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=GTe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function ZTe(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,c){let f={term:c,to:s};return t[a].push(f),f}function o(a,s){a.forEach(c=>c.to=s)}function i(a,s){if(a.type=="choice")return a.exprs.reduce((c,f)=>c.concat(i(f,s)),[]);if(a.type=="seq")for(let c=0;;c++){let f=i(a.exprs[c],s);if(c==a.exprs.length-1)return f;o(f,s=n())}else if(a.type=="star"){let c=n();return r(s,c),o(i(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return o(i(a.expr,s),c),o(i(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(s)].concat(i(a.expr,s));if(a.type=="range"){let c=s;for(let f=0;f<a.min;f++){let p=n();o(i(a.expr,c),p),c=p}if(a.max==-1)o(i(a.expr,c),c);else for(let f=a.min;f<a.max;f++){let p=n();r(c,p),o(i(a.expr,c),p),c=p}return[r(c)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function xz(e,t){return t-e}function wz(e,t){let n=[];return r(t),n.sort(xz);function r(o){let i=e[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let a=0;a<i.length;a++){let{term:s,to:c}=i[a];!s&&n.indexOf(c)==-1&&r(c)}}}function JTe(e){let t=Object.create(null);return n(wz(e,0));function n(r){let o=[];r.forEach(a=>{e[a].forEach(({term:s,to:c})=>{if(!s)return;let f;for(let p=0;p<o.length;p++)o[p][0]==s&&(f=o[p][1]);wz(e,c).forEach(p=>{f||o.push([s,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let i=t[r.join(",")]=new af(r.indexOf(e.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(xz);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}function QTe(e,t){for(let n=0,r=[e];n<r.length;n++){let o=r[n],i=!o.validEnd,a=[];for(let s=0;s<o.next.length;s++){let{type:c,next:f}=o.next[s];a.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),r.indexOf(f)==-1&&r.push(f)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Cz(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Sz(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(o===void 0){let i=e[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function kz(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new eDe(e[n]);return t}let sD=class vW{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=kz(r.attrs),this.defaultAttrs=Cz(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==af.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Sz(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new nu(this,this.computeAttrs(t),Ht.from(n),vr.setFrom(r))}createChecked(t=null,n,r){return n=Ht.from(n),this.checkContent(n),new nu(this,this.computeAttrs(t),n,vr.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Ht.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Ht.empty,!0);return i?new nu(this,t,n.append(i),vr.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:vr.none:t}static compile(t,n){let r=Object.create(null);t.forEach((i,a)=>r[i]=new vW(i,n,a));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class eDe{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class bb{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=kz(o.attrs),this.excluded=null;let i=Cz(this.attrs);this.instance=i?new vr(this,i):null}create(t=null){return!t&&this.instance?this.instance:new vr(this,Sz(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,a)=>r[i]=new bb(i,o++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}let tDe=class{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Ci.from(t.nodes),n.marks=Ci.from(t.marks||{}),this.nodes=sD.compile(this.spec.nodes,this),this.marks=bb.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=r[a]||(r[a]=af.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=s=="_"?null:s?Ez(this,s.split(" ")):s==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:Ez(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof sD){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new qw(r,r.defaultAttrs,t,vr.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return nu.fromJSON(this,t)}markFromJSON(t){return vr.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Ez(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(let s in e.marks){let c=e.marks[s];(o=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}let lD=class uM{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new Oz(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Oz(this,n,!0);return r.addAll(t,n.from,n.to),gn.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(oDe(t,i.tag)&&(i.namespace===void 0||t.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(t,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let a=this.styles[i],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let c=a.getAttrs(n);if(c===!1)continue;a.attrs=c||void 0}return a}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<i)break}n.splice(a,0,o)}for(let o in t.marks){let i=t.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Mz(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Mz(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new uM(t,uM.schemaRules(t)))}};const Tz={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},nDe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dz={ol:!0,ul:!0},w1=1,C1=2,av=4;function Az(e,t,n){return t!=null?(t?w1:0)|(t==="full"?C1:0):e&&e.whitespace=="pre"?w1|C1:n&~av}class S1{constructor(t,n,r,o,i,a,s){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=vr.none,this.stashMarks=[],this.match=a||(s&av?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ht.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&w1)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Ht.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ht.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let o=r[n];(this.type?this.type.allowsMarkType(o.type):aDe(o.type,t))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Tz.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Oz{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let o=n.topNode,i,a=Az(null,n.preserveWhitespace,0)|(r?av:0);o?i=new S1(o.type,o.attrs,vr.none,vr.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new S1(null,null,vr.none,vr.none,!0,null,a):i=new S1(t.schema.topNodeType,null,vr.none,vr.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){t.nodeType==3?this.addTextNode(t):t.nodeType==1&&this.addElement(t)}withStyleRules(t,n){let r=t.getAttribute("style");if(!r)return n();let o=this.readStyles(iDe(r));if(!o)return;let[i,a]=o,s=this.top;for(let c=0;c<a.length;c++)this.removePendingMark(a[c],s);for(let c=0;c<i.length;c++)this.addPendingMark(i[c]);n();for(let c=0;c<i.length;c++)this.removePendingMark(i[c],s);for(let c=0;c<a.length;c++)this.addPendingMark(a[c])}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&C1||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&w1)r.options&C1?n=n.replace(/\r\n?/g,`
|
|
1295
|
+
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],i=t.previousSibling;(!o||i&&i.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),o;Dz.hasOwnProperty(r)&&this.parser.normalizeLists&&rDe(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,n));if(i?i.ignore:nDe.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let a,s=this.top,c=this.needsBlock;if(Tz.hasOwnProperty(r))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),a=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}i&&i.skip?this.addAll(t):this.withStyleRules(t,()=>this.addAll(t)),a&&this.sync(s),this.needsBlock=c}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
1296
|
+
`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=vr.none,r=vr.none;for(let o=0;o<t.length;o+=2)for(let i=void 0;;){let a=this.parser.matchStyle(t[o],t[o+1],this,i);if(!a)break;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(s=>{a.clearMark(s)&&(r=s.addToSet(r))}):n=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),a.consuming===!1)i=a;else break}return[n,r]}addElementByRule(t,n,r){let o,i,a;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}o&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],a=i.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=i,!a.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;o<n.length;o++)this.enterInner(n[o],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let o=0;o<t.marks.length;o++)(!n.type||n.type.allowsMarkType(t.marks[o].type))&&(r=t.marks[o].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let o=this.findPlace(t.create(n));return o&&this.enterInner(t,n,!0,r),o}enterInner(t,n=null,r=!1,o){this.closeExtra();let i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t);let a=Az(t,o,i.options);i.options&av&&i.content.length==0&&(a|=av),this.nodes.push(new S1(t,n,i.activeMarks,i.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&t.nodeType==1&&t.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=(s,c)=>{for(;s>=0;s--){let f=n[s];if(f==""){if(s==n.length-1||s==0)continue;for(;c>=i;c--)if(a(s-1,c))return!0;return!1}else{let p=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!p||p.name!=f&&p.groups.indexOf(f)==-1)return!1;c--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=sDe(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let a=o.popFromStashMark(t);a&&o.type&&o.type.allowsMarkType(a.type)&&(o.activeMarks=a.addToSet(o.activeMarks))}if(o==n)break}}}function rDe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&Dz.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function oDe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function iDe(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function Mz(e){let t={};for(let n in e)t[n]=e[n];return t}function aDe(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],a=s=>{i.push(s);for(let c=0;c<s.edgeCount;c++){let{type:f,next:p}=s.edge(c);if(f==t||i.indexOf(p)<0&&a(p))return!0}};if(a(o.contentMatch))return!0}}function sDe(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class $s{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=cD(n).createDocumentFragment());let o=r,i=[];return t.forEach(a=>{if(i.length||a.marks.length){let s=0,c=0;for(;s<i.length&&c<a.marks.length;){let f=a.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(i[s][0])||f.type.spec.spanning===!1)break;s++,c++}for(;s<i.length;)o=i.pop()[1];for(;c<a.marks.length;){let f=a.marks[c++],p=this.serializeMark(f,a.isInline,n);p&&(i.push([f,o]),o.appendChild(p.dom),o=p.contentDOM||p.dom)}}o.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:o}=$s.renderSpec(cD(n),this.nodes[t.type.name](t));if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,o)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let o=t.marks.length-1;o>=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&$s.renderSpec(cD(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let a,s=r?t.createElementNS(r,o):t.createElement(o),c=n[1],f=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){f=2;for(let p in c)if(c[p]!=null){let m=p.indexOf(" ");m>0?s.setAttributeNS(p.slice(0,m),p.slice(m+1),c[p]):s.setAttribute(p,c[p])}}for(let p=f;p<n.length;p++){let m=n[p];if(m===0){if(p<n.length-1||p>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}else{let{dom:v,contentDOM:y}=$s.renderSpec(t,m,r);if(s.appendChild(v),y){if(a)throw new RangeError("Multiple content holes");a=y}}}return{dom:s,contentDOM:a}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new $s(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Pz(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Pz(t.marks)}}function Pz(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function cD(e){return e.document||window.document}const Nz=65535,_z=Math.pow(2,16);function lDe(e,t){return e+t*_z}function Rz(e){return e&Nz}function cDe(e){return(e-(e&Nz))/_z}const Iz=1,Lz=2,k1=4,$z=8;class uD{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$z)>0}get deletedBefore(){return(this.delInfo&(Iz|k1))>0}get deletedAfter(){return(this.delInfo&(Lz|k1))>0}get deletedAcross(){return(this.delInfo&k1)>0}}class Oa{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Oa.empty)return Oa.empty}recover(t){let n=0,r=Rz(t);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+cDe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let o=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?o:0);if(c>t)break;let f=this.ranges[s+i],p=this.ranges[s+a],m=c+f;if(t<=m){let v=f?t==c?-1:t==m?1:n:n,y=c+o+(v<0?0:p);if(r)return y;let w=t==(n<0?c:m)?null:lDe(s/3,t-c),C=t==c?Lz:t==m?Iz:k1;return(n<0?t!=c:t!=m)&&(C|=$z),new uD(y,C,w)}o+=p-f}return r?t+o:new uD(t+o,0,null)}touches(t,n){let r=0,o=Rz(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?r:0);if(c>t)break;let f=this.ranges[s+i],p=c+f;if(t<=p&&s==o*3)return!0;r+=this.ranges[s+a]-f}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let a=this.ranges[o],s=a-(this.inverted?i:0),c=a+(this.inverted?0:i),f=this.ranges[o+n],p=this.ranges[o+r];t(s,s+f,c,c+p),i+=p-f}}invert(){return new Oa(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Oa.empty:new Oa(t<0?[0,-t,0]:[0,0,t])}}Oa.empty=new Oa([]);class $p{constructor(t=[],n,r=0,o=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=o}slice(t=0,n=this.maps.length){return new $p(this.maps,this.mirror,t,n)}copy(){return new $p(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let o=t.getMirror(n);this.appendMap(t.maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new $p;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this.maps[i],s=a.mapResult(t,n);if(s.recover!=null){let c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,t=this.maps[c].recover(s.recover);continue}}o|=s.delInfo,t=s.pos}return r?t:new uD(t,o,null)}}const dD=Object.create(null);class ei{getMap(){return Oa.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=dD[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in dD)throw new RangeError("Duplicate use of step JSON ID "+t);return dD[t]=n,n.prototype.jsonID=t,n}}class zo{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new zo(t,null)}static fail(t){return new zo(null,t)}static fromReplace(t,n,r,o){try{return zo.ok(t.replace(n,r,o))}catch(i){if(i instanceof y1)return zo.fail(i.message);throw i}}}function fD(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(fD(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return Ht.fromArray(r)}class xc extends ei{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new gn(fD(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),n.openStart,n.openEnd);return zo.fromReplace(t,this.from,this.to,i)}invert(){return new Fs(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new xc(n.pos,r.pos,this.mark)}merge(t){return t instanceof xc&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new xc(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new xc(n.from,n.to,t.markFromJSON(n.mark))}}ei.jsonID("addMark",xc);class Fs extends ei{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new gn(fD(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return zo.fromReplace(t,this.from,this.to,r)}invert(){return new xc(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Fs(n.pos,r.pos,this.mark)}merge(t){return t instanceof Fs&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Fs(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Fs(n.from,n.to,t.markFromJSON(n.mark))}}ei.jsonID("removeMark",Fs);class _u extends ei{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zo.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return zo.fromReplace(t,this.pos,this.pos+1,new gn(Ht.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new _u(this.pos,n.marks[o]);return new _u(this.pos,this.mark)}}return new Fp(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new _u(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new _u(n.pos,t.markFromJSON(n.mark))}}ei.jsonID("addNodeMark",_u);class Fp extends ei{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zo.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return zo.fromReplace(t,this.pos,this.pos+1,new gn(Ht.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new _u(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Fp(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Fp(n.pos,t.markFromJSON(n.mark))}}ei.jsonID("removeNodeMark",Fp);class di extends ei{constructor(t,n,r,o=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=o}apply(t){return this.structure&&hD(t,this.from,this.to)?zo.fail("Structure replace would overwrite content"):zo.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Oa([this.from,this.to-this.from,this.slice.size])}invert(t){return new di(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new di(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof di)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?gn.empty:new gn(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new di(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?gn.empty:new gn(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new di(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new di(n.from,n.to,gn.fromJSON(t,n.slice),!!n.structure)}}ei.jsonID("replace",di);class Bo extends ei{constructor(t,n,r,o,i,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(t){if(this.structure&&(hD(t,this.from,this.gapFrom)||hD(t,this.gapTo,this.to)))return zo.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return zo.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?zo.fromReplace(t,this.from,this.to,r):zo.fail("Content does not fit in gap")}getMap(){return new Oa([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Bo(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new Bo(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Bo(n.from,n.to,n.gapFrom,n.gapTo,gn.fromJSON(t,n.slice),n.insert,!!n.structure)}}ei.jsonID("replaceAround",Bo);function hD(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function uDe(e,t,n,r){let o=[],i=[],a,s;e.doc.nodesBetween(t,n,(c,f,p)=>{if(!c.isInline)return;let m=c.marks;if(!r.isInSet(m)&&p.type.allowsMarkType(r.type)){let v=Math.max(f,t),y=Math.min(f+c.nodeSize,n),w=r.addToSet(m);for(let C=0;C<m.length;C++)m[C].isInSet(w)||(a&&a.to==v&&a.mark.eq(m[C])?a.to=y:o.push(a=new Fs(v,y,m[C])));s&&s.to==v?s.to=y:i.push(s=new xc(v,y,r))}}),o.forEach(c=>e.step(c)),i.forEach(c=>e.step(c))}function dDe(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(a,s)=>{if(!a.isInline)return;i++;let c=null;if(r instanceof bb){let f=a.marks,p;for(;p=r.isInSet(f);)(c||(c=[])).push(p),f=p.removeFromSet(f)}else r?r.isInSet(a.marks)&&(c=[r]):c=a.marks;if(c&&c.length){let f=Math.min(s+a.nodeSize,n);for(let p=0;p<c.length;p++){let m=c[p],v;for(let y=0;y<o.length;y++){let w=o[y];w.step==i-1&&m.eq(o[y].style)&&(v=w)}v?(v.to=f,v.step=i):o.push({style:m,from:Math.max(s,t),to:f,step:i})}}}),o.forEach(a=>e.step(new Fs(a.from,a.to,a.style)))}function fDe(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],a=t+1;for(let s=0;s<o.childCount;s++){let c=o.child(s),f=a+c.nodeSize,p=r.matchType(c.type);if(!p)i.push(new di(a,f,gn.empty));else{r=p;for(let m=0;m<c.marks.length;m++)n.allowsMarkType(c.marks[m].type)||e.step(new Fs(a,f,c.marks[m]));if(c.isText&&!n.spec.code){let m,v=/\r?\n|\r/g,y;for(;m=v.exec(c.text);)y||(y=new gn(Ht.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),i.push(new di(a+m.index,a+m.index+m[0].length,y))}}a=f}if(!r.validEnd){let s=r.fillBefore(Ht.empty,!0);e.replace(a,a,new gn(s,0,0))}for(let s=i.length-1;s>=0;s--)e.step(i[s])}function hDe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function qh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&o.canReplace(i,a,n))return r;if(r==0||o.type.spec.isolating||!hDe(o,i,a))break}return null}function pDe(e,t,n){let{$from:r,$to:o,depth:i}=t,a=r.before(i+1),s=o.after(i+1),c=a,f=s,p=Ht.empty,m=0;for(let w=i,C=!1;w>n;w--)C||r.index(w)>0?(C=!0,p=Ht.from(r.node(w).copy(p)),m++):c--;let v=Ht.empty,y=0;for(let w=i,C=!1;w>n;w--)C||o.after(w+1)<o.end(w)?(C=!0,v=Ht.from(o.node(w).copy(v)),y++):f++;e.step(new Bo(c,f,a,s,new gn(p.append(v),m,y),p.size-m,!0))}function pD(e,t,n=null,r=e){let o=mDe(e,t),i=o&&gDe(r,t);return i?o.map(Fz).concat({type:t,attrs:n}).concat(i.map(Fz)):null}function Fz(e){return{type:e,attrs:null}}function mDe(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function gDe(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;let c=(a.length?a[a.length-1]:t).contentMatch;for(let f=r;c&&f<o;f++)c=c.matchType(n.child(f).type);return!c||!c.validEnd?null:a}function vDe(e,t,n){let r=Ht.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let s=n[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ht.from(n[a].type.create(n[a].attrs,r))}let o=t.start,i=t.end;e.step(new Bo(o,i,o,i,new gn(r,0,0),n.length,!0))}function bDe(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(a,s)=>{if(a.isTextblock&&!a.hasMarkup(r,o)&&yDe(e.doc,e.mapping.slice(i).map(s),r)){e.clearIncompatible(e.mapping.slice(i).map(s,1),r);let c=e.mapping.slice(i),f=c.map(s,1),p=c.map(s+a.nodeSize,1);return e.step(new Bo(f,p,f+1,p-1,new gn(Ht.from(r.create(o,null,a.marks)),0,0),1,!0)),!1}})}function yDe(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function xDe(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Bo(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new gn(Ht.from(a),0,0),1,!0))}function Kh(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let f=o.depth-1,p=n-2;f>i;f--,p--){let m=o.node(f),v=o.index(f);if(m.type.spec.isolating)return!1;let y=m.content.cutByIndex(v,m.childCount),w=r&&r[p+1];w&&(y=y.replaceChild(0,w.type.create(w.attrs)));let C=r&&r[p]||m;if(!m.canReplace(v+1,m.childCount)||!C.type.validContent(y))return!1}let s=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(s,s,c?c.type:o.node(i+1).type)}function wDe(e,t,n=1,r){let o=e.doc.resolve(t),i=Ht.empty,a=Ht.empty;for(let s=o.depth,c=o.depth-n,f=n-1;s>c;s--,f--){i=Ht.from(o.node(s).copy(i));let p=r&&r[f];a=Ht.from(p?p.type.create(p.attrs,a):o.node(s).copy(a))}e.step(new di(t,t,new gn(i.append(a),n,n),!0))}function sv(e,t){let n=e.resolve(t),r=n.index();return CDe(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function CDe(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function SDe(e,t,n){let r=new di(t-n,t+n,gn.empty,!0);e.step(r)}function Bz(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function kDe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(s>0?1:0),f=r.node(a),p=!1;if(i==1)p=f.canReplace(c,c,o);else{let m=f.contentMatchAt(c).findWrapping(o.firstChild.type);p=m&&f.canReplaceWith(c,c,m[0])}if(p)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function mD(e,t,n=t,r=gn.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return zz(o,i,r)?new di(t,n,r):new EDe(o,i,r).fit()}function zz(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class EDe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Ht.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=Ht.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,a=r.depth,s=o.depth;for(;a&&s&&i.childCount==1;)i=i.firstChild.content,a--,s--;let c=new gn(i,a,s);return t>-1?new Bo(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new di(r.pos,o.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<t;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=gD(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let a=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:c,match:f}=this.frontier[s],p,m=null;if(n==1&&(a?f.matchType(a.type)||(m=f.fillBefore(Ht.from(a),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:s,parent:i,inject:m};if(n==2&&a&&(p=f.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:i,wrap:p};if(i&&f.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=gD(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new gn(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=gD(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new gn(lv(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new gn(lv(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let C=0;C<i.length;C++)this.openFrontierNode(i[C]);let a=this.unplaced,s=r?r.content:a.content,c=a.openStart-t,f=0,p=[],{match:m,type:v}=this.frontier[n];if(o){for(let C=0;C<o.childCount;C++)p.push(o.child(C));m=m.matchFragment(o)}let y=s.size+t-(a.content.size-a.openEnd);for(;f<s.childCount;){let C=s.child(f),k=m.matchType(C.type);if(!k)break;f++,(f>1||c==0||C.content.size)&&(m=k,p.push(Vz(C.mark(v.allowedMarks(C.marks)),f==1?c:0,f==s.childCount?y:-1)))}let w=f==s.childCount;w||(y=-1),this.placed=cv(this.placed,n,Ht.from(p)),this.frontier[n].match=m,w&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let C=0,k=s;C<y;C++){let T=k.lastChild;this.frontier.push({type:T.type,match:T.contentMatchAt(T.childCount)}),k=T.content}this.unplaced=w?t==0?gn.empty:new gn(lv(a.content,t-1,1),t-1,y<0?a.openEnd:t-1):new gn(lv(a.content,t,f),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!vD(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=vD(t,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:c,type:f}=this.frontier[s],p=vD(t,s,f,c,!0);if(!p||p.childCount)continue e}return{depth:n,fit:a,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=cv(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=cv(this.placed,this.depth,Ht.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ht.empty,!0);n.childCount&&(this.placed=cv(this.placed,this.frontier.length,n))}}function lv(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(lv(e.firstChild.content,t-1,n)))}function cv(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(cv(e.lastChild.content,t-1,n)))}function gD(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Vz(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Vz(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Ht.empty,!0)))),e.copy(r)}function vD(e,t,n,r,o){let i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!TDe(n,i.content,a)?s:null}function TDe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function DDe(e){return e.spec.defining||e.spec.definingForContent}function ADe(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(zz(o,i,r))return e.step(new di(t,n,r));let a=jz(o,e.doc.resolve(n));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let v=o.depth,y=o.pos-1;v>0;v--,y--){let w=o.node(v).type.spec;if(w.defining||w.definingAsContext||w.isolating)break;a.indexOf(v)>-1?s=v:o.before(v)==y&&a.splice(1,0,-v)}let c=a.indexOf(s),f=[],p=r.openStart;for(let v=r.content,y=0;;y++){let w=v.firstChild;if(f.push(w),y==r.openStart)break;v=w.content}for(let v=p-1;v>=0;v--){let y=f[v],w=DDe(y.type);if(w&&!y.sameMarkup(o.node(Math.abs(s)-1)))p=v;else if(w||!y.type.isTextblock)break}for(let v=r.openStart;v>=0;v--){let y=(v+p+1)%(r.openStart+1),w=f[y];if(w)for(let C=0;C<a.length;C++){let k=a[(C+c)%a.length],T=!0;k<0&&(T=!1,k=-k);let E=o.node(k-1),_=o.index(k-1);if(E.canReplaceWith(_,_,w.type,w.marks))return e.replace(o.before(k),T?i.after(k):n,new gn(Hz(r.content,0,r.openStart,y),y,r.openEnd))}}let m=e.steps.length;for(let v=a.length-1;v>=0&&(e.replace(t,n,r),!(e.steps.length>m));v--){let y=a[v];y<0||(t=o.before(y),n=i.after(y))}}function Hz(e,t,n,r,o){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(Hz(i.content,t+1,n,r,i)))}if(t>r){let i=o.contentMatchAt(0),a=i.fillBefore(e).append(e);e=a.append(i.matchFragment(a).fillBefore(Ht.empty,!0))}return e}function ODe(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=Bz(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new gn(Ht.from(r),0,0))}function MDe(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=jz(r,o);for(let a=0;a<i.length;a++){let s=i[a],c=a==i.length-1;if(c&&s==0||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(c||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&o.end(a)-n!=o.depth-a)return e.delete(r.before(a),n);e.delete(t,n)}function jz(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(i<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Bp extends ei{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return zo.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return zo.fromReplace(t,this.pos,this.pos+1,new gn(Ht.from(o),0,n.isLeaf?0:1))}getMap(){return Oa.empty}invert(t){return new Bp(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Bp(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Bp(n.pos,n.attr,n.value)}}ei.jsonID("attr",Bp);class yb extends ei{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return zo.ok(r)}getMap(){return Oa.empty}invert(t){return new yb(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new yb(n.attr,n.value)}}ei.jsonID("docAttr",yb);let Gh=class extends Error{};Gh=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},Gh.prototype=Object.create(Error.prototype),Gh.prototype.constructor=Gh,Gh.prototype.name="TransformError";class PDe{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new $p}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Gh(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=gn.empty){let o=mD(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new gn(Ht.from(r),0,0))}delete(t,n){return this.replace(t,n,gn.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return ADe(this,t,n,r),this}replaceRangeWith(t,n,r){return ODe(this,t,n,r),this}deleteRange(t,n){return MDe(this,t,n),this}lift(t,n){return pDe(this,t,n),this}join(t,n=1){return SDe(this,t,n),this}wrap(t,n){return vDe(this,t,n),this}setBlockType(t,n=t,r,o=null){return bDe(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return xDe(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Bp(t,n,r)),this}setDocAttribute(t,n){return this.step(new yb(t,n)),this}addNodeMark(t,n){return this.step(new _u(t,n)),this}removeNodeMark(t,n){if(!(n instanceof vr)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Fp(t,n)),this}split(t,n=1,r){return wDe(this,t,n,r),this}addMark(t,n,r){return uDe(this,t,n,r),this}removeMark(t,n,r){return dDe(this,t,n,r),this}clearIncompatible(t,n,r){return fDe(this,t,n,r),this}}const bD=Object.create(null);class ur{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new NDe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=gn.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let i=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:c,$to:f}=a[s],p=t.mapping.slice(i);t.replaceRange(p.map(c.pos),p.map(f.pos),s?gn.empty:n),s==0&&Uz(t,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],c=t.mapping.slice(r),f=c.map(a.pos),p=c.map(s.pos);i?t.deleteRange(f,p):(t.replaceRangeWith(f,p,n),Uz(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let o=t.parent.inlineContent?new Vn(t):Xh(t.node(0),t.parent,t.pos,t.index(),n,r);if(o)return o;for(let i=t.depth-1;i>=0;i--){let a=n<0?Xh(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):Xh(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new qi(t.node(0))}static atStart(t){return Xh(t,t,0,0,1)||new qi(t)}static atEnd(t){return Xh(t,t,t.content.size,t.childCount,-1)||new qi(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=bD[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in bD)throw new RangeError("Duplicate use of selection JSON ID "+t);return bD[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Vn.between(this.$anchor,this.$head).getBookmark()}}ur.prototype.visible=!0;class NDe{constructor(t,n){this.$from=t,this.$to=n}}let Wz=!1;function Yz(e){!Wz&&!e.parent.inlineContent&&(Wz=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Vn extends ur{constructor(t,n=t){Yz(t),Yz(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ur.near(r);let o=t.resolve(n.map(this.anchor));return new Vn(o.parent.inlineContent?o:r,r)}replace(t,n=gn.empty){if(super.replace(t,n),n==gn.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Vn&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Kw(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Vn(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=ur.findFrom(n,r,!0)||ur.findFrom(n,-r,!0);if(i)n=i.$head;else return ur.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(ur.findFrom(t,-r,!0)||ur.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=o<0&&(t=n))),new Vn(t,n)}}ur.jsonID("text",Vn);class Kw{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Kw(t.map(this.anchor),t.map(this.head))}resolve(t){return Vn.between(t.resolve(this.anchor),t.resolve(this.head))}}class zn extends ur{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=t.resolve(o);return r?ur.near(i):new zn(i)}content(){return new gn(Ht.from(this.node),0,0)}eq(t){return t instanceof zn&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new dM(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new zn(t.resolve(n.anchor))}static create(t,n){return new zn(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}zn.prototype.visible=!1,ur.jsonID("node",zn);class dM{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Kw(r,r):new dM(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&zn.isSelectable(r)?new zn(n):ur.near(n)}}class qi extends ur{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=gn.empty){if(n==gn.empty){t.delete(0,t.doc.content.size);let r=ur.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new qi(t)}map(t){return new qi(t)}eq(t){return t instanceof qi}getBookmark(){return _De}}ur.jsonID("all",qi);const _De={map(){return this},resolve(e){return new qi(e)}};function Xh(e,t,n,r,o,i=!1){if(t.inlineContent)return Vn.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let s=t.child(a);if(s.isAtom){if(!i&&zn.isSelectable(s))return zn.create(e,n-(o<0?s.nodeSize:0))}else{let c=Xh(e,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}return null}function Uz(e,t,n){let r=e.steps.length-1;if(r<t)return;let o=e.steps[r];if(!(o instanceof di||o instanceof Bo))return;let i=e.mapping.maps[r],a;i.forEach((s,c,f,p)=>{a==null&&(a=p)}),e.setSelection(ur.near(e.doc.resolve(a),n))}const qz=1,E1=2,Kz=4;class RDe extends PDe{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|qz)&~E1,this.storedMarks=null,this}get selectionSet(){return(this.updated&qz)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=E1,this}ensureMarks(t){return vr.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&E1)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~E1,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||vr.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(ur.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Kz,this}get scrolledIntoView(){return(this.updated&Kz)>0}}function Gz(e,t){return!t||!e?e:e.bind(t)}class uv{constructor(t,n,r){this.name=t,this.init=Gz(n.init,r),this.apply=Gz(n.apply,r)}}const IDe=[new uv("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new uv("selection",{init(e,t){return e.selection||ur.atStart(t.doc)},apply(e){return e.selection}}),new uv("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new uv("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class yD{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=IDe.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new uv(r.key,r.spec.state,r))})}}class sf{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),o=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let c=o?o[a].n:0,f=o?o[a].state:this,p=c<n.length&&s.spec.appendTransaction.call(s,c?n.slice(c):n,f,r);if(p&&r.filterTransaction(p,a)){if(p.setMeta("appendedTransaction",t),!o){o=[];for(let m=0;m<this.config.plugins.length;m++)o.push(m<a?{state:r,n:n.length}:{state:this,n:0})}n.push(p),r=r.applyInner(p),i=!0}o&&(o[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new sf(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new RDe(this)}static create(t){let n=new yD(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new sf(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}reconfigure(t){let n=new yD(this.schema,t.plugins),r=n.fields,o=new sf(n);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new yD(t.schema,t.plugins),i=new sf(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=nu.fromJSON(t.schema,n.doc);else if(a.name=="selection")i.selection=ur.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let c=r[s],f=c.spec.state;if(c.key==a.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){i[a.name]=f.fromJSON.call(c,t,n[s],i);return}}i[a.name]=a.init(t,i)}}),i}}function Xz(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=Xz(o,t,{})),n[r]=o}return n}class rc{constructor(t){this.spec=t,this.props={},t.props&&Xz(t.props,this,this.props),this.key=t.key?t.key.key:Zz("plugin")}getState(t){return t[this.key]}}const xD=Object.create(null);function Zz(e){return e in xD?e+"$"+ ++xD[e]:(xD[e]=0,e+"$")}class _d{constructor(t="key"){this.key=Zz(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}var LDe=/[A-Z]/g,$De=/^ms-/,wD={};function FDe(e){return"-"+e.toLowerCase()}function BDe(e){if(wD.hasOwnProperty(e))return wD[e];var t=e.replace(LDe,FDe);return wD[e]=$De.test(t)?"-"+t:t}function zDe(e){return BDe(e)}function VDe(e,t){return zDe(e)+":"+t}function HDe(e){var t="";for(var n in e){var r=e[n];typeof r!="string"&&typeof r!="number"||(t&&(t+=";"),t+=VDe(n,r))}return t}function Jz(){return typeof document<"u"?document:null}function Qz(e,t){if(typeof e!="string")return[e];var n=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],o=t.escape||"___",i=!!t.flat;r.forEach(function(c){var f=new RegExp(["\\",c[0],"[^\\",c[0],"\\",c[1],"]*\\",c[1]].join("")),p=[];function m(v,y,w){var C=n.push(v.slice(c[0].length,-c[1].length))-1;return p.push(C),o+C+o}n.forEach(function(v,y){for(var w,C=0;v!=w;)if(w=v,v=v.replace(f,m),C++>1e4)throw Error("References have circular dependency. Please, check them.");n[y]=v}),p=p.reverse(),n=n.map(function(v){return p.forEach(function(y){v=v.replace(new RegExp("(\\"+o+y+"\\"+o+")","g"),c[0]+"$1"+c[1])}),v})});var a=new RegExp("\\"+o+"([0-9]+)\\"+o);function s(c,f,p){for(var m=[],v,y=0;v=a.exec(c);){if(y++>1e4)throw Error("Circular references in parenthesis");m.push(c.slice(0,v.index)),m.push(s(f[v[1]],f)),c=c.slice(v.index+v[0].length)}return m.push(c),m}return i?n:s(n[0],n)}function e8(e,t){if(t&&t.flat){var n=t&&t.escape||"___",r=e[0],o;if(!r)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),a=0;r!=o;){if(a++>1e4)throw Error("Circular references in "+e);o=r,r=r.replace(i,s)}return r}return e.reduce(function c(f,p){return Array.isArray(p)&&(p=p.reduce(c,"")),f+p},"");function s(c,f){if(e[f]==null)throw Error("Reference "+f+"is undefined");return e[f]}}function CD(e,t){return Array.isArray(e)?e8(e,t):Qz(e,t)}CD.parse=Qz,CD.stringify=e8;var jDe=CD,WDe=ro(jDe);const YDe={id:"extension.command.copy.label",message:"Copy",comment:"Label for copy command."},UDe={id:"extension.command.copy.description",message:"Copy the selected text",comment:"Description for copy command."},qDe={id:"extension.command.cut.label",message:"Cut",comment:"Label for cut command."},KDe={id:"extension.command.cut.description",message:"Cut the selected text",comment:"Description for cut command."},GDe={id:"extension.command.paste.label",message:"Paste",comment:"Label for paste command."},XDe={id:"extension.command.paste.description",message:"Paste content into the editor",comment:"Description for paste command."},ZDe={id:"extension.command.select-all.label",message:"Select all",comment:"Label for select all command."},JDe={id:"extension.command.select-all.description",message:"Select all content within the editor",comment:"Description for select all command."};var ru=Object.freeze({__proto__:null,COPY_DESCRIPTION:UDe,COPY_LABEL:YDe,CUT_DESCRIPTION:KDe,CUT_LABEL:qDe,PASTE_DESCRIPTION:XDe,PASTE_LABEL:GDe,SELECT_ALL_DESCRIPTION:JDe,SELECT_ALL_LABEL:ZDe});const QDe={id:"extension.command.set-text-direction.label",message:`{dir, select, ltr {Left-To-Right}
|
|
1297
1297
|
rtl {Right-To-Left}
|
|
1298
|
-
other {Reset Direction}}`,comment:"Label for setting the text direction."},
|
|
1298
|
+
other {Reset Direction}}`,comment:"Label for setting the text direction."},eAe={id:"extension.command.set-text-direction.description",message:`{dir, select, ltr {Set the text direction from left to right}
|
|
1299
1299
|
rtl {Set the text direction from right to left}
|
|
1300
|
-
other {Reset text direction}}`,comment:"Description for setting the text direction."};var t8=Object.freeze({__proto__:null,DESCRIPTION:
|
|
1300
|
+
other {Reset text direction}}`,comment:"Description for setting the text direction."};var t8=Object.freeze({__proto__:null,DESCRIPTION:eAe,LABEL:QDe});const tAe={id:"extension.command.toggle-blockquote.label",message:"Blockquote",comment:"Label for blockquote formatting command."},nAe={id:"extension.command.toggle-blockquote.description",message:"Add blockquote formatting to the selected text",comment:"Description for blockquote formatting command."};var n8=Object.freeze({__proto__:null,DESCRIPTION:nAe,LABEL:tAe});const rAe={id:"extension.command.toggle-bold.label",message:"Bold",comment:"Label for bold formatting command."},oAe={id:"extension.command.toggle-bold.description",message:"Add bold formatting to the selected text",comment:"Description for bold formatting command."};var r8=Object.freeze({__proto__:null,DESCRIPTION:oAe,LABEL:rAe});const iAe={id:"extension.command.toggle-code-block.label",message:"Codeblock",comment:"Label for the code block command."},aAe={id:"extension.command.toggle-code-block.description",message:"Add a code block",comment:"Description for the code block command."};var sAe=Object.freeze({__proto__:null,DESCRIPTION:aAe,LABEL:iAe});const lAe={id:"extension.command.toggle-heading.label",message:`{level, select, 1 {Heading 1}
|
|
1301
1301
|
2 {Heading 2}
|
|
1302
1302
|
3 {Heading 3}
|
|
1303
1303
|
4 {Heading 4}
|
|
1304
1304
|
5 {Heading 5}
|
|
1305
1305
|
6 {Heading 6}
|
|
1306
|
-
other {Heading}}`,comment:"Label for heading command with support for levels."};var sAe=Object.freeze({__proto__:null,LABEL:aAe});const lAe={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},cAe={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},uAe={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},dAe={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var T1=Object.freeze({__proto__:null,REDO_DESCRIPTION:dAe,REDO_LABEL:uAe,UNDO_DESCRIPTION:cAe,UNDO_LABEL:lAe});const fAe={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},hAe={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var o8=Object.freeze({__proto__:null,DESCRIPTION:hAe,LABEL:fAe});const pAe={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},mAe={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var i8=Object.freeze({__proto__:null,DESCRIPTION:mAe,LABEL:pAe});const gAe={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},vAe={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},bAe={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var SD=Object.freeze({__proto__:null,BULLET_LIST_LABEL:vAe,ORDERED_LIST_LABEL:gAe,TASK_LIST_LABEL:bAe});const yAe={id:"extension.command.increase-indent.label",message:"Increase indentation",comment:"Label for increasing the indentation level."},xAe={id:"extension.command.decrease-indent.label",message:"Decrease indentation",comment:"Label for decreasing the indentation level of the current node block."},wAe={id:"extension.command.center-align.label",message:"Center align",comment:"Center align the text in the current node."},CAe={id:"extension.command.justify-align.label",message:"Justify",comment:"Justify the alignment of the selected nodes."},SAe={id:"extension.command.right-align.label",message:"Right align",comment:"Right align the selected nodes."},kAe={id:"extension.command.left-align.label",message:"Left align",comment:"Left align the selected nodes."};var Zh=Object.freeze({__proto__:null,CENTER_ALIGN_LABEL:wAe,DECREASE_INDENT_LABEL:xAe,INCREASE_INDENT_LABEL:yAe,JUSTIFY_ALIGN_LABEL:CAe,LEFT_ALIGN_LABEL:kAe,RIGHT_ALIGN_LABEL:SAe});const EAe={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},TAe={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},DAe={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},AAe={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var D1=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:AAe,CONVERT_LABEL:DAe,INSERT_DESCRIPTION:TAe,INSERT_LABEL:EAe});const OAe={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},MAe={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var a8=Object.freeze({__proto__:null,DESCRIPTION:MAe,LABEL:OAe});const PAe={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},NAe={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var s8=Object.freeze({__proto__:null,DESCRIPTION:NAe,LABEL:PAe});class ra{constructor(t,n,r={}){this.match=t,this.match=t,this.handler=typeof n=="string"?_Ae(n):n,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1}}function _Ae(e){return function(t,n,r,o){let i=e;if(n[1]){let a=n[0].lastIndexOf(n[1]);i+=n[0].slice(a+n[1].length),r+=a;let s=r-o;s>0&&(i=n[0].slice(a-s,a)+i,r=o)}return t.tr.insertText(i,r,o)}}const RAe=500;function IAe({rules:e}){let t=new rc({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return l8(n,r,o,i,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&l8(n,r.pos,r.pos,"",e,t)})}}},isInputRules:!0});return t}function l8(e,t,n,r,o,i){if(e.composing)return!1;let a=e.state,s=a.doc.resolve(t),c=s.parent.textBetween(Math.max(0,s.parentOffset-RAe),s.parentOffset,null,"\uFFFC")+r;for(let f=0;f<o.length;f++){let p=o[f];if(s.parent.type.spec.code){if(!p.inCode)continue}else if(p.inCode==="only")continue;let m=p.match.exec(c),v=m&&p.handler(a,m,t-(m[0].length-r.length),n);if(v)return p.undoable&&v.setMeta(i,{transform:v,from:t,to:n,text:r}),e.dispatch(v),!0}return!1}const LAe=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o=n[r],i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){let a=e.tr,s=i.transform;for(let c=s.steps.length-1;c>=0;c--)a.step(s.steps[c].invert(s.docs[c]));if(i.text){let c=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else a.delete(i.from,i.to);t(a)}return!0}}return!1};new ra(/--$/,"\u2014"),new ra(/\.\.\.$/,"\u2026"),new ra(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201C"),new ra(/"$/,"\u201D"),new ra(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),new ra(/'$/,"\u2019");function A1(e,t,n=null,r){return new ra(e,(o,i,a,s)=>{let c=n instanceof Function?n(i):n,f=o.tr.delete(a,s),p=f.doc.resolve(a),m=p.blockRange(),v=m&&pD(m,t,c);if(!v)return null;f.wrap(m,v);let y=f.doc.resolve(a-1).nodeBefore;return y&&y.type==t&&sv(f.doc,a-1)&&(!r||r(i,y))&&f.join(a-1),f})}function $Ae(e,t,n=null){return new ra(e,(r,o,i,a)=>{let s=r.doc.resolve(i),c=n instanceof Function?n(o):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?r.tr.delete(i,a).setBlockType(i,i,t,c):null})}const Bi=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},dv=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let c8=null;const oc=function(e,t,n){let r=c8||(c8=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Rd=function(e,t,n,r){return n&&(u8(e,t,n,r,-1)||u8(e,t,n,r,1))},FAe=/^(img|br|input|textarea|hr)$/i;function u8(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:gl(e))){let i=e.parentNode;if(!i||i.nodeType!=1||kD(e)||FAe.test(e.nodeName)||e.contentEditable=="false")return!1;t=Bi(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?gl(e):0}else return!1}}function gl(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function BAe(e,t,n){for(let r=t==0,o=t==gl(e);r||o;){if(e==n)return!0;let i=Bi(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==gl(e)}}function kD(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const O1=function(e){return e.focusNode&&Rd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Id(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function zAe(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function VAe(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const vl=typeof navigator<"u"?navigator:null,d8=typeof document<"u"?document:null,ou=vl&&vl.userAgent||"",ED=/Edge\/(\d+)/.exec(ou),f8=/MSIE \d/.exec(ou),TD=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ou),oa=!!(f8||TD||ED),iu=f8?document.documentMode:TD?+TD[1]:ED?+ED[1]:0,Es=!oa&&/gecko\/(\d+)/i.test(ou);Es&&+(/Firefox\/(\d+)/.exec(ou)||[0,0])[1];const DD=!oa&&/Chrome\/(\d+)/.exec(ou),Ai=!!DD,HAe=DD?+DD[1]:0,zi=!oa&&!!vl&&/Apple Computer/.test(vl.vendor),Jh=zi&&(/Mobile\/\w+/.test(ou)||!!vl&&vl.maxTouchPoints>2),Ja=Jh||(vl?/Mac/.test(vl.platform):!1),jAe=vl?/Win/.test(vl.platform):!1,Ts=/Android \d/.test(ou),fv=!!d8&&"webkitFontSmoothing"in d8.documentElement.style,WAe=fv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function YAe(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ic(e,t){return typeof e=="number"?e:e[t]}function UAe(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function h8(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let a=n||e.dom;a;a=dv(a)){if(a.nodeType!=1)continue;let s=a,c=s==i.body,f=c?YAe(i):UAe(s),p=0,m=0;if(t.top<f.top+ic(r,"top")?m=-(f.top-t.top+ic(o,"top")):t.bottom>f.bottom-ic(r,"bottom")&&(m=t.bottom-t.top>f.bottom-f.top?t.top+ic(o,"top")-f.top:t.bottom-f.bottom+ic(o,"bottom")),t.left<f.left+ic(r,"left")?p=-(f.left-t.left+ic(o,"left")):t.right>f.right-ic(r,"right")&&(p=t.right-f.right+ic(o,"right")),p||m)if(c)i.defaultView.scrollBy(p,m);else{let v=s.scrollLeft,y=s.scrollTop;m&&(s.scrollTop+=m),p&&(s.scrollLeft+=p);let w=s.scrollLeft-v,C=s.scrollTop-y;t={left:t.left-w,top:t.top-C,right:t.right-w,bottom:t.bottom-C}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(a).position))break}}function qAe(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,a=n+1;a<Math.min(innerHeight,t.bottom);a+=5){let s=e.root.elementFromPoint(i,a);if(!s||s==e.dom||!e.dom.contains(s))continue;let c=s.getBoundingClientRect();if(c.top>=n-20){r=s,o=c.top;break}}return{refDOM:r,refTop:o,stack:p8(e.dom)}}function p8(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=dv(r));return t}function KAe({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;m8(n,r==0?0:r-t)}function m8(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Qh=null;function GAe(e){if(e.setActive)return e.setActive();if(Qh)return e.focus(Qh);let t=p8(e);e.focus(Qh==null?{get preventScroll(){return Qh={preventScroll:!0},!0}}:void 0),Qh||(Qh=!1,m8(t,0))}function g8(e,t){let n,r=2e8,o,i=0,a=t.top,s=t.top,c,f;for(let p=e.firstChild,m=0;p;p=p.nextSibling,m++){let v;if(p.nodeType==1)v=p.getClientRects();else if(p.nodeType==3)v=oc(p).getClientRects();else continue;for(let y=0;y<v.length;y++){let w=v[y];if(w.top<=a&&w.bottom>=s){a=Math.max(w.bottom,a),s=Math.min(w.top,s);let C=w.left>t.left?w.left-t.left:w.right<t.left?t.left-w.right:0;if(C<r){n=p,r=C,o=C&&n.nodeType==3?{left:w.right<t.left?w.right:w.left,top:t.top}:t,p.nodeType==1&&C&&(i=m+(t.left>=(w.left+w.right)/2?1:0));continue}}else w.top>t.top&&!c&&w.left<=t.left&&w.right>=t.left&&(c=p,f={left:Math.max(w.left,Math.min(w.right,t.left)),top:w.top});!n&&(t.left>=w.right&&t.top>=w.top||t.left>=w.left&&t.top>=w.bottom)&&(i=m+1)}}return!n&&c&&(n=c,o=f,r=0),n&&n.nodeType==3?XAe(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:g8(n,o)}function XAe(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let i=au(r,1);if(i.top!=i.bottom&&AD(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function AD(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ZAe(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function JAe(e,t,n){let{node:r,offset:o}=g8(t,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function QAe(e,t,n,r){let o=-1;for(let i=t,a=!1;i!=e.dom;){let s=e.docView.nearestDesc(i,!0);if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent&&!a||!s.contentDOM)){let c=s.dom.getBoundingClientRect();if(s.node.isBlock&&s.parent&&!a&&(a=!0,c.left>r.left||c.top>r.top?o=s.posBefore:(c.right<r.left||c.bottom<r.top)&&(o=s.posAfter)),!s.contentDOM&&o<0&&!s.node.isText)return(s.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?s.posBefore:s.posAfter}i=s.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}function v8(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let a=e.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let c=0;c<s.length;c++){let f=s[c];if(AD(t,f))return v8(a,t,f)}}if((i=(i+1)%r)==o)break}return e}function eOe(e,t){let n=e.dom.ownerDocument,r,o=0,i=VAe(n,t.left,t.top);i&&({node:r,offset:o}=i);let a=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let f=e.dom.getBoundingClientRect();if(!AD(t,f)||(a=v8(e.dom,t,f),!a))return null}if(zi)for(let f=a;r&&f;f=dv(f))f.draggable&&(r=void 0);if(a=ZAe(a,t),r){if(Es&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let p=r.childNodes[o],m;p.nodeName=="IMG"&&(m=p.getBoundingClientRect()).right<=t.left&&m.bottom>t.top&&o++}let f;fv&&o&&r.nodeType==1&&(f=r.childNodes[o-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=QAe(e,r,o,t))}s==null&&(s=JAe(e,a,t));let c=e.docView.nearestDesc(a,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function b8(e){return e.top<e.bottom||e.left<e.right}function au(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(b8(r))return r}return Array.prototype.find.call(n,b8)||e.getBoundingClientRect()}const tOe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function y8(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),a=fv||Es;if(r.nodeType==3)if(a&&(tOe.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let c=au(oc(r,o,o),n);if(Es&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let f=au(oc(r,o-1,o-1),-1);if(f.top==c.top){let p=au(oc(r,o,o+1),-1);if(p.top!=c.top)return hv(p,p.left<f.left)}}return c}else{let c=o,f=o,p=n<0?1:-1;return n<0&&!o?(f++,p=-1):n>=0&&o==r.nodeValue.length?(c--,p=1):n<0?c--:f++,hv(au(oc(r,c,f),p),p<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==gl(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return OD(c.getBoundingClientRect(),!1)}if(i==null&&o<gl(r)){let c=r.childNodes[o];if(c.nodeType==1)return OD(c.getBoundingClientRect(),!0)}return OD(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==gl(r))){let c=r.childNodes[o-1],f=c.nodeType==3?oc(c,gl(c)-(a?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return hv(au(f,1),!1)}if(i==null&&o<gl(r)){let c=r.childNodes[o];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let f=c?c.nodeType==3?oc(c,0,a?0:1):c.nodeType==1?c:null:null;if(f)return hv(au(f,-1),!0)}return hv(au(r.nodeType==3?oc(r):r,-n),n>=0)}function hv(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function OD(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function x8(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function nOe(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return x8(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=y8(e,o.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let c;if(s.nodeType==1)c=s.getClientRects();else if(s.nodeType==3)c=oc(s,0,s.nodeValue.length).getClientRects();else continue;for(let f=0;f<c.length;f++){let p=c[f];if(p.bottom>p.top+1&&(n=="up"?a.top-p.top>(p.bottom-a.top)*2:p.bottom-a.bottom>(a.bottom-p.top)*2))return!1}}return!0})}const rOe=/[\u0590-\u08ac]/;function oOe(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return!rOe.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:x8(e,t,()=>{let{focusNode:c,focusOffset:f,anchorNode:p,anchorOffset:m}=e.domSelectionRange(),v=s.caretBidiLevel;s.modify("move",n,"character");let y=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:w,focusOffset:C}=e.domSelectionRange(),k=w&&!y.contains(w.nodeType==1?w:w.parentNode)||c==w&&f==C;try{s.collapse(p,m),c&&(c!=p||f!=m)&&s.extend&&s.extend(c,f)}catch{}return v!=null&&(s.caretBidiLevel=v),k})}let w8=null,C8=null,S8=!1;function iOe(e,t,n){return w8==t&&C8==n?S8:(w8=t,C8=n,S8=n=="up"||n=="down"?nOe(e,t,n):oOe(e,t,n))}const Qa=0,k8=1,Ld=2,bl=3;class pv{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Qa,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==t)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let i,a;if(t==this.contentDOM)i=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(t==this.contentDOM)i=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(t==this.dom&&this.contentDOM)o=n>Bi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(t.nodeType==1?t:t.parentNode):a==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==t&&i!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(t<i)return o.descAt(t-r-o.border);r=i}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],s=i+a.size;if(s>t||a instanceof D8){o=t-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof E8&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Bi(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Bi(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let a=r,s=0;;s++){let c=this.children[s],f=a+c.size;if(o==-1&&t<=f){let p=a+c.border;if(t>=p&&n<=f-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,p);t=a;for(let m=s;m>0;m--){let v=this.children[m-1];if(v.size&&v.dom.parentNode==this.contentDOM&&!v.emptyChildAt(1)){o=Bi(v.dom)+1;break}t-=v.size}o==-1&&(o=0)}if(o>-1&&(f>n||s==this.children.length-1)){n=f;for(let p=s+1;p<this.children.length;p++){let m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=Bi(m.dom);break}n+=m.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:t,to:n,fromOffset:o,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,o=!1){let i=Math.min(t,n),a=Math.max(t,n);for(let v=0,y=0;v<this.children.length;v++){let w=this.children[v],C=y+w.size;if(i>y&&a<C)return w.setSelection(t-y-w.border,n-y-w.border,r,o);y=C}let s=this.domFromPos(t,t?-1:1),c=n==t?s:this.domFromPos(n,n?-1:1),f=r.getSelection(),p=!1;if((Es||zi)&&t==n){let{node:v,offset:y}=s;if(v.nodeType==3){if(p=!!(y&&v.nodeValue[y-1]==`
|
|
1307
|
-
`),p&&y==v.nodeValue.length)for(let w=v,C;w;w=w.parentNode){if(C=w.nextSibling){C.nodeName=="BR"&&(s=c={node:C.parentNode,offset:Bi(C)+1});break}let k=w.pmViewDesc;if(k&&k.node&&k.node.isBlock)break}}else{let w=v.childNodes[y-1];p=w&&(w.nodeName=="BR"||w.contentEditable=="false")}}if(Es&&f.focusNode&&f.focusNode!=c.node&&f.focusNode.nodeType==1){let v=f.focusNode.childNodes[f.focusOffset];v&&v.contentEditable=="false"&&(o=!0)}if(!(o||p&&zi)&&Rd(s.node,s.offset,f.anchorNode,f.anchorOffset)&&Rd(c.node,c.offset,f.focusNode,f.focusOffset))return;let m=!1;if((f.extend||t==n)&&!p){f.collapse(s.node,s.offset);try{t!=n&&f.extend(c.node,c.offset),m=!0}catch{}}if(!m){if(t>n){let y=s;s=c,c=y}let v=document.createRange();v.setEnd(c.node,c.offset),v.setStart(s.node,s.offset),f.removeAllRanges(),f.addRange(v)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let s=r+i.border,c=a-i.border;if(t>=s&&n<=c){this.dirty=t==r||n==a?Ld:k8,t==s&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=bl:i.markDirty(t-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ld:bl}r=a}this.dirty=Ld}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ld:k8;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class E8 extends pv{constructor(t,n,r,o){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(t,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Qa&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class aOe extends pv{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class lf extends pv{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return(!a||!a.dom)&&(a=$s.renderSpec(document,n.type.spec.toDOM(n,r))),new lf(t,n,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&bl||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=bl&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Qa){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Qa}}slice(t,n,r){let o=lf.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=ND(i,n,a,r)),t>0&&(i=ND(i,0,t,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}class Mu extends pv{constructor(t,n,r,o,i,a,s,c,f){super(t,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(t,n,r,o,i,a){let s=i.nodeViews[n.type.name],c,f=s&&s(n,i,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},r,o),p=f&&f.dom,m=f&&f.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:m}=$s.renderSpec(document,n.type.spec.toDOM(n)));!m&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let v=p;return p=M8(p,r,n),f?c=new sOe(t,n,r,o,p,m||null,v,f,i,a+1):n.isText?new Gw(t,n,r,o,p,v,i):new Mu(t,n,r,o,p,m||null,v,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Ht.empty)}return t}matchesNode(t,n,r){return this.dirty==Qa&&t.eq(this.node)&&PD(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,c=new cOe(this,a&&a.node,t);fOe(this.node,this.innerDeco,(f,p,m)=>{f.spec.marks?c.syncToMarks(f.spec.marks,r,t):f.type.side>=0&&!m&&c.syncToMarks(p==this.node.childCount?vr.none:this.node.child(p).marks,r,t),c.placeWidget(f,t,o)},(f,p,m,v)=>{c.syncToMarks(f.marks,r,t);let y;c.findNodeMatch(f,p,m,v)||s&&t.state.selection.from>o&&t.state.selection.to<o+f.nodeSize&&(y=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(f,p,m,y,t)||c.updateNextNode(f,p,m,t,v,o)||c.addNode(f,p,m,t,o),o+=f.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==Ld)&&(a&&this.protectLocalComposition(t,a),A8(this.contentDOM,this.children,t),Jh&&hOe(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Vn)||r<n||o>n+this.node.content.size)return null;let i=t.domSelectionRange(),a=pOe(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let s=a.nodeValue,c=mOe(this.node.content,s,r-n,o-n);return c<0?null:{node:a,pos:c,text:s}}else return{node:a,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new aOe(this,i,n,o);t.input.compositionNodes.push(a),this.children=ND(this.children,r,r+o.length,t,a)}update(t,n,r,o){return this.dirty==bl||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Qa}updateOuterDeco(t){if(PD(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=O8(this.dom,this.nodeDOM,MD(this.outerDeco,this.node,n),MD(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function T8(e,t,n,r,o){M8(r,t,e);let i=new Mu(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Gw extends Mu{constructor(t,n,r,o,i,a,s){super(t,n,r,o,i,null,a,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==bl||this.dirty!=Qa&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Qa||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Qa,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new Gw(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=bl)}get domAtom(){return!1}}class D8 extends pv{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Qa&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class sOe extends Mu{constructor(t,n,r,o,i,a,s,c,f,p){super(t,n,r,o,i,a,s,f,p),this.spec=c}update(t,n,r,o){if(this.dirty==bl)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function A8(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=P8(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof lf){let c=r?r.previousSibling:e.lastChild;A8(a.contentDOM,a.children,n),r=c?c.nextSibling:e.firstChild}}for(;r;)r=P8(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const mv=function(e){e&&(this.nodeName=e)};mv.prototype=Object.create(null);const $d=[new mv];function MD(e,t,n){if(e.length==0)return $d;let r=n?$d[0]:new mv,o=[r];for(let i=0;i<e.length;i++){let a=e[i].type.attrs;if(a){a.nodeName&&o.push(r=new mv(a.nodeName));for(let s in a){let c=a[s];c!=null&&(n&&o.length==1&&o.push(r=new mv(t.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+c:s=="style"?r.style=(r.style?r.style+";":"")+c:s!="nodeName"&&(r[s]=c))}}}return o}function O8(e,t,n,r){if(n==$d&&r==$d)return t;let o=t;for(let i=0;i<r.length;i++){let a=r[i],s=n[i];if(i){let c;s&&s.nodeName==a.nodeName&&o!=e&&(c=o.parentNode)&&c.nodeName.toLowerCase()==a.nodeName||(c=document.createElement(a.nodeName),c.pmIsDeco=!0,c.appendChild(o),s=$d[0]),o=c}lOe(o,s||$d[0],a)}return o}function lOe(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&e.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&e.classList.add(o[i]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(t.style);)e.style.removeProperty(o[1])}n.style&&(e.style.cssText+=n.style)}}function M8(e,t,n){return O8(e,e,$d,MD(t,n,e.nodeType!=1))}function PD(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function P8(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class cOe{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=uOe(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let o=0,i=this.stack.length>>1,a=Math.min(i,t.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Qa,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let f=this.top.children[c];if(f.matchesMark(t[i])&&!this.isLocked(f.dom)){s=c;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let c=lf.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(t,n,r))i=this.top.children.indexOf(a,this.index);else for(let s=this.index,c=Math.min(this.top.children.length,s+5);s<c;s++){let f=this.top.children[s];if(f.matchesNode(t,n,r)&&!this.preMatch.matched.has(f)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,n,r,o,i){let a=this.top.children[o];return a.dirty==bl&&a.dom==a.contentDOM&&(a.dirty=Ld),a.update(t,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}t=n}}updateNextNode(t,n,r,o,i,a){for(let s=this.index;s<this.top.children.length;s++){let c=this.top.children[s];if(c instanceof Mu){let f=this.preMatch.matched.get(c);if(f!=null&&f!=i)return!1;let p=c.dom,m,v=this.isLocked(p)&&!(t.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==t.text&&c.dirty!=bl&&PD(n,c.outerDeco));if(!v&&c.update(t,n,r,o))return this.destroyBetween(this.index,s),c.dom!=p&&(this.changed=!0),this.index++,!0;if(!v&&(m=this.recreateWrapper(c,t,n,r,o,a)))return this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Ld,m.updateChildren(o,a+1),m.dirty=Qa),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,o,i,a){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content))return null;let s=Mu.create(this.top,n,r,o,i,a);if(s.contentDOM){s.children=t.children,t.children=[];for(let c of s.children)c.parent=s}return t.destroy(),s}addNode(t,n,r,o,i){let a=Mu.create(this.top,t,n,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(t,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(t)&&(t==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new E8(this.top,t,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof lf;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Gw)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((zi||Ai)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new D8(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function uOe(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let f=n.children[r-1];if(f instanceof lf)n=f,r=f.children.length;else{s=f,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function dOe(e,t){return e.type.side-t.type.side}function fOe(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let f=0;f<e.childCount;f++){let p=e.child(f);r(p,o,t.forChild(i,p),f),i+=p.nodeSize}return}let a=0,s=[],c=null;for(let f=0;;){let p,m;for(;a<o.length&&o[a].to==i;){let k=o[a++];k.widget&&(p?(m||(m=[p])).push(k):p=k)}if(p)if(m){m.sort(dOe);for(let k=0;k<m.length;k++)n(m[k],f,!!c)}else n(p,f,!!c);let v,y;if(c)y=-1,v=c,c=null;else if(f<e.childCount)y=f,v=e.child(f++);else break;for(let k=0;k<s.length;k++)s[k].to<=i&&s.splice(k--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let w=i+v.nodeSize;if(v.isText){let k=w;a<o.length&&o[a].from<k&&(k=o[a].from);for(let T=0;T<s.length;T++)s[T].to<k&&(k=s[T].to);k<w&&(c=v.cut(k-i),v=v.cut(0,k-i),w=k,y=-1)}else for(;a<o.length&&o[a].to<w;)a++;let C=v.isInline&&!v.isLeaf?s.filter(k=>!k.inline):s.slice();r(v,C,t.forChild(i,v),y),i=w}}function hOe(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function pOe(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=gl(e)}else if(e.nodeType==1&&t<e.childNodes.length)e=e.childNodes[t],t=0;else return null}}function mOe(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let a=e.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let c=a.text;for(;o<e.childCount;){let f=e.child(o++);if(i+=f.nodeSize,!f.isText)break;c+=f.text}if(i>=n){if(i>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let f=s<r?c.lastIndexOf(t,r-s-1):-1;if(f>=0&&f+t.length+s>=n)return s+f;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function ND(e,t,n,r,o){let i=[];for(let a=0,s=0;a<e.length;a++){let c=e[a],f=s,p=s+=c.size;f>=n||p<=t?i.push(c):(f<t&&i.push(c.slice(0,t-f,r)),o&&(i.push(o),o=void 0),p>n&&i.push(c.slice(n-f,c.size,r)))}return i}function _D(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),c,f;if(O1(n)){for(c=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&zn.isSelectable(p)&&o.parent&&!(p.isInline&&BAe(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;f=new zn(a==m?s:r.resolve(m))}}else{let p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(p<0)return null;c=r.resolve(p)}if(!f){let p=t=="pointer"||e.state.selection.head<s.pos&&!i?1:-1;f=ID(e,c,s,p)}return f}function N8(e){return e.editable?e.hasFocus():B8(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ac(e,t=!1){let n=e.state.selection;if(L8(e,n),!!N8(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ai){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Rd(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)vOe(e);else{let{anchor:r,head:o}=n,i,a;_8&&!(n instanceof Vn)&&(n.$from.parent.inlineContent||(i=R8(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=R8(e,n.to))),e.docView.setSelection(r,o,e.root,t),_8&&(i&&I8(i),a&&I8(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&gOe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const _8=zi||Ai&&HAe<63;function R8(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(zi&&o&&o.contentEditable=="false")return RD(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return RD(o);if(i)return RD(i)}}function RD(e){return e.contentEditable="true",zi&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function I8(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function gOe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!N8(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function vOe(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,Bi(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&oa&&iu<=11&&(r.disabled=!0,r.disabled=!1)}function L8(e,t){if(t instanceof zn){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&($8(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else $8(e)}function $8(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ID(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Vn.between(t,n,r)}function F8(e){return e.editable&&!e.hasFocus()?!1:B8(e)}function B8(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function bOe(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Rd(t.node,t.offset,n.anchorNode,n.anchorOffset)}function LD(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&ur.findFrom(i,t)}function su(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function z8(e,t,n){let r=e.state.selection;if(r instanceof Vn)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return su(e,new Vn(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=LD(e.state,t);return o&&o instanceof zn?su(e,o):!1}else if(!(Ja&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?zn.isSelectable(i)?su(e,new zn(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):fv?su(e,new Vn(e.state.doc.resolve(t<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof zn&&r.node.isInline)return su(e,new Vn(t>0?r.$to:r.$from));{let o=LD(e.state,t);return o?su(e,o):!1}}}function M1(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function gv(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ep(e,t){return t<0?yOe(e):xOe(e)}function yOe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(Es&&n.nodeType==1&&r<M1(n)&&gv(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(gv(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(V8(n))break;{let s=n.previousSibling;for(;s&&gv(s,-1);)o=n.parentNode,i=Bi(s),s=s.previousSibling;if(s)n=s,r=M1(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?$D(e,n,r):o&&$D(e,o,i)}function xOe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=M1(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(gv(s,1))i=n,a=++r;else break}else{if(V8(n))break;{let s=n.nextSibling;for(;s&&gv(s,1);)i=s.parentNode,a=Bi(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=M1(n);else{if(n=n.parentNode,n==e.dom)break;r=o=0}}}i&&$D(e,i,a)}function V8(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function wOe(e,t){for(;e&&t==e.childNodes.length&&!kD(e);)t=Bi(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function COe(e,t){for(;e&&!t&&!kD(e);)t=Bi(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function $D(e,t,n){if(t.nodeType!=3){let i,a;(a=wOe(t,n))?(t=a,n=0):(i=COe(t,n))&&(t=i,n=i.nodeValue.length)}let r=e.domSelection();if(O1(r)){let i=document.createRange();i.setEnd(t,n),i.setStart(t,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&ac(e)},50)}function H8(e,t){let n=e.state.doc.resolve(t);if(!(Ai||jAe)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(t<n.end()){let i=e.coordsAtPos(t+1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function j8(e,t,n){let r=e.state.selection;if(r instanceof Vn&&!r.empty||n.indexOf("s")>-1||Ja&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=LD(e.state,t);if(a&&a instanceof zn)return su(e,a)}if(!o.parent.inlineContent){let a=t<0?o:i,s=r instanceof qi?ur.near(a,t):ur.findFrom(a,t);return s?su(e,s):!1}return!1}function W8(e,t){if(!(e.state.selection instanceof Vn))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=e.state.tr;return t<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),e.dispatch(a),!0}return!1}function Y8(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function SOe(e){if(!zi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Y8(e,r,"true"),setTimeout(()=>Y8(e,r,"false"),20)}return!1}function kOe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function EOe(e,t){let n=t.keyCode,r=kOe(t);if(n==8||Ja&&n==72&&r=="c")return W8(e,-1)||ep(e,-1);if(n==46&&!t.shiftKey||Ja&&n==68&&r=="c")return W8(e,1)||ep(e,1);if(n==13||n==27)return!0;if(n==37||Ja&&n==66&&r=="c"){let o=n==37?H8(e,e.state.selection.from)=="ltr"?-1:1:-1;return z8(e,o,r)||ep(e,o)}else if(n==39||Ja&&n==70&&r=="c"){let o=n==39?H8(e,e.state.selection.from)=="ltr"?1:-1:1;return z8(e,o,r)||ep(e,o)}else{if(n==38||Ja&&n==80&&r=="c")return j8(e,-1,r)||ep(e,-1);if(n==40||Ja&&n==78&&r=="c")return SOe(e)||j8(e,1,r)||ep(e,1);if(r==(Ja?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function U8(e,t){e.someProp("transformCopied",y=>{t=y(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let y=r.firstChild;n.push(y.type.name,y.attrs!=y.type.defaultAttrs?y.attrs:null),r=y.content}let a=e.someProp("clipboardSerializer")||$s.fromSchema(e.state.schema),s=e9(),c=s.createElement("div");c.appendChild(a.serializeFragment(r,{document:s}));let f=c.firstChild,p,m=0;for(;f&&f.nodeType==1&&(p=J8[f.nodeName.toLowerCase()]);){for(let y=p.length-1;y>=0;y--){let w=s.createElement(p[y]);for(;c.firstChild;)w.appendChild(c.firstChild);c.appendChild(w),m++}f=c.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${o} ${i}${m?` -${m}`:""} ${JSON.stringify(n)}`);let v=e.someProp("clipboardTextSerializer",y=>y(t,e))||t.content.textBetween(0,t.content.size,`
|
|
1306
|
+
other {Heading}}`,comment:"Label for heading command with support for levels."};var cAe=Object.freeze({__proto__:null,LABEL:lAe});const uAe={id:"extension.command.undo.label",message:"Undo",comment:"Label for undo."},dAe={id:"extension.command.undo.description",message:"Undo the most recent action",comment:"Description for undo."},fAe={id:"extension.command.redo.label",message:"Redo",comment:"Label for redo."},hAe={id:"extension.command.redo.description",message:"Redo the most recent action",comment:"Description for redo."};var T1=Object.freeze({__proto__:null,REDO_DESCRIPTION:hAe,REDO_LABEL:fAe,UNDO_DESCRIPTION:dAe,UNDO_LABEL:uAe});const pAe={id:"extension.command.insert-horizontal-rule.label",message:"Divider",comment:"Label for inserting a horizontal rule (divider) command."},mAe={id:"extension.command.insert-horizontal-rule.description",message:"Separate content with a diving horizontal line",comment:"Description for inserting a horizontal rule (divider) command."};var o8=Object.freeze({__proto__:null,DESCRIPTION:mAe,LABEL:pAe});const gAe={id:"extension.command.toggle-italic.label",message:"Italic",comment:"Label for italic formatting command."},vAe={id:"extension.command.toggle-italic.description",message:"Italicize the selected text",comment:"Description for italic formatting command."};var i8=Object.freeze({__proto__:null,DESCRIPTION:vAe,LABEL:gAe});const bAe={id:"extension.command.toggle-ordered-list.label",message:"Ordered list",comment:"Label for inserting an ordered list into the editor."},yAe={id:"extension.command.toggle-bullet-list.description",message:"Bulleted list",comment:"Description for inserting a bullet list into the editor."},xAe={id:"extension.command.toggle-task-list.description",message:"Tasked list",comment:"Description for inserting a task list into the editor."};var SD=Object.freeze({__proto__:null,BULLET_LIST_LABEL:yAe,ORDERED_LIST_LABEL:bAe,TASK_LIST_LABEL:xAe});const wAe={id:"extension.command.increase-indent.label",message:"Increase indentation",comment:"Label for increasing the indentation level."},CAe={id:"extension.command.decrease-indent.label",message:"Decrease indentation",comment:"Label for decreasing the indentation level of the current node block."},SAe={id:"extension.command.center-align.label",message:"Center align",comment:"Center align the text in the current node."},kAe={id:"extension.command.justify-align.label",message:"Justify",comment:"Justify the alignment of the selected nodes."},EAe={id:"extension.command.right-align.label",message:"Right align",comment:"Right align the selected nodes."},TAe={id:"extension.command.left-align.label",message:"Left align",comment:"Left align the selected nodes."};var Zh=Object.freeze({__proto__:null,CENTER_ALIGN_LABEL:SAe,DECREASE_INDENT_LABEL:CAe,INCREASE_INDENT_LABEL:wAe,JUSTIFY_ALIGN_LABEL:kAe,LEFT_ALIGN_LABEL:TAe,RIGHT_ALIGN_LABEL:EAe});const DAe={id:"extension.command.insert-paragraph.label",message:"Insert Paragraph",comment:"Label for inserting a paragraph."},AAe={id:"extension.command.insert-paragraph.description",message:"Insert a new paragraph",comment:"Description for inserting a paragraph."},OAe={id:"extension.command.convert-paragraph.label",message:"Convert Paragraph",comment:"Label for converting the current node into a paragraph."},MAe={id:"extension.command.convert-paragraph.description",message:"Convert current block into a paragraph block.",comment:"Description for converting a paragraph."};var D1=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:MAe,CONVERT_LABEL:OAe,INSERT_DESCRIPTION:AAe,INSERT_LABEL:DAe});const PAe={id:"extension.command.toggle-strike.label",message:"Strikethrough",comment:"Label for strike formatting command."},NAe={id:"extension.command.toggle-strike.description",message:"Strikethrough the selected text",comment:"Description for strike formatting command."};var a8=Object.freeze({__proto__:null,DESCRIPTION:NAe,LABEL:PAe});const _Ae={id:"extension.command.toggle-underline.label",message:"Underline",comment:"Label for underline formatting command."},RAe={id:"extension.command.toggle-underline.description",message:"Underline the selected text",comment:"Description for underline formatting command."};var s8=Object.freeze({__proto__:null,DESCRIPTION:RAe,LABEL:_Ae});class ra{constructor(t,n,r={}){this.match=t,this.match=t,this.handler=typeof n=="string"?IAe(n):n,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1}}function IAe(e){return function(t,n,r,o){let i=e;if(n[1]){let a=n[0].lastIndexOf(n[1]);i+=n[0].slice(a+n[1].length),r+=a;let s=r-o;s>0&&(i=n[0].slice(a-s,a)+i,r=o)}return t.tr.insertText(i,r,o)}}const LAe=500;function $Ae({rules:e}){let t=new rc({state:{init(){return null},apply(n,r){let o=n.getMeta(this);return o||(n.selectionSet||n.docChanged?null:r)}},props:{handleTextInput(n,r,o,i){return l8(n,r,o,i,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&l8(n,r.pos,r.pos,"",e,t)})}}},isInputRules:!0});return t}function l8(e,t,n,r,o,i){if(e.composing)return!1;let a=e.state,s=a.doc.resolve(t),c=s.parent.textBetween(Math.max(0,s.parentOffset-LAe),s.parentOffset,null,"\uFFFC")+r;for(let f=0;f<o.length;f++){let p=o[f];if(s.parent.type.spec.code){if(!p.inCode)continue}else if(p.inCode==="only")continue;let m=p.match.exec(c),v=m&&p.handler(a,m,t-(m[0].length-r.length),n);if(v)return p.undoable&&v.setMeta(i,{transform:v,from:t,to:n,text:r}),e.dispatch(v),!0}return!1}const FAe=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let o=n[r],i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){let a=e.tr,s=i.transform;for(let c=s.steps.length-1;c>=0;c--)a.step(s.steps[c].invert(s.docs[c]));if(i.text){let c=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else a.delete(i.from,i.to);t(a)}return!0}}return!1};new ra(/--$/,"\u2014"),new ra(/\.\.\.$/,"\u2026"),new ra(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201C"),new ra(/"$/,"\u201D"),new ra(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),new ra(/'$/,"\u2019");function A1(e,t,n=null,r){return new ra(e,(o,i,a,s)=>{let c=n instanceof Function?n(i):n,f=o.tr.delete(a,s),p=f.doc.resolve(a),m=p.blockRange(),v=m&&pD(m,t,c);if(!v)return null;f.wrap(m,v);let y=f.doc.resolve(a-1).nodeBefore;return y&&y.type==t&&sv(f.doc,a-1)&&(!r||r(i,y))&&f.join(a-1),f})}function BAe(e,t,n=null){return new ra(e,(r,o,i,a)=>{let s=r.doc.resolve(i),c=n instanceof Function?n(o):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t)?r.tr.delete(i,a).setBlockType(i,i,t,c):null})}const Bi=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},dv=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let c8=null;const oc=function(e,t,n){let r=c8||(c8=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Rd=function(e,t,n,r){return n&&(u8(e,t,n,r,-1)||u8(e,t,n,r,1))},zAe=/^(img|br|input|textarea|hr)$/i;function u8(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:gl(e))){let i=e.parentNode;if(!i||i.nodeType!=1||kD(e)||zAe.test(e.nodeName)||e.contentEditable=="false")return!1;t=Bi(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?gl(e):0}else return!1}}function gl(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function VAe(e,t,n){for(let r=t==0,o=t==gl(e);r||o;){if(e==n)return!0;let i=Bi(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==gl(e)}}function kD(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const O1=function(e){return e.focusNode&&Rd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Id(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function HAe(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function jAe(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const vl=typeof navigator<"u"?navigator:null,d8=typeof document<"u"?document:null,ou=vl&&vl.userAgent||"",ED=/Edge\/(\d+)/.exec(ou),f8=/MSIE \d/.exec(ou),TD=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ou),oa=!!(f8||TD||ED),iu=f8?document.documentMode:TD?+TD[1]:ED?+ED[1]:0,Es=!oa&&/gecko\/(\d+)/i.test(ou);Es&&+(/Firefox\/(\d+)/.exec(ou)||[0,0])[1];const DD=!oa&&/Chrome\/(\d+)/.exec(ou),Ai=!!DD,WAe=DD?+DD[1]:0,zi=!oa&&!!vl&&/Apple Computer/.test(vl.vendor),Jh=zi&&(/Mobile\/\w+/.test(ou)||!!vl&&vl.maxTouchPoints>2),Ja=Jh||(vl?/Mac/.test(vl.platform):!1),YAe=vl?/Win/.test(vl.platform):!1,Ts=/Android \d/.test(ou),fv=!!d8&&"webkitFontSmoothing"in d8.documentElement.style,UAe=fv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function qAe(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ic(e,t){return typeof e=="number"?e:e[t]}function KAe(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function h8(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let a=n||e.dom;a;a=dv(a)){if(a.nodeType!=1)continue;let s=a,c=s==i.body,f=c?qAe(i):KAe(s),p=0,m=0;if(t.top<f.top+ic(r,"top")?m=-(f.top-t.top+ic(o,"top")):t.bottom>f.bottom-ic(r,"bottom")&&(m=t.bottom-t.top>f.bottom-f.top?t.top+ic(o,"top")-f.top:t.bottom-f.bottom+ic(o,"bottom")),t.left<f.left+ic(r,"left")?p=-(f.left-t.left+ic(o,"left")):t.right>f.right-ic(r,"right")&&(p=t.right-f.right+ic(o,"right")),p||m)if(c)i.defaultView.scrollBy(p,m);else{let v=s.scrollLeft,y=s.scrollTop;m&&(s.scrollTop+=m),p&&(s.scrollLeft+=p);let w=s.scrollLeft-v,C=s.scrollTop-y;t={left:t.left-w,top:t.top-C,right:t.right-w,bottom:t.bottom-C}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(a).position))break}}function GAe(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,a=n+1;a<Math.min(innerHeight,t.bottom);a+=5){let s=e.root.elementFromPoint(i,a);if(!s||s==e.dom||!e.dom.contains(s))continue;let c=s.getBoundingClientRect();if(c.top>=n-20){r=s,o=c.top;break}}return{refDOM:r,refTop:o,stack:p8(e.dom)}}function p8(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=dv(r));return t}function XAe({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;m8(n,r==0?0:r-t)}function m8(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Qh=null;function ZAe(e){if(e.setActive)return e.setActive();if(Qh)return e.focus(Qh);let t=p8(e);e.focus(Qh==null?{get preventScroll(){return Qh={preventScroll:!0},!0}}:void 0),Qh||(Qh=!1,m8(t,0))}function g8(e,t){let n,r=2e8,o,i=0,a=t.top,s=t.top,c,f;for(let p=e.firstChild,m=0;p;p=p.nextSibling,m++){let v;if(p.nodeType==1)v=p.getClientRects();else if(p.nodeType==3)v=oc(p).getClientRects();else continue;for(let y=0;y<v.length;y++){let w=v[y];if(w.top<=a&&w.bottom>=s){a=Math.max(w.bottom,a),s=Math.min(w.top,s);let C=w.left>t.left?w.left-t.left:w.right<t.left?t.left-w.right:0;if(C<r){n=p,r=C,o=C&&n.nodeType==3?{left:w.right<t.left?w.right:w.left,top:t.top}:t,p.nodeType==1&&C&&(i=m+(t.left>=(w.left+w.right)/2?1:0));continue}}else w.top>t.top&&!c&&w.left<=t.left&&w.right>=t.left&&(c=p,f={left:Math.max(w.left,Math.min(w.right,t.left)),top:w.top});!n&&(t.left>=w.right&&t.top>=w.top||t.left>=w.left&&t.top>=w.bottom)&&(i=m+1)}}return!n&&c&&(n=c,o=f,r=0),n&&n.nodeType==3?JAe(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:g8(n,o)}function JAe(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let i=au(r,1);if(i.top!=i.bottom&&AD(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function AD(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function QAe(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function eOe(e,t,n){let{node:r,offset:o}=g8(t,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function tOe(e,t,n,r){let o=-1;for(let i=t,a=!1;i!=e.dom;){let s=e.docView.nearestDesc(i,!0);if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent&&!a||!s.contentDOM)){let c=s.dom.getBoundingClientRect();if(s.node.isBlock&&s.parent&&!a&&(a=!0,c.left>r.left||c.top>r.top?o=s.posBefore:(c.right<r.left||c.bottom<r.top)&&(o=s.posAfter)),!s.contentDOM&&o<0&&!s.node.isText)return(s.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?s.posBefore:s.posAfter}i=s.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}function v8(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let a=e.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let c=0;c<s.length;c++){let f=s[c];if(AD(t,f))return v8(a,t,f)}}if((i=(i+1)%r)==o)break}return e}function nOe(e,t){let n=e.dom.ownerDocument,r,o=0,i=jAe(n,t.left,t.top);i&&({node:r,offset:o}=i);let a=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let f=e.dom.getBoundingClientRect();if(!AD(t,f)||(a=v8(e.dom,t,f),!a))return null}if(zi)for(let f=a;r&&f;f=dv(f))f.draggable&&(r=void 0);if(a=QAe(a,t),r){if(Es&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let p=r.childNodes[o],m;p.nodeName=="IMG"&&(m=p.getBoundingClientRect()).right<=t.left&&m.bottom>t.top&&o++}let f;fv&&o&&r.nodeType==1&&(f=r.childNodes[o-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=tOe(e,r,o,t))}s==null&&(s=eOe(e,a,t));let c=e.docView.nearestDesc(a,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function b8(e){return e.top<e.bottom||e.left<e.right}function au(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(b8(r))return r}return Array.prototype.find.call(n,b8)||e.getBoundingClientRect()}const rOe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function y8(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),a=fv||Es;if(r.nodeType==3)if(a&&(rOe.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let c=au(oc(r,o,o),n);if(Es&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let f=au(oc(r,o-1,o-1),-1);if(f.top==c.top){let p=au(oc(r,o,o+1),-1);if(p.top!=c.top)return hv(p,p.left<f.left)}}return c}else{let c=o,f=o,p=n<0?1:-1;return n<0&&!o?(f++,p=-1):n>=0&&o==r.nodeValue.length?(c--,p=1):n<0?c--:f++,hv(au(oc(r,c,f),p),p<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==gl(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return OD(c.getBoundingClientRect(),!1)}if(i==null&&o<gl(r)){let c=r.childNodes[o];if(c.nodeType==1)return OD(c.getBoundingClientRect(),!0)}return OD(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==gl(r))){let c=r.childNodes[o-1],f=c.nodeType==3?oc(c,gl(c)-(a?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return hv(au(f,1),!1)}if(i==null&&o<gl(r)){let c=r.childNodes[o];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let f=c?c.nodeType==3?oc(c,0,a?0:1):c.nodeType==1?c:null:null;if(f)return hv(au(f,-1),!0)}return hv(au(r.nodeType==3?oc(r):r,-n),n>=0)}function hv(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function OD(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function x8(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function oOe(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return x8(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=y8(e,o.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let c;if(s.nodeType==1)c=s.getClientRects();else if(s.nodeType==3)c=oc(s,0,s.nodeValue.length).getClientRects();else continue;for(let f=0;f<c.length;f++){let p=c[f];if(p.bottom>p.top+1&&(n=="up"?a.top-p.top>(p.bottom-a.top)*2:p.bottom-a.bottom>(a.bottom-p.top)*2))return!1}}return!0})}const iOe=/[\u0590-\u08ac]/;function aOe(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return!iOe.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:x8(e,t,()=>{let{focusNode:c,focusOffset:f,anchorNode:p,anchorOffset:m}=e.domSelectionRange(),v=s.caretBidiLevel;s.modify("move",n,"character");let y=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:w,focusOffset:C}=e.domSelectionRange(),k=w&&!y.contains(w.nodeType==1?w:w.parentNode)||c==w&&f==C;try{s.collapse(p,m),c&&(c!=p||f!=m)&&s.extend&&s.extend(c,f)}catch{}return v!=null&&(s.caretBidiLevel=v),k})}let w8=null,C8=null,S8=!1;function sOe(e,t,n){return w8==t&&C8==n?S8:(w8=t,C8=n,S8=n=="up"||n=="down"?oOe(e,t,n):aOe(e,t,n))}const Qa=0,k8=1,Ld=2,bl=3;class pv{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Qa,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==t)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let i,a;if(t==this.contentDOM)i=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(t==this.contentDOM)i=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(t==this.dom&&this.contentDOM)o=n>Bi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(t.nodeType==1?t:t.parentNode):a==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==t&&i!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(t<i)return o.descAt(t-r-o.border);r=i}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],s=i+a.size;if(s>t||a instanceof D8){o=t-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof E8&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Bi(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Bi(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let a=r,s=0;;s++){let c=this.children[s],f=a+c.size;if(o==-1&&t<=f){let p=a+c.border;if(t>=p&&n<=f-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,p);t=a;for(let m=s;m>0;m--){let v=this.children[m-1];if(v.size&&v.dom.parentNode==this.contentDOM&&!v.emptyChildAt(1)){o=Bi(v.dom)+1;break}t-=v.size}o==-1&&(o=0)}if(o>-1&&(f>n||s==this.children.length-1)){n=f;for(let p=s+1;p<this.children.length;p++){let m=this.children[p];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){i=Bi(m.dom);break}n+=m.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:t,to:n,fromOffset:o,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,o=!1){let i=Math.min(t,n),a=Math.max(t,n);for(let v=0,y=0;v<this.children.length;v++){let w=this.children[v],C=y+w.size;if(i>y&&a<C)return w.setSelection(t-y-w.border,n-y-w.border,r,o);y=C}let s=this.domFromPos(t,t?-1:1),c=n==t?s:this.domFromPos(n,n?-1:1),f=r.getSelection(),p=!1;if((Es||zi)&&t==n){let{node:v,offset:y}=s;if(v.nodeType==3){if(p=!!(y&&v.nodeValue[y-1]==`
|
|
1307
|
+
`),p&&y==v.nodeValue.length)for(let w=v,C;w;w=w.parentNode){if(C=w.nextSibling){C.nodeName=="BR"&&(s=c={node:C.parentNode,offset:Bi(C)+1});break}let k=w.pmViewDesc;if(k&&k.node&&k.node.isBlock)break}}else{let w=v.childNodes[y-1];p=w&&(w.nodeName=="BR"||w.contentEditable=="false")}}if(Es&&f.focusNode&&f.focusNode!=c.node&&f.focusNode.nodeType==1){let v=f.focusNode.childNodes[f.focusOffset];v&&v.contentEditable=="false"&&(o=!0)}if(!(o||p&&zi)&&Rd(s.node,s.offset,f.anchorNode,f.anchorOffset)&&Rd(c.node,c.offset,f.focusNode,f.focusOffset))return;let m=!1;if((f.extend||t==n)&&!p){f.collapse(s.node,s.offset);try{t!=n&&f.extend(c.node,c.offset),m=!0}catch{}}if(!m){if(t>n){let y=s;s=c,c=y}let v=document.createRange();v.setEnd(c.node,c.offset),v.setStart(s.node,s.offset),f.removeAllRanges(),f.addRange(v)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let s=r+i.border,c=a-i.border;if(t>=s&&n<=c){this.dirty=t==r||n==a?Ld:k8,t==s&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=bl:i.markDirty(t-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ld:bl}r=a}this.dirty=Ld}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Ld:k8;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class E8 extends pv{constructor(t,n,r,o){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(t,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Qa&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class lOe extends pv{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class lf extends pv{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return(!a||!a.dom)&&(a=$s.renderSpec(document,n.type.spec.toDOM(n,r))),new lf(t,n,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&bl||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=bl&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Qa){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Qa}}slice(t,n,r){let o=lf.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=ND(i,n,a,r)),t>0&&(i=ND(i,0,t,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}class Mu extends pv{constructor(t,n,r,o,i,a,s,c,f){super(t,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(t,n,r,o,i,a){let s=i.nodeViews[n.type.name],c,f=s&&s(n,i,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},r,o),p=f&&f.dom,m=f&&f.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:m}=$s.renderSpec(document,n.type.spec.toDOM(n)));!m&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let v=p;return p=M8(p,r,n),f?c=new cOe(t,n,r,o,p,m||null,v,f,i,a+1):n.isText?new Gw(t,n,r,o,p,v,i):new Mu(t,n,r,o,p,m||null,v,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Ht.empty)}return t}matchesNode(t,n,r){return this.dirty==Qa&&t.eq(this.node)&&PD(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,c=new dOe(this,a&&a.node,t);pOe(this.node,this.innerDeco,(f,p,m)=>{f.spec.marks?c.syncToMarks(f.spec.marks,r,t):f.type.side>=0&&!m&&c.syncToMarks(p==this.node.childCount?vr.none:this.node.child(p).marks,r,t),c.placeWidget(f,t,o)},(f,p,m,v)=>{c.syncToMarks(f.marks,r,t);let y;c.findNodeMatch(f,p,m,v)||s&&t.state.selection.from>o&&t.state.selection.to<o+f.nodeSize&&(y=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(f,p,m,y,t)||c.updateNextNode(f,p,m,t,v,o)||c.addNode(f,p,m,t,o),o+=f.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==Ld)&&(a&&this.protectLocalComposition(t,a),A8(this.contentDOM,this.children,t),Jh&&mOe(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Vn)||r<n||o>n+this.node.content.size)return null;let i=t.domSelectionRange(),a=gOe(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let s=a.nodeValue,c=vOe(this.node.content,s,r-n,o-n);return c<0?null:{node:a,pos:c,text:s}}else return{node:a,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new lOe(this,i,n,o);t.input.compositionNodes.push(a),this.children=ND(this.children,r,r+o.length,t,a)}update(t,n,r,o){return this.dirty==bl||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Qa}updateOuterDeco(t){if(PD(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=O8(this.dom,this.nodeDOM,MD(this.outerDeco,this.node,n),MD(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function T8(e,t,n,r,o){M8(r,t,e);let i=new Mu(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Gw extends Mu{constructor(t,n,r,o,i,a,s){super(t,n,r,o,i,null,a,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==bl||this.dirty!=Qa&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Qa||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Qa,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new Gw(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=bl)}get domAtom(){return!1}}class D8 extends pv{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Qa&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class cOe extends Mu{constructor(t,n,r,o,i,a,s,c,f,p){super(t,n,r,o,i,a,s,f,p),this.spec=c}update(t,n,r,o){if(this.dirty==bl)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function A8(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=P8(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof lf){let c=r?r.previousSibling:e.lastChild;A8(a.contentDOM,a.children,n),r=c?c.nextSibling:e.firstChild}}for(;r;)r=P8(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const mv=function(e){e&&(this.nodeName=e)};mv.prototype=Object.create(null);const $d=[new mv];function MD(e,t,n){if(e.length==0)return $d;let r=n?$d[0]:new mv,o=[r];for(let i=0;i<e.length;i++){let a=e[i].type.attrs;if(a){a.nodeName&&o.push(r=new mv(a.nodeName));for(let s in a){let c=a[s];c!=null&&(n&&o.length==1&&o.push(r=new mv(t.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+c:s=="style"?r.style=(r.style?r.style+";":"")+c:s!="nodeName"&&(r[s]=c))}}}return o}function O8(e,t,n,r){if(n==$d&&r==$d)return t;let o=t;for(let i=0;i<r.length;i++){let a=r[i],s=n[i];if(i){let c;s&&s.nodeName==a.nodeName&&o!=e&&(c=o.parentNode)&&c.nodeName.toLowerCase()==a.nodeName||(c=document.createElement(a.nodeName),c.pmIsDeco=!0,c.appendChild(o),s=$d[0]),o=c}uOe(o,s||$d[0],a)}return o}function uOe(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&e.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&e.classList.add(o[i]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(t.style);)e.style.removeProperty(o[1])}n.style&&(e.style.cssText+=n.style)}}function M8(e,t,n){return O8(e,e,$d,MD(t,n,e.nodeType!=1))}function PD(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function P8(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class dOe{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=fOe(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let o=0,i=this.stack.length>>1,a=Math.min(i,t.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Qa,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let f=this.top.children[c];if(f.matchesMark(t[i])&&!this.isLocked(f.dom)){s=c;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let c=lf.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(t,n,r))i=this.top.children.indexOf(a,this.index);else for(let s=this.index,c=Math.min(this.top.children.length,s+5);s<c;s++){let f=this.top.children[s];if(f.matchesNode(t,n,r)&&!this.preMatch.matched.has(f)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,n,r,o,i){let a=this.top.children[o];return a.dirty==bl&&a.dom==a.contentDOM&&(a.dirty=Ld),a.update(t,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}t=n}}updateNextNode(t,n,r,o,i,a){for(let s=this.index;s<this.top.children.length;s++){let c=this.top.children[s];if(c instanceof Mu){let f=this.preMatch.matched.get(c);if(f!=null&&f!=i)return!1;let p=c.dom,m,v=this.isLocked(p)&&!(t.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==t.text&&c.dirty!=bl&&PD(n,c.outerDeco));if(!v&&c.update(t,n,r,o))return this.destroyBetween(this.index,s),c.dom!=p&&(this.changed=!0),this.index++,!0;if(!v&&(m=this.recreateWrapper(c,t,n,r,o,a)))return this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Ld,m.updateChildren(o,a+1),m.dirty=Qa),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,o,i,a){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content))return null;let s=Mu.create(this.top,n,r,o,i,a);if(s.contentDOM){s.children=t.children,t.children=[];for(let c of s.children)c.parent=s}return t.destroy(),s}addNode(t,n,r,o,i){let a=Mu.create(this.top,t,n,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(t,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(t)&&(t==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new E8(this.top,t,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof lf;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof Gw)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((zi||Ai)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new D8(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function fOe(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let f=n.children[r-1];if(f instanceof lf)n=f,r=f.children.length;else{s=f,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function hOe(e,t){return e.type.side-t.type.side}function pOe(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let f=0;f<e.childCount;f++){let p=e.child(f);r(p,o,t.forChild(i,p),f),i+=p.nodeSize}return}let a=0,s=[],c=null;for(let f=0;;){let p,m;for(;a<o.length&&o[a].to==i;){let k=o[a++];k.widget&&(p?(m||(m=[p])).push(k):p=k)}if(p)if(m){m.sort(hOe);for(let k=0;k<m.length;k++)n(m[k],f,!!c)}else n(p,f,!!c);let v,y;if(c)y=-1,v=c,c=null;else if(f<e.childCount)y=f,v=e.child(f++);else break;for(let k=0;k<s.length;k++)s[k].to<=i&&s.splice(k--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let w=i+v.nodeSize;if(v.isText){let k=w;a<o.length&&o[a].from<k&&(k=o[a].from);for(let T=0;T<s.length;T++)s[T].to<k&&(k=s[T].to);k<w&&(c=v.cut(k-i),v=v.cut(0,k-i),w=k,y=-1)}else for(;a<o.length&&o[a].to<w;)a++;let C=v.isInline&&!v.isLeaf?s.filter(k=>!k.inline):s.slice();r(v,C,t.forChild(i,v),y),i=w}}function mOe(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function gOe(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=gl(e)}else if(e.nodeType==1&&t<e.childNodes.length)e=e.childNodes[t],t=0;else return null}}function vOe(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let a=e.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let c=a.text;for(;o<e.childCount;){let f=e.child(o++);if(i+=f.nodeSize,!f.isText)break;c+=f.text}if(i>=n){if(i>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let f=s<r?c.lastIndexOf(t,r-s-1):-1;if(f>=0&&f+t.length+s>=n)return s+f;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function ND(e,t,n,r,o){let i=[];for(let a=0,s=0;a<e.length;a++){let c=e[a],f=s,p=s+=c.size;f>=n||p<=t?i.push(c):(f<t&&i.push(c.slice(0,t-f,r)),o&&(i.push(o),o=void 0),p>n&&i.push(c.slice(n-f,c.size,r)))}return i}function _D(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),c,f;if(O1(n)){for(c=s;o&&!o.node;)o=o.parent;let p=o.node;if(o&&p.isAtom&&zn.isSelectable(p)&&o.parent&&!(p.isInline&&VAe(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;f=new zn(a==m?s:r.resolve(m))}}else{let p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(p<0)return null;c=r.resolve(p)}if(!f){let p=t=="pointer"||e.state.selection.head<s.pos&&!i?1:-1;f=ID(e,c,s,p)}return f}function N8(e){return e.editable?e.hasFocus():B8(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ac(e,t=!1){let n=e.state.selection;if(L8(e,n),!!N8(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ai){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Rd(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)yOe(e);else{let{anchor:r,head:o}=n,i,a;_8&&!(n instanceof Vn)&&(n.$from.parent.inlineContent||(i=R8(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=R8(e,n.to))),e.docView.setSelection(r,o,e.root,t),_8&&(i&&I8(i),a&&I8(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&bOe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const _8=zi||Ai&&WAe<63;function R8(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(zi&&o&&o.contentEditable=="false")return RD(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return RD(o);if(i)return RD(i)}}function RD(e){return e.contentEditable="true",zi&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function I8(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function bOe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!N8(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function yOe(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,Bi(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&oa&&iu<=11&&(r.disabled=!0,r.disabled=!1)}function L8(e,t){if(t instanceof zn){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&($8(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else $8(e)}function $8(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ID(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Vn.between(t,n,r)}function F8(e){return e.editable&&!e.hasFocus()?!1:B8(e)}function B8(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function xOe(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Rd(t.node,t.offset,n.anchorNode,n.anchorOffset)}function LD(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&ur.findFrom(i,t)}function su(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function z8(e,t,n){let r=e.state.selection;if(r instanceof Vn)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return su(e,new Vn(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=LD(e.state,t);return o&&o instanceof zn?su(e,o):!1}else if(!(Ja&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?zn.isSelectable(i)?su(e,new zn(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):fv?su(e,new Vn(e.state.doc.resolve(t<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof zn&&r.node.isInline)return su(e,new Vn(t>0?r.$to:r.$from));{let o=LD(e.state,t);return o?su(e,o):!1}}}function M1(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function gv(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ep(e,t){return t<0?wOe(e):COe(e)}function wOe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(Es&&n.nodeType==1&&r<M1(n)&&gv(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(gv(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(V8(n))break;{let s=n.previousSibling;for(;s&&gv(s,-1);)o=n.parentNode,i=Bi(s),s=s.previousSibling;if(s)n=s,r=M1(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?$D(e,n,r):o&&$D(e,o,i)}function COe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=M1(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(gv(s,1))i=n,a=++r;else break}else{if(V8(n))break;{let s=n.nextSibling;for(;s&&gv(s,1);)i=s.parentNode,a=Bi(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=M1(n);else{if(n=n.parentNode,n==e.dom)break;r=o=0}}}i&&$D(e,i,a)}function V8(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function SOe(e,t){for(;e&&t==e.childNodes.length&&!kD(e);)t=Bi(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function kOe(e,t){for(;e&&!t&&!kD(e);)t=Bi(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function $D(e,t,n){if(t.nodeType!=3){let i,a;(a=SOe(t,n))?(t=a,n=0):(i=kOe(t,n))&&(t=i,n=i.nodeValue.length)}let r=e.domSelection();if(O1(r)){let i=document.createRange();i.setEnd(t,n),i.setStart(t,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&ac(e)},50)}function H8(e,t){let n=e.state.doc.resolve(t);if(!(Ai||YAe)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(t<n.end()){let i=e.coordsAtPos(t+1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function j8(e,t,n){let r=e.state.selection;if(r instanceof Vn&&!r.empty||n.indexOf("s")>-1||Ja&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=LD(e.state,t);if(a&&a instanceof zn)return su(e,a)}if(!o.parent.inlineContent){let a=t<0?o:i,s=r instanceof qi?ur.near(a,t):ur.findFrom(a,t);return s?su(e,s):!1}return!1}function W8(e,t){if(!(e.state.selection instanceof Vn))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=e.state.tr;return t<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),e.dispatch(a),!0}return!1}function Y8(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function EOe(e){if(!zi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Y8(e,r,"true"),setTimeout(()=>Y8(e,r,"false"),20)}return!1}function TOe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function DOe(e,t){let n=t.keyCode,r=TOe(t);if(n==8||Ja&&n==72&&r=="c")return W8(e,-1)||ep(e,-1);if(n==46&&!t.shiftKey||Ja&&n==68&&r=="c")return W8(e,1)||ep(e,1);if(n==13||n==27)return!0;if(n==37||Ja&&n==66&&r=="c"){let o=n==37?H8(e,e.state.selection.from)=="ltr"?-1:1:-1;return z8(e,o,r)||ep(e,o)}else if(n==39||Ja&&n==70&&r=="c"){let o=n==39?H8(e,e.state.selection.from)=="ltr"?1:-1:1;return z8(e,o,r)||ep(e,o)}else{if(n==38||Ja&&n==80&&r=="c")return j8(e,-1,r)||ep(e,-1);if(n==40||Ja&&n==78&&r=="c")return EOe(e)||j8(e,1,r)||ep(e,1);if(r==(Ja?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function U8(e,t){e.someProp("transformCopied",y=>{t=y(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let y=r.firstChild;n.push(y.type.name,y.attrs!=y.type.defaultAttrs?y.attrs:null),r=y.content}let a=e.someProp("clipboardSerializer")||$s.fromSchema(e.state.schema),s=e9(),c=s.createElement("div");c.appendChild(a.serializeFragment(r,{document:s}));let f=c.firstChild,p,m=0;for(;f&&f.nodeType==1&&(p=J8[f.nodeName.toLowerCase()]);){for(let y=p.length-1;y>=0;y--){let w=s.createElement(p[y]);for(;c.firstChild;)w.appendChild(c.firstChild);c.appendChild(w),m++}f=c.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${o} ${i}${m?` -${m}`:""} ${JSON.stringify(n)}`);let v=e.someProp("clipboardTextSerializer",y=>y(t,e))||t.content.textBetween(0,t.content.size,`
|
|
1308
1308
|
|
|
1309
1309
|
`);return{dom:c,text:v}}function q8(e,t,n,r,o){let i=o.parent.type.spec.code,a,s;if(!n&&!t)return null;let c=t&&(r||i||!n);if(c){if(e.someProp("transformPastedText",v=>{t=v(t,i||r,e)}),i)return t?new gn(Ht.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
1310
|
-
`))),0,0):gn.empty;let m=e.someProp("clipboardTextParser",v=>v(t,o,r,e));if(m)s=m;else{let v=o.marks(),{schema:y}=e.state,w=$s.fromSchema(y);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(C=>{let k=a.appendChild(document.createElement("p"));C&&k.appendChild(w.serializeNode(y.text(C,v)))})}}else e.someProp("transformPastedHTML",m=>{n=m(n,e)}),a=AOe(n),fv&&OOe(a);let f=a&&a.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let m=+p[3];m>0;m--){let v=a.firstChild;for(;v&&v.nodeType!=1;)v=v.nextSibling;if(!v)break;a=v}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||lD.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||p),context:o,ruleFromNode(v){return v.nodeName=="BR"&&!v.nextSibling&&v.parentNode&&!TOe.test(v.parentNode.nodeName)?{ignore:!0}:null}})),p)s=MOe(Z8(s,+p[1],+p[2]),p[4]);else if(s=gn.maxOpen(DOe(s.content,o),!0),s.openStart||s.openEnd){let m=0,v=0;for(let y=s.content.firstChild;m<s.openStart&&!y.type.spec.isolating;m++,y=y.firstChild);for(let y=s.content.lastChild;v<s.openEnd&&!y.type.spec.isolating;v++,y=y.lastChild);s=Z8(s,m,v)}return e.someProp("transformPasted",m=>{s=m(s,e)}),s}const TOe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function DOe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(s=>{if(!a)return;let c=o.findWrapping(s.type),f;if(!c)return a=null;if(f=a.length&&i.length&&G8(c,i,s,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=X8(a[a.length-1],i.length));let p=K8(s,c);a.push(p),o=o.matchType(p.type),i=c}}),a)return Ht.from(a)}return e}function K8(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Ht.from(e));return e}function G8(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=G8(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(Ht.from(K8(n,e,o+1))))}}function X8(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,X8(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Ht.empty,!0);return e.copy(n.append(r))}function FD(e,t,n,r,o,i){let a=t<0?e.firstChild:e.lastChild,s=a.content;return e.childCount>1&&(i=0),o<r-1&&(s=FD(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Ht.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Z8(e,t,n){return t<e.openStart&&(e=new gn(FD(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new gn(FD(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const J8={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Q8=null;function e9(){return Q8||(Q8=document.implementation.createHTMLDocument("title"))}function AOe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=e9().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&J8[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=e,o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function OOe(e){let t=e.querySelectorAll(Ai?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function MOe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:o,openStart:i,openEnd:a}=e;for(let s=r.length-2;s>=0;s-=2){let c=n.nodes[r[s]];if(!c||c.hasRequiredAttrs())break;o=Ht.from(c.create(r[s+1],o)),i++,a++}return new gn(o,i,a)}const Vi={},Hi={},POe={touchstart:!0,touchmove:!0};class NOe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _Oe(e){for(let t in Vi){let n=Vi[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{IOe(e,r)&&!zD(e,r)&&(e.editable||!(r.type in Hi))&&n(e,r)},POe[t]?{passive:!0}:void 0)}zi&&e.dom.addEventListener("input",()=>null),BD(e)}function lu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ROe(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function BD(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>zD(e,r))})}function zD(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function IOe(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function LOe(e,t){!zD(e,t)&&Vi[t.type]&&(e.editable||!(t.type in Hi))&&Vi[t.type](e,t)}Hi.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!n9(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ts&&Ai&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Jh&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Id(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||EOe(e,n)?n.preventDefault():lu(e,"key")},Hi.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Hi.keypress=(e,t)=>{let n=t;if(n9(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ja&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Vn)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function P1(e){return{left:e.clientX,top:e.clientY}}function $Oe(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function VD(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(e.someProp(t,s=>a>i.depth?s(e,n,i.nodeAfter,i.before(a),o,!0):s(e,n,i.node(a),i.before(a),o,!1)))return!0;return!1}function tp(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function FOe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&zn.isSelectable(r)?(tp(e,new zn(n),"pointer"),!0):!1}function BOe(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof zn&&(r=n.node);let i=e.state.doc.resolve(t);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(zn.isSelectable(s)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(a);break}}return o!=null?(tp(e,zn.create(e.state.doc,o),"pointer"),!0):!1}function zOe(e,t,n,r,o){return VD(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?BOe(e,n):FOe(e,n))}function VOe(e,t,n,r){return VD(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function HOe(e,t,n,r){return VD(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||jOe(e,n,r)}function jOe(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(tp(e,Vn.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)tp(e,Vn.create(r,s+1,s+1+a.content.size),"pointer");else if(zn.isSelectable(a))tp(e,zn.create(r,s),"pointer");else continue;return!0}}function HD(e){return N1(e)}const t9=Ja?"metaKey":"ctrlKey";Vi.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=HD(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&$Oe(n,e.input.lastClick)&&!n[t9]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=e.posAtCoords(P1(n));a&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new WOe(e,a,n,!!r)):(i=="doubleClick"?VOe:HOe)(e,a.pos,a.inside,n)?n.preventDefault():lu(e,"pointer"))};class WOe{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[t9],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{let p=t.state.doc.resolve(n.pos);i=p.parent,a=p.depth?p.before():0}const s=o?null:r.target,c=s?t.docView.nearestDesc(s,!0):null;this.target=c?c.dom:null;let{selection:f}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof zn&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Es&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),lu(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ac(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(P1(t))),this.updateAllowDefault(t),this.allowDefault||!n?lu(this.view,"pointer"):zOe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||zi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ai&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(tp(this.view,ur.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):lu(this.view,"pointer")}move(t){this.updateAllowDefault(t),lu(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Vi.touchstart=e=>{e.input.lastTouch=Date.now(),HD(e),lu(e,"pointer")},Vi.touchmove=e=>{e.input.lastTouch=Date.now(),lu(e,"pointer")},Vi.contextmenu=e=>HD(e);function n9(e,t){return e.composing?!0:zi&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const YOe=Ts?5e3:-1;Hi.compositionstart=Hi.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),N1(e,!0),e.markCursor=null;else if(N1(e),Es&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(a.nodeType==3){e.domSelection().collapse(a,a.nodeValue.length);break}else o=a,i=-1}}e.input.composing=!0}r9(e,YOe)},Hi.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,r9(e,20))};function r9(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>N1(e),t))}function o9(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=UOe());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function UOe(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function N1(e,t=!1){if(!(Ts&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),o9(e),t||e.docView&&e.docView.dirty){let n=_D(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function qOe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const vv=oa&&iu<15||Jh&&WAe<604;Vi.copy=Hi.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=vv?null:n.clipboardData,a=r.content(),{dom:s,text:c}=U8(e,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",c)):qOe(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function KOe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function GOe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?bv(e,r.value,null,o,t):bv(e,r.textContent,r.innerHTML,o,t)},50)}function bv(e,t,n,r,o){let i=q8(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,o,i||gn.empty)))return!0;if(!i)return!1;let a=KOe(i),s=a?e.state.tr.replaceSelectionWith(a,r):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function i9(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Hi.paste=(e,t)=>{let n=t;if(e.composing&&!Ts)return;let r=vv?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&bv(e,i9(r),r.getData("text/html"),o,n)?n.preventDefault():GOe(e,n)};class a9{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const s9=Ja?"altKey":"ctrlKey";Vi.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(P1(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof zn?o.to-1:o.to))){if(r&&r.mightDrag)a=zn.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let p=e.docView.nearestDesc(n.target,!0);p&&p.node.type.spec.draggable&&p!=e.docView&&(a=zn.create(e.state.doc,p.posBefore))}}let s=(a||e.state.selection).content(),{dom:c,text:f}=U8(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(vv?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",vv||n.dataTransfer.setData("text/plain",f),e.dragging=new a9(s,!n[s9],a)},Vi.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Hi.dragover=Hi.dragenter=(e,t)=>t.preventDefault(),Hi.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(P1(n));if(!o)return;let i=e.state.doc.resolve(o.pos),a=r&&r.slice;a?e.someProp("transformPasted",w=>{a=w(a,e)}):a=q8(e,i9(n.dataTransfer),vv?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&!n[s9]);if(e.someProp("handleDrop",w=>w(e,n,a||gn.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let c=a?CDe(e.state.doc,i.pos,a):i.pos;c==null&&(c=i.pos);let f=e.state.tr;if(s){let{node:w}=r;w?w.replace(f):f.deleteSelection()}let p=f.mapping.map(c),m=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,v=f.doc;if(m?f.replaceRangeWith(p,p,a.content.firstChild):f.replaceRange(p,p,a),f.doc.eq(v))return;let y=f.doc.resolve(p);if(m&&zn.isSelectable(a.content.firstChild)&&y.nodeAfter&&y.nodeAfter.sameMarkup(a.content.firstChild))f.setSelection(new zn(y));else{let w=f.mapping.map(c);f.mapping.maps[f.mapping.maps.length-1].forEach((C,k,T,E)=>w=E),f.setSelection(ID(e,y,f.doc.resolve(w)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))},Vi.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ac(e)},20))},Vi.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Vi.beforeinput=(e,t)=>{if(Ai&&Ts&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Id(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Hi)Vi[e]=Hi[e];function yv(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Xw{constructor(t,n){this.toDOM=t,this.spec=n||Fd,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:a}=t.mapResult(n.from+o,this.side<0?-1:1);return a?null:new fo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Xw&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&yv(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Pu{constructor(t,n){this.attrs=t,this.spec=n||Fd}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,a=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new fo(i,a,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Pu&&yv(this.attrs,t.attrs)&&yv(this.spec,t.spec)}static is(t){return t.type instanceof Pu}destroy(){}}class fM{constructor(t,n){this.attrs=t,this.spec=n||Fd}map(t,n,r,o){let i=t.mapResult(n.from+o,1);if(i.deleted)return null;let a=t.mapResult(n.to+o,-1);return a.deleted||a.pos<=i.pos?null:new fo(i.pos-r,a.pos-r,this)}valid(t,n){let{index:r,offset:o}=t.content.findIndex(n.from),i;return o==n.from&&!(i=t.child(r)).isText&&o+i.nodeSize==n.to}eq(t){return this==t||t instanceof fM&&yv(this.attrs,t.attrs)&&yv(this.spec,t.spec)}destroy(){}}class fo{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new fo(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new fo(t,t,new Xw(n,r))}static inline(t,n,r,o){return new fo(t,n,new Pu(r,o))}static node(t,n,r,o){return new fo(t,n,new fM(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pu}get widget(){return this.type instanceof Xw}}const np=[],Fd={};class wr{constructor(t,n){this.local=t.length?t:np,this.children=n.length?n:np}static create(t,n){return n.length?_1(n,t,0,Fd):Oi}find(t,n,r){let o=[];return this.findInner(t??0,n??1e9,o,0,r),o}findInner(t,n,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=n&&s.to>=t&&(!i||i(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>t){let s=this.children[a]+1;this.children[a+2].findInner(t-s,n-s,r,o+s,i)}}map(t,n,r){return this==Oi||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Fd)}mapInner(t,n,r,o,i){let a;for(let s=0;s<this.local.length;s++){let c=this.local[s].map(t,r,o);c&&c.type.valid(n,c)?(a||(a=[])).push(c):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?XOe(this.children,a||[],t,n,r,o,i):a?new wr(a.sort(Bd),np):Oi}add(t,n){return n.length?this==Oi?wr.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let o,i=0;t.forEach((s,c)=>{let f=c+r,p;if(p=c9(n,s,f)){for(o||(o=this.children.slice());i<o.length&&o[i]<c;)i+=3;o[i]==c?o[i+2]=o[i+2].addInner(s,p,f+1):o.splice(i,0,c,c+s.nodeSize,_1(p,s,f+1,Fd)),i+=3}});let a=l9(i?u9(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||a.splice(s--,1);return new wr(a.length?this.local.concat(a).sort(Bd):this.local,o||this.children)}remove(t){return t.length==0||this==Oi?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let a,s=r[i]+n,c=r[i+1]+n;for(let p=0,m;p<t.length;p++)(m=t[p])&&m.from>s&&m.to<c&&(t[p]=null,(a||(a=[])).push(m));if(!a)continue;r==this.children&&(r=this.children.slice());let f=r[i+2].removeInner(a,s+1);f!=Oi?r[i+2]=f:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<t.length;i++)if(a=t[i])for(let s=0;s<o.length;s++)o[s].eq(a,n)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new wr(o,r):Oi}forChild(t,n){if(this==Oi)return this;if(n.isLeaf)return wr.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(r=this.children[s+2]);break}let i=t+1,a=i+n.content.size;for(let s=0;s<this.local.length;s++){let c=this.local[s];if(c.from<a&&c.to>i&&c.type instanceof Pu){let f=Math.max(i,c.from)-i,p=Math.min(a,c.to)-i;f<p&&(o||(o=[])).push(c.copy(f,p))}}if(o){let s=new wr(o.sort(Bd),np);return r?new Nu([s,r]):s}return r||Oi}eq(t){if(this==t)return!0;if(!(t instanceof wr)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return jD(this.localsInner(t))}localsInner(t){if(this==Oi)return np;if(t.inlineContent||!this.local.some(Pu.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Pu||n.push(this.local[r]);return n}}wr.empty=new wr([],[]),wr.removeOverlap=jD;const Oi=wr.empty;class Nu{constructor(t){this.members=t}map(t,n){const r=this.members.map(o=>o.map(t,n,Fd));return Nu.from(r)}forChild(t,n){if(n.isLeaf)return wr.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(t,n);i!=Oi&&(i instanceof Nu?r=r.concat(i.members):r.push(i))}return Nu.from(r)}eq(t){if(!(t instanceof Nu)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(t);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?jD(r?n:n.sort(Bd)):np}static from(t){switch(t.length){case 0:return Oi;case 1:return t[0];default:return new Nu(t.every(n=>n instanceof wr)?t:t.reduce((n,r)=>n.concat(r instanceof wr?r:r.members),[]))}}}function XOe(e,t,n,r,o,i,a){let s=e.slice();for(let f=0,p=i;f<n.maps.length;f++){let m=0;n.maps[f].forEach((v,y,w,C)=>{let k=C-w-(y-v);for(let T=0;T<s.length;T+=3){let E=s[T+1];if(E<0||v>E+p-m)continue;let _=s[T]+p-m;y>=_?s[T+1]=v<=_?-2:-1:v>=p&&k&&(s[T]+=k,s[T+1]+=k)}m+=k}),p=n.maps[f].map(p,-1)}let c=!1;for(let f=0;f<s.length;f+=3)if(s[f+1]<0){if(s[f+1]==-2){c=!0,s[f+1]=-1;continue}let p=n.map(e[f]+i),m=p-o;if(m<0||m>=r.content.size){c=!0;continue}let v=n.map(e[f+1]+i,-1),y=v-o,{index:w,offset:C}=r.content.findIndex(m),k=r.maybeChild(w);if(k&&C==m&&C+k.nodeSize==y){let T=s[f+2].mapInner(n,k,p+1,e[f]+i+1,a);T!=Oi?(s[f]=m,s[f+1]=y,s[f+2]=T):(s[f+1]=-2,c=!0)}else c=!0}if(c){let f=ZOe(s,e,t,n,o,i,a),p=_1(f,r,0,a);t=p.local;for(let m=0;m<s.length;m+=3)s[m+1]<0&&(s.splice(m,3),m-=3);for(let m=0,v=0;m<p.children.length;m+=3){let y=p.children[m];for(;v<s.length&&s[v]<y;)v+=3;s.splice(v,0,p.children[m],p.children[m+1],p.children[m+2])}}return new wr(t.sort(Bd),s)}function l9(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new fo(o.from+t,o.to+t,o.type))}return n}function ZOe(e,t,n,r,o,i,a){function s(c,f){for(let p=0;p<c.local.length;p++){let m=c.local[p].map(r,o,f);m?n.push(m):a.onRemove&&a.onRemove(c.local[p].spec)}for(let p=0;p<c.children.length;p+=3)s(c.children[p+2],c.children[p]+f+1)}for(let c=0;c<e.length;c+=3)e[c+1]==-1&&s(e[c+2],t[c]+i+1);return n}function c9(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let i=0,a;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function u9(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function _1(e,t,n,r){let o=[],i=!1;t.forEach((s,c)=>{let f=c9(e,s,c+n);if(f){i=!0;let p=_1(f,s,n+c+1,r);p!=Oi&&o.push(c,c+s.nodeSize,p)}});let a=l9(i?u9(e):e,-n).sort(Bd);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new wr(a,o):Oi}function Bd(e,t){return e.from-t.from||e.to-t.to}function jD(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from==r.from){i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),d9(t,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),d9(t,o,r.copy(i.from,r.to)));break}}}return t}function d9(e,t,n){for(;t<e.length&&Bd(n,e[t])>0;)t++;e.splice(t,0,n)}function WD(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Oi&&t.push(r)}),e.cursorWrapper&&t.push(wr.create(e.state.doc,[e.cursorWrapper.deco])),Nu.from(t)}const JOe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},QOe=oa&&iu<=11;class eMe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class tMe{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new eMe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);oa&&iu<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),QOe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,JOe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(F8(this.view)){if(this.suppressingSelectionUpdates)return ac(this.view);if(oa&&iu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Rd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=dv(i))n.add(i);for(let i=t.anchorNode;i;i=dv(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&F8(t)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,c=[];if(t.editable)for(let p=0;p<n.length;p++){let m=this.registerMutation(n[p],c);m&&(i=i<0?m.from:Math.min(m.from,i),a=a<0?m.to:Math.max(m.to,a),m.typeOver&&(s=!0))}if(Es&&c.length>1){let p=c.filter(m=>m.nodeName=="BR");if(p.length==2){let m=p[0],v=p[1];m.parentNode&&m.parentNode.parentNode==v.parentNode?v.remove():m.remove()}}let f=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&O1(r)&&(f=_D(t))&&f.eq(ur.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,ac(t),this.currentSelection.set(r),t.scrollToSelection()):(i>-1||o)&&(i>-1&&(t.docView.markDirty(i,a),nMe(t)),this.handleDOMChange(i,a,s,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ac(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let p=0;p<t.addedNodes.length;p++)n.push(t.addedNodes[p]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let o=t.previousSibling,i=t.nextSibling;if(oa&&iu<=11&&t.addedNodes.length)for(let p=0;p<t.addedNodes.length;p++){let{previousSibling:m,nextSibling:v}=t.addedNodes[p];(!m||Array.prototype.indexOf.call(t.addedNodes,m)<0)&&(o=m),(!v||Array.prototype.indexOf.call(t.addedNodes,v)<0)&&(i=v)}let a=o&&o.parentNode==t.target?Bi(o)+1:0,s=r.localPosFromDOM(t.target,a,-1),c=i&&i.parentNode==t.target?Bi(i):t.target.childNodes.length,f=r.localPosFromDOM(t.target,c,1);return{from:s,to:f}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}}let f9=new WeakMap,h9=!1;function nMe(e){if(!f9.has(e)&&(f9.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Es,h9)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),h9=!0}}function rMe(e){let t;function n(c){c.preventDefault(),c.stopImmediatePropagation(),t=c.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Rd(s.node,s.offset,i,a)&&([r,o,i,a]=[i,a,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}}function oMe(e,t,n){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),f,p=c.anchorNode;if(p&&e.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:c.anchorOffset}],O1(c)||f.push({node:c.focusNode,offset:c.focusOffset})),Ai&&e.input.lastKeyCode===8)for(let k=i;k>o;k--){let T=r.childNodes[k-1],E=T.pmViewDesc;if(T.nodeName=="BR"&&!E){i=k;break}if(!E||E.size)break}let m=e.state.doc,v=e.someProp("domParser")||lD.fromSchema(e.state.schema),y=m.resolve(a),w=null,C=v.parse(r,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:o,to:i,preserveWhitespace:y.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:iMe,context:y});if(f&&f[0].pos!=null){let k=f[0].pos,T=f[1]&&f[1].pos;T==null&&(T=k),w={anchor:k+a,head:T+a}}return{doc:C,sel:w,from:a,to:s}}function iMe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(zi&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||zi&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const aMe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function sMe(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let Y=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,J=_D(e,Y);if(J&&!e.state.selection.eq(J)){if(Ai&&Ts&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",ee=>ee(e,Id(13,"Enter"))))return;let K=e.state.tr.setSelection(J);Y=="pointer"?K.setMeta("pointer",!0):Y=="key"&&K.scrollIntoView(),i&&K.setMeta("composition",i),e.dispatch(K)}return}let a=e.state.doc.resolve(t),s=a.sharedDepth(n);t=a.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,f=oMe(e,t,n),p=e.state.doc,m=p.slice(f.from,f.to),v,y;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(v=e.state.selection.to,y="end"):(v=e.state.selection.from,y="start"),e.input.lastKeyCode=null;let w=uMe(m.content,f.doc.content,f.from,v,y);if((Jh&&e.input.lastIOSEnter>Date.now()-225||Ts)&&o.some(Y=>Y.nodeType==1&&!aMe.test(Y.nodeName))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",Y=>Y(e,Id(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!w)if(r&&c instanceof Vn&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))w={start:c.from,endA:c.to,endB:c.to};else{if(f.sel){let Y=p9(e,e.state.doc,f.sel);if(Y&&!Y.eq(e.state.selection)){let J=e.state.tr.setSelection(Y);i&&J.setMeta("composition",i),e.dispatch(J)}}return}if(Ai&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from&&f.sel.head==f.sel.anchor){let Y=w.endB-w.start;f.sel={anchor:f.sel.anchor+Y,head:f.sel.anchor+Y}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof Vn&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=f.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),oa&&iu<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>f.from&&f.doc.textBetween(w.start-f.from-1,w.start-f.from+1)==" \xA0"&&(w.start--,w.endA--,w.endB--);let C=f.doc.resolveNoCache(w.start-f.from),k=f.doc.resolveNoCache(w.endB-f.from),T=p.resolve(w.start),E=C.sameParent(k)&&C.parent.inlineContent&&T.end()>=w.endA,_;if((Jh&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some(Y=>Y.nodeName=="DIV"||Y.nodeName=="P"))||!E&&C.pos<f.doc.content.size&&!C.sameParent(k)&&(_=ur.findFrom(f.doc.resolve(C.pos+1),1,!0))&&_.head==k.pos)&&e.someProp("handleKeyDown",Y=>Y(e,Id(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>w.start&&cMe(p,w.start,w.endA,C,k)&&e.someProp("handleKeyDown",Y=>Y(e,Id(8,"Backspace")))){Ts&&Ai&&e.domObserver.suppressSelectionUpdates();return}Ai&&Ts&&w.endB==w.start&&(e.input.lastAndroidDelete=Date.now()),Ts&&!E&&C.start()!=k.start()&&k.parentOffset==0&&C.depth==k.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==w.endA&&(w.endB-=2,k=f.doc.resolveNoCache(w.endB-f.from),setTimeout(()=>{e.someProp("handleKeyDown",function(Y){return Y(e,Id(13,"Enter"))})},20));let R=w.start,P=w.endA,$,z,q;if(E){if(C.pos==k.pos)oa&&iu<=11&&C.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ac(e),20)),$=e.state.tr.delete(R,P),z=p.resolve(w.start).marksAcross(p.resolve(w.endA));else if(w.endA==w.endB&&(q=lMe(C.parent.content.cut(C.parentOffset,k.parentOffset),T.parent.content.cut(T.parentOffset,w.endA-T.start()))))$=e.state.tr,q.type=="add"?$.addMark(R,P,q.mark):$.removeMark(R,P,q.mark);else if(C.parent.child(C.index()).isText&&C.index()==k.index()-(k.textOffset?0:1)){let Y=C.parent.textBetween(C.parentOffset,k.parentOffset);if(e.someProp("handleTextInput",J=>J(e,R,P,Y)))return;$=e.state.tr.insertText(Y,R,P)}}if($||($=e.state.tr.replace(R,P,f.doc.slice(w.start-f.from,w.endB-f.from))),f.sel){let Y=p9(e,$.doc,f.sel);Y&&!(Ai&&Ts&&e.composing&&Y.empty&&(w.start!=w.endB||e.input.lastAndroidDelete<Date.now()-100)&&(Y.head==R||Y.head==$.mapping.map(P)-1)||oa&&Y.empty&&Y.head==R)&&$.setSelection(Y)}z&&$.ensureMarks(z),i&&$.setMeta("composition",i),e.dispatch($.scrollIntoView())}function p9(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ID(e,t.resolve(n.anchor),t.resolve(n.head))}function lMe(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,a,s,c;for(let p=0;p<r.length;p++)o=r[p].removeFromSet(o);for(let p=0;p<n.length;p++)i=n[p].removeFromSet(i);if(o.length==1&&i.length==0)s=o[0],a="add",c=p=>p.mark(s.addToSet(p.marks));else if(o.length==0&&i.length==1)s=i[0],a="remove",c=p=>p.mark(s.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<t.childCount;p++)f.push(c(t.child(p)));if(Ht.from(f).eq(e))return{mark:s,type:a}}function cMe(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||YD(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=e.resolve(YD(i,!0,!0));return!a.parent.isTextblock||a.pos>n||YD(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function YD(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function uMe(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let c=Math.max(0,i-Math.min(a,s));r-=a+c-i}if(a<i&&e.size<t.size){let c=r<=i&&r>=a?i-r:0;i-=c,i&&i<t.size&&m9(t.textBetween(i-1,i+1))&&(i+=c?1:-1),s=i+(s-a),a=i}else if(s<i){let c=r<=i&&r>=s?i-r:0;i-=c,i&&i<e.size&&m9(e.textBetween(i-1,i+1))&&(i+=c?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function m9(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class dMe{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new NOe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(x9),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=b9(this),v9(this),this.nodeViews=y9(this),this.docView=T8(this.state.doc,g9(this),WD(this),this.dom,this),this.domObserver=new tMe(this,(r,o,i,a)=>sMe(this,r,o,i,a)),this.domObserver.start(),_Oe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&BD(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(x9),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,a=!1;t.storedMarks&&this.composing&&(o9(this),a=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let y=y9(this);hMe(y,this.nodeViews)&&(this.nodeViews=y,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&BD(this),this.editable=b9(this),v9(this);let c=WD(this),f=g9(this),p=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(t.doc,f,c);(m||!t.selection.eq(o.selection))&&(a=!0);let v=p=="preserve"&&a&&this.dom.style.overflowAnchor==null&&qAe(this);if(a){this.domObserver.stop();let y=m&&(oa||Ai)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&fMe(o.selection,t.selection);if(m){let w=Ai?this.trackWrites=this.domSelectionRange().focusNode:null;(i||!this.docView.update(t.doc,f,c,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=T8(t.doc,f,c,this.dom,this)),w&&!this.trackWrites&&(y=!0)}y||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&bOe(this))?ac(this,y):(L8(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():v&&KAe(v)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof zn){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&h8(this,n.getBoundingClientRect(),t)}else h8(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new a9(t.slice,t.move,o<0?void 0:zn.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[t];if(s!=null&&(o=n?n(s):s))return o}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let s=i[a].props[t];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(oa){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&GAe(this.dom),ac(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return eOe(this,t)}coordsAtPos(t,n=1){return y8(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return iOe(this,n||this.state,t)}pasteHTML(t,n){return bv(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return bv(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(ROe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],WD(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return LOe(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return zi&&this.root.nodeType===11&&zAe(this.dom.ownerDocument)==this.dom?rMe(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function g9(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[fo.node(0,e.state.doc.content.size,t)]}function v9(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:fo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function b9(e){return!e.someProp("editable",t=>t(e.state)===!1)}function fMe(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function y9(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function hMe(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function x9(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var pMe=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},mMe=ro(pMe),w9=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},er=(e,t,n)=>(w9(e,t,"read from private field"),n?n.call(e):t.get(e)),sc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},to=(e,t,n,r)=>(w9(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function gMe(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function vMe(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function bMe(e){return!!(!e.prev&&e.next)}function yMe(e){return!!(e.prev&&!e.next)}function xMe(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function wMe(e){return e==="invalid-exit-split"}var CMe=["jump-backward-exit","jump-forward-exit"],SMe=["jump-backward-change","jump-forward-change"];function kMe(e){var t,n;return Za(CMe,(t=e.exit)==null?void 0:t.exitReason)||Za(SMe,(n=e.change)==null?void 0:n.changeReason)}function C9(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function S9(e){return ii(e)&&e instanceof Vn}function ia(e){const{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function EMe(e,t){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;return n?!new RegExp(qD(n)).test(e):new RegExp(qD(r)).test(e)}function TMe(e){const{text:t,regexp:n,$pos:r,suggester:o}=e,i=r.start();let a;return nv(t,n).forEach(s=>{const c=s.input.slice(Math.max(0,s.index-1),s.index);if(EMe(c,o)){const f=s.index+i,p=s[0],m=s[1];if(!Bn(p)||!Bn(m))return;const v=f+p.length,y=Math.min(v,r.pos),w=y-f;f<r.pos&&v>=r.pos&&(a={range:{from:f,to:v,cursor:y},match:s,query:{partial:p.slice(m.length,w),full:p.slice(m.length)},text:{partial:p.slice(0,w),full:p},textAfter:r.doc.textBetween(v,r.end(),tu,tu),textBefore:r.doc.textBetween(i,f,tu,tu),suggester:o})}}),a}function k9(e){const{$pos:t,suggester:n}=e,{char:r,name:o,startOfLine:i,supportedCharacters:a,matchOffset:s,multiline:c,caseInsensitive:f,unicode:p}=n,m=IMe({char:r,matchOffset:s,startOfLine:i,supportedCharacters:a,multiline:c,caseInsensitive:f,unicode:p}),v=t.doc.textBetween(t.before(),t.end(),tu,tu);return TMe({suggester:n,text:v,regexp:m,$pos:t,char:r,name:o})}function E9(e){const{state:t,match:n}=e;try{return k9({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function T9(e){const{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:ia({match:t,exitReason:"delete"})}:!n||!t.query.partial?{exit:ia({match:t,exitReason:"invalid-exit-split"})}:t.range.to===n.range.cursor?{exit:ia({match:n,exitReason:"exit-end"})}:t.query.partial?{exit:ia({match:n,exitReason:"exit-split"})}:{}}function DMe(e){const{prev:t,next:n,state:r}=e,o=In(),i=E9({state:r,match:t}),{exit:a}=i&&i.query.full!==t.query.full?T9({prev:t,next:i,state:r}):o;return t.range.from<n.range.from?{exit:a??ia({match:t,exitReason:"jump-forward-exit"}),change:ia({match:n,changeReason:"jump-forward-change"})}:{exit:a??ia({match:t,exitReason:"jump-backward-exit"}),change:ia({match:n,changeReason:"jump-backward-change"})}}function AMe(e){const{match:t,state:n,$pos:r}=e,{selection:o}=n,i=E9({match:t,state:n});return!i||i.text.full!==t.text.full?T9({prev:t,next:i,state:n}):!o.empty&&(o.from<=t.range.from||o.to>=t.range.to)?{exit:ia({match:t,exitReason:"selection-outside"})}:r.pos>t.range.to?{exit:ia({match:t,exitReason:"move-end"})}:r.pos<=t.range.from?{exit:ia({match:t,exitReason:"move-start"})}:{}}function OMe(e){const{prev:t,next:n,state:r,$pos:o}=e,i=In();if(!t&&!n)return i;const a={prev:t,next:n};return xMe(a)?DMe({prev:a.prev,next:a.next,state:r}):bMe(a)?{change:ia({match:a.next,changeReason:"start"})}:yMe(a)?AMe({$pos:o,match:a.prev,state:r}):gMe(a)?{change:ia({match:a.next,changeReason:"change-character"})}:vMe(a)?{change:ia({match:a.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function D9(e,t){for(let n=e.depth;n>0;n--){const r=e.node(n);if(t.includes(r.type.name))return!0}return!1}function UD(e,t){const{$from:n,$to:r}=e;return A9(e,t)?!0:nD(n.pos,r.pos).some(o=>MMe(n.doc.resolve(o),t))}function A9(e,t){const{$from:n,$to:r}=e,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return t.some(i=>o.has(i))}function MMe(e,t){const n=new Set(e.marks().map(r=>r.type.name));return t.some(r=>n.has(r))}function PMe(e,t){const{$cursor:n}=t,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:a}=e;return!r&&!o&&ks(i)&&ks(a)?!0:!(r&&!A9(t,r)||o&&!D9(n,o)||!r&&UD(t,i)||!o&&D9(n,a))}function O9(e){const{suggesters:t,$pos:n,selectionEmpty:r}=e;for(const o of t)if(!(o.emptySelectionsOnly&&!r))try{const i=k9({suggester:o,$pos:n});if(!i)continue;const a={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(PMe(o,a)&&o.isValidPosition(a,i))return i}catch{}}function qD(e){return TTe(e)?e.source:e}function NMe(e){return e?"^":""}function _Me(e,t){return`(?:${qD(e)}){${t},}`}function RMe(e){return Bn(e)?new RegExp(mMe(e)):e}function IMe(e){const{char:t,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:a=!1,multiline:s=!1,unicode:c=!1}=e,f=`g${s?"m":""}${a?"i":""}${c?"u":""}`;let p=RMe(t).source;return i&&(p=`(${p})`),new RegExp(`${NMe(r)}${p}${_Me(o,n)}`,f)}var LMe={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},M9="__ignore_prosemirror_suggest_update__",R1,xv,ai,cu,rp,yl,ti,uu,op,P9=class{constructor(e){sc(this,R1,!1),sc(this,xv,!1),sc(this,ai,void 0),sc(this,cu,void 0),sc(this,rp,void 0),sc(this,yl,In()),sc(this,ti,wr.empty),sc(this,uu,!1),sc(this,op,!1),this.setMarkRemoved=()=>{to(this,uu,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),a=ur.findFrom(i,1,!0);if(S9(a))return a},this.ignoreNextExit=()=>{to(this,xv,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=er(this,ai).find(p=>p.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const a=Bn(i.char)?i.char.length:1,s=n+a,c=i.ignoredClassName?{class:i.ignoredClassName}:{},f=fo.inline(n,s,{nodeName:i.ignoredTag,...c},{name:r,specific:o,char:i.char});to(this,ti,er(this,ti).add(this.view.state.doc,[f]))},this.removeIgnored=({from:n,name:r})=>{const o=er(this,ai).find(s=>s.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=Bn(o.char)?o.char.length:1,a=er(this,ti).find(n,n+i)[0];!a||a.spec.name!==r||to(this,ti,er(this,ti).remove([a]))},this.clearIgnored=n=>{if(!n){to(this,ti,wr.empty);return}const o=er(this,ti).find().filter(({spec:i})=>i.name===n);to(this,ti,er(this,ti).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?er(this,ai).filter(i=>i.name===r):er(this,ai);return O9({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{to(this,op,!0)};const t=N9();to(this,ai,e.map(t)),to(this,ai,Ad(er(this,ai),(n,r)=>r.priority-n.priority))}static create(e){return new P9(e)}get decorationSet(){return er(this,ti)}get removed(){return er(this,uu)}get match(){return er(this,cu)?er(this,cu):er(this,rp)&&er(this,yl).exit?er(this,rp):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:n}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:n,...e}}shouldRunExit(){return er(this,xv)?(to(this,xv,!1),!1):!0}updateWithNextSelection(e){var t,n,r;const o=this.findNextTextSelection(e.selection);if(o)for(const i of er(this,ai)){const a=(t=er(this,yl).change)==null?void 0:t.suggester.name,s=(n=er(this,yl).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,e,{change:a,exit:s})}}changeHandler(e,t){const{change:n,exit:r}=er(this,yl),o=this.match;if(!n&&!r||!C9(o))return;const i=t===r?.suggester.appendTransaction&&this.shouldRunExit(),a=t===n?.suggester.appendTransaction;if(!(!i&&!a)){if(n&&r&&kMe({change:n,exit:r})){const s=this.createProps(r),c=this.createProps(n),f=r.range.from<n.range.from;i&&r.suggester.onChange(s,e),a&&n.suggester.onChange(c,e),i&&to(this,uu,!1);return}n&&a&&n.suggester.onChange(this.createProps(n),e),r&&i&&(r.suggester.onChange(this.createProps(r),e),to(this,uu,!1),wMe(r.exitReason)&&to(this,yl,In()))}}mapIgnoredDecorations(e){const t=er(this,ti).map(e.mapping,e.doc),r=t.find().filter(({from:o,to:i,spec:a})=>{const s=Bn(a.char)?a.char.length:1;return i-o!==s});to(this,ti,t.remove(r))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return er(this,ti).find().some(({spec:o,from:i})=>i!==e.from?!1:o.specific?o.name===t:!0)}resetState(){to(this,yl,In()),to(this,cu,void 0),to(this,uu,!1),to(this,op,!1)}updateReasons(e){const{$pos:t,state:n}=e,r=er(this,R1),o=er(this,ai),i=n.selection.empty,a=S9(n.selection)?O9({suggesters:o,$pos:t,docChanged:r,selectionEmpty:i}):void 0;to(this,cu,a&&this.shouldIgnoreMatch(a)?void 0:a),to(this,yl,OMe({next:er(this,cu),prev:er(this,rp),state:n,$pos:t}))}addSuggester(e){const t=er(this,ai).find(r=>r.name===e.name),n=N9();if(t)to(this,ai,er(this,ai).map(r=>r===t?n(e):r));else{const r=[...er(this,ai),n(e)];to(this,ai,Ad(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=Bn(e)?e:e.name;to(this,ai,er(this,ai).filter(n=>n.name!==t)),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:n}=er(this,yl);if(er(this,op)&&(to(this,op,!1),!t?.suggester.appendTransaction&&!n?.suggester.appendTransaction))return this;const{tr:r,state:o}=e,i=r.docChanged||r.selectionSet;return r.getMeta(M9)||!i&&!er(this,uu)?this:(to(this,R1,r.docChanged),this.mapIgnoredDecorations(r),t&&this.resetState(),to(this,rp,er(this,cu)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(e){const t=this.match;if(!C9(t))return er(this,ti);const{disableDecorations:n}=t.suggester;if(Br(n)?n(e,t):n)return er(this,ti);const{range:o,suggester:i}=t,{name:a,suggestTag:s,suggestClassName:c}=i,{from:f,to:p}=o;return this.shouldIgnoreMatch(t)?er(this,ti):er(this,ti).add(e.doc,[fo.inline(f,p,{nodeName:s,class:a?`${c} suggest-${a}`:c},{name:a})])}},$Me=P9;R1=new WeakMap,xv=new WeakMap,ai=new WeakMap,cu=new WeakMap,rp=new WeakMap,yl=new WeakMap,ti=new WeakMap,uu=new WeakMap,op=new WeakMap;function N9(){const e=new Set;return t=>{if(e.has(t.name))throw new Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);const n={...LMe,...t};return e.add(t.name),n}}var _9=new _d("suggest");function KD(e){return _9.getState(e)}function R9(e,t){return KD(e).addSuggester(t)}function I9(e){e.setMeta(M9,!0)}function FMe(e,t){return KD(e).removeSuggester(t)}function BMe(...e){const t=$Me.create(e);return new rc({key:_9,view:n=>(t.init(n),{update:r=>t.changeHandler(r.state.tr,!1)}),state:{init:()=>t,apply:(n,r,o,i)=>t.apply({tr:n,state:i})},appendTransaction:(n,r,o)=>{const i=o.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:n=>t.createDecorations(n)}})}function GD(e,t){const n=Object.getPrototypeOf(t);let r=e.selection,o=e.doc,i=e.storedMarks;const a=In();for(const[s,c]of Object.entries(t))a[s]={value:c};return Object.create(n,{...a,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=e.selection,o=e.doc,i=e.storedMarks,e}}})}function I1(e){return({state:t,dispatch:n,view:r,tr:o})=>e(GD(o,t),n,r)}function L9(e){return t=>{var n;return _n(t.dispatch===void 0||t.dispatch===((n=t.view)==null?void 0:n.dispatch),{code:tn.NON_CHAINABLE_COMMAND}),e(t)}}var es={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return es.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return es.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return es.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return es.isNode?process.platform==="darwin":es.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return process.env.NODE_ENV==="development"},get isTest(){return process.env.NODE_ENV==="test"},get isProduction(){return process.env.NODE_ENV==="production"}};function ts(e,t){var n;const r=X9(e);return((n=r?.getComputedStyle(e))==null?void 0:n.getPropertyValue(t))??""}function Mi(e,t){return Object.assign(e.style,t)}var zMe=["px","rem","em","in","q","mm","cm","pt","pc","vh","vw","vmin","vmax"],VMe=/[\d-.]+(\w+)$/;function HMe(e="0"){const t=e||"0",n=Number.parseFloat(t),r=t.match(VMe),o=(r?.[1]??"px").toLowerCase();return[n,Za(zMe,o)?o:"px"]}var ip=96,XD=25.4,jMe=72,WMe=6;function ZD(e){if(ji(e))return ts(e,"font-size")||ZD(e.parentElement);const t=X9(e);return t?ts(t.document.documentElement,"font-size"):""}function YMe(e){const t=bPe(e),n=t.document.documentElement||t.document.body;return(r,o)=>{switch(o){case"rem":return r*$1(ZD(n));case"em":return r*$1(ZD(e),e?.parentElement);case"in":return r*ip;case"q":return r*ip/XD/4;case"mm":return r*ip/XD;case"cm":return r*ip*10/XD;case"pt":return r*ip/jMe;case"pc":return r*ip/WMe;case"vh":return(r*t.innerHeight||n.clientWidth)/100;case"vw":return(r*t.innerWidth||n.clientHeight)/100;case"vmin":return r*Math.min(t.innerWidth||n.clientWidth,t.innerHeight||n.clientHeight)/100;case"vmax":return r*Math.max(t.innerWidth||n.clientWidth,t.innerHeight||n.clientHeight)/100;default:return r}}}var L1=/^([a-z]+)\((.+)\)$/i;function $9(e,t){if(!L1.test(e))return Number.NaN;const n=HDe(e,{brackets:["()"],escape:"_",flat:!0});if(!n||n.length===0)return Number.NaN;function r(i){return i.replace(/_(\d+)_/g,(a,s)=>{const c=Number.parseFloat(s);return n[c]??""})}const o=cc(n,0);for(const i of nv(o,L1)){const a=cc(i,1),f=r(cc(i,2)).split(/\s*,\s*/).map(p=>{if(L1.test(p)){const m=r(p);return $9(m,t)}return F9(p,t)});switch(a){case"min":return Math.min(...f);case"max":return Math.max(...f);case"clamp":{const[p,m,v]=f;if(wi(p)&&wi(m)&&wi(v))return g1({min:p,max:v,value:m});break}case"calc":return Number.NaN;default:return Number.NaN}}return Number.NaN}function F9(e,t){const[n,r]=HMe(e);return t(n,r)}function $1(e,t){const n=YMe(t);return L1.test(e)?$9(e.toLowerCase(),n):F9(e,n)}function JD(e){return ii(e)&&wi(e.nodeType)&&Bn(e.nodeName)}function ji(e){return JD(e)&&e.nodeType===1}function F1(e){const{types:t,node:n}=e;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Fo(t)?t.some(r):r(t)}function UMe(e,t){const{tr:n}=t;return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function qMe({pos:e,tr:t}){const n=t.doc.nodeAt(e);return n&&t.delete(e,e+n.nodeSize),t}function KMe({pos:e,tr:t,content:n}){const r=t.doc.nodeAt(e);return r&&t.replaceWith(e,e+r.nodeSize,n),t}function ap(e){const{predicate:t,selection:n}=e,r=H9(n)?n.selection.$from:tA(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),a=o>0?r.before(o):0,s=r.start(o),c=a+i.nodeSize;if(t(i,a))return{pos:a,depth:o,node:i,start:s,end:c}}}function GMe(e){const{depth:t}=e,n=t>0?e.before(t):0,r=e.node(t),o=e.start(t),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:t}}function XMe(e){const t=ap({predicate:()=>!0,selection:e});return _n(t,{message:"No parent node found for the selection provided."}),t}function du(e){const{types:t,selection:n}=e;return ap({predicate:r=>F1({types:t,node:r}),selection:n})}function ZMe(e){const{types:t,selection:n}=e;if(!(!Sv(n)||!F1({types:t,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function QD(e){return tA(e)?e.empty:e.selection.empty}function B9(e){return e.docChanged||e.selectionSet}function z9(e){return!!wv(e)}function wv(e){const{state:t,type:n,attrs:r}=e,{selection:o,doc:i}=t,a=Bn(n)?i.type.schema.nodes[n]:n;_n(a,{code:tn.SCHEMA,message:`No node exists for ${n}`});const s=ZMe({selection:o,types:n})??ap({predicate:c=>c.type===a,selection:o});return!r||p1(r)||!s||s.node.hasMarkup(a,{...s.node.attrs,...r})?s:void 0}function B1(...e){return t=>{if(!ez(e))return!1;const[n,...r]=e;let o=!1;const i=(...c)=>()=>{if(!ez(c))return!1;o=!0;const[,...f]=c;return B1(...c)({...t,next:i(...f)})},a=i(...r),s=n({...t,next:a});return o||s?s:a()}}function JMe(e,t){const n=new Map,r=In();for(const o of e)for(const[i,a]of Qo(o)){const c=[...n.get(i)??[],a],f=B1(...c);n.set(i,c),r[i]=t(f)}return r}function QMe(e){return JMe(e,t=>(n,r,o)=>t({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function eA(e,t){const n=e.attrs??{};return Object.entries(t).every(([r,o])=>n[r]===o)}function ePe(e){return Y9(e,[xc,Bo,di,Fs])}function sp(e){return ii(e)}function lp(e,t){return Fo(t)?Za(t,e[tc]):t===e[tc]}function tPe(e){return ii(e)&&e instanceof sD}function nPe(e,t){return Bn(e)?mo(t.nodes,e):e}function V9(e){return ii(e)&&e instanceof bb}function rPe(e,t){return Bn(e)?mo(t.marks,e):e}function Cv(e){return ii(e)&&e instanceof nu}function oPe(e){return ii(e)&&e instanceof Ht}function iPe(e){return ii(e)&&e instanceof vr}function H9(e){return ii(e)&&e instanceof sf}function fu(e){return ii(e)&&e instanceof Vn}function aPe(e){return ii(e)&&e instanceof qi}function tA(e){return ii(e)&&e instanceof ur}function sPe(e){return ii(e)&&e instanceof Lp}function j9(e){const{trState:t,from:n,to:r,type:o,attrs:i={}}=e,{doc:a}=t,s=rPe(o,a.type.schema);if(Object.keys(i).length===0)return a.rangeHasMark(n,r,s);let c=!1;return r>n&&a.nodesBetween(n,r,f=>c?!1:(c=(f.marks??[]).some(m=>m.type!==s?!1:eA(m,i)),!c)),c}function Sv(e){return ii(e)&&e instanceof zn}function z1(e){const{trState:t,type:n,attrs:r={},from:o,to:i}=e,{selection:a,doc:s,storedMarks:c}=t,f=Bn(n)?s.type.schema.marks[n]:n;if(_n(f,{code:tn.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)<s.nodeSize&&j9({...e,from:o,to:i})}catch{return!1}return a.empty?(c??a.$from.marks()).some(m=>m.type!==n?!1:eA(m,r??{})):j9({...e,from:a.from,to:a.to})}function nA(e,t={}){const n=lPe(e.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=t;return r?W9(n,e):o?n.content.eq(e.content):n.eq(e)}function W9(e,t){if(e===t)return!0;const n=e.type===t.type&&vr.sameSet(e.marks,t.marks);function r(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;const o=[],i=[];e.content.forEach(a=>o.push(a)),t.content.forEach(a=>i.push(a));for(const[a,s]of o.entries()){const c=i[a];if(!c||!W9(s,c))return!1}return!0}return n&&r()}function lPe(e){var t;return((t=e.nodes.doc)==null?void 0:t.createAndFill())??void 0}function V1(e){for(const t of Object.values(e.nodes))if(t.name!=="doc"&&(t.isBlock||t.isTextblock))return t;_n(!1,{code:tn.SCHEMA,message:"No default block node found for the provided schema."})}function cPe(e){return e.type===V1(e.type.schema)}function H1(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function lc(e,t,n){const r=e.parent.childAfter(e.parentOffset);if(!r.node)return;const o=Bn(t)?t:t.name,i=r.node.marks.find(({type:m})=>m.name===o);let a=e.index(),s=e.start()+r.offset,c=a+1,f=s+r.node.nodeSize;if(!i)return n&&f<n.pos?lc(e.doc.resolve(f+1),t,n):void 0;for(;a>0&&i.isInSet(e.parent.child(a-1).marks);)a-=1,s-=e.parent.child(a).nodeSize;for(;c<e.parent.childCount&&i.isInSet(e.parent.child(c).marks);)f+=e.parent.child(c).nodeSize,c+=1;const p=e.doc.textBetween(s,f,zB,`
|
|
1310
|
+
`))),0,0):gn.empty;let m=e.someProp("clipboardTextParser",v=>v(t,o,r,e));if(m)s=m;else{let v=o.marks(),{schema:y}=e.state,w=$s.fromSchema(y);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(C=>{let k=a.appendChild(document.createElement("p"));C&&k.appendChild(w.serializeNode(y.text(C,v)))})}}else e.someProp("transformPastedHTML",m=>{n=m(n,e)}),a=MOe(n),fv&&POe(a);let f=a&&a.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let m=+p[3];m>0;m--){let v=a.firstChild;for(;v&&v.nodeType!=1;)v=v.nextSibling;if(!v)break;a=v}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||lD.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||p),context:o,ruleFromNode(v){return v.nodeName=="BR"&&!v.nextSibling&&v.parentNode&&!AOe.test(v.parentNode.nodeName)?{ignore:!0}:null}})),p)s=NOe(Z8(s,+p[1],+p[2]),p[4]);else if(s=gn.maxOpen(OOe(s.content,o),!0),s.openStart||s.openEnd){let m=0,v=0;for(let y=s.content.firstChild;m<s.openStart&&!y.type.spec.isolating;m++,y=y.firstChild);for(let y=s.content.lastChild;v<s.openEnd&&!y.type.spec.isolating;v++,y=y.lastChild);s=Z8(s,m,v)}return e.someProp("transformPasted",m=>{s=m(s,e)}),s}const AOe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function OOe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(s=>{if(!a)return;let c=o.findWrapping(s.type),f;if(!c)return a=null;if(f=a.length&&i.length&&G8(c,i,s,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=X8(a[a.length-1],i.length));let p=K8(s,c);a.push(p),o=o.matchType(p.type),i=c}}),a)return Ht.from(a)}return e}function K8(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Ht.from(e));return e}function G8(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=G8(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(Ht.from(K8(n,e,o+1))))}}function X8(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,X8(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Ht.empty,!0);return e.copy(n.append(r))}function FD(e,t,n,r,o,i){let a=t<0?e.firstChild:e.lastChild,s=a.content;return e.childCount>1&&(i=0),o<r-1&&(s=FD(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Ht.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Z8(e,t,n){return t<e.openStart&&(e=new gn(FD(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new gn(FD(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const J8={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Q8=null;function e9(){return Q8||(Q8=document.implementation.createHTMLDocument("title"))}function MOe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=e9().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&J8[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=e,o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function POe(e){let t=e.querySelectorAll(Ai?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function NOe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:o,openStart:i,openEnd:a}=e;for(let s=r.length-2;s>=0;s-=2){let c=n.nodes[r[s]];if(!c||c.hasRequiredAttrs())break;o=Ht.from(c.create(r[s+1],o)),i++,a++}return new gn(o,i,a)}const Vi={},Hi={},_Oe={touchstart:!0,touchmove:!0};class ROe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function IOe(e){for(let t in Vi){let n=Vi[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{$Oe(e,r)&&!zD(e,r)&&(e.editable||!(r.type in Hi))&&n(e,r)},_Oe[t]?{passive:!0}:void 0)}zi&&e.dom.addEventListener("input",()=>null),BD(e)}function lu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function LOe(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function BD(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>zD(e,r))})}function zD(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function $Oe(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function FOe(e,t){!zD(e,t)&&Vi[t.type]&&(e.editable||!(t.type in Hi))&&Vi[t.type](e,t)}Hi.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!n9(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ts&&Ai&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Jh&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Id(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||DOe(e,n)?n.preventDefault():lu(e,"key")},Hi.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Hi.keypress=(e,t)=>{let n=t;if(n9(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ja&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Vn)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function P1(e){return{left:e.clientX,top:e.clientY}}function BOe(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function VD(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(e.someProp(t,s=>a>i.depth?s(e,n,i.nodeAfter,i.before(a),o,!0):s(e,n,i.node(a),i.before(a),o,!1)))return!0;return!1}function tp(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function zOe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&zn.isSelectable(r)?(tp(e,new zn(n),"pointer"),!0):!1}function VOe(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof zn&&(r=n.node);let i=e.state.doc.resolve(t);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(zn.isSelectable(s)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(a);break}}return o!=null?(tp(e,zn.create(e.state.doc,o),"pointer"),!0):!1}function HOe(e,t,n,r,o){return VD(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?VOe(e,n):zOe(e,n))}function jOe(e,t,n,r){return VD(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function WOe(e,t,n,r){return VD(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||YOe(e,n,r)}function YOe(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(tp(e,Vn.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)tp(e,Vn.create(r,s+1,s+1+a.content.size),"pointer");else if(zn.isSelectable(a))tp(e,zn.create(r,s),"pointer");else continue;return!0}}function HD(e){return N1(e)}const t9=Ja?"metaKey":"ctrlKey";Vi.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=HD(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&BOe(n,e.input.lastClick)&&!n[t9]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=e.posAtCoords(P1(n));a&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new UOe(e,a,n,!!r)):(i=="doubleClick"?jOe:WOe)(e,a.pos,a.inside,n)?n.preventDefault():lu(e,"pointer"))};class UOe{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[t9],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{let p=t.state.doc.resolve(n.pos);i=p.parent,a=p.depth?p.before():0}const s=o?null:r.target,c=s?t.docView.nearestDesc(s,!0):null;this.target=c?c.dom:null;let{selection:f}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||f instanceof zn&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Es&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),lu(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ac(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(P1(t))),this.updateAllowDefault(t),this.allowDefault||!n?lu(this.view,"pointer"):HOe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||zi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ai&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(tp(this.view,ur.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):lu(this.view,"pointer")}move(t){this.updateAllowDefault(t),lu(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Vi.touchstart=e=>{e.input.lastTouch=Date.now(),HD(e),lu(e,"pointer")},Vi.touchmove=e=>{e.input.lastTouch=Date.now(),lu(e,"pointer")},Vi.contextmenu=e=>HD(e);function n9(e,t){return e.composing?!0:zi&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const qOe=Ts?5e3:-1;Hi.compositionstart=Hi.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),N1(e,!0),e.markCursor=null;else if(N1(e),Es&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(a.nodeType==3){e.domSelection().collapse(a,a.nodeValue.length);break}else o=a,i=-1}}e.input.composing=!0}r9(e,qOe)},Hi.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,r9(e,20))};function r9(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>N1(e),t))}function o9(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=KOe());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function KOe(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function N1(e,t=!1){if(!(Ts&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),o9(e),t||e.docView&&e.docView.dirty){let n=_D(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function GOe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const vv=oa&&iu<15||Jh&&UAe<604;Vi.copy=Hi.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=vv?null:n.clipboardData,a=r.content(),{dom:s,text:c}=U8(e,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",c)):GOe(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function XOe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function ZOe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?bv(e,r.value,null,o,t):bv(e,r.textContent,r.innerHTML,o,t)},50)}function bv(e,t,n,r,o){let i=q8(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,o,i||gn.empty)))return!0;if(!i)return!1;let a=XOe(i),s=a?e.state.tr.replaceSelectionWith(a,r):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function i9(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Hi.paste=(e,t)=>{let n=t;if(e.composing&&!Ts)return;let r=vv?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&bv(e,i9(r),r.getData("text/html"),o,n)?n.preventDefault():ZOe(e,n)};class a9{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const s9=Ja?"altKey":"ctrlKey";Vi.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(P1(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof zn?o.to-1:o.to))){if(r&&r.mightDrag)a=zn.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let p=e.docView.nearestDesc(n.target,!0);p&&p.node.type.spec.draggable&&p!=e.docView&&(a=zn.create(e.state.doc,p.posBefore))}}let s=(a||e.state.selection).content(),{dom:c,text:f}=U8(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(vv?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",vv||n.dataTransfer.setData("text/plain",f),e.dragging=new a9(s,!n[s9],a)},Vi.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Hi.dragover=Hi.dragenter=(e,t)=>t.preventDefault(),Hi.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(P1(n));if(!o)return;let i=e.state.doc.resolve(o.pos),a=r&&r.slice;a?e.someProp("transformPasted",w=>{a=w(a,e)}):a=q8(e,i9(n.dataTransfer),vv?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&!n[s9]);if(e.someProp("handleDrop",w=>w(e,n,a||gn.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let c=a?kDe(e.state.doc,i.pos,a):i.pos;c==null&&(c=i.pos);let f=e.state.tr;if(s){let{node:w}=r;w?w.replace(f):f.deleteSelection()}let p=f.mapping.map(c),m=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,v=f.doc;if(m?f.replaceRangeWith(p,p,a.content.firstChild):f.replaceRange(p,p,a),f.doc.eq(v))return;let y=f.doc.resolve(p);if(m&&zn.isSelectable(a.content.firstChild)&&y.nodeAfter&&y.nodeAfter.sameMarkup(a.content.firstChild))f.setSelection(new zn(y));else{let w=f.mapping.map(c);f.mapping.maps[f.mapping.maps.length-1].forEach((C,k,T,E)=>w=E),f.setSelection(ID(e,y,f.doc.resolve(w)))}e.focus(),e.dispatch(f.setMeta("uiEvent","drop"))},Vi.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ac(e)},20))},Vi.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Vi.beforeinput=(e,t)=>{if(Ai&&Ts&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Id(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in Hi)Vi[e]=Hi[e];function yv(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Xw{constructor(t,n){this.toDOM=t,this.spec=n||Fd,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:a}=t.mapResult(n.from+o,this.side<0?-1:1);return a?null:new fo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Xw&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&yv(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Pu{constructor(t,n){this.attrs=t,this.spec=n||Fd}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,a=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new fo(i,a,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Pu&&yv(this.attrs,t.attrs)&&yv(this.spec,t.spec)}static is(t){return t.type instanceof Pu}destroy(){}}class fM{constructor(t,n){this.attrs=t,this.spec=n||Fd}map(t,n,r,o){let i=t.mapResult(n.from+o,1);if(i.deleted)return null;let a=t.mapResult(n.to+o,-1);return a.deleted||a.pos<=i.pos?null:new fo(i.pos-r,a.pos-r,this)}valid(t,n){let{index:r,offset:o}=t.content.findIndex(n.from),i;return o==n.from&&!(i=t.child(r)).isText&&o+i.nodeSize==n.to}eq(t){return this==t||t instanceof fM&&yv(this.attrs,t.attrs)&&yv(this.spec,t.spec)}destroy(){}}class fo{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new fo(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new fo(t,t,new Xw(n,r))}static inline(t,n,r,o){return new fo(t,n,new Pu(r,o))}static node(t,n,r,o){return new fo(t,n,new fM(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pu}get widget(){return this.type instanceof Xw}}const np=[],Fd={};class wr{constructor(t,n){this.local=t.length?t:np,this.children=n.length?n:np}static create(t,n){return n.length?_1(n,t,0,Fd):Oi}find(t,n,r){let o=[];return this.findInner(t??0,n??1e9,o,0,r),o}findInner(t,n,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=n&&s.to>=t&&(!i||i(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>t){let s=this.children[a]+1;this.children[a+2].findInner(t-s,n-s,r,o+s,i)}}map(t,n,r){return this==Oi||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Fd)}mapInner(t,n,r,o,i){let a;for(let s=0;s<this.local.length;s++){let c=this.local[s].map(t,r,o);c&&c.type.valid(n,c)?(a||(a=[])).push(c):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?JOe(this.children,a||[],t,n,r,o,i):a?new wr(a.sort(Bd),np):Oi}add(t,n){return n.length?this==Oi?wr.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let o,i=0;t.forEach((s,c)=>{let f=c+r,p;if(p=c9(n,s,f)){for(o||(o=this.children.slice());i<o.length&&o[i]<c;)i+=3;o[i]==c?o[i+2]=o[i+2].addInner(s,p,f+1):o.splice(i,0,c,c+s.nodeSize,_1(p,s,f+1,Fd)),i+=3}});let a=l9(i?u9(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||a.splice(s--,1);return new wr(a.length?this.local.concat(a).sort(Bd):this.local,o||this.children)}remove(t){return t.length==0||this==Oi?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let a,s=r[i]+n,c=r[i+1]+n;for(let p=0,m;p<t.length;p++)(m=t[p])&&m.from>s&&m.to<c&&(t[p]=null,(a||(a=[])).push(m));if(!a)continue;r==this.children&&(r=this.children.slice());let f=r[i+2].removeInner(a,s+1);f!=Oi?r[i+2]=f:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<t.length;i++)if(a=t[i])for(let s=0;s<o.length;s++)o[s].eq(a,n)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new wr(o,r):Oi}forChild(t,n){if(this==Oi)return this;if(n.isLeaf)return wr.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(r=this.children[s+2]);break}let i=t+1,a=i+n.content.size;for(let s=0;s<this.local.length;s++){let c=this.local[s];if(c.from<a&&c.to>i&&c.type instanceof Pu){let f=Math.max(i,c.from)-i,p=Math.min(a,c.to)-i;f<p&&(o||(o=[])).push(c.copy(f,p))}}if(o){let s=new wr(o.sort(Bd),np);return r?new Nu([s,r]):s}return r||Oi}eq(t){if(this==t)return!0;if(!(t instanceof wr)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return jD(this.localsInner(t))}localsInner(t){if(this==Oi)return np;if(t.inlineContent||!this.local.some(Pu.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Pu||n.push(this.local[r]);return n}}wr.empty=new wr([],[]),wr.removeOverlap=jD;const Oi=wr.empty;class Nu{constructor(t){this.members=t}map(t,n){const r=this.members.map(o=>o.map(t,n,Fd));return Nu.from(r)}forChild(t,n){if(n.isLeaf)return wr.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(t,n);i!=Oi&&(i instanceof Nu?r=r.concat(i.members):r.push(i))}return Nu.from(r)}eq(t){if(!(t instanceof Nu)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(t);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?jD(r?n:n.sort(Bd)):np}static from(t){switch(t.length){case 0:return Oi;case 1:return t[0];default:return new Nu(t.every(n=>n instanceof wr)?t:t.reduce((n,r)=>n.concat(r instanceof wr?r:r.members),[]))}}}function JOe(e,t,n,r,o,i,a){let s=e.slice();for(let f=0,p=i;f<n.maps.length;f++){let m=0;n.maps[f].forEach((v,y,w,C)=>{let k=C-w-(y-v);for(let T=0;T<s.length;T+=3){let E=s[T+1];if(E<0||v>E+p-m)continue;let _=s[T]+p-m;y>=_?s[T+1]=v<=_?-2:-1:v>=p&&k&&(s[T]+=k,s[T+1]+=k)}m+=k}),p=n.maps[f].map(p,-1)}let c=!1;for(let f=0;f<s.length;f+=3)if(s[f+1]<0){if(s[f+1]==-2){c=!0,s[f+1]=-1;continue}let p=n.map(e[f]+i),m=p-o;if(m<0||m>=r.content.size){c=!0;continue}let v=n.map(e[f+1]+i,-1),y=v-o,{index:w,offset:C}=r.content.findIndex(m),k=r.maybeChild(w);if(k&&C==m&&C+k.nodeSize==y){let T=s[f+2].mapInner(n,k,p+1,e[f]+i+1,a);T!=Oi?(s[f]=m,s[f+1]=y,s[f+2]=T):(s[f+1]=-2,c=!0)}else c=!0}if(c){let f=QOe(s,e,t,n,o,i,a),p=_1(f,r,0,a);t=p.local;for(let m=0;m<s.length;m+=3)s[m+1]<0&&(s.splice(m,3),m-=3);for(let m=0,v=0;m<p.children.length;m+=3){let y=p.children[m];for(;v<s.length&&s[v]<y;)v+=3;s.splice(v,0,p.children[m],p.children[m+1],p.children[m+2])}}return new wr(t.sort(Bd),s)}function l9(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new fo(o.from+t,o.to+t,o.type))}return n}function QOe(e,t,n,r,o,i,a){function s(c,f){for(let p=0;p<c.local.length;p++){let m=c.local[p].map(r,o,f);m?n.push(m):a.onRemove&&a.onRemove(c.local[p].spec)}for(let p=0;p<c.children.length;p+=3)s(c.children[p+2],c.children[p]+f+1)}for(let c=0;c<e.length;c+=3)e[c+1]==-1&&s(e[c+2],t[c]+i+1);return n}function c9(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let i=0,a;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function u9(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function _1(e,t,n,r){let o=[],i=!1;t.forEach((s,c)=>{let f=c9(e,s,c+n);if(f){i=!0;let p=_1(f,s,n+c+1,r);p!=Oi&&o.push(c,c+s.nodeSize,p)}});let a=l9(i?u9(e):e,-n).sort(Bd);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new wr(a,o):Oi}function Bd(e,t){return e.from-t.from||e.to-t.to}function jD(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from==r.from){i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),d9(t,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),d9(t,o,r.copy(i.from,r.to)));break}}}return t}function d9(e,t,n){for(;t<e.length&&Bd(n,e[t])>0;)t++;e.splice(t,0,n)}function WD(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Oi&&t.push(r)}),e.cursorWrapper&&t.push(wr.create(e.state.doc,[e.cursorWrapper.deco])),Nu.from(t)}const eMe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},tMe=oa&&iu<=11;class nMe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class rMe{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new nMe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);oa&&iu<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),tMe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,eMe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(F8(this.view)){if(this.suppressingSelectionUpdates)return ac(this.view);if(oa&&iu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Rd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=dv(i))n.add(i);for(let i=t.anchorNode;i;i=dv(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&F8(t)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,c=[];if(t.editable)for(let p=0;p<n.length;p++){let m=this.registerMutation(n[p],c);m&&(i=i<0?m.from:Math.min(m.from,i),a=a<0?m.to:Math.max(m.to,a),m.typeOver&&(s=!0))}if(Es&&c.length>1){let p=c.filter(m=>m.nodeName=="BR");if(p.length==2){let m=p[0],v=p[1];m.parentNode&&m.parentNode.parentNode==v.parentNode?v.remove():m.remove()}}let f=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&O1(r)&&(f=_D(t))&&f.eq(ur.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,ac(t),this.currentSelection.set(r),t.scrollToSelection()):(i>-1||o)&&(i>-1&&(t.docView.markDirty(i,a),oMe(t)),this.handleDOMChange(i,a,s,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ac(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let p=0;p<t.addedNodes.length;p++)n.push(t.addedNodes[p]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let o=t.previousSibling,i=t.nextSibling;if(oa&&iu<=11&&t.addedNodes.length)for(let p=0;p<t.addedNodes.length;p++){let{previousSibling:m,nextSibling:v}=t.addedNodes[p];(!m||Array.prototype.indexOf.call(t.addedNodes,m)<0)&&(o=m),(!v||Array.prototype.indexOf.call(t.addedNodes,v)<0)&&(i=v)}let a=o&&o.parentNode==t.target?Bi(o)+1:0,s=r.localPosFromDOM(t.target,a,-1),c=i&&i.parentNode==t.target?Bi(i):t.target.childNodes.length,f=r.localPosFromDOM(t.target,c,1);return{from:s,to:f}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}}let f9=new WeakMap,h9=!1;function oMe(e){if(!f9.has(e)&&(f9.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Es,h9)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),h9=!0}}function iMe(e){let t;function n(c){c.preventDefault(),c.stopImmediatePropagation(),t=c.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",n,!0);let r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Rd(s.node,s.offset,i,a)&&([r,o,i,a]=[i,a,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}}function aMe(e,t,n){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),f,p=c.anchorNode;if(p&&e.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:c.anchorOffset}],O1(c)||f.push({node:c.focusNode,offset:c.focusOffset})),Ai&&e.input.lastKeyCode===8)for(let k=i;k>o;k--){let T=r.childNodes[k-1],E=T.pmViewDesc;if(T.nodeName=="BR"&&!E){i=k;break}if(!E||E.size)break}let m=e.state.doc,v=e.someProp("domParser")||lD.fromSchema(e.state.schema),y=m.resolve(a),w=null,C=v.parse(r,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:o,to:i,preserveWhitespace:y.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:sMe,context:y});if(f&&f[0].pos!=null){let k=f[0].pos,T=f[1]&&f[1].pos;T==null&&(T=k),w={anchor:k+a,head:T+a}}return{doc:C,sel:w,from:a,to:s}}function sMe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(zi&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||zi&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const lMe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function cMe(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let Y=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,J=_D(e,Y);if(J&&!e.state.selection.eq(J)){if(Ai&&Ts&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",ee=>ee(e,Id(13,"Enter"))))return;let K=e.state.tr.setSelection(J);Y=="pointer"?K.setMeta("pointer",!0):Y=="key"&&K.scrollIntoView(),i&&K.setMeta("composition",i),e.dispatch(K)}return}let a=e.state.doc.resolve(t),s=a.sharedDepth(n);t=a.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,f=aMe(e,t,n),p=e.state.doc,m=p.slice(f.from,f.to),v,y;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(v=e.state.selection.to,y="end"):(v=e.state.selection.from,y="start"),e.input.lastKeyCode=null;let w=fMe(m.content,f.doc.content,f.from,v,y);if((Jh&&e.input.lastIOSEnter>Date.now()-225||Ts)&&o.some(Y=>Y.nodeType==1&&!lMe.test(Y.nodeName))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",Y=>Y(e,Id(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!w)if(r&&c instanceof Vn&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))w={start:c.from,endA:c.to,endB:c.to};else{if(f.sel){let Y=p9(e,e.state.doc,f.sel);if(Y&&!Y.eq(e.state.selection)){let J=e.state.tr.setSelection(Y);i&&J.setMeta("composition",i),e.dispatch(J)}}return}if(Ai&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from&&f.sel.head==f.sel.anchor){let Y=w.endB-w.start;f.sel={anchor:f.sel.anchor+Y,head:f.sel.anchor+Y}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof Vn&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=f.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),oa&&iu<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>f.from&&f.doc.textBetween(w.start-f.from-1,w.start-f.from+1)==" \xA0"&&(w.start--,w.endA--,w.endB--);let C=f.doc.resolveNoCache(w.start-f.from),k=f.doc.resolveNoCache(w.endB-f.from),T=p.resolve(w.start),E=C.sameParent(k)&&C.parent.inlineContent&&T.end()>=w.endA,_;if((Jh&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some(Y=>Y.nodeName=="DIV"||Y.nodeName=="P"))||!E&&C.pos<f.doc.content.size&&!C.sameParent(k)&&(_=ur.findFrom(f.doc.resolve(C.pos+1),1,!0))&&_.head==k.pos)&&e.someProp("handleKeyDown",Y=>Y(e,Id(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>w.start&&dMe(p,w.start,w.endA,C,k)&&e.someProp("handleKeyDown",Y=>Y(e,Id(8,"Backspace")))){Ts&&Ai&&e.domObserver.suppressSelectionUpdates();return}Ai&&Ts&&w.endB==w.start&&(e.input.lastAndroidDelete=Date.now()),Ts&&!E&&C.start()!=k.start()&&k.parentOffset==0&&C.depth==k.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==w.endA&&(w.endB-=2,k=f.doc.resolveNoCache(w.endB-f.from),setTimeout(()=>{e.someProp("handleKeyDown",function(Y){return Y(e,Id(13,"Enter"))})},20));let R=w.start,P=w.endA,$,z,q;if(E){if(C.pos==k.pos)oa&&iu<=11&&C.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ac(e),20)),$=e.state.tr.delete(R,P),z=p.resolve(w.start).marksAcross(p.resolve(w.endA));else if(w.endA==w.endB&&(q=uMe(C.parent.content.cut(C.parentOffset,k.parentOffset),T.parent.content.cut(T.parentOffset,w.endA-T.start()))))$=e.state.tr,q.type=="add"?$.addMark(R,P,q.mark):$.removeMark(R,P,q.mark);else if(C.parent.child(C.index()).isText&&C.index()==k.index()-(k.textOffset?0:1)){let Y=C.parent.textBetween(C.parentOffset,k.parentOffset);if(e.someProp("handleTextInput",J=>J(e,R,P,Y)))return;$=e.state.tr.insertText(Y,R,P)}}if($||($=e.state.tr.replace(R,P,f.doc.slice(w.start-f.from,w.endB-f.from))),f.sel){let Y=p9(e,$.doc,f.sel);Y&&!(Ai&&Ts&&e.composing&&Y.empty&&(w.start!=w.endB||e.input.lastAndroidDelete<Date.now()-100)&&(Y.head==R||Y.head==$.mapping.map(P)-1)||oa&&Y.empty&&Y.head==R)&&$.setSelection(Y)}z&&$.ensureMarks(z),i&&$.setMeta("composition",i),e.dispatch($.scrollIntoView())}function p9(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ID(e,t.resolve(n.anchor),t.resolve(n.head))}function uMe(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,a,s,c;for(let p=0;p<r.length;p++)o=r[p].removeFromSet(o);for(let p=0;p<n.length;p++)i=n[p].removeFromSet(i);if(o.length==1&&i.length==0)s=o[0],a="add",c=p=>p.mark(s.addToSet(p.marks));else if(o.length==0&&i.length==1)s=i[0],a="remove",c=p=>p.mark(s.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<t.childCount;p++)f.push(c(t.child(p)));if(Ht.from(f).eq(e))return{mark:s,type:a}}function dMe(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||YD(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=e.resolve(YD(i,!0,!0));return!a.parent.isTextblock||a.pos>n||YD(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function YD(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function fMe(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let c=Math.max(0,i-Math.min(a,s));r-=a+c-i}if(a<i&&e.size<t.size){let c=r<=i&&r>=a?i-r:0;i-=c,i&&i<t.size&&m9(t.textBetween(i-1,i+1))&&(i+=c?1:-1),s=i+(s-a),a=i}else if(s<i){let c=r<=i&&r>=s?i-r:0;i-=c,i&&i<e.size&&m9(e.textBetween(i-1,i+1))&&(i+=c?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function m9(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class hMe{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ROe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(x9),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=b9(this),v9(this),this.nodeViews=y9(this),this.docView=T8(this.state.doc,g9(this),WD(this),this.dom,this),this.domObserver=new rMe(this,(r,o,i,a)=>cMe(this,r,o,i,a)),this.domObserver.start(),IOe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&BD(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(x9),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,a=!1;t.storedMarks&&this.composing&&(o9(this),a=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let y=y9(this);mMe(y,this.nodeViews)&&(this.nodeViews=y,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&BD(this),this.editable=b9(this),v9(this);let c=WD(this),f=g9(this),p=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",m=i||!this.docView.matchesNode(t.doc,f,c);(m||!t.selection.eq(o.selection))&&(a=!0);let v=p=="preserve"&&a&&this.dom.style.overflowAnchor==null&&GAe(this);if(a){this.domObserver.stop();let y=m&&(oa||Ai)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&pMe(o.selection,t.selection);if(m){let w=Ai?this.trackWrites=this.domSelectionRange().focusNode:null;(i||!this.docView.update(t.doc,f,c,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=T8(t.doc,f,c,this.dom,this)),w&&!this.trackWrites&&(y=!0)}y||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&xOe(this))?ac(this,y):(L8(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():v&&XAe(v)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof zn){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&h8(this,n.getBoundingClientRect(),t)}else h8(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new a9(t.slice,t.move,o<0?void 0:zn.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[t];if(s!=null&&(o=n?n(s):s))return o}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let s=i[a].props[t];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(oa){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&ZAe(this.dom),ac(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return nOe(this,t)}coordsAtPos(t,n=1){return y8(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return sOe(this,n||this.state,t)}pasteHTML(t,n){return bv(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return bv(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(LOe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],WD(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return FOe(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return zi&&this.root.nodeType===11&&HAe(this.dom.ownerDocument)==this.dom?iMe(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function g9(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[fo.node(0,e.state.doc.content.size,t)]}function v9(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:fo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function b9(e){return!e.someProp("editable",t=>t(e.state)===!1)}function pMe(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function y9(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function mMe(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function x9(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var gMe=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},vMe=ro(gMe),w9=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},er=(e,t,n)=>(w9(e,t,"read from private field"),n?n.call(e):t.get(e)),sc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},to=(e,t,n,r)=>(w9(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function bMe(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function yMe(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function xMe(e){return!!(!e.prev&&e.next)}function wMe(e){return!!(e.prev&&!e.next)}function CMe(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function SMe(e){return e==="invalid-exit-split"}var kMe=["jump-backward-exit","jump-forward-exit"],EMe=["jump-backward-change","jump-forward-change"];function TMe(e){var t,n;return Za(kMe,(t=e.exit)==null?void 0:t.exitReason)||Za(EMe,(n=e.change)==null?void 0:n.changeReason)}function C9(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function S9(e){return ii(e)&&e instanceof Vn}function ia(e){const{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function DMe(e,t){const{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;return n?!new RegExp(qD(n)).test(e):new RegExp(qD(r)).test(e)}function AMe(e){const{text:t,regexp:n,$pos:r,suggester:o}=e,i=r.start();let a;return nv(t,n).forEach(s=>{const c=s.input.slice(Math.max(0,s.index-1),s.index);if(DMe(c,o)){const f=s.index+i,p=s[0],m=s[1];if(!Bn(p)||!Bn(m))return;const v=f+p.length,y=Math.min(v,r.pos),w=y-f;f<r.pos&&v>=r.pos&&(a={range:{from:f,to:v,cursor:y},match:s,query:{partial:p.slice(m.length,w),full:p.slice(m.length)},text:{partial:p.slice(0,w),full:p},textAfter:r.doc.textBetween(v,r.end(),tu,tu),textBefore:r.doc.textBetween(i,f,tu,tu),suggester:o})}}),a}function k9(e){const{$pos:t,suggester:n}=e,{char:r,name:o,startOfLine:i,supportedCharacters:a,matchOffset:s,multiline:c,caseInsensitive:f,unicode:p}=n,m=$Me({char:r,matchOffset:s,startOfLine:i,supportedCharacters:a,multiline:c,caseInsensitive:f,unicode:p}),v=t.doc.textBetween(t.before(),t.end(),tu,tu);return AMe({suggester:n,text:v,regexp:m,$pos:t,char:r,name:o})}function E9(e){const{state:t,match:n}=e;try{return k9({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function T9(e){const{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:ia({match:t,exitReason:"delete"})}:!n||!t.query.partial?{exit:ia({match:t,exitReason:"invalid-exit-split"})}:t.range.to===n.range.cursor?{exit:ia({match:n,exitReason:"exit-end"})}:t.query.partial?{exit:ia({match:n,exitReason:"exit-split"})}:{}}function OMe(e){const{prev:t,next:n,state:r}=e,o=In(),i=E9({state:r,match:t}),{exit:a}=i&&i.query.full!==t.query.full?T9({prev:t,next:i,state:r}):o;return t.range.from<n.range.from?{exit:a??ia({match:t,exitReason:"jump-forward-exit"}),change:ia({match:n,changeReason:"jump-forward-change"})}:{exit:a??ia({match:t,exitReason:"jump-backward-exit"}),change:ia({match:n,changeReason:"jump-backward-change"})}}function MMe(e){const{match:t,state:n,$pos:r}=e,{selection:o}=n,i=E9({match:t,state:n});return!i||i.text.full!==t.text.full?T9({prev:t,next:i,state:n}):!o.empty&&(o.from<=t.range.from||o.to>=t.range.to)?{exit:ia({match:t,exitReason:"selection-outside"})}:r.pos>t.range.to?{exit:ia({match:t,exitReason:"move-end"})}:r.pos<=t.range.from?{exit:ia({match:t,exitReason:"move-start"})}:{}}function PMe(e){const{prev:t,next:n,state:r,$pos:o}=e,i=In();if(!t&&!n)return i;const a={prev:t,next:n};return CMe(a)?OMe({prev:a.prev,next:a.next,state:r}):xMe(a)?{change:ia({match:a.next,changeReason:"start"})}:wMe(a)?MMe({$pos:o,match:a.prev,state:r}):bMe(a)?{change:ia({match:a.next,changeReason:"change-character"})}:yMe(a)?{change:ia({match:a.next,changeReason:r.selection.empty?"move":"selection-inside"})}:i}function D9(e,t){for(let n=e.depth;n>0;n--){const r=e.node(n);if(t.includes(r.type.name))return!0}return!1}function UD(e,t){const{$from:n,$to:r}=e;return A9(e,t)?!0:nD(n.pos,r.pos).some(o=>NMe(n.doc.resolve(o),t))}function A9(e,t){const{$from:n,$to:r}=e,o=new Set((n.marksAcross(r)??[]).map(i=>i.type.name));return t.some(i=>o.has(i))}function NMe(e,t){const n=new Set(e.marks().map(r=>r.type.name));return t.some(r=>n.has(r))}function _Me(e,t){const{$cursor:n}=t,{validMarks:r,validNodes:o,invalidMarks:i,invalidNodes:a}=e;return!r&&!o&&ks(i)&&ks(a)?!0:!(r&&!A9(t,r)||o&&!D9(n,o)||!r&&UD(t,i)||!o&&D9(n,a))}function O9(e){const{suggesters:t,$pos:n,selectionEmpty:r}=e;for(const o of t)if(!(o.emptySelectionsOnly&&!r))try{const i=k9({suggester:o,$pos:n});if(!i)continue;const a={$from:n.doc.resolve(i.range.from),$to:n.doc.resolve(i.range.to),$cursor:n};if(_Me(o,a)&&o.isValidPosition(a,i))return i}catch{}}function qD(e){return ATe(e)?e.source:e}function RMe(e){return e?"^":""}function IMe(e,t){return`(?:${qD(e)}){${t},}`}function LMe(e){return Bn(e)?new RegExp(vMe(e)):e}function $Me(e){const{char:t,matchOffset:n,startOfLine:r,supportedCharacters:o,captureChar:i=!0,caseInsensitive:a=!1,multiline:s=!1,unicode:c=!1}=e,f=`g${s?"m":""}${a?"i":""}${c?"u":""}`;let p=LMe(t).source;return i&&(p=`(${p})`),new RegExp(`${RMe(r)}${p}${IMe(o,n)}`,f)}var FMe={appendTransaction:!1,priority:50,ignoredTag:"span",matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:"suggest",suggestTag:"span",supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},M9="__ignore_prosemirror_suggest_update__",R1,xv,ai,cu,rp,yl,ti,uu,op,P9=class{constructor(e){sc(this,R1,!1),sc(this,xv,!1),sc(this,ai,void 0),sc(this,cu,void 0),sc(this,rp,void 0),sc(this,yl,In()),sc(this,ti,wr.empty),sc(this,uu,!1),sc(this,op,!1),this.setMarkRemoved=()=>{to(this,uu,!0)},this.findNextTextSelection=n=>{const r=n.$from.doc,o=Math.min(r.nodeSize-2,n.to+1),i=r.resolve(o),a=ur.findFrom(i,1,!0);if(S9(a))return a},this.ignoreNextExit=()=>{to(this,xv,!0)},this.addIgnored=({from:n,name:r,specific:o=!1})=>{const i=er(this,ai).find(p=>p.name===r);if(!i)throw new Error(`No suggester exists for the name provided: ${r}`);const a=Bn(i.char)?i.char.length:1,s=n+a,c=i.ignoredClassName?{class:i.ignoredClassName}:{},f=fo.inline(n,s,{nodeName:i.ignoredTag,...c},{name:r,specific:o,char:i.char});to(this,ti,er(this,ti).add(this.view.state.doc,[f]))},this.removeIgnored=({from:n,name:r})=>{const o=er(this,ai).find(s=>s.name===r);if(!o)throw new Error(`No suggester exists for the name provided: ${r}`);const i=Bn(o.char)?o.char.length:1,a=er(this,ti).find(n,n+i)[0];!a||a.spec.name!==r||to(this,ti,er(this,ti).remove([a]))},this.clearIgnored=n=>{if(!n){to(this,ti,wr.empty);return}const o=er(this,ti).find().filter(({spec:i})=>i.name===n);to(this,ti,er(this,ti).remove(o))},this.findMatchAtPosition=(n,r)=>{const o=r?er(this,ai).filter(i=>i.name===r):er(this,ai);return O9({suggesters:o,$pos:n,docChanged:!1,selectionEmpty:!0})},this.setLastChangeFromAppend=()=>{to(this,op,!0)};const t=N9();to(this,ai,e.map(t)),to(this,ai,Ad(er(this,ai),(n,r)=>r.priority-n.priority))}static create(e){return new P9(e)}get decorationSet(){return er(this,ti)}get removed(){return er(this,uu)}get match(){return er(this,cu)?er(this,cu):er(this,rp)&&er(this,yl).exit?er(this,rp):void 0}init(e){return this.view=e,this}createProps(e){const{name:t,char:n}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:n,...e}}shouldRunExit(){return er(this,xv)?(to(this,xv,!1),!1):!0}updateWithNextSelection(e){var t,n,r;const o=this.findNextTextSelection(e.selection);if(o)for(const i of er(this,ai)){const a=(t=er(this,yl).change)==null?void 0:t.suggester.name,s=(n=er(this,yl).exit)==null?void 0:n.suggester.name;(r=i.checkNextValidSelection)==null||r.call(i,o.$from,e,{change:a,exit:s})}}changeHandler(e,t){const{change:n,exit:r}=er(this,yl),o=this.match;if(!n&&!r||!C9(o))return;const i=t===r?.suggester.appendTransaction&&this.shouldRunExit(),a=t===n?.suggester.appendTransaction;if(!(!i&&!a)){if(n&&r&&TMe({change:n,exit:r})){const s=this.createProps(r),c=this.createProps(n),f=r.range.from<n.range.from;i&&r.suggester.onChange(s,e),a&&n.suggester.onChange(c,e),i&&to(this,uu,!1);return}n&&a&&n.suggester.onChange(this.createProps(n),e),r&&i&&(r.suggester.onChange(this.createProps(r),e),to(this,uu,!1),SMe(r.exitReason)&&to(this,yl,In()))}}mapIgnoredDecorations(e){const t=er(this,ti).map(e.mapping,e.doc),r=t.find().filter(({from:o,to:i,spec:a})=>{const s=Bn(a.char)?a.char.length:1;return i-o!==s});to(this,ti,t.remove(r))}shouldIgnoreMatch({range:e,suggester:{name:t}}){return er(this,ti).find().some(({spec:o,from:i})=>i!==e.from?!1:o.specific?o.name===t:!0)}resetState(){to(this,yl,In()),to(this,cu,void 0),to(this,uu,!1),to(this,op,!1)}updateReasons(e){const{$pos:t,state:n}=e,r=er(this,R1),o=er(this,ai),i=n.selection.empty,a=S9(n.selection)?O9({suggesters:o,$pos:t,docChanged:r,selectionEmpty:i}):void 0;to(this,cu,a&&this.shouldIgnoreMatch(a)?void 0:a),to(this,yl,PMe({next:er(this,cu),prev:er(this,rp),state:n,$pos:t}))}addSuggester(e){const t=er(this,ai).find(r=>r.name===e.name),n=N9();if(t)to(this,ai,er(this,ai).map(r=>r===t?n(e):r));else{const r=[...er(this,ai),n(e)];to(this,ai,Ad(r,(o,i)=>i.priority-o.priority))}return()=>this.removeSuggester(e.name)}removeSuggester(e){const t=Bn(e)?e:e.name;to(this,ai,er(this,ai).filter(n=>n.name!==t)),this.clearIgnored(t)}toJSON(){return this.match}apply(e){const{exit:t,change:n}=er(this,yl);if(er(this,op)&&(to(this,op,!1),!t?.suggester.appendTransaction&&!n?.suggester.appendTransaction))return this;const{tr:r,state:o}=e,i=r.docChanged||r.selectionSet;return r.getMeta(M9)||!i&&!er(this,uu)?this:(to(this,R1,r.docChanged),this.mapIgnoredDecorations(r),t&&this.resetState(),to(this,rp,er(this,cu)),this.updateReasons({$pos:r.selection.$from,state:o}),this)}createDecorations(e){const t=this.match;if(!C9(t))return er(this,ti);const{disableDecorations:n}=t.suggester;if(Br(n)?n(e,t):n)return er(this,ti);const{range:o,suggester:i}=t,{name:a,suggestTag:s,suggestClassName:c}=i,{from:f,to:p}=o;return this.shouldIgnoreMatch(t)?er(this,ti):er(this,ti).add(e.doc,[fo.inline(f,p,{nodeName:s,class:a?`${c} suggest-${a}`:c},{name:a})])}},BMe=P9;R1=new WeakMap,xv=new WeakMap,ai=new WeakMap,cu=new WeakMap,rp=new WeakMap,yl=new WeakMap,ti=new WeakMap,uu=new WeakMap,op=new WeakMap;function N9(){const e=new Set;return t=>{if(e.has(t.name))throw new Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);const n={...FMe,...t};return e.add(t.name),n}}var _9=new _d("suggest");function KD(e){return _9.getState(e)}function R9(e,t){return KD(e).addSuggester(t)}function I9(e){e.setMeta(M9,!0)}function zMe(e,t){return KD(e).removeSuggester(t)}function VMe(...e){const t=BMe.create(e);return new rc({key:_9,view:n=>(t.init(n),{update:r=>t.changeHandler(r.state.tr,!1)}),state:{init:()=>t,apply:(n,r,o,i)=>t.apply({tr:n,state:i})},appendTransaction:(n,r,o)=>{const i=o.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:n=>t.createDecorations(n)}})}function GD(e,t){const n=Object.getPrototypeOf(t);let r=e.selection,o=e.doc,i=e.storedMarks;const a=In();for(const[s,c]of Object.entries(t))a[s]={value:c};return Object.create(n,{...a,storedMarks:{get(){return i}},selection:{get(){return r}},doc:{get(){return o}},tr:{get(){return r=e.selection,o=e.doc,i=e.storedMarks,e}}})}function I1(e){return({state:t,dispatch:n,view:r,tr:o})=>e(GD(o,t),n,r)}function L9(e){return t=>{var n;return _n(t.dispatch===void 0||t.dispatch===((n=t.view)==null?void 0:n.dispatch),{code:tn.NON_CHAINABLE_COMMAND}),e(t)}}var es={get isBrowser(){return!!(typeof window<"u"&&typeof window.document<"u"&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return es.isBrowser&&window.navigator.userAgent.includes("jsdom")},get isNode(){return typeof process<"u"&&process.versions!=null&&process.versions.node!=null},get isIos(){return es.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return es.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return es.isNode?process.platform==="darwin":es.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return process.env.NODE_ENV==="development"},get isTest(){return process.env.NODE_ENV==="test"},get isProduction(){return process.env.NODE_ENV==="production"}};function ts(e,t){var n;const r=X9(e);return((n=r?.getComputedStyle(e))==null?void 0:n.getPropertyValue(t))??""}function Mi(e,t){return Object.assign(e.style,t)}var HMe=["px","rem","em","in","q","mm","cm","pt","pc","vh","vw","vmin","vmax"],jMe=/[\d-.]+(\w+)$/;function WMe(e="0"){const t=e||"0",n=Number.parseFloat(t),r=t.match(jMe),o=(r?.[1]??"px").toLowerCase();return[n,Za(HMe,o)?o:"px"]}var ip=96,XD=25.4,YMe=72,UMe=6;function ZD(e){if(ji(e))return ts(e,"font-size")||ZD(e.parentElement);const t=X9(e);return t?ts(t.document.documentElement,"font-size"):""}function qMe(e){const t=xPe(e),n=t.document.documentElement||t.document.body;return(r,o)=>{switch(o){case"rem":return r*$1(ZD(n));case"em":return r*$1(ZD(e),e?.parentElement);case"in":return r*ip;case"q":return r*ip/XD/4;case"mm":return r*ip/XD;case"cm":return r*ip*10/XD;case"pt":return r*ip/YMe;case"pc":return r*ip/UMe;case"vh":return(r*t.innerHeight||n.clientWidth)/100;case"vw":return(r*t.innerWidth||n.clientHeight)/100;case"vmin":return r*Math.min(t.innerWidth||n.clientWidth,t.innerHeight||n.clientHeight)/100;case"vmax":return r*Math.max(t.innerWidth||n.clientWidth,t.innerHeight||n.clientHeight)/100;default:return r}}}var L1=/^([a-z]+)\((.+)\)$/i;function $9(e,t){if(!L1.test(e))return Number.NaN;const n=WDe(e,{brackets:["()"],escape:"_",flat:!0});if(!n||n.length===0)return Number.NaN;function r(i){return i.replace(/_(\d+)_/g,(a,s)=>{const c=Number.parseFloat(s);return n[c]??""})}const o=cc(n,0);for(const i of nv(o,L1)){const a=cc(i,1),f=r(cc(i,2)).split(/\s*,\s*/).map(p=>{if(L1.test(p)){const m=r(p);return $9(m,t)}return F9(p,t)});switch(a){case"min":return Math.min(...f);case"max":return Math.max(...f);case"clamp":{const[p,m,v]=f;if(wi(p)&&wi(m)&&wi(v))return g1({min:p,max:v,value:m});break}case"calc":return Number.NaN;default:return Number.NaN}}return Number.NaN}function F9(e,t){const[n,r]=WMe(e);return t(n,r)}function $1(e,t){const n=qMe(t);return L1.test(e)?$9(e.toLowerCase(),n):F9(e,n)}function JD(e){return ii(e)&&wi(e.nodeType)&&Bn(e.nodeName)}function ji(e){return JD(e)&&e.nodeType===1}function F1(e){const{types:t,node:n}=e;if(!n)return!1;const r=o=>o===n.type||o===n.type.name;return Fo(t)?t.some(r):r(t)}function KMe(e,t){const{tr:n}=t;return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function GMe({pos:e,tr:t}){const n=t.doc.nodeAt(e);return n&&t.delete(e,e+n.nodeSize),t}function XMe({pos:e,tr:t,content:n}){const r=t.doc.nodeAt(e);return r&&t.replaceWith(e,e+r.nodeSize,n),t}function ap(e){const{predicate:t,selection:n}=e,r=H9(n)?n.selection.$from:tA(n)?n.$from:n;for(let o=r.depth;o>0;o--){const i=r.node(o),a=o>0?r.before(o):0,s=r.start(o),c=a+i.nodeSize;if(t(i,a))return{pos:a,depth:o,node:i,start:s,end:c}}}function ZMe(e){const{depth:t}=e,n=t>0?e.before(t):0,r=e.node(t),o=e.start(t),i=n+r.nodeSize;return{pos:n,start:o,node:r,end:i,depth:t}}function JMe(e){const t=ap({predicate:()=>!0,selection:e});return _n(t,{message:"No parent node found for the selection provided."}),t}function du(e){const{types:t,selection:n}=e;return ap({predicate:r=>F1({types:t,node:r}),selection:n})}function QMe(e){const{types:t,selection:n}=e;if(!(!Sv(n)||!F1({types:t,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function QD(e){return tA(e)?e.empty:e.selection.empty}function B9(e){return e.docChanged||e.selectionSet}function z9(e){return!!wv(e)}function wv(e){const{state:t,type:n,attrs:r}=e,{selection:o,doc:i}=t,a=Bn(n)?i.type.schema.nodes[n]:n;_n(a,{code:tn.SCHEMA,message:`No node exists for ${n}`});const s=QMe({selection:o,types:n})??ap({predicate:c=>c.type===a,selection:o});return!r||p1(r)||!s||s.node.hasMarkup(a,{...s.node.attrs,...r})?s:void 0}function B1(...e){return t=>{if(!ez(e))return!1;const[n,...r]=e;let o=!1;const i=(...c)=>()=>{if(!ez(c))return!1;o=!0;const[,...f]=c;return B1(...c)({...t,next:i(...f)})},a=i(...r),s=n({...t,next:a});return o||s?s:a()}}function ePe(e,t){const n=new Map,r=In();for(const o of e)for(const[i,a]of Qo(o)){const c=[...n.get(i)??[],a],f=B1(...c);n.set(i,c),r[i]=t(f)}return r}function tPe(e){return ePe(e,t=>(n,r,o)=>t({state:n,dispatch:r,view:o,tr:n.tr,next:()=>!1}))}function eA(e,t){const n=e.attrs??{};return Object.entries(t).every(([r,o])=>n[r]===o)}function nPe(e){return Y9(e,[xc,Bo,di,Fs])}function sp(e){return ii(e)}function lp(e,t){return Fo(t)?Za(t,e[tc]):t===e[tc]}function rPe(e){return ii(e)&&e instanceof sD}function oPe(e,t){return Bn(e)?mo(t.nodes,e):e}function V9(e){return ii(e)&&e instanceof bb}function iPe(e,t){return Bn(e)?mo(t.marks,e):e}function Cv(e){return ii(e)&&e instanceof nu}function aPe(e){return ii(e)&&e instanceof Ht}function sPe(e){return ii(e)&&e instanceof vr}function H9(e){return ii(e)&&e instanceof sf}function fu(e){return ii(e)&&e instanceof Vn}function lPe(e){return ii(e)&&e instanceof qi}function tA(e){return ii(e)&&e instanceof ur}function cPe(e){return ii(e)&&e instanceof Lp}function j9(e){const{trState:t,from:n,to:r,type:o,attrs:i={}}=e,{doc:a}=t,s=iPe(o,a.type.schema);if(Object.keys(i).length===0)return a.rangeHasMark(n,r,s);let c=!1;return r>n&&a.nodesBetween(n,r,f=>c?!1:(c=(f.marks??[]).some(m=>m.type!==s?!1:eA(m,i)),!c)),c}function Sv(e){return ii(e)&&e instanceof zn}function z1(e){const{trState:t,type:n,attrs:r={},from:o,to:i}=e,{selection:a,doc:s,storedMarks:c}=t,f=Bn(n)?s.type.schema.marks[n]:n;if(_n(f,{code:tn.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),o&&i)try{return Math.max(o,i)<s.nodeSize&&j9({...e,from:o,to:i})}catch{return!1}return a.empty?(c??a.$from.marks()).some(m=>m.type!==n?!1:eA(m,r??{})):j9({...e,from:a.from,to:a.to})}function nA(e,t={}){const n=uPe(e.type.schema);if(!n)return!1;const{ignoreAttributes:r,ignoreDocAttributes:o}=t;return r?W9(n,e):o?n.content.eq(e.content):n.eq(e)}function W9(e,t){if(e===t)return!0;const n=e.type===t.type&&vr.sameSet(e.marks,t.marks);function r(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;const o=[],i=[];e.content.forEach(a=>o.push(a)),t.content.forEach(a=>i.push(a));for(const[a,s]of o.entries()){const c=i[a];if(!c||!W9(s,c))return!1}return!0}return n&&r()}function uPe(e){var t;return((t=e.nodes.doc)==null?void 0:t.createAndFill())??void 0}function V1(e){for(const t of Object.values(e.nodes))if(t.name!=="doc"&&(t.isBlock||t.isTextblock))return t;_n(!1,{code:tn.SCHEMA,message:"No default block node found for the provided schema."})}function dPe(e){return e.type===V1(e.type.schema)}function H1(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function lc(e,t,n){const r=e.parent.childAfter(e.parentOffset);if(!r.node)return;const o=Bn(t)?t:t.name,i=r.node.marks.find(({type:m})=>m.name===o);let a=e.index(),s=e.start()+r.offset,c=a+1,f=s+r.node.nodeSize;if(!i)return n&&f<n.pos?lc(e.doc.resolve(f+1),t,n):void 0;for(;a>0&&i.isInSet(e.parent.child(a-1).marks);)a-=1,s-=e.parent.child(a).nodeSize;for(;c<e.parent.childCount&&i.isInSet(e.parent.child(c).marks);)f+=e.parent.child(c).nodeSize,c+=1;const p=e.doc.textBetween(s,f,zB,`
|
|
1311
1311
|
|
|
1312
|
-
`);return{from:s,to:f,text:p,mark:i}}function Y9(e,t){return t.length===0||t.some(n=>e instanceof n)}function
|
|
1312
|
+
`);return{from:s,to:f,text:p,mark:i}}function Y9(e,t){return t.length===0||t.some(n=>e instanceof n)}function fPe(e){return iz(e,({from:n,to:r,prevFrom:o,prevTo:i})=>`${n}_${r}_${o}_${i}`).filter((n,r,o)=>!o.some((i,a)=>r===a?!1:n.prevFrom>=i.prevFrom&&n.prevTo<=i.prevTo&&n.from>=i.from&&n.to<=i.to))}function U9(e,t=[]){const n=[],{steps:r,mapping:o}=e,i=o.invert();r.forEach((s,c)=>{if(!Y9(s,t))return;const f=[],p=s.getMap(),m=o.slice(c);if(p.ranges.length===0&&nPe(s)){const{from:v,to:y}=s;f.push({from:v,to:y})}else p.forEach((v,y)=>{f.push({from:v,to:y})});f.forEach(v=>{const y=m.map(v.from,-1),w=m.map(v.to);n.push({from:y,to:w,prevFrom:i.map(y,-1),prevTo:i.map(w)})})});const a=Ad(n,(s,c)=>s.from-c.from);return fPe(a)}function hPe(e,t){const n=[],r=U9(e,t);for(const o of r)try{const i=e.doc.resolve(o.from),a=e.doc.resolve(o.to),s=i.blockRange(a);s&&n.push(s)}catch{}return n}function pPe(e){var t;return((t=e.content.firstChild)==null?void 0:t.textContent)??""}function mPe(e,t){if(!fu(e.selection))return;let{from:n,to:r}=e.selection;const o=(a,s)=>pPe(Vn.between(e.doc.resolve(a),e.doc.resolve(s)).content());for(let a=o(n-1,n);a&&!t.test(a);n--,a=o(n-1,n));for(let a=o(r,r+1);a&&!t.test(a);r++,a=o(r,r+1));if(n===r)return;const i=e.doc.textBetween(n,r,zB,`
|
|
1313
1313
|
|
|
1314
|
-
`);return{from:n,to:r,text:i}}function q9(e){return
|
|
1314
|
+
`);return{from:n,to:r,text:i}}function q9(e){return mPe(e,/\W/)}function cc(e,t=0){const n=Fo(e)?e[t]:e;return ZB(Bn(n),`No match string found for match ${e}`),n??""}function gPe(e){return fu(e)?e.$cursor:void 0}function vPe(e,t){return Cv(e)?t?e.type===t.nodes.doc:e.type.name==="doc":!1}function bPe(e){return ii(e)&&wi(e.anchor)&&wi(e.head)}function Sa(e,t){const n=t.nodeSize-2,r=0;let o;const i=c=>g1({min:r,max:n,value:c});if(tA(e))return e;if(e==="all")return new qi(t);if(e==="start"?o=r:e==="end"?o=n:cPe(e)?o=e.pos:o=e,wi(o))return o=i(o),Vn.near(t.resolve(o));if(bPe(o)){const c=i(o.anchor),f=i(o.head);return Vn.between(t.resolve(c),t.resolve(f))}const a=i(o.from),s=i(o.to);return Vn.between(t.resolve(a),t.resolve(s))}var yPe=3;function K9(e){const{content:t,schema:n,document:r,stringHandler:o,onError:i,attempts:a=0}=e,s=i&&a<=yPe||a===0;if(_n(s,{code:tn.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),Bn(t))return _n(o,{code:tn.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`}),o({document:r,content:t,schema:n});if(H9(t))return t.doc;if(Cv(t))return t;try{return n.nodeFromJSON(t)}catch(c){const f=EPe({schema:n,error:c,json:t}),p=i?.(f);return _n(p,{code:tn.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(f.invalidContent,null,2)}`}),K9({...e,content:p,attempts:a+1})}}function j1(){const e=Jz();if(e)return e;throw new Error(`Unable to retrieve the document from the global scope.
|
|
1315
1315
|
It seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work.
|
|
1316
1316
|
If you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string).
|
|
1317
1317
|
If you are using Next.js (or other server-side rendering frameworks), please use dynamic import with \`ssr: false\` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr).
|
|
1318
|
-
If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function G9(e){var t;return e?.defaultView??(typeof window<"u"?window:void 0)??((t=Jz())==null?void 0:t.defaultView)}function X9(e){return G9(e?.ownerDocument)}function Z9(e){const t=G9(e)??j1().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}function bPe(e){return Z9(e?.ownerDocument)}function yPe(e,t=j1()){const n=mPe(e,e.type.schema)?e.content:Ht.from(e);return $s.fromSchema(e.type.schema).serializeFragment(n,{document:t})}function xPe(e,t){return new(Z9(t)).DOMParser().parseFromString(`<body>${e}</body>`,"text/html").body}function wPe(e,t=j1()){const n=t.createElement("div");return n.append(yPe(e,t)),n.innerHTML}function W1(e){const{content:t,schema:n,document:r,fragment:o=!1,...i}=e,a=xPe(t,r),s=lD.fromSchema(n);return o?s.parseSlice(a,{...J9,...i}).content:s.parse(a,{...J9,...i})}var J9={preserveWhitespace:!1};function rA(e,t){const n=Uh(t.defaults());return ZT({...e},n)}function Q9(e,t){let n="";t&&(n=`${t.trim()}`);const r=zDe(e);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var CPe={remove(e,t){let n=e;for(const r of t)r.invalidParentNode||(n=_Te(r.path,n));return n}};function SPe({json:e,schema:t,...n}){const r=new Set(Uh(t.marks)),o=new Set(Uh(t.nodes)),i=e7({json:e,path:[],validNodes:o,validMarks:r});return{json:e,invalidContent:i,transformers:CPe,...n}}function e7(e){const{json:t,validMarks:n,validNodes:r,path:o=[]}=e,i={validMarks:n,validNodes:r},a=[],{type:s,marks:c,content:f}=t;let{invalidParentMark:p=!1,invalidParentNode:m=!1}=e;if(c){const v=[];for(const[y,w]of c.entries()){const C=Bn(w)?w:w.type;n.has(C)||(v.unshift({name:C,path:[...o,"marks",`${y}`],type:"mark",invalidParentMark:p,invalidParentNode:m}),p=!0)}a.push(...v)}if(r.has(s)||(a.push({name:s,type:"node",path:o,invalidParentMark:p,invalidParentNode:m}),m=!0),f){const v=[];for(const[y,w]of f.entries())v.unshift(...e7({...i,json:w,path:[...o,"content",`${y}`],invalidParentMark:p,invalidParentNode:m}));a.unshift(...v)}return a}function kPe(e){return!!(fu(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function oA(e){return!!(fu(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function t7(e){const t=ur.atStart(e.$anchor.doc);return!!(oA(e)&&t.anchor===e.anchor)}function EPe(e){return({dispatch:t,tr:n})=>{const{type:r,attrs:o=In(),appendText:i,range:a}=e,s=a?Vn.between(n.doc.resolve(a.from),n.doc.resolve(a.to)):n.selection,{$from:c,from:f,to:p}=s;let m=c.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(f,p,v=>{if(m)return!1;if(v.inlineContent&&v.type.allowsMarkType(r)){m=!0;return}}),m?(t?.(n.addMark(f,p,r.create(o))&&i?n.insertText(i):n),!0):!1}}function TPe({tr:e,dispatch:t}){const{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&qh(o);return!wi(i)||!o?!1:(t?.(e.lift(o,i).scrollIntoView()),!0)}function n7(e,t={},n){return function(r){const{tr:o,dispatch:i,state:a}=r,s=Bn(e)?mo(a.schema.nodes,e):e,{from:c,to:f}=Sa(n??o.selection,o.doc),p=o.doc.resolve(c),m=o.doc.resolve(f),v=p.blockRange(m),y=v&&pD(v,s,t);return!y||!v?!1:(i?.(o.wrap(v,y).scrollIntoView()),!0)}}function r7(e,t={},n){return r=>{const{tr:o,state:i}=r,a=Bn(e)?mo(i.schema.nodes,e):e;return wv({state:o,type:a,attrs:t})?TPe(r):n7(e,t,n)(r)}}function kv(e,t,n,r=!0){return function(o){const{tr:i,dispatch:a,state:s}=o,c=Bn(e)?mo(s.schema.nodes,e):e,{from:f,to:p}=Sa(n??i.selection,i.doc);let m=!1,v;return i.doc.nodesBetween(f,p,(y,w)=>{if(m)return!1;if(!y.isTextblock||y.hasMarkup(c,t))return;if(y.type===c){m=!0,v=y.attrs;return}const C=i.doc.resolve(w),k=C.index();m=C.parent.canReplaceWith(k,k+1,c),m&&(v=C.parent.attrs)}),m?(a?.(i.setBlockType(f,p,c,{...r?v:{},...t}).scrollIntoView()),!0):!1}}function iA(e){return t=>{const{tr:n,state:r}=t,{type:o,attrs:i,preserveAttrs:a=!0}=e,s=wv({state:n,type:o,attrs:i}),c=e.toggleType??V1(r.schema);if(s)return kv(c,{...a?s.node.attrs:{},...i})(t);const f=wv({state:n,type:c,attrs:i});return kv(o,{...a?f?.node.attrs:{},...i})(t)}}function DPe(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(mo(t,2),10)>=e:!1}function APe(e,t){let{head:n,empty:r,anchor:o}=e;for(const i of t.steps)n=i.getMap().map(n);r?t.setSelection(Vn.near(t.doc.resolve(n))):t.setSelection(Vn.between(t.doc.resolve(o),t.doc.resolve(n)))}function OPe(e){const{attrs:t={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=e;return({state:a,tr:s,dispatch:c})=>{var f;const p=a.schema,m=Sa(e.selection??i??s.selection,s.doc),v=m.$from.index(),{from:y,to:w,$from:C}=m,k=Bn(e.type)?p.nodes[e.type]??p.marks[e.type]:e.type;if(_n(Bn(e.type)?k:!0,{code:tn.SCHEMA,message:`Schema contains no marks or nodes with name ${k}`}),tPe(k)){if(!C.parent.canReplaceWith(v,v,k))return!1;s.replaceWith(y,w,k.create(t,r?p.text(r):void 0))}else _n(r,{message:"`replaceText` cannot be called without content when using a mark type"}),s.replaceWith(y,w,p.text(r,V9(k)?[k.create(t)]:void 0));return n&&s.insertText(n),o&&APe(a.selection,s),c&&(DPe(60)&&((f=document.getSelection())==null||f.empty()),c(s)),!0}}function o7(e,t){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const a=e.start()+n.offset+o;return o7(e.doc.resolve(a+1))}function i7(e){return({dispatch:t,tr:n,state:r})=>{const{type:o,expand:i=!0,range:a}=e,s=Sa(e.selection??a??n.selection,n.doc);let{from:c,to:f,$from:p,$to:m}=s;const v=Bn(o)?r.schema.marks[o]:o;v!==null&&_n(v,{code:tn.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const y=v??o7(p);if(!y)return!1;const w=lc(p,y,m);return i&&w&&(c=Math.max(0,Math.min(c,w.from)),f=Math.min(Math.max(f,w.to),n.doc.nodeSize-2)),t?.(n.removeMark(c,wi(f)?f:c,V9(v)?v:void 0)),!0}}function MPe(e){const{node:t,predicate:n,descend:r=!0,action:o}=e;_n(Cv(t),{code:tn.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),_n(Br(n),{code:tn.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return t.descendants((a,s)=>{const c={node:a,pos:s};return n(c)&&(i.push(c),o?.(c)),r}),i}function PPe(e){const{type:t,...n}=e;return MPe({...n,predicate:r=>r.node.type===t})}function NPe(e,t={}){const{descend:n=!1,predicate:r,StepTypes:o}=t,i=dPe(e,o),a=[];for(const s of i){const{start:c,end:f}=s;e.doc.nodesBetween(c,f,(p,m)=>((r?.(p,m,s)??!0)&&a.push({node:p,pos:m}),n))}return a}function Y1(e){const{regexp:t,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:a,shouldSkip:s,invalidMarks:c}=e;let f;const p=new ra(t,(m,v,y,w)=>{const{tr:C,schema:k}=m;f||(f=Bn(n)?k.marks[n]:n,_n(f,{code:tn.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let T=v[1],E=v[0];const _=aA({captureGroup:T,fullMatch:E,end:w,start:y,rule:p,state:m,ignoreWhitespace:o,invalidMarks:c,shouldSkip:s,updateCaptured:a});if(!_)return null;({start:y,end:w,captureGroup:T,fullMatch:E}=_);const R=Br(r)?r(v):r;let P=w,$=[];if(T){const z=E.search(/\S/),q=y+E.indexOf(T),Y=q+T.length;$=C.storedMarks??[],Y<w&&C.delete(Y,w),q>y&&C.delete(y+z,q),P=y+z+T.length}return C.addMark(y,P,f.create(R)),C.setStoredMarks($),i?.({tr:C,match:v,start:y,end:w}),C});return p}function a7(e){const{regexp:t,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:a=!1,updateCaptured:s,invalidMarks:c}=e,f=new ra(t,(p,m,v,y)=>{const w=Br(r)?r(m):r,{tr:C,schema:k}=p,T=Bn(n)?k.nodes[n]:n;let E=m[1],_=m[0];const R=aA({captureGroup:E,fullMatch:_,end:y,start:v,rule:f,state:p,ignoreWhitespace:a,invalidMarks:c,shouldSkip:i,updateCaptured:s});if(!R)return null;({start:v,end:y,captureGroup:E,fullMatch:_}=R),_n(T,{code:tn.SCHEMA,message:`No node exists for ${n} in the schema.`});const P=T.createAndFill(w);return P&&(C.replaceRangeWith(T.isBlock?C.doc.resolve(v).before():v,y,P),o?.({tr:C,match:[_,E??""],start:v,end:y})),C});return f}function _Pe(e){const{regexp:t,transformMatch:n,beforeDispatch:r,shouldSkip:o,ignoreWhitespace:i=!1,updateCaptured:a,invalidMarks:s}=e,c=new ra(t,(f,p,m,v)=>{const y=n(p);if(nc(y))return null;const{tr:w,schema:C}=f;let k=p[1],T=p[0];const E=aA({captureGroup:k,fullMatch:T,end:v,start:m,rule:c,state:f,ignoreWhitespace:i,invalidMarks:s,shouldSkip:o,updateCaptured:a});return E?({start:m,end:v,captureGroup:k,fullMatch:T}=E,y===""?w.delete(m,v):w.replaceWith(m,v,C.text(y)),r?.({tr:w,match:p,start:m,end:v}),w):null});return c}function aA({captureGroup:e,fullMatch:t,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:a,updateCaptured:s,state:c,invalidMarks:f}){var p;if(t==null)return null;const m=s?.({captureGroup:e,fullMatch:t,start:r,end:n})??{};e=m.captureGroup??e,t=m.fullMatch??t,r=m.start??r,n=m.end??n;const v=c.doc.resolve(r),y=c.doc.resolve(n);return f&&UD({$from:v,$to:y},f)||o.invalidMarks&&UD({$from:v,$to:y},o.invalidMarks)||i&&e?.trim()===""||a?.({state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"})||(p=o.shouldSkip)!=null&&p.call(o,{state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"})?null:{captureGroup:e,end:n,fullMatch:t,start:r}}var RPe=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(i=>{(i?i.split(" "):[]).forEach(s=>{if(s.startsWith("atm_")){const[,c]=s.split("_");n[c]=s}else r.push(s)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},IPe=RPe;const s7=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function LPe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const l7=(e,t,n)=>{let r=LPe(e,n);if(!r)return!1;let o=c7(r);if(!o){let a=r.blockRange(),s=a&&qh(a);return s==null?!1:(t&&t(e.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&d7(e,o,t))return!0;if(r.parent.content.size==0&&(cp(i,"end")||zn.isSelectable(i))){let a=mD(e.doc,r.before(),r.after(),gn.empty);if(a&&a.slice.size<a.to-a.from){if(t){let s=e.tr.step(a);s.setSelection(cp(i,"end")?ur.findFrom(s.doc.resolve(s.mapping.map(o.pos,-1)),-1):zn.create(s.doc,o.pos-i.nodeSize)),t(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1};function cp(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const $Pe=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=c7(r)}let a=i&&i.nodeBefore;return!a||!zn.isSelectable(a)?!1:(t&&t(e.tr.setSelection(zn.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function c7(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function FPe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const BPe=(e,t,n)=>{let r=FPe(e,n);if(!r)return!1;let o=u7(r);if(!o)return!1;let i=o.nodeAfter;if(d7(e,o,t))return!0;if(r.parent.content.size==0&&(cp(i,"start")||zn.isSelectable(i))){let a=mD(e.doc,r.before(),r.after(),gn.empty);if(a&&a.slice.size<a.to-a.from){if(t){let s=e.tr.step(a);s.setSelection(cp(i,"start")?ur.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):zn.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},zPe=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=u7(r)}let a=i&&i.nodeAfter;return!a||!zn.isSelectable(a)?!1:(t&&t(e.tr.setSelection(zn.create(e.doc,i.pos)).scrollIntoView()),!0)};function u7(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const VPe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
1319
|
-
`).scrollIntoView()),!0)};function sA(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const HPe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=sA(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(t){let s=n.after(),c=e.tr.replaceWith(s,s,a.createAndFill());c.setSelection(ur.near(c.doc.resolve(s),1)),t(c.scrollIntoView())}return!0},jPe=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof qi||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=sA(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(Vn.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},WPe=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Kh(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&qh(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function YPe(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof zn&&t.selection.node.isBlock)return!r.parentOffset||!Kh(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,a=t.tr;(t.selection instanceof Vn||t.selection instanceof qi)&&a.deleteSelection();let s=r.depth==0?null:sA(r.node(-1).contentMatchAt(r.indexAfter(-1))),c=e&&e(o.parent,i),f=c?[c]:i&&s?[{type:s}]:void 0,p=Kh(a.doc,a.mapping.map(r.pos),1,f);if(!f&&!p&&Kh(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)&&(s&&(f=[{type:s}]),p=!0),p&&(a.split(a.mapping.map(r.pos),1,f),!i&&!r.parentOffset&&r.parent.type!=s)){let m=a.mapping.map(r.before()),v=a.doc.resolve(m);s&&r.node(-1).canReplaceWith(v.index(),v.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}n(a.scrollIntoView())}return!0}}const UPe=YPe(),qPe=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(zn.create(e.doc,o))),!0)},KPe=(e,t)=>(t&&t(e.tr.setSelection(new qi(e.doc))),!0);function GPe(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||sv(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function d7(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,a;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(GPe(e,t,n))return!0;let s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(i=(a=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&a.matchType(i[0]||o.type).validEnd){if(n){let m=t.pos+o.nodeSize,v=Ht.empty;for(let C=i.length-1;C>=0;C--)v=Ht.from(i[C].create(null,v));v=Ht.from(r.copy(v));let y=e.tr.step(new Bo(t.pos-1,m,t.pos,m,new gn(v,1,0),i.length,!0)),w=m+2*i.length;sv(y.doc,w)&&y.join(w),n(y.scrollIntoView())}return!0}let c=ur.findFrom(t,1),f=c&&c.$from.blockRange(c.$to),p=f&&qh(f);if(p!=null&&p>=t.depth)return n&&n(e.tr.lift(f,p).scrollIntoView()),!0;if(s&&cp(o,"start",!0)&&cp(r,"end")){let m=r,v=[];for(;v.push(m),!m.isTextblock;)m=m.lastChild;let y=o,w=1;for(;!y.isTextblock;y=y.firstChild)w++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){let C=Ht.empty;for(let T=v.length-1;T>=0;T--)C=Ht.from(v[T].copy(C));let k=e.tr.step(new Bo(t.pos-v.length,t.pos+o.nodeSize,t.pos+w,t.pos+o.nodeSize-w,new gn(C,v.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function f7(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Vn.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const XPe=f7(-1),ZPe=f7(1);function JPe(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],a=o.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(o.pos,i.pos,s=>{if(a)return!1;a=s.inlineContent&&s.type.allowsMarkType(n)}),a)return!0}return!1}function QPe(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:a}=n.selection;if(o&&!i||!JPe(n.doc,a,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let s=!1,c=n.tr;for(let f=0;!s&&f<a.length;f++){let{$from:p,$to:m}=a[f];s=n.doc.rangeHasMark(p.pos,m.pos,e)}for(let f=0;f<a.length;f++){let{$from:p,$to:m}=a[f];if(s)c.removeMark(p.pos,m.pos,e);else{let v=p.pos,y=m.pos,w=p.nodeAfter,C=m.nodeBefore,k=w&&w.isText?/^\s*/.exec(w.text)[0].length:0,T=C&&C.isText?/\s*$/.exec(C.text)[0].length:0;v+k<y&&(v+=k,y-=T),c.addMark(v,y,e.create(t))}}r(c.scrollIntoView())}return!0}}function U1(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let lA=U1(s7,l7,$Pe),h7=U1(s7,BPe,zPe);const uc={Enter:U1(VPe,jPe,WPe,UPe),"Mod-Enter":HPe,Backspace:lA,"Mod-Backspace":lA,"Shift-Backspace":lA,Delete:h7,"Mod-Delete":h7,"Mod-a":KPe},p7={"Ctrl-h":uc.Backspace,"Alt-Backspace":uc["Mod-Backspace"],"Ctrl-d":uc.Delete,"Ctrl-Alt-Backspace":uc["Mod-Delete"],"Alt-Delete":uc["Mod-Delete"],"Alt-d":uc["Mod-Delete"],"Ctrl-a":XPe,"Ctrl-e":ZPe};for(let e in uc)p7[e]=uc[e];const eNe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,cA=eNe?p7:uc;for(var hu={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},q1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tNe=typeof navigator<"u"&&/Mac/.test(navigator.platform),nNe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Si=0;Si<10;Si++)hu[48+Si]=hu[96+Si]=String(Si);for(var Si=1;Si<=24;Si++)hu[Si+111]="F"+Si;for(var Si=65;Si<=90;Si++)hu[Si]=String.fromCharCode(Si+32),q1[Si]=String.fromCharCode(Si);for(var uA in hu)q1.hasOwnProperty(uA)||(q1[uA]=hu[uA]);function rNe(e){var t=tNe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||nNe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?q1:hu)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const oNe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function iNe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<t.length-1;s++){let c=t[s];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))oNe?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function aNe(e){let t=Object.create(null);for(let n in e)t[iNe(n)]=e[n];return t}function dA(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function fA(e){let t=aNe(e);return function(n,r){let o=rNe(r),i,a=t[dA(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=t[dA(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=hu[r.keyCode])&&i!=o){let s=t[dA(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}function sNe(e){const t=Ad(e,(i,a)=>(a.priority??Fr.Low)-(i.priority??Fr.Low)),n=[],r=[];for(const i of t)pNe(i)?n.push(i):r.push(i);let o;return new rc({key:lNe,view:i=>(o=i,{}),props:{transformPasted:i=>{var a,s,c;const f=o.state.selection.$from,p=f.node().type.name,m=new Set(f.marks().map(v=>v.type.name));for(const v of n){if((a=v.ignoredNodes)!=null&&a.includes(p)||(s=v.ignoredMarks)!=null&&s.some(E=>m.has(E)))continue;const y=((c=i.content.firstChild)==null?void 0:c.textContent)??"",w=!o.state.selection.empty&&i.content.childCount===1&&y,C=nv(y,v.regexp)[0];if(w&&C&&v.type==="mark"&&v.replaceSelection){const{from:E,to:_}=o.state.selection,R=o.state.doc.slice(E,_),P=R.content.textBetween(0,R.content.size);if(typeof v.replaceSelection!="boolean"?v.replaceSelection(P):v.replaceSelection){const $=[],{getAttributes:z,markType:q}=v,Y=Br(z)?z(C,!0):z,J=q.create(Y);return R.content.forEach(K=>{if(K.isText){const ee=J.addToSet(K.marks);$.push(K.mark(ee))}}),gn.maxOpen(Ht.fromArray($))}}const{nodes:k,transformed:T}=fNe(i.content,v,o.state.schema);T&&(i=v.type==="node"&&v.nodeType.isBlock?new gn(Ht.fromArray(k),0,0):new gn(Ht.fromArray(k),i.openStart,i.openEnd))}return bNe(i)},handleDOMEvents:{paste:(i,a)=>{var s,c;const f=a;if(!((c=(s=i.props).editable)!=null&&c.call(s,i.state)))return!1;const{clipboardData:p}=f;if(!p)return!1;const m=[...p.items].map(y=>y.getAsFile()).filter(y=>!!y);if(m.length===0)return!1;const{selection:v}=i.state;for(const{fileHandler:y,regexp:w}of r){const C=w?m.filter(k=>w.test(k.type)):m;if(C.length!==0&&y({event:f,files:C,selection:v,view:i,type:"paste"}))return f.preventDefault(),!0}return!1},drop:(i,a)=>{var s,c,f;const p=a;if(!((c=(s=i.props).editable)!=null&&c.call(s,i.state)))return!1;const{dataTransfer:m,clientX:v,clientY:y}=p;if(!m)return!1;const w=vNe(p);if(w.length===0)return!1;const C=((f=i.posAtCoords({left:v,top:y}))==null?void 0:f.pos)??i.state.selection.anchor;for(const{fileHandler:k,regexp:T}of r){const E=T?w.filter(_=>T.test(_.type)):w;if(E.length!==0&&k({event:p,files:E,pos:C,view:i,type:"drop"}))return p.preventDefault(),!0}return!1}}}})}var lNe=new _d("pasteRule");function hA(e,t){return function n(r){const{fragment:o,rule:i,nodes:a}=r,{regexp:s,ignoreWhitespace:c,ignoredMarks:f,ignoredNodes:p}=i;let m=!1;return o.forEach(v=>{if(p?.includes(v.type.name)||mNe(v)){a.push(v);return}if(!v.isText){const C=n({fragment:v.content,rule:i,nodes:[]});m||(m=C.transformed);const k=Ht.fromArray(C.nodes);v.type.validContent(k)?a.push(v.copy(k)):a.push(...C.nodes);return}if(v.marks.some(C=>gNe(C)||f?.includes(C.type.name))){a.push(v);return}const y=v.text??"";let w=0;for(const C of nv(y,s)){const k=C[1],T=C[0];if(c&&k?.trim()===""||!T)return;const E=C.index,_=E+T.length;E>w&&a.push(v.cut(w,E));let R=v.cut(E,_);if(T&&k){const P=T.search(/\S/),$=E+T.indexOf(k),z=$+k.length;P&&a.push(v.cut(E,E+P)),R=v.cut($,z)}e({nodes:a,rule:i,textNode:R,match:C,schema:t}),m=!0,w=_}y&&w<y.length&&a.push(v.cut(w))}),{nodes:a,transformed:m}}}function cNe(e){const{nodes:t,rule:n,textNode:r,match:o,schema:i}=e,{transformMatch:a,getAttributes:s,markType:c}=n,f=Br(s)?s(o,!1):s,p=r.text??"",m=c.create(f),v=a?.(o);if(v==="")return;if(v===!1){t.push(i.text(p,r.marks));return}const y=m.addToSet(r.marks);t.push(i.text(v??p,y))}function uNe(e){const{nodes:t,rule:n,textNode:r,match:o,schema:i}=e,{transformMatch:a}=n,s=a?.(o);if(s===""||s===!1)return;const c=s??r.text??"";t.push(i.text(c,r.marks))}function dNe(e){const{nodes:t,rule:n,textNode:r,match:o}=e,{getAttributes:i,nodeType:a,getContent:s}=n,c=Br(i)?i(o,!1):i,f=(s?s(o):r)||void 0;t.push(a.createChecked(c,f))}function fNe(e,t,n){const r=[];switch(t.type){case"mark":return hA(cNe,n)({fragment:e,nodes:r,rule:t});case"node":return hA(dNe,n)({fragment:e,nodes:r,rule:t});default:return hA(uNe,n)({fragment:e,nodes:r,rule:t})}}var hNe=["mark","node","text"];function pNe(e){return Za(hNe,e.type)}function mNe(e){var t;return e.type.spec.code||((t=e.type.spec.group)==null?void 0:t.split(" ").includes("code"))}function gNe(e){var t;return e.type.name==="code"||((t=e.type.spec.group)==null?void 0:t.split(" ").includes("code"))}function vNe(e){var t,n;const{dataTransfer:r}=e;return r?((t=r.files)==null?void 0:t.length)>0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function bNe(e){const t=gn.maxOpen(e.content);return t.openStart<e.openStart||t.openEnd<e.openEnd?t:e}var yNe=process.env.NODE_ENV==="production";function xNe(e,t){if(!yNe){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var wNe=Object.defineProperty,CNe=Object.getOwnPropertyDescriptor,On=(e,t,n,r)=>{for(var o=r>1?void 0:r?CNe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&wNe(t,n,o),o},m7=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},wn=(e,t,n)=>(m7(e,t,"read from private field"),n?n.call(e):t.get(e)),qo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},si=(e,t,n,r)=>(m7(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function SNe(e,t){return e===t}function g7(e){const{previousOptions:t,update:n,equals:r=SNe}=e,o=Od({...t,...n}),i=In(),a=Uh(t);for(const c of a){const f=t[c],p=o[c];if(r(f,p)){i[c]={changed:!1};continue}i[c]={changed:!0,previousValue:f,value:p}}const s=c=>{const f=In();for(const p of c){const m=i[p];m?.changed&&(f[p]=m.value)}return f};return{changes:Od(i),options:o,pickChanged:s}}var kNe={[tn.DUPLICATE_HELPER_NAMES]:"helper method",[tn.DUPLICATE_COMMAND_NAMES]:"command method"};function v7(e){const{name:t,set:n,code:r}=e,o=kNe[r];_n(!n.has(t),{code:r,message:`There is a naming conflict for the name: ${t} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(t)}function K1(...e){return ov(IPe(...e).split(" ")).join(" ")}var b7="__IGNORE__",ENe="__ALL__",up=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=In(),this.populateMappedHandlers(),this._options=this._initialOptions=PTe(e,this.constructor.defaultOptions,t??In(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const e=[],{customHandlerKeys:t,handlerKeys:n,staticKeys:r}=this.constructor;for(const o of Uh(this._options))r.includes(o)||n.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){if(es.isProduction)return;const t=[];for(const n of Uh(e))this._dynamicKeys.includes(n)||t.push(n);_n(ks(t),{code:tn.INVALID_SET_EXTENSION_OPTIONS,message:`Invalid properties passed into the 'setOptions()' method: ${JSON.stringify(t)}.`})}setOptions(e){var t;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);const{changes:r,options:o,pickChanged:i}=g7({previousOptions:n,update:e});this.updateDynamicOptions(o),(t=this.onSetOptions)==null||t.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;const t=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=g7({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(r),(e=this.onSetOptions)==null||e.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return ZT(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(const e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){const e=In();for(const t of this.constructor.handlerKeys)e[t]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[t])==null?void 0:r.reducer;let a=i?.getDefault(...n);for(const[,s]of this._mappedHandlers[t]){const c=s(...n);if(a=i?i.accumulator(a,c,...n):c,TNe(o,a,t))return a}return a};return e}addHandler(e,t,n=Fr.Default){return this._mappedHandlers[e].push([n,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,r])=>r!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=Ad(this._mappedHandlers[e],([t],[n])=>n-t)}addCustomHandler(e,t){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[e]:t}))??rz}};up.defaultOptions={},up.staticKeys=[],up.handlerKeys=[],up.handlerKeyOptions={},up.customHandlerKeys=[];function TNe(e,t,n){const{[ENe]:r}=e,o=e[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==b7&&(Br(o.earlyReturnValue)?o.earlyReturnValue(t)===!0:t===o.earlyReturnValue)||r&&r.earlyReturnValue!==b7&&(Br(r.earlyReturnValue)?r.earlyReturnValue(t)===!0:t===r.earlyReturnValue))}var G1=class extends up{constructor(...e){super(DNe,...e),this["~E"]={},this._extensions=iz(this.createExtensions(),t=>t.constructor),this.extensionMap=new Map;for(const t of this._extensions)this.extensionMap.set(t.constructor,t)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${KB(this.name)}Extension`}get store(){return _n(this._store,{code:tn.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),Od(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(n=>t.constructor===e?t:n))}createExtensions(){return[]}getExtension(e){const t=this.extensionMap.get(e);return _n(t,{code:tn.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||(this._store=e)}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};G1.defaultPriority=Fr.Default;var Xr=class extends G1{static get[tc](){return oi.PlainExtensionConstructor}get[tc](){return oi.PlainExtension}},dp=class extends G1{static get[tc](){return oi.MarkExtensionConstructor}get[tc](){return oi.MarkExtension}get type(){return mo(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};dp.disableExtraAttributes=!1;var aa=class extends G1{static get[tc](){return oi.NodeExtensionConstructor}get[tc](){return oi.NodeExtension}get type(){return mo(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};aa.disableExtraAttributes=!1;var DNe={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function y7(e){return sp(e)&&lp(e,[oi.PlainExtension,oi.MarkExtension,oi.NodeExtension])}function ANe(e){return sp(e)&&lp(e,[oi.PlainExtensionConstructor,oi.MarkExtensionConstructor,oi.NodeExtensionConstructor])}function x7(e){return sp(e)&&lp(e,oi.PlainExtension)}function Ev(e){return sp(e)&&lp(e,oi.NodeExtension)}function X1(e){return sp(e)&&lp(e,oi.MarkExtension)}function dr(e){return t=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:a,handlerKeyOptions:s,...c}=e,f=t;n&&(f.defaultOptions=n),a&&(f.defaultPriority=a),s&&(f.handlerKeyOptions=s),f.staticKeys=i??[],f.handlerKeys=o??[],f.customHandlerKeys=r??[];for(const[p,m]of Object.entries(c))f[p]||(f[p]=m);return f}}var ONe=class extends Xr{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=In(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var e,t,n;if(this.attributeObject=In(),(e=this.store.managerSettings.exclude)!=null&&e.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((t=r.options.exclude)!=null&&t.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:K1(...r.classNames??[],o?.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:K1(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function Mo(e={}){return(t,n,r)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[n]=e}}function Cn(e={}){return(t,n,r)=>{(t.decoratedCommands??(t.decoratedCommands={}))[n]=e}}function co(e){return(t,n,r)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[n]=e}}var MNe=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>t=>{let n=!0;const{view:r,tr:o,dispatch:i}=t;if(!r)return!1;for(const s of this.validateHandlers)if(!s({...t,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(t).then(s=>{this.runHandlers(this.successHandlers,{value:s,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(s=>{this.runHandlers(this.failureHandlers,{error:s,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),i(o),!0)}}validate(e,t="push"){return this.validateHandlers[t](e),this}success(e,t="push"){return this.successHandlers[t](e),this}failure(e,t="push"){return this.failureHandlers[t](e),this}runHandlers(e,t){var n;for(const r of e)if(!r({...t,dispatch:()=>{}}))break;(n=t.dispatch)==null||n.call(t,t.tr)}};function fp(e){const{type:t,attrs:n,range:r,selection:o}=e;return i=>{const{dispatch:a,tr:s,state:c}=i,f=Bn(t)?c.schema.marks[t]:t;if(_n(f,{code:tn.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),r||o){const{from:p,to:m}=Sa(o??r??s.selection,s.doc);return z1({trState:s,type:t,...r})?a?.(s.removeMark(p,m,f)):a?.(s.addMark(p,m,f.create(n))),!0}return I1(QPe(f,n))(i)}}function PNe(e,t,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(r.pos,o.pos,a=>{if(i)return!1;i=a.inlineContent&&a.type.allowsMarkType(e)}),i)return!0}return!1}function NNe(e,t,n){return({tr:r,dispatch:o,state:i})=>{const a=Sa(n??r.selection,r.doc),s=pPe(a),c=Bn(e)?i.schema.marks[e]:e;if(_n(c,{code:tn.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),a.empty&&!s||!PNe(c,r.doc,a.ranges))return!1;if(!o)return!0;if(s)return r.removeStoredMark(c),t&&r.addStoredMark(c.create(t)),o(r),!0;let f=!1;for(const{$from:p,$to:m}of a.ranges){if(f)break;f=r.doc.rangeHasMark(p.pos,m.pos,c)}for(const{$from:p,$to:m}of a.ranges)f&&r.removeMark(p.pos,m.pos,c),t&&r.addMark(p.pos,m.pos,c.create(t));return o(r),!0}}function _Ne(e,t={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,a=n.selection,{from:s=a.from,to:c=s??a.to,marks:f={}}=t;if(!r)return!0;n.insertText(e,s,c);const p=mo(n.steps,n.steps.length-1).getMap().map(c);for(const[m,v]of Qo(f))n.addMark(s,p,mo(i.marks,m).create(v));return r(n),!0}}var fr=class extends Xr{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{const{forcedUpdates:n}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:ov([...n,...t])}),e}}get name(){return"commands"}get transaction(){const e=this.store.getState();this._transaction||(this._transaction=e.tr);const t=this._transaction.before.eq(e.doc),n=!ks(this._transaction.steps);if(!t){const r=e.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;const{extensions:n,helpers:r}=this.store,o=In(),i=new Set;let a=In();const s=f=>{var p;const m=In(),v=()=>f??this.transaction;let y=[];const w=()=>y;for(const[k,T]of Object.entries(o))(p=a[k])!=null&&p.disableChaining||(m[k]=this.chainedFactory({chain:m,command:T.original,getTr:v,getChain:w}));const C=k=>{_n(k===v(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return m.run=(k={})=>{const T=y;y=[];for(const E of T)if(!E(C)&&k.exitEarly)return;e.dispatch(v())},m.tr=()=>{const k=y;y=[];for(const T of k)T(C);return v()},m.enabled=()=>{for(const k of y)if(!k())return!1;return!0},m.new=k=>s(k),m};for(const f of n){const p=((t=f.createCommands)==null?void 0:t.call(f))??{},m=f.decoratedCommands??{},v={};a={...a,decoratedCommands:m};for(const[y,w]of Object.entries(m)){const C=Bn(w.shortcut)&&w.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(w.shortcut,f.options)}:void 0;this.updateDecorated(y,{...w,name:f.name,...C}),p[y]=f[y].bind(f),w.active&&(v[y]=()=>{var k;return((k=w.active)==null?void 0:k.call(w,f.options,this.store))??!1})}p1(p)||this.addCommands({active:v,names:i,commands:o,extensionCommands:p})}const c=s();for(const[f,p]of Object.entries(c))s[f]=p;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",s),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",s)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return Bn(e)?_Ne(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...t,...r})(o)}).generateCommand()}selectText(e,t={}){return({tr:n,dispatch:r})=>{const o=Sa(e,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!t.forceUpdate?!1:(r?.(n.setSelection(o)),!0)}}selectMark(e){return t=>{const{tr:n}=t,r=lc(n.selection.$from,e);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(t):!1}}delete(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=e??t.selection;return n?.(t.delete(r,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:n})=>(n&&(e?.(),n(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:n})=>(n?.(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:n,dispatch:r})=>(r?.(n.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:e,selection:t});return i?(o?.(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return e=>{const{tr:t,dispatch:n}=e,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(e):(n?.(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t?.(e.setSelection(Vn.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>fu(t.selection)?(e?.(t.insertText(`
|
|
1320
|
-
`)),!0):!1}insertNode(e,t={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:a,range:s,selection:c,replaceEmptyParentBlock:f=!1}=t,{from:p,to:m,$from:v}=Sa(c??s??r.selection,r.doc);if(Cv(e)||oPe(e)){const T=v.before(v.depth);return n?.(f&&p===m&&H1(v.parent)?r.replaceWith(T,T+v.parent.nodeSize,e):r.replaceWith(p,m,e)),!0}const y=Bn(e)?o.schema.nodes[e]:e;_n(y,{code:tn.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});const w=(i=t.marks)==null?void 0:i.map(T=>{if(T instanceof vr)return T;const E=Bn(T)?o.schema.marks[T]:T;return _n(E,{code:tn.SCHEMA,message:`The requested mark type ${T} does not exist in the schema.`}),E.create()}),C=y.createAndFill(a,Bn(t.content)?o.schema.text(t.content):t.content,w);return C?(n?.(p!==m?r.replaceRangeWith(p,m,C):r.insert(p,C)),!0):!1}}focus(e){return t=>{const{dispatch:n,tr:r}=t,{view:o}=this.store;if(e===!1||o.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){const{from:i=0,to:a=i}=r.selection;e={from:i,to:a}}return n&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,n,r=!0){return kv(e,t,n,r)}toggleWrappingNode(e,t,n){return r7(e,t,n)}toggleBlockNodeItem(e){return iA(e)}wrapInNode(e,t,n){return n7(e,t,n)}applyMark(e,t,n){return NNe(e,t,n)}toggleMark(e){return fp(e)}removeMark(e){return i7(e)}setMeta(e,t){return({tr:n})=>(n.setMeta(e,t),!0)}selectAll(){return this.selectText("all")}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(e=navigator.clipboard)!=null&&e.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(e,t,n)=>this.insertNode(W1({content:e,schema:n.state.schema}),{selection:t})(n)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return OPe(e)}getAllCommandOptions(){const e={};for(const[t,n]of this.decorated)p1(n)||(e[t]=n);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}const n=this.decorated.get(e)??{name:""};this.decorated.set(e,{...n,...t})}handleIosFocus(){es.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...RNe,...t}}setCommandMeta(e,t){const n=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addCommands(e){const{extensionCommands:t,commands:n,names:r,active:o}=e;for(const[i,a]of Qo(t))v7({name:i,set:r,code:tn.DUPLICATE_COMMAND_NAMES}),_n(!INe.has(i),{code:tn.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(a,o[i])}unchainedFactory(e){return(...t)=>{const{shouldDispatch:n=!0,command:r}=e,{view:o}=this.store,{state:i}=o;let a;return n&&(a=o.dispatch),r(...t)({state:i,dispatch:a,view:o,tr:i.tr})}}createUnchainedCommand(e,t){const n=this.unchainedFactory({command:e});return n.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=e,n.active=t,n}chainedFactory(e){return(...t)=>{const{chain:n,command:r,getTr:o,getChain:i}=e,a=i(),{view:s}=this.store,{state:c}=s;return a.push(f=>r(...t)({state:c,dispatch:f,view:s,tr:o()})),n}}};On([Cn()],fr.prototype,"customDispatch",1),On([Cn()],fr.prototype,"insertText",1),On([Cn()],fr.prototype,"selectText",1),On([Cn()],fr.prototype,"selectMark",1),On([Cn()],fr.prototype,"delete",1),On([Cn()],fr.prototype,"emptyUpdate",1),On([Cn()],fr.prototype,"forceUpdate",1),On([Cn()],fr.prototype,"updateNodeAttributes",1),On([Cn()],fr.prototype,"setContent",1),On([Cn()],fr.prototype,"resetContent",1),On([Cn()],fr.prototype,"emptySelection",1),On([Cn()],fr.prototype,"insertNewLine",1),On([Cn()],fr.prototype,"insertNode",1),On([Cn()],fr.prototype,"focus",1),On([Cn()],fr.prototype,"blur",1),On([Cn()],fr.prototype,"setBlockNodeType",1),On([Cn()],fr.prototype,"toggleWrappingNode",1),On([Cn()],fr.prototype,"toggleBlockNodeItem",1),On([Cn()],fr.prototype,"wrapInNode",1),On([Cn()],fr.prototype,"applyMark",1),On([Cn()],fr.prototype,"toggleMark",1),On([Cn()],fr.prototype,"removeMark",1),On([Cn()],fr.prototype,"setMeta",1),On([Cn({description:({t:e})=>e(ru.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(ru.SELECT_ALL_LABEL),shortcut:on.SelectAll})],fr.prototype,"selectAll",1),On([Cn({description:({t:e})=>e(ru.COPY_DESCRIPTION),label:({t:e})=>e(ru.COPY_LABEL),shortcut:on.Copy,icon:"fileCopyLine"})],fr.prototype,"copy",1),On([Cn({description:({t:e})=>e(ru.PASTE_DESCRIPTION),label:({t:e})=>e(ru.PASTE_LABEL),shortcut:on.Paste,icon:"clipboardLine"})],fr.prototype,"paste",1),On([Cn({description:({t:e})=>e(ru.CUT_DESCRIPTION),label:({t:e})=>e(ru.CUT_LABEL),shortcut:on.Cut,icon:"scissorsFill"})],fr.prototype,"cut",1),On([Cn()],fr.prototype,"replaceText",1),On([Mo()],fr.prototype,"getAllCommandOptions",1),On([Mo()],fr.prototype,"getCommandOptions",1),On([Mo()],fr.prototype,"getCommandProp",1),fr=On([dr({defaultPriority:Fr.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],fr);var RNe={forcedUpdates:[]},INe=new Set(["run","chain","original","raw","enabled","tr","new"]),Ds=class extends Xr{constructor(){super(...arguments),this.placeholders=wr.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{const t=rv(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=e;return new MNe(n).validate(a=>this.addPlaceholder(t,r)(a)).success(a=>{const{state:s,tr:c,dispatch:f,view:p,value:m}=a,v=this.store.helpers.findPlaceholder(t);if(!v){const y=new Error("The placeholder has been removed");return o?.({error:y,state:s,tr:c,dispatch:f,view:p})??!1}return this.removePlaceholder(t)({state:s,tr:c,view:p,dispatch:()=>{}}),i(m,v,{state:s,tr:c,dispatch:f,view:p})}).failure(a=>(this.removePlaceholder(t)({...a,dispatch:()=>{}}),o?.(a)??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,n,r,o,i,a;const{added:s,clearTrackers:c,removed:f,updated:p}=this.getMeta(e);if(c){this.placeholders=wr.empty;for(const[,m]of this.placeholderWidgets)(n=(t=m.spec).onDestroy)==null||n.call(t,this.store.view,m.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:m=>{var v,y;const w=this.placeholderWidgets.get(m.id);w&&((y=(v=w.spec).onDestroy)==null||y.call(v,this.store.view,w.spec.element))}});for(const[,m]of this.placeholderWidgets)(o=(r=m.spec).onUpdate)==null||o.call(r,this.store.view,m.from,m.spec.element,m.spec.data);for(const m of s){if(m.type==="inline"){this.addInlinePlaceholder(m,e);continue}if(m.type==="node"){this.addNodePlaceholder(m,e);continue}if(m.type==="widget"){this.addWidgetPlaceholder(m,e);continue}}for(const{id:m,data:v}of p){const y=this.placeholderWidgets.get(m);if(!y)continue;const w=fo.widget(y.from,y.spec.element,{...y.spec,data:v});this.placeholders=this.placeholders.remove([y]).add(e.doc,[w]),this.placeholderWidgets.set(m,w)}for(const m of f){const v=this.placeholders.find(void 0,void 0,w=>w.id===m&&w.__type===hp),y=this.placeholderWidgets.get(m);y&&((a=(i=y.spec).onDestroy)==null||a.call(i,this.store.view,y.spec.element)),this.placeholders=this.placeholders.remove(v),this.placeholderWidgets.delete(m)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(e).find();t=t.add(e.doc,r)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(w7,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(w7,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t?.(e),!0)}addPlaceholder(e,t,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(e,t,o,!r)?(r?.(n?o.deleteSelection():o),!0):!1}updatePlaceholder(e,t){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:e,data:t,tr:r,checkOnly:!n})?(n?.(r),!0):!1}removePlaceholder(e){return({dispatch:t,tr:n})=>this.removePlaceholderTransaction({id:e,tr:n,checkOnly:!t})?(t?.(n),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t?.(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){const e=new Map,t=this.placeholders.find(void 0,void 0,n=>n.__type===hp);for(const n of t)e.set(n.spec.id,{from:n.from,to:n.to});return e}createDecorations(e){var t,n,r;const{persistentSelectionClass:o}=this.options;return!o||(t=this.store.view)!=null&&t.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?wr.empty:$Ne(e,wr.empty,{class:Bn(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:a,nodeName:s,id:c,type:f}=e,p=r?.(this.store.view,n)??document.createElement(s);p.classList.add(a);const m=fo.widget(n,p,{id:c,__type:hp,type:f,element:p,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(c,m),this.placeholders=this.placeholders.add(t.doc,[m])}addInlinePlaceholder(e,t){const{from:n=t.selection.from,to:r=t.selection.to,className:o,nodeName:i,id:a,type:s}=e;let c;if(n===r){const f=document.createElement(i);f.classList.add(o),c=fo.widget(n,f,{id:a,type:s,__type:hp,widget:f})}else c=fo.inline(n,r,{nodeName:i,class:o},{id:a,__type:hp});this.placeholders=this.placeholders.add(t.doc,[c])}addNodePlaceholder(e,t){const{pos:n,className:r,nodeName:o,id:i}=e,a=wi(n)?t.doc.resolve(n):t.selection.$from,s=wi(n)?a.nodeAfter?{pos:n,end:a.nodeAfter.nodeSize}:void 0:GMe(a);if(!s)return;const c=fo.node(s.pos,s.end,{nodeName:o,class:r},{id:i,__type:hp});this.placeholders=this.placeholders.add(t.doc,[c])}withRequiredBase(e,t){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...a}=t,s=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:s,...a,id:e}}getMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...LNe,...t}}setMeta(e,t){const n=this.getMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addPlaceholderTransaction(e,t,n,r=!1){if(this.findPlaceholder(e))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){const{id:t,tr:n,checkOnly:r=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;const{updated:a}=this.getMeta(n);return this.setMeta(n,{updated:ov([...a,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){const{id:t,tr:n,checkOnly:r=!1}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:ov([...i,t])}),!0}clearPlaceholdersTransaction(e){const{tr:t,checkOnly:n=!1}=e;return this.getPluginState()===wr.empty?!1:(n||this.setMeta(t,{clearTrackers:!0}),!0)}};On([Cn()],Ds.prototype,"updateDecorations",1),On([Cn()],Ds.prototype,"addPlaceholder",1),On([Cn()],Ds.prototype,"updatePlaceholder",1),On([Cn()],Ds.prototype,"removePlaceholder",1),On([Cn()],Ds.prototype,"clearPlaceholders",1),On([Mo()],Ds.prototype,"findPlaceholder",1),On([Mo()],Ds.prototype,"findAllPlaceholders",1),Ds=On([dr({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,n)=>e.add(n.doc,t.find()),getDefault:()=>wr.empty}}},defaultPriority:Fr.Low})],Ds);var LNe={added:[],updated:[],clearTrackers:!1,removed:[]},hp="placeholderDecoration",w7="persistentSelectionFocus";function $Ne(e,t,n){const{selection:r,doc:o}=e;if(r.empty)return t;const{from:i,to:a}=r,s=Sv(r)?fo.node(i,a,n):fo.inline(i,a,n);return t.add(o,[s])}var Z1=class extends Xr{get name(){return"docChanged"}onStateUpdate(e){const{firstUpdate:t,transactions:n,tr:r}=e;t||(n??[r]).some(o=>o?.docChanged)&&this.options.docChanged(e)}};Z1=On([dr({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:Fr.Lowest})],Z1);var ns=class extends Xr{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",W1);const t=In(),n=In(),r=In(),o=new Set;for(const i of this.store.extensions){Ev(i)&&(n[i.name]=s=>z9({state:this.store.getState(),type:i.type,attrs:s}),r[i.name]=s=>{var c;return(c=wv({state:this.store.getState(),type:i.type,attrs:s}))==null?void 0:c.node.attrs}),X1(i)&&(n[i.name]=s=>z1({trState:this.store.getState(),type:i.type,attrs:s}),r[i.name]=s=>{const c=lc(this.store.getState().selection.$from,i.type);if(!c||!s)return c?.mark.attrs;if(eA(c.mark,s))return c.mark.attrs});const a=((e=i.createHelpers)==null?void 0:e.call(i))??{};for(const s of Object.keys(i.decoratedHelpers??{}))a[s]=i[s].bind(i);if(!p1(a))for(const[s,c]of Qo(a))v7({name:s,set:o,code:tn.DUPLICATE_HELPER_NAMES}),t[s]=c}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return QD(e)}isViewEditable(e=this.store.getState()){var t,n;return((n=(t=this.store.view.props).editable)==null?void 0:n.call(t,e))??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return n=>{const{state:r}=n,o=W1({content:e,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(n)}}getText({lineBreakDivider:e=`
|
|
1318
|
+
If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function G9(e){var t;return e?.defaultView??(typeof window<"u"?window:void 0)??((t=Jz())==null?void 0:t.defaultView)}function X9(e){return G9(e?.ownerDocument)}function Z9(e){const t=G9(e)??j1().defaultView;if(t)return t;throw new Error("Unable to retrieve the window from the global scope")}function xPe(e){return Z9(e?.ownerDocument)}function wPe(e,t=j1()){const n=vPe(e,e.type.schema)?e.content:Ht.from(e);return $s.fromSchema(e.type.schema).serializeFragment(n,{document:t})}function CPe(e,t){return new(Z9(t)).DOMParser().parseFromString(`<body>${e}</body>`,"text/html").body}function SPe(e,t=j1()){const n=t.createElement("div");return n.append(wPe(e,t)),n.innerHTML}function W1(e){const{content:t,schema:n,document:r,fragment:o=!1,...i}=e,a=CPe(t,r),s=lD.fromSchema(n);return o?s.parseSlice(a,{...J9,...i}).content:s.parse(a,{...J9,...i})}var J9={preserveWhitespace:!1};function rA(e,t){const n=Uh(t.defaults());return ZT({...e},n)}function Q9(e,t){let n="";t&&(n=`${t.trim()}`);const r=HDe(e);if(!r)return n;const o=(n.endsWith(";")," ");return`${n}${o}${r}`}var kPe={remove(e,t){let n=e;for(const r of t)r.invalidParentNode||(n=ITe(r.path,n));return n}};function EPe({json:e,schema:t,...n}){const r=new Set(Uh(t.marks)),o=new Set(Uh(t.nodes)),i=e7({json:e,path:[],validNodes:o,validMarks:r});return{json:e,invalidContent:i,transformers:kPe,...n}}function e7(e){const{json:t,validMarks:n,validNodes:r,path:o=[]}=e,i={validMarks:n,validNodes:r},a=[],{type:s,marks:c,content:f}=t;let{invalidParentMark:p=!1,invalidParentNode:m=!1}=e;if(c){const v=[];for(const[y,w]of c.entries()){const C=Bn(w)?w:w.type;n.has(C)||(v.unshift({name:C,path:[...o,"marks",`${y}`],type:"mark",invalidParentMark:p,invalidParentNode:m}),p=!0)}a.push(...v)}if(r.has(s)||(a.push({name:s,type:"node",path:o,invalidParentMark:p,invalidParentNode:m}),m=!0),f){const v=[];for(const[y,w]of f.entries())v.unshift(...e7({...i,json:w,path:[...o,"content",`${y}`],invalidParentMark:p,invalidParentNode:m}));a.unshift(...v)}return a}function TPe(e){return!!(fu(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function oA(e){return!!(fu(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function t7(e){const t=ur.atStart(e.$anchor.doc);return!!(oA(e)&&t.anchor===e.anchor)}function DPe(e){return({dispatch:t,tr:n})=>{const{type:r,attrs:o=In(),appendText:i,range:a}=e,s=a?Vn.between(n.doc.resolve(a.from),n.doc.resolve(a.to)):n.selection,{$from:c,from:f,to:p}=s;let m=c.depth===0?n.doc.type.allowsMarkType(r):!1;return n.doc.nodesBetween(f,p,v=>{if(m)return!1;if(v.inlineContent&&v.type.allowsMarkType(r)){m=!0;return}}),m?(t?.(n.addMark(f,p,r.create(o))&&i?n.insertText(i):n),!0):!1}}function APe({tr:e,dispatch:t}){const{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&qh(o);return!wi(i)||!o?!1:(t?.(e.lift(o,i).scrollIntoView()),!0)}function n7(e,t={},n){return function(r){const{tr:o,dispatch:i,state:a}=r,s=Bn(e)?mo(a.schema.nodes,e):e,{from:c,to:f}=Sa(n??o.selection,o.doc),p=o.doc.resolve(c),m=o.doc.resolve(f),v=p.blockRange(m),y=v&&pD(v,s,t);return!y||!v?!1:(i?.(o.wrap(v,y).scrollIntoView()),!0)}}function r7(e,t={},n){return r=>{const{tr:o,state:i}=r,a=Bn(e)?mo(i.schema.nodes,e):e;return wv({state:o,type:a,attrs:t})?APe(r):n7(e,t,n)(r)}}function kv(e,t,n,r=!0){return function(o){const{tr:i,dispatch:a,state:s}=o,c=Bn(e)?mo(s.schema.nodes,e):e,{from:f,to:p}=Sa(n??i.selection,i.doc);let m=!1,v;return i.doc.nodesBetween(f,p,(y,w)=>{if(m)return!1;if(!y.isTextblock||y.hasMarkup(c,t))return;if(y.type===c){m=!0,v=y.attrs;return}const C=i.doc.resolve(w),k=C.index();m=C.parent.canReplaceWith(k,k+1,c),m&&(v=C.parent.attrs)}),m?(a?.(i.setBlockType(f,p,c,{...r?v:{},...t}).scrollIntoView()),!0):!1}}function iA(e){return t=>{const{tr:n,state:r}=t,{type:o,attrs:i,preserveAttrs:a=!0}=e,s=wv({state:n,type:o,attrs:i}),c=e.toggleType??V1(r.schema);if(s)return kv(c,{...a?s.node.attrs:{},...i})(t);const f=wv({state:n,type:c,attrs:i});return kv(o,{...a?f?.node.attrs:{},...i})(t)}}function OPe(e=0){const t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(mo(t,2),10)>=e:!1}function MPe(e,t){let{head:n,empty:r,anchor:o}=e;for(const i of t.steps)n=i.getMap().map(n);r?t.setSelection(Vn.near(t.doc.resolve(n))):t.setSelection(Vn.between(t.doc.resolve(o),t.doc.resolve(n)))}function PPe(e){const{attrs:t={},appendText:n="",content:r="",keepSelection:o=!1,range:i}=e;return({state:a,tr:s,dispatch:c})=>{var f;const p=a.schema,m=Sa(e.selection??i??s.selection,s.doc),v=m.$from.index(),{from:y,to:w,$from:C}=m,k=Bn(e.type)?p.nodes[e.type]??p.marks[e.type]:e.type;if(_n(Bn(e.type)?k:!0,{code:tn.SCHEMA,message:`Schema contains no marks or nodes with name ${k}`}),rPe(k)){if(!C.parent.canReplaceWith(v,v,k))return!1;s.replaceWith(y,w,k.create(t,r?p.text(r):void 0))}else _n(r,{message:"`replaceText` cannot be called without content when using a mark type"}),s.replaceWith(y,w,p.text(r,V9(k)?[k.create(t)]:void 0));return n&&s.insertText(n),o&&MPe(a.selection,s),c&&(OPe(60)&&((f=document.getSelection())==null||f.empty()),c(s)),!0}}function o7(e,t){const n=e.parent.childAfter(e.parentOffset);if(!n.node)return;const{marks:r,nodeSize:o}=n.node;if(r[0])return r[0].type;const a=e.start()+n.offset+o;return o7(e.doc.resolve(a+1))}function i7(e){return({dispatch:t,tr:n,state:r})=>{const{type:o,expand:i=!0,range:a}=e,s=Sa(e.selection??a??n.selection,n.doc);let{from:c,to:f,$from:p,$to:m}=s;const v=Bn(o)?r.schema.marks[o]:o;v!==null&&_n(v,{code:tn.SCHEMA,message:`Mark type: ${o} does not exist on the current schema.`});const y=v??o7(p);if(!y)return!1;const w=lc(p,y,m);return i&&w&&(c=Math.max(0,Math.min(c,w.from)),f=Math.min(Math.max(f,w.to),n.doc.nodeSize-2)),t?.(n.removeMark(c,wi(f)?f:c,V9(v)?v:void 0)),!0}}function NPe(e){const{node:t,predicate:n,descend:r=!0,action:o}=e;_n(Cv(t),{code:tn.INTERNAL,message:'Invalid "node" parameter passed to "findChildren".'}),_n(Br(n),{code:tn.INTERNAL,message:'Invalid "predicate" parameter passed to "findChildren".'});const i=[];return t.descendants((a,s)=>{const c={node:a,pos:s};return n(c)&&(i.push(c),o?.(c)),r}),i}function _Pe(e){const{type:t,...n}=e;return NPe({...n,predicate:r=>r.node.type===t})}function RPe(e,t={}){const{descend:n=!1,predicate:r,StepTypes:o}=t,i=hPe(e,o),a=[];for(const s of i){const{start:c,end:f}=s;e.doc.nodesBetween(c,f,(p,m)=>((r?.(p,m,s)??!0)&&a.push({node:p,pos:m}),n))}return a}function Y1(e){const{regexp:t,type:n,getAttributes:r,ignoreWhitespace:o=!1,beforeDispatch:i,updateCaptured:a,shouldSkip:s,invalidMarks:c}=e;let f;const p=new ra(t,(m,v,y,w)=>{const{tr:C,schema:k}=m;f||(f=Bn(n)?k.marks[n]:n,_n(f,{code:tn.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let T=v[1],E=v[0];const _=aA({captureGroup:T,fullMatch:E,end:w,start:y,rule:p,state:m,ignoreWhitespace:o,invalidMarks:c,shouldSkip:s,updateCaptured:a});if(!_)return null;({start:y,end:w,captureGroup:T,fullMatch:E}=_);const R=Br(r)?r(v):r;let P=w,$=[];if(T){const z=E.search(/\S/),q=y+E.indexOf(T),Y=q+T.length;$=C.storedMarks??[],Y<w&&C.delete(Y,w),q>y&&C.delete(y+z,q),P=y+z+T.length}return C.addMark(y,P,f.create(R)),C.setStoredMarks($),i?.({tr:C,match:v,start:y,end:w}),C});return p}function a7(e){const{regexp:t,type:n,getAttributes:r,beforeDispatch:o,shouldSkip:i,ignoreWhitespace:a=!1,updateCaptured:s,invalidMarks:c}=e,f=new ra(t,(p,m,v,y)=>{const w=Br(r)?r(m):r,{tr:C,schema:k}=p,T=Bn(n)?k.nodes[n]:n;let E=m[1],_=m[0];const R=aA({captureGroup:E,fullMatch:_,end:y,start:v,rule:f,state:p,ignoreWhitespace:a,invalidMarks:c,shouldSkip:i,updateCaptured:s});if(!R)return null;({start:v,end:y,captureGroup:E,fullMatch:_}=R),_n(T,{code:tn.SCHEMA,message:`No node exists for ${n} in the schema.`});const P=T.createAndFill(w);return P&&(C.replaceRangeWith(T.isBlock?C.doc.resolve(v).before():v,y,P),o?.({tr:C,match:[_,E??""],start:v,end:y})),C});return f}function IPe(e){const{regexp:t,transformMatch:n,beforeDispatch:r,shouldSkip:o,ignoreWhitespace:i=!1,updateCaptured:a,invalidMarks:s}=e,c=new ra(t,(f,p,m,v)=>{const y=n(p);if(nc(y))return null;const{tr:w,schema:C}=f;let k=p[1],T=p[0];const E=aA({captureGroup:k,fullMatch:T,end:v,start:m,rule:c,state:f,ignoreWhitespace:i,invalidMarks:s,shouldSkip:o,updateCaptured:a});return E?({start:m,end:v,captureGroup:k,fullMatch:T}=E,y===""?w.delete(m,v):w.replaceWith(m,v,C.text(y)),r?.({tr:w,match:p,start:m,end:v}),w):null});return c}function aA({captureGroup:e,fullMatch:t,end:n,start:r,rule:o,ignoreWhitespace:i,shouldSkip:a,updateCaptured:s,state:c,invalidMarks:f}){var p;if(t==null)return null;const m=s?.({captureGroup:e,fullMatch:t,start:r,end:n})??{};e=m.captureGroup??e,t=m.fullMatch??t,r=m.start??r,n=m.end??n;const v=c.doc.resolve(r),y=c.doc.resolve(n);return f&&UD({$from:v,$to:y},f)||o.invalidMarks&&UD({$from:v,$to:y},o.invalidMarks)||i&&e?.trim()===""||a?.({state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"})||(p=o.shouldSkip)!=null&&p.call(o,{state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:"mark"})?null:{captureGroup:e,end:n,fullMatch:t,start:r}}var LPe=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(i=>{(i?i.split(" "):[]).forEach(s=>{if(s.startsWith("atm_")){const[,c]=s.split("_");n[c]=s}else r.push(s)})});const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(n[i]);return o.push(...r),o.join(" ")},$Pe=LPe;const s7=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function FPe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const l7=(e,t,n)=>{let r=FPe(e,n);if(!r)return!1;let o=c7(r);if(!o){let a=r.blockRange(),s=a&&qh(a);return s==null?!1:(t&&t(e.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&d7(e,o,t))return!0;if(r.parent.content.size==0&&(cp(i,"end")||zn.isSelectable(i))){let a=mD(e.doc,r.before(),r.after(),gn.empty);if(a&&a.slice.size<a.to-a.from){if(t){let s=e.tr.step(a);s.setSelection(cp(i,"end")?ur.findFrom(s.doc.resolve(s.mapping.map(o.pos,-1)),-1):zn.create(s.doc,o.pos-i.nodeSize)),t(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1};function cp(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const BPe=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=c7(r)}let a=i&&i.nodeBefore;return!a||!zn.isSelectable(a)?!1:(t&&t(e.tr.setSelection(zn.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function c7(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function zPe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const VPe=(e,t,n)=>{let r=zPe(e,n);if(!r)return!1;let o=u7(r);if(!o)return!1;let i=o.nodeAfter;if(d7(e,o,t))return!0;if(r.parent.content.size==0&&(cp(i,"start")||zn.isSelectable(i))){let a=mD(e.doc,r.before(),r.after(),gn.empty);if(a&&a.slice.size<a.to-a.from){if(t){let s=e.tr.step(a);s.setSelection(cp(i,"start")?ur.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):zn.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},HPe=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=u7(r)}let a=i&&i.nodeAfter;return!a||!zn.isSelectable(a)?!1:(t&&t(e.tr.setSelection(zn.create(e.doc,i.pos)).scrollIntoView()),!0)};function u7(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const jPe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
1319
|
+
`).scrollIntoView()),!0)};function sA(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const WPe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=sA(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(t){let s=n.after(),c=e.tr.replaceWith(s,s,a.createAndFill());c.setSelection(ur.near(c.doc.resolve(s),1)),t(c.scrollIntoView())}return!0},YPe=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof qi||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=sA(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(Vn.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},UPe=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Kh(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&qh(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function qPe(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof zn&&t.selection.node.isBlock)return!r.parentOffset||!Kh(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let i=o.parentOffset==o.parent.content.size,a=t.tr;(t.selection instanceof Vn||t.selection instanceof qi)&&a.deleteSelection();let s=r.depth==0?null:sA(r.node(-1).contentMatchAt(r.indexAfter(-1))),c=e&&e(o.parent,i),f=c?[c]:i&&s?[{type:s}]:void 0,p=Kh(a.doc,a.mapping.map(r.pos),1,f);if(!f&&!p&&Kh(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)&&(s&&(f=[{type:s}]),p=!0),p&&(a.split(a.mapping.map(r.pos),1,f),!i&&!r.parentOffset&&r.parent.type!=s)){let m=a.mapping.map(r.before()),v=a.doc.resolve(m);s&&r.node(-1).canReplaceWith(v.index(),v.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}n(a.scrollIntoView())}return!0}}const KPe=qPe(),GPe=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(zn.create(e.doc,o))),!0)},XPe=(e,t)=>(t&&t(e.tr.setSelection(new qi(e.doc))),!0);function ZPe(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||sv(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function d7(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,a;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(ZPe(e,t,n))return!0;let s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(i=(a=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&a.matchType(i[0]||o.type).validEnd){if(n){let m=t.pos+o.nodeSize,v=Ht.empty;for(let C=i.length-1;C>=0;C--)v=Ht.from(i[C].create(null,v));v=Ht.from(r.copy(v));let y=e.tr.step(new Bo(t.pos-1,m,t.pos,m,new gn(v,1,0),i.length,!0)),w=m+2*i.length;sv(y.doc,w)&&y.join(w),n(y.scrollIntoView())}return!0}let c=ur.findFrom(t,1),f=c&&c.$from.blockRange(c.$to),p=f&&qh(f);if(p!=null&&p>=t.depth)return n&&n(e.tr.lift(f,p).scrollIntoView()),!0;if(s&&cp(o,"start",!0)&&cp(r,"end")){let m=r,v=[];for(;v.push(m),!m.isTextblock;)m=m.lastChild;let y=o,w=1;for(;!y.isTextblock;y=y.firstChild)w++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){let C=Ht.empty;for(let T=v.length-1;T>=0;T--)C=Ht.from(v[T].copy(C));let k=e.tr.step(new Bo(t.pos-v.length,t.pos+o.nodeSize,t.pos+w,t.pos+o.nodeSize-w,new gn(C,v.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function f7(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Vn.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const JPe=f7(-1),QPe=f7(1);function eNe(e,t,n){for(let r=0;r<t.length;r++){let{$from:o,$to:i}=t[r],a=o.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(o.pos,i.pos,s=>{if(a)return!1;a=s.inlineContent&&s.type.allowsMarkType(n)}),a)return!0}return!1}function tNe(e,t=null){return function(n,r){let{empty:o,$cursor:i,ranges:a}=n.selection;if(o&&!i||!eNe(n.doc,a,e))return!1;if(r)if(i)e.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{let s=!1,c=n.tr;for(let f=0;!s&&f<a.length;f++){let{$from:p,$to:m}=a[f];s=n.doc.rangeHasMark(p.pos,m.pos,e)}for(let f=0;f<a.length;f++){let{$from:p,$to:m}=a[f];if(s)c.removeMark(p.pos,m.pos,e);else{let v=p.pos,y=m.pos,w=p.nodeAfter,C=m.nodeBefore,k=w&&w.isText?/^\s*/.exec(w.text)[0].length:0,T=C&&C.isText?/\s*$/.exec(C.text)[0].length:0;v+k<y&&(v+=k,y-=T),c.addMark(v,y,e.create(t))}}r(c.scrollIntoView())}return!0}}function U1(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let lA=U1(s7,l7,BPe),h7=U1(s7,VPe,HPe);const uc={Enter:U1(jPe,YPe,UPe,KPe),"Mod-Enter":WPe,Backspace:lA,"Mod-Backspace":lA,"Shift-Backspace":lA,Delete:h7,"Mod-Delete":h7,"Mod-a":XPe},p7={"Ctrl-h":uc.Backspace,"Alt-Backspace":uc["Mod-Backspace"],"Ctrl-d":uc.Delete,"Ctrl-Alt-Backspace":uc["Mod-Delete"],"Alt-Delete":uc["Mod-Delete"],"Alt-d":uc["Mod-Delete"],"Ctrl-a":JPe,"Ctrl-e":QPe};for(let e in uc)p7[e]=uc[e];const nNe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,cA=nNe?p7:uc;for(var hu={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},q1={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rNe=typeof navigator<"u"&&/Mac/.test(navigator.platform),oNe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Si=0;Si<10;Si++)hu[48+Si]=hu[96+Si]=String(Si);for(var Si=1;Si<=24;Si++)hu[Si+111]="F"+Si;for(var Si=65;Si<=90;Si++)hu[Si]=String.fromCharCode(Si+32),q1[Si]=String.fromCharCode(Si);for(var uA in hu)q1.hasOwnProperty(uA)||(q1[uA]=hu[uA]);function iNe(e){var t=rNe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||oNe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?q1:hu)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const aNe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function sNe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<t.length-1;s++){let c=t[s];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))aNe?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function lNe(e){let t=Object.create(null);for(let n in e)t[sNe(n)]=e[n];return t}function dA(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function fA(e){let t=lNe(e);return function(n,r){let o=iNe(r),i,a=t[dA(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=t[dA(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=hu[r.keyCode])&&i!=o){let s=t[dA(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}function cNe(e){const t=Ad(e,(i,a)=>(a.priority??Fr.Low)-(i.priority??Fr.Low)),n=[],r=[];for(const i of t)gNe(i)?n.push(i):r.push(i);let o;return new rc({key:uNe,view:i=>(o=i,{}),props:{transformPasted:i=>{var a,s,c;const f=o.state.selection.$from,p=f.node().type.name,m=new Set(f.marks().map(v=>v.type.name));for(const v of n){if((a=v.ignoredNodes)!=null&&a.includes(p)||(s=v.ignoredMarks)!=null&&s.some(E=>m.has(E)))continue;const y=((c=i.content.firstChild)==null?void 0:c.textContent)??"",w=!o.state.selection.empty&&i.content.childCount===1&&y,C=nv(y,v.regexp)[0];if(w&&C&&v.type==="mark"&&v.replaceSelection){const{from:E,to:_}=o.state.selection,R=o.state.doc.slice(E,_),P=R.content.textBetween(0,R.content.size);if(typeof v.replaceSelection!="boolean"?v.replaceSelection(P):v.replaceSelection){const $=[],{getAttributes:z,markType:q}=v,Y=Br(z)?z(C,!0):z,J=q.create(Y);return R.content.forEach(K=>{if(K.isText){const ee=J.addToSet(K.marks);$.push(K.mark(ee))}}),gn.maxOpen(Ht.fromArray($))}}const{nodes:k,transformed:T}=pNe(i.content,v,o.state.schema);T&&(i=v.type==="node"&&v.nodeType.isBlock?new gn(Ht.fromArray(k),0,0):new gn(Ht.fromArray(k),i.openStart,i.openEnd))}return xNe(i)},handleDOMEvents:{paste:(i,a)=>{var s,c;const f=a;if(!((c=(s=i.props).editable)!=null&&c.call(s,i.state)))return!1;const{clipboardData:p}=f;if(!p)return!1;const m=[...p.items].map(y=>y.getAsFile()).filter(y=>!!y);if(m.length===0)return!1;const{selection:v}=i.state;for(const{fileHandler:y,regexp:w}of r){const C=w?m.filter(k=>w.test(k.type)):m;if(C.length!==0&&y({event:f,files:C,selection:v,view:i,type:"paste"}))return f.preventDefault(),!0}return!1},drop:(i,a)=>{var s,c,f;const p=a;if(!((c=(s=i.props).editable)!=null&&c.call(s,i.state)))return!1;const{dataTransfer:m,clientX:v,clientY:y}=p;if(!m)return!1;const w=yNe(p);if(w.length===0)return!1;const C=((f=i.posAtCoords({left:v,top:y}))==null?void 0:f.pos)??i.state.selection.anchor;for(const{fileHandler:k,regexp:T}of r){const E=T?w.filter(_=>T.test(_.type)):w;if(E.length!==0&&k({event:p,files:E,pos:C,view:i,type:"drop"}))return p.preventDefault(),!0}return!1}}}})}var uNe=new _d("pasteRule");function hA(e,t){return function n(r){const{fragment:o,rule:i,nodes:a}=r,{regexp:s,ignoreWhitespace:c,ignoredMarks:f,ignoredNodes:p}=i;let m=!1;return o.forEach(v=>{if(p?.includes(v.type.name)||vNe(v)){a.push(v);return}if(!v.isText){const C=n({fragment:v.content,rule:i,nodes:[]});m||(m=C.transformed);const k=Ht.fromArray(C.nodes);v.type.validContent(k)?a.push(v.copy(k)):a.push(...C.nodes);return}if(v.marks.some(C=>bNe(C)||f?.includes(C.type.name))){a.push(v);return}const y=v.text??"";let w=0;for(const C of nv(y,s)){const k=C[1],T=C[0];if(c&&k?.trim()===""||!T)return;const E=C.index,_=E+T.length;E>w&&a.push(v.cut(w,E));let R=v.cut(E,_);if(T&&k){const P=T.search(/\S/),$=E+T.indexOf(k),z=$+k.length;P&&a.push(v.cut(E,E+P)),R=v.cut($,z)}e({nodes:a,rule:i,textNode:R,match:C,schema:t}),m=!0,w=_}y&&w<y.length&&a.push(v.cut(w))}),{nodes:a,transformed:m}}}function dNe(e){const{nodes:t,rule:n,textNode:r,match:o,schema:i}=e,{transformMatch:a,getAttributes:s,markType:c}=n,f=Br(s)?s(o,!1):s,p=r.text??"",m=c.create(f),v=a?.(o);if(v==="")return;if(v===!1){t.push(i.text(p,r.marks));return}const y=m.addToSet(r.marks);t.push(i.text(v??p,y))}function fNe(e){const{nodes:t,rule:n,textNode:r,match:o,schema:i}=e,{transformMatch:a}=n,s=a?.(o);if(s===""||s===!1)return;const c=s??r.text??"";t.push(i.text(c,r.marks))}function hNe(e){const{nodes:t,rule:n,textNode:r,match:o}=e,{getAttributes:i,nodeType:a,getContent:s}=n,c=Br(i)?i(o,!1):i,f=(s?s(o):r)||void 0;t.push(a.createChecked(c,f))}function pNe(e,t,n){const r=[];switch(t.type){case"mark":return hA(dNe,n)({fragment:e,nodes:r,rule:t});case"node":return hA(hNe,n)({fragment:e,nodes:r,rule:t});default:return hA(fNe,n)({fragment:e,nodes:r,rule:t})}}var mNe=["mark","node","text"];function gNe(e){return Za(mNe,e.type)}function vNe(e){var t;return e.type.spec.code||((t=e.type.spec.group)==null?void 0:t.split(" ").includes("code"))}function bNe(e){var t;return e.type.name==="code"||((t=e.type.spec.group)==null?void 0:t.split(" ").includes("code"))}function yNe(e){var t,n;const{dataTransfer:r}=e;return r?((t=r.files)==null?void 0:t.length)>0?[...r.files]:(n=r.items)!=null&&n.length?[...r.items].map(o=>o.getAsFile()).filter(o=>!!o):[]:[]}function xNe(e){const t=gn.maxOpen(e.content);return t.openStart<e.openStart||t.openEnd<e.openEnd?t:e}var wNe=process.env.NODE_ENV==="production";function CNe(e,t){if(!wNe){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var SNe=Object.defineProperty,kNe=Object.getOwnPropertyDescriptor,On=(e,t,n,r)=>{for(var o=r>1?void 0:r?kNe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&SNe(t,n,o),o},m7=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},wn=(e,t,n)=>(m7(e,t,"read from private field"),n?n.call(e):t.get(e)),qo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},si=(e,t,n,r)=>(m7(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function ENe(e,t){return e===t}function g7(e){const{previousOptions:t,update:n,equals:r=ENe}=e,o=Od({...t,...n}),i=In(),a=Uh(t);for(const c of a){const f=t[c],p=o[c];if(r(f,p)){i[c]={changed:!1};continue}i[c]={changed:!0,previousValue:f,value:p}}const s=c=>{const f=In();for(const p of c){const m=i[p];m?.changed&&(f[p]=m.value)}return f};return{changes:Od(i),options:o,pickChanged:s}}var TNe={[tn.DUPLICATE_HELPER_NAMES]:"helper method",[tn.DUPLICATE_COMMAND_NAMES]:"command method"};function v7(e){const{name:t,set:n,code:r}=e,o=TNe[r];_n(!n.has(t),{code:r,message:`There is a naming conflict for the name: ${t} used in this '${o}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(t)}function K1(...e){return ov($Pe(...e).split(" ")).join(" ")}var b7="__IGNORE__",DNe="__ALL__",up=class{constructor(e,...[t]){this["~O"]={},this._mappedHandlers=In(),this.populateMappedHandlers(),this._options=this._initialOptions=_Te(e,this.constructor.defaultOptions,t??In(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){const e=[],{customHandlerKeys:t,handlerKeys:n,staticKeys:r}=this.constructor;for(const o of Uh(this._options))r.includes(o)||n.includes(o)||t.includes(o)||e.push(o);return e}ensureAllKeysAreDynamic(e){if(es.isProduction)return;const t=[];for(const n of Uh(e))this._dynamicKeys.includes(n)||t.push(n);_n(ks(t),{code:tn.INVALID_SET_EXTENSION_OPTIONS,message:`Invalid properties passed into the 'setOptions()' method: ${JSON.stringify(t)}.`})}setOptions(e){var t;const n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);const{changes:r,options:o,pickChanged:i}=g7({previousOptions:n,update:e});this.updateDynamicOptions(o),(t=this.onSetOptions)==null||t.call(this,{reason:"set",changes:r,options:o,pickChanged:i,initialOptions:this._initialOptions})}resetOptions(){var e;const t=this.getDynamicOptions(),{changes:n,options:r,pickChanged:o}=g7({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(r),(e=this.onSetOptions)==null||e.call(this,{reason:"reset",options:r,changes:n,pickChanged:o,initialOptions:this._initialOptions})}getDynamicOptions(){return ZT(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(const e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){const e=In();for(const t of this.constructor.handlerKeys)e[t]=(...n)=>{var r;const{handlerKeyOptions:o}=this.constructor,i=(r=o[t])==null?void 0:r.reducer;let a=i?.getDefault(...n);for(const[,s]of this._mappedHandlers[t]){const c=s(...n);if(a=i?i.accumulator(a,c,...n):c,ANe(o,a,t))return a}return a};return e}addHandler(e,t,n=Fr.Default){return this._mappedHandlers[e].push([n,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,r])=>r!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=Ad(this._mappedHandlers[e],([t],[n])=>n-t)}addCustomHandler(e,t){var n;return((n=this.onAddCustomHandler)==null?void 0:n.call(this,{[e]:t}))??rz}};up.defaultOptions={},up.staticKeys=[],up.handlerKeys=[],up.handlerKeyOptions={},up.customHandlerKeys=[];function ANe(e,t,n){const{[DNe]:r}=e,o=e[n];return!r&&!o?!1:!!(o&&o.earlyReturnValue!==b7&&(Br(o.earlyReturnValue)?o.earlyReturnValue(t)===!0:t===o.earlyReturnValue)||r&&r.earlyReturnValue!==b7&&(Br(r.earlyReturnValue)?r.earlyReturnValue(t)===!0:t===r.earlyReturnValue))}var G1=class extends up{constructor(...e){super(ONe,...e),this["~E"]={},this._extensions=iz(this.createExtensions(),t=>t.constructor),this.extensionMap=new Map;for(const t of this._extensions)this.extensionMap.set(t.constructor,t)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${KB(this.name)}Extension`}get store(){return _n(this._store,{code:tn.MANAGER_PHASE_ERROR,message:"An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods."}),Od(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(n=>t.constructor===e?t:n))}createExtensions(){return[]}getExtension(e){const t=this.extensionMap.get(e);return _n(t,{code:tn.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||(this._store=e)}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};G1.defaultPriority=Fr.Default;var Xr=class extends G1{static get[tc](){return oi.PlainExtensionConstructor}get[tc](){return oi.PlainExtension}},dp=class extends G1{static get[tc](){return oi.MarkExtensionConstructor}get[tc](){return oi.MarkExtension}get type(){return mo(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};dp.disableExtraAttributes=!1;var aa=class extends G1{static get[tc](){return oi.NodeExtensionConstructor}get[tc](){return oi.NodeExtension}get type(){return mo(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};aa.disableExtraAttributes=!1;var ONe={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function y7(e){return sp(e)&&lp(e,[oi.PlainExtension,oi.MarkExtension,oi.NodeExtension])}function MNe(e){return sp(e)&&lp(e,[oi.PlainExtensionConstructor,oi.MarkExtensionConstructor,oi.NodeExtensionConstructor])}function x7(e){return sp(e)&&lp(e,oi.PlainExtension)}function Ev(e){return sp(e)&&lp(e,oi.NodeExtension)}function X1(e){return sp(e)&&lp(e,oi.MarkExtension)}function dr(e){return t=>{const{defaultOptions:n,customHandlerKeys:r,handlerKeys:o,staticKeys:i,defaultPriority:a,handlerKeyOptions:s,...c}=e,f=t;n&&(f.defaultOptions=n),a&&(f.defaultPriority=a),s&&(f.handlerKeyOptions=s),f.staticKeys=i??[],f.handlerKeys=o??[],f.customHandlerKeys=r??[];for(const[p,m]of Object.entries(c))f[p]||(f[p]=m);return f}}var PNe=class extends Xr{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=In(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate("attributes")}}get name(){return"attributes"}onCreate(){this.transformAttributes(),this.store.setExtensionStore("updateAttributes",this.updateAttributes)}transformAttributes(){var e,t,n;if(this.attributeObject=In(),(e=this.store.managerSettings.exclude)!=null&&e.attributes){this.store.setStoreKey("attributes",this.attributeObject);return}this.attributeList=[];for(const r of this.store.extensions){if((t=r.options.exclude)!=null&&t.attributes)continue;const o=(n=r.createAttributes)==null?void 0:n.call(r),i={...o,class:K1(...r.classNames??[],o?.class)};this.attributeList.unshift(i)}for(const r of this.attributeList)this.attributeObject={...this.attributeObject,...r,class:K1(this.attributeObject.class,r.class)};this.store.setStoreKey("attributes",this.attributeObject)}};function Mo(e={}){return(t,n,r)=>{(t.decoratedHelpers??(t.decoratedHelpers={}))[n]=e}}function Cn(e={}){return(t,n,r)=>{(t.decoratedCommands??(t.decoratedCommands={}))[n]=e}}function co(e){return(t,n,r)=>{(t.decoratedKeybindings??(t.decoratedKeybindings={}))[n]=e}}var NNe=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>t=>{let n=!0;const{view:r,tr:o,dispatch:i}=t;if(!r)return!1;for(const s of this.validateHandlers)if(!s({...t,dispatch:()=>{}})){n=!1;break}return!i||!n?n:(this.promiseCreator(t).then(s=>{this.runHandlers(this.successHandlers,{value:s,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}).catch(s=>{this.runHandlers(this.failureHandlers,{error:s,state:r.state,tr:r.state.tr,dispatch:r.dispatch,view:r})}),i(o),!0)}}validate(e,t="push"){return this.validateHandlers[t](e),this}success(e,t="push"){return this.successHandlers[t](e),this}failure(e,t="push"){return this.failureHandlers[t](e),this}runHandlers(e,t){var n;for(const r of e)if(!r({...t,dispatch:()=>{}}))break;(n=t.dispatch)==null||n.call(t,t.tr)}};function fp(e){const{type:t,attrs:n,range:r,selection:o}=e;return i=>{const{dispatch:a,tr:s,state:c}=i,f=Bn(t)?c.schema.marks[t]:t;if(_n(f,{code:tn.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),r||o){const{from:p,to:m}=Sa(o??r??s.selection,s.doc);return z1({trState:s,type:t,...r})?a?.(s.removeMark(p,m,f)):a?.(s.addMark(p,m,f.create(n))),!0}return I1(tNe(f,n))(i)}}function _Ne(e,t,n){for(const{$from:r,$to:o}of n){let i=r.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(r.pos,o.pos,a=>{if(i)return!1;i=a.inlineContent&&a.type.allowsMarkType(e)}),i)return!0}return!1}function RNe(e,t,n){return({tr:r,dispatch:o,state:i})=>{const a=Sa(n??r.selection,r.doc),s=gPe(a),c=Bn(e)?i.schema.marks[e]:e;if(_n(c,{code:tn.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),a.empty&&!s||!_Ne(c,r.doc,a.ranges))return!1;if(!o)return!0;if(s)return r.removeStoredMark(c),t&&r.addStoredMark(c.create(t)),o(r),!0;let f=!1;for(const{$from:p,$to:m}of a.ranges){if(f)break;f=r.doc.rangeHasMark(p.pos,m.pos,c)}for(const{$from:p,$to:m}of a.ranges)f&&r.removeMark(p.pos,m.pos,c),t&&r.addMark(p.pos,m.pos,c.create(t));return o(r),!0}}function INe(e,t={}){return({tr:n,dispatch:r,state:o})=>{const i=o.schema,a=n.selection,{from:s=a.from,to:c=s??a.to,marks:f={}}=t;if(!r)return!0;n.insertText(e,s,c);const p=mo(n.steps,n.steps.length-1).getMap().map(c);for(const[m,v]of Qo(f))n.addMark(s,p,mo(i.marks,m).create(v));return r(n),!0}}var fr=class extends Xr{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{const{forcedUpdates:n}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:ov([...n,...t])}),e}}get name(){return"commands"}get transaction(){const e=this.store.getState();this._transaction||(this._transaction=e.tr);const t=this._transaction.before.eq(e.doc),n=!ks(this._transaction.steps);if(!t){const r=e.tr;if(n)for(const o of this._transaction.steps)r.step(o);this._transaction=r}return this._transaction}onCreate(){this.store.setStoreKey("getForcedUpdates",this.getForcedUpdates.bind(this))}onView(e){var t;const{extensions:n,helpers:r}=this.store,o=In(),i=new Set;let a=In();const s=f=>{var p;const m=In(),v=()=>f??this.transaction;let y=[];const w=()=>y;for(const[k,T]of Object.entries(o))(p=a[k])!=null&&p.disableChaining||(m[k]=this.chainedFactory({chain:m,command:T.original,getTr:v,getChain:w}));const C=k=>{_n(k===v(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return m.run=(k={})=>{const T=y;y=[];for(const E of T)if(!E(C)&&k.exitEarly)return;e.dispatch(v())},m.tr=()=>{const k=y;y=[];for(const T of k)T(C);return v()},m.enabled=()=>{for(const k of y)if(!k())return!1;return!0},m.new=k=>s(k),m};for(const f of n){const p=((t=f.createCommands)==null?void 0:t.call(f))??{},m=f.decoratedCommands??{},v={};a={...a,decoratedCommands:m};for(const[y,w]of Object.entries(m)){const C=Bn(w.shortcut)&&w.shortcut.startsWith("_|")?{shortcut:r.getNamedShortcut(w.shortcut,f.options)}:void 0;this.updateDecorated(y,{...w,name:f.name,...C}),p[y]=f[y].bind(f),w.active&&(v[y]=()=>{var k;return((k=w.active)==null?void 0:k.call(w,f.options,this.store))??!1})}p1(p)||this.addCommands({active:v,names:i,commands:o,extensionCommands:p})}const c=s();for(const[f,p]of Object.entries(c))s[f]=p;this.store.setStoreKey("commands",o),this.store.setStoreKey("chain",s),this.store.setExtensionStore("commands",o),this.store.setExtensionStore("chain",s)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return Bn(e)?INe(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:"inline"},onSuccess:(n,r,o)=>this.insertText(n,{...t,...r})(o)}).generateCommand()}selectText(e,t={}){return({tr:n,dispatch:r})=>{const o=Sa(e,n.doc);return n.selection.anchor===o.anchor&&n.selection.head===o.head&&!t.forceUpdate?!1:(r?.(n.setSelection(o)),!0)}}selectMark(e){return t=>{const{tr:n}=t,r=lc(n.selection.$from,e);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(t):!1}}delete(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=e??t.selection;return n?.(t.delete(r,o)),!0}}emptyUpdate(e){return({tr:t,dispatch:n})=>(n&&(e?.(),n(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:n})=>(n?.(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:n,dispatch:r})=>(r?.(n.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return n=>{const{tr:r,dispatch:o}=n,i=this.store.manager.createState({content:e,selection:t});return i?(o?.(r.replaceRangeWith(0,r.doc.nodeSize-2,i.doc)),!0):!1}}resetContent(){return e=>{const{tr:t,dispatch:n}=e,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(e):(n?.(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t?.(e.setSelection(Vn.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>fu(t.selection)?(e?.(t.insertText(`
|
|
1320
|
+
`)),!0):!1}insertNode(e,t={}){return({dispatch:n,tr:r,state:o})=>{var i;const{attrs:a,range:s,selection:c,replaceEmptyParentBlock:f=!1}=t,{from:p,to:m,$from:v}=Sa(c??s??r.selection,r.doc);if(Cv(e)||aPe(e)){const T=v.before(v.depth);return n?.(f&&p===m&&H1(v.parent)?r.replaceWith(T,T+v.parent.nodeSize,e):r.replaceWith(p,m,e)),!0}const y=Bn(e)?o.schema.nodes[e]:e;_n(y,{code:tn.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});const w=(i=t.marks)==null?void 0:i.map(T=>{if(T instanceof vr)return T;const E=Bn(T)?o.schema.marks[T]:T;return _n(E,{code:tn.SCHEMA,message:`The requested mark type ${T} does not exist in the schema.`}),E.create()}),C=y.createAndFill(a,Bn(t.content)?o.schema.text(t.content):t.content,w);return C?(n?.(p!==m?r.replaceRangeWith(p,m,C):r.insert(p,C)),!0):!1}}focus(e){return t=>{const{dispatch:n,tr:r}=t,{view:o}=this.store;if(e===!1||o.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){const{from:i=0,to:a=i}=r.selection;e={from:i,to:a}}return n&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{const{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,n,r=!0){return kv(e,t,n,r)}toggleWrappingNode(e,t,n){return r7(e,t,n)}toggleBlockNodeItem(e){return iA(e)}wrapInNode(e,t,n){return n7(e,t,n)}applyMark(e,t,n){return RNe(e,t,n)}toggleMark(e){return fp(e)}removeMark(e){return i7(e)}setMeta(e,t){return({tr:n})=>(n.setMeta(e,t),!0)}selectAll(){return this.selectText("all")}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("copy"),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(e=navigator.clipboard)!=null&&e.readText?await navigator.clipboard.readText():""},placeholder:{type:"inline"},onSuccess:(e,t,n)=>this.insertNode(W1({content:e,schema:n.state.schema}),{selection:t})(n)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand("cut"),!0)}replaceText(e){return PPe(e)}getAllCommandOptions(){const e={};for(const[t,n]of this.decorated)p1(n)||(e[t]=n);return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}const n=this.decorated.get(e)??{name:""};this.decorated.set(e,{...n,...t})}handleIosFocus(){es.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...LNe,...t}}setCommandMeta(e,t){const n=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addCommands(e){const{extensionCommands:t,commands:n,names:r,active:o}=e;for(const[i,a]of Qo(t))v7({name:i,set:r,code:tn.DUPLICATE_COMMAND_NAMES}),_n(!$Ne.has(i),{code:tn.DUPLICATE_COMMAND_NAMES,message:"The command name you chose is forbidden."}),n[i]=this.createUnchainedCommand(a,o[i])}unchainedFactory(e){return(...t)=>{const{shouldDispatch:n=!0,command:r}=e,{view:o}=this.store,{state:i}=o;let a;return n&&(a=o.dispatch),r(...t)({state:i,dispatch:a,view:o,tr:i.tr})}}createUnchainedCommand(e,t){const n=this.unchainedFactory({command:e});return n.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=e,n.active=t,n}chainedFactory(e){return(...t)=>{const{chain:n,command:r,getTr:o,getChain:i}=e,a=i(),{view:s}=this.store,{state:c}=s;return a.push(f=>r(...t)({state:c,dispatch:f,view:s,tr:o()})),n}}};On([Cn()],fr.prototype,"customDispatch",1),On([Cn()],fr.prototype,"insertText",1),On([Cn()],fr.prototype,"selectText",1),On([Cn()],fr.prototype,"selectMark",1),On([Cn()],fr.prototype,"delete",1),On([Cn()],fr.prototype,"emptyUpdate",1),On([Cn()],fr.prototype,"forceUpdate",1),On([Cn()],fr.prototype,"updateNodeAttributes",1),On([Cn()],fr.prototype,"setContent",1),On([Cn()],fr.prototype,"resetContent",1),On([Cn()],fr.prototype,"emptySelection",1),On([Cn()],fr.prototype,"insertNewLine",1),On([Cn()],fr.prototype,"insertNode",1),On([Cn()],fr.prototype,"focus",1),On([Cn()],fr.prototype,"blur",1),On([Cn()],fr.prototype,"setBlockNodeType",1),On([Cn()],fr.prototype,"toggleWrappingNode",1),On([Cn()],fr.prototype,"toggleBlockNodeItem",1),On([Cn()],fr.prototype,"wrapInNode",1),On([Cn()],fr.prototype,"applyMark",1),On([Cn()],fr.prototype,"toggleMark",1),On([Cn()],fr.prototype,"removeMark",1),On([Cn()],fr.prototype,"setMeta",1),On([Cn({description:({t:e})=>e(ru.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(ru.SELECT_ALL_LABEL),shortcut:on.SelectAll})],fr.prototype,"selectAll",1),On([Cn({description:({t:e})=>e(ru.COPY_DESCRIPTION),label:({t:e})=>e(ru.COPY_LABEL),shortcut:on.Copy,icon:"fileCopyLine"})],fr.prototype,"copy",1),On([Cn({description:({t:e})=>e(ru.PASTE_DESCRIPTION),label:({t:e})=>e(ru.PASTE_LABEL),shortcut:on.Paste,icon:"clipboardLine"})],fr.prototype,"paste",1),On([Cn({description:({t:e})=>e(ru.CUT_DESCRIPTION),label:({t:e})=>e(ru.CUT_LABEL),shortcut:on.Cut,icon:"scissorsFill"})],fr.prototype,"cut",1),On([Cn()],fr.prototype,"replaceText",1),On([Mo()],fr.prototype,"getAllCommandOptions",1),On([Mo()],fr.prototype,"getCommandOptions",1),On([Mo()],fr.prototype,"getCommandProp",1),fr=On([dr({defaultPriority:Fr.Highest,defaultOptions:{trackerClassName:"remirror-tracker-position",trackerNodeName:"span"},staticKeys:["trackerClassName","trackerNodeName"]})],fr);var LNe={forcedUpdates:[]},$Ne=new Set(["run","chain","original","raw","enabled","tr","new"]),Ds=class extends Xr{constructor(){super(...arguments),this.placeholders=wr.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{const t=rv(),{promise:n,placeholder:r,onFailure:o,onSuccess:i}=e;return new NNe(n).validate(a=>this.addPlaceholder(t,r)(a)).success(a=>{const{state:s,tr:c,dispatch:f,view:p,value:m}=a,v=this.store.helpers.findPlaceholder(t);if(!v){const y=new Error("The placeholder has been removed");return o?.({error:y,state:s,tr:c,dispatch:f,view:p})??!1}return this.removePlaceholder(t)({state:s,tr:c,view:p,dispatch:()=>{}}),i(m,v,{state:s,tr:c,dispatch:f,view:p})}).failure(a=>(this.removePlaceholder(t)({...a,dispatch:()=>{}}),o?.(a)??!1))}}get name(){return"decorations"}onCreate(){this.store.setExtensionStore("createPlaceholderCommand",this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,n,r,o,i,a;const{added:s,clearTrackers:c,removed:f,updated:p}=this.getMeta(e);if(c){this.placeholders=wr.empty;for(const[,m]of this.placeholderWidgets)(n=(t=m.spec).onDestroy)==null||n.call(t,this.store.view,m.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:m=>{var v,y;const w=this.placeholderWidgets.get(m.id);w&&((y=(v=w.spec).onDestroy)==null||y.call(v,this.store.view,w.spec.element))}});for(const[,m]of this.placeholderWidgets)(o=(r=m.spec).onUpdate)==null||o.call(r,this.store.view,m.from,m.spec.element,m.spec.data);for(const m of s){if(m.type==="inline"){this.addInlinePlaceholder(m,e);continue}if(m.type==="node"){this.addNodePlaceholder(m,e);continue}if(m.type==="widget"){this.addWidgetPlaceholder(m,e);continue}}for(const{id:m,data:v}of p){const y=this.placeholderWidgets.get(m);if(!y)continue;const w=fo.widget(y.from,y.spec.element,{...y.spec,data:v});this.placeholders=this.placeholders.remove([y]).add(e.doc,[w]),this.placeholderWidgets.set(m,w)}for(const m of f){const v=this.placeholders.find(void 0,void 0,w=>w.id===m&&w.__type===hp),y=this.placeholderWidgets.get(m);y&&((a=(i=y.spec).onDestroy)==null||a.call(i,this.store.view,y.spec.element)),this.placeholders=this.placeholders.remove(v),this.placeholderWidgets.delete(m)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(const n of this.store.extensions){if(!n.createDecorations)continue;const r=n.createDecorations(e).find();t=t.add(e.doc,r)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(w7,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(w7,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t?.(e),!0)}addPlaceholder(e,t,n){return({dispatch:r,tr:o})=>this.addPlaceholderTransaction(e,t,o,!r)?(r?.(n?o.deleteSelection():o),!0):!1}updatePlaceholder(e,t){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:e,data:t,tr:r,checkOnly:!n})?(n?.(r),!0):!1}removePlaceholder(e){return({dispatch:t,tr:n})=>this.removePlaceholderTransaction({id:e,tr:n,checkOnly:!t})?(t?.(n),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t?.(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){const e=new Map,t=this.placeholders.find(void 0,void 0,n=>n.__type===hp);for(const n of t)e.set(n.spec.id,{from:n.from,to:n.to});return e}createDecorations(e){var t,n,r;const{persistentSelectionClass:o}=this.options;return!o||(t=this.store.view)!=null&&t.hasFocus()||(r=(n=this.store.helpers).isInteracting)!=null&&r.call(n)?wr.empty:BNe(e,wr.empty,{class:Bn(o)?o:"selection"})}onApplyState(){}addWidgetPlaceholder(e,t){const{pos:n,createElement:r,onDestroy:o,onUpdate:i,className:a,nodeName:s,id:c,type:f}=e,p=r?.(this.store.view,n)??document.createElement(s);p.classList.add(a);const m=fo.widget(n,p,{id:c,__type:hp,type:f,element:p,onDestroy:o,onUpdate:i});this.placeholderWidgets.set(c,m),this.placeholders=this.placeholders.add(t.doc,[m])}addInlinePlaceholder(e,t){const{from:n=t.selection.from,to:r=t.selection.to,className:o,nodeName:i,id:a,type:s}=e;let c;if(n===r){const f=document.createElement(i);f.classList.add(o),c=fo.widget(n,f,{id:a,type:s,__type:hp,widget:f})}else c=fo.inline(n,r,{nodeName:i,class:o},{id:a,__type:hp});this.placeholders=this.placeholders.add(t.doc,[c])}addNodePlaceholder(e,t){const{pos:n,className:r,nodeName:o,id:i}=e,a=wi(n)?t.doc.resolve(n):t.selection.$from,s=wi(n)?a.nodeAfter?{pos:n,end:a.nodeAfter.nodeSize}:void 0:ZMe(a);if(!s)return;const c=fo.node(s.pos,s.end,{nodeName:o,class:r},{id:i,__type:hp});this.placeholders=this.placeholders.add(t.doc,[c])}withRequiredBase(e,t){const{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:o=n,className:i,...a}=t,s=(i?[r,i]:[r]).join(" ");return{nodeName:o,className:s,...a,id:e}}getMeta(e){const t=e.getMeta(this.pluginKey)??{};return{...FNe,...t}}setMeta(e,t){const n=this.getMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addPlaceholderTransaction(e,t,n,r=!1){if(this.findPlaceholder(e))return!1;if(r)return!0;const{added:i}=this.getMeta(n);return this.setMeta(n,{added:[...i,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){const{id:t,tr:n,checkOnly:r=!1,data:o}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;const{updated:a}=this.getMeta(n);return this.setMeta(n,{updated:ov([...a,{id:t,data:o}])}),!0}removePlaceholderTransaction(e){const{id:t,tr:n,checkOnly:r=!1}=e;if(!this.findPlaceholder(t))return!1;if(r)return!0;const{removed:i}=this.getMeta(n);return this.setMeta(n,{removed:ov([...i,t])}),!0}clearPlaceholdersTransaction(e){const{tr:t,checkOnly:n=!1}=e;return this.getPluginState()===wr.empty?!1:(n||this.setMeta(t,{clearTrackers:!0}),!0)}};On([Cn()],Ds.prototype,"updateDecorations",1),On([Cn()],Ds.prototype,"addPlaceholder",1),On([Cn()],Ds.prototype,"updatePlaceholder",1),On([Cn()],Ds.prototype,"removePlaceholder",1),On([Cn()],Ds.prototype,"clearPlaceholders",1),On([Mo()],Ds.prototype,"findPlaceholder",1),On([Mo()],Ds.prototype,"findAllPlaceholders",1),Ds=On([dr({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:"placeholder",placeholderNodeName:"span"},staticKeys:["placeholderClassName","placeholderNodeName"],handlerKeys:["decorations"],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,n)=>e.add(n.doc,t.find()),getDefault:()=>wr.empty}}},defaultPriority:Fr.Low})],Ds);var FNe={added:[],updated:[],clearTrackers:!1,removed:[]},hp="placeholderDecoration",w7="persistentSelectionFocus";function BNe(e,t,n){const{selection:r,doc:o}=e;if(r.empty)return t;const{from:i,to:a}=r,s=Sv(r)?fo.node(i,a,n):fo.inline(i,a,n);return t.add(o,[s])}var Z1=class extends Xr{get name(){return"docChanged"}onStateUpdate(e){const{firstUpdate:t,transactions:n,tr:r}=e;t||(n??[r]).some(o=>o?.docChanged)&&this.options.docChanged(e)}};Z1=On([dr({handlerKeys:["docChanged"],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:Fr.Lowest})],Z1);var ns=class extends Xr{get name(){return"helpers"}onCreate(){var e;this.store.setStringHandler("text",this.textToProsemirrorNode.bind(this)),this.store.setStringHandler("html",W1);const t=In(),n=In(),r=In(),o=new Set;for(const i of this.store.extensions){Ev(i)&&(n[i.name]=s=>z9({state:this.store.getState(),type:i.type,attrs:s}),r[i.name]=s=>{var c;return(c=wv({state:this.store.getState(),type:i.type,attrs:s}))==null?void 0:c.node.attrs}),X1(i)&&(n[i.name]=s=>z1({trState:this.store.getState(),type:i.type,attrs:s}),r[i.name]=s=>{const c=lc(this.store.getState().selection.$from,i.type);if(!c||!s)return c?.mark.attrs;if(eA(c.mark,s))return c.mark.attrs});const a=((e=i.createHelpers)==null?void 0:e.call(i))??{};for(const s of Object.keys(i.decoratedHelpers??{}))a[s]=i[s].bind(i);if(!p1(a))for(const[s,c]of Qo(a))v7({name:s,set:o,code:tn.DUPLICATE_HELPER_NAMES}),t[s]=c}this.store.setStoreKey("attrs",r),this.store.setStoreKey("active",n),this.store.setStoreKey("helpers",t),this.store.setExtensionStore("attrs",r),this.store.setExtensionStore("active",n),this.store.setExtensionStore("helpers",t)}isSelectionEmpty(e=this.store.getState()){return QD(e)}isViewEditable(e=this.store.getState()){var t,n;return((n=(t=this.store.view.props).editable)==null?void 0:n.call(t,e))??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return n=>{const{state:r}=n,o=W1({content:e,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(o,t)(n)}}getText({lineBreakDivider:e=`
|
|
1321
1321
|
|
|
1322
1322
|
`,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,tu)}getTextBetween(e,t,n=this.store.getState().doc){return n.textBetween(e,t,`
|
|
1323
1323
|
|
|
1324
|
-
`,tu)}getHTML(e=this.store.getState()){return wPe(e.doc,this.store.document)}textToProsemirrorNode(e){const t=`<pre>${e.content}</pre>`;return this.store.stringHandlers.html({...e,content:t})}};On([Mo()],ns.prototype,"isSelectionEmpty",1),On([Mo()],ns.prototype,"isViewEditable",1),On([Mo()],ns.prototype,"getStateJSON",1),On([Mo()],ns.prototype,"getJSON",1),On([Mo()],ns.prototype,"getRemirrorJSON",1),On([Cn()],ns.prototype,"insertHtml",1),On([Mo()],ns.prototype,"getText",1),On([Mo()],ns.prototype,"getTextBetween",1),On([Mo()],ns.prototype,"getHTML",1),ns=On([dr({})],ns);var pA=class extends Xr{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;const n=[],r=this.store.markTags[jn.ExcludeInputRules];for(const o of this.store.extensions)if(!((e=this.store.managerSettings.exclude)!=null&&e.inputRules||!o.createInputRules||(t=o.options.exclude)!=null&&t.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=r,n.push(i);return IAe({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};pA=On([dr({defaultPriority:Fr.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],pA);var As=class extends Xr{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,n;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(n=(t=this.store).rebuildKeymap)==null||n.call(t),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==e),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:e}=this.options;return Bn(e)?VNe[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)!=null&&e.keymap?[]:(this.setupKeydownHandler(),[new rc({props:{handleKeyDown:(t,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,t,n)}}})])}setupKeydownHandler(){const e=this.generateKeymapBindings();this.keydownHandler=fA(e)}generateKeymapBindings(){var e;const t=[],n=this.shortcutMap,r=this.store.getExtension(fr),o=s=>c=>J1({shortcut:c,map:n,store:this.store,options:s.options});for(const s of this.store.extensions){const c=s.decoratedKeybindings??{};if(!((e=s.options.exclude)!=null&&e.keymap)){s.createKeymap&&t.push(BNe(s.createKeymap(o(s)),n));for(const[f,p]of Qo(c)){if(p.isActive&&!p.isActive(s.options,this.store))continue;const m=s[f].bind(s),v=J1({shortcut:p.shortcut,map:n,options:s.options,store:this.store}),y=Br(p.priority)?p.priority(s.options,this.store):p.priority??Fr.Low,w=In();for(const C of v)w[C]=m;t.push([y,w]),p.command&&r.updateDecorated(p.command,{shortcut:v})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...t]);return QMe(i)}arrowRightShortcut(e){const t=this.store.markTags[jn.PreventExits],n=this.store.nodeTags[jn.PreventExits];return this.exitMarkForwards(t,n)(e)}arrowLeftShortcut(e){const t=this.store.markTags[jn.PreventExits],n=this.store.nodeTags[jn.PreventExits];return B1(this.exitNodeBackwards(n),this.exitMarkBackwards(t,n))(e)}backspace(e){const t=this.store.markTags[jn.PreventExits],n=this.store.nodeTags[jn.PreventExits];return B1(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(t,n,!0))(e)}createKeymap(){const{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:n}=this.options,r=In();if(!n)for(const[o,i]of Qo(cA))r[o]=I1(i);return t&&cA.Backspace&&(r.Backspace=I1(U1(LAe,cA.Backspace))),e&&(r.Escape=I1(qPe)),[Fr.Low,r]}getNamedShortcut(e,t={}){return e.startsWith("_|")?J1({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,n;const{changes:r}=e;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(t=this.store).rebuildKeymap)==null||n.call(t))}sortKeymaps(e){return Ad(e.map(t=>Fo(t)?t:[Fr.Default,t]),(t,n)=>n[0]-t[0]).map(t=>t[1])}exitMarkForwards(e,t){return n=>{const{tr:r,dispatch:o}=n;if(!kPe(r.selection)||du({selection:r.selection,types:t}))return!1;const s=r.selection.$from.marks().filter(c=>!e.includes(c.type.name));if(ks(s))return!1;if(!o)return!0;for(const c of s)r.removeStoredMark(c);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(e,t=!1){return n=>{const{tr:r}=n;if(!(t?t7:oA)(r.selection))return!1;const i=r.selection.$anchor.node();return!H1(i)||cPe(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(e,t,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?t7:oA)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(du({selection:o.selection,types:t}))return!1;const c=[...o.storedMarks??[],...o.selection.$from.marks()].filter(f=>!e.includes(f.type.name));if(ks(c))return!1;if(!i)return!0;for(const f of c)o.removeStoredMark(f);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};On([co({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],As.prototype,"arrowRightShortcut",1),On([co({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],As.prototype,"arrowLeftShortcut",1),On([co({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],As.prototype,"backspace",1),On([Mo()],As.prototype,"getNamedShortcut",1),As=On([dr({defaultPriority:Fr.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],As);function FNe(e){return Za(f1(on),e)}function J1({shortcut:e,map:t,options:n,store:r}){return Bn(e)?[mA(e,t)]:Fo(e)?e.map(o=>mA(o,t)):(e=e(n,r),J1({shortcut:e,map:t,options:n,store:r}))}function mA(e,t){return FNe(e)?t[e]:e}function BNe(e,t){const n={};let r,o;Fo(e)?[o,r]=e:r=e;for(const[i,a]of Qo(r))n[mA(i,t)]=a;return h1(o)?n:[o,n]}var C7={[on.Copy]:"Mod-c",[on.Cut]:"Mod-x",[on.Paste]:"Mod-v",[on.PastePlain]:"Mod-Shift-v",[on.SelectAll]:"Mod-a",[on.Undo]:"Mod-z",[on.Redo]:es.isMac?"Shift-Mod-z":"Mod-y",[on.Bold]:"Mod-b",[on.Italic]:"Mod-i",[on.Underline]:"Mod-u",[on.Strike]:"Mod-d",[on.Code]:"Mod-`",[on.Paragraph]:"Mod-Shift-0",[on.H1]:"Mod-Shift-1",[on.H2]:"Mod-Shift-2",[on.H3]:"Mod-Shift-3",[on.H4]:"Mod-Shift-4",[on.H5]:"Mod-Shift-5",[on.H6]:"Mod-Shift-6",[on.TaskList]:"Mod-Shift-7",[on.BulletList]:"Mod-Shift-8",[on.OrderedList]:"Mod-Shift-9",[on.Quote]:"Mod->",[on.Divider]:"Mod-Shift-|",[on.Codeblock]:"Mod-Shift-~",[on.ClearFormatting]:"Mod-Shift-C",[on.Superscript]:"Mod-.",[on.Subscript]:"Mod-,",[on.LeftAlignment]:"Mod-Shift-L",[on.CenterAlignment]:"Mod-Shift-E",[on.RightAlignment]:"Mod-Shift-R",[on.JustifyAlignment]:"Mod-Shift-J",[on.InsertLink]:"Mod-k",[on.Find]:"Mod-f",[on.FindBackwards]:"Mod-Shift-f",[on.FindReplace]:"Mod-Shift-H",[on.AddFootnote]:"Mod-Alt-f",[on.AddComment]:"Mod-Alt-m",[on.ContextMenu]:"Mod-Shift-\\",[on.IncreaseFontSize]:"Mod-Shift-.",[on.DecreaseFontSize]:"Mod-Shift-,",[on.IncreaseIndent]:"Tab",[on.DecreaseIndent]:"Shift-Tab",[on.Shortcuts]:"Mod-/",[on.Format]:es.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},zNe={...C7,[on.Strike]:"Mod-Shift-S",[on.Code]:"Mod-Shift-M",[on.Paragraph]:"Mod-Alt-0",[on.H1]:"Mod-Alt-1",[on.H2]:"Mod-Alt-2",[on.H3]:"Mod-Alt-3",[on.H4]:"Mod-Alt-4",[on.H5]:"Mod-Alt-5",[on.H6]:"Mod-Alt-6",[on.OrderedList]:"Mod-Alt-7",[on.BulletList]:"Mod-Alt-8",[on.Quote]:"Mod-Alt-9",[on.ClearFormatting]:"Mod-\\",[on.IncreaseIndent]:"Mod-[",[on.DecreaseIndent]:"Mod-]"},VNe={default:C7,googleDoc:zNe},HNe=class extends Xr{get name(){return"nodeViews"}createPlugin(){const e=[],t=In();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();e.unshift(Br(r)?{[n.name]:r}:r)}e.unshift(this.store.managerSettings.nodeViews??{});for(const n of e)Object.assign(t,n);return{props:{nodeViews:t}}}},jNe=class extends Xr{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;const n=[];for(const r of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.pasteRules||!r.createPasteRules||(t=r.options.exclude)!=null&&t.pasteRules)continue;const o=r.createPasteRules(),i=Fo(o)?o:[o];n.push(...i)}return sNe(n)}},gA=class extends Xr{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=In(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{const t=this.stateGetters.get(e);return _n(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){const{setStoreKey:e,setExtensionStore:t,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),e("pluginKeys",this.pluginKeys),e("getPluginState",this.getStateByName),t("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,n)=>{const r=n.tr,o={previousState:t,tr:r,transactions:e,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(e,t)=>{for(const n of this.initStateHandlers)n(t)},apply:(e,t,n,r)=>{const o={previousState:n,state:r,tr:e};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,n;if(!(!e.createPlugin&&!e.createExternalPlugins||(t=this.store.managerSettings.exclude)!=null&&t.plugins||(n=e.options.exclude)!=null&&n.plugins)){if(e.createPlugin){const o=new _d(e.name);this.pluginKeys[e.name]=o;const i=this.getPluginStateCreator(o);e.pluginKey=o,e.getPluginState=i,this.stateGetters.set(e.name,i),this.stateGetters.set(e.constructor,i);const a={...e.createPlugin(),key:o},s=new rc(a);this.updatePlugins([s],e.plugin?[e.plugin]:void 0),e.plugin=s}if(e.createExternalPlugins){const o=e.createExternalPlugins();this.updatePlugins(o,e.externalPlugins),e.externalPlugins=o}}}updatePlugins(e,t){if(!t||ks(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(r=>!t.includes(r)),...e];return}const n=new Map;for(const[r,o]of e.entries())n.set(mo(t,r),o);this.plugins=this.plugins.map(r=>t.includes(r)?n.get(r):r)}updateExtensionStore(){const{setExtensionStore:e}=this.store;e("updatePlugins",this.updatePlugins.bind(this)),e("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),e("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){const t=y7(e)?e:ANe(e)?this.store.manager.getExtension(e):this.store.extensions.find(n=>n.name===e);_n(t,{code:tn.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){_n(this.store.phase>=na.EditorView,{code:tn.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:e,updateState:t}=this.store,n=e.state.reconfigure({plugins:this.plugins});t(n)}};gA=On([dr({defaultPriority:Fr.Highest,handlerKeys:["applyState","appendTransaction"]})],gA);var vA=class extends Xr{constructor(){super(...arguments),this.dynamicAttributes={marks:In(),nodes:In()}}get name(){return"schema"}onCreate(){const{managerSettings:e,tags:t,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:a,nodeOverride:s,markOverride:c}=e,f=w=>!!(w&&t[jn.Block].includes(w));if(e.schema){const{nodes:w,marks:C}=ZNe(e.schema);this.addSchema(e.schema,w,C);return}const p=f(i)?{doc:In(),[i]:In()}:In(),m=In(),v=WNe({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:t});for(const w of o){v[w.name]={...v[w.name],...w.options.extraAttributes};const C=a===!0||w.options.disableExtraAttributes===!0||w.constructor.disableExtraAttributes===!0;if(Ev(w)){const{spec:k,dynamic:T}=S7({createExtensionSpec:(E,_)=>w.createNodeSpec(E,_),extraAttributes:mo(v,w.name),override:{...s,...w.options.nodeOverride},ignoreExtraAttributes:C,name:w.constructorName,tags:w.tags});w.spec=k,p[w.name]=k,Object.keys(T).length>0&&(this.dynamicAttributes.nodes[w.name]=T)}if(X1(w)){const{spec:k,dynamic:T}=S7({createExtensionSpec:(E,_)=>w.createMarkSpec(E,_),extraAttributes:mo(v,w.name),override:{...c,...w.options.markOverride},ignoreExtraAttributes:C,name:w.constructorName,tags:w.tags??[]});w.spec=k,m[w.name]=k,Object.keys(T).length>0&&(this.dynamicAttributes.marks[w.name]=T)}}const y=new QTe({nodes:p,marks:m,topNode:"doc"});this.addSchema(y,p,m)}createPlugin(){return{appendTransaction:(e,t,n)=>{const{tr:r}=n;return!e.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,a)=>(this.checkAndUpdateDynamicNodes(i,a,r),this.checkAndUpdateDynamicMarks(i,a,r),!0)),r.steps.length>0?r:null)}}}addSchema(e,t,n){this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",V1(e).name);for(const r of Object.values(e.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(e,t,n){for(const[r,o]of Qo(this.dynamicAttributes.nodes))if(e.type.name===r)for(const[i,a]of Qo(o)){if(!nc(e.attrs[i]))continue;const s={...e.attrs,[i]:a(e)};n.setNodeMarkup(t,void 0,s),I9(n)}}checkAndUpdateDynamicMarks(e,t,n){for(const[r,o]of Qo(this.dynamicAttributes.marks)){const i=mo(this.store.schema.marks,r),a=e.marks.find(s=>s.type.name===r);if(a)for(const[s,c]of Qo(o)){if(!nc(a.attrs[s]))continue;const f=lc(n.doc.resolve(t),i);if(!f)continue;const{from:p,to:m}=f,v=i.create({...a.attrs,[s]:c(a)});n.removeMark(p,m,i).addMark(p,m,v),I9(n)}}}gatherExtraAttributes(e){const t=[];for(const n of e)n.createSchemaAttributes&&t.push(...n.createSchemaAttributes());return t}};vA=On([dr({defaultPriority:Fr.Highest})],vA);function WNe(e){const{settings:t,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=e,a=In();if(t.disableExtraAttributes)return a;const s=[...n,...t.extraAttributes??[]];for(const c of s??[]){const f=UNe({identifiers:c.identifiers,nodeNames:r,markNames:o,tags:i});for(const p of f){const m=a[p]??{};a[p]={...m,...c.attributes}}}return a}function YNe(e){return Dd(e)&&Fo(e.tags)}function UNe(e){const{identifiers:t,nodeNames:n,markNames:r,tags:o}=e;if(t==="nodes")return n;if(t==="marks")return r;if(t==="all")return[...n,...r];if(Fo(t))return t;_n(YNe(t),{code:tn.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:a=[],behavior:s="any",excludeNames:c,excludeTags:f,type:p}=t,m=new Set,v=p==="mark"?r:p==="node"?n:[...r,...n],y=C=>v.includes(C)&&!c?.includes(C);for(const C of a)y(C)&&m.add(C);const w=new Map;for(const C of i)if(!f?.includes(C))for(const k of o[C]){if(!y(k))continue;if(s==="any"){m.add(k);continue}const T=w.get(k)??new Set;T.add(C),w.set(k,T)}for(const[C,k]of w)k.size===i.length&&m.add(C);return[...m]}function S7(e){var t;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:a,override:s}=e,c=In();function f(k,T){c[k]=T}let p=!1;function m(){p=!0}const v=qNe(r,o,m,f),y=KNe(r,o),w=GNe(r,o),C=n({defaults:v,parse:y,dom:w},s);return _n(o||p,{code:tn.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),C.group=[...((t=C.group)==null?void 0:t.split(" "))??[],...a].join(" ")||void 0,{spec:C,dynamic:c}}function bA(e){return Bn(e)||Br(e)?{default:e}:(_n(e,{message:`${JB(e)} is not supported`,code:tn.EXTENSION_EXTRA_ATTRIBUTES}),e)}function qNe(e,t,n,r){return()=>{n();const o=In();if(t)return o;for(const[i,a]of Qo(e)){let c=bA(a).default;Br(c)&&(r(i,c),c=null),o[i]=c===void 0?{}:{default:c}}return o}}function KNe(e,t){return n=>{const r=In();if(t)return r;for(const[o,i]of Qo(e)){const{parseDOM:a,...s}=bA(i);if(ji(n)){if(nc(a)){r[o]=n.getAttribute(o)??s.default;continue}if(Br(a)){r[o]=a(n)??s.default;continue}r[o]=n.getAttribute(a)??s.default}}return r}}function GNe(e,t){return n=>{const r=In();if(t)return r;function o(i,a){if(i){if(Bn(i)){r[a]=i;return}if(Fo(i)){const[s,c]=i;r[s]=c??n.attrs[a];return}for(const[s,c]of Qo(i))r[s]=c}}for(const[i,a]of Qo(e)){const{toDOM:s,parseDOM:c}=bA(a);if(nc(s)){const f=Bn(c)?c:i;r[f]=n.attrs[i];continue}if(Br(s)){o(s(n.attrs,XNe(n)),i);continue}o(s,i)}return r}}function XNe(e){return Cv(e)?{node:e}:iPe(e)?{mark:e}:{}}function ZNe(e){const t=In(),n=In();for(const[r,o]of Object.entries(e.nodes))t[r]=o.spec;for(const[r,o]of Object.entries(e.marks))n[r]=o.spec;return{nodes:t,marks:n}}var pp=class extends Xr{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)!=null&&t.suggesters))return R9(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>R9(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>FMe(this.store.getState(),e))}createExternalPlugins(){var e,t;const n=[];for(const r of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.suggesters)break;if(!r.createSuggesters||(t=r.options.exclude)!=null&&t.suggesters)continue;const o=r.createSuggesters(),i=Fo(o)?o:[o];n.push(...i)}return[BMe(...n)]}getSuggestState(e){return KD(e??this.store.getState())}getSuggestMethods(){const{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:a,setLastChangeFromAppend:s}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:a,setLastChangeFromAppend:s}}isSuggesterActive(e){var t;return Za(Fo(e)?e:[e],(t=this.getSuggestState().match)==null?void 0:t.suggester.name)}};On([Mo()],pp.prototype,"getSuggestState",1),On([Mo()],pp.prototype,"getSuggestMethods",1),On([Mo()],pp.prototype,"isSuggesterActive",1),pp=On([dr({customHandlerKeys:["suggester"]})],pp);var yA=class extends Xr{constructor(){super(...arguments),this.allTags=In(),this.plainTags=In(),this.markTags=In(),this.nodeTags=In()}get name(){return"tags"}onCreate(){this.resetTags();for(const e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const e=In(),t=In(),n=In(),r=In();for(const o of f1(jn))e[o]=[],t[o]=[],n[o]=[],r[o]=[];this.allTags=e,this.plainTags=t,this.markTags=n,this.nodeTags=r}updateTagForExtension(e){var t,n;const r=new Set([...e.tags??[],...((t=e.createTags)==null?void 0:t.call(e))??[],...e.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[e.name])??[]]);for(const o of r)_n(JNe(o),{code:tn.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(e.name),x7(e)&&this.plainTags[o].push(e.name),X1(e)&&this.markTags[o].push(e.name),Ev(e)&&this.nodeTags[o].push(e.name);e.tags=[...r]}};yA=On([dr({defaultPriority:Fr.Highest})],yA);function JNe(e){return Za(f1(jn),e)}var QNe=new _d("remirrorFilePlaceholderPlugin");function e3e(){const e=new rc({key:QNe,state:{init(){return{set:wr.empty,payloads:new Map}},apply(t,{set:n,payloads:r}){n=n.map(t.mapping,t.doc);const o=t.getMeta(e);if(o)if(o.type===0){const i=document.createElement("placeholder"),a=fo.widget(o.pos,i,{id:o.id});n=n.add(t.doc,[a]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(t){var n;return((n=e.getState(t))==null?void 0:n.set)??null}}});return e}var t3e=class extends Xr{get name(){return"upload"}createExternalPlugins(){return[e3e()]}};function n3e(e={}){e={...{exitMarksOnArrowPress:As.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:As.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:As.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:As.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Ds.defaultOptions.persistentSelectionClass},...e};const n=JT(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=JT(e,["persistentSelectionClass"]);return[new yA,new vA,new ONe,new gA,new pA,new jNe,new HNe,new pp,new fr,new ns,new As(n),new Z1,new t3e,new Ds(r)]}var k7=class extends Xr{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){const t=e.decoratedCommands??{},n=e.createCommands;for(const r of Object.keys(t)){const o=e[r];e[r]=(...i)=>a=>{var s;const c=o(...i)(a);return a.dispatch&&c&&this.setCommandMeta(a.tr,{type:"command",chain:a.dispatch!==((s=a.view)==null?void 0:s.dispatch),name:r,extension:e.name,decorated:!0}),c}}n&&(e.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...a)=>s=>{var c;const f=i(...a)(s);return s.dispatch&&f&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((c=s.view)==null?void 0:c.dispatch),name:o,extension:e.name,decorated:!1}),f};return r})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){const n=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...n,t])}};k7=On([dr({defaultOptions:{capture:es.isDevelopment},staticKeys:["capture"],defaultPriority:Fr.Highest})],k7);var Q1,Tv,ew,mp,pu,tw,nw,r3e=class{constructor(e){qo(this,Q1,rv()),qo(this,Tv,void 0),qo(this,ew,void 0),qo(this,mp,!0),qo(this,pu,d1()),qo(this,tw,void 0),qo(this,nw,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var a,s;_n(!this.manager.destroyed,{code:tn.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((s=(a=this.props).onDispatchTransaction)==null?void 0:s.call(a,i,this.getState()))??i;const c=this.getState(),{state:f,transactions:p}=c.applyTransaction(i);si(this,ew,c),this.updateState({state:f,tr:i,transactions:p});const m=this.manager.store.getForcedUpdates(i);ks(m)||this.updateViewProps(...m)},this.onChange=(i=In())=>{var a,s;const c=this.eventListenerProps(i);wn(this,mp)&&si(this,mp,!1),(s=(a=this.props).onChange)==null||s.call(a,c)},this.onBlur=i=>{var a,s;const c=this.eventListenerProps();(s=(a=this.props).onBlur)==null||s.call(a,c,i),wn(this,pu).emit("blur",c,i)},this.onFocus=i=>{var a,s;const c=this.eventListenerProps();(s=(a=this.props).onFocus)==null||s.call(a,c,i),wn(this,pu).emit("focus",c,i)},this.setContent=(i,{triggerChange:a=!1}={})=>{const{doc:s}=this.manager.createState({content:i}),c=this.getState(),{state:f}=this.getState().applyTransaction(c.tr.replaceRangeWith(0,c.doc.nodeSize-2,s));if(a)return this.updateState({state:f,triggerChange:a});this.view.updateState(f)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,a)=>this.manager.createState({content:i,selection:a}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:t,initialEditorState:n,element:r}=e;if(si(this,Tv,t),si(this,nw,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return wn(this,tw)??si(this,tw,wn(this,pu).on.bind(wn(this,pu)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return wn(this,mp)}get props(){return wn(this,Tv).call(this)}get previousState(){return this.previousStateOverride??wn(this,ew)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return wn(this,Q1)}get initialEditorState(){return wn(this,nw)}updateListener(e){const{state:t,tr:n}=e;return wn(this,pu).emit("updated",this.eventListenerProps({state:t,tr:n}))}update(e){const{getProps:t}=e;return si(this,Tv,t),this}updateViewProps(...e){const t=JT(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:a}=this.props,s=(t=this.manager.store)==null?void 0:t.attributes,c=Br(n)?n(this.eventListenerProps()):n;let f={};(r||wi(r))&&(f=e?{autoFocus:!0}:{autofocus:"true"});const p=ov(K1(e&&"Prosemirror","remirror-editor",s?.class,...o).split(" ")).join(" "),m={role:"textbox",...f,"aria-multiline":"true",...a??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...s,class:p};return tz({...m,...c})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){wn(this,pu).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=In()){const{state:t,tr:n,transactions:r}=e;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:wn(this,mp),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:wn(this,Q1),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};Q1=new WeakMap,Tv=new WeakMap,ew=new WeakMap,mp=new WeakMap,pu=new WeakMap,tw=new WeakMap,nw=new WeakMap;function o3e(e,t){const n=[],r=new WeakMap,o=[],i=new WeakMap;let a=[];const s={duplicateMap:i,parentExtensions:o,gatheredExtensions:a,settings:t};for(const m of e)E7(s,{extension:m});a=Ad(a,(m,v)=>v.priority-m.priority);const c=new WeakSet,f=new Set;for(const m of a){const v=m.constructor,y=m.name,w=i.get(v);_n(w,{message:`No entries were found for the ExtensionConstructor ${m.name}`,code:tn.INTERNAL}),!(c.has(v)||f.has(y))&&(c.add(v),f.add(y),n.push(m),r.set(v,m),w.forEach(C=>C?.replaceChildExtension(v,m)))}const p=[];for(const m of n)i3e({extension:m,found:c,missing:p});return _n(ks(p),{code:tn.MISSING_REQUIRED_EXTENSION,message:p.map(({Constructor:m,extension:v})=>`The extension '${v.name}' requires '${m.name} in order to run correctly.`).join(`
|
|
1325
|
-
`)}),{extensions:n,extensionMap:r}}function E7(e,t){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:a}=e,{extension:s,parentExtension:c}=t;let{names:f=[]}=t;_n(y7(s),{code:tn.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${s} was provided to the [[\`RemirrorManager\`]].`});const p=s.extensions;if(s.setPriority((n=a.priority)==null?void 0:n[s.name]),r.push(s),a3e({duplicateMap:o,extension:s,parentExtension:c}),p.length!==0){if(f.includes(s.name)){xNe(!1,`Circular dependency encountered when loading extensions: ${f.join(" > ")} > ${s.name}`);return}f=[...f,s.name],i.push(s);for(const m of p)E7(e,{names:f,extension:m,parentExtension:s})}}function i3e(e){const{extension:t,found:n,missing:r}=e;if(t.requiredExtensions)for(const o of t.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:t})}function a3e(e){const{duplicateMap:t,extension:n,parentExtension:r}=e,o=n.constructor,i=t.get(o),a=r?[r]:[];t.set(o,i?[...i,...a]:a)}function s3e(e){var t,n,r,o;const{extension:i,nodeNames:a,markNames:s,plainNames:c,store:f,handlers:p}=e;i.setStore(f);const m=(t=i.onCreate)==null?void 0:t.bind(i),v=(n=i.onView)==null?void 0:n.bind(i),y=(r=i.onStateUpdate)==null?void 0:r.bind(i),w=(o=i.onDestroy)==null?void 0:o.bind(i);m&&p.create.push(m),v&&p.view.push(v),y&&p.update.push(y),w&&p.destroy.push(w),X1(i)&&s.push(i.name),Ev(i)&&i.name!=="doc"&&a.push(i.name),x7(i)&&c.push(i.name)}var mu,Dv,Os,dc,Av,ka,zd,Ov,Vd,Mv,Hd,Ms,Pv,rw=class{constructor(e,t={}){qo(this,mu,void 0),qo(this,Dv,In()),qo(this,Os,In()),qo(this,dc,void 0),qo(this,Av,void 0),qo(this,ka,na.None),qo(this,zd,void 0),qo(this,Ov,!0),qo(this,Vd,{create:[],view:[],update:[],destroy:[]}),qo(this,Mv,[]),qo(this,Hd,d1()),qo(this,Ms,void 0),qo(this,Pv,void 0),this.getState=()=>{var o;return wn(this,ka)>=na.EditorView?this.view.state:(_n(wn(this,Ms),{code:tn.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=wn(this,Ms))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=o3e(e,t);si(this,zd,t),si(this,dc,Od(n)),si(this,Av,r),si(this,mu,this.createExtensionStore()),si(this,ka,na.Create),this.setupLifecycleHandlers();for(const o of wn(this,Vd).create){const i=o();i&&wn(this,Mv).push(i)}}static create(e,t={}){return new rw([...sz(e),...n3e(t.builtin)],t)}get[tc](){return oi.Manager}get destroyed(){return wn(this,ka)===na.Destroy}get mounted(){return wn(this,ka)>=na.EditorView&&wn(this,ka)<na.Destroy}get output(){var e;return(e=wn(this,Ms))==null?void 0:e.frameworkOutput}get frameworkAttached(){return!!wn(this,Ms)}get extensions(){return wn(this,dc)}get stringHandlers(){return wn(this,Dv)}get store(){return Od(wn(this,Os))}get extensionStore(){return Od(wn(this,mu))}get tr(){return this.getExtension(fr).transaction}get nodes(){return wn(this,Os).nodes}get marks(){return wn(this,Os).marks}get schema(){return wn(this,Os).schema}get extensionTags(){return wn(this,Os).tags}get view(){return wn(this,Os).view}get settings(){return wn(this,zd)}get document(){return wn(this,zd).document??j1()}setupLifecycleHandlers(){const e=wn(this,mu),t=wn(this,Vd),n=[],r=[],o=[];e.nodeNames=n,e.markNames=r,e.plainNames=o;for(const i of wn(this,dc))s3e({extension:i,nodeNames:n,markNames:r,plainNames:o,handlers:t,store:e})}setStringHandler(e,t){wn(this,Dv)[e]=t}setStoreKey(e,t){wn(this,Os)[e]=t}getStoreKey(e){const t=wn(this,Os)[e];return _n(!nc(t),{code:tn.MANAGER_PHASE_ERROR,message:"`getStoreKey` should not be called before the values are available."}),t}setExtensionStore(e,t){_n(wn(this,ka)<=na.EditorView,{code:tn.MANAGER_PHASE_ERROR,message:"`setExtensionStore` should only be called during the `onCreate` lifecycle hook. Make sure to only call it within the returned methods."}),wn(this,mu)[e]=t}createExtensionStore(){const e=In(),t=!0;let n,r;return Object.defineProperties(e,{extensions:{get:()=>wn(this,dc),enumerable:t},phase:{get:()=>wn(this,ka),enumerable:t},view:{get:()=>this.view,enumerable:t},managerSettings:{get:()=>Od(wn(this,zd)),enumerable:t},getState:{value:this.getState,enumerable:t},updateState:{value:this.updateState,enumerable:t},isMounted:{value:()=>this.mounted,enumerable:t},getExtension:{value:this.getExtension.bind(this),enumerable:t},manager:{get:()=>this,enumerable:t},document:{get:()=>this.document,enumerable:t},stringHandlers:{get:()=>wn(this,Dv),enumerable:t},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:t},previousState:{get:()=>r,set:o=>{r=o},enumerable:t}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(wn(this,ka)>=na.EditorView)return this;si(this,Ov,!0),si(this,ka,na.EditorView),wn(this,Os).view=e;for(const t of wn(this,Vd).view){const n=t(e);n&&wn(this,Mv).push(n)}return this}attachFramework(e,t){var n;wn(this,Ms)!==e&&(wn(this,Ms)&&(wn(this,Ms).destroy(),(n=wn(this,Pv))==null||n.call(this)),si(this,Ms,e),si(this,Pv,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;const t=(e=this.schema.nodes.doc)==null?void 0:e.createAndFill();return _n(t,{code:tn.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),t}createState(e={}){const{onError:t,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=e,{schema:a,plugins:s}=this.store,c=K9({stringHandler:Bn(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:t,schema:a,selection:o});return sf.create({schema:a,doc:c,plugins:s,selection:Sa(o,c)})}addHandler(e,t){return wn(this,Hd).on(e,t)}onStateUpdate(e){const t=wn(this,Ov);wn(this,mu).currentState=e.state,wn(this,mu).previousState=e.previousState,t&&(si(this,ka,na.Runtime),si(this,Ov,!1));const n={...e,firstUpdate:t};for(const r of wn(this,Vd).update)r(n);wn(this,Hd).emit("stateUpdate",n)}getExtension(e){const t=wn(this,Av).get(e);return _n(t,{code:tn.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!wn(this,Av).get(e)}clone(){const e=wn(this,dc).map(n=>n.clone(n.options)),t=rw.create(()=>e,wn(this,zd));return wn(this,Hd).emit("clone",t),t}recreate(e=[],t={}){const n=wn(this,dc).map(o=>o.clone(o.initialOptions)),r=rw.create(()=>[...n,...e],t);return wn(this,Hd).emit("recreate",r),r}destroy(){var e,t,n,r,o,i;si(this,ka,na.Destroy);for(const a of((e=this.view)==null?void 0:e.state.plugins)??[])(n=(t=a.getState(this.view.state))==null?void 0:t.destroy)==null||n.call(t);(r=wn(this,Ms))==null||r.destroy(),(o=wn(this,Pv))==null||o.call(this);for(const a of wn(this,Mv))a();for(const a of wn(this,Vd).destroy)a();(i=this.view)==null||i.destroy(),wn(this,Hd).emit("destroy")}includes(e){const t=[],n=[];for(const r of wn(this,dc))t.push(r.name,r.constructorName),n.push(r.constructor);return e.every(r=>Bn(r)?Za(t,r):Za(n,r))}},l3e=rw;mu=new WeakMap,Dv=new WeakMap,Os=new WeakMap,dc=new WeakMap,Av=new WeakMap,ka=new WeakMap,zd=new WeakMap,Ov=new WeakMap,Vd=new WeakMap,Mv=new WeakMap,Hd=new WeakMap,Ms=new WeakMap,Pv=new WeakMap;function c3e(e,t){return!sp(e)||!lp(e,oi.Manager)?!1:t?e.includes(t):!0}var u3e=Object.defineProperty,d3e=Object.getOwnPropertyDescriptor,f3e=(e,t,n,r)=>{for(var o=r>1?void 0:r?d3e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&u3e(t,n,o),o},T7=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ln=(e,t,n)=>(T7(e,t,"read from private field"),n?n.call(e):t.get(e)),Ea=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ta=(e,t,n,r)=>(T7(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Nv,h3e=class{constructor(){this.portals=new Map,Ea(this,Nv,d1()),this.on=e=>Ln(this,Nv).on("update",e),this.once=e=>{const t=Ln(this,Nv).on("update",n=>{t(),e(n)});return t}}update(){Ln(this,Nv).emit("update",this.portals)}render({Component:e,container:t}){const n=this.portals.get(t);this.portals.set(t,{Component:e,key:n?.key??rv()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:rv()})}remove(e){this.portals.delete(e),this.update()}};Nv=new WeakMap;var p3e=e=>{const{portals:t}=e;return Pt.createElement(Pt.Fragment,null,t.map(([n,{Component:r,key:o}])=>EM(Pt.createElement(r,null),n,o)))};function m3e(e){const[t,n]=Tn(()=>Array.from(e.portals.entries()));return dn(()=>e.on(r=>{n(Array.from(r.entries()))}),[e]),Ur(()=>t,[t])}var So,_v,jd,Rv,ow,Iv,gp,Lv,iw,fc,Wi,xA,D7=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:o,options:i}){Ea(this,So,void 0),Ea(this,_v,[]),Ea(this,jd,void 0),Ea(this,Rv,void 0),Ea(this,ow,void 0),Ea(this,Iv,void 0),Ea(this,gp,void 0),Ea(this,Lv,!1),Ea(this,iw,void 0),Ea(this,fc,void 0),Ea(this,Wi,void 0),Ea(this,xA,c=>{c&&(_n(Ln(this,fc),{code:tn.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${Ln(this,So).type.name}' which doesn't support content.`}),c.append(Ln(this,fc)))}),this.Component=()=>{const c=Ln(this,ow);return _n(c,{code:tn.REACT_NODE_VIEW,message:`The custom react node view provided for ${Ln(this,So).type.name} doesn't have a valid ReactComponent`}),Pt.createElement(c,{updateAttributes:this.updateAttributes,selected:this.selected,view:Ln(this,jd),getPosition:Ln(this,Iv),node:Ln(this,So),forwardRef:Ln(this,xA),decorations:Ln(this,_v)})},this.updateAttributes=c=>{if(!Ln(this,jd).editable)return;const f=Ln(this,Iv).call(this);if(f==null)return;const p=Ln(this,jd).state.tr.setNodeMarkup(f,void 0,{...Ln(this,So).attrs,...c});Ln(this,jd).dispatch(p)},_n(Br(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Ta(this,So,t),Ta(this,jd,r),Ta(this,Rv,n),Ta(this,ow,o),Ta(this,Iv,e),Ta(this,gp,i),Ta(this,Wi,this.createDom());const{contentDOM:a,wrapper:s}=this.createContentDom()??{};Ta(this,iw,a??void 0),Ta(this,fc,s),Ln(this,fc)&&Ln(this,Wi).append(Ln(this,fc)),this.setDomAttributes(Ln(this,So),Ln(this,Wi)),this.Component.displayName=KB(`${Ln(this,So).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:n,options:r}=e;return(o,i,a)=>new D7({options:r,node:o,view:i,getPosition:a,portalContainer:t,ReactComponent:n})}get selected(){return Ln(this,Lv)}get contentDOM(){return Ln(this,iw)}get dom(){return Ln(this,Wi)}renderComponent(){Ln(this,Rv).render({Component:this.Component,container:Ln(this,Wi)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=Ln(this,gp),n=Ln(this,So).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${GB(Ln(this,So).type.name)}-node-view-wrapper`),n}createContentDom(){var e,t;if(Ln(this,So).isLeaf)return;const n=(t=(e=Ln(this,So).type.spec).toDOM)==null?void 0:t.call(e,Ln(this,So));if(!n)return;const{contentDOM:r,dom:o}=$s.renderSpec(document,n);let i;if(ji(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${GB(Ln(this,So).type.name)}-node-view-content-wrapper`),i.append(r)),ji(r),{wrapper:i,contentDOM:r}}update(e,t){return F1({types:Ln(this,So).type,node:e})?(Ln(this,So)===e&&Ln(this,_v)===t||(Ln(this,So).sameMarkup(e)||this.setDomAttributes(e,Ln(this,Wi)),Ta(this,So,e),Ta(this,_v,t),this.renderComponent()),!0):!1}setDomAttributes(e,t){const{toDOM:n}=Ln(this,So).type.spec;let r=e.attrs;if(n){const o=n(e);if(Bn(o)||g3e(o))return;Dd(o[1])&&(r=o[1])}for(const[o,i]of Qo(r))t.setAttribute(o,i)}selectNode(){Ta(this,Lv,!0),Ln(this,Wi)&&Ln(this,Wi).classList.add(BB),this.renderComponent()}deselectNode(){Ta(this,Lv,!1),Ln(this,Wi)&&Ln(this,Wi).classList.remove(BB),this.renderComponent()}destroy(){Ln(this,Rv).remove(Ln(this,Wi))}ignoreMutation(e){return e.type==="selection"?!Ln(this,So).type.spec.selectable:Ln(this,fc)?!Ln(this,fc).contains(e.target):!0}stopEvent(e){var t;if(!Ln(this,Wi))return!1;if(Br(Ln(this,gp).stopEvent))return Ln(this,gp).stopEvent({event:e});const n=e.target;if(!(Ln(this,Wi).contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;const o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const a=!!Ln(this,So).type.spec.draggable,s=zn.isSelectable(Ln(this,So)),c=e.type==="copy",f=e.type==="paste",p=e.type==="cut",m=e.type==="mousedown",v=e.type.startsWith("drag");return!a&&s&&v&&e.preventDefault(),!(v||o||c||f||p||m&&s)}},A7=D7;So=new WeakMap,_v=new WeakMap,jd=new WeakMap,Rv=new WeakMap,ow=new WeakMap,Iv=new WeakMap,gp=new WeakMap,Lv=new WeakMap,iw=new WeakMap,fc=new WeakMap,Wi=new WeakMap,xA=new WeakMap;function g3e(e){return JD(e)||Dd(e)&&JD(e.dom)}var $v=class extends Xr{constructor(){super(...arguments),this.portalContainer=new h3e}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=In(),t=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Ev(r)||r.reactComponentEnvironment==="ssr"||(e[r.name]=A7.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=Qo({...this.options.nodeViewComponents,...t});for(const[r,o]of n)e[r]=A7.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};$v=f3e([dr({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],$v);function v3e(e){const t=kf(null),n=b3e(t);return[o=>{const i=e(o);return Pt.createElement(t.Provider,{value:i},o.children)},n,t]}function b3e(e){return(t,n)=>{const r=Sf(e),o=y3e(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return r;if(typeof t!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=t(r);if(!o||!n)return i;const a=t(o);return n(a,i)?a:i}}function y3e(e){const t=Yt();return x3e(()=>{t.current=e}),t.current}var x3e=typeof document<"u"?Nl:dn;function w3e(e,t){return v3e(n=>{const r=Yt(null),o=Yt(),i=t?.(n),[a,s]=Tn(()=>e({get:O7(r),set:M7(o),previousContext:void 0,props:n,state:i})),c=[...Object.values(n),i];return dn(()=>{c.length!==0&&s(f=>e({get:O7(r),set:M7(o),previousContext:f,props:n,state:i}))},c),r.current=a,o.current=s,a})}function O7(e){return t=>{if(!e.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function M7(e){return t=>{if(!e.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(n=>({...n,...typeof t=="function"?t(n):t}))}}var P7={},N7={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])})(N7),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=N7;Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function n(y){return!y.match(/[^a-f0-9]/i)?parseInt(y,16):NaN}function r(y,w,C){const k=n(y);if(Number.isNaN(k)||C!==void 0&&C!==y.length)throw new SyntaxError(t.errorMessages.get(w));return k}function o(y){const w=r(y,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(w)}function i(y,w){const C=r(y,t.ErrorType.MalformedUnicode,4);if(w!==void 0){const k=r(w,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(C,k)}return String.fromCharCode(C)}function a(y){return y.charAt(0)==="{"&&y.charAt(y.length-1)==="}"}function s(y){if(!a(y))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));const w=y.slice(1,-1),C=r(w,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(C)}catch(k){throw k instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):k}}function c(y,w=!1){if(w)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const C=parseInt(y,8);return String.fromCharCode(C)}const f=new Map([["b","\b"],["f","\f"],["n",`
|
|
1324
|
+
`,tu)}getHTML(e=this.store.getState()){return SPe(e.doc,this.store.document)}textToProsemirrorNode(e){const t=`<pre>${e.content}</pre>`;return this.store.stringHandlers.html({...e,content:t})}};On([Mo()],ns.prototype,"isSelectionEmpty",1),On([Mo()],ns.prototype,"isViewEditable",1),On([Mo()],ns.prototype,"getStateJSON",1),On([Mo()],ns.prototype,"getJSON",1),On([Mo()],ns.prototype,"getRemirrorJSON",1),On([Cn()],ns.prototype,"insertHtml",1),On([Mo()],ns.prototype,"getText",1),On([Mo()],ns.prototype,"getTextBetween",1),On([Mo()],ns.prototype,"getHTML",1),ns=On([dr({})],ns);var pA=class extends Xr{get name(){return"inputRules"}onCreate(){this.store.setExtensionStore("rebuildInputRules",this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;const n=[],r=this.store.markTags[jn.ExcludeInputRules];for(const o of this.store.extensions)if(!((e=this.store.managerSettings.exclude)!=null&&e.inputRules||!o.createInputRules||(t=o.options.exclude)!=null&&t.inputRules))for(const i of o.createInputRules())i.shouldSkip=this.options.shouldSkipInputRule,i.invalidMarks=r,n.push(i);return $Ae({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};pA=On([dr({defaultPriority:Fr.Default,handlerKeys:["shouldSkipInputRule"],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],pA);var As=class extends Xr{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,n;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(n=(t=this.store).rebuildKeymap)==null||n.call(t),()=>{var r,o;this.extraKeyBindings=this.extraKeyBindings.filter(i=>i!==e),(o=(r=this.store).rebuildKeymap)==null||o.call(r)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return"keymap"}get shortcutMap(){const{shortcuts:e}=this.options;return Bn(e)?jNe[e]:e}onCreate(){this.store.setExtensionStore("rebuildKeymap",this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)!=null&&e.keymap?[]:(this.setupKeydownHandler(),[new rc({props:{handleKeyDown:(t,n)=>{var r;return(r=this.keydownHandler)==null?void 0:r.call(this,t,n)}}})])}setupKeydownHandler(){const e=this.generateKeymapBindings();this.keydownHandler=fA(e)}generateKeymapBindings(){var e;const t=[],n=this.shortcutMap,r=this.store.getExtension(fr),o=s=>c=>J1({shortcut:c,map:n,store:this.store,options:s.options});for(const s of this.store.extensions){const c=s.decoratedKeybindings??{};if(!((e=s.options.exclude)!=null&&e.keymap)){s.createKeymap&&t.push(VNe(s.createKeymap(o(s)),n));for(const[f,p]of Qo(c)){if(p.isActive&&!p.isActive(s.options,this.store))continue;const m=s[f].bind(s),v=J1({shortcut:p.shortcut,map:n,options:s.options,store:this.store}),y=Br(p.priority)?p.priority(s.options,this.store):p.priority??Fr.Low,w=In();for(const C of v)w[C]=m;t.push([y,w]),p.command&&r.updateDecorated(p.command,{shortcut:v})}}}const i=this.sortKeymaps([...this.extraKeyBindings,...t]);return tPe(i)}arrowRightShortcut(e){const t=this.store.markTags[jn.PreventExits],n=this.store.nodeTags[jn.PreventExits];return this.exitMarkForwards(t,n)(e)}arrowLeftShortcut(e){const t=this.store.markTags[jn.PreventExits],n=this.store.nodeTags[jn.PreventExits];return B1(this.exitNodeBackwards(n),this.exitMarkBackwards(t,n))(e)}backspace(e){const t=this.store.markTags[jn.PreventExits],n=this.store.nodeTags[jn.PreventExits];return B1(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(t,n,!0))(e)}createKeymap(){const{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:n}=this.options,r=In();if(!n)for(const[o,i]of Qo(cA))r[o]=I1(i);return t&&cA.Backspace&&(r.Backspace=I1(U1(FAe,cA.Backspace))),e&&(r.Escape=I1(GPe)),[Fr.Low,r]}getNamedShortcut(e,t={}){return e.startsWith("_|")?J1({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,n;const{changes:r}=e;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(t=this.store).rebuildKeymap)==null||n.call(t))}sortKeymaps(e){return Ad(e.map(t=>Fo(t)?t:[Fr.Default,t]),(t,n)=>n[0]-t[0]).map(t=>t[1])}exitMarkForwards(e,t){return n=>{const{tr:r,dispatch:o}=n;if(!TPe(r.selection)||du({selection:r.selection,types:t}))return!1;const s=r.selection.$from.marks().filter(c=>!e.includes(c.type.name));if(ks(s))return!1;if(!o)return!0;for(const c of s)r.removeStoredMark(c);return o(r.insertText(" ",r.selection.from)),!0}}exitNodeBackwards(e,t=!1){return n=>{const{tr:r}=n;if(!(t?t7:oA)(r.selection))return!1;const i=r.selection.$anchor.node();return!H1(i)||dPe(i)||e.includes(i.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:i.type})(n)}}exitMarkBackwards(e,t,n=!1){return r=>{const{tr:o,dispatch:i}=r;if(!(n?t7:oA)(o.selection)||this.backwardMarkExitTracker.has(o.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;if(du({selection:o.selection,types:t}))return!1;const c=[...o.storedMarks??[],...o.selection.$from.marks()].filter(f=>!e.includes(f.type.name));if(ks(c))return!1;if(!i)return!0;for(const f of c)o.removeStoredMark(f);return this.backwardMarkExitTracker.set(o.selection.anchor,!0),i(o),!0}}};On([co({shortcut:"ArrowRight",isActive:e=>e.exitMarksOnArrowPress})],As.prototype,"arrowRightShortcut",1),On([co({shortcut:"ArrowLeft",isActive:e=>e.exitMarksOnArrowPress})],As.prototype,"arrowLeftShortcut",1),On([co({shortcut:"Backspace",isActive:e=>e.exitMarksOnArrowPress})],As.prototype,"backspace",1),On([Mo()],As.prototype,"getNamedShortcut",1),As=On([dr({defaultPriority:Fr.Low,defaultOptions:{shortcuts:"default",undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:["keymap"]})],As);function zNe(e){return Za(f1(on),e)}function J1({shortcut:e,map:t,options:n,store:r}){return Bn(e)?[mA(e,t)]:Fo(e)?e.map(o=>mA(o,t)):(e=e(n,r),J1({shortcut:e,map:t,options:n,store:r}))}function mA(e,t){return zNe(e)?t[e]:e}function VNe(e,t){const n={};let r,o;Fo(e)?[o,r]=e:r=e;for(const[i,a]of Qo(r))n[mA(i,t)]=a;return h1(o)?n:[o,n]}var C7={[on.Copy]:"Mod-c",[on.Cut]:"Mod-x",[on.Paste]:"Mod-v",[on.PastePlain]:"Mod-Shift-v",[on.SelectAll]:"Mod-a",[on.Undo]:"Mod-z",[on.Redo]:es.isMac?"Shift-Mod-z":"Mod-y",[on.Bold]:"Mod-b",[on.Italic]:"Mod-i",[on.Underline]:"Mod-u",[on.Strike]:"Mod-d",[on.Code]:"Mod-`",[on.Paragraph]:"Mod-Shift-0",[on.H1]:"Mod-Shift-1",[on.H2]:"Mod-Shift-2",[on.H3]:"Mod-Shift-3",[on.H4]:"Mod-Shift-4",[on.H5]:"Mod-Shift-5",[on.H6]:"Mod-Shift-6",[on.TaskList]:"Mod-Shift-7",[on.BulletList]:"Mod-Shift-8",[on.OrderedList]:"Mod-Shift-9",[on.Quote]:"Mod->",[on.Divider]:"Mod-Shift-|",[on.Codeblock]:"Mod-Shift-~",[on.ClearFormatting]:"Mod-Shift-C",[on.Superscript]:"Mod-.",[on.Subscript]:"Mod-,",[on.LeftAlignment]:"Mod-Shift-L",[on.CenterAlignment]:"Mod-Shift-E",[on.RightAlignment]:"Mod-Shift-R",[on.JustifyAlignment]:"Mod-Shift-J",[on.InsertLink]:"Mod-k",[on.Find]:"Mod-f",[on.FindBackwards]:"Mod-Shift-f",[on.FindReplace]:"Mod-Shift-H",[on.AddFootnote]:"Mod-Alt-f",[on.AddComment]:"Mod-Alt-m",[on.ContextMenu]:"Mod-Shift-\\",[on.IncreaseFontSize]:"Mod-Shift-.",[on.DecreaseFontSize]:"Mod-Shift-,",[on.IncreaseIndent]:"Tab",[on.DecreaseIndent]:"Shift-Tab",[on.Shortcuts]:"Mod-/",[on.Format]:es.isMac?"Alt-Shift-f":"Shift-Ctrl-f"},HNe={...C7,[on.Strike]:"Mod-Shift-S",[on.Code]:"Mod-Shift-M",[on.Paragraph]:"Mod-Alt-0",[on.H1]:"Mod-Alt-1",[on.H2]:"Mod-Alt-2",[on.H3]:"Mod-Alt-3",[on.H4]:"Mod-Alt-4",[on.H5]:"Mod-Alt-5",[on.H6]:"Mod-Alt-6",[on.OrderedList]:"Mod-Alt-7",[on.BulletList]:"Mod-Alt-8",[on.Quote]:"Mod-Alt-9",[on.ClearFormatting]:"Mod-\\",[on.IncreaseIndent]:"Mod-[",[on.DecreaseIndent]:"Mod-]"},jNe={default:C7,googleDoc:HNe},WNe=class extends Xr{get name(){return"nodeViews"}createPlugin(){const e=[],t=In();for(const n of this.store.extensions){if(!n.createNodeViews)continue;const r=n.createNodeViews();e.unshift(Br(r)?{[n.name]:r}:r)}e.unshift(this.store.managerSettings.nodeViews??{});for(const n of e)Object.assign(t,n);return{props:{nodeViews:t}}}},YNe=class extends Xr{get name(){return"pasteRules"}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;const n=[];for(const r of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.pasteRules||!r.createPasteRules||(t=r.options.exclude)!=null&&t.pasteRules)continue;const o=r.createPasteRules(),i=Fo(o)?o:[o];n.push(...i)}return cNe(n)}},gA=class extends Xr{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=In(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{const t=this.stateGetters.get(e);return _n(t,{message:"No plugin exists for the requested extension name."}),t()}}get name(){return"plugins"}onCreate(){const{setStoreKey:e,setExtensionStore:t,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();const{plugins:o=[]}=n;this.updatePlugins(o,this.managerPlugins);for(const i of r)i.onApplyState&&this.applyStateHandlers.push(i.onApplyState.bind(i)),i.onInitState&&this.initStateHandlers.push(i.onInitState.bind(i)),i.onAppendTransaction&&this.appendTransactionHandlers.push(i.onAppendTransaction.bind(i)),this.extractExtensionPlugins(i);this.managerPlugins=o,this.store.setStoreKey("plugins",this.plugins),e("pluginKeys",this.pluginKeys),e("getPluginState",this.getStateByName),t("getPluginState",this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,n)=>{const r=n.tr,o={previousState:t,tr:r,transactions:e,state:n};for(const i of this.appendTransactionHandlers)i(o);return this.options.appendTransaction(o),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(e,t)=>{for(const n of this.initStateHandlers)n(t)},apply:(e,t,n,r)=>{const o={previousState:n,state:r,tr:e};for(const i of this.applyStateHandlers)i(o);this.options.applyState(o)}}}}extractExtensionPlugins(e){var t,n;if(!(!e.createPlugin&&!e.createExternalPlugins||(t=this.store.managerSettings.exclude)!=null&&t.plugins||(n=e.options.exclude)!=null&&n.plugins)){if(e.createPlugin){const o=new _d(e.name);this.pluginKeys[e.name]=o;const i=this.getPluginStateCreator(o);e.pluginKey=o,e.getPluginState=i,this.stateGetters.set(e.name,i),this.stateGetters.set(e.constructor,i);const a={...e.createPlugin(),key:o},s=new rc(a);this.updatePlugins([s],e.plugin?[e.plugin]:void 0),e.plugin=s}if(e.createExternalPlugins){const o=e.createExternalPlugins();this.updatePlugins(o,e.externalPlugins),e.externalPlugins=o}}}updatePlugins(e,t){if(!t||ks(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(r=>!t.includes(r)),...e];return}const n=new Map;for(const[r,o]of e.entries())n.set(mo(t,r),o);this.plugins=this.plugins.map(r=>t.includes(r)?n.get(r):r)}updateExtensionStore(){const{setExtensionStore:e}=this.store;e("updatePlugins",this.updatePlugins.bind(this)),e("dispatchPluginUpdate",this.dispatchPluginUpdate.bind(this)),e("updateExtensionPlugins",this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){const t=y7(e)?e:MNe(e)?this.store.manager.getExtension(e):this.store.extensions.find(n=>n.name===e);_n(t,{code:tn.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey("plugins",this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){_n(this.store.phase>=na.EditorView,{code:tn.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});const{view:e,updateState:t}=this.store,n=e.state.reconfigure({plugins:this.plugins});t(n)}};gA=On([dr({defaultPriority:Fr.Highest,handlerKeys:["applyState","appendTransaction"]})],gA);var vA=class extends Xr{constructor(){super(...arguments),this.dynamicAttributes={marks:In(),nodes:In()}}get name(){return"schema"}onCreate(){const{managerSettings:e,tags:t,markNames:n,nodeNames:r,extensions:o}=this.store,{defaultBlockNode:i,disableExtraAttributes:a,nodeOverride:s,markOverride:c}=e,f=w=>!!(w&&t[jn.Block].includes(w));if(e.schema){const{nodes:w,marks:C}=QNe(e.schema);this.addSchema(e.schema,w,C);return}const p=f(i)?{doc:In(),[i]:In()}:In(),m=In(),v=UNe({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(o),nodeNames:r,markNames:n,tags:t});for(const w of o){v[w.name]={...v[w.name],...w.options.extraAttributes};const C=a===!0||w.options.disableExtraAttributes===!0||w.constructor.disableExtraAttributes===!0;if(Ev(w)){const{spec:k,dynamic:T}=S7({createExtensionSpec:(E,_)=>w.createNodeSpec(E,_),extraAttributes:mo(v,w.name),override:{...s,...w.options.nodeOverride},ignoreExtraAttributes:C,name:w.constructorName,tags:w.tags});w.spec=k,p[w.name]=k,Object.keys(T).length>0&&(this.dynamicAttributes.nodes[w.name]=T)}if(X1(w)){const{spec:k,dynamic:T}=S7({createExtensionSpec:(E,_)=>w.createMarkSpec(E,_),extraAttributes:mo(v,w.name),override:{...c,...w.options.markOverride},ignoreExtraAttributes:C,name:w.constructorName,tags:w.tags??[]});w.spec=k,m[w.name]=k,Object.keys(T).length>0&&(this.dynamicAttributes.marks[w.name]=T)}}const y=new tDe({nodes:p,marks:m,topNode:"doc"});this.addSchema(y,p,m)}createPlugin(){return{appendTransaction:(e,t,n)=>{const{tr:r}=n;return!e.some(i=>i.docChanged)||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((i,a)=>(this.checkAndUpdateDynamicNodes(i,a,r),this.checkAndUpdateDynamicMarks(i,a,r),!0)),r.steps.length>0?r:null)}}}addSchema(e,t,n){this.store.setStoreKey("nodes",t),this.store.setStoreKey("marks",n),this.store.setStoreKey("schema",e),this.store.setExtensionStore("schema",e),this.store.setStoreKey("defaultBlockNode",V1(e).name);for(const r of Object.values(e.nodes))if(r.name!=="doc"&&(r.isBlock||r.isTextblock))break}checkAndUpdateDynamicNodes(e,t,n){for(const[r,o]of Qo(this.dynamicAttributes.nodes))if(e.type.name===r)for(const[i,a]of Qo(o)){if(!nc(e.attrs[i]))continue;const s={...e.attrs,[i]:a(e)};n.setNodeMarkup(t,void 0,s),I9(n)}}checkAndUpdateDynamicMarks(e,t,n){for(const[r,o]of Qo(this.dynamicAttributes.marks)){const i=mo(this.store.schema.marks,r),a=e.marks.find(s=>s.type.name===r);if(a)for(const[s,c]of Qo(o)){if(!nc(a.attrs[s]))continue;const f=lc(n.doc.resolve(t),i);if(!f)continue;const{from:p,to:m}=f,v=i.create({...a.attrs,[s]:c(a)});n.removeMark(p,m,i).addMark(p,m,v),I9(n)}}}gatherExtraAttributes(e){const t=[];for(const n of e)n.createSchemaAttributes&&t.push(...n.createSchemaAttributes());return t}};vA=On([dr({defaultPriority:Fr.Highest})],vA);function UNe(e){const{settings:t,gatheredSchemaAttributes:n,nodeNames:r,markNames:o,tags:i}=e,a=In();if(t.disableExtraAttributes)return a;const s=[...n,...t.extraAttributes??[]];for(const c of s??[]){const f=KNe({identifiers:c.identifiers,nodeNames:r,markNames:o,tags:i});for(const p of f){const m=a[p]??{};a[p]={...m,...c.attributes}}}return a}function qNe(e){return Dd(e)&&Fo(e.tags)}function KNe(e){const{identifiers:t,nodeNames:n,markNames:r,tags:o}=e;if(t==="nodes")return n;if(t==="marks")return r;if(t==="all")return[...n,...r];if(Fo(t))return t;_n(qNe(t),{code:tn.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});const{tags:i=[],names:a=[],behavior:s="any",excludeNames:c,excludeTags:f,type:p}=t,m=new Set,v=p==="mark"?r:p==="node"?n:[...r,...n],y=C=>v.includes(C)&&!c?.includes(C);for(const C of a)y(C)&&m.add(C);const w=new Map;for(const C of i)if(!f?.includes(C))for(const k of o[C]){if(!y(k))continue;if(s==="any"){m.add(k);continue}const T=w.get(k)??new Set;T.add(C),w.set(k,T)}for(const[C,k]of w)k.size===i.length&&m.add(C);return[...m]}function S7(e){var t;const{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:o,name:i,tags:a,override:s}=e,c=In();function f(k,T){c[k]=T}let p=!1;function m(){p=!0}const v=GNe(r,o,m,f),y=XNe(r,o),w=ZNe(r,o),C=n({defaults:v,parse:y,dom:w},s);return _n(o||p,{code:tn.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${i}' to 'true'.`}),C.group=[...((t=C.group)==null?void 0:t.split(" "))??[],...a].join(" ")||void 0,{spec:C,dynamic:c}}function bA(e){return Bn(e)||Br(e)?{default:e}:(_n(e,{message:`${JB(e)} is not supported`,code:tn.EXTENSION_EXTRA_ATTRIBUTES}),e)}function GNe(e,t,n,r){return()=>{n();const o=In();if(t)return o;for(const[i,a]of Qo(e)){let c=bA(a).default;Br(c)&&(r(i,c),c=null),o[i]=c===void 0?{}:{default:c}}return o}}function XNe(e,t){return n=>{const r=In();if(t)return r;for(const[o,i]of Qo(e)){const{parseDOM:a,...s}=bA(i);if(ji(n)){if(nc(a)){r[o]=n.getAttribute(o)??s.default;continue}if(Br(a)){r[o]=a(n)??s.default;continue}r[o]=n.getAttribute(a)??s.default}}return r}}function ZNe(e,t){return n=>{const r=In();if(t)return r;function o(i,a){if(i){if(Bn(i)){r[a]=i;return}if(Fo(i)){const[s,c]=i;r[s]=c??n.attrs[a];return}for(const[s,c]of Qo(i))r[s]=c}}for(const[i,a]of Qo(e)){const{toDOM:s,parseDOM:c}=bA(a);if(nc(s)){const f=Bn(c)?c:i;r[f]=n.attrs[i];continue}if(Br(s)){o(s(n.attrs,JNe(n)),i);continue}o(s,i)}return r}}function JNe(e){return Cv(e)?{node:e}:sPe(e)?{mark:e}:{}}function QNe(e){const t=In(),n=In();for(const[r,o]of Object.entries(e.nodes))t[r]=o.spec;for(const[r,o]of Object.entries(e.marks))n[r]=o.spec;return{nodes:t,marks:n}}var pp=class extends Xr{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)!=null&&t.suggesters))return R9(this.store.getState(),e)}}get name(){return"suggest"}onCreate(){this.store.setExtensionStore("addSuggester",e=>R9(this.store.getState(),e)),this.store.setExtensionStore("removeSuggester",e=>zMe(this.store.getState(),e))}createExternalPlugins(){var e,t;const n=[];for(const r of this.store.extensions){if((e=this.store.managerSettings.exclude)!=null&&e.suggesters)break;if(!r.createSuggesters||(t=r.options.exclude)!=null&&t.suggesters)continue;const o=r.createSuggesters(),i=Fo(o)?o:[o];n.push(...i)}return[VMe(...n)]}getSuggestState(e){return KD(e??this.store.getState())}getSuggestMethods(){const{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:a,setLastChangeFromAppend:s}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:o,findMatchAtPosition:i,findNextTextSelection:a,setLastChangeFromAppend:s}}isSuggesterActive(e){var t;return Za(Fo(e)?e:[e],(t=this.getSuggestState().match)==null?void 0:t.suggester.name)}};On([Mo()],pp.prototype,"getSuggestState",1),On([Mo()],pp.prototype,"getSuggestMethods",1),On([Mo()],pp.prototype,"isSuggesterActive",1),pp=On([dr({customHandlerKeys:["suggester"]})],pp);var yA=class extends Xr{constructor(){super(...arguments),this.allTags=In(),this.plainTags=In(),this.markTags=In(),this.nodeTags=In()}get name(){return"tags"}onCreate(){this.resetTags();for(const e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey("tags",this.allTags),this.store.setExtensionStore("tags",this.allTags),this.store.setStoreKey("plainTags",this.plainTags),this.store.setExtensionStore("plainTags",this.plainTags),this.store.setStoreKey("markTags",this.markTags),this.store.setExtensionStore("markTags",this.markTags),this.store.setStoreKey("nodeTags",this.nodeTags),this.store.setExtensionStore("nodeTags",this.nodeTags)}resetTags(){const e=In(),t=In(),n=In(),r=In();for(const o of f1(jn))e[o]=[],t[o]=[],n[o]=[],r[o]=[];this.allTags=e,this.plainTags=t,this.markTags=n,this.nodeTags=r}updateTagForExtension(e){var t,n;const r=new Set([...e.tags??[],...((t=e.createTags)==null?void 0:t.call(e))??[],...e.options.extraTags??[],...((n=this.store.managerSettings.extraTags)==null?void 0:n[e.name])??[]]);for(const o of r)_n(e3e(o),{code:tn.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[o].push(e.name),x7(e)&&this.plainTags[o].push(e.name),X1(e)&&this.markTags[o].push(e.name),Ev(e)&&this.nodeTags[o].push(e.name);e.tags=[...r]}};yA=On([dr({defaultPriority:Fr.Highest})],yA);function e3e(e){return Za(f1(jn),e)}var t3e=new _d("remirrorFilePlaceholderPlugin");function n3e(){const e=new rc({key:t3e,state:{init(){return{set:wr.empty,payloads:new Map}},apply(t,{set:n,payloads:r}){n=n.map(t.mapping,t.doc);const o=t.getMeta(e);if(o)if(o.type===0){const i=document.createElement("placeholder"),a=fo.widget(o.pos,i,{id:o.id});n=n.add(t.doc,[a]),r.set(o.id,o.payload)}else o.type===1&&(n=n.remove(n.find(void 0,void 0,i=>i.id===o.id)),r.delete(o.id));return{set:n,payloads:r}}},props:{decorations(t){var n;return((n=e.getState(t))==null?void 0:n.set)??null}}});return e}var r3e=class extends Xr{get name(){return"upload"}createExternalPlugins(){return[n3e()]}};function o3e(e={}){e={...{exitMarksOnArrowPress:As.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:As.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:As.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:As.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:Ds.defaultOptions.persistentSelectionClass},...e};const n=JT(e,["excludeBaseKeymap","selectParentNodeOnEscape","undoInputRuleOnBackspace"]),r=JT(e,["persistentSelectionClass"]);return[new yA,new vA,new PNe,new gA,new pA,new YNe,new WNe,new pp,new fr,new ns,new As(n),new Z1,new r3e,new Ds(r)]}var k7=class extends Xr{get name(){return"meta"}onCreate(){if(this.store.setStoreKey("getCommandMeta",this.getCommandMeta.bind(this)),!!this.options.capture)for(const e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){const t=e.decoratedCommands??{},n=e.createCommands;for(const r of Object.keys(t)){const o=e[r];e[r]=(...i)=>a=>{var s;const c=o(...i)(a);return a.dispatch&&c&&this.setCommandMeta(a.tr,{type:"command",chain:a.dispatch!==((s=a.view)==null?void 0:s.dispatch),name:r,extension:e.name,decorated:!0}),c}}n&&(e.createCommands=()=>{const r=n();for(const[o,i]of Object.entries(r))r[o]=(...a)=>s=>{var c;const f=i(...a)(s);return s.dispatch&&f&&this.setCommandMeta(s.tr,{type:"command",chain:s.dispatch!==((c=s.view)==null?void 0:c.dispatch),name:o,extension:e.name,decorated:!1}),f};return r})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){const n=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...n,t])}};k7=On([dr({defaultOptions:{capture:es.isDevelopment},staticKeys:["capture"],defaultPriority:Fr.Highest})],k7);var Q1,Tv,ew,mp,pu,tw,nw,i3e=class{constructor(e){qo(this,Q1,rv()),qo(this,Tv,void 0),qo(this,ew,void 0),qo(this,mp,!0),qo(this,pu,d1()),qo(this,tw,void 0),qo(this,nw,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=i=>{var a,s;_n(!this.manager.destroyed,{code:tn.MANAGER_PHASE_ERROR,message:"A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue."}),i=((s=(a=this.props).onDispatchTransaction)==null?void 0:s.call(a,i,this.getState()))??i;const c=this.getState(),{state:f,transactions:p}=c.applyTransaction(i);si(this,ew,c),this.updateState({state:f,tr:i,transactions:p});const m=this.manager.store.getForcedUpdates(i);ks(m)||this.updateViewProps(...m)},this.onChange=(i=In())=>{var a,s;const c=this.eventListenerProps(i);wn(this,mp)&&si(this,mp,!1),(s=(a=this.props).onChange)==null||s.call(a,c)},this.onBlur=i=>{var a,s;const c=this.eventListenerProps();(s=(a=this.props).onBlur)==null||s.call(a,c,i),wn(this,pu).emit("blur",c,i)},this.onFocus=i=>{var a,s;const c=this.eventListenerProps();(s=(a=this.props).onFocus)==null||s.call(a,c,i),wn(this,pu).emit("focus",c,i)},this.setContent=(i,{triggerChange:a=!1}={})=>{const{doc:s}=this.manager.createState({content:i}),c=this.getState(),{state:f}=this.getState().applyTransaction(c.tr.replaceRangeWith(0,c.doc.nodeSize-2,s));if(a)return this.updateState({state:f,triggerChange:a});this.view.updateState(f)},this.clearContent=({triggerChange:i=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:i})},this.createStateFromContent=(i,a)=>this.manager.createState({content:i,selection:a}),this.focus=i=>{this.manager.store.commands.focus(i)},this.blur=i=>{this.manager.store.commands.blur(i)};const{getProps:t,initialEditorState:n,element:r}=e;if(si(this,Tv,t),si(this,nw,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;const o=this.createView(n,r);this.manager.addView(o)}get addHandler(){return wn(this,tw)??si(this,tw,wn(this,pu).on.bind(wn(this,pu)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return wn(this,mp)}get props(){return wn(this,Tv).call(this)}get previousState(){return this.previousStateOverride??wn(this,ew)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return wn(this,Q1)}get initialEditorState(){return wn(this,nw)}updateListener(e){const{state:t,tr:n}=e;return wn(this,pu).emit("updated",this.eventListenerProps({state:t,tr:n}))}update(e){const{getProps:t}=e;return si(this,Tv,t),this}updateViewProps(...e){const t=JT(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;const{attributes:n,autoFocus:r,classNames:o=[],label:i,editable:a}=this.props,s=(t=this.manager.store)==null?void 0:t.attributes,c=Br(n)?n(this.eventListenerProps()):n;let f={};(r||wi(r))&&(f=e?{autoFocus:!0}:{autofocus:"true"});const p=ov(K1(e&&"Prosemirror","remirror-editor",s?.class,...o).split(" ")).join(" "),m={role:"textbox",...f,"aria-multiline":"true",...a??!0?{}:{"aria-readonly":"true"},"aria-label":i??"",...s,class:p};return tz({...m,...c})}addFocusListeners(){this.view.dom.addEventListener("blur",this.onBlur),this.view.dom.addEventListener("focus",this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener("blur",this.onBlur),this.view.dom.removeEventListener("focus",this.onFocus)}destroy(){wn(this,pu).emit("destroy"),this.view&&this.removeFocusListeners()}eventListenerProps(e=In()){const{state:t,tr:n,transactions:r}=e;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:wn(this,mp),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:wn(this,Q1),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};Q1=new WeakMap,Tv=new WeakMap,ew=new WeakMap,mp=new WeakMap,pu=new WeakMap,tw=new WeakMap,nw=new WeakMap;function a3e(e,t){const n=[],r=new WeakMap,o=[],i=new WeakMap;let a=[];const s={duplicateMap:i,parentExtensions:o,gatheredExtensions:a,settings:t};for(const m of e)E7(s,{extension:m});a=Ad(a,(m,v)=>v.priority-m.priority);const c=new WeakSet,f=new Set;for(const m of a){const v=m.constructor,y=m.name,w=i.get(v);_n(w,{message:`No entries were found for the ExtensionConstructor ${m.name}`,code:tn.INTERNAL}),!(c.has(v)||f.has(y))&&(c.add(v),f.add(y),n.push(m),r.set(v,m),w.forEach(C=>C?.replaceChildExtension(v,m)))}const p=[];for(const m of n)s3e({extension:m,found:c,missing:p});return _n(ks(p),{code:tn.MISSING_REQUIRED_EXTENSION,message:p.map(({Constructor:m,extension:v})=>`The extension '${v.name}' requires '${m.name} in order to run correctly.`).join(`
|
|
1325
|
+
`)}),{extensions:n,extensionMap:r}}function E7(e,t){var n;const{gatheredExtensions:r,duplicateMap:o,parentExtensions:i,settings:a}=e,{extension:s,parentExtension:c}=t;let{names:f=[]}=t;_n(y7(s),{code:tn.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${s} was provided to the [[\`RemirrorManager\`]].`});const p=s.extensions;if(s.setPriority((n=a.priority)==null?void 0:n[s.name]),r.push(s),l3e({duplicateMap:o,extension:s,parentExtension:c}),p.length!==0){if(f.includes(s.name)){CNe(!1,`Circular dependency encountered when loading extensions: ${f.join(" > ")} > ${s.name}`);return}f=[...f,s.name],i.push(s);for(const m of p)E7(e,{names:f,extension:m,parentExtension:s})}}function s3e(e){const{extension:t,found:n,missing:r}=e;if(t.requiredExtensions)for(const o of t.requiredExtensions??[])n.has(o)||r.push({Constructor:o,extension:t})}function l3e(e){const{duplicateMap:t,extension:n,parentExtension:r}=e,o=n.constructor,i=t.get(o),a=r?[r]:[];t.set(o,i?[...i,...a]:a)}function c3e(e){var t,n,r,o;const{extension:i,nodeNames:a,markNames:s,plainNames:c,store:f,handlers:p}=e;i.setStore(f);const m=(t=i.onCreate)==null?void 0:t.bind(i),v=(n=i.onView)==null?void 0:n.bind(i),y=(r=i.onStateUpdate)==null?void 0:r.bind(i),w=(o=i.onDestroy)==null?void 0:o.bind(i);m&&p.create.push(m),v&&p.view.push(v),y&&p.update.push(y),w&&p.destroy.push(w),X1(i)&&s.push(i.name),Ev(i)&&i.name!=="doc"&&a.push(i.name),x7(i)&&c.push(i.name)}var mu,Dv,Os,dc,Av,ka,zd,Ov,Vd,Mv,Hd,Ms,Pv,rw=class{constructor(e,t={}){qo(this,mu,void 0),qo(this,Dv,In()),qo(this,Os,In()),qo(this,dc,void 0),qo(this,Av,void 0),qo(this,ka,na.None),qo(this,zd,void 0),qo(this,Ov,!0),qo(this,Vd,{create:[],view:[],update:[],destroy:[]}),qo(this,Mv,[]),qo(this,Hd,d1()),qo(this,Ms,void 0),qo(this,Pv,void 0),this.getState=()=>{var o;return wn(this,ka)>=na.EditorView?this.view.state:(_n(wn(this,Ms),{code:tn.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(o=wn(this,Ms))==null?void 0:o.initialEditorState)},this.updateState=o=>{const i=this.getState();this.view.updateState(o),this.onStateUpdate({previousState:i,state:o})};const{extensions:n,extensionMap:r}=a3e(e,t);si(this,zd,t),si(this,dc,Od(n)),si(this,Av,r),si(this,mu,this.createExtensionStore()),si(this,ka,na.Create),this.setupLifecycleHandlers();for(const o of wn(this,Vd).create){const i=o();i&&wn(this,Mv).push(i)}}static create(e,t={}){return new rw([...sz(e),...o3e(t.builtin)],t)}get[tc](){return oi.Manager}get destroyed(){return wn(this,ka)===na.Destroy}get mounted(){return wn(this,ka)>=na.EditorView&&wn(this,ka)<na.Destroy}get output(){var e;return(e=wn(this,Ms))==null?void 0:e.frameworkOutput}get frameworkAttached(){return!!wn(this,Ms)}get extensions(){return wn(this,dc)}get stringHandlers(){return wn(this,Dv)}get store(){return Od(wn(this,Os))}get extensionStore(){return Od(wn(this,mu))}get tr(){return this.getExtension(fr).transaction}get nodes(){return wn(this,Os).nodes}get marks(){return wn(this,Os).marks}get schema(){return wn(this,Os).schema}get extensionTags(){return wn(this,Os).tags}get view(){return wn(this,Os).view}get settings(){return wn(this,zd)}get document(){return wn(this,zd).document??j1()}setupLifecycleHandlers(){const e=wn(this,mu),t=wn(this,Vd),n=[],r=[],o=[];e.nodeNames=n,e.markNames=r,e.plainNames=o;for(const i of wn(this,dc))c3e({extension:i,nodeNames:n,markNames:r,plainNames:o,handlers:t,store:e})}setStringHandler(e,t){wn(this,Dv)[e]=t}setStoreKey(e,t){wn(this,Os)[e]=t}getStoreKey(e){const t=wn(this,Os)[e];return _n(!nc(t),{code:tn.MANAGER_PHASE_ERROR,message:"`getStoreKey` should not be called before the values are available."}),t}setExtensionStore(e,t){_n(wn(this,ka)<=na.EditorView,{code:tn.MANAGER_PHASE_ERROR,message:"`setExtensionStore` should only be called during the `onCreate` lifecycle hook. Make sure to only call it within the returned methods."}),wn(this,mu)[e]=t}createExtensionStore(){const e=In(),t=!0;let n,r;return Object.defineProperties(e,{extensions:{get:()=>wn(this,dc),enumerable:t},phase:{get:()=>wn(this,ka),enumerable:t},view:{get:()=>this.view,enumerable:t},managerSettings:{get:()=>Od(wn(this,zd)),enumerable:t},getState:{value:this.getState,enumerable:t},updateState:{value:this.updateState,enumerable:t},isMounted:{value:()=>this.mounted,enumerable:t},getExtension:{value:this.getExtension.bind(this),enumerable:t},manager:{get:()=>this,enumerable:t},document:{get:()=>this.document,enumerable:t},stringHandlers:{get:()=>wn(this,Dv),enumerable:t},currentState:{get:()=>n??(n=this.getState()),set:o=>{n=o},enumerable:t},previousState:{get:()=>r,set:o=>{r=o},enumerable:t}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(wn(this,ka)>=na.EditorView)return this;si(this,Ov,!0),si(this,ka,na.EditorView),wn(this,Os).view=e;for(const t of wn(this,Vd).view){const n=t(e);n&&wn(this,Mv).push(n)}return this}attachFramework(e,t){var n;wn(this,Ms)!==e&&(wn(this,Ms)&&(wn(this,Ms).destroy(),(n=wn(this,Pv))==null||n.call(this)),si(this,Ms,e),si(this,Pv,this.addHandler("stateUpdate",t)))}createEmptyDoc(){var e;const t=(e=this.schema.nodes.doc)==null?void 0:e.createAndFill();return _n(t,{code:tn.INVALID_CONTENT,message:"An empty node could not be created due to an invalid schema."}),t}createState(e={}){const{onError:t,defaultSelection:n="end"}=this.settings,{content:r=this.createEmptyDoc(),selection:o=n,stringHandler:i=this.settings.stringHandler}=e,{schema:a,plugins:s}=this.store,c=K9({stringHandler:Bn(i)?this.stringHandlers[i]:i,document:this.document,content:r,onError:t,schema:a,selection:o});return sf.create({schema:a,doc:c,plugins:s,selection:Sa(o,c)})}addHandler(e,t){return wn(this,Hd).on(e,t)}onStateUpdate(e){const t=wn(this,Ov);wn(this,mu).currentState=e.state,wn(this,mu).previousState=e.previousState,t&&(si(this,ka,na.Runtime),si(this,Ov,!1));const n={...e,firstUpdate:t};for(const r of wn(this,Vd).update)r(n);wn(this,Hd).emit("stateUpdate",n)}getExtension(e){const t=wn(this,Av).get(e);return _n(t,{code:tn.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){return!!wn(this,Av).get(e)}clone(){const e=wn(this,dc).map(n=>n.clone(n.options)),t=rw.create(()=>e,wn(this,zd));return wn(this,Hd).emit("clone",t),t}recreate(e=[],t={}){const n=wn(this,dc).map(o=>o.clone(o.initialOptions)),r=rw.create(()=>[...n,...e],t);return wn(this,Hd).emit("recreate",r),r}destroy(){var e,t,n,r,o,i;si(this,ka,na.Destroy);for(const a of((e=this.view)==null?void 0:e.state.plugins)??[])(n=(t=a.getState(this.view.state))==null?void 0:t.destroy)==null||n.call(t);(r=wn(this,Ms))==null||r.destroy(),(o=wn(this,Pv))==null||o.call(this);for(const a of wn(this,Mv))a();for(const a of wn(this,Vd).destroy)a();(i=this.view)==null||i.destroy(),wn(this,Hd).emit("destroy")}includes(e){const t=[],n=[];for(const r of wn(this,dc))t.push(r.name,r.constructorName),n.push(r.constructor);return e.every(r=>Bn(r)?Za(t,r):Za(n,r))}},u3e=rw;mu=new WeakMap,Dv=new WeakMap,Os=new WeakMap,dc=new WeakMap,Av=new WeakMap,ka=new WeakMap,zd=new WeakMap,Ov=new WeakMap,Vd=new WeakMap,Mv=new WeakMap,Hd=new WeakMap,Ms=new WeakMap,Pv=new WeakMap;function d3e(e,t){return!sp(e)||!lp(e,oi.Manager)?!1:t?e.includes(t):!0}var f3e=Object.defineProperty,h3e=Object.getOwnPropertyDescriptor,p3e=(e,t,n,r)=>{for(var o=r>1?void 0:r?h3e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&f3e(t,n,o),o},T7=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ln=(e,t,n)=>(T7(e,t,"read from private field"),n?n.call(e):t.get(e)),Ea=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ta=(e,t,n,r)=>(T7(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Nv,m3e=class{constructor(){this.portals=new Map,Ea(this,Nv,d1()),this.on=e=>Ln(this,Nv).on("update",e),this.once=e=>{const t=Ln(this,Nv).on("update",n=>{t(),e(n)});return t}}update(){Ln(this,Nv).emit("update",this.portals)}render({Component:e,container:t}){const n=this.portals.get(t);this.portals.set(t,{Component:e,key:n?.key??rv()}),this.update()}forceUpdate(){for(const[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:rv()})}remove(e){this.portals.delete(e),this.update()}};Nv=new WeakMap;var g3e=e=>{const{portals:t}=e;return Pt.createElement(Pt.Fragment,null,t.map(([n,{Component:r,key:o}])=>EM(Pt.createElement(r,null),n,o)))};function v3e(e){const[t,n]=Tn(()=>Array.from(e.portals.entries()));return dn(()=>e.on(r=>{n(Array.from(r.entries()))}),[e]),Ur(()=>t,[t])}var So,_v,jd,Rv,ow,Iv,gp,Lv,iw,fc,Wi,xA,D7=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:o,options:i}){Ea(this,So,void 0),Ea(this,_v,[]),Ea(this,jd,void 0),Ea(this,Rv,void 0),Ea(this,ow,void 0),Ea(this,Iv,void 0),Ea(this,gp,void 0),Ea(this,Lv,!1),Ea(this,iw,void 0),Ea(this,fc,void 0),Ea(this,Wi,void 0),Ea(this,xA,c=>{c&&(_n(Ln(this,fc),{code:tn.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${Ln(this,So).type.name}' which doesn't support content.`}),c.append(Ln(this,fc)))}),this.Component=()=>{const c=Ln(this,ow);return _n(c,{code:tn.REACT_NODE_VIEW,message:`The custom react node view provided for ${Ln(this,So).type.name} doesn't have a valid ReactComponent`}),Pt.createElement(c,{updateAttributes:this.updateAttributes,selected:this.selected,view:Ln(this,jd),getPosition:Ln(this,Iv),node:Ln(this,So),forwardRef:Ln(this,xA),decorations:Ln(this,_v)})},this.updateAttributes=c=>{if(!Ln(this,jd).editable)return;const f=Ln(this,Iv).call(this);if(f==null)return;const p=Ln(this,jd).state.tr.setNodeMarkup(f,void 0,{...Ln(this,So).attrs,...c});Ln(this,jd).dispatch(p)},_n(Br(e),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),Ta(this,So,t),Ta(this,jd,r),Ta(this,Rv,n),Ta(this,ow,o),Ta(this,Iv,e),Ta(this,gp,i),Ta(this,Wi,this.createDom());const{contentDOM:a,wrapper:s}=this.createContentDom()??{};Ta(this,iw,a??void 0),Ta(this,fc,s),Ln(this,fc)&&Ln(this,Wi).append(Ln(this,fc)),this.setDomAttributes(Ln(this,So),Ln(this,Wi)),this.Component.displayName=KB(`${Ln(this,So).type.name}NodeView`),this.renderComponent()}static create(e){const{portalContainer:t,ReactComponent:n,options:r}=e;return(o,i,a)=>new D7({options:r,node:o,view:i,getPosition:a,portalContainer:t,ReactComponent:n})}get selected(){return Ln(this,Lv)}get contentDOM(){return Ln(this,iw)}get dom(){return Ln(this,Wi)}renderComponent(){Ln(this,Rv).render({Component:this.Component,container:Ln(this,Wi)})}createDom(){const{defaultBlockNode:e,defaultInlineNode:t}=Ln(this,gp),n=Ln(this,So).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${GB(Ln(this,So).type.name)}-node-view-wrapper`),n}createContentDom(){var e,t;if(Ln(this,So).isLeaf)return;const n=(t=(e=Ln(this,So).type.spec).toDOM)==null?void 0:t.call(e,Ln(this,So));if(!n)return;const{contentDOM:r,dom:o}=$s.renderSpec(document,n);let i;if(ji(o))return i=o,o===r&&(i=document.createElement("span"),i.classList.add(`${GB(Ln(this,So).type.name)}-node-view-content-wrapper`),i.append(r)),ji(r),{wrapper:i,contentDOM:r}}update(e,t){return F1({types:Ln(this,So).type,node:e})?(Ln(this,So)===e&&Ln(this,_v)===t||(Ln(this,So).sameMarkup(e)||this.setDomAttributes(e,Ln(this,Wi)),Ta(this,So,e),Ta(this,_v,t),this.renderComponent()),!0):!1}setDomAttributes(e,t){const{toDOM:n}=Ln(this,So).type.spec;let r=e.attrs;if(n){const o=n(e);if(Bn(o)||b3e(o))return;Dd(o[1])&&(r=o[1])}for(const[o,i]of Qo(r))t.setAttribute(o,i)}selectNode(){Ta(this,Lv,!0),Ln(this,Wi)&&Ln(this,Wi).classList.add(BB),this.renderComponent()}deselectNode(){Ta(this,Lv,!1),Ln(this,Wi)&&Ln(this,Wi).classList.remove(BB),this.renderComponent()}destroy(){Ln(this,Rv).remove(Ln(this,Wi))}ignoreMutation(e){return e.type==="selection"?!Ln(this,So).type.spec.selectable:Ln(this,fc)?!Ln(this,fc).contains(e.target):!0}stopEvent(e){var t;if(!Ln(this,Wi))return!1;if(Br(Ln(this,gp).stopEvent))return Ln(this,gp).stopEvent({event:e});const n=e.target;if(!(Ln(this,Wi).contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;const o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o)return!0;const a=!!Ln(this,So).type.spec.draggable,s=zn.isSelectable(Ln(this,So)),c=e.type==="copy",f=e.type==="paste",p=e.type==="cut",m=e.type==="mousedown",v=e.type.startsWith("drag");return!a&&s&&v&&e.preventDefault(),!(v||o||c||f||p||m&&s)}},A7=D7;So=new WeakMap,_v=new WeakMap,jd=new WeakMap,Rv=new WeakMap,ow=new WeakMap,Iv=new WeakMap,gp=new WeakMap,Lv=new WeakMap,iw=new WeakMap,fc=new WeakMap,Wi=new WeakMap,xA=new WeakMap;function b3e(e){return JD(e)||Dd(e)&&JD(e.dom)}var $v=class extends Xr{constructor(){super(...arguments),this.portalContainer=new m3e}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const e=In(),t=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!Ev(r)||r.reactComponentEnvironment==="ssr"||(e[r.name]=A7.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=Qo({...this.options.nodeViewComponents,...t});for(const[r,o]of n)e[r]=A7.create({options:this.options,ReactComponent:o,portalContainer:this.portalContainer});return e}};$v=p3e([dr({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],$v);function y3e(e){const t=kf(null),n=x3e(t);return[o=>{const i=e(o);return Pt.createElement(t.Provider,{value:i},o.children)},n,t]}function x3e(e){return(t,n)=>{const r=Sf(e),o=w3e(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return r;if(typeof t!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=t(r);if(!o||!n)return i;const a=t(o);return n(a,i)?a:i}}function w3e(e){const t=Yt();return C3e(()=>{t.current=e}),t.current}var C3e=typeof document<"u"?Nl:dn;function S3e(e,t){return y3e(n=>{const r=Yt(null),o=Yt(),i=t?.(n),[a,s]=Tn(()=>e({get:O7(r),set:M7(o),previousContext:void 0,props:n,state:i})),c=[...Object.values(n),i];return dn(()=>{c.length!==0&&s(f=>e({get:O7(r),set:M7(o),previousContext:f,props:n,state:i}))},c),r.current=a,o.current=s,a})}function O7(e){return t=>{if(!e.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function M7(e){return t=>{if(!e.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(n=>({...n,...typeof t=="function"?t(n):t}))}}var P7={},N7={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])})(N7),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;const t=N7;Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function n(y){return!y.match(/[^a-f0-9]/i)?parseInt(y,16):NaN}function r(y,w,C){const k=n(y);if(Number.isNaN(k)||C!==void 0&&C!==y.length)throw new SyntaxError(t.errorMessages.get(w));return k}function o(y){const w=r(y,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(w)}function i(y,w){const C=r(y,t.ErrorType.MalformedUnicode,4);if(w!==void 0){const k=r(w,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(C,k)}return String.fromCharCode(C)}function a(y){return y.charAt(0)==="{"&&y.charAt(y.length-1)==="}"}function s(y){if(!a(y))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));const w=y.slice(1,-1),C=r(w,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(C)}catch(k){throw k instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):k}}function c(y,w=!1){if(w)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));const C=parseInt(y,8);return String.fromCharCode(C)}const f=new Map([["b","\b"],["f","\f"],["n",`
|
|
1326
1326
|
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function p(y){return f.get(y)||y}const m=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function v(y,w=!1){return y.replace(m,function(C,k,T,E,_,R,P,$,z){if(k!==void 0)return"\\";if(T!==void 0)return o(T);if(E!==void 0)return s(E);if(_!==void 0)return i(_,R);if(P!==void 0)return i(P);if($==="0")return"\0";if($!==void 0)return c($,!w);if(z!==void 0)return p(z);throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=v,e.default=v}(P7);var Fv={},_7={},R7={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.moo=n()})(bo,function(){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=typeof new RegExp().sticky=="boolean";function o(K){return K&&n.call(K)==="[object RegExp]"}function i(K){return K&&typeof K=="object"&&!o(K)&&!Array.isArray(K)}function a(K){return K.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(K){var ee=new RegExp("|"+K);return ee.exec("").length-1}function c(K){return"("+K+")"}function f(K){if(!K.length)return"(?!)";var ee=K.map(function(re){return"(?:"+re+")"}).join("|");return"(?:"+ee+")"}function p(K){if(typeof K=="string")return"(?:"+a(K)+")";if(o(K)){if(K.ignoreCase)throw new Error("RegExp /i flag not allowed");if(K.global)throw new Error("RegExp /g flag is implied");if(K.sticky)throw new Error("RegExp /y flag is implied");if(K.multiline)throw new Error("RegExp /m flag is implied");return K.source}else throw new Error("Not a pattern: "+K)}function m(K,ee){return K.length>ee?K:Array(ee-K.length+1).join(" ")+K}function v(K,ee){for(var re=K.length,ne=0;;){var oe=K.lastIndexOf(`
|
|
1327
1327
|
`,re-1);if(oe===-1||(ne++,re=oe,ne===ee)||re===0)break}var fe=ne<ee?0:re+1;return K.substring(fe).split(`
|
|
1328
1328
|
`)}function y(K){for(var ee=Object.getOwnPropertyNames(K),re=[],ne=0;ne<ee.length;ne++){var oe=ee[ne],fe=K[oe],se=[].concat(fe);if(oe==="include"){for(var ue=0;ue<se.length;ue++)re.push({include:se[ue]});continue}var le=[];se.forEach(function(ce){i(ce)?(le.length&&re.push(C(oe,le)),re.push(C(oe,ce)),le=[]):le.push(ce)}),le.length&&re.push(C(oe,le))}return re}function w(K){for(var ee=[],re=0;re<K.length;re++){var ne=K[re];if(ne.include){for(var oe=[].concat(ne.include),fe=0;fe<oe.length;fe++)ee.push({include:oe[fe]});continue}if(!ne.type)throw new Error("Rule has no type: "+JSON.stringify(ne));ee.push(C(ne.type,ne))}return ee}function C(K,ee){if(i(ee)||(ee={match:ee}),ee.include)throw new Error("Matching rules cannot also include states");var re={defaultType:K,lineBreaks:!!ee.error||!!ee.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var ne in ee)t.call(ee,ne)&&(re[ne]=ee[ne]);if(typeof re.type=="string"&&K!==re.type)throw new Error("Type transform cannot be a string (type '"+re.type+"' for token '"+K+"')");var oe=re.match;return re.match=Array.isArray(oe)?oe:oe?[oe]:[],re.match.sort(function(fe,se){return o(fe)&&o(se)?0:o(se)?-1:o(fe)?1:se.length-fe.length}),re}function k(K){return Array.isArray(K)?w(K):y(K)}var T=C("error",{lineBreaks:!0,shouldThrow:!0});function E(K,ee){for(var re=null,ne=Object.create(null),oe=!0,fe=null,se=[],ue=[],le=0;le<K.length;le++)K[le].fallback&&(oe=!1);for(var le=0;le<K.length;le++){var ce=K[le];if(ce.include)throw new Error("Inheritance is not allowed in stateless lexers");if(ce.error||ce.fallback){if(re)throw!ce.fallback==!re.fallback?new Error("Multiple "+(ce.fallback?"fallback":"error")+" rules not allowed (for token '"+ce.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+ce.defaultType+"')");re=ce}var Se=ce.match.slice();if(oe)for(;Se.length&&typeof Se[0]=="string"&&Se[0].length===1;){var Me=Se.shift();ne[Me.charCodeAt(0)]=ce}if(ce.pop||ce.push||ce.next){if(!ee)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+ce.defaultType+"')");if(ce.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+ce.defaultType+"')")}if(Se.length!==0){oe=!1,se.push(ce);for(var ze=0;ze<Se.length;ze++){var ke=Se[ze];if(o(ke)){if(fe===null)fe=ke.unicode;else if(fe!==ke.unicode&&ce.fallback===!1)throw new Error("If one rule is /u then all must be")}}var pe=f(Se.map(p)),Oe=new RegExp(pe);if(Oe.test(""))throw new Error("RegExp matches empty string: "+Oe);var Ae=s(pe);if(Ae>0)throw new Error("RegExp has capture groups: "+Oe+`
|
|
@@ -1330,19 +1330,19 @@ Use (?: \u2026 ) instead`);if(!ce.lineBreaks&&Oe.test(`
|
|
|
1330
1330
|
`))throw new Error("Rule should declare lineBreaks: "+Oe);ue.push(c(pe))}}var Pe=re&&re.fallback,Ve=r&&!Pe?"ym":"gm",Le=r||Pe?"":"|";fe===!0&&(Ve+="u");var Ne=new RegExp(f(ue)+Le,Ve);return{regexp:Ne,groups:se,fast:ne,error:re||T}}function _(K){var ee=E(k(K));return new z({start:ee},"start")}function R(K,ee,re){var ne=K&&(K.push||K.next);if(ne&&!re[ne])throw new Error("Missing state '"+ne+"' (in token '"+K.defaultType+"' of state '"+ee+"')");if(K&&K.pop&&+K.pop!=1)throw new Error("pop must be 1 (in token '"+K.defaultType+"' of state '"+ee+"')")}function P(K,ee){var re=K.$all?k(K.$all):[];delete K.$all;var ne=Object.getOwnPropertyNames(K);ee||(ee=ne[0]);for(var oe=Object.create(null),fe=0;fe<ne.length;fe++){var se=ne[fe];oe[se]=k(K[se]).concat(re)}for(var fe=0;fe<ne.length;fe++)for(var se=ne[fe],ue=oe[se],le=Object.create(null),ce=0;ce<ue.length;ce++){var Se=ue[ce];if(Se.include){var Me=[ce,1];if(Se.include!==se&&!le[Se.include]){le[Se.include]=!0;var ze=oe[Se.include];if(!ze)throw new Error("Cannot include nonexistent state '"+Se.include+"' (in state '"+se+"')");for(var ke=0;ke<ze.length;ke++){var pe=ze[ke];ue.indexOf(pe)===-1&&Me.push(pe)}}ue.splice.apply(ue,Me),ce--}}for(var Oe=Object.create(null),fe=0;fe<ne.length;fe++){var se=ne[fe];Oe[se]=E(oe[se],!0)}for(var fe=0;fe<ne.length;fe++){for(var Ae=ne[fe],Pe=Oe[Ae],Ve=Pe.groups,ce=0;ce<Ve.length;ce++)R(Ve[ce],Ae,Oe);for(var Le=Object.getOwnPropertyNames(Pe.fast),ce=0;ce<Le.length;ce++)R(Pe.fast[Le[ce]],Ae,Oe)}return new z(Oe,ee)}function $(K){for(var ee=typeof Map<"u",re=ee?new Map:Object.create(null),ne=Object.getOwnPropertyNames(K),oe=0;oe<ne.length;oe++){var fe=ne[oe],se=K[fe],ue=Array.isArray(se)?se:[se];ue.forEach(function(le){if(typeof le!="string")throw new Error("keyword must be string (in keyword '"+fe+"')");ee?re.set(le,fe):re[le]=fe})}return function(le){return ee?re.get(le):re[le]}}var z=function(K,ee){this.startState=ee,this.states=K,this.buffer="",this.stack=[],this.reset()};z.prototype.reset=function(K,ee){return this.buffer=K||"",this.index=0,this.line=ee?ee.line:1,this.col=ee?ee.col:1,this.queuedToken=ee?ee.queuedToken:null,this.queuedText=ee?ee.queuedText:"",this.queuedThrow=ee?ee.queuedThrow:null,this.setState(ee?ee.state:this.startState),this.stack=ee&&ee.stack?ee.stack.slice():[],this},z.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},z.prototype.setState=function(K){if(!(!K||this.state===K)){this.state=K;var ee=this.states[K];this.groups=ee.groups,this.error=ee.error,this.re=ee.regexp,this.fast=ee.fast}},z.prototype.popState=function(){this.setState(this.stack.pop())},z.prototype.pushState=function(K){this.stack.push(this.state),this.setState(K)};var q=r?function(K,ee){return K.exec(ee)}:function(K,ee){var re=K.exec(ee);return re[0].length===0?null:re};z.prototype._getGroup=function(K){for(var ee=this.groups.length,re=0;re<ee;re++)if(K[re+1]!==void 0)return this.groups[re];throw new Error("Cannot find token type for matched text")};function Y(){return this.value}if(z.prototype.next=function(){var K=this.index;if(this.queuedGroup){var ee=this._token(this.queuedGroup,this.queuedText,K);return this.queuedGroup=null,this.queuedText="",ee}var re=this.buffer;if(K!==re.length){var se=this.fast[re.charCodeAt(K)];if(se)return this._token(se,re.charAt(K),K);var ne=this.re;ne.lastIndex=K;var oe=q(ne,re),fe=this.error;if(oe==null)return this._token(fe,re.slice(K,re.length),K);var se=this._getGroup(oe),ue=oe[0];return fe.fallback&&oe.index!==K?(this.queuedGroup=se,this.queuedText=ue,this._token(fe,re.slice(K,oe.index),K)):this._token(se,ue,K)}},z.prototype._token=function(K,ee,re){var ne=0;if(K.lineBreaks){var oe=/\n/g,fe=1;if(ee===`
|
|
1331
1331
|
`)ne=1;else for(;oe.exec(ee);)ne++,fe=oe.lastIndex}var se={type:typeof K.type=="function"&&K.type(ee)||K.defaultType,value:typeof K.value=="function"?K.value(ee):ee,text:ee,toString:Y,offset:re,lineBreaks:ne,line:this.line,col:this.col},ue=ee.length;if(this.index+=ue,this.line+=ne,ne!==0?this.col=ue-fe+1:this.col+=ue,K.shouldThrow){var le=new Error(this.formatError(se,"invalid syntax"));throw le}return K.pop?this.popState():K.push?this.pushState(K.push):K.next&&this.setState(K.next),se},typeof Symbol<"u"&&Symbol.iterator){var J=function(K){this.lexer=K};J.prototype.next=function(){var K=this.lexer.next();return{value:K,done:!K}},J.prototype[Symbol.iterator]=function(){return this},z.prototype[Symbol.iterator]=function(){return new J(this)}}return z.prototype.formatError=function(K,ee){if(K==null)var re=this.buffer.slice(this.index),K={text:re,offset:this.index,lineBreaks:re.indexOf(`
|
|
1332
1332
|
`)===-1?0:1,line:this.line,col:this.col};var ne=2,oe=Math.max(K.line-ne,1),fe=K.line+ne,se=String(fe).length,ue=v(this.buffer,this.line-K.line+ne+1).slice(0,5),le=[];le.push(ee+" at line "+K.line+" col "+K.col+":"),le.push("");for(var ce=0;ce<ue.length;ce++){var Se=ue[ce],Me=oe+ce;le.push(m(String(Me),se)+" "+Se),Me===K.line&&le.push(m("",se+K.col+1)+"^")}return le.join(`
|
|
1333
|
-
`)},z.prototype.clone=function(){return new z(this.states,this.state)},z.prototype.has=function(K){return!0},{compile:_,states:P,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:$}})})(R7);var
|
|
1333
|
+
`)},z.prototype.clone=function(){return new z(this.states,this.state)},z.prototype.has=function(K){return!0},{compile:_,states:P,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:$}})})(R7);var k3e=R7.exports;(function(e){var t=bo&&bo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.lexer=e.states=void 0;const n=t(k3e);e.states={body:{doubleapos:{match:"''",value:()=>"'"},quoted:{lineBreaks:!0,match:/'[{}#](?:[^]*?[^'])?'(?!')/u,value:r=>r.slice(1,-1).replace(/''/g,"'")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:r=>r.substring(1).trim()},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:r=>r.split(",")[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:r=>r.split(",")[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:r=>r.substring(1).trim()},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:r=>r.split(":")[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:r=>r.substring(0,r.indexOf("{")).trim()},end:{match:/\s*\}/u,pop:1}}},e.lexer=n.default.states(e.states)})(_7),Object.defineProperty(Fv,"__esModule",{value:!0});var I7=Fv.parse=Fv.ParseError=void 0;const L7=_7,aw=e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),wA=e=>e==="plural"||e==="select"||e==="selectordinal";function E3e(e,t){let n="",r="";for(const i of t){const a=i.ctx.text;switch(r+=a,i.type){case"content":n+=i.value;break;case"argument":case"function":case"octothorpe":n+=a;break;default:throw new li(e,`Unsupported part in strict mode function arg style: ${a}`)}}return[{type:"content",value:n.trim(),ctx:Object.assign({},t[0].ctx,{text:r})}]}const T3e=["number","date","time","spellout","ordinal","duration"],$7=["zero","one","two","few","many","other"];class li extends Error{constructor(t,n){super(L7.lexer.formatError(t,n))}}Fv.ParseError=li;class D3e{constructor(t,n){var r,o,i,a;this.lexer=L7.lexer.reset(t),this.cardinalKeys=(r=n?.cardinal)!==null&&r!==void 0?r:$7,this.ordinalKeys=(o=n?.ordinal)!==null&&o!==void 0?o:$7,this.strict=(i=n?.strict)!==null&&i!==void 0?i:!1,this.strictPluralKeys=(a=n?.strictPluralKeys)!==null&&a!==void 0?a:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(t,n,r){if(r[0]==="="){if(n==="select")throw new li(t,`The case ${r} is not valid with select`)}else if(n!=="select"){const o=n==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&o.length>0&&!o.includes(r)){const i=`The ${n} case ${r} is not valid in this locale`;throw new li(t,i)}}}parseSelect({value:t},n,r,o){const i={type:o,arg:t,cases:[],ctx:r};o==="plural"||o==="selectordinal"?n=!0:this.strict&&(n=!1);for(const a of this.lexer)switch(a.type){case"offset":if(o==="select")throw new li(a,"Unexpected plural offset for select");if(i.cases.length>0)throw new li(a,"Plural offset must be set before cases");i.pluralOffset=Number(a.value),r.text+=a.text,r.lineBreaks+=a.lineBreaks;break;case"case":{this.checkSelectKey(a,o,a.value),i.cases.push({key:a.value,tokens:this.parseBody(n),ctx:aw(a)});break}case"end":return i;default:throw new li(a,`Unexpected lexer token: ${a.type}`)}throw new li(null,"Unexpected message end")}parseArgToken(t,n){const r=aw(t),o=this.lexer.next();if(!o)throw new li(null,"Unexpected message end");if(r.text+=o.text,r.lineBreaks+=o.lineBreaks,this.strict&&(o.type==="func-simple"||o.type==="func-args")&&!T3e.includes(o.value)){const i=`Invalid strict mode function arg type: ${o.value}`;throw new li(t,i)}switch(o.type){case"end":return{type:"argument",arg:t.value,ctx:r};case"func-simple":{const i=this.lexer.next();if(!i)throw new li(null,"Unexpected message end");if(i.type!=="end")throw new li(i,`Unexpected lexer token: ${i.type}`);if(r.text+=i.text,wA(o.value.toLowerCase()))throw new li(o,`Invalid type identifier: ${o.value}`);return{type:"function",arg:t.value,key:o.value,ctx:r}}case"func-args":{if(wA(o.value.toLowerCase())){const a=`Invalid type identifier: ${o.value}`;throw new li(o,a)}let i=this.parseBody(this.strict?!1:n);return this.strict&&i.length>0&&(i=E3e(t,i)),{type:"function",arg:t.value,key:o.value,param:i,ctx:r}}case"select":if(wA(o.value))return this.parseSelect(t,n,r,o.value);throw new li(o,`Unexpected select type ${o.value}`);default:throw new li(o,`Unexpected lexer token: ${o.type}`)}}parseBody(t,n){const r=[];let o=null;for(const i of this.lexer)if(i.type==="argument")o&&(o=null),r.push(this.parseArgToken(i,t));else if(i.type==="octothorpe"&&t)o&&(o=null),r.push({type:"octothorpe",ctx:aw(i)});else{if(i.type==="end"&&!n)return r;{let a=i.value;if(!t&&i.type==="quoted"&&a[0]==="#"){if(a.includes("{")){const s=`Unsupported escape pattern: ${a}`;throw new li(i,s)}a=i.text}o?(o.value+=a,o.ctx.text+=i.text,o.ctx.lineBreaks+=i.lineBreaks):(o={type:"content",value:a,ctx:aw(i)},r.push(o))}}if(n)return r;throw new li(null,"Unexpected message end")}}function A3e(e,t={}){return new D3e(e,t).parse()}I7=Fv.parse=A3e;function F7(e,t){return e.filter(n=>n.type!=="content").length?e.map(n=>{if(n.type==="content")return t(n.value);if(n.type==="octothorpe")return"#";if(n.type==="argument")return[n.arg];if(n.type==="function"){const i=n?.param?.[0];return i?[n.arg,n.key,i.value.trim()]:[n.arg,n.key]}const r=n.pluralOffset,o={};return n.cases.forEach(i=>{o[i.key.replace(/^=(.)+/,"$1")]=F7(i.tokens,t)}),[n.arg,n.type,{offset:r,...o}]}):e.map(n=>t(n.value)).join("")}function O3e(e,t=n=>n){try{return F7(I7(e),t)}catch(n){return console.error(`${n.message}
|
|
1334
1334
|
|
|
1335
|
-
Message: ${e}`),e}}const gu=e=>typeof e=="string",A3e=e=>typeof e=="function",B7=new Map,z7="en";function CA(e){return[...Array.isArray(e)?e:[e],z7]}function V7(e,t,n){const r=CA(e);return sw(()=>lw("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(gu(t)?new Date(t):t)}function SA(e,t,n){const r=CA(e);return sw(()=>lw("number",r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function H7(e,t,n,{offset:r=0,...o}){const i=CA(e),a=t?sw(()=>lw("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):sw(()=>lw("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[a.select(n-r)]??o.other}function sw(e,t){const n=e();let r=B7.get(n);return r||(r=t(),B7.set(n,r)),r}function lw(e,t,n){const r=t.join("-");return`${e}-${r}-${JSON.stringify(n)}`}const j7=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,W7="%__lingui_octothorpe__%",O3e=(e,t,n={})=>{const r=t||e,o=a=>typeof a=="object"?a:n[a]||{style:a},i=(a,s)=>{const c=Object.keys(n).length?o("number"):void 0,f=SA(r,a,c);return s.replace(new RegExp(W7,"g"),f)};return{plural:(a,s)=>{const{offset:c=0}=s,f=H7(r,!1,a,s);return i(a-c,f)},selectordinal:(a,s)=>{const{offset:c=0}=s,f=H7(r,!0,a,s);return i(a-c,f)},select:M3e,number:(a,s)=>SA(r,a,o(s)),date:(a,s)=>V7(r,a,o(s))}},M3e=(e,t)=>t[e]??t.other;function P3e(e,t,n){return(r={},o)=>{const i=O3e(t,n,o),a=c=>Array.isArray(c)?c.reduce((f,p)=>{if(p==="#")return f+W7;if(gu(p))return f+p;const[m,v,y]=p;let w={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(y).forEach(([k,T])=>{w[k]=a(T)}):w=y;let C;if(v){const k=i[v];C=k(r[m],w)}else C=r[m];return C==null?f:f+C},""):c,s=a(e);return gu(s)&&j7.test(s)?P7.unraw(s.trim()):gu(s)?s.trim():s?String(s):""}}var N3e=Object.defineProperty,_3e=(e,t,n)=>t in e?N3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R3e=(e,t,n)=>(_3e(e,typeof t!="symbol"?t+"":t,n),n);class I3e{constructor(){R3e(this,"_events",{})}on(t,n){var r;return(r=this._events)[t]??(r[t]=[]),this._events[t].push(n),()=>this.removeListener(t,n)}removeListener(t,n){const r=this._getListeners(t);if(!r)return;const o=r.indexOf(n);~o&&r.splice(o,1)}emit(t,...n){const r=this._getListeners(t);r&&r.map(o=>o.apply(this,n))}_getListeners(t){const n=this._events[t];return Array.isArray(n)?n:!1}}var L3e=Object.defineProperty,$3e=(e,t,n)=>t in e?L3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vp=(e,t,n)=>($3e(e,typeof t!="symbol"?t+"":t,n),n);class F3e extends I3e{constructor(t){super(),vp(this,"_locale",""),vp(this,"_locales"),vp(this,"_localeData",{}),vp(this,"_messages",{}),vp(this,"_missing"),vp(this,"t",this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(typeof t.locale=="string"||t.locales)&&this.activate(t.locale??z7,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,n){const r=this._localeData[t];r?Object.assign(r,n):this._localeData[t]=n}loadLocaleData(t,n){n!=null?this._loadLocaleData(t,n):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,n){const r=this._messages[t];r?Object.assign(r,n):this._messages[t]=n}load(t,n){typeof t=="string"&&typeof n=="object"?this._load(t,n):Object.entries(t).forEach(([r,o])=>this._load(r,o)),this.emit("change")}loadAndActivate({locale:t,locales:n,messages:r}){this._locale=t,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,n){process.env.NODE_ENV!=="production"&&(this._messages[t]||console.warn(`Messages for locale "${t}" not loaded.`)),this._locale=t,this._locales=n,this.emit("change")}_(t,n,r){let o=r?.message;gu(t)||(n=t.values||n,o=t.message,t=t.id);const i=this.messages[t],a=i===void 0,s=this._missing;if(s&&a)return A3e(s)?s(this._locale,t):s;a&&this.emit("missing",{id:t,locale:this._locale});let c=i||o||t;return process.env.NODE_ENV!=="production"&&(c=gu(c)?D3e(c):c),gu(c)&&j7.test(c)?JSON.parse(`"${c}"`):gu(c)?c:P3e(c,this._locale,this._locales)(n,r?.formats)}date(t,n){return V7(this._locales||this._locale,t,n)}number(t,n){return SA(this._locales||this._locale,t,n)}}function B3e(e={}){return new F3e(e)}const cw=B3e();function fn(e,t){return t?"other":e==1?"one":"other"}function hc(e,t){return t?"other":e==0||e==1?"one":"other"}function sa(e,t){var n=String(e).split("."),r=!n[1];return t?"other":e==1&&r?"one":"other"}function zr(e,t){return"other"}function vu(e,t){return t?"other":e==1?"one":e==2?"two":"other"}const z3e=zr,V3e=fn,H3e=hc;function j3e(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const W3e=fn;function Y3e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function U3e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function q3e(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const K3e=fn,G3e=sa;function X3e(e,t){var n=String(e).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),a=r.slice(-3);return t?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||a==100||a==200||a==300||a==400||a==500||a==600||a==700||a==800||a==900?"few":r==0||o==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"}function Z3e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const J3e=fn,Q3e=fn,e_e=fn,t_e=hc,n_e=zr;function r_e(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const o_e=zr;function i_e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":e!=0&&r&&a==0?"many":"other"}const a_e=fn;function s_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}function l_e(e,t){var n=String(e).split("."),r=!n[1];return t?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&r?"one":"other"}const c_e=fn;function u_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=o.slice(-1);return t?"other":i&&(r==1||r==2||r==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"}const d_e=fn,f_e=fn,h_e=fn;function p_e(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":e==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function m_e(e,t){return t?e==0||e==7||e==8||e==9?"zero":e==1?"one":e==2?"two":e==3||e==4?"few":e==5||e==6?"many":"other":e==0?"zero":e==1?"one":e==2?"two":e==3?"few":e==6?"many":"other"}function g_e(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e;return t?"other":e==1||!o&&(r==0||r==1)?"one":"other"}const v_e=sa;function b_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-2),s=o.slice(-2);return t?"other":i&&a==1||s==1?"one":i&&a==2||s==2?"two":i&&(a==3||a==4)||s==3||s==4?"few":"other"}const y_e=fn,x_e=zr,w_e=fn,C_e=fn;function S_e(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),a=o&&n[0].slice(-2);return t?i==1&&a!=11?"one":i==2&&a!=12?"two":i==3&&a!=13?"few":"other":e==1&&r?"one":"other"}const k_e=fn,E_e=fn,T_e=sa,D_e=fn;function A_e(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function O_e(e,t){return t?"other":e>=0&&e<2?"one":"other"}const M_e=sa;function P_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=o.slice(-1);return t?e==1?"one":"other":i&&(r==1||r==2||r==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"}const N_e=fn;function __e(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const R_e=fn,I_e=sa;function L_e(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1?"one":"other":e==1?"one":e==2?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"}function $_e(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1||e==11?"one":e==2||e==12?"two":e==3||e==13?"few":"other":e==1||e==11?"one":e==2||e==12?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"}const F_e=sa,B_e=fn;function z_e(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const V_e=hc;function H_e(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),a=r.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(a==0||a==20||a==40||a==60||a==80)?"few":o?"other":"many"}const j_e=fn,W_e=fn;function Y_e(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1);return t?"other":e==1&&o?"one":r==2&&o?"two":o&&(e<0||e>10)&&i&&a==0?"many":"other"}function U_e(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}function q_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}function K_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-2),s=o.slice(-2);return t?"other":i&&a==1||s==1?"one":i&&a==2||s==2?"two":i&&(a==3||a==4)||s==3||s==4?"few":"other"}function G_e(e,t){return t?e==1||e==5?"one":"other":e==1?"one":"other"}function X_e(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const Z_e=sa,J_e=zr,Q_e=zr,eRe=zr,tRe=sa;function nRe(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e,i=r.slice(-1),a=r.slice(-2);return t?"other":o&&i==1&&a!=11||!o?"one":"other"}function rRe(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}const oRe=vu;function iRe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1);return t?"other":e==1&&o?"one":r==2&&o?"two":o&&(e<0||e>10)&&i&&a==0?"many":"other"}const aRe=zr,sRe=zr,lRe=fn,cRe=sa,uRe=fn,dRe=zr,fRe=zr;function hRe(e,t){var n=String(e).split("."),r=n[0],o=r.slice(-2);return t?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":e==1?"one":"other"}function pRe(e,t){return t?"other":e>=0&&e<2?"one":"other"}const mRe=fn,gRe=fn,vRe=zr,bRe=zr;function yRe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?o==6||o==9||r&&o==0&&e!=0?"many":"other":e==1?"one":"other"}const xRe=fn,wRe=fn,CRe=zr;function SRe(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const kRe=zr,ERe=fn,TRe=fn;function DRe(e,t){return t?"other":e==0?"zero":e==1?"one":"other"}const ARe=fn;function ORe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":e==5||o==5?"many":"other":e==0?"zero":e==1?"one":o==2||o==22||o==42||o==62||o==82||r&&i==0&&(a>=1e3&&a<=2e4||a==4e4||a==6e4||a==8e4)||e!=0&&s==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":e!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const MRe=fn;function PRe(e,t){var n=String(e).split("."),r=n[0];return t?"other":e==0?"zero":(r==0||r==1)&&e!=0?"one":"other"}const NRe=fn,_Re=fn,RRe=zr,IRe=hc;function LRe(e,t){return t&&e==1?"one":"other"}function $Re(e,t){var n=String(e).split("."),r=n[1]||"",o=Number(n[0])==e,i=o&&n[0].slice(-1),a=o&&n[0].slice(-2);return t?"other":i==1&&(a<11||a>19)?"one":i>=2&&i<=9&&(a<11||a>19)?"few":r!=0?"many":"other"}function FRe(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,a=i&&n[0].slice(-1),s=i&&n[0].slice(-2),c=r.slice(-2),f=r.slice(-1);return t?"other":i&&a==0||s>=11&&s<=19||o==2&&c>=11&&c<=19?"zero":a==1&&s!=11||o==2&&f==1&&c!=11||o!=2&&f==1?"one":"other"}const BRe=fn,zRe=hc,VRe=fn;function HRe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?a==1&&s!=11?"one":a==2&&s!=12?"two":(a==7||a==8)&&s!=17&&s!=18?"many":"other":i&&a==1&&s!=11||c==1&&f!=11?"one":"other"}const jRe=fn,WRe=fn;function YRe(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-2);return t?e==1?"one":"other":e==1&&r?"one":!r||e==0||i>=2&&i<=19?"few":"other"}function URe(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other"}function qRe(e,t){return t&&e==1?"one":"other"}function KRe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==1?"one":e==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const GRe=zr,XRe=fn,ZRe=vu,JRe=fn,QRe=fn;function eIe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":e==1?"one":"other"}const tIe=sa,nIe=fn,rIe=fn,oIe=fn,iIe=zr,aIe=fn,sIe=hc,lIe=fn,cIe=fn,uIe=fn;function dIe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1||e==5||r&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"}const fIe=fn,hIe=zr,pIe=hc,mIe=fn;function gIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),a=r.slice(-2);return t?"other":e==1&&o?"one":o&&i>=2&&i<=4&&(a<12||a>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&a>=12&&a<=14?"many":"other"}function vIe(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,a=i&&n[0].slice(-1),s=i&&n[0].slice(-2),c=r.slice(-2),f=r.slice(-1);return t?"other":i&&a==0||s>=11&&s<=19||o==2&&c>=11&&c<=19?"zero":a==1&&s!=11||o==2&&f==1&&c!=11||o!=2&&f==1?"one":"other"}const bIe=fn;function yIe(e,t){var n=String(e).split("."),r=n[0];return t?"other":r==0||r==1?"one":"other"}const xIe=sa,wIe=fn;function CIe(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-2);return t?e==1?"one":"other":e==1&&r?"one":!r||e==0||i>=2&&i<=19?"few":"other"}const SIe=fn,kIe=zr;function EIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),a=r.slice(-2);return t?"other":o&&i==1&&a!=11?"one":o&&i>=2&&i<=4&&(a<12||a>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&a>=11&&a<=14?"many":"other"}const TIe=fn,DIe=zr,AIe=fn;function OIe(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}function MIe(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}const PIe=fn,NIe=fn,_Ie=vu,RIe=fn,IIe=zr,LIe=zr;function $Ie(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}function FIe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"}function BIe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"";return t?"other":e==0||e==1||r==0&&o==1?"one":"other"}function zIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":e==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function VIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const HIe=vu,jIe=vu,WIe=vu,YIe=vu,UIe=vu,qIe=fn,KIe=fn;function GIe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?e==1?"one":o==4&&i!=14?"many":"other":e==1?"one":"other"}function XIe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}const ZIe=fn,JIe=fn,QIe=fn,eLe=zr;function tLe(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),a=o&&n[0].slice(-2);return t?(i==1||i==2)&&a!=11&&a!=12?"one":"other":e==1&&r?"one":"other"}const nLe=sa,rLe=fn,oLe=fn,iLe=fn,aLe=fn,sLe=zr,lLe=hc,cLe=fn;function uLe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?o==6||o==9||e==10?"few":"other":e==1?"one":"other"}function dLe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=o.slice(-1);return t?e==1?"one":"other":i&&(r==1||r==2||r==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"}const fLe=fn,hLe=zr,pLe=fn,mLe=fn;function gLe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e==0||e==1||r&&e>=11&&e<=99?"one":"other"}const vLe=fn;function bLe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),s=i&&n[0].slice(-2),c=r.slice(-1),f=r.slice(-2);return t?a==3&&s!=13?"few":"other":o&&c==1&&f!=11?"one":o&&c>=2&&c<=4&&(f<12||f>14)?"few":o&&c==0||o&&c>=5&&c<=9||o&&f>=11&&f<=14?"many":"other"}const yLe=sa,xLe=fn,wLe=fn;function CLe(e,t){return t&&e==1?"one":"other"}const SLe=fn,kLe=fn,ELe=hc,TLe=fn,DLe=zr,ALe=fn,OLe=fn,MLe=sa,PLe=zr,NLe=zr,_Le=zr;function RLe(e,t){return t?"other":e>=0&&e<=1?"one":"other"}var ILe=Object.freeze({__proto__:null,_in:z3e,af:V3e,ak:H3e,am:j3e,an:W3e,ar:Y3e,ars:U3e,as:q3e,asa:K3e,ast:G3e,az:X3e,be:Z3e,bem:J3e,bez:Q3e,bg:e_e,bho:t_e,bm:n_e,bn:r_e,bo:o_e,br:i_e,brx:a_e,bs:s_e,ca:l_e,ce:c_e,ceb:u_e,cgg:d_e,chr:f_e,ckb:h_e,cs:p_e,cy:m_e,da:g_e,de:v_e,dsb:b_e,dv:y_e,dz:x_e,ee:w_e,el:C_e,en:S_e,eo:k_e,es:E_e,et:T_e,eu:D_e,fa:A_e,ff:O_e,fi:M_e,fil:P_e,fo:N_e,fr:__e,fur:R_e,fy:I_e,ga:L_e,gd:$_e,gl:F_e,gsw:B_e,gu:z_e,guw:V_e,gv:H_e,ha:j_e,haw:W_e,he:Y_e,hi:U_e,hr:q_e,hsb:K_e,hu:G_e,hy:X_e,ia:Z_e,id:J_e,ig:Q_e,ii:eRe,io:tRe,is:nRe,it:rRe,iu:oRe,iw:iRe,ja:aRe,jbo:sRe,jgo:lRe,ji:cRe,jmc:uRe,jv:dRe,jw:fRe,ka:hRe,kab:pRe,kaj:mRe,kcg:gRe,kde:vRe,kea:bRe,kk:yRe,kkj:xRe,kl:wRe,km:CRe,kn:SRe,ko:kRe,ks:ERe,ksb:TRe,ksh:DRe,ku:ARe,kw:ORe,ky:MRe,lag:PRe,lb:NRe,lg:_Re,lkt:RRe,ln:IRe,lo:LRe,lt:$Re,lv:FRe,mas:BRe,mg:zRe,mgo:VRe,mk:HRe,ml:jRe,mn:WRe,mo:YRe,mr:URe,ms:qRe,mt:KRe,my:GRe,nah:XRe,naq:ZRe,nb:JRe,nd:QRe,ne:eIe,nl:tIe,nn:nIe,nnh:rIe,no:oIe,nqo:iIe,nr:aIe,nso:sIe,ny:lIe,nyn:cIe,om:uIe,or:dIe,os:fIe,osa:hIe,pa:pIe,pap:mIe,pl:gIe,prg:vIe,ps:bIe,pt:yIe,pt_PT:xIe,rm:wIe,ro:CIe,rof:SIe,root:kIe,ru:EIe,rwk:TIe,sah:DIe,saq:AIe,sc:OIe,scn:MIe,sd:PIe,sdh:NIe,se:_Ie,seh:RIe,ses:IIe,sg:LIe,sh:$Ie,shi:FIe,si:BIe,sk:zIe,sl:VIe,sma:HIe,smi:jIe,smj:WIe,smn:YIe,sms:UIe,sn:qIe,so:KIe,sq:GIe,sr:XIe,ss:ZIe,ssy:JIe,st:QIe,su:eLe,sv:tLe,sw:nLe,syr:rLe,ta:oLe,te:iLe,teo:aLe,th:sLe,ti:lLe,tig:cLe,tk:uLe,tl:dLe,tn:fLe,to:hLe,tr:pLe,ts:mLe,tzm:gLe,ug:vLe,uk:bLe,ur:yLe,uz:xLe,ve:wLe,vi:CLe,vo:SLe,vun:kLe,wa:ELe,wae:TLe,wo:DLe,xh:ALe,xog:OLe,yi:MLe,yo:PLe,yue:NLe,zh:_Le,zu:RLe}),LLe=Object.defineProperty,$Le=Object.getOwnPropertyDescriptor,FLe=Object.getOwnPropertyNames,BLe=Object.prototype.hasOwnProperty,Y7=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of FLe(t))!BLe.call(e,o)&&o!==n&&LLe(e,o,{get:()=>t[o],enumerable:!(r=$Le(t,o))||r.enumerable});return e},zLe=(e,t,n)=>(Y7(e,t,"default"),n&&Y7(n,t,"default")),VLe=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),U7={};zLe(U7,ILe),cw.loadLocaleData("en",{plurals:U7.en}),cw.load("en",VLe),cw.activate("en");var HLe=Object.defineProperty,jLe=Object.getOwnPropertyDescriptor,kA=(e,t,n,r)=>{for(var o=r>1?void 0:r?jLe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&HLe(t,n,o),o},bp=class extends aa{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:n,content:r}=this.options,o=In();if(Dd(n))for(const[i,a]of Qo(n))o[i]={default:a};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...t}}setDocAttributes(e){return({tr:t,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(e))t.step(new Bv(r,o));n(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return nA(e.doc,t)}};kA([Cn()],bp.prototype,"setDocAttributes",1),kA([Mo()],bp.prototype,"isDefaultDocNode",1),bp=kA([dr({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:Fr.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],bp);var q7="SetDocAttribute",K7="RevertSetDocAttribute",Bv=class extends ei{constructor(e,t,n=q7){super(),this.stepType=n,this.key=e,this.value=t}static fromJSON(e,t){return new Bv(t.key,t.value,t.stepType)}apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return zo.ok(e.type.create(t,e.content,e.marks))}invert(){return new Bv(this.key,this.previous,K7)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{ei.jsonID(q7,Bv),ei.jsonID(K7,Bv)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}var WLe=Object.defineProperty,YLe=Object.getOwnPropertyDescriptor,G7=(e,t,n,r)=>{for(var o=r>1?void 0:r?YLe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&WLe(t,n,o),o};function ULe(e,t,n,r){const o=e.docView.posFromDOM(t,n,r);return o===null||o<0?null:o}function qLe(e,t){const n=t.target;if(n){const r=ULe(e,n,0);if(r!==null){const o=e.state.doc.resolve(r),i=o.node().isLeaf?0:1,a=o.start()-i;return{pos:r,inside:a}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var uw=class extends Xr{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,n)=>{const r=n,o=qLe(t,r);if(!o)return!1;const i=[],a=[],{inside:s,pos:c}=o;if(s===-1)return!1;const f=t.state.doc.resolve(c),p=f.depth+1;for(const m of nD(p,1))i.push({node:m>f.depth&&f.nodeAfter?f.nodeAfter:f.node(m),pos:f.before(m)});for(const{type:m}of f.marksAcross(f)??[]){const v=lc(f,m);v&&a.push(v)}return e(r,{view:t,nodes:i,marks:a,getMark:m=>{const v=Bn(m)?t.state.schema.marks[m]:m;return _n(v,{code:tn.EXTENSION,message:`The mark ${m} being checked does not exist within the editor schema.`}),a.find(y=>y.mark.type===v)},getNode:m=>{var v;const y=Bn(m)?t.state.schema.nodes[m]:m;_n(y,{code:tn.EXTENSION,message:"The node being checked does not exist"});const w=i.find(({node:C})=>C.type===y);if(w)return{...w,isRoot:!!((v=i[0])!=null&&v.node.eq(w.node))}}})}}get name(){return"events"}onView(){var e,t;if(!((e=this.store.managerSettings.exclude)!=null&&e.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(t=n.options.exclude)!=null&&t.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of Qo(r))this.addHandler(o,i)}}createPlugin(){const e=new WeakMap,t=(n,r,o,i,a,s,c,f)=>{const p=this.store.currentState,{schema:m,doc:v}=p,y=v.resolve(i),w=e.has(c),C=KLe({$pos:y,handled:w,view:o,state:p});let k=!1;w||(k=n(c,C)||k);const T={...C,pos:i,direct:f,nodeWithPosition:{node:a,pos:s},getNode:E=>{const _=Bn(E)?m.nodes[E]:E;return _n(_,{code:tn.EXTENSION,message:"The node being checked does not exist"}),_===a.type?{node:a,pos:s}:void 0}};return e.set(c,!0),r(c,T)||k};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,a,s)=>t(this.options.clickMark,this.options.click,n,r,o,i,a,s),handleDoubleClickOn:(n,r,o,i,a,s)=>t(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,a,s),handleTripleClickOn:(n,r,o,i,a,s)=>t(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,a,s),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const a=i.editable;a!==r&&(o.editable(a),r=a)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};G7([Mo()],uw.prototype,"isInteracting",1),uw=G7([dr({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:Fr.High})],uw);function KLe(e){const{handled:t,view:n,$pos:r,state:o}=e,i={getMark:rz,markRanges:[],view:n,state:o};if(t)return i;for(const{type:a}of r.marksAcross(r)??[]){const s=lc(r,a);s&&i.markRanges.push(s)}return i.getMark=a=>{const s=Bn(a)?o.schema.marks[a]:a;return _n(s,{code:tn.EXTENSION,message:`The mark ${a} being checked does not exist within the editor schema.`}),i.markRanges.find(c=>c.mark.type===s)},i}class Po extends ur{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Po.valid(r)?new Po(r):ur.near(r)}content(){return gn.empty}eq(t){return t instanceof Po&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Po(t.resolve(n.pos))}getBookmark(){return new hM(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!GLe(t)||!XLe(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Po.valid(t))return t;let o=t.pos,i=null;for(let a=t.depth;;a--){let s=t.node(a);if(n>0?t.indexAfter(a)<s.childCount:t.index(a)>0){i=s.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;o+=n;let c=t.doc.resolve(o);if(Po.valid(c))return c}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!zn.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=t.doc.resolve(o);if(Po.valid(s))return s}return null}}}Po.prototype.visible=!1,Po.findFrom=Po.findGapCursorFrom,ur.jsonID("gapcursor",Po);class hM{constructor(t){this.pos=t}map(t){return new hM(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Po.valid(n)?new Po(n):ur.near(n)}}function GLe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function XLe(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function ZLe(){return new rc({props:{decorations:t4e,createSelectionBetween(e,t,n){return t.pos==n.pos&&Po.valid(n)?new Po(n):null},handleClick:QLe,handleKeyDown:JLe,handleDOMEvents:{beforeinput:e4e}}})}const JLe=fA({ArrowLeft:dw("horiz",-1),ArrowRight:dw("horiz",1),ArrowUp:dw("vert",-1),ArrowDown:dw("vert",1)});function dw(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let a=r.selection,s=t>0?a.$to:a.$from,c=a.empty;if(a instanceof Vn){if(!i.endOfTextblock(n)||s.depth==0)return!1;c=!1,s=r.doc.resolve(t>0?s.after():s.before())}let f=Po.findGapCursorFrom(s,t,c);return f?(o&&o(r.tr.setSelection(new Po(f))),!0):!1}}function QLe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Po.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&zn.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Po(r))),!0)}function e4e(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Po))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=Ht.empty;for(let a=r.length-1;a>=0;a--)o=Ht.from(r[a].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new gn(o,0,0));return i.setSelection(Vn.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function t4e(e){if(!(e.selection instanceof Po))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",wr.create(e.doc,[fo.widget(e.selection.head,t,{key:"gapcursor"})])}var n4e=Object.defineProperty,r4e=Object.getOwnPropertyDescriptor,o4e=(e,t,n,r)=>{for(var o=r>1?void 0:r?r4e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&n4e(t,n,o),o},EA=class extends Xr{get name(){return"gapCursor"}createExternalPlugins(){return[ZLe()]}};EA=o4e([dr({})],EA);var fw=200,ci=function(){};ci.prototype.append=function(t){return t.length?(t=ci.from(t),!this.length&&t||t.length<fw&&this.leafAppend(t)||this.length<fw&&t.leafPrepend(this)||this.appendInner(t)):this},ci.prototype.prepend=function(t){return t.length?ci.from(t).append(this):this},ci.prototype.appendInner=function(t){return new i4e(this,t)},ci.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?ci.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))},ci.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},ci.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)},ci.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(t(i,a))},n,r),o},ci.from=function(t){return t instanceof ci?t:t&&t.length?new X7(t):ci.empty};var X7=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,a,s){for(var c=i;c<a;c++)if(o(this.values[c],s+c)===!1)return!1},t.prototype.forEachInvertedInner=function(o,i,a,s){for(var c=i-1;c>=a;c--)if(o(this.values[c],s+c)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=fw)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=fw)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(ci);ci.empty=new X7([]);var i4e=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},t.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(ci);const a4e=500;class Bs{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=t.tr,s,c,f=[],p=[];return this.items.forEach((m,v)=>{if(!m.step){o||(o=this.remapping(r,v+1),i=o.maps.length),i--,p.push(m);return}if(o){p.push(new El(m.map));let y=m.step.map(o.slice(i)),w;y&&a.maybeStep(y).doc&&(w=a.mapping.maps[a.mapping.maps.length-1],f.push(new El(w,void 0,void 0,f.length+p.length))),i--,w&&o.appendMap(w,i)}else a.maybeStep(m.step);if(m.selection)return s=o?m.selection.map(o.slice(i)):m.selection,c=new Bs(this.items.slice(0,r).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:s}}addTransform(t,n,r,o){let i=[],a=this.eventCount,s=this.items,c=!o&&s.length?s.get(s.length-1):null;for(let p=0;p<t.steps.length;p++){let m=t.steps[p].invert(t.docs[p]),v=new El(t.mapping.maps[p],m,n),y;(y=c&&c.merge(v))&&(v=y,p?i.pop():s=s.slice(0,s.length-1)),i.push(v),n&&(a++,n=void 0),o||(c=v)}let f=a-r.depth;return f>l4e&&(s=s4e(s,f),a-=f),new Bs(s.append(i),a)}remapping(t,n){let r=new $p;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Bs(this.items.append(t.map(n=>new El(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach(v=>{v.selection&&s--},o);let c=n;this.items.forEach(v=>{let y=i.getMirror(--c);if(y==null)return;a=Math.min(a,y);let w=i.maps[y];if(v.step){let C=t.steps[y].invert(t.docs[y]),k=v.selection&&v.selection.map(i.slice(c+1,y));k&&s++,r.push(new El(w,C,k))}else r.push(new El(w))},o);let f=[];for(let v=n;v<a;v++)f.push(new El(i.maps[v]));let p=this.items.slice(0,o).append(f).append(r),m=new Bs(p,s);return m.emptyItemCount()>a4e&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=t)o.push(a),a.selection&&i++;else if(a.step){let c=a.step.map(n.slice(r)),f=c&&c.getMap();if(r--,f&&n.appendMap(f,r),c){let p=a.selection&&a.selection.map(n.slice(r));p&&i++;let m=new El(f.invert(),c,p),v,y=o.length-1;(v=o.length&&o[y].merge(m))?o[y]=v:o.push(m)}}else a.map&&r--},this.items.length,0),new Bs(ci.from(o.reverse()),i)}}Bs.empty=new Bs(ci.empty,0);function s4e(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class El{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new El(n.getMap().invert(),n,this.selection)}}}class bu{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const l4e=20;function c4e(e,t,n,r){let o=n.getMeta(xl),i;if(o)return o.historyState;n.getMeta(d4e)&&(e=new bu(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(xl))return a.getMeta(xl).redo?new bu(e.done.addTransform(n,void 0,r,hw(t)),e.undone,Z7(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new bu(e.done,e.undone.addTransform(n,void 0,r,hw(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),c=e.prevTime==0||!a&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!u4e(n,e.prevRanges)),f=a?TA(e.prevRanges,n.mapping):Z7(n.mapping.maps[n.steps.length-1]);return new bu(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,hw(t)),Bs.empty,f,n.time,s??e.prevComposition)}else return(i=n.getMeta("rebased"))?new bu(e.done.rebased(n,i),e.undone.rebased(n,i),TA(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new bu(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),TA(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function u4e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<t.length;i+=2)r<=t[i+1]&&o>=t[i]&&(n=!0)}),n}function Z7(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function TA(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function J7(e,t,n,r){let o=hw(t),i=xl.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(!a)return;let s=a.selection.resolve(a.transform.doc),c=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),f=new bu(r?c:a.remaining,r?a.remaining:c,null,0,-1);n(a.transform.setSelection(s).setMeta(xl,{redo:r,historyState:f}).scrollIntoView())}let DA=!1,Q7=null;function hw(e){let t=e.plugins;if(Q7!=t){DA=!1,Q7=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){DA=!0;break}}return DA}const xl=new _d("history"),d4e=new _d("closeHistory");function f4e(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new rc({key:xl,state:{init(){return new bu(Bs.empty,Bs.empty,null,0,-1)},apply(t,n,r){return c4e(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,o=r=="historyUndo"?pw:r=="historyRedo"?zv:null;return o?(n.preventDefault(),o(t.state,t.dispatch)):!1}}}})}const pw=(e,t)=>{let n=xl.getState(e);return!n||n.done.eventCount==0?!1:(t&&J7(n,e,t,!1),!0)},zv=(e,t)=>{let n=xl.getState(e);return!n||n.undone.eventCount==0?!1:(t&&J7(n,e,t,!0),!0)};function AA(e){let t=xl.getState(e);return t?t.done.eventCount:0}function h4e(e){let t=xl.getState(e);return t?t.undone.eventCount:0}var p4e=Object.defineProperty,m4e=Object.getOwnPropertyDescriptor,Wd=(e,t,n,r)=>{for(var o=r>1?void 0:r?m4e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&p4e(t,n,o),o},wl=class extends Xr{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:a}=this.options,s=Br(i)?i():n,c=Br(a)&&r?a():r,f=e(s,c,o);return t?.(f),f}}get name(){return"history"}createKeymap(){return{"Mod-y":es.isMac?()=>!1:this.wrapMethod(zv,this.options.onRedo),"Mod-z":this.wrapMethod(pw,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(zv,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(pw,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(zv,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[f4e({depth:e,newGroupDelay:t})]}undo(){return L9(this.wrapMethod(pw,this.options.onUndo))}redo(){return L9(this.wrapMethod(zv,this.options.onRedo))}undoDepth(e=this.store.getState()){return AA(e)}redoDepth(e=this.store.getState()){return h4e(e)}};Wd([co({shortcut:on.Undo,command:"undo"})],wl.prototype,"undoShortcut",1),Wd([co({shortcut:on.Redo,command:"redo"})],wl.prototype,"redoShortcut",1),Wd([Cn({disableChaining:!0,description:({t:e})=>e(T1.UNDO_DESCRIPTION),label:({t:e})=>e(T1.UNDO_LABEL),icon:"arrowGoBackFill"})],wl.prototype,"undo",1),Wd([Cn({disableChaining:!0,description:({t:e})=>e(T1.REDO_DESCRIPTION),label:({t:e})=>e(T1.REDO_LABEL),icon:"arrowGoForwardFill"})],wl.prototype,"redo",1),Wd([Mo()],wl.prototype,"undoDepth",1),Wd([Mo()],wl.prototype,"redoDepth",1),wl=Wd([dr({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],wl);var g4e=Object.defineProperty,v4e=Object.getOwnPropertyDescriptor,mw=(e,t,n,r)=>{for(var o=r>1?void 0:r?v4e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&g4e(t,n,o),o},b4e={icon:"paragraph",label:({t:e})=>e(D1.INSERT_LABEL),description:({t:e})=>e(D1.INSERT_DESCRIPTION)},y4e={icon:"paragraph",label:({t:e})=>e(D1.CONVERT_LABEL),description:({t:e})=>e(D1.CONVERT_DESCRIPTION)},Yd=class extends aa{get name(){return"paragraph"}createTags(){return[jn.LastNodeCompatible,jn.TextBlock,jn.Block,jn.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...e.parse(n)})},...t.parseDOM??[]],toDOM:n=>["p",e.dom(n),0]}}convertParagraph(e={}){const{attrs:t,selection:n,preserveAttrs:r}=e;return this.store.commands.setBlockNodeType.original(this.type,t,n,r)}insertParagraph(e,t={}){const{selection:n,attrs:r}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:n,attrs:r})}shortcut(e){return this.convertParagraph()(e)}};mw([Cn(y4e)],Yd.prototype,"convertParagraph",1),mw([Cn(b4e)],Yd.prototype,"insertParagraph",1),mw([co({shortcut:on.Paragraph,command:"convertParagraph"})],Yd.prototype,"shortcut",1),Yd=mw([dr({defaultPriority:Fr.Medium})],Yd);function pc(e,t,n){return Math.min(Math.max(e,n),t)}class x4e extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Vv=x4e;function OA(e){if(typeof e!="string")throw new Vv(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=A4e.test(e)?S4e(e):e;const n=k4e.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(Hv(s,2),16)),parseInt(Hv(a[3]||"f",2),16)/255]}const r=E4e.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const o=T4e.exec(t);if(o){const a=Array.from(o).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const i=D4e.exec(t);if(i){const[a,s,c,f]=Array.from(i).slice(1).map(parseFloat);if(pc(0,100,s)!==s)throw new Vv(e);if(pc(0,100,c)!==c)throw new Vv(e);return[...O4e(a,s,c),Number.isNaN(f)?1:f]}throw new Vv(e)}function w4e(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const eV=e=>parseInt(e.replace(/_/g,""),36),C4e="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=eV(t.substring(0,3)),r=eV(t.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return e[n]=`${o}${r}`,e},{});function S4e(e){const t=e.toLowerCase().trim(),n=C4e[w4e(t)];if(!n)throw new Vv(e);return`#${n}`}const Hv=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),k4e=new RegExp(`^#${Hv("([a-f0-9])",3)}([a-f0-9])?$`,"i"),E4e=new RegExp(`^#${Hv("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),T4e=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Hv(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),D4e=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,A4e=/^[a-z]+$/i,tV=e=>Math.round(e*255),O4e=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(tV);const o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),a=i*(1-Math.abs(o%2-1));let s=0,c=0,f=0;o>=0&&o<1?(s=i,c=a):o>=1&&o<2?(s=a,c=i):o>=2&&o<3?(c=i,f=a):o>=3&&o<4?(c=a,f=i):o>=4&&o<5?(s=a,f=i):o>=5&&o<6&&(s=i,f=a);const p=r-i/2,m=s+p,v=c+p,y=f+p;return[m,v,y].map(tV)};function M4e(e){const[t,n,r,o]=OA(e).map((m,v)=>v===3?m:m/255),i=Math.max(t,n,r),a=Math.min(t,n,r),s=(i+a)/2;if(i===a)return[0,0,s,o];const c=i-a,f=s>.5?c/(2-i-a):c/(i+a);return[60*(t===i?(n-r)/c+(n<r?6:0):n===i?(r-t)/c+2:(t-n)/c+4),f,s,o]}function P4e(e,t,n,r){return`hsla(${(e%360).toFixed()}, ${pc(0,100,t*100).toFixed()}%, ${pc(0,100,n*100).toFixed()}%, ${parseFloat(pc(0,1,r).toFixed(3))})`}function Da(e,t){const[n,r,o,i]=M4e(e);return P4e(n,r,o-t,i)}function N4e(e){if(e==="transparent")return 0;function t(i){const a=i/255;return a<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}const[n,r,o]=OA(e);return .2126*t(n)+.7152*t(r)+.0722*t(o)}function _4e(e,t,n,r){return`rgba(${pc(0,255,e).toFixed()}, ${pc(0,255,t).toFixed()}, ${pc(0,255,n).toFixed()}, ${parseFloat(pc(0,1,r).toFixed(3))})`}function gw(e,t){return Da(e,-t)}function vw(e,t){const[n,r,o,i]=OA(e);return _4e(n,r,o,i-t)}function R4e(e){return N4e(e)>.179}function yp(e){return R4e(e)?"#000":"#fff"}const I4e="remirror-editor-wrapper",L4e="remirror-button-active",$4e="remirror-button",F4e="remirror-composite",B4e="remirror-dialog",z4e="remirror-dialog-backdrop",V4e="remirror-form",H4e="remirror-form-message",j4e="remirror-form-label",W4e="remirror-form-group",Y4e="remirror-group",U4e="remirror-input",q4e="remirror-menu",K4e="remirror-menu-pane",G4e="remirror-menu-pane-active",X4e="remirror-menu-dropdown-label",Z4e="remirror-menu-pane-icon",J4e="remirror-menu-pane-label",Q4e="remirror-menu-pane-shortcut",e5e="remirror-menu-button-left",t5e="remirror-menu-button-right",n5e="remirror-menu-button-nested-left",r5e="remirror-menu-button-nested-right",o5e="remirror-menu-button",i5e="remirror-menu-bar",a5e="remirror-flex-column",s5e="remirror-flex-row",l5e="remirror-menu-item",c5e="remirror-menu-item-row",u5e="remirror-menu-item-column",d5e="remirror-menu-item-checkbox",f5e="remirror-menu-item-radio",h5e="remirror-menu-group",p5e="remirror-floating-popover",m5e="remirror-popover",g5e="remirror-animated-popover",v5e="remirror-role",b5e="remirror-separator",y5e="remirror-tab",x5e="remirror-tab-list",w5e="remirror-tabbable",C5e="remirror-toolbar",S5e="remirror-tooltip",k5e="remirror-table-size-editor",E5e="remirror-table-size-editor-body",T5e="remirror-table-size-editor-cell",D5e="remirror-table-size-editor-cell-selected",A5e="remirror-table-size-editor-footer",O5e="remirror-color-picker",M5e="remirror-color-picker-cell",P5e="remirror-color-picker-cell-selected";var N5e=Object.freeze({__proto__:null,ANIMATED_POPOVER:g5e,BUTTON:$4e,BUTTON_ACTIVE:L4e,COLOR_PICKER:O5e,COLOR_PICKER_CELL:M5e,COLOR_PICKER_CELL_SELECTED:P5e,COMPOSITE:F4e,DIALOG:B4e,DIALOG_BACKDROP:z4e,EDITOR_WRAPPER:I4e,FLEX_COLUMN:a5e,FLEX_ROW:s5e,FLOATING_POPOVER:p5e,FORM:V4e,FORM_GROUP:W4e,FORM_LABEL:j4e,FORM_MESSAGE:H4e,GROUP:Y4e,INPUT:U4e,MENU:q4e,MENU_BAR:i5e,MENU_BUTTON:o5e,MENU_BUTTON_LEFT:e5e,MENU_BUTTON_NESTED_LEFT:n5e,MENU_BUTTON_NESTED_RIGHT:r5e,MENU_BUTTON_RIGHT:t5e,MENU_DROPDOWN_LABEL:X4e,MENU_GROUP:h5e,MENU_ITEM:l5e,MENU_ITEM_CHECKBOX:d5e,MENU_ITEM_COLUMN:u5e,MENU_ITEM_RADIO:f5e,MENU_ITEM_ROW:c5e,MENU_PANE:K4e,MENU_PANE_ACTIVE:G4e,MENU_PANE_ICON:Z4e,MENU_PANE_LABEL:J4e,MENU_PANE_SHORTCUT:Q4e,POPOVER:m5e,ROLE:v5e,SEPARATOR:b5e,TAB:y5e,TABBABLE:w5e,TABLE_SIZE_EDITOR:k5e,TABLE_SIZE_EDITOR_BODY:E5e,TABLE_SIZE_EDITOR_CELL:T5e,TABLE_SIZE_EDITOR_CELL_SELECTED:D5e,TABLE_SIZE_EDITOR_FOOTER:A5e,TAB_LIST:x5e,TOOLBAR:C5e,TOOLTIP:S5e});const _5e="remirror-wrap",R5e="remirror-language-select-positioner",I5e="remirror-language-select-width",L5e="remirror-a11y-dark",$5e="remirror-atom-dark",F5e="remirror-base16-ateliersulphurpool-light",B5e="remirror-cb",z5e="remirror-darcula",V5e="remirror-dracula",H5e="remirror-duotone-dark",j5e="remirror-duotone-earth",W5e="remirror-duotone-forest",Y5e="remirror-duotone-light",U5e="remirror-duotone-sea",q5e="remirror-duotone-space",K5e="remirror-gh-colors",G5e="remirror-hopscotch",X5e="remirror-pojoaque",Z5e="remirror-vs",J5e="remirror-xonokai";var Q5e=Object.freeze({__proto__:null,A11Y_DARK:L5e,ATOM_DARK:$5e,BASE16_ATELIERSULPHURPOOL_LIGHT:F5e,CB:B5e,DARCULA:z5e,DRACULA:V5e,DUOTONE_DARK:H5e,DUOTONE_EARTH:j5e,DUOTONE_FOREST:W5e,DUOTONE_LIGHT:Y5e,DUOTONE_SEA:U5e,DUOTONE_SPACE:q5e,GH_COLORS:K5e,HOPSCOTCH:G5e,LANGUAGE_SELECT_POSITIONER:R5e,LANGUAGE_SELECT_WIDTH:I5e,POJOAQUE:X5e,VS:Z5e,WRAP:_5e,XONOKAI:J5e});const e$e="remirror-image-loader";var t$e=Object.freeze({__proto__:null,IMAGE_LOADER:e$e});const n$e="remirror-list-item-with-custom-mark",r$e="remirror-ul-list-content",o$e="remirror-editor",i$e="remirror-list-item-marker-container",a$e="remirror-list-item-checkbox",s$e="remirror-collapsible-list-item-closed",l$e="remirror-collapsible-list-item-button",c$e="remirror-list-spine";var yu=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:l$e,COLLAPSIBLE_LIST_ITEM_CLOSED:s$e,EDITOR:o$e,LIST_ITEM_CHECKBOX:a$e,LIST_ITEM_MARKER_CONTAINER:i$e,LIST_ITEM_WITH_CUSTOM_MARKER:n$e,LIST_SPINE:c$e,UL_LIST_CONTENT:r$e});const u$e="remirror-is-empty";var d$e=Object.freeze({__proto__:null,IS_EMPTY:u$e});const f$e="remirror-editor",h$e="remirror-positioner",p$e="remirror-positioner-widget";var m$e=Object.freeze({__proto__:null,EDITOR:f$e,POSITIONER:h$e,POSITIONER_WIDGET:p$e});const Ps={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},mc="#000000",MA="#ffffff",g$e="#252103",PA=vw(mc,.75),bw="#7963d2",NA="#bcd263",v$e="#fff",b$e="#fff",_A=Ps.gray[1],nV="rgba(10,31,68,0.08)",rV="rgba(10,31,68,0.10)",oV="rgba(10,31,68,0.12)",y$e=gw(vw(mc,.1),.13),RA={background:MA,border:PA,foreground:mc,muted:_A,primary:bw,secondary:NA,primaryText:v$e,secondaryText:b$e,text:g$e,faded:y$e},x$e={...RA,background:Da(MA,.15),border:Da(PA,.15),foreground:Da(mc,.15),muted:Da(_A,.15),primary:Da(bw,.15),secondary:Da(NA,.15),get text(){return yp(this.background)},get primaryText(){return yp(this.primary)},get secondaryText(){return yp(this.secondary)}},w$e={...RA,background:Da(MA,.075),border:Da(PA,.075),foreground:Da(mc,.075),muted:Da(_A,.075),primary:Da(bw,.075),secondary:Da(NA,.075),get text(){return yp(this.background)},get primaryText(){return yp(this.primary)},get secondaryText(){return yp(this.secondary)}};({...RA,backdrop:vw(mc,.1),outline:vw(bw,.6),table:(gw(mc,.8),gw(mc,.4),Ps.gray[3],Ps.blue[7],Ps.blue[1],Ps.blue[5],Ps.blue[7],gw(mc,.4),Ps.blue[5],Ps.red[7],Ps.red[1],Ps.red[5])},`${nV}`,`${rV}`,`${oV}`);var C$e=Object.defineProperty,S$e=Object.getOwnPropertyDescriptor,IA=(e,t,n,r)=>{for(var o=r>1?void 0:r?S$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&C$e(t,n,o),o},iV=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ni=(e,t,n)=>(iV(e,t,"read from private field"),n?n.call(e):t.get(e)),gc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},xu=(e,t,n,r)=>(iV(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),jv,Wv,xp,Yv,yw,Uv,qv,Kv,Gv,xw=class{constructor(e){gc(this,jv,d1()),gc(this,Wv,[]),gc(this,xp,new Map),gc(this,Yv,[]),gc(this,yw,!1),gc(this,Uv,void 0),gc(this,qv,void 0),gc(this,Kv,void 0),gc(this,Gv,void 0),this.addListener=(t,n)=>ni(this,jv).on(t,n),xu(this,Uv,e),xu(this,qv,e.getActive),xu(this,Gv,e.getPosition),xu(this,Kv,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new xw(e)}static fromPositioner(e,t){return xw.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:ni(this,qv),getPosition:ni(this,Gv),hasChanged:this.hasChanged,events:this.events,getID:ni(this,Kv)}}onActiveChanged(e){this.recentUpdate=e;const t=ni(this,qv).call(this,e);xu(this,Wv,t),xu(this,xp,new Map),xu(this,yw,!1),xu(this,Yv,[]);const n=[];for(const[r,o]of t.entries()){const i=this.getID(o,r);ni(this,Yv).push(i),n.push({setElement:a=>this.addProps({...e,data:o,element:a},r),id:i,data:o})}ni(this,jv).emit("update",n)}getID(e,t){var n;return((n=ni(this,Kv))==null?void 0:n.call(this,e,t))??t.toString()}addProps(e,t){if(ni(this,yw)||(ni(this,xp).set(t,e),ni(this,xp).size<ni(this,Wv).length))return;const n=[];for(const r of ni(this,Wv).keys()){const o=ni(this,xp).get(r);_n(o,{code:tn.INTERNAL,message:"Something went wrong when retrieving the parameters"});const i=ni(this,Yv)[r];if(!i)return;n.push({position:ni(this,Gv).call(this,o),element:o.element,id:i})}ni(this,jv).emit("done",n)}clone(e){return xw.create({...ni(this,Uv),...Br(e)?e(ni(this,Uv)):e})}active(e){const t=Br(e)?e:()=>e;return this.clone(n=>({getActive:r=>n.getActive(r).filter(t)}))}},Ns=xw;jv=new WeakMap,Wv=new WeakMap,xp=new WeakMap,Yv=new WeakMap,yw=new WeakMap,Uv=new WeakMap,qv=new WeakMap,Kv=new WeakMap,Gv=new WeakMap,Ns.EMPTY=[];function k$e(e,t=cV){const{key:n}=e?.getMeta(lV)??{};return n===t}function aV(e){const{tr:t,state:n,previousState:r}=e;return!r||t&&k$e(t)?!0:t?B9(t):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function sV(e,t,n={}){const r=t.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,a=0,s=0,c=0;if(ji(t)&&o){const p=Number.parseFloat(ts(t,"padding-left").replace("px","")),m=Number.parseFloat(ts(t,"padding-right").replace("px","")),v=Number.parseFloat(ts(t,"padding-top").replace("px","")),y=Number.parseFloat(ts(t,"padding-bottom").replace("px","")),w=Number.parseFloat(ts(t,"border-left").replace("px","")),C=Number.parseFloat(ts(t,"border-right").replace("px","")),k=Number.parseFloat(ts(t,"border-top").replace("px","")),T=Number.parseFloat(ts(t,"border-bottom").replace("px","")),E=t.offsetWidth-t.clientWidth,_=t.offsetHeight-t.clientHeight;i+=p+w+(t.dir==="rtl"?E:0),a+=m+C+(t.dir==="rtl"?0:E),s+=v+k,c+=y+T+_}const f=new DOMRect(r.left+i,r.top+s,r.width-a,r.height-c);for(const[p,m]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(az(p,f.top,f.bottom)&&az(m,f.left,f.right))return!0;return!1}var E$e="remirror-positioner-widget",lV="positionerUpdate",cV="__all_positioners__",uV={y:-999999,x:-999999,width:0,height:0},dV={...uV,left:-999999,top:-999999,bottom:-999999,right:-999999},LA={...uV,rect:{...dV,toJSON:()=>dV},visible:!1},fV=Ns.create({hasChanged:aV,getActive(e){const{state:t}=e;if(!QD(t)||t.selection.$anchor.depth>2)return Ns.EMPTY;const n=ap({predicate:r=>r.type.isBlock,selection:t});return n?[n]:Ns.EMPTY},getPosition(e){const{view:t,data:n}=e,r=t.nodeDOM(n.pos);if(!ji(r))return LA;const o=r.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),a=o.height,s=o.width,c=t.dom.scrollLeft+o.left-i.left,f=t.dom.scrollTop+o.top-i.top,p=sV(o,t.dom);return{y:f,x:c,height:a,width:s,rect:o,visible:p}}}),$A=fV.clone(({getActive:e})=>({getActive:t=>{const[n]=e(t);return n&&H1(n.node)&&n.node.type===V1(t.state.schema)?[n]:Ns.EMPTY}})),T$e=$A.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),D$e=$A.clone(({getPosition:e})=>({getPosition:t=>{const{width:n,x:r,y:o,height:i}=e(t);return{...e(t),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function FA(e){return Ns.create({hasChanged:aV,getActive:t=>{const{state:n,view:r}=t;if(!e(n)||!fu(n.selection))return Ns.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Ns.EMPTY}},getPosition(t){const{element:n,data:r,view:o}=t,{from:i,to:a}=r,s=n.offsetParent??o.dom,c=s.getBoundingClientRect(),f=Math.abs(a.bottom-i.top),p=f>i.bottom-i.top,m=Math.min(i.left,a.left),v=Math.min(i.top,a.top),y=s.scrollLeft+(p?a.left-c.left:m-c.left),w=s.scrollTop+v-c.top,C=p?1:Math.abs(i.left-a.right),k=new DOMRect(p?a.left:m,v,C,f),T=sV(k,o.dom);return{rect:k,y:w,x:y,height:f,width:C,visible:T}}})}var hV=FA(e=>!e.selection.empty),A$e=FA(e=>e.selection.empty),O$e=FA(()=>!0),M$e=hV.clone(()=>({getActive:e=>{const{state:t,view:n}=e;if(!t.selection.empty)return Ns.EMPTY;const r=q9(t);if(!r)return Ns.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Ns.EMPTY}}})),P$e={selection:hV,cursor:A$e,always:O$e,block:fV,emptyBlock:$A,emptyBlockStart:T$e,emptyBlockEnd:D$e,nearestWord:M$e},wp=class extends Xr{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return"positioner"}createAttributes(){return{class:m$e.EDITOR}}init(){this.onScroll=XB(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return wr.empty;const t=fo.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return wr.create(e.doc,[t])}forceUpdatePositioners(e=cV){return({tr:t,dispatch:n})=>(n?.(t.setMeta(lV,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id=E$e,e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(const t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:r,state:n,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};IA([Cn()],wp.prototype,"forceUpdatePositioners",1),IA([Mo()],wp.prototype,"getPositionerWidget",1),wp=IA([dr({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],wp);function BA(e){return Bn(e)?P$e[e].clone():Br(e)?e().clone():e.clone()}var N$e=Object.defineProperty,_$e=Object.getOwnPropertyDescriptor,R$e=(e,t,n,r)=>{for(var o=r>1?void 0:r?_$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&N$e(t,n,o),o},zA=class extends aa{get name(){return"text"}createTags(){return[jn.InlineNode]}createNodeSpec(){return{}}};zA=R$e([dr({disableExtraAttributes:!0,defaultPriority:Fr.Medium})],zA);var I$e={...bp.defaultOptions,...Yd.defaultOptions,...wl.defaultOptions,excludeExtensions:[]};function L$e(e={}){e={...I$e,...e};const{content:t,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:a}=e,s={};for(const f of a??[])s[f]=!0;const c=[];if(!s.history){const f=new wl({depth:n,getDispatch:r,getState:o,newGroupDelay:i});c.push(f)}return s.doc||c.push(new bp({content:t})),s.text||c.push(new zA),s.paragraph||c.push(new Yd),s.positioner||c.push(new wp),s.gapCursor||c.push(new EA),s.events||c.push(new uw),c}var $$e=Object.defineProperty,F$e=Object.getOwnPropertyDescriptor,B$e=(e,t,n,r)=>{for(var o=r>1?void 0:r?F$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&$$e(t,n,o),o},Ud=class extends Xr{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:nA(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>z$e({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>V$e({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=na.EditorView&&this.store.updateAttributes()}};Ud=B$e([dr({defaultOptions:{emptyNodeClass:d$e.IS_EMPTY,placeholder:""}})],Ud);function z$e(e){const{pluginState:t,extension:n,tr:r,state:o}=e;return r.docChanged?{...n.options,empty:nA(o.doc)}:t}function V$e(e){const{extension:t,state:n}=e,{empty:r}=t.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=t.options;if(!r)return null;const a=[];return n.doc.descendants((s,c)=>{const f=fo.node(c,c+s.nodeSize,{class:o,"data-placeholder":i});a.push(f)}),wr.create(n.doc,a)}var H$e=Object.defineProperty,j$e=Object.getOwnPropertyDescriptor,W$e=(e,t,n,r)=>{for(var o=r>1?void 0:r?j$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&H$e(t,n,o),o},Y$e={...Ud.defaultOptions,...$v.defaultOptions},U$e=[...Ud.staticKeys,...$v.staticKeys],Xv=class extends Xr{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(Ud).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:a}=this.options;return[new Ud({emptyNodeClass:e,placeholder:t,priority:Fr.Low}),new $v({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:a})]}};Xv=W$e([dr({defaultOptions:Y$e,staticKeys:U$e})],Xv);var pV={};Object.defineProperty(pV,"__esModule",{value:!0});function q$e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===2)return gV(e[0],e[1])||null;var n=e.slice(1).reduce(function(r,o){return gV(r,o)},e[0]);return n||null}var Cl=pV.default=q$e,mV=new WeakMap;function gV(e,t){if(e&&t){var n=mV.get(e)||new WeakMap;mV.set(e,n);var r=n.get(t)||function(o){vV(e,o),vV(t,o)};return n.set(t,r),r}return e||t}function vV(e,t){typeof e=="function"?e(t):e.current=t}var bV=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},VA=(e,t,n)=>(bV(e,t,"read from private field"),n?n.call(e):t.get(e)),K$e=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},G$e=(e,t,n,r)=>(bV(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function X$e(){const[,e]=Tn(In());return Zn(()=>{e(In())},[])}var yV=kf(null);function wu(e){const t=Sf(yV),n=Yt(X$e());_n(t,{code:tn.REACT_PROVIDER_CONTEXT});const{addHandler:r}=t;return dn(()=>{let o=e;if(o){if(Dd(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(Br(o))return r("updated",o)}},[r,e]),t}function vc(e=!0){return wu({autoUpdate:e}).active}function Z$e(e=!1){return wu(e?{autoUpdate:!0}:void 0).attrs}function J$e(){return wu().chain.new()}function _s(){return wu().commands}function HA(){return wu({autoUpdate:!0}).getState().selection}function xV(e,t=void 0,n){const{getExtension:r}=wu(),o=Ur(()=>r(e),[e,r]);let i;if(Br(t)?i=n?[o,...n]:[o,t]:i=t?[o,...Object.values(t)]:[],dn(()=>{Br(t)||!t||o.setOptions(t)},i),dn(()=>{if(Br(t))return t({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!t)return o}function Q$e(e,t,n){const r=Zn(({addHandler:o})=>o(t,n),[n,t]);return xV(e,r)}function eFe(e){Q$e(Z1,"docChanged",e)}function tFe(e=!1){return wu(e?{autoUpdate:!0}:void 0).helpers}var[nFe,DUe]=w3e(({props:e})=>{const t=e.locale??"en",n=e.i18n??cw,r=e.supportedLocales??[t],o=n._.bind(n);return{locale:t,i18n:n,supportedLocales:r,t:o}});function wV(e,t={}){const{core:n,react:r,...o}=t;return c3e(e)?e:l3e.create(()=>[...sz(e),new Xv(r),...L$e(n)],o)}function rFe(e,t={}){const n=Yt(e),r=Yt(t),[o,i]=Tn(()=>wV(e,t));return n.current=e,r.current=t,dn(()=>o.addHandler("destroy",()=>{i(()=>wV(n.current,r.current))}),[o]),o}var oFe=typeof Cl=="object"&&Cl.__esModule&&Cl.default?Cl.default:Cl,Cp,iFe=class extends r3e{constructor(e){if(super(e),K$e(this,Cp,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=t=>this.internalGetRootProps(t,null),this.internalGetRootProps=(t,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=t??In();return{[r]:oFe(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=t=>{t&&(this.rootPropsConfig.count+=1,_n(this.rootPropsConfig.count<=1,{code:tn.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),G$e(this,Cp,t),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(Ud).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new dMe(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:n=!0,tr:r,transactions:o}=t;if(this.props.state){const{onChange:i}=this.props;_n(i,{code:tn.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),_n(n,{code:tn.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:e,tr:r,transactions:o});return}!r&&!o&&(e=e.apply(e.tr.setMeta(VB,{}))),this.view.updateState(e),n&&o?.length!==0&&this.onChange({state:e,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:r,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(VB,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition==="start"?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){_n(VA(this,Cp),{code:tn.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom(VA(this,Cp),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&VA(this,Cp)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Cp=new WeakMap;var CV=typeof document<"u"?Nl:dn;function aFe(e){const t=Yt();return CV(()=>{t.current=e}),t.current}function sFe(e){const{manager:t,state:n}=e,{placeholder:r,editable:o}=e;Yt(!0).current&&!nc(r)&&t.getExtension(Xv).setOptions({placeholder:r}),dn(()=>{r!=null&&t.getExtension(Xv).setOptions({placeholder:r})},[r,t]);const[a]=Tn(()=>{if(n)return n;const c=t.createEmptyDoc(),[f,p]=Fo(e.initialContent)?e.initialContent:[e.initialContent??c];return t.createState({content:f,selection:p})}),s=lFe({initialEditorState:a,getProps:()=>e});return dn(()=>()=>{s.destroy()},[s]),dn(()=>{s.onUpdate()},[o,s]),cFe(s),s.frameworkOutput}function lFe(e){const t=Yt(e);t.current=e;const n=Ur(()=>new iFe(t.current),[]);return n.update(e),n}function cFe(e){const{state:t}=e.props,n=Yt(!!t),r=aFe(t);CV(()=>{const o=t?n.current===!0:n.current===!1;_n(o,{code:tn.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===r)&&e.updateControlledState(t,r??void 0)},[t,r,e])}function uFe(e={}){const{content:t,document:n,selection:r,extensions:o,...i}=e,a=rFe(o??(()=>[]),i),[s,c]=Tn(()=>a.createState({selection:r,content:t??a.createEmptyDoc()})),f=Zn(({state:m})=>{c(m)},[]),p=Zn(()=>a.output,[a]);return Ur(()=>({state:s,setState:c,manager:a,onChange:f,getContext:p}),[p,a,f,s])}var dFe=({onChange:e})=>{const{getHTML:t}=tFe();return eFe(Zn(({state:n})=>{const r=t(n);e(r)},[e,t])),null},jA=()=>Pt.createElement("div",{className:N5e.EDITOR_WRAPPER,...wu().getRootProps()}),fFe=e=>(e.hook(),null);function hFe(e){const{children:t,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:a=[],...s}=e,c=sFe(s),f=m3e(c.portalContainer),p=n==="start"||n===!0||!t&&nc(n),m=n==="end";return Pt.createElement(nFe,{i18n:r,locale:o,supportedLocales:i},Pt.createElement(yV.Provider,{value:c},Pt.createElement(p3e,{portals:f}),a.map((v,y)=>Pt.createElement(fFe,{hook:v,key:y})),p&&Pt.createElement(jA,null),t,m&&Pt.createElement(jA,null)))}function pFe(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(e)&&a.startIndex==0){if(o.index(a.depth-1)==0)return!1;let p=n.doc.resolve(a.start-2);c=new Nd(p,p,a.depth),a.endIndex<a.parent.childCount&&(a=new Nd(o,n.doc.resolve(i.end(a.depth)),a.depth)),s=!0}let f=pD(c,e,t,a);return f?(r&&r(mFe(n.tr,a,f,s,e).scrollIntoView()),!0):!1}}function mFe(e,t,n,r,o){let i=Ht.empty;for(let p=n.length-1;p>=0;p--)i=Ht.from(n[p].type.create(n[p].attrs,i));e.step(new Bo(t.start-(r?2:0),t.end,t.start,t.end,new gn(i,0,0),n.length,!0));let a=0;for(let p=0;p<n.length;p++)n[p].type==o&&(a=p+1);let s=n.length-a,c=t.start+n.length-(r?2:0),f=t.parent;for(let p=t.startIndex,m=t.endIndex,v=!0;p<m;p++,v=!1)!v&&Kh(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=f.child(p).nodeSize;return e}function gFe(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?vFe(t,n,e,i):bFe(t,n,i):!0:!1}}function vFe(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Bo(i-1,a,i,a,new gn(Ht.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Nd(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=qh(r);if(s==null)return!1;o.lift(r,s);let c=o.mapping.map(i,-1)-1;return sv(o.doc,c)&&o.join(c),t(o.scrollIntoView()),!0}function bFe(e,t,n){let r=e.tr,o=n.parent;for(let y=n.end,w=n.endIndex-1,C=n.startIndex;w>C;w--)y-=o.child(w).nodeSize,r.delete(y-1,y+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==o.childCount,f=i.node(-1),p=i.index(-1);if(!f.canReplace(p+(s?0:1),p+1,a.content.append(c?Ht.empty:Ht.from(o))))return!1;let m=i.pos,v=m+a.nodeSize;return r.step(new Bo(m-(s?1:0),v+(c?1:0),m+1,v-1,new gn((s?Ht.empty:Ht.from(o.copy(Ht.empty))).append(c?Ht.empty:Ht.from(o.copy(Ht.empty))),s?0:1,c?0:1),s?0:1)),t(r.scrollIntoView()),!0}var yFe=Object.defineProperty,xFe=Object.getOwnPropertyDescriptor,rs=(e,t,n,r)=>{for(var o=r>1?void 0:r?xFe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&yFe(t,n,o),o};function WA(e){var t;return!!((t=e.spec.group)!=null&&t.includes(jn.ListContainerNode))}function wFe(e){var t;return!!((t=e.spec.group)!=null&&t.includes(jn.ListItemNode))}function Cu(e){return WA(e.type)}function Su(e){return wFe(e.type)}function YA(e,t){return n=>{const{dispatch:r,tr:o}=n,i=GD(o,n.state),{$from:a,$to:s}=o.selection,c=a.blockRange(s);if(!c)return!1;const f=ap({predicate:p=>WA(p.type),selection:o.selection});if(f&&c.depth-f.depth<=1&&c.startIndex===0){if(f.node.type===e)return EV(t)(n);if(WA(f.node.type))return e.validContent(f.node.content)?(r?.(o.setNodeMarkup(f.pos,e)),!0):CFe(o,f,e,t)?(r?.(o.scrollIntoView()),!0):!1}return pFe(e)(i,r)}}function SV(e,t=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,a;const s=nPe(e,o.schema),{$from:c,$to:f}=n.selection;if(Sv(n.selection)&&n.selection.node.isBlock||c.depth<2||!c.sameParent(f))return!1;const p=c.node(-1);if(p.type!==s)return!1;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==s||c.index(-2)!==c.node(-2).childCount-1)return!1;if(r){const C=c.index(-1)>0;let k=Ht.empty;for(let _=c.depth-(C?1:2);_>=c.depth-3;_--)k=Ht.from(c.node(_).copy(k));const T=((i=s.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;k=k.append(Ht.from(s.createAndFill(null,T)||void 0));const E=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3;n.replace(c.before(C?void 0:-1),c.after(-E),new gn(k,C?3:2,2)),n.setSelection(n.selection.constructor.near(n.doc.resolve(c.pos+(C?3:2)))),r(n.scrollIntoView())}return!0}if(p.attrs.closed&&c.sameParent(f)&&f.pos===f.end()){if(r){const C=c.after(-1),k=((a=s.contentMatch.defaultType)==null?void 0:a.createAndFill())||void 0,T=s.createAndFill(null,k);T&&(n.insert(C,T),n.setSelection(Vn.near(n.doc.resolve(C+1)))),n.delete(c.pos,f.pos),r(n.scrollIntoView())}return!0}const m=Object.fromEntries(Object.entries(p.attrs).filter(([C])=>!t.includes(C))),v=f.pos===c.end()?p.contentMatchAt(0).defaultType:null,y={...c.node().attrs};n.delete(c.pos,f.pos);const w=v?[{type:s,attrs:m},{type:v,attrs:y}]:[{type:s,attrs:m}];return Kh(n.doc,c.pos,2)?(r&&r(n.split(c.pos,2,w).scrollIntoView()),!0):!1}}function CFe(e,t,n,r){const o=t.node,i=e.doc.resolve(t.start),a=i.node(-1),s=i.index(-1);if(!a||!a.canReplace(s,s+1,Ht.from(n.create())))return!1;const c=[];for(let y=0;y<o.childCount;y++){const w=o.child(y);if(!r.validContent(w.content))return!1;const C=r.createChecked(null,w.content);c.push(C)}const f=n.createChecked(null,c),p=t.pos,m=p+o.nodeSize,v=e.selection.from;return e.replaceRangeWith(p,m,f),e.setSelection(e.selection.constructor.near(e.doc.resolve(v))),!0}function SFe({listType:e,itemType:t,tr:n,range:r}){var o;const i=r.parent,a=n.doc.slice(r.start,r.end);if(i.type===e&&((o=a.content.firstChild)==null?void 0:o.type)===t)return!1;const s=[];for(let f=0;f<a.content.childCount;f++){const p=a.content.child(f);if(!t.validContent(p.content))return!1;const m=t.createChecked(null,p.content);s.push(m)}const c=e.createChecked(null,s);return n.replaceRange(r.start,r.end,new gn(Ht.from(c),0,0)),!0}function Sp({listType:e,itemType:t,tr:n}){const r=ww(n.selection);if(!r)return!1;const o=r.startIndex===0,{from:i,to:a}=n.selection;return SFe({listType:e,itemType:t,tr:n,range:r})?(n.setSelection(Vn.between(n.doc.resolve(o?i:i+2),n.doc.resolve(o?a:a+2))),n.scrollIntoView(),!0):!1}function kFe(e,t,n){const r=e.tr,o=n.parent,i=r.mapping.maps.length;for(let w=n.end,C=n.endIndex-1,k=n.startIndex;C>k;C--)w-=o.child(C).nodeSize,r.delete(w-1,w+1);const a=r.doc.resolve(n.start),s=a.nodeAfter;if(!s||r.mapping.slice(i).map(n.end)!==n.start+s.nodeSize)return!1;const c=n.startIndex===0,f=n.endIndex===o.childCount,p=a.node(-1),m=a.index(-1);if(!p.canReplace(m+(c?0:1),m+1,s.content.append(f?Ht.empty:Ht.from(o))))return!1;const v=a.pos,y=v+s.nodeSize;return r.step(new Bo(v-(c?1:0),y+(f?1:0),v+1,y-1,new gn((c?Ht.empty:Ht.from(o.copy(Ht.empty))).append(f?Ht.empty:Ht.from(o.copy(Ht.empty))),c?0:1,f?0:1),c?0:1)),t(r.scrollIntoView()),!0}function kV(e,t){const n=t||e.selection.$from;let r=[],o,i,a,s;for(let f=n.depth;f>=0;f--){if(i=n.node(f),o=n.index(f),a=i.maybeChild(o-1),s=i.maybeChild(o),a&&s&&a.type.name===s.type.name&&Cu(a)){const p=n.before(f+1);r.push(p)}if(o=n.indexAfter(f),a=i.maybeChild(o-1),s=i.maybeChild(o),a&&s&&a.type.name===s.type.name&&Cu(a)){const p=n.after(f+1);r.push(p)}}r=[...new Set(r)].sort((f,p)=>p-f);let c=!1;for(const f of r)sv(e.doc,f)&&(e.join(f),c=!0);return c}function EV(e){return t=>{const{dispatch:n,tr:r}=t,o=GD(r,t.state),i=EFe(e,r.selection);return i?(n&&kFe(o,n,i),!0):!1}}function EFe(e,t){const{$from:n,$to:r}=t;return n.blockRange(r,i=>{var a;return((a=i.firstChild)==null?void 0:a.type)===e})}function ww(e){const{$from:t,$to:n}=e;return t.blockRange(n,Cu)}function TFe(e){const t=e.selection.$from,n=t.blockRange();if(!n||!Su(n.parent)||n.startIndex!==0)return!1;const r=t.node(n.depth-2),o=t.index(n.depth),i=t.index(n.depth-1),a=t.index(n.depth-2),s=r.maybeChild(a-1),c=s?.lastChild;if(o!==0||i!==0)return!1;if(s&&Cu(s)&&c&&Su(c))return Sp({listType:s.type,itemType:c.type,tr:e});if(Su(r)){const f=r,p=t.node(n.depth-3);if(Cu(p))return Sp({listType:p.type,itemType:f.type,tr:e})}return!1}function TV({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!Su(n.parent)||n.startIndex!==0)return!1}{const t=e.state.tr;TFe(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!Su(n.parent)||n.startIndex!==0)return!1;const r=t.index(n.depth),o=t.index(n.depth-1),i=t.index(n.depth-2),a=n.depth-2>=1&&Su(t.node(n.depth-2));r===0&&o===0&&i<=1&&a&&gFe(n.parent.type)(e.state,e.dispatch)}return l7(e.state,e.dispatch,e),!0}function DV({node:e,mark:t,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(yu.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),a=document.createElement("li");a.classList.add(yu.LIST_ITEM_WITH_CUSTOM_MARKER),a.append(o),a.append(i);const s=c=>c.type!==e.type?!1:(e=c,n(e,a),r(e,t),!0);return s(e),{dom:a,contentDOM:i,update:s}}function DFe(e,t){const n=e.node(t.depth-1),r=e.node(t.depth-2);return!Su(n)||!Cu(r)?!1:{parentItem:n,parentList:r}}function AFe(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return o<i?(e.step(new Bo(o-1,i,o,i,new gn(Ht.from(r.type.create(null,n.copy())),1,0),1,!0)),new Nd(e.doc.resolve(t.$from.pos),e.doc.resolve(i),t.depth)):t}function OFe(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth-1);return o+1<i?(e.step(new Bo(o-1,i,o+1,i,new gn(Ht.from(n.type.create(null,r.type.create(null))),2,0),0,!0)),new Nd(e.selection.$from,e.selection.$to,t.depth)):t}function MFe(e,t,n,r){return Sp({listType:n.type,itemType:r.type,tr:e})?new Nd(e.selection.$from,e.selection.$to,t.depth):t}function PFe(e){let t=ww(e.selection);if(!t)return!1;const n=DFe(e.selection.$from,t);if(!n)return!1;const{parentItem:r,parentList:o}=n;t=AFe(e,t),t=OFe(e,t),t=MFe(e,t,o,r);const i=qh(t);return typeof i!="number"||(e.lift(t,i),t=ww(e.selection),t&&kV(e,e.doc.resolve(t.end-2))),!0}var NFe=({tr:e,dispatch:t})=>PFe(e)?(t?.(e.scrollIntoView()),!0):!1;function _Fe(e,t,n){let r,o,i,a;const s=t.doc;if(n.startIndex>=1){r=e.child(n.startIndex-1),o=e,a=s.resolve(n.start).start(n.depth),i=a+1;for(let c=0;c<n.startIndex-1;c++)i+=o.child(c).nodeSize}else{const c=t.index(n.depth-1);if(c>=1){const f=t.node(n.depth-1),p=t.start(n.depth-1);if(o=f.child(c-1),!Cu(o))return!1;a=p+1;for(let m=0;m<c-1;m++)a+=f.child(m).nodeSize;if(r=o.child(o.childCount-1),i=a+o.nodeSize-r.nodeSize-1,!Su(r))return!1}else return!1}return{previousItem:r,previousList:o,previousItemStart:i,previousListStart:a}}function RFe(e,t,n){let r,o;const i=n.start,a=t.depth>=n.depth+2?t.end(n.depth+2):n.end-1,s=n.end;return a+1>=s?(r=e.slice(i,s),o=null):(r=e.slice(i,a),o=e.slice(a+1,s-1)),{selectedSlice:r,unselectedSlice:o}}function IFe(e){const{$from:t,$to:n}=e.selection,r=ww(e.selection);if(!r)return!1;const o=e.doc.resolve(r.start).node();if(!Cu(o))return!1;const i=_Fe(o,t,r);if(!i)return!1;const{previousItem:a,previousList:s,previousItemStart:c}=i,{selectedSlice:f,unselectedSlice:p}=RFe(e.doc,n,r),m=a.content.append(Ht.fromArray([o.copy(f.content)])).append(p?p.content:Ht.empty);e.deleteRange(r.start,r.end);const v=c+a.nodeSize-2,y=a.copy(m);return y.check(),e.replaceRangeWith(c-1,v+1,y),e.setSelection(s===o?Vn.between(e.doc.resolve(t.pos),e.doc.resolve(n.pos)):Vn.between(e.doc.resolve(t.pos-2),e.doc.resolve(n.pos-2))),!0}var LFe=({tr:e,dispatch:t})=>IFe(e)?(t?.(e.scrollIntoView()),!0):!1,AV=class extends Xr{get name(){return"listItemShared"}createKeymap(){const e={Tab:LFe,"Shift-Tab":NFe,Backspace:TV,"Mod-Backspace":TV};if(es.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,n)=>{const r=n.tr;return kV(r)?r:null}}}},kp=class extends aa{get name(){return"listItem"}createTags(){return[jn.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:e.parse,priority:Fr.Lowest},...t.parseDOM??[]],toDOM:n=>["li",e.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,n)=>{const r=document.createElement("div");return r.classList.add(yu.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=zn.create(t.state.doc,o);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),DV({mark:r,node:e,updateDOM:$Fe,updateMark:FFe})}:{}}createKeymap(){return{Enter:SV(this.type)}}createExtensions(){return[new AV]}toggleListItemClosed(e){return({state:{tr:t,selection:n},dispatch:r})=>{if(!Sv(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return e=tD(e)?e:!o.attrs.closed,r?.(t.setNodeMarkup(i,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return EV(e??this.type)}};rs([Cn()],kp.prototype,"toggleListItemClosed",1),rs([Cn()],kp.prototype,"liftListItemOutOfList",1),kp=rs([dr({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],kp);function $Fe(e,t){e.attrs.closed?t.classList.add(yu.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(yu.COLLAPSIBLE_LIST_ITEM_CLOSED)}function FFe(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}var Zv=class extends aa{get name(){return"bulletList"}createTags(){return[jn.Block,jn.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["ul",e.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(e,t,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),a=t.state.doc.resolve(i+1),s=a.node(a.depth-1);if(!(((r=s?.type)==null?void 0:r.name)!=="listItem")){const p=document.createElement("div");p.contentEditable="false",p.classList.add(yu.LIST_SPINE),p.addEventListener("click",m=>{const v=n(),y=t.state.doc.resolve(v+1),w=y.start(y.depth-1),C=zn.create(t.state.doc,w-1);t.dispatch(t.state.tr.setSelection(C)),this.store.commands.toggleListItemClosed(),m.preventDefault(),m.stopPropagation()}),o.append(p)}const f=document.createElement("ul");return f.classList.add(yu.UL_LIST_CONTENT),o.append(f),{dom:o,contentDOM:f}}:{}}createExtensions(){return[new kp({priority:Fr.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return YA(this.type,mo(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[A1(e,this.type),new ra(e,(t,n,r,o)=>{const i=t.tr;return i.deleteRange(r,o),Sp({listType:this.type,itemType:mo(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};rs([Cn({icon:"listUnordered",label:({t:e})=>e(SD.BULLET_LIST_LABEL)})],Zv.prototype,"toggleBulletList",1),rs([co({shortcut:on.BulletList,command:"toggleBulletList"})],Zv.prototype,"listShortcut",1),Zv=rs([dr({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Zv);var Jv=class extends aa{get name(){return"orderedList"}createTags(){return[jn.Block,jn.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>ji(n)?{...e.parse(n),order:+(n.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:n=>{const r=e.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new kp({priority:Fr.Low})]}toggleOrderedList(){return YA(this.type,mo(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[A1(e,this.type,t=>({order:+mo(t,1)}),(t,n)=>n.childCount+n.attrs.order===+mo(t,1)),new ra(e,(t,n,r,o)=>{const i=t.tr;if(i.deleteRange(r,o),!Sp({listType:this.type,itemType:mo(this.store.schema.nodes,"listItem"),tr:i}))return null;const s=+mo(n,1);if(s!==1){const c=du({selection:i.selection,types:this.type});c&&i.setNodeMarkup(c.pos,void 0,{order:s})}return i})]}};rs([Cn({icon:"listOrdered",label:({t:e})=>e(SD.ORDERED_LIST_LABEL)})],Jv.prototype,"toggleOrderedList",1),rs([co({shortcut:on.OrderedList,command:"toggleOrderedList"})],Jv.prototype,"listShortcut",1),Jv=rs([dr({})],Jv);var OV=class extends aa{get name(){return"taskListItem"}createTags(){return[jn.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return ji(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...e.parse(n)}},priority:Fr.Medium},...t.parseDOM??[]],toDOM:n=>["li",{...e.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(yu.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{t.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=t.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=e.attrs.checked,DV({node:e,mark:r,updateDOM:BFe,updateMark:zFe})}}createKeymap(){return{Enter:SV(this.type)}}createExtensions(){return[new AV]}toggleCheckboxChecked(e){let t,n;return typeof e=="boolean"?t=e:e&&(t=e.checked,n=e.$pos),({tr:r,dispatch:o})=>{const i=du({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:a,pos:s}=i,c={...a.attrs,checked:t??!a.attrs.checked};return o?.(r.setNodeMarkup(s,void 0,c)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[A1(e,this.type,t=>({checked:["x","X"].includes(cc(t,2))})),new ra(e,(t,n,r,o)=>{const i=t.tr;if(i.deleteRange(r,o),!Sp({listType:mo(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const s=["x","X"].includes(cc(n,2));if(s){const c=du({selection:i.selection,types:this.type});c&&i.setNodeMarkup(c.pos,void 0,{checked:s})}return i})]}};rs([Cn()],OV.prototype,"toggleCheckboxChecked",1);function BFe(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function zFe(e,t){t.checked=!!e.attrs.checked}var UA=class extends aa{get name(){return"taskList"}createTags(){return[jn.Block,jn.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:Fr.Medium},...t.parseDOM??[]],toDOM:n=>["ul",{...e.dom(n),"data-task-list":""},0]}}createExtensions(){return[new OV({})]}toggleTaskList(){return YA(this.type,mo(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};rs([Cn({icon:"checkboxMultipleLine",label:({t:e})=>e(SD.TASK_LIST_LABEL)})],UA.prototype,"toggleTaskList",1),rs([co({shortcut:on.TaskList,command:"toggleTaskList"})],UA.prototype,"listShortcut",1);var VFe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ep=new WeakMap,Cw=new WeakMap,Sw={},qA=0,MV=function(e){return e&&(e.host||MV(e.parentNode))},HFe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=MV(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},jFe=function(e,t,n,r){var o=HFe(t,Array.isArray(e)?e:[e]);Sw[n]||(Sw[n]=new WeakMap);var i=Sw[n],a=[],s=new Set,c=new Set(o),f=function(m){!m||s.has(m)||(s.add(m),f(m.parentNode))};o.forEach(f);var p=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(v){if(s.has(v))p(v);else{var y=v.getAttribute(r),w=y!==null&&y!=="false",C=(Ep.get(v)||0)+1,k=(i.get(v)||0)+1;Ep.set(v,C),i.set(v,k),a.push(v),C===1&&w&&Cw.set(v,!0),k===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}})};return p(t),s.clear(),qA++,function(){a.forEach(function(m){var v=Ep.get(m)-1,y=i.get(m)-1;Ep.set(m,v),i.set(m,y),v||(Cw.has(m)||m.removeAttribute(r),Cw.delete(m)),y||m.removeAttribute(n)}),qA--,qA||(Ep=new WeakMap,Ep=new WeakMap,Cw=new WeakMap,Sw={})}},WFe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||VFe(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),jFe(r,o,n,"aria-hidden")):function(){return null}},Sl,YFe=(e=document)=>Sl||(Sl=e.createElement("div"),Sl.setAttribute("id","a11y-status-message"),Sl.setAttribute("role","status"),Sl.setAttribute("aria-live","polite"),Sl.setAttribute("aria-relevant","additions text"),Object.assign(Sl.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.append(Sl),Sl);XB(500,()=>{YFe().textContent=""});function PV(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function NV(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function KA(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return NV(n.overflowY,t)||NV(n.overflowX,t)||function(r){var o=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)}(e)}return!1}function kw(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}var UFe=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,c=typeof a=="function"?a:function(Ie){return Ie!==a};if(!PV(e))throw new TypeError("Invalid target");for(var f,p,m=document.scrollingElement||document.documentElement,v=[],y=e;PV(y)&&c(y);){if((y=(p=(f=y).parentElement)==null?f.getRootNode().host||null:p)===m){v.push(y);break}y!=null&&y===document.body&&KA(y)&&!KA(document.documentElement)||y!=null&&KA(y,s)&&v.push(y)}for(var w=n.visualViewport?n.visualViewport.width:innerWidth,C=n.visualViewport?n.visualViewport.height:innerHeight,k=window.scrollX||pageXOffset,T=window.scrollY||pageYOffset,E=e.getBoundingClientRect(),_=E.height,R=E.width,P=E.top,$=E.right,z=E.bottom,q=E.left,Y=o==="start"||o==="nearest"?P:o==="end"?z:P+_/2,J=i==="center"?q+R/2:i==="end"?$:q,K=[],ee=0;ee<v.length;ee++){var re=v[ee],ne=re.getBoundingClientRect(),oe=ne.height,fe=ne.width,se=ne.top,ue=ne.right,le=ne.bottom,ce=ne.left;if(r==="if-needed"&&P>=0&&q>=0&&z<=C&&$<=w&&P>=se&&z<=le&&q>=ce&&$<=ue)return K;var Se=getComputedStyle(re),Me=parseInt(Se.borderLeftWidth,10),ze=parseInt(Se.borderTopWidth,10),ke=parseInt(Se.borderRightWidth,10),pe=parseInt(Se.borderBottomWidth,10),Oe=0,Ae=0,Pe="offsetWidth"in re?re.offsetWidth-re.clientWidth-Me-ke:0,Ve="offsetHeight"in re?re.offsetHeight-re.clientHeight-ze-pe:0,Le="offsetWidth"in re?re.offsetWidth===0?0:fe/re.offsetWidth:0,Ne="offsetHeight"in re?re.offsetHeight===0?0:oe/re.offsetHeight:0;if(m===re)Oe=o==="start"?Y:o==="end"?Y-C:o==="nearest"?kw(T,T+C,C,ze,pe,T+Y,T+Y+_,_):Y-C/2,Ae=i==="start"?J:i==="center"?J-w/2:i==="end"?J-w:kw(k,k+w,w,Me,ke,k+J,k+J+R,R),Oe=Math.max(0,Oe+T),Ae=Math.max(0,Ae+k);else{Oe=o==="start"?Y-se-ze:o==="end"?Y-le+pe+Ve:o==="nearest"?kw(se,le,oe,ze,pe+Ve,Y,Y+_,_):Y-(se+oe/2)+Ve/2,Ae=i==="start"?J-ce-Me:i==="center"?J-(ce+fe/2)+Pe/2:i==="end"?J-ue+ke+Pe:kw(ce,ue,fe,Me,ke+Pe,J,J+R,R);var Te=re.scrollLeft,He=re.scrollTop;Y+=He-(Oe=Math.max(0,Math.min(He+Oe/Ne,re.scrollHeight-oe/Ne+Ve))),J+=Te-(Ae=Math.max(0,Math.min(Te+Ae/Le,re.scrollWidth-fe/Le+Pe)))}K.push({el:re,top:Oe,left:Ae})}return K};typeof Cl=="object"&&Cl.__esModule&&Cl.default&&Cl.default,FTe(UFe);var qFe=typeof document<"u"?Nl:dn;function KFe(e){const t=Yt();return qFe(()=>{t.current=e}),t.current}function GFe(e,t){const[n,r]=Tn([]),[o,i]=Tn(()=>BA(e)),[a,s]=Tn([]),c=Yt(e),f=KFe(o);return c.current=e,xV(wp,({addCustomHandler:p})=>{const m=BA(c.current),v=p("positioner",m);return i(m),v},t),Nl(()=>{const p=o.addListener("update",v=>{const y=[];for(const{id:w,data:C,setElement:k}of v){const T=E=>{E&&k(E)};y.push({id:w,data:C,ref:T})}s(y)}),m=o.addListener("done",v=>{r(v)});return f?.recentUpdate&&o.onActiveChanged(f?.recentUpdate),()=>{p(),m()}},[o,f]),Ur(()=>{const p=[];for(const[m,{ref:v,data:y,id:w}]of a.entries()){const C=n[m],{element:k,position:T={}}=C??{},E={...LA,...tz(T)};p.push({ref:v,element:k,data:y,key:w,...E})}return p},[a,n])}function XFe(e,t){const n=t==null||tD(t)?[e]:t,r=tD(t)?t:!0,o=Yt(rv()),a=GFe(e,n)[0];return Ur(()=>a&&r?{...a,active:!0}:{...LA,ref:void 0,data:{},active:!1,key:o.current},[r,a])}function ZFe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 19h16v2H4zm0-4h11v2H4zm0-4h16v2H4zm0-8h16v2H4zm0 4h11v2H4z"}}]})(e)}function JFe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 19h16v2H4zm3-4h10v2H7zm-3-4h16v2H4zm0-8h16v2H4zm3 4h10v2H7z"}}]})(e)}function QFe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 19h16v2H4zm5-4h11v2H9zm-5-4h16v2H4zm0-8h16v2H4zm5 4h11v2H9z"}}]})(e)}function e6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M17.061 11.22A4.46 4.46 0 0 0 18 8.5C18 6.019 15.981 4 13.5 4H6v15h8c2.481 0 4.5-2.019 4.5-4.5a4.48 4.48 0 0 0-1.439-3.28zM13.5 7c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5H9V7h4.5zm.5 9H9v-3h5c.827 0 1.5.673 1.5 1.5S14.827 16 14 16z"}}]})(e)}function t6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 20V4h-3v6H9V4H6v16h3v-7h6v7z"}}]})(e)}function n6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19 7V4H9v3h2.868L9.012 17H5v3h10v-3h-2.868l2.856-10z"}}]})(e)}function r6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z"}},{tag:"path",attr:{d:"m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z"}}]})(e)}function o6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4zm16-8V6H8.023v2H18.8zM8 11h12v2H8zm0 5h12v2H8z"}}]})(e)}function i6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 11h-8c-4 0-4-1.816-4-2.5C8 7.882 8 6 12 6c2.8 0 2.99 1.678 3 2.014L16 8h1c0-1.384-1.045-4-5-4-5.416 0-6 3.147-6 4.5 0 .728.148 1.667.736 2.5H4v2h16v-2zm-8 7c-3.793 0-3.99-1.815-4-2H6c0 .04.069 4 6 4 5.221 0 6-2.819 6-4.5 0-.146-.009-.317-.028-.5h-2.006c.032.2.034.376.034.5 0 .684 0 2.5-4 2.5z"}}]})(e)}function a6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5 18h14v2H5zM6 4v6c0 3.309 2.691 6 6 6s6-2.691 6-6V4h-2v6c0 2.206-1.794 4-4 4s-4-1.794-4-4V4H6z"}}]})(e)}function s6e({onClick:e,disabled:t,isActive:n,children:r,type:o="button"},i){return W("button",{ref:i,onClick:e,disabled:t,className:Ot({"kd-editor-toolbar__action-button":!0,"kd-editor-toolbar__action-button--flat":o==="flat","kd-editor-toolbar__action-button--active":n}),type:o,children:r})}var is=or(s6e);function _V({iconSize:e=18,type:t}){const n=vc().bold(),{toggleBold:r,focus:o}=_s();function i(){r(),o()}return W(is,{type:t,isActive:n,onClick:i,disabled:!r.enabled(),children:W(e6e,{size:e})})}function RV({iconSize:e=18,type:t}){const n=vc().italic(),{toggleItalic:r,focus:o}=_s();function i(){r(),o()}return W(is,{type:t,isActive:n,onClick:i,disabled:!r.enabled(),children:W(n6e,{size:e})})}function IV({iconSize:e=18,type:t}){const n=vc().underline(),{toggleUnderline:r,focus:o}=_s();function i(){r(),o()}return W(is,{type:t,isActive:n,onClick:i,disabled:!r.enabled(),children:W(a6e,{size:e})})}function l6e(){const e=vc().strike(),{toggleStrike:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(i6e,{size:18})})}function c6e(){const e=vc().bulletList(),{toggleBulletList:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(o6e,{size:18})})}function LV(e){return ir({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"}},{tag:"path",attr:{d:"M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z"}}]})(e)}function u6e(e){return ir({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5z"}},{tag:"path",attr:{d:"M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317 0-.185-.158-.31-.361-.31-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787.588-.002.954.291.957.703a.595.595 0 0 1-.492.594v.033a.615.615 0 0 1 .569.631c.003.533-.502.8-1.051.8-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309.254 0 .424-.145.422-.35-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844.583 0 .96.326.96.756 0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508 0-.18-.147-.32-.342-.32a.33.33 0 0 0-.342.338v.041zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635V5z"}}]})(e)}function d6e(e){return ir({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}}]})(e)}function f6e(){const e=vc().orderedList(),{toggleOrderedList:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(u6e,{size:18})})}function h6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}}]})(e)}function p6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"}}]})(e)}function m6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M139.61 35.5a12 12 0 0 0-17 0L58.93 98.81l-22.7-22.12a12 12 0 0 0-17 0L3.53 92.41a12 12 0 0 0 0 17l47.59 47.4a12.78 12.78 0 0 0 17.61 0l15.59-15.62L156.52 69a12.09 12.09 0 0 0 .09-17zm0 159.19a12 12 0 0 0-17 0l-63.68 63.72-22.7-22.1a12 12 0 0 0-17 0L3.53 252a12 12 0 0 0 0 17L51 316.5a12.77 12.77 0 0 0 17.6 0l15.7-15.69 72.2-72.22a12 12 0 0 0 .09-16.9zM64 368c-26.49 0-48.59 21.5-48.59 48S37.53 464 64 464a48 48 0 0 0 0-96zm432 16H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(e)}function g6e(){const e=vc().taskList(),{toggleTaskList:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(m6e,{size:18})})}function v6e(){const{rightAlign:e}=_s();HA();function t(){e()}const n=e?.active?e?.active():void 0,r=!e.enabled();return W(is,{isActive:n,onClick:t,disabled:r,children:W(QFe,{size:18})})}function b6e(){const{leftAlign:e}=_s();HA();function t(){e()}const n=e?.active?e?.active():void 0,r=!e.enabled();return W(is,{isActive:n,onClick:t,disabled:r,children:W(ZFe,{size:18})})}function y6e(){const{centerAlign:e}=_s();HA();function t(){e()}const n=e?.active?e?.active():void 0,r=!e.enabled();return W(is,{isActive:n,onClick:t,disabled:r,children:W(JFe,{size:18})})}function x6e({toolbar:e=[]}){const t=Er();return mt("div",{className:"kd-editor-toolbar",style:{"--bs-primary":t.palette.primary.main},children:[mt("div",{className:"kd-editor-toolbar__actions-sections",children:[e.includes("BOLD")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(_V,{})}),e.includes("ITALIC")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(RV,{})}),e.includes("UNDERLINE")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(IV,{})}),e.includes("STRIKETHROUGH")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(l6e,{})})]}),mt("div",{className:"kd-editor-toolbar__actions-sections",children:[e.includes("BULLET_LIST")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(c6e,{})}),e.includes("ORDERED_LIST")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(f6e,{})}),e.includes("TASK_LIST")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(g6e,{})})]}),mt("div",{className:"kd-editor-toolbar__actions-sections",children:[e.includes("RIGHT_ALIGN")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(v6e,{})}),e.includes("CENTER_ALIGN")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(y6e,{})}),e.includes("LEFT_ALIGN")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(b6e,{})})]})]})}var w6e=k6e,$V="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",FV="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",C6e=new RegExp("^[^"+FV+"]*["+$V+"]"),S6e=new RegExp("^[^"+$V+"]*["+FV+"]");function k6e(e){return e=String(e||""),C6e.test(e)?"rtl":S6e.test(e)?"ltr":"neutral"}var E6e=ro(w6e),T6e=Object.defineProperty,D6e=Object.getOwnPropertyDescriptor,BV=(e,t,n,r)=>{for(var o=r>1?void 0:r?D6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&T6e(t,n,o),o},A6e={icon:({attrs:e})=>e?.dir==="ltr"?"textDirectionL":"textDirectionR",description:({t:e,attrs:t})=>e({...t8.DESCRIPTION,values:{dir:t?.dir}}),label:({t:e,attrs:t})=>e({...t8.LABEL,values:{dir:t?.dir}})},Ew=class extends Xr{constructor(){super(...arguments),this._ignoreNextUpdate=!1}get name(){return"bidi"}createAttributes(){return this.options.defaultDirection?{dir:this.options.defaultDirection}:{}}createSchemaAttributes(){const e="data-ignore-bidi-auto";return[{identifiers:{type:"node",tags:[jn.BlockNode],excludeNames:this.options.excludeNodes},attributes:{dir:this.dir(),ignoreBidiAutoUpdate:{default:null,parseDOM:e,toDOM:t=>t.ignoreBidiAutoUpdate?[e,"true"]:void 0}}}]}createPlugin(){return{state:{init:()=>!1,apply:e=>this._ignoreNextUpdate?(this._ignoreNextUpdate=!1,!1):B9(e)},appendTransaction:(e,t,n)=>{const r=this.getPluginState(),{autoUpdate:o,excludeNodes:i}=this.options,a=n.tr;if(!r||!o)return;const s=zV(n.selection,i);if(!s)return;const{node:c,pos:f}=s,p=c.attrs.dir,m=this.getDirection(c.textContent);if(p!==m&&!c.attrs.ignoreBidiAutoUpdate)return this._ignoreNextUpdate=!0,this.store.chain(a).updateNodeAttributes(f,{...c.attrs,dir:m}).tr()}}}onSetOptions(e){const{changes:t}=e;t.defaultDirection.changed&&this.store.updateAttributes()}dir(){return{default:this.options.defaultDirection??null,parseDOM:e=>e.getAttribute("dir")??this.getDirection(e.textContent),toDOM:(e,{node:t})=>{if(t&&t.textContent)return this.getDirection(t.textContent)??this.options.defaultDirection}}}getDirection(e){if(!Bn(e))return;const t=E6e(e);return t==="neutral"?this.options.defaultDirection:t}setTextDirection(e,t={}){return n=>{const{tr:r}=n,{selection:o}=t,i=this.store.commands.updateNodeAttributes.original,a=zV(Sa(o??r.selection,r.doc),this.options.excludeNodes);return!a||a.node.attrs.dir==e?!1:i(a.pos,{dir:e,ignoreBidiAutoUpdate:e&&!0})(n)}}};BV([Cn(A6e)],Ew.prototype,"setTextDirection",1),Ew=BV([dr({defaultOptions:{defaultDirection:void 0,autoUpdate:!1,excludeNodes:[]},staticKeys:["excludeNodes"]})],Ew);function zV(e,t){return ap({predicate:n=>!!(n.isTextblock&&n.textContent&&!t.includes(n.type.name)),selection:e})}var O6e=Object.defineProperty,M6e=Object.getOwnPropertyDescriptor,Qv=(e,t,n,r)=>{for(var o=r>1?void 0:r?M6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&O6e(t,n,o),o},P6e={icon:"bold",label:({t:e})=>e(r8.LABEL),description:({t:e})=>e(r8.DESCRIPTION)},qd=class extends dp{get name(){return"bold"}createTags(){return[jn.FormattingMark,jn.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:n=>ji(n)&&n.style.fontWeight!=="normal"?e.parse(n):!1},{style:"font-weight",getAttrs:n=>Bn(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...t.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",e.dom(n),0]}}}createInputRules(){return[Y1({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return fp({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=Sa(e??t.selection,t.doc);return n?.(t.addMark(r,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=Sa(e??t.selection,t.doc);return t.doc.rangeHasMark(r,o,this.type)?(n?.(t.removeMark(r,o,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};Qv([Cn(P6e)],qd.prototype,"toggleBold",1),Qv([Cn()],qd.prototype,"setBold",1),Qv([Cn()],qd.prototype,"removeBold",1),Qv([co({shortcut:on.Bold,command:"toggleBold"})],qd.prototype,"shortcut",1),qd=Qv([dr({defaultOptions:{weight:void 0},staticKeys:["weight"]})],qd);var N6e=Object.defineProperty,_6e=Object.getOwnPropertyDescriptor,GA=(e,t,n,r)=>{for(var o=r>1?void 0:r?_6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&N6e(t,n,o),o},R6e={icon:"italic",label:({t:e})=>e(i8.LABEL),description:({t:e})=>e(i8.DESCRIPTION)},eb=class extends dp{get name(){return"italic"}createTags(){return[jn.FontStyle,jn.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"i",getAttrs:e.parse},{tag:"em",getAttrs:e.parse},{style:"font-style=italic"},...t.parseDOM??[]],toDOM:n=>["em",e.dom(n),0]}}createKeymap(){return{"Mod-i":fp({type:this.type})}}createInputRules(){return[Y1({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),Y1({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return fp({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};GA([Cn(R6e)],eb.prototype,"toggleItalic",1),GA([co({shortcut:on.Italic,command:"toggleItalic"})],eb.prototype,"shortcut",1),eb=GA([dr({})],eb);var I6e=Object.defineProperty,L6e=Object.getOwnPropertyDescriptor,XA=(e,t,n,r)=>{for(var o=r>1?void 0:r?L6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&I6e(t,n,o),o},$6e={icon:"strikethrough",label:({t:e})=>e(a8.LABEL),description:({t:e})=>e(a8.DESCRIPTION)},tb=class extends dp{get name(){return"strike"}createTags(){return[jn.FontStyle,jn.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"s",getAttrs:e.parse},{tag:"del",getAttrs:e.parse},{tag:"strike",getAttrs:e.parse},{style:"text-decoration",getAttrs:n=>n==="line-through"?{}:!1},...t.parseDOM??[]],toDOM:n=>["s",e.dom(n),0]}}toggleStrike(){return fp({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[Y1({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};XA([Cn($6e)],tb.prototype,"toggleStrike",1),XA([co({shortcut:on.Strike,command:"toggleStrike"})],tb.prototype,"shortcut",1),tb=XA([dr({})],tb);var F6e=Object.defineProperty,B6e=Object.getOwnPropertyDescriptor,ZA=(e,t,n,r)=>{for(var o=r>1?void 0:r?B6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&F6e(t,n,o),o},z6e={icon:"underline",label:({t:e})=>e(s8.LABEL),description:({t:e})=>e(s8.DESCRIPTION)},nb=class extends dp{get name(){return"underline"}createTags(){return[jn.FontStyle,jn.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...t.parseDOM??[]],toDOM:n=>["u",e.dom(n),0]}}toggleUnderline(e){return fp({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};ZA([Cn(z6e)],nb.prototype,"toggleUnderline",1),ZA([co({shortcut:on.Underline,command:"toggleUnderline"})],nb.prototype,"shortcut",1),nb=ZA([dr({})],nb);var V6e=Object.defineProperty,H6e=Object.getOwnPropertyDescriptor,Pi=(e,t,n,r)=>{for(var o=r>1?void 0:r?H6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&V6e(t,n,o),o},j6e={label:({t:e})=>e(Zh.INCREASE_INDENT_LABEL),icon:"indentIncrease"},W6e={label:({t:e})=>e(Zh.DECREASE_INDENT_LABEL),icon:"indentDecrease"},Y6e={label:({t:e})=>e(Zh.CENTER_ALIGN_LABEL),icon:"alignCenter",active:Tw(({node:e})=>e.attrs.nodeTextAlignment==="center")},U6e={label:({t:e})=>e(Zh.JUSTIFY_ALIGN_LABEL),icon:"alignJustify",active:Tw(({node:e})=>e.attrs.nodeTextAlignment==="justify")},q6e={label:({t:e})=>e(Zh.RIGHT_ALIGN_LABEL),icon:"alignRight",active:Tw(({node:e})=>e.attrs.nodeTextAlignment==="right")},K6e={label:({t:e})=>e(Zh.LEFT_ALIGN_LABEL),icon:"alignLeft",active:Tw(({node:e})=>{const{nodeTextAlignment:t}=e.attrs;return t==="left"||t===""})};function Tw(e){return({excludeNodes:t},n)=>{const{getState:r,nodeTags:o}=n;return HV(r(),o.formattingNode,t).some(e)}}function VV(e,t,n){return n.includes(e.name)?!1:t.includes(e.name)}function HV(e,t,n){const r=[],{$from:o,$to:i}=e.selection,a=o.blockRange(i);if(!a)return[];const{parent:s,start:c,end:f}=a;return s.nodeSize-2===f-c&&VV(s.type,t,n)?[{node:s,pos:c-1}]:(e.doc.nodesBetween(c,f,(m,v)=>{if(!(v<c||v>f)&&VV(m.type,t,n))return r.push({node:m,pos:v}),!1}),r)}var jV="data-node-indent",WV="data-node-text-align",YV="data-line-height-align";function G6e(e,t){const n=$1(oz(e)),r=$1(t??"0"),o=e.length??1,i=n/o;return g1({max:o,min:0,value:Math.floor(r/i)})}var X6e=/^\d+(?:\.\d+)?$/,Z6e=/^(\d+(?:\.\d+)?)%$/;function UV(e){if(wi(e))return e;if(!e)return null;const t=e.trim(),n=t.match(Z6e);if(n)return Number.parseFloat(n[1])/100;const r=t.match(X6e);return r?Number.parseFloat(r[0]):null}var ui=class extends Xr{get name(){return"nodeFormatting"}createSchemaAttributes(){return[{identifiers:{type:"node",tags:[jn.FormattingNode],excludeNames:this.options.excludeNodes},attributes:{nodeIndent:this.nodeIndent(),nodeTextAlignment:this.nodeTextAlignment(),nodeLineHeight:this.nodeLineHeight(),style:{default:"",parseDOM:()=>"",toDOM:({nodeIndent:e,nodeTextAlignment:t,nodeLineHeight:n,style:r})=>{const o=e?this.options.indents[e]:void 0;return{style:Q9({marginLeft:o,textAlign:t&&t!=="none"?t:void 0,lineHeight:n||void 0},r)}}}}}]}setLineHeight(e){return this.setNodeAttribute(({node:t})=>{if(e!==t.attrs.nodeLineHeight)return{nodeLineHeight:e}})}setTextAlignment(e){return this.setNodeAttribute(({node:t})=>{if(e!==t.attrs.nodeTextAlignment)return{nodeTextAlignment:e}})}setIndent(e){return this.setNodeAttribute(({node:t})=>{const n=t.attrs.nodeIndent??0,r=e==="-1"?n-1:e==="+1"?n+1:e,o=g1({min:0,max:this.options.indents.length-1,value:r});if(o!==n)return{nodeIndent:o}})}centerAlign(){return this.setTextAlignment("center")}justifyAlign(){return this.setTextAlignment("justify")}leftAlign(){return this.setTextAlignment("left")}rightAlign(){return this.setTextAlignment("right")}increaseIndent(){return e=>this.setIndent("+1")(e)}decreaseIndent(){return e=>this.setIndent("-1")(e)}centerAlignShortcut(e){return this.centerAlign()(e)}justifyAlignShortcut(e){return this.justifyAlign()(e)}leftAlignShortcut(e){return this.leftAlign()(e)}rightAlignShortcut(e){return this.rightAlign()(e)}increaseIndentShortcut(e){return this.increaseIndent()(e)}decreaseIndentShortcut(e){return this.decreaseIndent()(e)}nodeIndent(){return{default:null,parseDOM:e=>e.getAttribute(jV)??G6e(this.options.indents,e.style.marginLeft),toDOM:e=>{if(!e.nodeIndent)return;const t=`${e.nodeIndent}`;if(this.options.indents[e.nodeIndent])return{[jV]:t}}}}nodeTextAlignment(){return{default:null,parseDOM:e=>e.getAttribute(WV)??e.style.textAlign,toDOM:e=>{const t=e.nodeTextAlignment;if(!(!t||t==="none"))return{[WV]:t}}}}nodeLineHeight(){return{default:null,parseDOM:e=>{const t=e.getAttribute(YV);return UV(t)??UV(e.style.lineHeight)},toDOM:e=>{const t=e.nodeLineHeight;if(t)return{[YV]:t.toString()}}}}setNodeAttribute(e){return t=>{const{tr:n,dispatch:r}=t,o=HV(n,this.store.nodeTags.formattingNode,this.options.excludeNodes);if(ks(o))return!1;if(!r)return!0;const i=[];for(const a of o){const{node:s,pos:c}=a,f=e(a);f&&i.push([c,{...s.attrs,...f}])}if(ks(i))return!1;if(!r)return!0;for(const[a,s]of i)n.setNodeMarkup(a,void 0,s);return r(n),!0}}};Pi([Cn()],ui.prototype,"setLineHeight",1),Pi([Cn()],ui.prototype,"setTextAlignment",1),Pi([Cn()],ui.prototype,"setIndent",1),Pi([Cn(Y6e)],ui.prototype,"centerAlign",1),Pi([Cn(U6e)],ui.prototype,"justifyAlign",1),Pi([Cn(K6e)],ui.prototype,"leftAlign",1),Pi([Cn(q6e)],ui.prototype,"rightAlign",1),Pi([Cn(j6e)],ui.prototype,"increaseIndent",1),Pi([Cn(W6e)],ui.prototype,"decreaseIndent",1),Pi([co({shortcut:on.CenterAlignment,command:"centerAlign"})],ui.prototype,"centerAlignShortcut",1),Pi([co({shortcut:on.JustifyAlignment,command:"justifyAlign"})],ui.prototype,"justifyAlignShortcut",1),Pi([co({shortcut:on.LeftAlignment,command:"leftAlign"})],ui.prototype,"leftAlignShortcut",1),Pi([co({shortcut:on.RightAlignment,command:"rightAlign"})],ui.prototype,"rightAlignShortcut",1),Pi([co({shortcut:on.IncreaseIndent,command:"increaseIndent",priority:Fr.Low})],ui.prototype,"increaseIndentShortcut",1),Pi([co({shortcut:on.DecreaseIndent,command:"decreaseIndent",priority:Fr.Medium})],ui.prototype,"decreaseIndentShortcut",1),ui=Pi([dr({defaultOptions:{indents:["0","20px","40px","60px","80px","100px","120px","140px","160px","180px","200px"],excludeNodes:[]},staticKeys:["indents"]})],ui);var J6e=Object.defineProperty,Q6e=Object.getOwnPropertyDescriptor,qV=(e,t,n,r)=>{for(var o=r>1?void 0:r?Q6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&J6e(t,n,o),o},{LABEL:eBe}=sAe,tBe={icon:({attrs:e})=>`h${e?.level??"1"}`,label:({t:e,attrs:t})=>e({...eBe,values:{level:t?.level}})},nBe=[on.H1,on.H2,on.H3,on.H4,on.H5,on.H6],Dw=class extends aa{get name(){return"heading"}createTags(){return[jn.Block,jn.TextBlock,jn.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...e.parse(r),level:n})})),...t.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,e.dom(n),0]:[`h${this.options.defaultLevel}`,e.dom(n),0]}}toggleHeading(e={}){return iA({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(fr),n=In(),r=[];for(const o of this.options.levels){const i=nBe[o-1]??on.H1;n[i]=kv(this.type,{level:o}),r.push({attrs:{level:o},shortcut:e(i)[0]})}return t.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(e=>$Ae(new RegExp(`^(#{1,${e}})\\s$`),this.type,()=>({level:e})))}createPasteRules(){return this.options.levels.map(e=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${e}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:e}),startOfTextBlock:!0}))}};qV([Cn(tBe)],Dw.prototype,"toggleHeading",1),Dw=qV([dr({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Dw);var rBe=Object.defineProperty,oBe=Object.getOwnPropertyDescriptor,iBe=(e,t,n,r)=>{for(var o=r>1?void 0:r?oBe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&rBe(t,n,o),o},aBe=[[/--$/,"\u2014"],[/\.{3}$/,"\u2026"],[/<-$/,"\u2190"],[/->$/,"\u2192"],[/←>$/,"\u2194"],[/\(c\)$/,"\xA9"],[/\(tm\)$/,"\u2122"],[/\(r\)$/,"\xAE"],[/1\/2$/,"\xBD"],[/\+\/-$/,"\xB1"],[/!=$/,"\u2260"],[/<<$/,"\xAB"],[/>>$/,"\xBB"],[/\^2$/,"\xB2"],[/\^3$/,"\xB3"],[/1\/4$/,"\xBC"],[/3\/4$/,"\xBE"]],JA=class extends Xr{get name(){return"shortcuts"}createInputRules(){return aBe.map(([e,t])=>_Pe({regexp:e,transformMatch:()=>t}))}};JA=iBe([dr({defaultOptions:{}})],JA);var sBe=cBe,lBe=Object.prototype.hasOwnProperty;function cBe(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)lBe.call(n,r)&&(e[r]=n[r])}return e}var KV=GV,QA=GV.prototype;QA.space=null,QA.normal={},QA.property={};function GV(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}var XV=sBe,uBe=KV,dBe=fBe;function fBe(e){for(var t=e.length,n=[],r=[],o=-1,i,a;++o<t;)i=e[o],n.push(i.property),r.push(i.normal),a=i.space;return new uBe(XV.apply(null,n),XV.apply(null,r),a)}var eO=hBe;function hBe(e){return e.toLowerCase()}var ZV=JV,as=JV.prototype;as.space=null,as.attribute=null,as.property=null,as.boolean=!1,as.booleanish=!1,as.overloadedBoolean=!1,as.number=!1,as.commaSeparated=!1,as.spaceSeparated=!1,as.commaOrSpaceSeparated=!1,as.mustUseProperty=!1,as.defined=!1;function JV(e,t){this.property=e,this.attribute=t}var kl={},pBe=0;kl.boolean=Kd(),kl.booleanish=Kd(),kl.overloadedBoolean=Kd(),kl.number=Kd(),kl.spaceSeparated=Kd(),kl.commaSeparated=Kd(),kl.commaOrSpaceSeparated=Kd();function Kd(){return Math.pow(2,++pBe)}var QV=ZV,eH=kl,tH=tO;tO.prototype=new QV,tO.prototype.defined=!0;var nH=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],mBe=nH.length;function tO(e,t,n,r){var o=-1,i;for(rH(this,"space",r),QV.call(this,e,t);++o<mBe;)i=nH[o],rH(this,i,(n&eH[i])===eH[i])}function rH(e,t,n){n&&(e[t]=n)}var oH=eO,gBe=KV,vBe=tH,rb=bBe;function bBe(e){var t=e.space,n=e.mustUseProperty||[],r=e.attributes||{},o=e.properties,i=e.transform,a={},s={},c,f;for(c in o)f=new vBe(c,i(r,c),o[c],t),n.indexOf(c)!==-1&&(f.mustUseProperty=!0),a[c]=f,s[oH(c)]=c,s[oH(f.attribute)]=c;return new gBe(a,s,t)}var yBe=rb,xBe=yBe({space:"xlink",transform:wBe,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function wBe(e,t){return"xlink:"+t.slice(5).toLowerCase()}var CBe=rb,SBe=CBe({space:"xml",transform:kBe,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function kBe(e,t){return"xml:"+t.slice(3).toLowerCase()}var EBe=TBe;function TBe(e,t){return t in e?e[t]:t}var DBe=EBe,iH=ABe;function ABe(e,t){return DBe(e,t.toLowerCase())}var OBe=rb,MBe=iH,PBe=OBe({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:MBe,properties:{xmlns:null,xmlnsXLink:null}}),nO=kl,NBe=rb,la=nO.booleanish,ss=nO.number,Gd=nO.spaceSeparated,_Be=NBe({transform:RBe,properties:{ariaActiveDescendant:null,ariaAtomic:la,ariaAutoComplete:null,ariaBusy:la,ariaChecked:la,ariaColCount:ss,ariaColIndex:ss,ariaColSpan:ss,ariaControls:Gd,ariaCurrent:null,ariaDescribedBy:Gd,ariaDetails:null,ariaDisabled:la,ariaDropEffect:Gd,ariaErrorMessage:null,ariaExpanded:la,ariaFlowTo:Gd,ariaGrabbed:la,ariaHasPopup:null,ariaHidden:la,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gd,ariaLevel:ss,ariaLive:null,ariaModal:la,ariaMultiLine:la,ariaMultiSelectable:la,ariaOrientation:null,ariaOwns:Gd,ariaPlaceholder:null,ariaPosInSet:ss,ariaPressed:la,ariaReadOnly:la,ariaRelevant:null,ariaRequired:la,ariaRoleDescription:Gd,ariaRowCount:ss,ariaRowIndex:ss,ariaRowSpan:ss,ariaSelected:la,ariaSetSize:ss,ariaSort:null,ariaValueMax:ss,ariaValueMin:ss,ariaValueNow:ss,ariaValueText:null,role:null}});function RBe(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}var Tp=kl,IBe=rb,LBe=iH,ar=Tp.boolean,$Be=Tp.overloadedBoolean,ob=Tp.booleanish,uo=Tp.number,Yi=Tp.spaceSeparated,Aw=Tp.commaSeparated,FBe=IBe({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:LBe,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Aw,acceptCharset:Yi,accessKey:Yi,action:null,allow:null,allowFullScreen:ar,allowPaymentRequest:ar,allowUserMedia:ar,alt:null,as:null,async:ar,autoCapitalize:null,autoComplete:Yi,autoFocus:ar,autoPlay:ar,capture:ar,charSet:null,checked:ar,cite:null,className:Yi,cols:uo,colSpan:null,content:null,contentEditable:ob,controls:ar,controlsList:Yi,coords:uo|Aw,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ar,defer:ar,dir:null,dirName:null,disabled:ar,download:$Be,draggable:ob,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ar,formTarget:null,headers:Yi,height:uo,hidden:ar,high:uo,href:null,hrefLang:null,htmlFor:Yi,httpEquiv:Yi,id:null,imageSizes:null,imageSrcSet:Aw,inputMode:null,integrity:null,is:null,isMap:ar,itemId:null,itemProp:Yi,itemRef:Yi,itemScope:ar,itemType:Yi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ar,low:uo,manifest:null,max:null,maxLength:uo,media:null,method:null,min:null,minLength:uo,multiple:ar,muted:ar,name:null,nonce:null,noModule:ar,noValidate:ar,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ar,optimum:uo,pattern:null,ping:Yi,placeholder:null,playsInline:ar,poster:null,preload:null,readOnly:ar,referrerPolicy:null,rel:Yi,required:ar,reversed:ar,rows:uo,rowSpan:uo,sandbox:Yi,scope:null,scoped:ar,seamless:ar,selected:ar,shape:null,size:uo,sizes:null,slot:null,span:uo,spellCheck:ob,src:null,srcDoc:null,srcLang:null,srcSet:Aw,start:uo,step:null,style:null,tabIndex:uo,target:null,title:null,translate:null,type:null,typeMustMatch:ar,useMap:null,value:ob,width:uo,wrap:null,align:null,aLink:null,archive:Yi,axis:null,background:null,bgColor:null,border:uo,borderColor:null,bottomMargin:uo,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ar,declare:ar,event:null,face:null,frame:null,frameBorder:null,hSpace:uo,leftMargin:uo,link:null,longDesc:null,lowSrc:null,marginHeight:uo,marginWidth:uo,noResize:ar,noHref:ar,noShade:ar,noWrap:ar,object:null,profile:null,prompt:null,rev:null,rightMargin:uo,rules:null,scheme:null,scrolling:ob,standby:null,summary:null,text:null,topMargin:uo,valueType:null,version:null,vAlign:null,vLink:null,vSpace:uo,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ar,disableRemotePlayback:ar,prefix:null,property:null,results:uo,security:null,unselectable:null}}),BBe=dBe,zBe=xBe,VBe=SBe,HBe=PBe,jBe=_Be,WBe=FBe,YBe=BBe([VBe,zBe,HBe,jBe,WBe]),UBe=eO,qBe=tH,KBe=ZV,rO="data",GBe=JBe,XBe=/^data[-\w.:]+$/i,aH=/-[a-z]/g,ZBe=/[A-Z]/g;function JBe(e,t){var n=UBe(t),r=t,o=KBe;return n in e.normal?e.property[e.normal[n]]:(n.length>4&&n.slice(0,4)===rO&&XBe.test(t)&&(t.charAt(4)==="-"?r=QBe(t):t=eze(t),o=qBe),new o(r,t))}function QBe(e){var t=e.slice(5).replace(aH,nze);return rO+t.charAt(0).toUpperCase()+t.slice(1)}function eze(e){var t=e.slice(4);return aH.test(t)?e:(t=t.replace(ZBe,tze),t.charAt(0)!=="-"&&(t="-"+t),rO+t)}function tze(e){return"-"+e.toLowerCase()}function nze(e){return e.charAt(1).toUpperCase()}var rze=oze,sH=/[#.]/g;function oze(e,t){for(var n=e||"",r=t||"div",o={},i=0,a,s,c;i<n.length;)sH.lastIndex=i,c=sH.exec(n),a=n.slice(i,c?c.index:n.length),a&&(s?s==="#"?o.id=a:o.className?o.className.push(a):o.className=[a]:r=a,i+=a.length),c&&(s=c[0],i++);return{type:"element",tagName:r,properties:o,children:[]}}var oO={};oO.parse=sze,oO.stringify=lze;var lH="",ize=" ",aze=/[ \t\n\r\f]+/g;function sze(e){var t=String(e||lH).trim();return t===lH?[]:t.split(aze)}function lze(e){return e.join(ize).trim()}var iO={};iO.parse=cze,iO.stringify=uze;var aO=",",cH=" ",ib="";function cze(e){for(var t=[],n=String(e||ib),r=n.indexOf(aO),o=0,i=!1,a;!i;)r===-1&&(r=n.length,i=!0),a=n.slice(o,r).trim(),(a||!i)&&t.push(a),o=r+1,r=n.indexOf(aO,o);return t}function uze(e,t){var n=t||{},r=n.padLeft===!1?ib:cH,o=n.padRight?cH:ib;return e[e.length-1]===ib&&(e=e.concat(ib)),e.join(o+aO+r).trim()}var dze=GBe,uH=eO,fze=rze,dH=oO.parse,fH=iO.parse,hze=mze,pze={}.hasOwnProperty;function mze(e,t,n){var r=n?xze(n):null;return o;function o(a,s){var c=fze(a,t),f=Array.prototype.slice.call(arguments,2),p=c.tagName.toLowerCase(),m;if(c.tagName=r&&pze.call(r,p)?r[p]:p,s&&gze(s,c)&&(f.unshift(s),s=null),s)for(m in s)i(c.properties,m,s[m]);return hH(c.children,f),c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}function i(a,s,c){var f,p,m;c==null||c!==c||(f=dze(e,s),p=f.property,m=c,typeof m=="string"&&(f.spaceSeparated?m=dH(m):f.commaSeparated?m=fH(m):f.commaOrSpaceSeparated&&(m=dH(fH(m).join(" ")))),p==="style"&&typeof c!="string"&&(m=yze(m)),p==="className"&&a.className&&(m=a.className.concat(m)),a[p]=bze(f,p,m))}}function gze(e,t){return typeof e=="string"||"length"in e||vze(t.tagName,e)}function vze(e,t){var n=t.type;return e==="input"||!n||typeof n!="string"?!1:typeof t.children=="object"&&"length"in t.children?!0:(n=n.toLowerCase(),e==="button"?n!=="menu"&&n!=="submit"&&n!=="reset"&&n!=="button":"value"in t)}function hH(e,t){var n,r;if(typeof t=="string"||typeof t=="number"){e.push({type:"text",value:String(t)});return}if(typeof t=="object"&&"length"in t){for(n=-1,r=t.length;++n<r;)hH(e,t[n]);return}if(typeof t!="object"||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}function bze(e,t,n){var r,o,i;if(typeof n!="object"||!("length"in n))return pH(e,t,n);for(o=n.length,r=-1,i=[];++r<o;)i[r]=pH(e,t,n[r]);return i}function pH(e,t,n){var r=n;return e.number||e.positiveNumber?!isNaN(r)&&r!==""&&(r=Number(r)):(e.boolean||e.overloadedBoolean)&&typeof r=="string"&&(r===""||uH(n)===uH(t))&&(r=!0),r}function yze(e){var t=[],n;for(n in e)t.push([n,e[n]].join(": "));return t.join("; ")}function xze(e){for(var t=e.length,n=-1,r={},o;++n<t;)o=e[n],r[o.toLowerCase()]=o;return r}var wze=YBe,Cze=hze,mH=Cze(wze,"div");mH.displayName="html";var Sze=mH,kze=Sze,Eze="\xC6",Tze="&",Dze="\xC1",Aze="\xC2",Oze="\xC0",Mze="\xC5",Pze="\xC3",Nze="\xC4",_ze="\xA9",Rze="\xC7",Ize="\xD0",Lze="\xC9",$ze="\xCA",Fze="\xC8",Bze="\xCB",zze=">",Vze="\xCD",Hze="\xCE",jze="\xCC",Wze="\xCF",Yze="<",Uze="\xD1",qze="\xD3",Kze="\xD4",Gze="\xD2",Xze="\xD8",Zze="\xD5",Jze="\xD6",Qze='"',e8e="\xAE",t8e="\xDE",n8e="\xDA",r8e="\xDB",o8e="\xD9",i8e="\xDC",a8e="\xDD",s8e="\xE1",l8e="\xE2",c8e="\xB4",u8e="\xE6",d8e="\xE0",f8e="&",h8e="\xE5",p8e="\xE3",m8e="\xE4",g8e="\xA6",v8e="\xE7",b8e="\xB8",y8e="\xA2",x8e="\xA9",w8e="\xA4",C8e="\xB0",S8e="\xF7",k8e="\xE9",E8e="\xEA",T8e="\xE8",D8e="\xF0",A8e="\xEB",O8e="\xBD",M8e="\xBC",P8e="\xBE",N8e=">",_8e="\xED",R8e="\xEE",I8e="\xA1",L8e="\xEC",$8e="\xBF",F8e="\xEF",B8e="\xAB",z8e="<",V8e="\xAF",H8e="\xB5",j8e="\xB7",W8e="\xA0",Y8e="\xAC",U8e="\xF1",q8e="\xF3",K8e="\xF4",G8e="\xF2",X8e="\xAA",Z8e="\xBA",J8e="\xF8",Q8e="\xF5",e9e="\xF6",t9e="\xB6",n9e="\xB1",r9e="\xA3",o9e='"',i9e="\xBB",a9e="\xAE",s9e="\xA7",l9e="\xAD",c9e="\xB9",u9e="\xB2",d9e="\xB3",f9e="\xDF",h9e="\xFE",p9e="\xD7",m9e="\xFA",g9e="\xFB",v9e="\xF9",b9e="\xA8",y9e="\xFC",x9e="\xFD",w9e="\xA5",C9e="\xFF",S9e={AElig:Eze,AMP:Tze,Aacute:Dze,Acirc:Aze,Agrave:Oze,Aring:Mze,Atilde:Pze,Auml:Nze,COPY:_ze,Ccedil:Rze,ETH:Ize,Eacute:Lze,Ecirc:$ze,Egrave:Fze,Euml:Bze,GT:zze,Iacute:Vze,Icirc:Hze,Igrave:jze,Iuml:Wze,LT:Yze,Ntilde:Uze,Oacute:qze,Ocirc:Kze,Ograve:Gze,Oslash:Xze,Otilde:Zze,Ouml:Jze,QUOT:Qze,REG:e8e,THORN:t8e,Uacute:n8e,Ucirc:r8e,Ugrave:o8e,Uuml:i8e,Yacute:a8e,aacute:s8e,acirc:l8e,acute:c8e,aelig:u8e,agrave:d8e,amp:f8e,aring:h8e,atilde:p8e,auml:m8e,brvbar:g8e,ccedil:v8e,cedil:b8e,cent:y8e,copy:x8e,curren:w8e,deg:C8e,divide:S8e,eacute:k8e,ecirc:E8e,egrave:T8e,eth:D8e,euml:A8e,frac12:O8e,frac14:M8e,frac34:P8e,gt:N8e,iacute:_8e,icirc:R8e,iexcl:I8e,igrave:L8e,iquest:$8e,iuml:F8e,laquo:B8e,lt:z8e,macr:V8e,micro:H8e,middot:j8e,nbsp:W8e,not:Y8e,ntilde:U8e,oacute:q8e,ocirc:K8e,ograve:G8e,ordf:X8e,ordm:Z8e,oslash:J8e,otilde:Q8e,ouml:e9e,para:t9e,plusmn:n9e,pound:r9e,quot:o9e,raquo:i9e,reg:a9e,sect:s9e,shy:l9e,sup1:c9e,sup2:u9e,sup3:d9e,szlig:f9e,thorn:h9e,times:p9e,uacute:m9e,ucirc:g9e,ugrave:v9e,uml:b9e,uuml:y9e,yacute:x9e,yen:w9e,yuml:C9e},k9e={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},gH=E9e;function E9e(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}var T9e=D9e;function D9e(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var A9e=O9e;function O9e(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var M9e=A9e,P9e=gH,N9e=_9e;function _9e(e){return M9e(e)||P9e(e)}var Ow,R9e=59,I9e=L9e;function L9e(e){var t="&"+e+";",n;return Ow=Ow||document.createElement("i"),Ow.innerHTML=t,n=Ow.textContent,n.charCodeAt(n.length-1)===R9e&&e!=="semi"||n===t?!1:n}var vH=S9e,bH=k9e,$9e=gH,F9e=T9e,yH=N9e,B9e=I9e,z9e=Q9e,V9e={}.hasOwnProperty,Dp=String.fromCharCode,H9e=Function.prototype,xH={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},j9e=9,wH=10,W9e=12,Y9e=32,CH=38,U9e=59,q9e=60,K9e=61,G9e=35,X9e=88,Z9e=120,J9e=65533,Ap="named",sO="hexadecimal",lO="decimal",cO={};cO[sO]=16,cO[lO]=10;var Mw={};Mw[Ap]=yH,Mw[lO]=$9e,Mw[sO]=F9e;var SH=1,kH=2,EH=3,TH=4,DH=5,uO=6,AH=7,ku={};ku[SH]="Named character references must be terminated by a semicolon",ku[kH]="Numeric character references must be terminated by a semicolon",ku[EH]="Named character references cannot be empty",ku[TH]="Numeric character references cannot be empty",ku[DH]="Named character references must be known",ku[uO]="Numeric character references cannot be disallowed",ku[AH]="Numeric character references cannot be outside the permissible Unicode range";function Q9e(e,t){var n={},r,o;t||(t={});for(o in xH)r=t[o],n[o]=r??xH[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),e7e(e,n)}function e7e(e,t){var n=t.additional,r=t.nonTerminated,o=t.text,i=t.reference,a=t.warning,s=t.textContext,c=t.referenceContext,f=t.warningContext,p=t.position,m=t.indent||[],v=e.length,y=0,w=-1,C=p.column||1,k=p.line||1,T="",E=[],_,R,P,$,z,q,Y,J,K,ee,re,ne,oe,fe,se,ue,le,ce,Se;for(typeof n=="string"&&(n=n.charCodeAt(0)),ue=Me(),J=a?ze:H9e,y--,v++;++y<v;)if(z===wH&&(C=m[w]||1),z=e.charCodeAt(y),z===CH){if(Y=e.charCodeAt(y+1),Y===j9e||Y===wH||Y===W9e||Y===Y9e||Y===CH||Y===q9e||Y!==Y||n&&Y===n){T+=Dp(z),C++;continue}for(oe=y+1,ne=oe,Se=oe,Y===G9e?(Se=++ne,Y=e.charCodeAt(Se),Y===X9e||Y===Z9e?(fe=sO,Se=++ne):fe=lO):fe=Ap,_="",re="",$="",se=Mw[fe],Se--;++Se<v&&(Y=e.charCodeAt(Se),!!se(Y));)$+=Dp(Y),fe===Ap&&V9e.call(vH,$)&&(_=$,re=vH[$]);P=e.charCodeAt(Se)===U9e,P&&(Se++,R=fe===Ap?B9e($):!1,R&&(_=$,re=R)),ce=1+Se-oe,!P&&!r||($?fe===Ap?(P&&!re?J(DH,1):(_!==$&&(Se=ne+_.length,ce=1+Se-ne,P=!1),P||(K=_?SH:EH,t.attribute?(Y=e.charCodeAt(Se),Y===K9e?(J(K,ce),re=null):yH(Y)?re=null:J(K,ce)):J(K,ce))),q=re):(P||J(kH,ce),q=parseInt($,cO[fe]),t7e(q)?(J(AH,ce),q=Dp(J9e)):q in bH?(J(uO,ce),q=bH[q]):(ee="",n7e(q)&&J(uO,ce),q>65535&&(q-=65536,ee+=Dp(q>>>10|55296),q=56320|q&1023),q=ee+Dp(q))):fe!==Ap&&J(TH,ce)),q?(ke(),ue=Me(),y=Se-1,C+=Se-oe+1,E.push(q),le=Me(),le.offset++,i&&i.call(c,q,{start:ue,end:le},e.slice(oe-1,Se)),ue=le):($=e.slice(oe-1,Se),T+=$,C+=$.length,y=Se-1)}else z===10&&(k++,w++,C=0),z===z?(T+=Dp(z),C++):ke();return E.join("");function Me(){return{line:k,column:C,offset:y+(p.offset||0)}}function ze(pe,Oe){var Ae=Me();Ae.column+=Oe,Ae.offset+=Oe,a.call(f,ku[pe],Ae,pe)}function ke(){T&&(E.push(T),o&&o.call(s,T,{start:ue,end:Me()}),T="")}}function t7e(e){return e>=55296&&e<=57343||e>1114111}function n7e(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var OH={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
1335
|
+
Message: ${e}`),e}}const gu=e=>typeof e=="string",M3e=e=>typeof e=="function",B7=new Map,z7="en";function CA(e){return[...Array.isArray(e)?e:[e],z7]}function V7(e,t,n){const r=CA(e);return sw(()=>lw("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(gu(t)?new Date(t):t)}function SA(e,t,n){const r=CA(e);return sw(()=>lw("number",r,n),()=>new Intl.NumberFormat(r,n)).format(t)}function H7(e,t,n,{offset:r=0,...o}){const i=CA(e),a=t?sw(()=>lw("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):sw(()=>lw("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return o[n]??o[a.select(n-r)]??o.other}function sw(e,t){const n=e();let r=B7.get(n);return r||(r=t(),B7.set(n,r)),r}function lw(e,t,n){const r=t.join("-");return`${e}-${r}-${JSON.stringify(n)}`}const j7=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,W7="%__lingui_octothorpe__%",P3e=(e,t,n={})=>{const r=t||e,o=a=>typeof a=="object"?a:n[a]||{style:a},i=(a,s)=>{const c=Object.keys(n).length?o("number"):void 0,f=SA(r,a,c);return s.replace(new RegExp(W7,"g"),f)};return{plural:(a,s)=>{const{offset:c=0}=s,f=H7(r,!1,a,s);return i(a-c,f)},selectordinal:(a,s)=>{const{offset:c=0}=s,f=H7(r,!0,a,s);return i(a-c,f)},select:N3e,number:(a,s)=>SA(r,a,o(s)),date:(a,s)=>V7(r,a,o(s))}},N3e=(e,t)=>t[e]??t.other;function _3e(e,t,n){return(r={},o)=>{const i=P3e(t,n,o),a=c=>Array.isArray(c)?c.reduce((f,p)=>{if(p==="#")return f+W7;if(gu(p))return f+p;const[m,v,y]=p;let w={};v==="plural"||v==="selectordinal"||v==="select"?Object.entries(y).forEach(([k,T])=>{w[k]=a(T)}):w=y;let C;if(v){const k=i[v];C=k(r[m],w)}else C=r[m];return C==null?f:f+C},""):c,s=a(e);return gu(s)&&j7.test(s)?P7.unraw(s.trim()):gu(s)?s.trim():s?String(s):""}}var R3e=Object.defineProperty,I3e=(e,t,n)=>t in e?R3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L3e=(e,t,n)=>(I3e(e,typeof t!="symbol"?t+"":t,n),n);class $3e{constructor(){L3e(this,"_events",{})}on(t,n){var r;return(r=this._events)[t]??(r[t]=[]),this._events[t].push(n),()=>this.removeListener(t,n)}removeListener(t,n){const r=this._getListeners(t);if(!r)return;const o=r.indexOf(n);~o&&r.splice(o,1)}emit(t,...n){const r=this._getListeners(t);r&&r.map(o=>o.apply(this,n))}_getListeners(t){const n=this._events[t];return Array.isArray(n)?n:!1}}var F3e=Object.defineProperty,B3e=(e,t,n)=>t in e?F3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vp=(e,t,n)=>(B3e(e,typeof t!="symbol"?t+"":t,n),n);class z3e extends $3e{constructor(t){super(),vp(this,"_locale",""),vp(this,"_locales"),vp(this,"_localeData",{}),vp(this,"_messages",{}),vp(this,"_missing"),vp(this,"t",this._.bind(this)),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(typeof t.locale=="string"||t.locales)&&this.activate(t.locale??z7,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(t,n){const r=this._localeData[t];r?Object.assign(r,n):this._localeData[t]=n}loadLocaleData(t,n){n!=null?this._loadLocaleData(t,n):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,n){const r=this._messages[t];r?Object.assign(r,n):this._messages[t]=n}load(t,n){typeof t=="string"&&typeof n=="object"?this._load(t,n):Object.entries(t).forEach(([r,o])=>this._load(r,o)),this.emit("change")}loadAndActivate({locale:t,locales:n,messages:r}){this._locale=t,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,n){process.env.NODE_ENV!=="production"&&(this._messages[t]||console.warn(`Messages for locale "${t}" not loaded.`)),this._locale=t,this._locales=n,this.emit("change")}_(t,n,r){let o=r?.message;gu(t)||(n=t.values||n,o=t.message,t=t.id);const i=this.messages[t],a=i===void 0,s=this._missing;if(s&&a)return M3e(s)?s(this._locale,t):s;a&&this.emit("missing",{id:t,locale:this._locale});let c=i||o||t;return process.env.NODE_ENV!=="production"&&(c=gu(c)?O3e(c):c),gu(c)&&j7.test(c)?JSON.parse(`"${c}"`):gu(c)?c:_3e(c,this._locale,this._locales)(n,r?.formats)}date(t,n){return V7(this._locales||this._locale,t,n)}number(t,n){return SA(this._locales||this._locale,t,n)}}function V3e(e={}){return new z3e(e)}const cw=V3e();function fn(e,t){return t?"other":e==1?"one":"other"}function hc(e,t){return t?"other":e==0||e==1?"one":"other"}function sa(e,t){var n=String(e).split("."),r=!n[1];return t?"other":e==1&&r?"one":"other"}function zr(e,t){return"other"}function vu(e,t){return t?"other":e==1?"one":e==2?"two":"other"}const H3e=zr,j3e=fn,W3e=hc;function Y3e(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const U3e=fn;function q3e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function K3e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==0?"zero":e==1?"one":e==2?"two":o>=3&&o<=10?"few":o>=11&&o<=99?"many":"other"}function G3e(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const X3e=fn,Z3e=sa;function J3e(e,t){var n=String(e).split("."),r=n[0],o=r.slice(-1),i=r.slice(-2),a=r.slice(-3);return t?o==1||o==2||o==5||o==7||o==8||i==20||i==50||i==70||i==80?"one":o==3||o==4||a==100||a==200||a==300||a==400||a==500||a==600||a==700||a==800||a==900?"few":r==0||o==6||i==40||i==60||i==90?"many":"other":e==1?"one":"other"}function Q3e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?(o==2||o==3)&&i!=12&&i!=13?"few":"other":o==1&&i!=11?"one":o>=2&&o<=4&&(i<12||i>14)?"few":r&&o==0||o>=5&&o<=9||i>=11&&i<=14?"many":"other"}const e_e=fn,t_e=fn,n_e=fn,r_e=hc,o_e=zr;function i_e(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const a_e=zr;function s_e(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2),a=r&&n[0].slice(-6);return t?"other":o==1&&i!=11&&i!=71&&i!=91?"one":o==2&&i!=12&&i!=72&&i!=92?"two":(o==3||o==4||o==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":e!=0&&r&&a==0?"many":"other"}const l_e=fn;function c_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}function u_e(e,t){var n=String(e).split("."),r=!n[1];return t?e==1||e==3?"one":e==2?"two":e==4?"few":"other":e==1&&r?"one":"other"}const d_e=fn;function f_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=o.slice(-1);return t?"other":i&&(r==1||r==2||r==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"}const h_e=fn,p_e=fn,m_e=fn;function g_e(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":e==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function v_e(e,t){return t?e==0||e==7||e==8||e==9?"zero":e==1?"one":e==2?"two":e==3||e==4?"few":e==5||e==6?"many":"other":e==0?"zero":e==1?"one":e==2?"two":e==3?"few":e==6?"many":"other"}function b_e(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e;return t?"other":e==1||!o&&(r==0||r==1)?"one":"other"}const y_e=sa;function x_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-2),s=o.slice(-2);return t?"other":i&&a==1||s==1?"one":i&&a==2||s==2?"two":i&&(a==3||a==4)||s==3||s==4?"few":"other"}const w_e=fn,C_e=zr,S_e=fn,k_e=fn;function E_e(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),a=o&&n[0].slice(-2);return t?i==1&&a!=11?"one":i==2&&a!=12?"two":i==3&&a!=13?"few":"other":e==1&&r?"one":"other"}const T_e=fn,D_e=fn,A_e=sa,O_e=fn;function M_e(e,t){return t?"other":e>=0&&e<=1?"one":"other"}function P_e(e,t){return t?"other":e>=0&&e<2?"one":"other"}const N_e=sa;function __e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=o.slice(-1);return t?e==1?"one":"other":i&&(r==1||r==2||r==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"}const R_e=fn;function I_e(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const L_e=fn,$_e=sa;function F_e(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1?"one":"other":e==1?"one":e==2?"two":r&&e>=3&&e<=6?"few":r&&e>=7&&e<=10?"many":"other"}function B_e(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1||e==11?"one":e==2||e==12?"two":e==3||e==13?"few":"other":e==1||e==11?"one":e==2||e==12?"two":r&&e>=3&&e<=10||r&&e>=13&&e<=19?"few":"other"}const z_e=sa,V_e=fn;function H_e(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}const j_e=hc;function W_e(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),a=r.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(a==0||a==20||a==40||a==60||a==80)?"few":o?"other":"many"}const Y_e=fn,U_e=fn;function q_e(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1);return t?"other":e==1&&o?"one":r==2&&o?"two":o&&(e<0||e>10)&&i&&a==0?"many":"other"}function K_e(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e>=0&&e<=1?"one":"other"}function G_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}function X_e(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-2),s=o.slice(-2);return t?"other":i&&a==1||s==1?"one":i&&a==2||s==2?"two":i&&(a==3||a==4)||s==3||s==4?"few":"other"}function Z_e(e,t){return t?e==1||e==5?"one":"other":e==1?"one":"other"}function J_e(e,t){return t?e==1?"one":"other":e>=0&&e<2?"one":"other"}const Q_e=sa,eRe=zr,tRe=zr,nRe=zr,rRe=sa;function oRe(e,t){var n=String(e).split("."),r=n[0],o=Number(n[0])==e,i=r.slice(-1),a=r.slice(-2);return t?"other":o&&i==1&&a!=11||!o?"one":"other"}function iRe(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}const aRe=vu;function sRe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1);return t?"other":e==1&&o?"one":r==2&&o?"two":o&&(e<0||e>10)&&i&&a==0?"many":"other"}const lRe=zr,cRe=zr,uRe=fn,dRe=sa,fRe=fn,hRe=zr,pRe=zr;function mRe(e,t){var n=String(e).split("."),r=n[0],o=r.slice(-2);return t?r==1?"one":r==0||o>=2&&o<=20||o==40||o==60||o==80?"many":"other":e==1?"one":"other"}function gRe(e,t){return t?"other":e>=0&&e<2?"one":"other"}const vRe=fn,bRe=fn,yRe=zr,xRe=zr;function wRe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?o==6||o==9||r&&o==0&&e!=0?"many":"other":e==1?"one":"other"}const CRe=fn,SRe=fn,kRe=zr;function ERe(e,t){return t?"other":e>=0&&e<=1?"one":"other"}const TRe=zr,DRe=fn,ARe=fn;function ORe(e,t){return t?"other":e==0?"zero":e==1?"one":"other"}const MRe=fn;function PRe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2),i=r&&n[0].slice(-3),a=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||o>=1&&o<=4||o>=21&&o<=24||o>=41&&o<=44||o>=61&&o<=64||o>=81&&o<=84?"one":e==5||o==5?"many":"other":e==0?"zero":e==1?"one":o==2||o==22||o==42||o==62||o==82||r&&i==0&&(a>=1e3&&a<=2e4||a==4e4||a==6e4||a==8e4)||e!=0&&s==1e5?"two":o==3||o==23||o==43||o==63||o==83?"few":e!=1&&(o==1||o==21||o==41||o==61||o==81)?"many":"other"}const NRe=fn;function _Re(e,t){var n=String(e).split("."),r=n[0];return t?"other":e==0?"zero":(r==0||r==1)&&e!=0?"one":"other"}const RRe=fn,IRe=fn,LRe=zr,$Re=hc;function FRe(e,t){return t&&e==1?"one":"other"}function BRe(e,t){var n=String(e).split("."),r=n[1]||"",o=Number(n[0])==e,i=o&&n[0].slice(-1),a=o&&n[0].slice(-2);return t?"other":i==1&&(a<11||a>19)?"one":i>=2&&i<=9&&(a<11||a>19)?"few":r!=0?"many":"other"}function zRe(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,a=i&&n[0].slice(-1),s=i&&n[0].slice(-2),c=r.slice(-2),f=r.slice(-1);return t?"other":i&&a==0||s>=11&&s<=19||o==2&&c>=11&&c<=19?"zero":a==1&&s!=11||o==2&&f==1&&c!=11||o!=2&&f==1?"one":"other"}const VRe=fn,HRe=hc,jRe=fn;function WRe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?a==1&&s!=11?"one":a==2&&s!=12?"two":(a==7||a==8)&&s!=17&&s!=18?"many":"other":i&&a==1&&s!=11||c==1&&f!=11?"one":"other"}const YRe=fn,URe=fn;function qRe(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-2);return t?e==1?"one":"other":e==1&&r?"one":!r||e==0||i>=2&&i<=19?"few":"other"}function KRe(e,t){return t?e==1?"one":e==2||e==3?"two":e==4?"few":"other":e==1?"one":"other"}function GRe(e,t){return t&&e==1?"one":"other"}function XRe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-2);return t?"other":e==1?"one":e==0||o>=2&&o<=10?"few":o>=11&&o<=19?"many":"other"}const ZRe=zr,JRe=fn,QRe=vu,eIe=fn,tIe=fn;function nIe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?"one":"other":e==1?"one":"other"}const rIe=sa,oIe=fn,iIe=fn,aIe=fn,sIe=zr,lIe=fn,cIe=hc,uIe=fn,dIe=fn,fIe=fn;function hIe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?e==1||e==5||r&&e>=7&&e<=9?"one":e==2||e==3?"two":e==4?"few":e==6?"many":"other":e==1?"one":"other"}const pIe=fn,mIe=zr,gIe=hc,vIe=fn;function bIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),a=r.slice(-2);return t?"other":e==1&&o?"one":o&&i>=2&&i<=4&&(a<12||a>14)?"few":o&&r!=1&&(i==0||i==1)||o&&i>=5&&i<=9||o&&a>=12&&a<=14?"many":"other"}function yIe(e,t){var n=String(e).split("."),r=n[1]||"",o=r.length,i=Number(n[0])==e,a=i&&n[0].slice(-1),s=i&&n[0].slice(-2),c=r.slice(-2),f=r.slice(-1);return t?"other":i&&a==0||s>=11&&s<=19||o==2&&c>=11&&c<=19?"zero":a==1&&s!=11||o==2&&f==1&&c!=11||o!=2&&f==1?"one":"other"}const xIe=fn;function wIe(e,t){var n=String(e).split("."),r=n[0];return t?"other":r==0||r==1?"one":"other"}const CIe=sa,SIe=fn;function kIe(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-2);return t?e==1?"one":"other":e==1&&r?"one":!r||e==0||i>=2&&i<=19?"few":"other"}const EIe=fn,TIe=zr;function DIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-1),a=r.slice(-2);return t?"other":o&&i==1&&a!=11?"one":o&&i>=2&&i<=4&&(a<12||a>14)?"few":o&&i==0||o&&i>=5&&i<=9||o&&a>=11&&a<=14?"many":"other"}const AIe=fn,OIe=zr,MIe=fn;function PIe(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}function NIe(e,t){var n=String(e).split("."),r=!n[1];return t?e==11||e==8||e==80||e==800?"many":"other":e==1&&r?"one":"other"}const _Ie=fn,RIe=fn,IIe=vu,LIe=fn,$Ie=zr,FIe=zr;function BIe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}function zIe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e>=0&&e<=1?"one":r&&e>=2&&e<=10?"few":"other"}function VIe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"";return t?"other":e==0||e==1||r==0&&o==1?"one":"other"}function HIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1];return t?"other":e==1&&o?"one":r>=2&&r<=4&&o?"few":o?"other":"many"}function jIe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=r.slice(-2);return t?"other":o&&i==1?"one":o&&i==2?"two":o&&(i==3||i==4)||!o?"few":"other"}const WIe=vu,YIe=vu,UIe=vu,qIe=vu,KIe=vu,GIe=fn,XIe=fn;function ZIe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return t?e==1?"one":o==4&&i!=14?"many":"other":e==1?"one":"other"}function JIe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=r.slice(-2),c=o.slice(-1),f=o.slice(-2);return t?"other":i&&a==1&&s!=11||c==1&&f!=11?"one":i&&a>=2&&a<=4&&(s<12||s>14)||c>=2&&c<=4&&(f<12||f>14)?"few":"other"}const QIe=fn,eLe=fn,tLe=fn,nLe=zr;function rLe(e,t){var n=String(e).split("."),r=!n[1],o=Number(n[0])==e,i=o&&n[0].slice(-1),a=o&&n[0].slice(-2);return t?(i==1||i==2)&&a!=11&&a!=12?"one":"other":e==1&&r?"one":"other"}const oLe=sa,iLe=fn,aLe=fn,sLe=fn,lLe=fn,cLe=zr,uLe=hc,dLe=fn;function fLe(e,t){var n=String(e).split("."),r=Number(n[0])==e,o=r&&n[0].slice(-1);return t?o==6||o==9||e==10?"few":"other":e==1?"one":"other"}function hLe(e,t){var n=String(e).split("."),r=n[0],o=n[1]||"",i=!n[1],a=r.slice(-1),s=o.slice(-1);return t?e==1?"one":"other":i&&(r==1||r==2||r==3)||i&&a!=4&&a!=6&&a!=9||!i&&s!=4&&s!=6&&s!=9?"one":"other"}const pLe=fn,mLe=zr,gLe=fn,vLe=fn;function bLe(e,t){var n=String(e).split("."),r=Number(n[0])==e;return t?"other":e==0||e==1||r&&e>=11&&e<=99?"one":"other"}const yLe=fn;function xLe(e,t){var n=String(e).split("."),r=n[0],o=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),s=i&&n[0].slice(-2),c=r.slice(-1),f=r.slice(-2);return t?a==3&&s!=13?"few":"other":o&&c==1&&f!=11?"one":o&&c>=2&&c<=4&&(f<12||f>14)?"few":o&&c==0||o&&c>=5&&c<=9||o&&f>=11&&f<=14?"many":"other"}const wLe=sa,CLe=fn,SLe=fn;function kLe(e,t){return t&&e==1?"one":"other"}const ELe=fn,TLe=fn,DLe=hc,ALe=fn,OLe=zr,MLe=fn,PLe=fn,NLe=sa,_Le=zr,RLe=zr,ILe=zr;function LLe(e,t){return t?"other":e>=0&&e<=1?"one":"other"}var $Le=Object.freeze({__proto__:null,_in:H3e,af:j3e,ak:W3e,am:Y3e,an:U3e,ar:q3e,ars:K3e,as:G3e,asa:X3e,ast:Z3e,az:J3e,be:Q3e,bem:e_e,bez:t_e,bg:n_e,bho:r_e,bm:o_e,bn:i_e,bo:a_e,br:s_e,brx:l_e,bs:c_e,ca:u_e,ce:d_e,ceb:f_e,cgg:h_e,chr:p_e,ckb:m_e,cs:g_e,cy:v_e,da:b_e,de:y_e,dsb:x_e,dv:w_e,dz:C_e,ee:S_e,el:k_e,en:E_e,eo:T_e,es:D_e,et:A_e,eu:O_e,fa:M_e,ff:P_e,fi:N_e,fil:__e,fo:R_e,fr:I_e,fur:L_e,fy:$_e,ga:F_e,gd:B_e,gl:z_e,gsw:V_e,gu:H_e,guw:j_e,gv:W_e,ha:Y_e,haw:U_e,he:q_e,hi:K_e,hr:G_e,hsb:X_e,hu:Z_e,hy:J_e,ia:Q_e,id:eRe,ig:tRe,ii:nRe,io:rRe,is:oRe,it:iRe,iu:aRe,iw:sRe,ja:lRe,jbo:cRe,jgo:uRe,ji:dRe,jmc:fRe,jv:hRe,jw:pRe,ka:mRe,kab:gRe,kaj:vRe,kcg:bRe,kde:yRe,kea:xRe,kk:wRe,kkj:CRe,kl:SRe,km:kRe,kn:ERe,ko:TRe,ks:DRe,ksb:ARe,ksh:ORe,ku:MRe,kw:PRe,ky:NRe,lag:_Re,lb:RRe,lg:IRe,lkt:LRe,ln:$Re,lo:FRe,lt:BRe,lv:zRe,mas:VRe,mg:HRe,mgo:jRe,mk:WRe,ml:YRe,mn:URe,mo:qRe,mr:KRe,ms:GRe,mt:XRe,my:ZRe,nah:JRe,naq:QRe,nb:eIe,nd:tIe,ne:nIe,nl:rIe,nn:oIe,nnh:iIe,no:aIe,nqo:sIe,nr:lIe,nso:cIe,ny:uIe,nyn:dIe,om:fIe,or:hIe,os:pIe,osa:mIe,pa:gIe,pap:vIe,pl:bIe,prg:yIe,ps:xIe,pt:wIe,pt_PT:CIe,rm:SIe,ro:kIe,rof:EIe,root:TIe,ru:DIe,rwk:AIe,sah:OIe,saq:MIe,sc:PIe,scn:NIe,sd:_Ie,sdh:RIe,se:IIe,seh:LIe,ses:$Ie,sg:FIe,sh:BIe,shi:zIe,si:VIe,sk:HIe,sl:jIe,sma:WIe,smi:YIe,smj:UIe,smn:qIe,sms:KIe,sn:GIe,so:XIe,sq:ZIe,sr:JIe,ss:QIe,ssy:eLe,st:tLe,su:nLe,sv:rLe,sw:oLe,syr:iLe,ta:aLe,te:sLe,teo:lLe,th:cLe,ti:uLe,tig:dLe,tk:fLe,tl:hLe,tn:pLe,to:mLe,tr:gLe,ts:vLe,tzm:bLe,ug:yLe,uk:xLe,ur:wLe,uz:CLe,ve:SLe,vi:kLe,vo:ELe,vun:TLe,wa:DLe,wae:ALe,wo:OLe,xh:MLe,xog:PLe,yi:NLe,yo:_Le,yue:RLe,zh:ILe,zu:LLe}),FLe=Object.defineProperty,BLe=Object.getOwnPropertyDescriptor,zLe=Object.getOwnPropertyNames,VLe=Object.prototype.hasOwnProperty,Y7=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zLe(t))!VLe.call(e,o)&&o!==n&&FLe(e,o,{get:()=>t[o],enumerable:!(r=BLe(t,o))||r.enumerable});return e},HLe=(e,t,n)=>(Y7(e,t,"default"),n&&Y7(n,t,"default")),jLe=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),U7={};HLe(U7,$Le),cw.loadLocaleData("en",{plurals:U7.en}),cw.load("en",jLe),cw.activate("en");var WLe=Object.defineProperty,YLe=Object.getOwnPropertyDescriptor,kA=(e,t,n,r)=>{for(var o=r>1?void 0:r?YLe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&WLe(t,n,o),o},bp=class extends aa{get name(){return"doc"}createNodeSpec(e,t){const{docAttributes:n,content:r}=this.options,o=In();if(Dd(n))for(const[i,a]of Qo(n))o[i]={default:a};else for(const i of n)o[i]={default:null};return{attrs:o,content:r,...t}}setDocAttributes(e){return({tr:t,dispatch:n})=>{if(n){for(const[r,o]of Object.entries(e))t.step(new Bv(r,o));n(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return nA(e.doc,t)}};kA([Cn()],bp.prototype,"setDocAttributes",1),kA([Mo()],bp.prototype,"isDefaultDocNode",1),bp=kA([dr({defaultOptions:{content:"block+",docAttributes:[]},defaultPriority:Fr.Medium,staticKeys:["content","docAttributes"],disableExtraAttributes:!0})],bp);var q7="SetDocAttribute",K7="RevertSetDocAttribute",Bv=class extends ei{constructor(e,t,n=q7){super(),this.stepType=n,this.key=e,this.value=t}static fromJSON(e,t){return new Bv(t.key,t.value,t.stepType)}apply(e){this.previous=e.attrs[this.key];const t={...e.attrs,[this.key]:this.value};return zo.ok(e.type.create(t,e.content,e.marks))}invert(){return new Bv(this.key,this.previous,K7)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{ei.jsonID(q7,Bv),ei.jsonID(K7,Bv)}catch(e){if(!e.message.startsWith("Duplicate use of step JSON ID"))throw e}var ULe=Object.defineProperty,qLe=Object.getOwnPropertyDescriptor,G7=(e,t,n,r)=>{for(var o=r>1?void 0:r?qLe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&ULe(t,n,o),o};function KLe(e,t,n,r){const o=e.docView.posFromDOM(t,n,r);return o===null||o<0?null:o}function GLe(e,t){const n=t.target;if(n){const r=KLe(e,n,0);if(r!==null){const o=e.state.doc.resolve(r),i=o.node().isLeaf?0:1,a=o.start()-i;return{pos:r,inside:a}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var uw=class extends Xr{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,n)=>{const r=n,o=GLe(t,r);if(!o)return!1;const i=[],a=[],{inside:s,pos:c}=o;if(s===-1)return!1;const f=t.state.doc.resolve(c),p=f.depth+1;for(const m of nD(p,1))i.push({node:m>f.depth&&f.nodeAfter?f.nodeAfter:f.node(m),pos:f.before(m)});for(const{type:m}of f.marksAcross(f)??[]){const v=lc(f,m);v&&a.push(v)}return e(r,{view:t,nodes:i,marks:a,getMark:m=>{const v=Bn(m)?t.state.schema.marks[m]:m;return _n(v,{code:tn.EXTENSION,message:`The mark ${m} being checked does not exist within the editor schema.`}),a.find(y=>y.mark.type===v)},getNode:m=>{var v;const y=Bn(m)?t.state.schema.nodes[m]:m;_n(y,{code:tn.EXTENSION,message:"The node being checked does not exist"});const w=i.find(({node:C})=>C.type===y);if(w)return{...w,isRoot:!!((v=i[0])!=null&&v.node.eq(w.node))}}})}}get name(){return"events"}onView(){var e,t;if(!((e=this.store.managerSettings.exclude)!=null&&e.clickHandler))for(const n of this.store.extensions){if(!n.createEventHandlers||(t=n.options.exclude)!=null&&t.clickHandler)continue;const r=n.createEventHandlers();for(const[o,i]of Qo(r))this.addHandler(o,i)}}createPlugin(){const e=new WeakMap,t=(n,r,o,i,a,s,c,f)=>{const p=this.store.currentState,{schema:m,doc:v}=p,y=v.resolve(i),w=e.has(c),C=XLe({$pos:y,handled:w,view:o,state:p});let k=!1;w||(k=n(c,C)||k);const T={...C,pos:i,direct:f,nodeWithPosition:{node:a,pos:s},getNode:E=>{const _=Bn(E)?m.nodes[E]:E;return _n(_,{code:tn.EXTENSION,message:"The node being checked does not exist"}),_===a.type?{node:a,pos:s}:void 0}};return e.set(c,!0),r(c,T)||k};return{props:{handleKeyPress:(n,r)=>this.options.keypress(r)||!1,handleKeyDown:(n,r)=>this.options.keydown(r)||!1,handleTextInput:(n,r,o,i)=>this.options.textInput({from:r,to:o,text:i})||!1,handleClickOn:(n,r,o,i,a,s)=>t(this.options.clickMark,this.options.click,n,r,o,i,a,s),handleDoubleClickOn:(n,r,o,i,a,s)=>t(this.options.doubleClickMark,this.options.doubleClick,n,r,o,i,a,s),handleTripleClickOn:(n,r,o,i,a,s)=>t(this.options.tripleClickMark,this.options.tripleClick,n,r,o,i,a,s),handleDOMEvents:{focus:(n,r)=>this.options.focus(r)||!1,blur:(n,r)=>this.options.blur(r)||!1,mousedown:(n,r)=>(this.startMouseover(),this.options.mousedown(r)||!1),mouseup:(n,r)=>(this.endMouseover(),this.options.mouseup(r)||!1),mouseleave:(n,r)=>(this.mouseover=!1,this.options.mouseleave(r)||!1),mouseenter:(n,r)=>(this.mouseover=!0,this.options.mouseenter(r)||!1),keyup:(n,r)=>this.options.keyup(r)||!1,mouseout:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!1};return this.options.hover(n,o)||!1}),mouseover:this.createMouseEventHandler((n,r)=>{const o={...r,hovering:!0};return this.options.hover(n,o)||!1}),contextmenu:this.createMouseEventHandler((n,r)=>this.options.contextmenu(n,r)||!1),scroll:(n,r)=>this.options.scroll(r)||!1,copy:(n,r)=>this.options.copy(r)||!1,cut:(n,r)=>this.options.cut(r)||!1,paste:(n,r)=>this.options.paste(r)||!1}},view:n=>{let r=n.editable;const o=this.options;return{update(i){const a=i.editable;a!==r&&(o.editable(a),r=a)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener("mouseup",()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};G7([Mo()],uw.prototype,"isInteracting",1),uw=G7([dr({handlerKeys:["blur","focus","mousedown","mouseup","mouseenter","mouseleave","textInput","keypress","keyup","keydown","click","clickMark","doubleClick","doubleClickMark","tripleClick","tripleClickMark","contextmenu","hover","scroll","copy","cut","paste","editable"],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:Fr.High})],uw);function XLe(e){const{handled:t,view:n,$pos:r,state:o}=e,i={getMark:rz,markRanges:[],view:n,state:o};if(t)return i;for(const{type:a}of r.marksAcross(r)??[]){const s=lc(r,a);s&&i.markRanges.push(s)}return i.getMark=a=>{const s=Bn(a)?o.schema.marks[a]:a;return _n(s,{code:tn.EXTENSION,message:`The mark ${a} being checked does not exist within the editor schema.`}),i.markRanges.find(c=>c.mark.type===s)},i}class Po extends ur{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Po.valid(r)?new Po(r):ur.near(r)}content(){return gn.empty}eq(t){return t instanceof Po&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Po(t.resolve(n.pos))}getBookmark(){return new hM(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!ZLe(t)||!JLe(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Po.valid(t))return t;let o=t.pos,i=null;for(let a=t.depth;;a--){let s=t.node(a);if(n>0?t.indexAfter(a)<s.childCount:t.index(a)>0){i=s.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;o+=n;let c=t.doc.resolve(o);if(Po.valid(c))return c}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!zn.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=t.doc.resolve(o);if(Po.valid(s))return s}return null}}}Po.prototype.visible=!1,Po.findFrom=Po.findGapCursorFrom,ur.jsonID("gapcursor",Po);class hM{constructor(t){this.pos=t}map(t){return new hM(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Po.valid(n)?new Po(n):ur.near(n)}}function ZLe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function JLe(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function QLe(){return new rc({props:{decorations:r4e,createSelectionBetween(e,t,n){return t.pos==n.pos&&Po.valid(n)?new Po(n):null},handleClick:t4e,handleKeyDown:e4e,handleDOMEvents:{beforeinput:n4e}}})}const e4e=fA({ArrowLeft:dw("horiz",-1),ArrowRight:dw("horiz",1),ArrowUp:dw("vert",-1),ArrowDown:dw("vert",1)});function dw(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let a=r.selection,s=t>0?a.$to:a.$from,c=a.empty;if(a instanceof Vn){if(!i.endOfTextblock(n)||s.depth==0)return!1;c=!1,s=r.doc.resolve(t>0?s.after():s.before())}let f=Po.findGapCursorFrom(s,t,c);return f?(o&&o(r.tr.setSelection(new Po(f))),!0):!1}}function t4e(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Po.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&zn.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Po(r))),!0)}function n4e(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Po))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=Ht.empty;for(let a=r.length-1;a>=0;a--)o=Ht.from(r[a].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new gn(o,0,0));return i.setSelection(Vn.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function r4e(e){if(!(e.selection instanceof Po))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",wr.create(e.doc,[fo.widget(e.selection.head,t,{key:"gapcursor"})])}var o4e=Object.defineProperty,i4e=Object.getOwnPropertyDescriptor,a4e=(e,t,n,r)=>{for(var o=r>1?void 0:r?i4e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&o4e(t,n,o),o},EA=class extends Xr{get name(){return"gapCursor"}createExternalPlugins(){return[QLe()]}};EA=a4e([dr({})],EA);var fw=200,ci=function(){};ci.prototype.append=function(t){return t.length?(t=ci.from(t),!this.length&&t||t.length<fw&&this.leafAppend(t)||this.length<fw&&t.leafPrepend(this)||this.appendInner(t)):this},ci.prototype.prepend=function(t){return t.length?ci.from(t).append(this):this},ci.prototype.appendInner=function(t){return new s4e(this,t)},ci.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?ci.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))},ci.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},ci.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)},ci.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(t(i,a))},n,r),o},ci.from=function(t){return t instanceof ci?t:t&&t.length?new X7(t):ci.empty};var X7=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,a,s){for(var c=i;c<a;c++)if(o(this.values[c],s+c)===!1)return!1},t.prototype.forEachInvertedInner=function(o,i,a,s){for(var c=i-1;c>=a;c--)if(o(this.values[c],s+c)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=fw)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=fw)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(ci);ci.empty=new X7([]);var s4e=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},t.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(ci);const l4e=500;class Bs{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=t.tr,s,c,f=[],p=[];return this.items.forEach((m,v)=>{if(!m.step){o||(o=this.remapping(r,v+1),i=o.maps.length),i--,p.push(m);return}if(o){p.push(new El(m.map));let y=m.step.map(o.slice(i)),w;y&&a.maybeStep(y).doc&&(w=a.mapping.maps[a.mapping.maps.length-1],f.push(new El(w,void 0,void 0,f.length+p.length))),i--,w&&o.appendMap(w,i)}else a.maybeStep(m.step);if(m.selection)return s=o?m.selection.map(o.slice(i)):m.selection,c=new Bs(this.items.slice(0,r).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:s}}addTransform(t,n,r,o){let i=[],a=this.eventCount,s=this.items,c=!o&&s.length?s.get(s.length-1):null;for(let p=0;p<t.steps.length;p++){let m=t.steps[p].invert(t.docs[p]),v=new El(t.mapping.maps[p],m,n),y;(y=c&&c.merge(v))&&(v=y,p?i.pop():s=s.slice(0,s.length-1)),i.push(v),n&&(a++,n=void 0),o||(c=v)}let f=a-r.depth;return f>u4e&&(s=c4e(s,f),a-=f),new Bs(s.append(i),a)}remapping(t,n){let r=new $p;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Bs(this.items.append(t.map(n=>new El(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach(v=>{v.selection&&s--},o);let c=n;this.items.forEach(v=>{let y=i.getMirror(--c);if(y==null)return;a=Math.min(a,y);let w=i.maps[y];if(v.step){let C=t.steps[y].invert(t.docs[y]),k=v.selection&&v.selection.map(i.slice(c+1,y));k&&s++,r.push(new El(w,C,k))}else r.push(new El(w))},o);let f=[];for(let v=n;v<a;v++)f.push(new El(i.maps[v]));let p=this.items.slice(0,o).append(f).append(r),m=new Bs(p,s);return m.emptyItemCount()>l4e&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=t)o.push(a),a.selection&&i++;else if(a.step){let c=a.step.map(n.slice(r)),f=c&&c.getMap();if(r--,f&&n.appendMap(f,r),c){let p=a.selection&&a.selection.map(n.slice(r));p&&i++;let m=new El(f.invert(),c,p),v,y=o.length-1;(v=o.length&&o[y].merge(m))?o[y]=v:o.push(m)}}else a.map&&r--},this.items.length,0),new Bs(ci.from(o.reverse()),i)}}Bs.empty=new Bs(ci.empty,0);function c4e(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class El{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new El(n.getMap().invert(),n,this.selection)}}}class bu{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const u4e=20;function d4e(e,t,n,r){let o=n.getMeta(xl),i;if(o)return o.historyState;n.getMeta(h4e)&&(e=new bu(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(xl))return a.getMeta(xl).redo?new bu(e.done.addTransform(n,void 0,r,hw(t)),e.undone,Z7(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new bu(e.done,e.undone.addTransform(n,void 0,r,hw(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),c=e.prevTime==0||!a&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!f4e(n,e.prevRanges)),f=a?TA(e.prevRanges,n.mapping):Z7(n.mapping.maps[n.steps.length-1]);return new bu(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,hw(t)),Bs.empty,f,n.time,s??e.prevComposition)}else return(i=n.getMeta("rebased"))?new bu(e.done.rebased(n,i),e.undone.rebased(n,i),TA(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new bu(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),TA(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function f4e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<t.length;i+=2)r<=t[i+1]&&o>=t[i]&&(n=!0)}),n}function Z7(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function TA(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function J7(e,t,n,r){let o=hw(t),i=xl.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(!a)return;let s=a.selection.resolve(a.transform.doc),c=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),f=new bu(r?c:a.remaining,r?a.remaining:c,null,0,-1);n(a.transform.setSelection(s).setMeta(xl,{redo:r,historyState:f}).scrollIntoView())}let DA=!1,Q7=null;function hw(e){let t=e.plugins;if(Q7!=t){DA=!1,Q7=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){DA=!0;break}}return DA}const xl=new _d("history"),h4e=new _d("closeHistory");function p4e(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new rc({key:xl,state:{init(){return new bu(Bs.empty,Bs.empty,null,0,-1)},apply(t,n,r){return d4e(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,o=r=="historyUndo"?pw:r=="historyRedo"?zv:null;return o?(n.preventDefault(),o(t.state,t.dispatch)):!1}}}})}const pw=(e,t)=>{let n=xl.getState(e);return!n||n.done.eventCount==0?!1:(t&&J7(n,e,t,!1),!0)},zv=(e,t)=>{let n=xl.getState(e);return!n||n.undone.eventCount==0?!1:(t&&J7(n,e,t,!0),!0)};function AA(e){let t=xl.getState(e);return t?t.done.eventCount:0}function m4e(e){let t=xl.getState(e);return t?t.undone.eventCount:0}var g4e=Object.defineProperty,v4e=Object.getOwnPropertyDescriptor,Wd=(e,t,n,r)=>{for(var o=r>1?void 0:r?v4e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&g4e(t,n,o),o},wl=class extends Xr{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:n,dispatch:r,view:o})=>{const{getState:i,getDispatch:a}=this.options,s=Br(i)?i():n,c=Br(a)&&r?a():r,f=e(s,c,o);return t?.(f),f}}get name(){return"history"}createKeymap(){return{"Mod-y":es.isMac?()=>!1:this.wrapMethod(zv,this.options.onRedo),"Mod-z":this.wrapMethod(pw,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(zv,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(pw,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(zv,this.options.onRedo)(e)}createExternalPlugins(){const{depth:e,newGroupDelay:t}=this.options;return[p4e({depth:e,newGroupDelay:t})]}undo(){return L9(this.wrapMethod(pw,this.options.onUndo))}redo(){return L9(this.wrapMethod(zv,this.options.onRedo))}undoDepth(e=this.store.getState()){return AA(e)}redoDepth(e=this.store.getState()){return m4e(e)}};Wd([co({shortcut:on.Undo,command:"undo"})],wl.prototype,"undoShortcut",1),Wd([co({shortcut:on.Redo,command:"redo"})],wl.prototype,"redoShortcut",1),Wd([Cn({disableChaining:!0,description:({t:e})=>e(T1.UNDO_DESCRIPTION),label:({t:e})=>e(T1.UNDO_LABEL),icon:"arrowGoBackFill"})],wl.prototype,"undo",1),Wd([Cn({disableChaining:!0,description:({t:e})=>e(T1.REDO_DESCRIPTION),label:({t:e})=>e(T1.REDO_LABEL),icon:"arrowGoForwardFill"})],wl.prototype,"redo",1),Wd([Mo()],wl.prototype,"undoDepth",1),Wd([Mo()],wl.prototype,"redoDepth",1),wl=Wd([dr({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:["depth","newGroupDelay"],handlerKeys:["onUndo","onRedo"]})],wl);var b4e=Object.defineProperty,y4e=Object.getOwnPropertyDescriptor,mw=(e,t,n,r)=>{for(var o=r>1?void 0:r?y4e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&b4e(t,n,o),o},x4e={icon:"paragraph",label:({t:e})=>e(D1.INSERT_LABEL),description:({t:e})=>e(D1.INSERT_DESCRIPTION)},w4e={icon:"paragraph",label:({t:e})=>e(D1.CONVERT_LABEL),description:({t:e})=>e(D1.CONVERT_DESCRIPTION)},Yd=class extends aa{get name(){return"paragraph"}createTags(){return[jn.LastNodeCompatible,jn.TextBlock,jn.Block,jn.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...e.parse(n)})},...t.parseDOM??[]],toDOM:n=>["p",e.dom(n),0]}}convertParagraph(e={}){const{attrs:t,selection:n,preserveAttrs:r}=e;return this.store.commands.setBlockNodeType.original(this.type,t,n,r)}insertParagraph(e,t={}){const{selection:n,attrs:r}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:n,attrs:r})}shortcut(e){return this.convertParagraph()(e)}};mw([Cn(w4e)],Yd.prototype,"convertParagraph",1),mw([Cn(x4e)],Yd.prototype,"insertParagraph",1),mw([co({shortcut:on.Paragraph,command:"convertParagraph"})],Yd.prototype,"shortcut",1),Yd=mw([dr({defaultPriority:Fr.Medium})],Yd);function pc(e,t,n){return Math.min(Math.max(e,n),t)}class C4e extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var Vv=C4e;function OA(e){if(typeof e!="string")throw new Vv(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=M4e.test(e)?E4e(e):e;const n=T4e.exec(t);if(n){const a=Array.from(n).slice(1);return[...a.slice(0,3).map(s=>parseInt(Hv(s,2),16)),parseInt(Hv(a[3]||"f",2),16)/255]}const r=D4e.exec(t);if(r){const a=Array.from(r).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,16)),parseInt(a[3]||"ff",16)/255]}const o=A4e.exec(t);if(o){const a=Array.from(o).slice(1);return[...a.slice(0,3).map(s=>parseInt(s,10)),parseFloat(a[3]||"1")]}const i=O4e.exec(t);if(i){const[a,s,c,f]=Array.from(i).slice(1).map(parseFloat);if(pc(0,100,s)!==s)throw new Vv(e);if(pc(0,100,c)!==c)throw new Vv(e);return[...P4e(a,s,c),Number.isNaN(f)?1:f]}throw new Vv(e)}function S4e(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const eV=e=>parseInt(e.replace(/_/g,""),36),k4e="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=eV(t.substring(0,3)),r=eV(t.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return e[n]=`${o}${r}`,e},{});function E4e(e){const t=e.toLowerCase().trim(),n=k4e[S4e(t)];if(!n)throw new Vv(e);return`#${n}`}const Hv=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),T4e=new RegExp(`^#${Hv("([a-f0-9])",3)}([a-f0-9])?$`,"i"),D4e=new RegExp(`^#${Hv("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),A4e=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Hv(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),O4e=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,M4e=/^[a-z]+$/i,tV=e=>Math.round(e*255),P4e=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(tV);const o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),a=i*(1-Math.abs(o%2-1));let s=0,c=0,f=0;o>=0&&o<1?(s=i,c=a):o>=1&&o<2?(s=a,c=i):o>=2&&o<3?(c=i,f=a):o>=3&&o<4?(c=a,f=i):o>=4&&o<5?(s=a,f=i):o>=5&&o<6&&(s=i,f=a);const p=r-i/2,m=s+p,v=c+p,y=f+p;return[m,v,y].map(tV)};function N4e(e){const[t,n,r,o]=OA(e).map((m,v)=>v===3?m:m/255),i=Math.max(t,n,r),a=Math.min(t,n,r),s=(i+a)/2;if(i===a)return[0,0,s,o];const c=i-a,f=s>.5?c/(2-i-a):c/(i+a);return[60*(t===i?(n-r)/c+(n<r?6:0):n===i?(r-t)/c+2:(t-n)/c+4),f,s,o]}function _4e(e,t,n,r){return`hsla(${(e%360).toFixed()}, ${pc(0,100,t*100).toFixed()}%, ${pc(0,100,n*100).toFixed()}%, ${parseFloat(pc(0,1,r).toFixed(3))})`}function Da(e,t){const[n,r,o,i]=N4e(e);return _4e(n,r,o-t,i)}function R4e(e){if(e==="transparent")return 0;function t(i){const a=i/255;return a<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}const[n,r,o]=OA(e);return .2126*t(n)+.7152*t(r)+.0722*t(o)}function I4e(e,t,n,r){return`rgba(${pc(0,255,e).toFixed()}, ${pc(0,255,t).toFixed()}, ${pc(0,255,n).toFixed()}, ${parseFloat(pc(0,1,r).toFixed(3))})`}function gw(e,t){return Da(e,-t)}function vw(e,t){const[n,r,o,i]=OA(e);return I4e(n,r,o,i-t)}function L4e(e){return R4e(e)>.179}function yp(e){return L4e(e)?"#000":"#fff"}const $4e="remirror-editor-wrapper",F4e="remirror-button-active",B4e="remirror-button",z4e="remirror-composite",V4e="remirror-dialog",H4e="remirror-dialog-backdrop",j4e="remirror-form",W4e="remirror-form-message",Y4e="remirror-form-label",U4e="remirror-form-group",q4e="remirror-group",K4e="remirror-input",G4e="remirror-menu",X4e="remirror-menu-pane",Z4e="remirror-menu-pane-active",J4e="remirror-menu-dropdown-label",Q4e="remirror-menu-pane-icon",e5e="remirror-menu-pane-label",t5e="remirror-menu-pane-shortcut",n5e="remirror-menu-button-left",r5e="remirror-menu-button-right",o5e="remirror-menu-button-nested-left",i5e="remirror-menu-button-nested-right",a5e="remirror-menu-button",s5e="remirror-menu-bar",l5e="remirror-flex-column",c5e="remirror-flex-row",u5e="remirror-menu-item",d5e="remirror-menu-item-row",f5e="remirror-menu-item-column",h5e="remirror-menu-item-checkbox",p5e="remirror-menu-item-radio",m5e="remirror-menu-group",g5e="remirror-floating-popover",v5e="remirror-popover",b5e="remirror-animated-popover",y5e="remirror-role",x5e="remirror-separator",w5e="remirror-tab",C5e="remirror-tab-list",S5e="remirror-tabbable",k5e="remirror-toolbar",E5e="remirror-tooltip",T5e="remirror-table-size-editor",D5e="remirror-table-size-editor-body",A5e="remirror-table-size-editor-cell",O5e="remirror-table-size-editor-cell-selected",M5e="remirror-table-size-editor-footer",P5e="remirror-color-picker",N5e="remirror-color-picker-cell",_5e="remirror-color-picker-cell-selected";var R5e=Object.freeze({__proto__:null,ANIMATED_POPOVER:b5e,BUTTON:B4e,BUTTON_ACTIVE:F4e,COLOR_PICKER:P5e,COLOR_PICKER_CELL:N5e,COLOR_PICKER_CELL_SELECTED:_5e,COMPOSITE:z4e,DIALOG:V4e,DIALOG_BACKDROP:H4e,EDITOR_WRAPPER:$4e,FLEX_COLUMN:l5e,FLEX_ROW:c5e,FLOATING_POPOVER:g5e,FORM:j4e,FORM_GROUP:U4e,FORM_LABEL:Y4e,FORM_MESSAGE:W4e,GROUP:q4e,INPUT:K4e,MENU:G4e,MENU_BAR:s5e,MENU_BUTTON:a5e,MENU_BUTTON_LEFT:n5e,MENU_BUTTON_NESTED_LEFT:o5e,MENU_BUTTON_NESTED_RIGHT:i5e,MENU_BUTTON_RIGHT:r5e,MENU_DROPDOWN_LABEL:J4e,MENU_GROUP:m5e,MENU_ITEM:u5e,MENU_ITEM_CHECKBOX:h5e,MENU_ITEM_COLUMN:f5e,MENU_ITEM_RADIO:p5e,MENU_ITEM_ROW:d5e,MENU_PANE:X4e,MENU_PANE_ACTIVE:Z4e,MENU_PANE_ICON:Q4e,MENU_PANE_LABEL:e5e,MENU_PANE_SHORTCUT:t5e,POPOVER:v5e,ROLE:y5e,SEPARATOR:x5e,TAB:w5e,TABBABLE:S5e,TABLE_SIZE_EDITOR:T5e,TABLE_SIZE_EDITOR_BODY:D5e,TABLE_SIZE_EDITOR_CELL:A5e,TABLE_SIZE_EDITOR_CELL_SELECTED:O5e,TABLE_SIZE_EDITOR_FOOTER:M5e,TAB_LIST:C5e,TOOLBAR:k5e,TOOLTIP:E5e});const I5e="remirror-wrap",L5e="remirror-language-select-positioner",$5e="remirror-language-select-width",F5e="remirror-a11y-dark",B5e="remirror-atom-dark",z5e="remirror-base16-ateliersulphurpool-light",V5e="remirror-cb",H5e="remirror-darcula",j5e="remirror-dracula",W5e="remirror-duotone-dark",Y5e="remirror-duotone-earth",U5e="remirror-duotone-forest",q5e="remirror-duotone-light",K5e="remirror-duotone-sea",G5e="remirror-duotone-space",X5e="remirror-gh-colors",Z5e="remirror-hopscotch",J5e="remirror-pojoaque",Q5e="remirror-vs",e$e="remirror-xonokai";var t$e=Object.freeze({__proto__:null,A11Y_DARK:F5e,ATOM_DARK:B5e,BASE16_ATELIERSULPHURPOOL_LIGHT:z5e,CB:V5e,DARCULA:H5e,DRACULA:j5e,DUOTONE_DARK:W5e,DUOTONE_EARTH:Y5e,DUOTONE_FOREST:U5e,DUOTONE_LIGHT:q5e,DUOTONE_SEA:K5e,DUOTONE_SPACE:G5e,GH_COLORS:X5e,HOPSCOTCH:Z5e,LANGUAGE_SELECT_POSITIONER:L5e,LANGUAGE_SELECT_WIDTH:$5e,POJOAQUE:J5e,VS:Q5e,WRAP:I5e,XONOKAI:e$e});const n$e="remirror-image-loader";var r$e=Object.freeze({__proto__:null,IMAGE_LOADER:n$e});const o$e="remirror-list-item-with-custom-mark",i$e="remirror-ul-list-content",a$e="remirror-editor",s$e="remirror-list-item-marker-container",l$e="remirror-list-item-checkbox",c$e="remirror-collapsible-list-item-closed",u$e="remirror-collapsible-list-item-button",d$e="remirror-list-spine";var yu=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:u$e,COLLAPSIBLE_LIST_ITEM_CLOSED:c$e,EDITOR:a$e,LIST_ITEM_CHECKBOX:l$e,LIST_ITEM_MARKER_CONTAINER:s$e,LIST_ITEM_WITH_CUSTOM_MARKER:o$e,LIST_SPINE:d$e,UL_LIST_CONTENT:i$e});const f$e="remirror-is-empty";var h$e=Object.freeze({__proto__:null,IS_EMPTY:f$e});const p$e="remirror-editor",m$e="remirror-positioner",g$e="remirror-positioner-widget";var v$e=Object.freeze({__proto__:null,EDITOR:p$e,POSITIONER:m$e,POSITIONER_WIDGET:g$e});const Ps={gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},mc="#000000",MA="#ffffff",b$e="#252103",PA=vw(mc,.75),bw="#7963d2",NA="#bcd263",y$e="#fff",x$e="#fff",_A=Ps.gray[1],nV="rgba(10,31,68,0.08)",rV="rgba(10,31,68,0.10)",oV="rgba(10,31,68,0.12)",w$e=gw(vw(mc,.1),.13),RA={background:MA,border:PA,foreground:mc,muted:_A,primary:bw,secondary:NA,primaryText:y$e,secondaryText:x$e,text:b$e,faded:w$e},C$e={...RA,background:Da(MA,.15),border:Da(PA,.15),foreground:Da(mc,.15),muted:Da(_A,.15),primary:Da(bw,.15),secondary:Da(NA,.15),get text(){return yp(this.background)},get primaryText(){return yp(this.primary)},get secondaryText(){return yp(this.secondary)}},S$e={...RA,background:Da(MA,.075),border:Da(PA,.075),foreground:Da(mc,.075),muted:Da(_A,.075),primary:Da(bw,.075),secondary:Da(NA,.075),get text(){return yp(this.background)},get primaryText(){return yp(this.primary)},get secondaryText(){return yp(this.secondary)}};({...RA,backdrop:vw(mc,.1),outline:vw(bw,.6),table:(gw(mc,.8),gw(mc,.4),Ps.gray[3],Ps.blue[7],Ps.blue[1],Ps.blue[5],Ps.blue[7],gw(mc,.4),Ps.blue[5],Ps.red[7],Ps.red[1],Ps.red[5])},`${nV}`,`${rV}`,`${oV}`);var k$e=Object.defineProperty,E$e=Object.getOwnPropertyDescriptor,IA=(e,t,n,r)=>{for(var o=r>1?void 0:r?E$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&k$e(t,n,o),o},iV=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ni=(e,t,n)=>(iV(e,t,"read from private field"),n?n.call(e):t.get(e)),gc=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},xu=(e,t,n,r)=>(iV(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),jv,Wv,xp,Yv,yw,Uv,qv,Kv,Gv,xw=class{constructor(e){gc(this,jv,d1()),gc(this,Wv,[]),gc(this,xp,new Map),gc(this,Yv,[]),gc(this,yw,!1),gc(this,Uv,void 0),gc(this,qv,void 0),gc(this,Kv,void 0),gc(this,Gv,void 0),this.addListener=(t,n)=>ni(this,jv).on(t,n),xu(this,Uv,e),xu(this,qv,e.getActive),xu(this,Gv,e.getPosition),xu(this,Kv,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??["state","scroll"]}static create(e){return new xw(e)}static fromPositioner(e,t){return xw.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:ni(this,qv),getPosition:ni(this,Gv),hasChanged:this.hasChanged,events:this.events,getID:ni(this,Kv)}}onActiveChanged(e){this.recentUpdate=e;const t=ni(this,qv).call(this,e);xu(this,Wv,t),xu(this,xp,new Map),xu(this,yw,!1),xu(this,Yv,[]);const n=[];for(const[r,o]of t.entries()){const i=this.getID(o,r);ni(this,Yv).push(i),n.push({setElement:a=>this.addProps({...e,data:o,element:a},r),id:i,data:o})}ni(this,jv).emit("update",n)}getID(e,t){var n;return((n=ni(this,Kv))==null?void 0:n.call(this,e,t))??t.toString()}addProps(e,t){if(ni(this,yw)||(ni(this,xp).set(t,e),ni(this,xp).size<ni(this,Wv).length))return;const n=[];for(const r of ni(this,Wv).keys()){const o=ni(this,xp).get(r);_n(o,{code:tn.INTERNAL,message:"Something went wrong when retrieving the parameters"});const i=ni(this,Yv)[r];if(!i)return;n.push({position:ni(this,Gv).call(this,o),element:o.element,id:i})}ni(this,jv).emit("done",n)}clone(e){return xw.create({...ni(this,Uv),...Br(e)?e(ni(this,Uv)):e})}active(e){const t=Br(e)?e:()=>e;return this.clone(n=>({getActive:r=>n.getActive(r).filter(t)}))}},Ns=xw;jv=new WeakMap,Wv=new WeakMap,xp=new WeakMap,Yv=new WeakMap,yw=new WeakMap,Uv=new WeakMap,qv=new WeakMap,Kv=new WeakMap,Gv=new WeakMap,Ns.EMPTY=[];function T$e(e,t=cV){const{key:n}=e?.getMeta(lV)??{};return n===t}function aV(e){const{tr:t,state:n,previousState:r}=e;return!r||t&&T$e(t)?!0:t?B9(t):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function sV(e,t,n={}){const r=t.getBoundingClientRect(),{accountForPadding:o=!1}=n;let i=0,a=0,s=0,c=0;if(ji(t)&&o){const p=Number.parseFloat(ts(t,"padding-left").replace("px","")),m=Number.parseFloat(ts(t,"padding-right").replace("px","")),v=Number.parseFloat(ts(t,"padding-top").replace("px","")),y=Number.parseFloat(ts(t,"padding-bottom").replace("px","")),w=Number.parseFloat(ts(t,"border-left").replace("px","")),C=Number.parseFloat(ts(t,"border-right").replace("px","")),k=Number.parseFloat(ts(t,"border-top").replace("px","")),T=Number.parseFloat(ts(t,"border-bottom").replace("px","")),E=t.offsetWidth-t.clientWidth,_=t.offsetHeight-t.clientHeight;i+=p+w+(t.dir==="rtl"?E:0),a+=m+C+(t.dir==="rtl"?0:E),s+=v+k,c+=y+T+_}const f=new DOMRect(r.left+i,r.top+s,r.width-a,r.height-c);for(const[p,m]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(az(p,f.top,f.bottom)&&az(m,f.left,f.right))return!0;return!1}var D$e="remirror-positioner-widget",lV="positionerUpdate",cV="__all_positioners__",uV={y:-999999,x:-999999,width:0,height:0},dV={...uV,left:-999999,top:-999999,bottom:-999999,right:-999999},LA={...uV,rect:{...dV,toJSON:()=>dV},visible:!1},fV=Ns.create({hasChanged:aV,getActive(e){const{state:t}=e;if(!QD(t)||t.selection.$anchor.depth>2)return Ns.EMPTY;const n=ap({predicate:r=>r.type.isBlock,selection:t});return n?[n]:Ns.EMPTY},getPosition(e){const{view:t,data:n}=e,r=t.nodeDOM(n.pos);if(!ji(r))return LA;const o=r.getBoundingClientRect(),i=t.dom.getBoundingClientRect(),a=o.height,s=o.width,c=t.dom.scrollLeft+o.left-i.left,f=t.dom.scrollTop+o.top-i.top,p=sV(o,t.dom);return{y:f,x:c,height:a,width:s,rect:o,visible:p}}}),$A=fV.clone(({getActive:e})=>({getActive:t=>{const[n]=e(t);return n&&H1(n.node)&&n.node.type===V1(t.state.schema)?[n]:Ns.EMPTY}})),A$e=$A.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),O$e=$A.clone(({getPosition:e})=>({getPosition:t=>{const{width:n,x:r,y:o,height:i}=e(t);return{...e(t),width:1,x:n+r,rect:new DOMRect(n+r,o,1,i)}}}));function FA(e){return Ns.create({hasChanged:aV,getActive:t=>{const{state:n,view:r}=t;if(!e(n)||!fu(n.selection))return Ns.EMPTY;try{const{head:o,anchor:i}=n.selection;return[{from:r.coordsAtPos(i),to:r.coordsAtPos(o)}]}catch{return Ns.EMPTY}},getPosition(t){const{element:n,data:r,view:o}=t,{from:i,to:a}=r,s=n.offsetParent??o.dom,c=s.getBoundingClientRect(),f=Math.abs(a.bottom-i.top),p=f>i.bottom-i.top,m=Math.min(i.left,a.left),v=Math.min(i.top,a.top),y=s.scrollLeft+(p?a.left-c.left:m-c.left),w=s.scrollTop+v-c.top,C=p?1:Math.abs(i.left-a.right),k=new DOMRect(p?a.left:m,v,C,f),T=sV(k,o.dom);return{rect:k,y:w,x:y,height:f,width:C,visible:T}}})}var hV=FA(e=>!e.selection.empty),M$e=FA(e=>e.selection.empty),P$e=FA(()=>!0),N$e=hV.clone(()=>({getActive:e=>{const{state:t,view:n}=e;if(!t.selection.empty)return Ns.EMPTY;const r=q9(t);if(!r)return Ns.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return Ns.EMPTY}}})),_$e={selection:hV,cursor:M$e,always:P$e,block:fV,emptyBlock:$A,emptyBlockStart:A$e,emptyBlockEnd:O$e,nearestWord:N$e},wp=class extends Xr{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return"positioner"}createAttributes(){return{class:v$e.EDITOR}}init(){this.onScroll=XB(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps("hover",{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps("contextmenu",{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:"state",helpers:this.store.helpers})}createDecorations(e){if(this.element??(this.element=this.createElement()),!this.element.hasChildNodes())return wr.empty;const t=fo.widget(0,this.element,{key:"positioner-widget",side:-1,stopEvent:()=>!0});return wr.create(e.doc,[t])}forceUpdatePositioners(e=cV){return({tr:t,dispatch:n})=>(n?.(t.setMeta(lV,{key:e})),!0)}getPositionerWidget(){return this.element??(this.element=this.createElement())}createElement(){const e=document.createElement("span");return e.dataset.id=D$e,e.setAttribute("role","presentation"),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(const t of this.positioners)t.events.includes(e.event)&&this.triggerPositioner(t,e)}getBaseProps(e,t){const n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:r,state:n,...t}}onScroll(){this.positioner(this.getBaseProps("scroll",{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};IA([Cn()],wp.prototype,"forceUpdatePositioners",1),IA([Mo()],wp.prototype,"getPositionerWidget",1),wp=IA([dr({defaultOptions:{scrollDebounce:100},customHandlerKeys:["positioner"],staticKeys:["scrollDebounce"]})],wp);function BA(e){return Bn(e)?_$e[e].clone():Br(e)?e().clone():e.clone()}var R$e=Object.defineProperty,I$e=Object.getOwnPropertyDescriptor,L$e=(e,t,n,r)=>{for(var o=r>1?void 0:r?I$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&R$e(t,n,o),o},zA=class extends aa{get name(){return"text"}createTags(){return[jn.InlineNode]}createNodeSpec(){return{}}};zA=L$e([dr({disableExtraAttributes:!0,defaultPriority:Fr.Medium})],zA);var $$e={...bp.defaultOptions,...Yd.defaultOptions,...wl.defaultOptions,excludeExtensions:[]};function F$e(e={}){e={...$$e,...e};const{content:t,depth:n,getDispatch:r,getState:o,newGroupDelay:i,excludeExtensions:a}=e,s={};for(const f of a??[])s[f]=!0;const c=[];if(!s.history){const f=new wl({depth:n,getDispatch:r,getState:o,newGroupDelay:i});c.push(f)}return s.doc||c.push(new bp({content:t})),s.text||c.push(new zA),s.paragraph||c.push(new Yd),s.positioner||c.push(new wp),s.gapCursor||c.push(new EA),s.events||c.push(new uw),c}var B$e=Object.defineProperty,z$e=Object.getOwnPropertyDescriptor,V$e=(e,t,n,r)=>{for(var o=r>1?void 0:r?z$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&B$e(t,n,o),o},Ud=class extends Xr{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:nA(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>H$e({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>j$e({state:e,extension:this})}}}onSetOptions(e){const{changes:t}=e;t.placeholder.changed&&this.store.phase>=na.EditorView&&this.store.updateAttributes()}};Ud=V$e([dr({defaultOptions:{emptyNodeClass:h$e.IS_EMPTY,placeholder:""}})],Ud);function H$e(e){const{pluginState:t,extension:n,tr:r,state:o}=e;return r.docChanged?{...n.options,empty:nA(o.doc)}:t}function j$e(e){const{extension:t,state:n}=e,{empty:r}=t.pluginKey.getState(n),{emptyNodeClass:o,placeholder:i}=t.options;if(!r)return null;const a=[];return n.doc.descendants((s,c)=>{const f=fo.node(c,c+s.nodeSize,{class:o,"data-placeholder":i});a.push(f)}),wr.create(n.doc,a)}var W$e=Object.defineProperty,Y$e=Object.getOwnPropertyDescriptor,U$e=(e,t,n,r)=>{for(var o=r>1?void 0:r?Y$e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&W$e(t,n,o),o},q$e={...Ud.defaultOptions,...$v.defaultOptions},K$e=[...Ud.staticKeys,...$v.staticKeys],Xv=class extends Xr{get name(){return"react"}onSetOptions(e){const{pickChanged:t}=e;this.getExtension(Ud).setOptions(t(["placeholder"]))}createExtensions(){const{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:a}=this.options;return[new Ud({emptyNodeClass:e,placeholder:t,priority:Fr.Low}),new $v({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:o,defaultInlineNode:i,nodeViewComponents:a})]}};Xv=U$e([dr({defaultOptions:q$e,staticKeys:K$e})],Xv);var pV={};Object.defineProperty(pV,"__esModule",{value:!0});function G$e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length===2)return gV(e[0],e[1])||null;var n=e.slice(1).reduce(function(r,o){return gV(r,o)},e[0]);return n||null}var Cl=pV.default=G$e,mV=new WeakMap;function gV(e,t){if(e&&t){var n=mV.get(e)||new WeakMap;mV.set(e,n);var r=n.get(t)||function(o){vV(e,o),vV(t,o)};return n.set(t,r),r}return e||t}function vV(e,t){typeof e=="function"?e(t):e.current=t}var bV=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},VA=(e,t,n)=>(bV(e,t,"read from private field"),n?n.call(e):t.get(e)),X$e=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Z$e=(e,t,n,r)=>(bV(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function J$e(){const[,e]=Tn(In());return Zn(()=>{e(In())},[])}var yV=kf(null);function wu(e){const t=Sf(yV),n=Yt(J$e());_n(t,{code:tn.REACT_PROVIDER_CONTEXT});const{addHandler:r}=t;return dn(()=>{let o=e;if(o){if(Dd(o)){const{autoUpdate:i}=o;o=i?()=>n.current():void 0}if(Br(o))return r("updated",o)}},[r,e]),t}function vc(e=!0){return wu({autoUpdate:e}).active}function Q$e(e=!1){return wu(e?{autoUpdate:!0}:void 0).attrs}function eFe(){return wu().chain.new()}function _s(){return wu().commands}function HA(){return wu({autoUpdate:!0}).getState().selection}function xV(e,t=void 0,n){const{getExtension:r}=wu(),o=Ur(()=>r(e),[e,r]);let i;if(Br(t)?i=n?[o,...n]:[o,t]:i=t?[o,...Object.values(t)]:[],dn(()=>{Br(t)||!t||o.setOptions(t)},i),dn(()=>{if(Br(t))return t({addHandler:o.addHandler.bind(o),addCustomHandler:o.addCustomHandler.bind(o),extension:o})},i),!t)return o}function tFe(e,t,n){const r=Zn(({addHandler:o})=>o(t,n),[n,t]);return xV(e,r)}function nFe(e){tFe(Z1,"docChanged",e)}function rFe(e=!1){return wu(e?{autoUpdate:!0}:void 0).helpers}var[oFe,OUe]=S3e(({props:e})=>{const t=e.locale??"en",n=e.i18n??cw,r=e.supportedLocales??[t],o=n._.bind(n);return{locale:t,i18n:n,supportedLocales:r,t:o}});function wV(e,t={}){const{core:n,react:r,...o}=t;return d3e(e)?e:u3e.create(()=>[...sz(e),new Xv(r),...F$e(n)],o)}function iFe(e,t={}){const n=Yt(e),r=Yt(t),[o,i]=Tn(()=>wV(e,t));return n.current=e,r.current=t,dn(()=>o.addHandler("destroy",()=>{i(()=>wV(n.current,r.current))}),[o]),o}var aFe=typeof Cl=="object"&&Cl.__esModule&&Cl.default?Cl.default:Cl,Cp,sFe=class extends i3e{constructor(e){if(super(e),X$e(this,Cp,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=t=>this.internalGetRootProps(t,null),this.internalGetRootProps=(t,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:o,...i}=t??In();return{[r]:aFe(o,this.onRef),key:this.uid,...i,children:n}},this.onRef=t=>{t&&(this.rootPropsConfig.count+=1,_n(this.rootPropsConfig.count<=1,{code:tn.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),Z$e(this,Cp,t),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(Ud).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(e){return super.update(e),this}createView(e){return new hMe(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){const{triggerChange:n=!0,tr:r,transactions:o}=t;if(this.props.state){const{onChange:i}=this.props;_n(i,{code:tn.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),_n(n,{code:tn.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:e,tr:r,transactions:o});return}!r&&!o&&(e=e.apply(e.tr.setMeta(VB,{}))),this.view.updateState(e),n&&o?.length!==0&&this.onChange({state:e,tr:r,transactions:o}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:r,transactions:o})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(VB,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition==="start"?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){_n(VA(this,Cp),{code:tn.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:e}=this.props;this.addProsemirrorViewToDom(VA(this,Cp),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&VA(this,Cp)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Cp=new WeakMap;var CV=typeof document<"u"?Nl:dn;function lFe(e){const t=Yt();return CV(()=>{t.current=e}),t.current}function cFe(e){const{manager:t,state:n}=e,{placeholder:r,editable:o}=e;Yt(!0).current&&!nc(r)&&t.getExtension(Xv).setOptions({placeholder:r}),dn(()=>{r!=null&&t.getExtension(Xv).setOptions({placeholder:r})},[r,t]);const[a]=Tn(()=>{if(n)return n;const c=t.createEmptyDoc(),[f,p]=Fo(e.initialContent)?e.initialContent:[e.initialContent??c];return t.createState({content:f,selection:p})}),s=uFe({initialEditorState:a,getProps:()=>e});return dn(()=>()=>{s.destroy()},[s]),dn(()=>{s.onUpdate()},[o,s]),dFe(s),s.frameworkOutput}function uFe(e){const t=Yt(e);t.current=e;const n=Ur(()=>new sFe(t.current),[]);return n.update(e),n}function dFe(e){const{state:t}=e.props,n=Yt(!!t),r=lFe(t);CV(()=>{const o=t?n.current===!0:n.current===!1;_n(o,{code:tn.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===r)&&e.updateControlledState(t,r??void 0)},[t,r,e])}function fFe(e={}){const{content:t,document:n,selection:r,extensions:o,...i}=e,a=iFe(o??(()=>[]),i),[s,c]=Tn(()=>a.createState({selection:r,content:t??a.createEmptyDoc()})),f=Zn(({state:m})=>{c(m)},[]),p=Zn(()=>a.output,[a]);return Ur(()=>({state:s,setState:c,manager:a,onChange:f,getContext:p}),[p,a,f,s])}var hFe=({onChange:e})=>{const{getHTML:t}=rFe();return nFe(Zn(({state:n})=>{const r=t(n);e(r)},[e,t])),null},jA=()=>Pt.createElement("div",{className:R5e.EDITOR_WRAPPER,...wu().getRootProps()}),pFe=e=>(e.hook(),null);function mFe(e){const{children:t,autoRender:n,i18n:r,locale:o,supportedLocales:i,hooks:a=[],...s}=e,c=cFe(s),f=v3e(c.portalContainer),p=n==="start"||n===!0||!t&&nc(n),m=n==="end";return Pt.createElement(oFe,{i18n:r,locale:o,supportedLocales:i},Pt.createElement(yV.Provider,{value:c},Pt.createElement(g3e,{portals:f}),a.map((v,y)=>Pt.createElement(pFe,{hook:v,key:y})),p&&Pt.createElement(jA,null),t,m&&Pt.createElement(jA,null)))}function gFe(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(e)&&a.startIndex==0){if(o.index(a.depth-1)==0)return!1;let p=n.doc.resolve(a.start-2);c=new Nd(p,p,a.depth),a.endIndex<a.parent.childCount&&(a=new Nd(o,n.doc.resolve(i.end(a.depth)),a.depth)),s=!0}let f=pD(c,e,t,a);return f?(r&&r(vFe(n.tr,a,f,s,e).scrollIntoView()),!0):!1}}function vFe(e,t,n,r,o){let i=Ht.empty;for(let p=n.length-1;p>=0;p--)i=Ht.from(n[p].type.create(n[p].attrs,i));e.step(new Bo(t.start-(r?2:0),t.end,t.start,t.end,new gn(i,0,0),n.length,!0));let a=0;for(let p=0;p<n.length;p++)n[p].type==o&&(a=p+1);let s=n.length-a,c=t.start+n.length-(r?2:0),f=t.parent;for(let p=t.startIndex,m=t.endIndex,v=!0;p<m;p++,v=!1)!v&&Kh(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=f.child(p).nodeSize;return e}function bFe(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?yFe(t,n,e,i):xFe(t,n,i):!0:!1}}function yFe(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Bo(i-1,a,i,a,new gn(Ht.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Nd(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=qh(r);if(s==null)return!1;o.lift(r,s);let c=o.mapping.map(i,-1)-1;return sv(o.doc,c)&&o.join(c),t(o.scrollIntoView()),!0}function xFe(e,t,n){let r=e.tr,o=n.parent;for(let y=n.end,w=n.endIndex-1,C=n.startIndex;w>C;w--)y-=o.child(w).nodeSize,r.delete(y-1,y+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==o.childCount,f=i.node(-1),p=i.index(-1);if(!f.canReplace(p+(s?0:1),p+1,a.content.append(c?Ht.empty:Ht.from(o))))return!1;let m=i.pos,v=m+a.nodeSize;return r.step(new Bo(m-(s?1:0),v+(c?1:0),m+1,v-1,new gn((s?Ht.empty:Ht.from(o.copy(Ht.empty))).append(c?Ht.empty:Ht.from(o.copy(Ht.empty))),s?0:1,c?0:1),s?0:1)),t(r.scrollIntoView()),!0}var wFe=Object.defineProperty,CFe=Object.getOwnPropertyDescriptor,rs=(e,t,n,r)=>{for(var o=r>1?void 0:r?CFe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&wFe(t,n,o),o};function WA(e){var t;return!!((t=e.spec.group)!=null&&t.includes(jn.ListContainerNode))}function SFe(e){var t;return!!((t=e.spec.group)!=null&&t.includes(jn.ListItemNode))}function Cu(e){return WA(e.type)}function Su(e){return SFe(e.type)}function YA(e,t){return n=>{const{dispatch:r,tr:o}=n,i=GD(o,n.state),{$from:a,$to:s}=o.selection,c=a.blockRange(s);if(!c)return!1;const f=ap({predicate:p=>WA(p.type),selection:o.selection});if(f&&c.depth-f.depth<=1&&c.startIndex===0){if(f.node.type===e)return EV(t)(n);if(WA(f.node.type))return e.validContent(f.node.content)?(r?.(o.setNodeMarkup(f.pos,e)),!0):kFe(o,f,e,t)?(r?.(o.scrollIntoView()),!0):!1}return gFe(e)(i,r)}}function SV(e,t=["checked"]){return function({tr:n,dispatch:r,state:o}){var i,a;const s=oPe(e,o.schema),{$from:c,$to:f}=n.selection;if(Sv(n.selection)&&n.selection.node.isBlock||c.depth<2||!c.sameParent(f))return!1;const p=c.node(-1);if(p.type!==s)return!1;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==s||c.index(-2)!==c.node(-2).childCount-1)return!1;if(r){const C=c.index(-1)>0;let k=Ht.empty;for(let _=c.depth-(C?1:2);_>=c.depth-3;_--)k=Ht.from(c.node(_).copy(k));const T=((i=s.contentMatch.defaultType)==null?void 0:i.createAndFill())||void 0;k=k.append(Ht.from(s.createAndFill(null,T)||void 0));const E=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3;n.replace(c.before(C?void 0:-1),c.after(-E),new gn(k,C?3:2,2)),n.setSelection(n.selection.constructor.near(n.doc.resolve(c.pos+(C?3:2)))),r(n.scrollIntoView())}return!0}if(p.attrs.closed&&c.sameParent(f)&&f.pos===f.end()){if(r){const C=c.after(-1),k=((a=s.contentMatch.defaultType)==null?void 0:a.createAndFill())||void 0,T=s.createAndFill(null,k);T&&(n.insert(C,T),n.setSelection(Vn.near(n.doc.resolve(C+1)))),n.delete(c.pos,f.pos),r(n.scrollIntoView())}return!0}const m=Object.fromEntries(Object.entries(p.attrs).filter(([C])=>!t.includes(C))),v=f.pos===c.end()?p.contentMatchAt(0).defaultType:null,y={...c.node().attrs};n.delete(c.pos,f.pos);const w=v?[{type:s,attrs:m},{type:v,attrs:y}]:[{type:s,attrs:m}];return Kh(n.doc,c.pos,2)?(r&&r(n.split(c.pos,2,w).scrollIntoView()),!0):!1}}function kFe(e,t,n,r){const o=t.node,i=e.doc.resolve(t.start),a=i.node(-1),s=i.index(-1);if(!a||!a.canReplace(s,s+1,Ht.from(n.create())))return!1;const c=[];for(let y=0;y<o.childCount;y++){const w=o.child(y);if(!r.validContent(w.content))return!1;const C=r.createChecked(null,w.content);c.push(C)}const f=n.createChecked(null,c),p=t.pos,m=p+o.nodeSize,v=e.selection.from;return e.replaceRangeWith(p,m,f),e.setSelection(e.selection.constructor.near(e.doc.resolve(v))),!0}function EFe({listType:e,itemType:t,tr:n,range:r}){var o;const i=r.parent,a=n.doc.slice(r.start,r.end);if(i.type===e&&((o=a.content.firstChild)==null?void 0:o.type)===t)return!1;const s=[];for(let f=0;f<a.content.childCount;f++){const p=a.content.child(f);if(!t.validContent(p.content))return!1;const m=t.createChecked(null,p.content);s.push(m)}const c=e.createChecked(null,s);return n.replaceRange(r.start,r.end,new gn(Ht.from(c),0,0)),!0}function Sp({listType:e,itemType:t,tr:n}){const r=ww(n.selection);if(!r)return!1;const o=r.startIndex===0,{from:i,to:a}=n.selection;return EFe({listType:e,itemType:t,tr:n,range:r})?(n.setSelection(Vn.between(n.doc.resolve(o?i:i+2),n.doc.resolve(o?a:a+2))),n.scrollIntoView(),!0):!1}function TFe(e,t,n){const r=e.tr,o=n.parent,i=r.mapping.maps.length;for(let w=n.end,C=n.endIndex-1,k=n.startIndex;C>k;C--)w-=o.child(C).nodeSize,r.delete(w-1,w+1);const a=r.doc.resolve(n.start),s=a.nodeAfter;if(!s||r.mapping.slice(i).map(n.end)!==n.start+s.nodeSize)return!1;const c=n.startIndex===0,f=n.endIndex===o.childCount,p=a.node(-1),m=a.index(-1);if(!p.canReplace(m+(c?0:1),m+1,s.content.append(f?Ht.empty:Ht.from(o))))return!1;const v=a.pos,y=v+s.nodeSize;return r.step(new Bo(v-(c?1:0),y+(f?1:0),v+1,y-1,new gn((c?Ht.empty:Ht.from(o.copy(Ht.empty))).append(f?Ht.empty:Ht.from(o.copy(Ht.empty))),c?0:1,f?0:1),c?0:1)),t(r.scrollIntoView()),!0}function kV(e,t){const n=t||e.selection.$from;let r=[],o,i,a,s;for(let f=n.depth;f>=0;f--){if(i=n.node(f),o=n.index(f),a=i.maybeChild(o-1),s=i.maybeChild(o),a&&s&&a.type.name===s.type.name&&Cu(a)){const p=n.before(f+1);r.push(p)}if(o=n.indexAfter(f),a=i.maybeChild(o-1),s=i.maybeChild(o),a&&s&&a.type.name===s.type.name&&Cu(a)){const p=n.after(f+1);r.push(p)}}r=[...new Set(r)].sort((f,p)=>p-f);let c=!1;for(const f of r)sv(e.doc,f)&&(e.join(f),c=!0);return c}function EV(e){return t=>{const{dispatch:n,tr:r}=t,o=GD(r,t.state),i=DFe(e,r.selection);return i?(n&&TFe(o,n,i),!0):!1}}function DFe(e,t){const{$from:n,$to:r}=t;return n.blockRange(r,i=>{var a;return((a=i.firstChild)==null?void 0:a.type)===e})}function ww(e){const{$from:t,$to:n}=e;return t.blockRange(n,Cu)}function AFe(e){const t=e.selection.$from,n=t.blockRange();if(!n||!Su(n.parent)||n.startIndex!==0)return!1;const r=t.node(n.depth-2),o=t.index(n.depth),i=t.index(n.depth-1),a=t.index(n.depth-2),s=r.maybeChild(a-1),c=s?.lastChild;if(o!==0||i!==0)return!1;if(s&&Cu(s)&&c&&Su(c))return Sp({listType:s.type,itemType:c.type,tr:e});if(Su(r)){const f=r,p=t.node(n.depth-3);if(Cu(p))return Sp({listType:p.type,itemType:f.type,tr:e})}return!1}function TV({view:e}){if(!e)return!1;{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!Su(n.parent)||n.startIndex!==0)return!1}{const t=e.state.tr;AFe(t)&&e.dispatch(t)}{const t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;const n=t.blockRange();if(!n||!Su(n.parent)||n.startIndex!==0)return!1;const r=t.index(n.depth),o=t.index(n.depth-1),i=t.index(n.depth-2),a=n.depth-2>=1&&Su(t.node(n.depth-2));r===0&&o===0&&i<=1&&a&&bFe(n.parent.type)(e.state,e.dispatch)}return l7(e.state,e.dispatch,e),!0}function DV({node:e,mark:t,updateDOM:n,updateMark:r}){const o=document.createElement("label");o.contentEditable="false",o.classList.add(yu.LIST_ITEM_MARKER_CONTAINER),o.append(t);const i=document.createElement("div"),a=document.createElement("li");a.classList.add(yu.LIST_ITEM_WITH_CUSTOM_MARKER),a.append(o),a.append(i);const s=c=>c.type!==e.type?!1:(e=c,n(e,a),r(e,t),!0);return s(e),{dom:a,contentDOM:i,update:s}}function OFe(e,t){const n=e.node(t.depth-1),r=e.node(t.depth-2);return!Su(n)||!Cu(r)?!1:{parentItem:n,parentList:r}}function MFe(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth);return o<i?(e.step(new Bo(o-1,i,o,i,new gn(Ht.from(r.type.create(null,n.copy())),1,0),1,!0)),new Nd(e.doc.resolve(t.$from.pos),e.doc.resolve(i),t.depth)):t}function PFe(e,t){const n=t.parent,r=t.parent.child(t.endIndex-1),o=t.end,i=t.$to.end(t.depth-1);return o+1<i?(e.step(new Bo(o-1,i,o+1,i,new gn(Ht.from(n.type.create(null,r.type.create(null))),2,0),0,!0)),new Nd(e.selection.$from,e.selection.$to,t.depth)):t}function NFe(e,t,n,r){return Sp({listType:n.type,itemType:r.type,tr:e})?new Nd(e.selection.$from,e.selection.$to,t.depth):t}function _Fe(e){let t=ww(e.selection);if(!t)return!1;const n=OFe(e.selection.$from,t);if(!n)return!1;const{parentItem:r,parentList:o}=n;t=MFe(e,t),t=PFe(e,t),t=NFe(e,t,o,r);const i=qh(t);return typeof i!="number"||(e.lift(t,i),t=ww(e.selection),t&&kV(e,e.doc.resolve(t.end-2))),!0}var RFe=({tr:e,dispatch:t})=>_Fe(e)?(t?.(e.scrollIntoView()),!0):!1;function IFe(e,t,n){let r,o,i,a;const s=t.doc;if(n.startIndex>=1){r=e.child(n.startIndex-1),o=e,a=s.resolve(n.start).start(n.depth),i=a+1;for(let c=0;c<n.startIndex-1;c++)i+=o.child(c).nodeSize}else{const c=t.index(n.depth-1);if(c>=1){const f=t.node(n.depth-1),p=t.start(n.depth-1);if(o=f.child(c-1),!Cu(o))return!1;a=p+1;for(let m=0;m<c-1;m++)a+=f.child(m).nodeSize;if(r=o.child(o.childCount-1),i=a+o.nodeSize-r.nodeSize-1,!Su(r))return!1}else return!1}return{previousItem:r,previousList:o,previousItemStart:i,previousListStart:a}}function LFe(e,t,n){let r,o;const i=n.start,a=t.depth>=n.depth+2?t.end(n.depth+2):n.end-1,s=n.end;return a+1>=s?(r=e.slice(i,s),o=null):(r=e.slice(i,a),o=e.slice(a+1,s-1)),{selectedSlice:r,unselectedSlice:o}}function $Fe(e){const{$from:t,$to:n}=e.selection,r=ww(e.selection);if(!r)return!1;const o=e.doc.resolve(r.start).node();if(!Cu(o))return!1;const i=IFe(o,t,r);if(!i)return!1;const{previousItem:a,previousList:s,previousItemStart:c}=i,{selectedSlice:f,unselectedSlice:p}=LFe(e.doc,n,r),m=a.content.append(Ht.fromArray([o.copy(f.content)])).append(p?p.content:Ht.empty);e.deleteRange(r.start,r.end);const v=c+a.nodeSize-2,y=a.copy(m);return y.check(),e.replaceRangeWith(c-1,v+1,y),e.setSelection(s===o?Vn.between(e.doc.resolve(t.pos),e.doc.resolve(n.pos)):Vn.between(e.doc.resolve(t.pos-2),e.doc.resolve(n.pos-2))),!0}var FFe=({tr:e,dispatch:t})=>$Fe(e)?(t?.(e.scrollIntoView()),!0):!1,AV=class extends Xr{get name(){return"listItemShared"}createKeymap(){const e={Tab:FFe,"Shift-Tab":RFe,Backspace:TV,"Mod-Backspace":TV};if(es.isMac){const t={"Ctrl-h":e.Backspace,"Alt-Backspace":e["Mod-Backspace"]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,n)=>{const r=n.tr;return kV(r)?r:null}}}},kp=class extends aa{get name(){return"listItem"}createTags(){return[jn.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:e.parse,priority:Fr.Lowest},...t.parseDOM??[]],toDOM:n=>["li",e.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(e,t,n)=>{const r=document.createElement("div");return r.classList.add(yu.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const o=n(),i=zn.create(t.state.doc,o);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),DV({mark:r,node:e,updateDOM:BFe,updateMark:zFe})}:{}}createKeymap(){return{Enter:SV(this.type)}}createExtensions(){return[new AV]}toggleListItemClosed(e){return({state:{tr:t,selection:n},dispatch:r})=>{if(!Sv(n)||n.node.type.name!==this.name)return!1;const{node:o,from:i}=n;return e=tD(e)?e:!o.attrs.closed,r?.(t.setNodeMarkup(i,void 0,{...o.attrs,closed:e})),!0}}liftListItemOutOfList(e){return EV(e??this.type)}};rs([Cn()],kp.prototype,"toggleListItemClosed",1),rs([Cn()],kp.prototype,"liftListItemOutOfList",1),kp=rs([dr({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],kp);function BFe(e,t){e.attrs.closed?t.classList.add(yu.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(yu.COLLAPSIBLE_LIST_ITEM_CLOSED)}function zFe(e,t){e.childCount<=1?t.classList.add("disabled"):t.classList.remove("disabled")}var Zv=class extends aa{get name(){return"bulletList"}createTags(){return[jn.Block,jn.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["ul",e.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(e,t,n)=>{var r;const o=document.createElement("div");o.style.position="relative";const i=n(),a=t.state.doc.resolve(i+1),s=a.node(a.depth-1);if(!(((r=s?.type)==null?void 0:r.name)!=="listItem")){const p=document.createElement("div");p.contentEditable="false",p.classList.add(yu.LIST_SPINE),p.addEventListener("click",m=>{const v=n(),y=t.state.doc.resolve(v+1),w=y.start(y.depth-1),C=zn.create(t.state.doc,w-1);t.dispatch(t.state.tr.setSelection(C)),this.store.commands.toggleListItemClosed(),m.preventDefault(),m.stopPropagation()}),o.append(p)}const f=document.createElement("ul");return f.classList.add(yu.UL_LIST_CONTENT),o.append(f),{dom:o,contentDOM:f}}:{}}createExtensions(){return[new kp({priority:Fr.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return YA(this.type,mo(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){const e=/^\s*([*+-])\s$/;return[A1(e,this.type),new ra(e,(t,n,r,o)=>{const i=t.tr;return i.deleteRange(r,o),Sp({listType:this.type,itemType:mo(this.store.schema.nodes,"listItem"),tr:i})?i:null})]}};rs([Cn({icon:"listUnordered",label:({t:e})=>e(SD.BULLET_LIST_LABEL)})],Zv.prototype,"toggleBulletList",1),rs([co({shortcut:on.BulletList,command:"toggleBulletList"})],Zv.prototype,"listShortcut",1),Zv=rs([dr({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],Zv);var Jv=class extends aa{get name(){return"orderedList"}createTags(){return[jn.Block,jn.ListContainerNode]}createNodeSpec(e,t){return{content:"listItem+",...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>ji(n)?{...e.parse(n),order:+(n.getAttribute("start")??1)}:{}},...t.parseDOM??[]],toDOM:n=>{const r=e.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new kp({priority:Fr.Low})]}toggleOrderedList(){return YA(this.type,mo(this.store.schema.nodes,"listItem"))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){const e=/^(\d+)\.\s$/;return[A1(e,this.type,t=>({order:+mo(t,1)}),(t,n)=>n.childCount+n.attrs.order===+mo(t,1)),new ra(e,(t,n,r,o)=>{const i=t.tr;if(i.deleteRange(r,o),!Sp({listType:this.type,itemType:mo(this.store.schema.nodes,"listItem"),tr:i}))return null;const s=+mo(n,1);if(s!==1){const c=du({selection:i.selection,types:this.type});c&&i.setNodeMarkup(c.pos,void 0,{order:s})}return i})]}};rs([Cn({icon:"listOrdered",label:({t:e})=>e(SD.ORDERED_LIST_LABEL)})],Jv.prototype,"toggleOrderedList",1),rs([co({shortcut:on.OrderedList,command:"toggleOrderedList"})],Jv.prototype,"listShortcut",1),Jv=rs([dr({})],Jv);var OV=class extends aa{get name(){return"taskListItem"}createTags(){return[jn.ListItemNode]}createNodeSpec(e,t){return{content:"paragraph block*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return ji(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...e.parse(n)}},priority:Fr.Medium},...t.parseDOM??[]],toDOM:n=>["li",{...e.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(e,t,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(yu.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",o=>{t.editable||o.preventDefault()}),r.addEventListener("change",()=>{const o=n(),i=t.state.doc.resolve(o+1);this.store.commands.toggleCheckboxChecked({$pos:i})}),r.checked=e.attrs.checked,DV({node:e,mark:r,updateDOM:VFe,updateMark:HFe})}}createKeymap(){return{Enter:SV(this.type)}}createExtensions(){return[new AV]}toggleCheckboxChecked(e){let t,n;return typeof e=="boolean"?t=e:e&&(t=e.checked,n=e.$pos),({tr:r,dispatch:o})=>{const i=du({selection:n??r.selection.$from,types:this.type});if(!i)return!1;const{node:a,pos:s}=i,c={...a.attrs,checked:t??!a.attrs.checked};return o?.(r.setNodeMarkup(s,void 0,c)),!0}}createInputRules(){const e=/^\s*(\[( ?|x|X)]\s)$/;return[A1(e,this.type,t=>({checked:["x","X"].includes(cc(t,2))})),new ra(e,(t,n,r,o)=>{const i=t.tr;if(i.deleteRange(r,o),!Sp({listType:mo(this.store.schema.nodes,"taskList"),itemType:this.type,tr:i}))return null;const s=["x","X"].includes(cc(n,2));if(s){const c=du({selection:i.selection,types:this.type});c&&i.setNodeMarkup(c.pos,void 0,{checked:s})}return i})]}};rs([Cn()],OV.prototype,"toggleCheckboxChecked",1);function VFe(e,t){e.attrs.checked?t.setAttribute("data-checked",""):t.removeAttribute("data-checked"),t.setAttribute("data-task-list-item","")}function HFe(e,t){t.checked=!!e.attrs.checked}var UA=class extends aa{get name(){return"taskList"}createTags(){return[jn.Block,jn.ListContainerNode]}createNodeSpec(e,t){return{content:"taskListItem+",...t,attrs:e.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:e.parse,priority:Fr.Medium},...t.parseDOM??[]],toDOM:n=>["ul",{...e.dom(n),"data-task-list":""},0]}}createExtensions(){return[new OV({})]}toggleTaskList(){return YA(this.type,mo(this.store.schema.nodes,"taskListItem"))}listShortcut(e){return this.toggleTaskList()(e)}};rs([Cn({icon:"checkboxMultipleLine",label:({t:e})=>e(SD.TASK_LIST_LABEL)})],UA.prototype,"toggleTaskList",1),rs([co({shortcut:on.TaskList,command:"toggleTaskList"})],UA.prototype,"listShortcut",1);var jFe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ep=new WeakMap,Cw=new WeakMap,Sw={},qA=0,MV=function(e){return e&&(e.host||MV(e.parentNode))},WFe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=MV(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},YFe=function(e,t,n,r){var o=WFe(t,Array.isArray(e)?e:[e]);Sw[n]||(Sw[n]=new WeakMap);var i=Sw[n],a=[],s=new Set,c=new Set(o),f=function(m){!m||s.has(m)||(s.add(m),f(m.parentNode))};o.forEach(f);var p=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(v){if(s.has(v))p(v);else{var y=v.getAttribute(r),w=y!==null&&y!=="false",C=(Ep.get(v)||0)+1,k=(i.get(v)||0)+1;Ep.set(v,C),i.set(v,k),a.push(v),C===1&&w&&Cw.set(v,!0),k===1&&v.setAttribute(n,"true"),w||v.setAttribute(r,"true")}})};return p(t),s.clear(),qA++,function(){a.forEach(function(m){var v=Ep.get(m)-1,y=i.get(m)-1;Ep.set(m,v),i.set(m,y),v||(Cw.has(m)||m.removeAttribute(r),Cw.delete(m)),y||m.removeAttribute(n)}),qA--,qA||(Ep=new WeakMap,Ep=new WeakMap,Cw=new WeakMap,Sw={})}},UFe=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||jFe(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),YFe(r,o,n,"aria-hidden")):function(){return null}},Sl,qFe=(e=document)=>Sl||(Sl=e.createElement("div"),Sl.setAttribute("id","a11y-status-message"),Sl.setAttribute("role","status"),Sl.setAttribute("aria-live","polite"),Sl.setAttribute("aria-relevant","additions text"),Object.assign(Sl.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.append(Sl),Sl);XB(500,()=>{qFe().textContent=""});function PV(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function NV(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function KA(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return NV(n.overflowY,t)||NV(n.overflowX,t)||function(r){var o=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)}(e)}return!1}function kw(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}var KFe=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,c=typeof a=="function"?a:function(Ie){return Ie!==a};if(!PV(e))throw new TypeError("Invalid target");for(var f,p,m=document.scrollingElement||document.documentElement,v=[],y=e;PV(y)&&c(y);){if((y=(p=(f=y).parentElement)==null?f.getRootNode().host||null:p)===m){v.push(y);break}y!=null&&y===document.body&&KA(y)&&!KA(document.documentElement)||y!=null&&KA(y,s)&&v.push(y)}for(var w=n.visualViewport?n.visualViewport.width:innerWidth,C=n.visualViewport?n.visualViewport.height:innerHeight,k=window.scrollX||pageXOffset,T=window.scrollY||pageYOffset,E=e.getBoundingClientRect(),_=E.height,R=E.width,P=E.top,$=E.right,z=E.bottom,q=E.left,Y=o==="start"||o==="nearest"?P:o==="end"?z:P+_/2,J=i==="center"?q+R/2:i==="end"?$:q,K=[],ee=0;ee<v.length;ee++){var re=v[ee],ne=re.getBoundingClientRect(),oe=ne.height,fe=ne.width,se=ne.top,ue=ne.right,le=ne.bottom,ce=ne.left;if(r==="if-needed"&&P>=0&&q>=0&&z<=C&&$<=w&&P>=se&&z<=le&&q>=ce&&$<=ue)return K;var Se=getComputedStyle(re),Me=parseInt(Se.borderLeftWidth,10),ze=parseInt(Se.borderTopWidth,10),ke=parseInt(Se.borderRightWidth,10),pe=parseInt(Se.borderBottomWidth,10),Oe=0,Ae=0,Pe="offsetWidth"in re?re.offsetWidth-re.clientWidth-Me-ke:0,Ve="offsetHeight"in re?re.offsetHeight-re.clientHeight-ze-pe:0,Le="offsetWidth"in re?re.offsetWidth===0?0:fe/re.offsetWidth:0,Ne="offsetHeight"in re?re.offsetHeight===0?0:oe/re.offsetHeight:0;if(m===re)Oe=o==="start"?Y:o==="end"?Y-C:o==="nearest"?kw(T,T+C,C,ze,pe,T+Y,T+Y+_,_):Y-C/2,Ae=i==="start"?J:i==="center"?J-w/2:i==="end"?J-w:kw(k,k+w,w,Me,ke,k+J,k+J+R,R),Oe=Math.max(0,Oe+T),Ae=Math.max(0,Ae+k);else{Oe=o==="start"?Y-se-ze:o==="end"?Y-le+pe+Ve:o==="nearest"?kw(se,le,oe,ze,pe+Ve,Y,Y+_,_):Y-(se+oe/2)+Ve/2,Ae=i==="start"?J-ce-Me:i==="center"?J-(ce+fe/2)+Pe/2:i==="end"?J-ue+ke+Pe:kw(ce,ue,fe,Me,ke+Pe,J,J+R,R);var Te=re.scrollLeft,He=re.scrollTop;Y+=He-(Oe=Math.max(0,Math.min(He+Oe/Ne,re.scrollHeight-oe/Ne+Ve))),J+=Te-(Ae=Math.max(0,Math.min(Te+Ae/Le,re.scrollWidth-fe/Le+Pe)))}K.push({el:re,top:Oe,left:Ae})}return K};typeof Cl=="object"&&Cl.__esModule&&Cl.default&&Cl.default,zTe(KFe);var GFe=typeof document<"u"?Nl:dn;function XFe(e){const t=Yt();return GFe(()=>{t.current=e}),t.current}function ZFe(e,t){const[n,r]=Tn([]),[o,i]=Tn(()=>BA(e)),[a,s]=Tn([]),c=Yt(e),f=XFe(o);return c.current=e,xV(wp,({addCustomHandler:p})=>{const m=BA(c.current),v=p("positioner",m);return i(m),v},t),Nl(()=>{const p=o.addListener("update",v=>{const y=[];for(const{id:w,data:C,setElement:k}of v){const T=E=>{E&&k(E)};y.push({id:w,data:C,ref:T})}s(y)}),m=o.addListener("done",v=>{r(v)});return f?.recentUpdate&&o.onActiveChanged(f?.recentUpdate),()=>{p(),m()}},[o,f]),Ur(()=>{const p=[];for(const[m,{ref:v,data:y,id:w}]of a.entries()){const C=n[m],{element:k,position:T={}}=C??{},E={...LA,...tz(T)};p.push({ref:v,element:k,data:y,key:w,...E})}return p},[a,n])}function JFe(e,t){const n=t==null||tD(t)?[e]:t,r=tD(t)?t:!0,o=Yt(rv()),a=ZFe(e,n)[0];return Ur(()=>a&&r?{...a,active:!0}:{...LA,ref:void 0,data:{},active:!1,key:o.current},[r,a])}function QFe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 19h16v2H4zm0-4h11v2H4zm0-4h16v2H4zm0-8h16v2H4zm0 4h11v2H4z"}}]})(e)}function e6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 19h16v2H4zm3-4h10v2H7zm-3-4h16v2H4zm0-8h16v2H4zm3 4h10v2H7z"}}]})(e)}function t6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 19h16v2H4zm5-4h11v2H9zm-5-4h16v2H4zm0-8h16v2H4zm5 4h11v2H9z"}}]})(e)}function n6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M17.061 11.22A4.46 4.46 0 0 0 18 8.5C18 6.019 15.981 4 13.5 4H6v15h8c2.481 0 4.5-2.019 4.5-4.5a4.48 4.48 0 0 0-1.439-3.28zM13.5 7c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5H9V7h4.5zm.5 9H9v-3h5c.827 0 1.5.673 1.5 1.5S14.827 16 14 16z"}}]})(e)}function r6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 20V4h-3v6H9V4H6v16h3v-7h6v7z"}}]})(e)}function o6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19 7V4H9v3h2.868L9.012 17H5v3h10v-3h-2.868l2.856-10z"}}]})(e)}function i6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z"}},{tag:"path",attr:{d:"m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z"}}]})(e)}function a6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4zm16-8V6H8.023v2H18.8zM8 11h12v2H8zm0 5h12v2H8z"}}]})(e)}function s6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 11h-8c-4 0-4-1.816-4-2.5C8 7.882 8 6 12 6c2.8 0 2.99 1.678 3 2.014L16 8h1c0-1.384-1.045-4-5-4-5.416 0-6 3.147-6 4.5 0 .728.148 1.667.736 2.5H4v2h16v-2zm-8 7c-3.793 0-3.99-1.815-4-2H6c0 .04.069 4 6 4 5.221 0 6-2.819 6-4.5 0-.146-.009-.317-.028-.5h-2.006c.032.2.034.376.034.5 0 .684 0 2.5-4 2.5z"}}]})(e)}function l6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M5 18h14v2H5zM6 4v6c0 3.309 2.691 6 6 6s6-2.691 6-6V4h-2v6c0 2.206-1.794 4-4 4s-4-1.794-4-4V4H6z"}}]})(e)}function c6e({onClick:e,disabled:t,isActive:n,children:r,type:o="button"},i){return W("button",{ref:i,onClick:e,disabled:t,className:Ot({"kd-editor-toolbar__action-button":!0,"kd-editor-toolbar__action-button--flat":o==="flat","kd-editor-toolbar__action-button--active":n}),type:o,children:r})}var is=or(c6e);function _V({iconSize:e=18,type:t}){const n=vc().bold(),{toggleBold:r,focus:o}=_s();function i(){r(),o()}return W(is,{type:t,isActive:n,onClick:i,disabled:!r.enabled(),children:W(n6e,{size:e})})}function RV({iconSize:e=18,type:t}){const n=vc().italic(),{toggleItalic:r,focus:o}=_s();function i(){r(),o()}return W(is,{type:t,isActive:n,onClick:i,disabled:!r.enabled(),children:W(o6e,{size:e})})}function IV({iconSize:e=18,type:t}){const n=vc().underline(),{toggleUnderline:r,focus:o}=_s();function i(){r(),o()}return W(is,{type:t,isActive:n,onClick:i,disabled:!r.enabled(),children:W(l6e,{size:e})})}function u6e(){const e=vc().strike(),{toggleStrike:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(s6e,{size:18})})}function d6e(){const e=vc().bulletList(),{toggleBulletList:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(a6e,{size:18})})}function LV(e){return ir({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"}},{tag:"path",attr:{d:"M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z"}}]})(e)}function f6e(e){return ir({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5z"}},{tag:"path",attr:{d:"M1.713 11.865v-.474H2c.217 0 .363-.137.363-.317 0-.185-.158-.31-.361-.31-.223 0-.367.152-.373.31h-.59c.016-.467.373-.787.986-.787.588-.002.954.291.957.703a.595.595 0 0 1-.492.594v.033a.615.615 0 0 1 .569.631c.003.533-.502.8-1.051.8-.656 0-1-.37-1.008-.794h.582c.008.178.186.306.422.309.254 0 .424-.145.422-.35-.002-.195-.155-.348-.414-.348h-.3zm-.004-4.699h-.604v-.035c0-.408.295-.844.958-.844.583 0 .96.326.96.756 0 .389-.257.617-.476.848l-.537.572v.03h1.054V9H1.143v-.395l.957-.99c.138-.142.293-.304.293-.508 0-.18-.147-.32-.342-.32a.33.33 0 0 0-.342.338v.041zM2.564 5h-.635V2.924h-.031l-.598.42v-.567l.629-.443h.635V5z"}}]})(e)}function h6e(e){return ir({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}}]})(e)}function p6e(){const e=vc().orderedList(),{toggleOrderedList:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(f6e,{size:18})})}function m6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}}]})(e)}function g6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z"}}]})(e)}function v6e(e){return ir({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M139.61 35.5a12 12 0 0 0-17 0L58.93 98.81l-22.7-22.12a12 12 0 0 0-17 0L3.53 92.41a12 12 0 0 0 0 17l47.59 47.4a12.78 12.78 0 0 0 17.61 0l15.59-15.62L156.52 69a12.09 12.09 0 0 0 .09-17zm0 159.19a12 12 0 0 0-17 0l-63.68 63.72-22.7-22.1a12 12 0 0 0-17 0L3.53 252a12 12 0 0 0 0 17L51 316.5a12.77 12.77 0 0 0 17.6 0l15.7-15.69 72.2-72.22a12 12 0 0 0 .09-16.9zM64 368c-26.49 0-48.59 21.5-48.59 48S37.53 464 64 464a48 48 0 0 0 0-96zm432 16H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H208a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z"}}]})(e)}function b6e(){const e=vc().taskList(),{toggleTaskList:t,focus:n}=_s();function r(){t(),n()}return W(is,{isActive:e,onClick:r,disabled:!t.enabled(),children:W(v6e,{size:18})})}function y6e(){const{rightAlign:e}=_s();HA();function t(){e()}const n=e?.active?e?.active():void 0,r=!e.enabled();return W(is,{isActive:n,onClick:t,disabled:r,children:W(t6e,{size:18})})}function x6e(){const{leftAlign:e}=_s();HA();function t(){e()}const n=e?.active?e?.active():void 0,r=!e.enabled();return W(is,{isActive:n,onClick:t,disabled:r,children:W(QFe,{size:18})})}function w6e(){const{centerAlign:e}=_s();HA();function t(){e()}const n=e?.active?e?.active():void 0,r=!e.enabled();return W(is,{isActive:n,onClick:t,disabled:r,children:W(e6e,{size:18})})}function C6e({toolbar:e=[]}){const t=Er();return mt("div",{className:"kd-editor-toolbar",style:{"--bs-primary":t.palette.primary.main},children:[mt("div",{className:"kd-editor-toolbar__actions-sections",children:[e.includes("BOLD")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(_V,{})}),e.includes("ITALIC")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(RV,{})}),e.includes("UNDERLINE")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(IV,{})}),e.includes("STRIKETHROUGH")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(u6e,{})})]}),mt("div",{className:"kd-editor-toolbar__actions-sections",children:[e.includes("BULLET_LIST")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(d6e,{})}),e.includes("ORDERED_LIST")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(p6e,{})}),e.includes("TASK_LIST")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(b6e,{})})]}),mt("div",{className:"kd-editor-toolbar__actions-sections",children:[e.includes("RIGHT_ALIGN")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(y6e,{})}),e.includes("CENTER_ALIGN")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(w6e,{})}),e.includes("LEFT_ALIGN")&&W("div",{className:"kd-editor-toolbar__action-container",children:W(x6e,{})})]})]})}var S6e=T6e,$V="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",FV="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",k6e=new RegExp("^[^"+FV+"]*["+$V+"]"),E6e=new RegExp("^[^"+$V+"]*["+FV+"]");function T6e(e){return e=String(e||""),k6e.test(e)?"rtl":E6e.test(e)?"ltr":"neutral"}var D6e=ro(S6e),A6e=Object.defineProperty,O6e=Object.getOwnPropertyDescriptor,BV=(e,t,n,r)=>{for(var o=r>1?void 0:r?O6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&A6e(t,n,o),o},M6e={icon:({attrs:e})=>e?.dir==="ltr"?"textDirectionL":"textDirectionR",description:({t:e,attrs:t})=>e({...t8.DESCRIPTION,values:{dir:t?.dir}}),label:({t:e,attrs:t})=>e({...t8.LABEL,values:{dir:t?.dir}})},Ew=class extends Xr{constructor(){super(...arguments),this._ignoreNextUpdate=!1}get name(){return"bidi"}createAttributes(){return this.options.defaultDirection?{dir:this.options.defaultDirection}:{}}createSchemaAttributes(){const e="data-ignore-bidi-auto";return[{identifiers:{type:"node",tags:[jn.BlockNode],excludeNames:this.options.excludeNodes},attributes:{dir:this.dir(),ignoreBidiAutoUpdate:{default:null,parseDOM:e,toDOM:t=>t.ignoreBidiAutoUpdate?[e,"true"]:void 0}}}]}createPlugin(){return{state:{init:()=>!1,apply:e=>this._ignoreNextUpdate?(this._ignoreNextUpdate=!1,!1):B9(e)},appendTransaction:(e,t,n)=>{const r=this.getPluginState(),{autoUpdate:o,excludeNodes:i}=this.options,a=n.tr;if(!r||!o)return;const s=zV(n.selection,i);if(!s)return;const{node:c,pos:f}=s,p=c.attrs.dir,m=this.getDirection(c.textContent);if(p!==m&&!c.attrs.ignoreBidiAutoUpdate)return this._ignoreNextUpdate=!0,this.store.chain(a).updateNodeAttributes(f,{...c.attrs,dir:m}).tr()}}}onSetOptions(e){const{changes:t}=e;t.defaultDirection.changed&&this.store.updateAttributes()}dir(){return{default:this.options.defaultDirection??null,parseDOM:e=>e.getAttribute("dir")??this.getDirection(e.textContent),toDOM:(e,{node:t})=>{if(t&&t.textContent)return this.getDirection(t.textContent)??this.options.defaultDirection}}}getDirection(e){if(!Bn(e))return;const t=D6e(e);return t==="neutral"?this.options.defaultDirection:t}setTextDirection(e,t={}){return n=>{const{tr:r}=n,{selection:o}=t,i=this.store.commands.updateNodeAttributes.original,a=zV(Sa(o??r.selection,r.doc),this.options.excludeNodes);return!a||a.node.attrs.dir==e?!1:i(a.pos,{dir:e,ignoreBidiAutoUpdate:e&&!0})(n)}}};BV([Cn(M6e)],Ew.prototype,"setTextDirection",1),Ew=BV([dr({defaultOptions:{defaultDirection:void 0,autoUpdate:!1,excludeNodes:[]},staticKeys:["excludeNodes"]})],Ew);function zV(e,t){return ap({predicate:n=>!!(n.isTextblock&&n.textContent&&!t.includes(n.type.name)),selection:e})}var P6e=Object.defineProperty,N6e=Object.getOwnPropertyDescriptor,Qv=(e,t,n,r)=>{for(var o=r>1?void 0:r?N6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&P6e(t,n,o),o},_6e={icon:"bold",label:({t:e})=>e(r8.LABEL),description:({t:e})=>e(r8.DESCRIPTION)},qd=class extends dp{get name(){return"bold"}createTags(){return[jn.FormattingMark,jn.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"strong",getAttrs:e.parse},{tag:"b",getAttrs:n=>ji(n)&&n.style.fontWeight!=="normal"?e.parse(n):!1},{style:"font-weight",getAttrs:n=>Bn(n)&&/^(bold(er)?|[5-9]\d{2,})$/.test(n)?null:!1},...t.parseDOM??[]],toDOM:n=>{const{weight:r}=this.options;return r?["strong",{"font-weight":r.toString()},0]:["strong",e.dom(n),0]}}}createInputRules(){return[Y1({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return fp({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=Sa(e??t.selection,t.doc);return n?.(t.addMark(r,o,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:n})=>{const{from:r,to:o}=Sa(e??t.selection,t.doc);return t.doc.rangeHasMark(r,o,this.type)?(n?.(t.removeMark(r,o,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};Qv([Cn(_6e)],qd.prototype,"toggleBold",1),Qv([Cn()],qd.prototype,"setBold",1),Qv([Cn()],qd.prototype,"removeBold",1),Qv([co({shortcut:on.Bold,command:"toggleBold"})],qd.prototype,"shortcut",1),qd=Qv([dr({defaultOptions:{weight:void 0},staticKeys:["weight"]})],qd);var R6e=Object.defineProperty,I6e=Object.getOwnPropertyDescriptor,GA=(e,t,n,r)=>{for(var o=r>1?void 0:r?I6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&R6e(t,n,o),o},L6e={icon:"italic",label:({t:e})=>e(i8.LABEL),description:({t:e})=>e(i8.DESCRIPTION)},eb=class extends dp{get name(){return"italic"}createTags(){return[jn.FontStyle,jn.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"i",getAttrs:e.parse},{tag:"em",getAttrs:e.parse},{style:"font-style=italic"},...t.parseDOM??[]],toDOM:n=>["em",e.dom(n),0]}}createKeymap(){return{"Mod-i":fp({type:this.type})}}createInputRules(){return[Y1({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:t+1}}),Y1({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:"mark",markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:"mark",markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return fp({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};GA([Cn(L6e)],eb.prototype,"toggleItalic",1),GA([co({shortcut:on.Italic,command:"toggleItalic"})],eb.prototype,"shortcut",1),eb=GA([dr({})],eb);var $6e=Object.defineProperty,F6e=Object.getOwnPropertyDescriptor,XA=(e,t,n,r)=>{for(var o=r>1?void 0:r?F6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&$6e(t,n,o),o},B6e={icon:"strikethrough",label:({t:e})=>e(a8.LABEL),description:({t:e})=>e(a8.DESCRIPTION)},tb=class extends dp{get name(){return"strike"}createTags(){return[jn.FontStyle,jn.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"s",getAttrs:e.parse},{tag:"del",getAttrs:e.parse},{tag:"strike",getAttrs:e.parse},{style:"text-decoration",getAttrs:n=>n==="line-through"?{}:!1},...t.parseDOM??[]],toDOM:n=>["s",e.dom(n),0]}}toggleStrike(){return fp({type:this.type})}shortcut(e){return this.toggleStrike()(e)}createInputRules(){return[Y1({regexp:/~([^~]+)~$/,type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{regexp:/~([^~]+)~/g,type:"mark",markType:this.type}]}};XA([Cn(B6e)],tb.prototype,"toggleStrike",1),XA([co({shortcut:on.Strike,command:"toggleStrike"})],tb.prototype,"shortcut",1),tb=XA([dr({})],tb);var z6e=Object.defineProperty,V6e=Object.getOwnPropertyDescriptor,ZA=(e,t,n,r)=>{for(var o=r>1?void 0:r?V6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&z6e(t,n,o),o},H6e={icon:"underline",label:({t:e})=>e(s8.LABEL),description:({t:e})=>e(s8.DESCRIPTION)},nb=class extends dp{get name(){return"underline"}createTags(){return[jn.FontStyle,jn.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"u",getAttrs:e.parse},{style:"text-decoration",getAttrs:n=>n==="underline"?{}:!1},...t.parseDOM??[]],toDOM:n=>["u",e.dom(n),0]}}toggleUnderline(e){return fp({type:this.type,selection:e})}shortcut(e){return this.toggleUnderline()(e)}};ZA([Cn(H6e)],nb.prototype,"toggleUnderline",1),ZA([co({shortcut:on.Underline,command:"toggleUnderline"})],nb.prototype,"shortcut",1),nb=ZA([dr({})],nb);var j6e=Object.defineProperty,W6e=Object.getOwnPropertyDescriptor,Pi=(e,t,n,r)=>{for(var o=r>1?void 0:r?W6e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&j6e(t,n,o),o},Y6e={label:({t:e})=>e(Zh.INCREASE_INDENT_LABEL),icon:"indentIncrease"},U6e={label:({t:e})=>e(Zh.DECREASE_INDENT_LABEL),icon:"indentDecrease"},q6e={label:({t:e})=>e(Zh.CENTER_ALIGN_LABEL),icon:"alignCenter",active:Tw(({node:e})=>e.attrs.nodeTextAlignment==="center")},K6e={label:({t:e})=>e(Zh.JUSTIFY_ALIGN_LABEL),icon:"alignJustify",active:Tw(({node:e})=>e.attrs.nodeTextAlignment==="justify")},G6e={label:({t:e})=>e(Zh.RIGHT_ALIGN_LABEL),icon:"alignRight",active:Tw(({node:e})=>e.attrs.nodeTextAlignment==="right")},X6e={label:({t:e})=>e(Zh.LEFT_ALIGN_LABEL),icon:"alignLeft",active:Tw(({node:e})=>{const{nodeTextAlignment:t}=e.attrs;return t==="left"||t===""})};function Tw(e){return({excludeNodes:t},n)=>{const{getState:r,nodeTags:o}=n;return HV(r(),o.formattingNode,t).some(e)}}function VV(e,t,n){return n.includes(e.name)?!1:t.includes(e.name)}function HV(e,t,n){const r=[],{$from:o,$to:i}=e.selection,a=o.blockRange(i);if(!a)return[];const{parent:s,start:c,end:f}=a;return s.nodeSize-2===f-c&&VV(s.type,t,n)?[{node:s,pos:c-1}]:(e.doc.nodesBetween(c,f,(m,v)=>{if(!(v<c||v>f)&&VV(m.type,t,n))return r.push({node:m,pos:v}),!1}),r)}var jV="data-node-indent",WV="data-node-text-align",YV="data-line-height-align";function Z6e(e,t){const n=$1(oz(e)),r=$1(t??"0"),o=e.length??1,i=n/o;return g1({max:o,min:0,value:Math.floor(r/i)})}var J6e=/^\d+(?:\.\d+)?$/,Q6e=/^(\d+(?:\.\d+)?)%$/;function UV(e){if(wi(e))return e;if(!e)return null;const t=e.trim(),n=t.match(Q6e);if(n)return Number.parseFloat(n[1])/100;const r=t.match(J6e);return r?Number.parseFloat(r[0]):null}var ui=class extends Xr{get name(){return"nodeFormatting"}createSchemaAttributes(){return[{identifiers:{type:"node",tags:[jn.FormattingNode],excludeNames:this.options.excludeNodes},attributes:{nodeIndent:this.nodeIndent(),nodeTextAlignment:this.nodeTextAlignment(),nodeLineHeight:this.nodeLineHeight(),style:{default:"",parseDOM:()=>"",toDOM:({nodeIndent:e,nodeTextAlignment:t,nodeLineHeight:n,style:r})=>{const o=e?this.options.indents[e]:void 0;return{style:Q9({marginLeft:o,textAlign:t&&t!=="none"?t:void 0,lineHeight:n||void 0},r)}}}}}]}setLineHeight(e){return this.setNodeAttribute(({node:t})=>{if(e!==t.attrs.nodeLineHeight)return{nodeLineHeight:e}})}setTextAlignment(e){return this.setNodeAttribute(({node:t})=>{if(e!==t.attrs.nodeTextAlignment)return{nodeTextAlignment:e}})}setIndent(e){return this.setNodeAttribute(({node:t})=>{const n=t.attrs.nodeIndent??0,r=e==="-1"?n-1:e==="+1"?n+1:e,o=g1({min:0,max:this.options.indents.length-1,value:r});if(o!==n)return{nodeIndent:o}})}centerAlign(){return this.setTextAlignment("center")}justifyAlign(){return this.setTextAlignment("justify")}leftAlign(){return this.setTextAlignment("left")}rightAlign(){return this.setTextAlignment("right")}increaseIndent(){return e=>this.setIndent("+1")(e)}decreaseIndent(){return e=>this.setIndent("-1")(e)}centerAlignShortcut(e){return this.centerAlign()(e)}justifyAlignShortcut(e){return this.justifyAlign()(e)}leftAlignShortcut(e){return this.leftAlign()(e)}rightAlignShortcut(e){return this.rightAlign()(e)}increaseIndentShortcut(e){return this.increaseIndent()(e)}decreaseIndentShortcut(e){return this.decreaseIndent()(e)}nodeIndent(){return{default:null,parseDOM:e=>e.getAttribute(jV)??Z6e(this.options.indents,e.style.marginLeft),toDOM:e=>{if(!e.nodeIndent)return;const t=`${e.nodeIndent}`;if(this.options.indents[e.nodeIndent])return{[jV]:t}}}}nodeTextAlignment(){return{default:null,parseDOM:e=>e.getAttribute(WV)??e.style.textAlign,toDOM:e=>{const t=e.nodeTextAlignment;if(!(!t||t==="none"))return{[WV]:t}}}}nodeLineHeight(){return{default:null,parseDOM:e=>{const t=e.getAttribute(YV);return UV(t)??UV(e.style.lineHeight)},toDOM:e=>{const t=e.nodeLineHeight;if(t)return{[YV]:t.toString()}}}}setNodeAttribute(e){return t=>{const{tr:n,dispatch:r}=t,o=HV(n,this.store.nodeTags.formattingNode,this.options.excludeNodes);if(ks(o))return!1;if(!r)return!0;const i=[];for(const a of o){const{node:s,pos:c}=a,f=e(a);f&&i.push([c,{...s.attrs,...f}])}if(ks(i))return!1;if(!r)return!0;for(const[a,s]of i)n.setNodeMarkup(a,void 0,s);return r(n),!0}}};Pi([Cn()],ui.prototype,"setLineHeight",1),Pi([Cn()],ui.prototype,"setTextAlignment",1),Pi([Cn()],ui.prototype,"setIndent",1),Pi([Cn(q6e)],ui.prototype,"centerAlign",1),Pi([Cn(K6e)],ui.prototype,"justifyAlign",1),Pi([Cn(X6e)],ui.prototype,"leftAlign",1),Pi([Cn(G6e)],ui.prototype,"rightAlign",1),Pi([Cn(Y6e)],ui.prototype,"increaseIndent",1),Pi([Cn(U6e)],ui.prototype,"decreaseIndent",1),Pi([co({shortcut:on.CenterAlignment,command:"centerAlign"})],ui.prototype,"centerAlignShortcut",1),Pi([co({shortcut:on.JustifyAlignment,command:"justifyAlign"})],ui.prototype,"justifyAlignShortcut",1),Pi([co({shortcut:on.LeftAlignment,command:"leftAlign"})],ui.prototype,"leftAlignShortcut",1),Pi([co({shortcut:on.RightAlignment,command:"rightAlign"})],ui.prototype,"rightAlignShortcut",1),Pi([co({shortcut:on.IncreaseIndent,command:"increaseIndent",priority:Fr.Low})],ui.prototype,"increaseIndentShortcut",1),Pi([co({shortcut:on.DecreaseIndent,command:"decreaseIndent",priority:Fr.Medium})],ui.prototype,"decreaseIndentShortcut",1),ui=Pi([dr({defaultOptions:{indents:["0","20px","40px","60px","80px","100px","120px","140px","160px","180px","200px"],excludeNodes:[]},staticKeys:["indents"]})],ui);var eBe=Object.defineProperty,tBe=Object.getOwnPropertyDescriptor,qV=(e,t,n,r)=>{for(var o=r>1?void 0:r?tBe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&eBe(t,n,o),o},{LABEL:nBe}=cAe,rBe={icon:({attrs:e})=>`h${e?.level??"1"}`,label:({t:e,attrs:t})=>e({...nBe,values:{level:t?.level}})},oBe=[on.H1,on.H2,on.H3,on.H4,on.H5,on.H6],Dw=class extends aa{get name(){return"heading"}createTags(){return[jn.Block,jn.TextBlock,jn.FormattingNode]}createNodeSpec(e,t){return{content:"inline*",defining:!0,draggable:!1,...t,attrs:{...e.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...e.parse(r),level:n})})),...t.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,e.dom(n),0]:[`h${this.options.defaultLevel}`,e.dom(n),0]}}toggleHeading(e={}){return iA({type:this.type,toggleType:"paragraph",attrs:e})}createKeymap(e){const t=this.store.getExtension(fr),n=In(),r=[];for(const o of this.options.levels){const i=oBe[o-1]??on.H1;n[i]=kv(this.type,{level:o}),r.push({attrs:{level:o},shortcut:e(i)[0]})}return t.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(e=>BAe(new RegExp(`^(#{1,${e}})\\s$`),this.type,()=>({level:e})))}createPasteRules(){return this.options.levels.map(e=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${e}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:e}),startOfTextBlock:!0}))}};qV([Cn(rBe)],Dw.prototype,"toggleHeading",1),Dw=qV([dr({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],Dw);var iBe=Object.defineProperty,aBe=Object.getOwnPropertyDescriptor,sBe=(e,t,n,r)=>{for(var o=r>1?void 0:r?aBe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&iBe(t,n,o),o},lBe=[[/--$/,"\u2014"],[/\.{3}$/,"\u2026"],[/<-$/,"\u2190"],[/->$/,"\u2192"],[/←>$/,"\u2194"],[/\(c\)$/,"\xA9"],[/\(tm\)$/,"\u2122"],[/\(r\)$/,"\xAE"],[/1\/2$/,"\xBD"],[/\+\/-$/,"\xB1"],[/!=$/,"\u2260"],[/<<$/,"\xAB"],[/>>$/,"\xBB"],[/\^2$/,"\xB2"],[/\^3$/,"\xB3"],[/1\/4$/,"\xBC"],[/3\/4$/,"\xBE"]],JA=class extends Xr{get name(){return"shortcuts"}createInputRules(){return lBe.map(([e,t])=>IPe({regexp:e,transformMatch:()=>t}))}};JA=sBe([dr({defaultOptions:{}})],JA);var cBe=dBe,uBe=Object.prototype.hasOwnProperty;function dBe(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)uBe.call(n,r)&&(e[r]=n[r])}return e}var KV=GV,QA=GV.prototype;QA.space=null,QA.normal={},QA.property={};function GV(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}var XV=cBe,fBe=KV,hBe=pBe;function pBe(e){for(var t=e.length,n=[],r=[],o=-1,i,a;++o<t;)i=e[o],n.push(i.property),r.push(i.normal),a=i.space;return new fBe(XV.apply(null,n),XV.apply(null,r),a)}var eO=mBe;function mBe(e){return e.toLowerCase()}var ZV=JV,as=JV.prototype;as.space=null,as.attribute=null,as.property=null,as.boolean=!1,as.booleanish=!1,as.overloadedBoolean=!1,as.number=!1,as.commaSeparated=!1,as.spaceSeparated=!1,as.commaOrSpaceSeparated=!1,as.mustUseProperty=!1,as.defined=!1;function JV(e,t){this.property=e,this.attribute=t}var kl={},gBe=0;kl.boolean=Kd(),kl.booleanish=Kd(),kl.overloadedBoolean=Kd(),kl.number=Kd(),kl.spaceSeparated=Kd(),kl.commaSeparated=Kd(),kl.commaOrSpaceSeparated=Kd();function Kd(){return Math.pow(2,++gBe)}var QV=ZV,eH=kl,tH=tO;tO.prototype=new QV,tO.prototype.defined=!0;var nH=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],vBe=nH.length;function tO(e,t,n,r){var o=-1,i;for(rH(this,"space",r),QV.call(this,e,t);++o<vBe;)i=nH[o],rH(this,i,(n&eH[i])===eH[i])}function rH(e,t,n){n&&(e[t]=n)}var oH=eO,bBe=KV,yBe=tH,rb=xBe;function xBe(e){var t=e.space,n=e.mustUseProperty||[],r=e.attributes||{},o=e.properties,i=e.transform,a={},s={},c,f;for(c in o)f=new yBe(c,i(r,c),o[c],t),n.indexOf(c)!==-1&&(f.mustUseProperty=!0),a[c]=f,s[oH(c)]=c,s[oH(f.attribute)]=c;return new bBe(a,s,t)}var wBe=rb,CBe=wBe({space:"xlink",transform:SBe,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function SBe(e,t){return"xlink:"+t.slice(5).toLowerCase()}var kBe=rb,EBe=kBe({space:"xml",transform:TBe,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function TBe(e,t){return"xml:"+t.slice(3).toLowerCase()}var DBe=ABe;function ABe(e,t){return t in e?e[t]:t}var OBe=DBe,iH=MBe;function MBe(e,t){return OBe(e,t.toLowerCase())}var PBe=rb,NBe=iH,_Be=PBe({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:NBe,properties:{xmlns:null,xmlnsXLink:null}}),nO=kl,RBe=rb,la=nO.booleanish,ss=nO.number,Gd=nO.spaceSeparated,IBe=RBe({transform:LBe,properties:{ariaActiveDescendant:null,ariaAtomic:la,ariaAutoComplete:null,ariaBusy:la,ariaChecked:la,ariaColCount:ss,ariaColIndex:ss,ariaColSpan:ss,ariaControls:Gd,ariaCurrent:null,ariaDescribedBy:Gd,ariaDetails:null,ariaDisabled:la,ariaDropEffect:Gd,ariaErrorMessage:null,ariaExpanded:la,ariaFlowTo:Gd,ariaGrabbed:la,ariaHasPopup:null,ariaHidden:la,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gd,ariaLevel:ss,ariaLive:null,ariaModal:la,ariaMultiLine:la,ariaMultiSelectable:la,ariaOrientation:null,ariaOwns:Gd,ariaPlaceholder:null,ariaPosInSet:ss,ariaPressed:la,ariaReadOnly:la,ariaRelevant:null,ariaRequired:la,ariaRoleDescription:Gd,ariaRowCount:ss,ariaRowIndex:ss,ariaRowSpan:ss,ariaSelected:la,ariaSetSize:ss,ariaSort:null,ariaValueMax:ss,ariaValueMin:ss,ariaValueNow:ss,ariaValueText:null,role:null}});function LBe(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}var Tp=kl,$Be=rb,FBe=iH,ar=Tp.boolean,BBe=Tp.overloadedBoolean,ob=Tp.booleanish,uo=Tp.number,Yi=Tp.spaceSeparated,Aw=Tp.commaSeparated,zBe=$Be({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:FBe,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Aw,acceptCharset:Yi,accessKey:Yi,action:null,allow:null,allowFullScreen:ar,allowPaymentRequest:ar,allowUserMedia:ar,alt:null,as:null,async:ar,autoCapitalize:null,autoComplete:Yi,autoFocus:ar,autoPlay:ar,capture:ar,charSet:null,checked:ar,cite:null,className:Yi,cols:uo,colSpan:null,content:null,contentEditable:ob,controls:ar,controlsList:Yi,coords:uo|Aw,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ar,defer:ar,dir:null,dirName:null,disabled:ar,download:BBe,draggable:ob,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ar,formTarget:null,headers:Yi,height:uo,hidden:ar,high:uo,href:null,hrefLang:null,htmlFor:Yi,httpEquiv:Yi,id:null,imageSizes:null,imageSrcSet:Aw,inputMode:null,integrity:null,is:null,isMap:ar,itemId:null,itemProp:Yi,itemRef:Yi,itemScope:ar,itemType:Yi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ar,low:uo,manifest:null,max:null,maxLength:uo,media:null,method:null,min:null,minLength:uo,multiple:ar,muted:ar,name:null,nonce:null,noModule:ar,noValidate:ar,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ar,optimum:uo,pattern:null,ping:Yi,placeholder:null,playsInline:ar,poster:null,preload:null,readOnly:ar,referrerPolicy:null,rel:Yi,required:ar,reversed:ar,rows:uo,rowSpan:uo,sandbox:Yi,scope:null,scoped:ar,seamless:ar,selected:ar,shape:null,size:uo,sizes:null,slot:null,span:uo,spellCheck:ob,src:null,srcDoc:null,srcLang:null,srcSet:Aw,start:uo,step:null,style:null,tabIndex:uo,target:null,title:null,translate:null,type:null,typeMustMatch:ar,useMap:null,value:ob,width:uo,wrap:null,align:null,aLink:null,archive:Yi,axis:null,background:null,bgColor:null,border:uo,borderColor:null,bottomMargin:uo,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ar,declare:ar,event:null,face:null,frame:null,frameBorder:null,hSpace:uo,leftMargin:uo,link:null,longDesc:null,lowSrc:null,marginHeight:uo,marginWidth:uo,noResize:ar,noHref:ar,noShade:ar,noWrap:ar,object:null,profile:null,prompt:null,rev:null,rightMargin:uo,rules:null,scheme:null,scrolling:ob,standby:null,summary:null,text:null,topMargin:uo,valueType:null,version:null,vAlign:null,vLink:null,vSpace:uo,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ar,disableRemotePlayback:ar,prefix:null,property:null,results:uo,security:null,unselectable:null}}),VBe=hBe,HBe=CBe,jBe=EBe,WBe=_Be,YBe=IBe,UBe=zBe,qBe=VBe([jBe,HBe,WBe,YBe,UBe]),KBe=eO,GBe=tH,XBe=ZV,rO="data",ZBe=eze,JBe=/^data[-\w.:]+$/i,aH=/-[a-z]/g,QBe=/[A-Z]/g;function eze(e,t){var n=KBe(t),r=t,o=XBe;return n in e.normal?e.property[e.normal[n]]:(n.length>4&&n.slice(0,4)===rO&&JBe.test(t)&&(t.charAt(4)==="-"?r=tze(t):t=nze(t),o=GBe),new o(r,t))}function tze(e){var t=e.slice(5).replace(aH,oze);return rO+t.charAt(0).toUpperCase()+t.slice(1)}function nze(e){var t=e.slice(4);return aH.test(t)?e:(t=t.replace(QBe,rze),t.charAt(0)!=="-"&&(t="-"+t),rO+t)}function rze(e){return"-"+e.toLowerCase()}function oze(e){return e.charAt(1).toUpperCase()}var ize=aze,sH=/[#.]/g;function aze(e,t){for(var n=e||"",r=t||"div",o={},i=0,a,s,c;i<n.length;)sH.lastIndex=i,c=sH.exec(n),a=n.slice(i,c?c.index:n.length),a&&(s?s==="#"?o.id=a:o.className?o.className.push(a):o.className=[a]:r=a,i+=a.length),c&&(s=c[0],i++);return{type:"element",tagName:r,properties:o,children:[]}}var oO={};oO.parse=cze,oO.stringify=uze;var lH="",sze=" ",lze=/[ \t\n\r\f]+/g;function cze(e){var t=String(e||lH).trim();return t===lH?[]:t.split(lze)}function uze(e){return e.join(sze).trim()}var iO={};iO.parse=dze,iO.stringify=fze;var aO=",",cH=" ",ib="";function dze(e){for(var t=[],n=String(e||ib),r=n.indexOf(aO),o=0,i=!1,a;!i;)r===-1&&(r=n.length,i=!0),a=n.slice(o,r).trim(),(a||!i)&&t.push(a),o=r+1,r=n.indexOf(aO,o);return t}function fze(e,t){var n=t||{},r=n.padLeft===!1?ib:cH,o=n.padRight?cH:ib;return e[e.length-1]===ib&&(e=e.concat(ib)),e.join(o+aO+r).trim()}var hze=ZBe,uH=eO,pze=ize,dH=oO.parse,fH=iO.parse,mze=vze,gze={}.hasOwnProperty;function vze(e,t,n){var r=n?Cze(n):null;return o;function o(a,s){var c=pze(a,t),f=Array.prototype.slice.call(arguments,2),p=c.tagName.toLowerCase(),m;if(c.tagName=r&&gze.call(r,p)?r[p]:p,s&&bze(s,c)&&(f.unshift(s),s=null),s)for(m in s)i(c.properties,m,s[m]);return hH(c.children,f),c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}function i(a,s,c){var f,p,m;c==null||c!==c||(f=hze(e,s),p=f.property,m=c,typeof m=="string"&&(f.spaceSeparated?m=dH(m):f.commaSeparated?m=fH(m):f.commaOrSpaceSeparated&&(m=dH(fH(m).join(" ")))),p==="style"&&typeof c!="string"&&(m=wze(m)),p==="className"&&a.className&&(m=a.className.concat(m)),a[p]=xze(f,p,m))}}function bze(e,t){return typeof e=="string"||"length"in e||yze(t.tagName,e)}function yze(e,t){var n=t.type;return e==="input"||!n||typeof n!="string"?!1:typeof t.children=="object"&&"length"in t.children?!0:(n=n.toLowerCase(),e==="button"?n!=="menu"&&n!=="submit"&&n!=="reset"&&n!=="button":"value"in t)}function hH(e,t){var n,r;if(typeof t=="string"||typeof t=="number"){e.push({type:"text",value:String(t)});return}if(typeof t=="object"&&"length"in t){for(n=-1,r=t.length;++n<r;)hH(e,t[n]);return}if(typeof t!="object"||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}function xze(e,t,n){var r,o,i;if(typeof n!="object"||!("length"in n))return pH(e,t,n);for(o=n.length,r=-1,i=[];++r<o;)i[r]=pH(e,t,n[r]);return i}function pH(e,t,n){var r=n;return e.number||e.positiveNumber?!isNaN(r)&&r!==""&&(r=Number(r)):(e.boolean||e.overloadedBoolean)&&typeof r=="string"&&(r===""||uH(n)===uH(t))&&(r=!0),r}function wze(e){var t=[],n;for(n in e)t.push([n,e[n]].join(": "));return t.join("; ")}function Cze(e){for(var t=e.length,n=-1,r={},o;++n<t;)o=e[n],r[o.toLowerCase()]=o;return r}var Sze=qBe,kze=mze,mH=kze(Sze,"div");mH.displayName="html";var Eze=mH,Tze=Eze,Dze="\xC6",Aze="&",Oze="\xC1",Mze="\xC2",Pze="\xC0",Nze="\xC5",_ze="\xC3",Rze="\xC4",Ize="\xA9",Lze="\xC7",$ze="\xD0",Fze="\xC9",Bze="\xCA",zze="\xC8",Vze="\xCB",Hze=">",jze="\xCD",Wze="\xCE",Yze="\xCC",Uze="\xCF",qze="<",Kze="\xD1",Gze="\xD3",Xze="\xD4",Zze="\xD2",Jze="\xD8",Qze="\xD5",e8e="\xD6",t8e='"',n8e="\xAE",r8e="\xDE",o8e="\xDA",i8e="\xDB",a8e="\xD9",s8e="\xDC",l8e="\xDD",c8e="\xE1",u8e="\xE2",d8e="\xB4",f8e="\xE6",h8e="\xE0",p8e="&",m8e="\xE5",g8e="\xE3",v8e="\xE4",b8e="\xA6",y8e="\xE7",x8e="\xB8",w8e="\xA2",C8e="\xA9",S8e="\xA4",k8e="\xB0",E8e="\xF7",T8e="\xE9",D8e="\xEA",A8e="\xE8",O8e="\xF0",M8e="\xEB",P8e="\xBD",N8e="\xBC",_8e="\xBE",R8e=">",I8e="\xED",L8e="\xEE",$8e="\xA1",F8e="\xEC",B8e="\xBF",z8e="\xEF",V8e="\xAB",H8e="<",j8e="\xAF",W8e="\xB5",Y8e="\xB7",U8e="\xA0",q8e="\xAC",K8e="\xF1",G8e="\xF3",X8e="\xF4",Z8e="\xF2",J8e="\xAA",Q8e="\xBA",e9e="\xF8",t9e="\xF5",n9e="\xF6",r9e="\xB6",o9e="\xB1",i9e="\xA3",a9e='"',s9e="\xBB",l9e="\xAE",c9e="\xA7",u9e="\xAD",d9e="\xB9",f9e="\xB2",h9e="\xB3",p9e="\xDF",m9e="\xFE",g9e="\xD7",v9e="\xFA",b9e="\xFB",y9e="\xF9",x9e="\xA8",w9e="\xFC",C9e="\xFD",S9e="\xA5",k9e="\xFF",E9e={AElig:Dze,AMP:Aze,Aacute:Oze,Acirc:Mze,Agrave:Pze,Aring:Nze,Atilde:_ze,Auml:Rze,COPY:Ize,Ccedil:Lze,ETH:$ze,Eacute:Fze,Ecirc:Bze,Egrave:zze,Euml:Vze,GT:Hze,Iacute:jze,Icirc:Wze,Igrave:Yze,Iuml:Uze,LT:qze,Ntilde:Kze,Oacute:Gze,Ocirc:Xze,Ograve:Zze,Oslash:Jze,Otilde:Qze,Ouml:e8e,QUOT:t8e,REG:n8e,THORN:r8e,Uacute:o8e,Ucirc:i8e,Ugrave:a8e,Uuml:s8e,Yacute:l8e,aacute:c8e,acirc:u8e,acute:d8e,aelig:f8e,agrave:h8e,amp:p8e,aring:m8e,atilde:g8e,auml:v8e,brvbar:b8e,ccedil:y8e,cedil:x8e,cent:w8e,copy:C8e,curren:S8e,deg:k8e,divide:E8e,eacute:T8e,ecirc:D8e,egrave:A8e,eth:O8e,euml:M8e,frac12:P8e,frac14:N8e,frac34:_8e,gt:R8e,iacute:I8e,icirc:L8e,iexcl:$8e,igrave:F8e,iquest:B8e,iuml:z8e,laquo:V8e,lt:H8e,macr:j8e,micro:W8e,middot:Y8e,nbsp:U8e,not:q8e,ntilde:K8e,oacute:G8e,ocirc:X8e,ograve:Z8e,ordf:J8e,ordm:Q8e,oslash:e9e,otilde:t9e,ouml:n9e,para:r9e,plusmn:o9e,pound:i9e,quot:a9e,raquo:s9e,reg:l9e,sect:c9e,shy:u9e,sup1:d9e,sup2:f9e,sup3:h9e,szlig:p9e,thorn:m9e,times:g9e,uacute:v9e,ucirc:b9e,ugrave:y9e,uml:x9e,uuml:w9e,yacute:C9e,yen:S9e,yuml:k9e},T9e={0:"\uFFFD",128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},gH=D9e;function D9e(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}var A9e=O9e;function O9e(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var M9e=P9e;function P9e(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var N9e=M9e,_9e=gH,R9e=I9e;function I9e(e){return N9e(e)||_9e(e)}var Ow,L9e=59,$9e=F9e;function F9e(e){var t="&"+e+";",n;return Ow=Ow||document.createElement("i"),Ow.innerHTML=t,n=Ow.textContent,n.charCodeAt(n.length-1)===L9e&&e!=="semi"||n===t?!1:n}var vH=E9e,bH=T9e,B9e=gH,z9e=A9e,yH=R9e,V9e=$9e,H9e=t7e,j9e={}.hasOwnProperty,Dp=String.fromCharCode,W9e=Function.prototype,xH={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Y9e=9,wH=10,U9e=12,q9e=32,CH=38,K9e=59,G9e=60,X9e=61,Z9e=35,J9e=88,Q9e=120,e7e=65533,Ap="named",sO="hexadecimal",lO="decimal",cO={};cO[sO]=16,cO[lO]=10;var Mw={};Mw[Ap]=yH,Mw[lO]=B9e,Mw[sO]=z9e;var SH=1,kH=2,EH=3,TH=4,DH=5,uO=6,AH=7,ku={};ku[SH]="Named character references must be terminated by a semicolon",ku[kH]="Numeric character references must be terminated by a semicolon",ku[EH]="Named character references cannot be empty",ku[TH]="Numeric character references cannot be empty",ku[DH]="Named character references must be known",ku[uO]="Numeric character references cannot be disallowed",ku[AH]="Numeric character references cannot be outside the permissible Unicode range";function t7e(e,t){var n={},r,o;t||(t={});for(o in xH)r=t[o],n[o]=r??xH[o];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),n7e(e,n)}function n7e(e,t){var n=t.additional,r=t.nonTerminated,o=t.text,i=t.reference,a=t.warning,s=t.textContext,c=t.referenceContext,f=t.warningContext,p=t.position,m=t.indent||[],v=e.length,y=0,w=-1,C=p.column||1,k=p.line||1,T="",E=[],_,R,P,$,z,q,Y,J,K,ee,re,ne,oe,fe,se,ue,le,ce,Se;for(typeof n=="string"&&(n=n.charCodeAt(0)),ue=Me(),J=a?ze:W9e,y--,v++;++y<v;)if(z===wH&&(C=m[w]||1),z=e.charCodeAt(y),z===CH){if(Y=e.charCodeAt(y+1),Y===Y9e||Y===wH||Y===U9e||Y===q9e||Y===CH||Y===G9e||Y!==Y||n&&Y===n){T+=Dp(z),C++;continue}for(oe=y+1,ne=oe,Se=oe,Y===Z9e?(Se=++ne,Y=e.charCodeAt(Se),Y===J9e||Y===Q9e?(fe=sO,Se=++ne):fe=lO):fe=Ap,_="",re="",$="",se=Mw[fe],Se--;++Se<v&&(Y=e.charCodeAt(Se),!!se(Y));)$+=Dp(Y),fe===Ap&&j9e.call(vH,$)&&(_=$,re=vH[$]);P=e.charCodeAt(Se)===K9e,P&&(Se++,R=fe===Ap?V9e($):!1,R&&(_=$,re=R)),ce=1+Se-oe,!P&&!r||($?fe===Ap?(P&&!re?J(DH,1):(_!==$&&(Se=ne+_.length,ce=1+Se-ne,P=!1),P||(K=_?SH:EH,t.attribute?(Y=e.charCodeAt(Se),Y===X9e?(J(K,ce),re=null):yH(Y)?re=null:J(K,ce)):J(K,ce))),q=re):(P||J(kH,ce),q=parseInt($,cO[fe]),r7e(q)?(J(AH,ce),q=Dp(e7e)):q in bH?(J(uO,ce),q=bH[q]):(ee="",o7e(q)&&J(uO,ce),q>65535&&(q-=65536,ee+=Dp(q>>>10|55296),q=56320|q&1023),q=ee+Dp(q))):fe!==Ap&&J(TH,ce)),q?(ke(),ue=Me(),y=Se-1,C+=Se-oe+1,E.push(q),le=Me(),le.offset++,i&&i.call(c,q,{start:ue,end:le},e.slice(oe-1,Se)),ue=le):($=e.slice(oe-1,Se),T+=$,C+=$.length,y=Se-1)}else z===10&&(k++,w++,C=0),z===z?(T+=Dp(z),C++):ke();return E.join("");function Me(){return{line:k,column:C,offset:y+(p.offset||0)}}function ze(pe,Oe){var Ae=Me();Ae.column+=Oe,Ae.offset+=Oe,a.call(f,ku[pe],Ae,pe)}function ke(){T&&(E.push(T),o&&o.call(s,T,{start:ue,end:Me()}),T="")}}function r7e(e){return e>=55296&&e<=57343||e>1114111}function o7e(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var OH={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
1336
1336
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
1337
1337
|
*
|
|
1338
1338
|
* @license MIT <https://opensource.org/licenses/MIT>
|
|
1339
1339
|
* @author Lea Verou <https://lea.verou.me>
|
|
1340
1340
|
* @namespace
|
|
1341
1341
|
* @public
|
|
1342
|
-
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function E(_){return _ instanceof c?new c(_.type,E(_.content),_.alias):Array.isArray(_)?_.map(E):_.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(E){return Object.prototype.toString.call(E).slice(8,-1)},objId:function(E){return E.__id||Object.defineProperty(E,"__id",{value:++i}),E.__id},clone:function E(_,R){R=R||{};var P,$;switch(s.util.type(_)){case"Object":if($=s.util.objId(_),R[$])return R[$];P={},R[$]=P;for(var z in _)_.hasOwnProperty(z)&&(P[z]=E(_[z],R));return P;case"Array":return $=s.util.objId(_),R[$]?R[$]:(P=[],R[$]=P,_.forEach(function(q,Y){P[Y]=E(q,R)}),P);default:return _}},getLanguage:function(E){for(;E;){var _=o.exec(E.className);if(_)return _[1].toLowerCase();E=E.parentElement}return"none"},setLanguage:function(E,_){E.className=E.className.replace(RegExp(o,"gi"),""),E.classList.add("language-"+_)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(P){var E=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(P.stack)||[])[1];if(E){var _=document.getElementsByTagName("script");for(var R in _)if(_[R].src==E)return _[R]}return null}},isActive:function(E,_,R){for(var P="no-"+_;E;){var $=E.classList;if($.contains(_))return!0;if($.contains(P))return!1;E=E.parentElement}return!!R}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(E,_){var R=s.util.clone(s.languages[E]);for(var P in _)R[P]=_[P];return R},insertBefore:function(E,_,R,P){P=P||s.languages;var $=P[E],z={};for(var q in $)if($.hasOwnProperty(q)){if(q==_)for(var Y in R)R.hasOwnProperty(Y)&&(z[Y]=R[Y]);R.hasOwnProperty(q)||(z[q]=$[q])}var J=P[E];return P[E]=z,s.languages.DFS(s.languages,function(K,ee){ee===J&&K!=E&&(this[K]=z)}),z},DFS:function E(_,R,P,$){$=$||{};var z=s.util.objId;for(var q in _)if(_.hasOwnProperty(q)){R.call(_,q,_[q],P||q);var Y=_[q],J=s.util.type(Y);J==="Object"&&!$[z(Y)]?($[z(Y)]=!0,E(Y,R,null,$)):J==="Array"&&!$[z(Y)]&&($[z(Y)]=!0,E(Y,R,q,$))}}},plugins:{},highlightAll:function(E,_){s.highlightAllUnder(document,E,_)},highlightAllUnder:function(E,_,R){var P={callback:R,container:E,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",P),P.elements=Array.prototype.slice.apply(P.container.querySelectorAll(P.selector)),s.hooks.run("before-all-elements-highlight",P);for(var $=0,z;z=P.elements[$++];)s.highlightElement(z,_===!0,P.callback)},highlightElement:function(E,_,R){var P=s.util.getLanguage(E),$=s.languages[P];s.util.setLanguage(E,P);var z=E.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(z,P);var q=E.textContent,Y={element:E,language:P,grammar:$,code:q};function J(ee){Y.highlightedCode=ee,s.hooks.run("before-insert",Y),Y.element.innerHTML=Y.highlightedCode,s.hooks.run("after-highlight",Y),s.hooks.run("complete",Y),R&&R.call(Y.element)}if(s.hooks.run("before-sanity-check",Y),z=Y.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!Y.code){s.hooks.run("complete",Y),R&&R.call(Y.element);return}if(s.hooks.run("before-highlight",Y),!Y.grammar){J(s.util.encode(Y.code));return}if(_&&r.Worker){var K=new Worker(s.filename);K.onmessage=function(ee){J(ee.data)},K.postMessage(JSON.stringify({language:Y.language,code:Y.code,immediateClose:!0}))}else J(s.highlight(Y.code,Y.grammar,Y.language))},highlight:function(E,_,R){var P={code:E,grammar:_,language:R};if(s.hooks.run("before-tokenize",P),!P.grammar)throw new Error('The language "'+P.language+'" has no grammar.');return P.tokens=s.tokenize(P.code,P.grammar),s.hooks.run("after-tokenize",P),c.stringify(s.util.encode(P.tokens),P.language)},tokenize:function(E,_){var R=_.rest;if(R){for(var P in R)_[P]=R[P];delete _.rest}var $=new m;return v($,$.head,E),p(E,$,_,$.head,0),w($)},hooks:{all:{},add:function(E,_){var R=s.hooks.all;R[E]=R[E]||[],R[E].push(_)},run:function(E,_){var R=s.hooks.all[E];if(!(!R||!R.length))for(var P=0,$;$=R[P++];)$(_)}},Token:c};r.Prism=s;function c(E,_,R,P){this.type=E,this.content=_,this.alias=R,this.length=(P||"").length|0}c.stringify=function E(_,R){if(typeof _=="string")return _;if(Array.isArray(_)){var P="";return _.forEach(function(J){P+=E(J,R)}),P}var $={type:_.type,content:E(_.content,R),tag:"span",classes:["token",_.type],attributes:{},language:R},z=_.alias;z&&(Array.isArray(z)?Array.prototype.push.apply($.classes,z):$.classes.push(z)),s.hooks.run("wrap",$);var q="";for(var Y in $.attributes)q+=" "+Y+'="'+($.attributes[Y]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+q+">"+$.content+"</"+$.tag+">"};function f(E,_,R,P){E.lastIndex=_;var $=E.exec(R);if($&&P&&$[1]){var z=$[1].length;$.index+=z,$[0]=$[0].slice(z)}return $}function p(E,_,R,P,$,z){for(var q in R)if(!(!R.hasOwnProperty(q)||!R[q])){var Y=R[q];Y=Array.isArray(Y)?Y:[Y];for(var J=0;J<Y.length;++J){if(z&&z.cause==q+","+J)return;var K=Y[J],ee=K.inside,re=!!K.lookbehind,ne=!!K.greedy,oe=K.alias;if(ne&&!K.pattern.global){var fe=K.pattern.toString().match(/[imsuy]*$/)[0];K.pattern=RegExp(K.pattern.source,fe+"g")}for(var se=K.pattern||K,ue=P.next,le=$;ue!==_.tail&&!(z&&le>=z.reach);le+=ue.value.length,ue=ue.next){var ce=ue.value;if(_.length>E.length)return;if(!(ce instanceof c)){var Se=1,Me;if(ne){if(Me=f(se,le,E,re),!Me||Me.index>=E.length)break;var Oe=Me.index,ze=Me.index+Me[0].length,ke=le;for(ke+=ue.value.length;Oe>=ke;)ue=ue.next,ke+=ue.value.length;if(ke-=ue.value.length,le=ke,ue.value instanceof c)continue;for(var pe=ue;pe!==_.tail&&(ke<ze||typeof pe.value=="string");pe=pe.next)Se++,ke+=pe.value.length;Se--,ce=E.slice(le,ke),Me.index-=le}else if(Me=f(se,0,ce,re),!Me)continue;var Oe=Me.index,Ae=Me[0],Pe=ce.slice(0,Oe),Ve=ce.slice(Oe+Ae.length),Le=le+ce.length;z&&Le>z.reach&&(z.reach=Le);var Ne=ue.prev;Pe&&(Ne=v(_,Ne,Pe),le+=Pe.length),y(_,Ne,Se);var Te=new c(q,ee?s.tokenize(Ae,ee):Ae,oe,Ae);if(ue=v(_,Ne,Te),Ve&&v(_,ue,Ve),Se>1){var He={cause:q+","+J,reach:Le};p(E,_,R,ue.prev,le,He),z&&He.reach>z.reach&&(z.reach=He.reach)}}}}}}function m(){var E={value:null,prev:null,next:null},_={value:null,prev:E,next:null};E.next=_,this.head=E,this.tail=_,this.length=0}function v(E,_,R){var P=_.next,$={value:R,prev:_,next:P};return _.next=$,P.prev=$,E.length++,$}function y(E,_,R){for(var P=_.next,$=0;$<R&&P!==E.tail;$++)P=P.next;_.next=P,P.prev=_,E.length-=$}function w(E){for(var _=[],R=E.head.next;R!==E.tail;)_.push(R.value),R=R.next;return _}if(!r.document)return r.addEventListener&&(s.disableWorkerMessageHandler||r.addEventListener("message",function(E){var _=JSON.parse(E.data),R=_.language,P=_.code,$=_.immediateClose;r.postMessage(s.highlight(P,s.languages[R],R)),$&&r.close()},!1)),s;var C=s.util.currentScript();C&&(s.filename=C.src,C.hasAttribute("data-manual")&&(s.manual=!0));function k(){s.manual||s.highlightAll()}if(!s.manual){var T=document.readyState;T==="loading"||T==="interactive"&&C&&C.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return s}(t);e.exports&&(e.exports=n),typeof bo<"u"&&(bo.Prism=n)})(OH);var r7e=OH.exports,o7e=dO;dO.displayName="markup",dO.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function dO(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var MH=fO;fO.displayName="css",fO.aliases=[];function fO(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}var i7e=ro(MH),a7e=hO;hO.displayName="clike",hO.aliases=[];function hO(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var PH=pO;pO.displayName="javascript",pO.aliases=["js"];function pO(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var s7e=ro(PH),ab=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof bo=="object"?bo:{},l7e=k7e();ab.Prism={manual:!0,disableWorkerMessageHandler:!0};var c7e=kze,u7e=z9e,NH=r7e,d7e=o7e,f7e=MH,h7e=a7e,p7e=PH;l7e();var mO={}.hasOwnProperty;function _H(){}_H.prototype=NH;var Ko=new _H,m7e=Ko;Ko.highlight=v7e,Ko.register=sb,Ko.alias=g7e,Ko.registered=b7e,Ko.listLanguages=y7e,sb(d7e),sb(f7e),sb(h7e),sb(p7e),Ko.util.encode=C7e,Ko.Token.stringify=x7e;function sb(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");Ko.languages[e.displayName]===void 0&&e(Ko)}function g7e(e,t){var n=Ko.languages,r=e,o,i,a,s;t&&(r={},r[e]=t);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,a=i.length,s=-1;++s<a;)n[i[s]]=n[o]}function v7e(e,t){var n=NH.highlight,r;if(typeof e!="string")throw new Error("Expected `string` for `value`, got `"+e+"`");if(Ko.util.type(t)==="Object")r=t,t=null;else{if(typeof t!="string")throw new Error("Expected `string` for `name`, got `"+t+"`");if(mO.call(Ko.languages,t))r=Ko.languages[t];else throw new Error("Unknown language: `"+t+"` is not registered")}return n.call(this,e,r,t)}function b7e(e){if(typeof e!="string")throw new Error("Expected `string` for `language`, got `"+e+"`");return mO.call(Ko.languages,e)}function y7e(){var e=Ko.languages,t=[],n;for(n in e)mO.call(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function x7e(e,t,n){var r;return typeof e=="string"?{type:"text",value:e}:Ko.util.type(e)==="Array"?w7e(e,t):(r={type:e.type,content:Ko.Token.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n},e.alias&&(r.classes=r.classes.concat(e.alias)),Ko.hooks.run("wrap",r),c7e(r.tag+"."+r.classes.join("."),S7e(r.attributes),r.content))}function w7e(e,t){for(var n=[],r=e.length,o=-1,i;++o<r;)i=e[o],i!==""&&i!==null&&i!==void 0&&n.push(i);for(o=-1,r=n.length;++o<r;)i=n[o],n[o]=Ko.Token.stringify(i,t,n);return n}function C7e(e){return e}function S7e(e){var t;for(t in e)e[t]=u7e(e[t]);return e}function k7e(){var e="Prism"in ab,t=e?ab.Prism:void 0;return n;function n(){e?ab.Prism=t:delete ab.Prism,e=void 0,t=void 0}}var gO=ro(m7e),E7e=Object.defineProperty,T7e=Object.getOwnPropertyDescriptor,bc=(e,t,n,r)=>{for(var o=r>1?void 0:r?T7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&E7e(t,n,o),o},RH=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Eu=(e,t,n)=>(RH(e,t,"read from private field"),n?n.call(e):t.get(e)),vO=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},bO=(e,t,n,r)=>(RH(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),IH="data-code-block-language";function LH(e,t,n=[]){return e.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&t&&o.push(t),r.type==="element"?LH(r.children,t,o):{text:r.value,classes:o}})}function D7e(e,t){var n;const{node:r,pos:o}=e,i=Pw({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),a=gO.highlight(r.textContent??"",i),s=LH(a,t);let c=o+1;function f(p){const m=c,v=m+p.text.length;return c=v,{...p,from:m,to:v}}return nz(s).map(f)}function $H(e){const{blocks:t,skipLast:n,plainTextClassName:r}=e,o=[];for(const i of t){const a=D7e(i,r),s=n?a.length-1:a.length;for(const c of nD(s)){const f=a[c],p=f?.classes;if(!f||!p?.length)continue;const m=fo.inline(f.from,f.to,{class:p.join(" ")});o.push(m)}}return o}function A7e(e){return!!(e&&ii(e)&&Bn(e.language)&&e.language.length>0)}function O7e(e){return t=>({state:{tr:n,selection:r},dispatch:o})=>{if(!A7e(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=du({types:e,selection:r});return!i||MTe(t,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(n),!0)}}function Pw(e){const{language:t,fallback:n}=e;if(!t)return n;const r=gO.listLanguages();for(const o of r)if(o.toLowerCase()===t.toLowerCase())return o;return n}function M7e(e,t){const{language:n,wrap:r}=rA(e.attrs,t),{style:o,...i}=t.dom(e);let a=i.style;return r&&(a=Q9({whiteSpace:"pre-wrap",wordBreak:"break-all"},a)),["pre",{spellcheck:"false",...i,class:K1(i.class,`language-${n}`)},["code",{[IH]:n,style:a},0]]}function P7e(e){return({pos:t}=In())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:a}=e,{from:s,to:c}=t?{from:t,to:t}:n.selection,f=du({types:o,selection:n.selection});if(!f)return!1;const{node:{attrs:p,textContent:m},start:v}=f,y=s-v,w=c-v,C=Pw({language:p.language,fallback:a}),k=i({source:m,language:C,cursorOffset:y});let T;if(y!==w&&(T=i({source:m,language:C,cursorOffset:w})),!k)return!1;const{cursorOffset:E,formatted:_}=k;if(_===m)return!1;const R=v+m.length;n.insertText(_,v,R);const P=v+E,$=T?v+T.cursorOffset:void 0;return n.setSelection(Vn.between(n.doc.resolve(P),n.doc.resolve($??P))),r&&r(n),!0}}function N7e(e){var t;return(t=e.getAttribute(IH)??e.classList[0])==null?void 0:t.replace("language-","")}var{DESCRIPTION:_7e,LABEL:R7e}=iAe,I7e={icon:"bracesLine",description:({t:e})=>e(_7e),label:({t:e})=>e(R7e)},Xd,lb,cb,L7e=class{constructor(e,t){vO(this,Xd,void 0),vO(this,lb,void 0),vO(this,cb,!1),bO(this,lb,e),bO(this,Xd,t)}init(e){const t=PPe({node:e.doc,type:Eu(this,lb)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const n=$H({blocks:t,skipLast:Eu(this,cb),defaultLanguage:Eu(this,Xd).options.defaultLanguage,plainTextClassName:Eu(this,Xd).options.plainTextClassName??void 0});this.decorationSet=wr.create(e,n)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const n=NPe(e,{descend:!0,predicate:r=>r.type===Eu(this,lb),StepTypes:[]});return this.updateDecorationSet(e,n),this}updateDecorationSet(e,t){if(t.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of t)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(e.doc,$H({blocks:t,skipLast:Eu(this,cb),defaultLanguage:Eu(this,Xd).options.defaultLanguage,plainTextClassName:Eu(this,Xd).options.plainTextClassName??void 0}))}setDeleted(e){bO(this,cb,e)}};Xd=new WeakMap,lb=new WeakMap,cb=new WeakMap;var Rs=class extends aa{get name(){return"codeBlock"}createTags(){return[jn.Block,jn.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...t,code:!0,attrs:{...e.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:r=>{var o,i;if(!ji(r))return!1;const a=r.querySelector("pre.code");if(!ji(a))return!1;const s=ts(a,"white-space")==="pre-wrap",c=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...e.parse(r),language:c,wrap:s}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!ji(r))return!1;const o=r.querySelector("code");if(!ji(o))return!1;const i=ts(o,"white-space")==="pre-wrap",a=this.options.getLanguageFromDom(o,r);return{...e.parse(r),language:a,wrap:i}}},...t.parseDOM??[]],toDOM:r=>M7e(r,e)}}createAttributes(){return{class:Q5e[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const e=/^```([\dA-Za-z]*) $/,t=n=>({language:Pw({language:cc(n,1),fallback:this.options.defaultLanguage})});return[a7({regexp:e,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Vn.near(o))},getAttributes:t})]}onSetOptions(e){const{changes:t}=e;t.supportedLanguages.changed&&this.registerLanguages(),t.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const e=new L7e(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init(n,r){return e.init(r)},apply(n,r,o,i){return e.apply(n,i)}},props:{handleKeyDown:fA({Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t}),decorations(){return e.setDeleted(!1),e.decorationSet}}}}toggleCodeBlock(e={}){return iA({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return kv(this.type,e)}updateCodeBlock(e){return O7e(this.type)(e)}formatCodeBlock(e){return P7e({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:n,tr:r,schema:o}=e,{node:i}=XMe(n);if(!F1({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:a,to:s}=n;r.replaceWith(a,s,o.text(" "))}return t&&t(r),!0}backspaceKey({dispatch:e,tr:t,state:n}){if(!t.selection.empty)return!1;const r=du({types:this.type,selection:t.selection});if(r?.start!==t.selection.from)return!1;const{pos:o,node:i,start:a}=r,s=mo(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?t.doc.lastChild===i&&t.doc.firstChild===i?KMe({pos:o,tr:t,content:s.create()}):qMe({pos:o,tr:t}):a>2?t.setSelection(Vn.near(t.doc.resolve(a-2))):(t.insert(0,s.create()),t.setSelection(Vn.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(fu(t.selection)&&t.selection.empty))return!1;const{nodeBefore:n,parent:r}=t.selection.$anchor;if(!n?.isText||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:a}=n,{textContent:s}=r;if(!i)return!1;const c=i.match(o),f=s.match(o);if(!c||!f)return!1;const[,p]=c,m=Pw({language:p,fallback:this.options.defaultLanguage}),v=t.selection.$from.before(),y=v+a+1;return t.replaceWith(v,y,this.type.create({language:m})),t.setSelection(Vn.near(t.doc.resolve(v+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;if(!z9({type:this.type,state:e}))return!1;const n=t.formatCodeBlock.isEnabled();return n&&t.formatCodeBlock(),n}registerLanguages(){for(const e of this.options.supportedLanguages)gO.register(e)}};bc([Cn(I7e)],Rs.prototype,"toggleCodeBlock",1),bc([Cn()],Rs.prototype,"createCodeBlock",1),bc([Cn()],Rs.prototype,"updateCodeBlock",1),bc([Cn()],Rs.prototype,"formatCodeBlock",1),bc([co({shortcut:"Tab"})],Rs.prototype,"tabKey",1),bc([co({shortcut:"Backspace"})],Rs.prototype,"backspaceKey",1),bc([co({shortcut:"Enter"})],Rs.prototype,"enterKey",1),bc([co({shortcut:on.Format})],Rs.prototype,"formatShortcut",1),Rs=bc([dr({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:N7e},staticKeys:["getLanguageFromDom"]})],Rs);var $7e=Object.defineProperty,F7e=Object.getOwnPropertyDescriptor,FH=(e,t,n,r)=>{for(var o=r>1?void 0:r?F7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&$7e(t,n,o),o},yO=class extends aa{get name(){return"blockquote"}createTags(){return[jn.Block,jn.FormattingNode]}createNodeSpec(e,t){return{content:"block+",defining:!0,draggable:!1,...t,attrs:e.defaults(),parseDOM:[{tag:"blockquote",getAttrs:e.parse,priority:100},...t.parseDOM??[]],toDOM:n=>["blockquote",e.dom(n),0]}}toggleBlockquote(){return r7(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[A1(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};FH([Cn({icon:"doubleQuotesL",description:({t:e})=>e(n8.DESCRIPTION),label:({t:e})=>e(n8.LABEL)})],yO.prototype,"toggleBlockquote",1),FH([co({shortcut:"Ctrl->",command:"toggleBlockquote"})],yO.prototype,"shortcut",1);var BH=new _d("trailingNode");function B7e(e){const{ignoredNodes:t=[],nodeName:n="paragraph"}=e??{},r=new Set([...t,n]);let o,i;return new rc({key:BH,appendTransaction(a,s,c){const{doc:f,tr:p}=c,m=BH.getState(c),v=f.content.size;if(m)return p.insert(v,o.create())},state:{init:(a,{doc:s,schema:c})=>{const f=c.nodes[n];if(!f)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=f,i=Object.values(c.nodes).map(p=>p).filter(p=>!r.has(p.name)),i.includes(s.lastChild?.type)},apply:(a,s)=>a.docChanged?i.includes(a.doc.lastChild?.type):s}})}var z7e=Object.defineProperty,V7e=Object.getOwnPropertyDescriptor,H7e=(e,t,n,r)=>{for(var o=r>1?void 0:r?V7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&z7e(t,n,o),o},xO=class extends Xr{get name(){return"trailingNode"}onSetOptions(e){const{changes:t}=e;(t.disableTags.changed||t.ignoredNodes.changed||t.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:e}=this.store,{disableTags:t,nodeName:n}=this.options,r=t?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...e.lastNodeCompatible];return[B7e({ignoredNodes:r,nodeName:n})]}};xO=H7e([dr({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],xO);var j7e=Object.defineProperty,W7e=Object.getOwnPropertyDescriptor,zH=(e,t,n,r)=>{for(var o=r>1?void 0:r?W7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&j7e(t,n,o),o},Y7e={icon:"separator",label:({t:e})=>e(o8.LABEL),description:({t:e})=>e(o8.DESCRIPTION)},Nw=class extends aa{get name(){return"horizontalRule"}createTags(){return[jn.Block]}createNodeSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"hr",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["hr",e.dom(n)]}}insertHorizontalRule(){return e=>{const{tr:t,dispatch:n}=e,r=t.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(t.selection.empty&&H1(o)&&t.insert(r.pos+1,o),t.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(t),n(t.scrollIntoView())),!0)}}createInputRules(){return[a7({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:e})=>{this.updateFromNodeSelection(e)}})]}updateFromNodeSelection(e){if(!Sv(e.selection)||e.selection.node.type.name!==this.name)return;const t=e.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];_n(r,{code:tn.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();e.insert(t,o),e.setSelection(Vn.near(e.doc.resolve(t+1)))}};zH([Cn(Y7e)],Nw.prototype,"insertHorizontalRule",1),Nw=zH([dr({defaultOptions:{insertionNode:"paragraph"}})],Nw);var VH=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Dr=(e,t,n)=>(VH(e,t,"read from private field"),n?n.call(e):t.get(e)),Op=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Tu=(e,t,n,r)=>(VH(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),U7e='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="22" height="22" fill="rgba(0, 0, 0, 0.65)" stroke="rgba(255, 255, 255, 0.5)" transform="rotate(90)" xmlns:v="https://vecta.io/nano"><path fill-rule="evenodd" d="M14 0a2 2 0 0 0-2 2v10H2a2 2 0 1 0 0 4h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/></svg>',q7e='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="22" height="22" fill="rgba(0, 0, 0, 0.65)" stroke="rgba(255, 255, 255, 0.5)" transform="matrix(0 1 1 0 0 0)" xmlns:v="https://vecta.io/nano"><path fill-rule="evenodd" d="M14 0a2 2 0 0 0-2 2v10H2a2 2 0 1 0 0 4h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/></svg>',K7e=encodeURIComponent(U7e),G7e=encodeURIComponent(q7e),ca,X7e=class{constructor(e){Op(this,ca,void 0);const t=document.createElement("div"),n=document.createElement("div");this.dom=t,Tu(this,ca,n),this.type=e,this.createHandle(e)}createHandle(e){switch(Mi(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Mi(Dr(this,ca),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),Dr(this,ca).dataset.dragging="",e){case 0:Mi(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Mi(Dr(this,ca),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:Mi(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Mi(Dr(this,ca),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:Mi(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Mi(Dr(this,ca),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:Mi(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Mi(Dr(this,ca),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${G7e}") `});break;case 4:Mi(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Mi(Dr(this,ca),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${K7e}") `});break}this.dom.append(Dr(this,ca))}setHandleVisibility(e){const t=e||!!Dr(this,ca).dataset.dragging;Dr(this,ca).style.opacity=t?"1":"0"}dataSetDragging(e){Dr(this,ca).dataset.dragging=e?"true":""}};ca=new WeakMap;var _w=50,HH=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(HH||{}),Zd,Jd,Qd,yc,ef,Z7e=class{constructor({node:e,view:t,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){Op(this,Zd,void 0),Op(this,Jd,void 0),Op(this,Qd,[]),Op(this,yc,void 0),Op(this,ef,void 0);const a=this.createWrapper(e,i),s=this.createElement({node:e,view:t,getPos:n,options:o}),f=(r===1?[0,1,2,3,4]:[0,1]).map(v=>new X7e(v));for(const v of f){const y=w=>{this.startResizing(w,t,n,v)};v.dom.addEventListener("mousedown",y),Dr(this,Qd).push(()=>v.dom.removeEventListener("mousedown",y)),a.append(v.dom)}const p=()=>{f.forEach(v=>v.setHandleVisibility(!0))},m=()=>{f.forEach(v=>v.setHandleVisibility(!1))};a.addEventListener("mouseover",p),a.addEventListener("mouseout",m),Dr(this,Qd).push(()=>a.removeEventListener("mouseover",p),()=>a.removeEventListener("mouseout",m)),a.append(s),this.dom=a,Tu(this,Jd,e),Tu(this,Zd,s),this.aspectRatio=r}createWrapper(e,t){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",t?Mi(n,{width:jH(t.width),aspectRatio:`${t.width} / ${t.height}`}):Mi(n,{width:jH(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),Mi(n,{maxWidth:"100%",minWidth:`${_w}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(e,t,n,r){var o,i;e.preventDefault(),r.dataSetDragging(!0),Dr(this,Zd).style.pointerEvents="none";const a=e.pageX,s=e.pageY,c=((o=Dr(this,Zd))==null?void 0:o.getBoundingClientRect().width)||0,f=((i=Dr(this,Zd))==null?void 0:i.getBoundingClientRect().height)||0,p=QT(100,!1,v=>{const y=v.pageX,w=v.pageY,C=y-a,k=w-s;let T=null,E=null;if(this.aspectRatio===0&&c&&f)switch(r.type){case 0:case 3:T=c+C,E=f/c*T;break;case 1:case 4:T=c-C,E=f/c*T;break;case 2:E=f+k,T=c/f*E;break}else if(this.aspectRatio===1)switch(r.type){case 0:T=c+C;break;case 1:T=c-C;break;case 2:E=f+k;break;case 3:T=c+C,E=f+k;break;case 4:T=c-C,E=f+k;break}typeof T=="number"&&T<_w&&(this.aspectRatio===0&&c&&f?(T=_w,E=f/c*T):this.aspectRatio===1&&(T=_w)),T&&(Tu(this,yc,Math.round(T)),this.dom.style.width=`${Dr(this,yc)}px`),E&&Tu(this,ef,Math.round(E)),(T||E)&&(this.dom.style.aspectRatio=`${Dr(this,yc)} / ${Dr(this,ef)}`)}),m=v=>{v.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),Dr(this,Zd).style.pointerEvents="auto",document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",m);const y=n(),w=t.state.tr.setNodeMarkup(y,void 0,{...Dr(this,Jd).attrs,width:Dr(this,yc),height:Dr(this,ef)});t.dispatch(w)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",m),Dr(this,Qd).push(()=>document.removeEventListener("mousemove",p)),Dr(this,Qd).push(()=>document.removeEventListener("mouseup",m))}update(e){return e.type!==Dr(this,Jd).type||this.aspectRatio===0&&e.attrs.width&&e.attrs.width!==Dr(this,yc)||this.aspectRatio===1&&e.attrs.width&&e.attrs.height&&e.attrs.width!==Dr(this,yc)&&e.attrs.height!==Dr(this,ef)||!J7e(Dr(this,Jd),e,["width","height"])?!1:(Tu(this,Jd,e),Tu(this,yc,e.attrs.width),Tu(this,ef,e.attrs.height),!0)}destroy(){Dr(this,Qd).forEach(e=>e())}};Zd=new WeakMap,Jd=new WeakMap,Qd=new WeakMap,yc=new WeakMap,ef=new WeakMap;function J7e(e,t,n){return e===t||Q7e(e,t,n)&&e.content.eq(t.content)}function Q7e(e,t,n){const r=e.attrs,o=t.attrs,i={};for(const s of n)i[s]=null;e.attrs={...r,...i},t.attrs={...o,...i};const a=e.sameMarkup(t);return e.attrs=r,t.attrs=o,a}function jH(e){return typeof e=="number"?`${e}px`:e||void 0}var eVe=Object.defineProperty,tVe=Object.getOwnPropertyDescriptor,wO=(e,t,n,r)=>{for(var o=r>1?void 0:r?tVe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&eVe(t,n,o),o},nVe=class extends Z7e{constructor(e,t,n){super({node:e,view:t,getPos:n,aspectRatio:HH.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),Mi(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}},ub=class extends aa{get name(){return"image"}createTags(){return[jn.InlineNode,jn.Media]}createNodeSpec(e,t){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...t,attrs:{...e.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:r=>{var o;if(ji(r)){const i=oVe({element:r,parse:e.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...t.parseDOM??[]],toDOM:r=>{const o=rA(r.attrs,e);return["img",{...e.dom(r),...o}]}}}insertImage(e,t){return({tr:n,dispatch:r})=>{const{from:o,to:i}=Sa(t??n.selection,n.doc),a=this.type.create(e);return r?.(n.replaceRangeWith(o,i,a)),!0}}uploadImage(e,t){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:a}=i;let s=a.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return s},createElement:(c,f)=>{const p=o(c,f);return t?.(p),p},onUpdate:(c,f,p,m)=>{n(c,f,p,m)},onDestroy:(c,f)=>{r(c,f)}},onSuccess:(c,f,p)=>this.insertImage(c,f)(p)}).validate(({tr:c,dispatch:f})=>{const p=Bz(c.doc,s,this.type);return p==null?!1:(s=p,c.selection.empty||f?.(c.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&sVe(t)&&((r=t.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:a,chain:s}=this.store,c=e.map((p,m)=>({file:p,progress:v=>{a.updatePlaceholder(f[m],v)}})),f=i(c);wi(n)&&s.selectText(n);for(const p of f)s.uploadImage(p);return s.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:e=>{const t=e.type==="drop"?e.pos:void 0;return this.fileUploadFileHandler(e.files,e.event,t)}}]}createNodeViews(){return this.options.enableResizing?(e,t,n)=>new nVe(e,t,n):{}}};wO([Cn()],ub.prototype,"insertImage",1),wO([Cn()],ub.prototype,"uploadImage",1),ub=wO([dr({defaultOptions:{createPlaceholder:iVe,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:aVe,enableResizing:!1,preferPastedTextContent:!0}})],ub);function rVe(e){let{width:t,height:n}=e.style;return t=t||e.getAttribute("width")||"",n=n||e.getAttribute("height")||"",{width:t,height:n}}function oVe({element:e,parse:t}){const{width:n,height:r}=rVe(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}function iVe(e,t){const n=document.createElement("div");return n.classList.add(t$e.IMAGE_LOADER),n}function aVe(e){_n(e.length>0,{code:tn.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const n=[];for(const{file:r,progress:o}of e)n.push(()=>new Promise(i=>{const a=new FileReader;a.addEventListener("load",s=>{var c;t+=1,o(t/e.length),i({src:(c=s.target)==null?void 0:c.result,fileName:r.name})},{once:!0}),a.readAsDataURL(r)}));return n}function sVe(e){return e.clipboardData!==void 0}var WH={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:bo,function(){return function(n){function r(i){if(o[i])return o[i].exports;var a=o[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var o={};return r.m=n,r.c=o,r.d=function(i,a,s){r.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(a,"a",a),a},r.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function a(f){typeof f!="string"&&i();for(var p=0,m=0,v=0,y=f.length,w=0;y--&&++w&&!(p&&-1<s.indexOf(f[w]));)f[w]==="."&&(++p,m=w);for(p=w,w=m;w--;)if(c.indexOf(f[w])!==-1){v=w+1;break}return 2>v?"":f.slice(v,p)}var s=["/",":","?","#"],c=[".","/","@"];n.exports=function(f){if(typeof f=="string")return a(f);if(Array.isArray(f)){var p=[],m,v=0;for(m=f.length;v<m;v++)p.push(a(f[v]));return p}i()}}])})})(WH);var lVe=WH.exports,cVe=ro(lVe),uVe=Object.defineProperty,dVe=Object.getOwnPropertyDescriptor,db=(e,t,n,r)=>{for(var o=r>1?void 0:r?dVe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&uVe(t,n,o),o},fVe=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],YH="updateLink",hVe=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,tf=class extends dp{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[jn.Link,jn.ExcludeInputRules]}createMarkSpec(e,t){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:a}=this.options,s=i?[...a,i]:a;return o&&Za(s,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...t,attrs:{...e.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!ji(o))return!1;const i=o.getAttribute("href"),a=o.textContent,s=this.options.autoLink&&(o.hasAttribute(n)||i===a||i?.replace(`${this.options.defaultProtocol}//`,"")===a);return{...e.parse(o),href:i,auto:s,...r(o.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:o=>{const{auto:i,target:a,...s}=rA(o.attrs,e),c=o.attrs.auto?{[n]:""}:{};return["a",{...e.dom(o),...s,rel:"noopener noreferrer nofollow",...c,...r(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:e}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${e.source}$`,e.flags.replace("g",""))}shortcut({tr:e}){let t="",{from:n,to:r,empty:o,$from:i}=e.selection,a=!1;const s=lc(i,this.type);if(o){const c=s??q9(e);if(!c)return!1;({text:t,from:n,to:r}=c),a=!0}return n===r?!1:(a||(t=e.doc.textBetween(n,r)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:s?{attrs:s.mark.attrs,from:s.from,to:s.to}:void 0,selectedText:t,from:n,to:r}),!0)}updateLink(e,t){return n=>{const{tr:r}=n;return!(fu(r.selection)&&!QD(r.selection)||aPe(r.selection)||z1({trState:r,type:this.type}))&&!t?!1:(r.setMeta(this.name,{command:YH,attrs:e,range:t}),EPe({type:this.type,attrs:e,range:t})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:n}=t;return z1({trState:n,type:this.type,...e})?i7({type:this.type,expand:!0,range:e})(t):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(e,t)=>({href:this.buildHref(cc(e)),auto:!t}),transformMatch:e=>{const t=cc(e);return!t||!this.isValidUrl(t)?!1:t}}]}createEventHandlers(){return{clickMark:(e,t)=>{const n=t.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(e,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const a=r.href;window.open(a,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(e,t,n)=>{if(e.filter(y=>!!y.getMeta(this.name)).forEach(y=>{const w=y.getMeta(this.name);if(w.command===YH){const{range:C,attrs:k}=w,{selection:T,doc:E}=n,_={range:C,selection:T,doc:E,attrs:k},{from:R,to:P}=C??T;this.options.onUpdateLink(E.textBetween(R,P),_)}}),!this.options.autoLink||AA(t)-AA(n)===1||!e.some(y=>y.docChanged))return;const a=UMe(e,t),s=U9(a,[Bo,di]),{mapping:c}=a,{tr:f,doc:p}=n,{updateLink:m,removeLink:v}=this.store.chain(f);if(s.forEach(({prevFrom:y,prevTo:w,from:C,to:k})=>{const T=[],E=k-C===2,_=this.getLinkMarksInRange(t.doc,y,w,!0).filter(R=>R.mark.type===this.type).map(({from:R,to:P,text:$})=>({mappedFrom:c.map(R),mappedTo:c.map(P),text:$,from:R,to:P}));_.forEach(({mappedFrom:R,mappedTo:P,from:$,to:z},q)=>this.getLinkMarksInRange(p,R,P,!0).filter(Y=>Y.mark.type===this.type).forEach(Y=>{const J=t.doc.textBetween($,z,void 0," "),K=p.textBetween(Y.from,Y.to+1,void 0," ").trim(),ee=this.isValidUrl(J);this.isValidUrl(K)||(ee&&(v({from:Y.from,to:Y.to}).tr(),_.splice(q,1)),!E&&C===k&&this.findAutoLinks(K).map(ne=>this.addLinkProperties({...ne,from:R+ne.start,to:R+ne.end})).forEach(({attrs:ne,range:oe,text:fe})=>{m(ne,oe).tr(),T.push({attrs:ne,range:oe,text:fe})}))})),this.findTextBlocksInRange(p,{from:C,to:k}).forEach(({text:R,positionStart:P})=>{this.findAutoLinks(R).map($=>this.addLinkProperties({...$,from:P+$.start+1,to:P+$.end+1})).filter(({range:$})=>{const z=C>=$.from&&C<=$.to,q=k>=$.from&&k<=$.to;return z||q||E}).filter(({range:$})=>this.getLinkMarksInRange(f.doc,$.from,$.to,!1).length===0).filter(({range:{from:$},text:z})=>!_.some(({text:q,mappedFrom:Y})=>Y===$&&q===z)).forEach(({attrs:$,text:z,range:q})=>{m($,q).tr(),T.push({attrs:$,range:q,text:z})})}),window.requestAnimationFrame(()=>{T.forEach(({attrs:R,range:P,text:$})=>{const{doc:z,selection:q}=f;this.options.onUpdateLink($,{attrs:R,doc:z,range:P,selection:q})})})}),f.steps.length!==0)return f}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,n,r){const o=[];if(t===n){const i=Math.max(t-1,0),a=e.resolve(i),s=lc(a,this.type);s?.mark.attrs.auto===r&&o.push(s)}else e.nodesBetween(t,n,(i,a)=>{const c=(i.marks??[]).find(({type:f,attrs:p})=>f===this.type&&p.auto===r);c&&o.push({from:a,to:a+i.nodeSize,mark:c,text:i.textContent})});return o}findTextBlocksInRange(e,t){const n=[];return e.nodesBetween(t.from,t.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:e.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:e,to:t,href:n,...r}){return{...r,range:{from:e,to:t},attrs:{href:n,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const n of nv(e,this.options.autoLinkRegex)){const r=cc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||t.push({text:r,href:o,start:n.index,end:n.index+r.length})}return t}isValidUrl(e){var t;return this.options.isValidUrl?this.options.isValidUrl(e,this.options.defaultProtocol):this.isValidTLD(this.buildHref(e))&&!!((t=this._autoLinkRegexNonGlobal)!=null&&t.test(e))}isValidTLD(e){const{autoLinkAllowedTLDs:t}=this.options;if(t.length===0)return!0;const n=cVe(e);if(n==="")return!0;const r=oz(n.split("."));return t.includes(r)}};db([co({shortcut:on.InsertLink})],tf.prototype,"shortcut",1),db([Cn()],tf.prototype,"updateLink",1),db([Cn()],tf.prototype,"selectLink",1),db([Cn()],tf.prototype,"removeLink",1),tf=db([dr({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:hVe,autoLinkAllowedTLDs:fVe,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:pVe},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:Fr.Medium})],tf);function pVe({url:e,defaultProtocol:t}){const n=/^((?:https?|ftp)?:)\/\//.test(e);return!n&&e.includes("@")?`mailto:${e}`:n?e:`${t}//${e}`}var mVe=CO;CO.displayName="json",CO.aliases=["webmanifest"];function CO(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}var gVe=ro(mVe),vVe=SO;SO.displayName="markdown",SO.aliases=["md"];function SO(e){(function(t){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(m){return m=m.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(v){m!==v&&(t.languages.markdown[m].inside.content.inside[v]=t.languages.markdown[v])})}),t.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function v(y){if(!(!y||typeof y=="string"))for(var w=0,C=y.length;w<C;w++){var k=y[w];if(k.type!=="code"){v(k.content);continue}var T=k.content[1],E=k.content[3];if(T&&E&&T.type==="code-language"&&E.type==="code-block"&&typeof T.content=="string"){var _=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");_=(/[a-z][\w-]*/i.exec(_)||[""])[0].toLowerCase();var R="language-"+_;E.alias?typeof E.alias=="string"?E.alias=[E.alias,R]:E.alias.push(R):E.alias=[R]}}}v(m.tokens)}),t.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var v="",y=0,w=m.classes.length;y<w;y++){var C=m.classes[y],k=/language-(.+)/.exec(C);if(k){v=k[1];break}}var T=t.languages[v];if(T)m.content=t.highlight(p(m.content.value),T,v);else if(v&&v!=="none"&&t.plugins.autoloader){var E="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=E,t.plugins.autoloader.loadLanguages(v,function(){var _=document.getElementById(E);_&&(_.innerHTML=t.highlight(_.textContent,t.languages[v],v))})}}});var s=RegExp(t.languages.markup.tag.pattern.source,"gi"),c={amp:"&",lt:"<",gt:">",quot:'"'},f=String.fromCodePoint||String.fromCharCode;function p(m){var v=m.replace(s,"");return v=v.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(y,w){if(w=w.toLowerCase(),w[0]==="#"){var C;return w[1]==="x"?C=parseInt(w.slice(2),16):C=Number(w.slice(1)),f(C)}else{var k=c[w];return k||y}}),v}t.languages.md=t.languages.markdown})(e)}var bVe=ro(vVe),yVe=kO;kO.displayName="typescript",kO.aliases=["ts"];function kO(e){(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),t.languages.ts=t.languages.typescript})(e)}var xVe=ro(yVe);const wVe=new qd({}),CVe=new eb,SVe=new tb,kVe=new Dw({}),EVe=new UA,TVe=new nb,DVe=new Rs({supportedLanguages:[i7e,s7e,gVe,bVe,xVe]}),AVe=new JA,OVe=new yO,MVe=new Zv({}),PVe=new Jv,NVe=new xO({}),_Ve=new ui({}),RVe=new Nw({}),IVe=new tf({autoLink:!0,openLinkOnClick:!0}),LVe=new ub({enableResizing:!0}),$Ve=new Ew({autoUpdate:!0,defaultDirection:"rtl"}),FVe=()=>[wVe,$Ve,IVe,LVe,CVe,SVe,kVe,EVe,DVe,TVe,AVe,OVe,MVe,PVe,NVe,RVe,_Ve];function UH({iconSize:e=18,type:t,level:n}){const r=vc().heading({level:n}),{toggleHeading:o}=_s();function i(){o.enabled({level:n})&&o({level:n})}return mt(is,{type:t,isActive:r,onClick:i,disabled:!o.enabled({level:n}),children:[n,W(t6e,{size:e})]})}function BVe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z",fill:"currentColor"}}]})(e)}function zVe({iconSize:e=18,type:t}){const n=Z$e().link()?.href??"",[r,o]=Tn(n),[i,a]=Tn(!1),s=vc().link(),c=J$e(),f=Yt();function p(){a(!1)}function m(){r||c.selectLink(),a(!0)}function v(){c.removeLink().focus().run(),o(null),a(!1)}function y(w){w.keyCode===13&&(r===""?(c.removeLink(),a(!1)):(c.updateLink({href:r}),a(!1)),c.run()),w.keyCode===27&&a(!1)}return mt(Or,{children:[W(is,{isActive:s,onClick:m,type:t,ref:f,children:W(r6e,{size:e})}),W(WR,{open:i,anchorEl:f.current,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"left"},className:"kd-popover",children:mt("div",{className:"kd-popover__link-url",children:[W(BVe,{size:e,className:"kd-popover__link-url__close-icon",onClick:v}),W(Km,{label:"\u0622\u062F\u0631\u0633 \u0644\u06CC\u0646\u06A9",className:"toggle-link-handler__href-input",onKeyUp:w=>y(w),onChange:w=>o(w.target.value),defaultValue:r})]})})]})}const VVe=[{name:"offset",options:{offset:[0,8]}}];function HVe(){const[e,t]=Tn(null),{ref:n,x:r,y:o,width:i,height:a,active:s}=XFe(()=>BA("selection"),[]),c=Ur(()=>({position:"absolute",pointerEvents:"none",left:r,top:o,width:i,height:a}),[r,o,i,a]),f=Zn(p=>{t(p),n?.(p)},[n]);return W("div",{ref:f,style:c,children:mt(Qf,{className:"kd-floating-toolbar",placement:"top",open:s,anchorEl:e,modifiers:VVe,children:[mt(Or,{children:[W(zVe,{iconSize:16,type:"flat"}),W(_V,{iconSize:16,type:"flat"}),W(RV,{iconSize:16,type:"flat"}),W(IV,{iconSize:16,type:"flat"})]}),mt(Or,{children:[W(UH,{iconSize:16,type:"flat",level:1}),W(UH,{iconSize:16,type:"flat",level:2})]})]})})}const jVe=({onChange:e,defaultValue:t,style:n,toolbar:r=["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","BULLET_LIST","ORDERED_LIST","TASK_LIST","RIGHT_ALIGN","CENTER_ALIGN","LEFT_ALIGN"],...o})=>{const{manager:i,state:a}=uFe({extensions:FVe,selection:"start"}),s=W1({content:c1.unescape(t??""),schema:a.schema});return W("div",{style:{height:"300px",...n},...o,children:W("div",{className:"remirror-theme kd-editor",children:mt(hFe,{manager:i,initialContent:s,children:[W(x6e,{toolbar:r}),W(jA,{}),W(HVe,{}),W(dFe,{onChange:c=>{e&&e(c1.escape(c))}})]})})})},WVe=Na`
|
|
1342
|
+
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},s={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function E(_){return _ instanceof c?new c(_.type,E(_.content),_.alias):Array.isArray(_)?_.map(E):_.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(E){return Object.prototype.toString.call(E).slice(8,-1)},objId:function(E){return E.__id||Object.defineProperty(E,"__id",{value:++i}),E.__id},clone:function E(_,R){R=R||{};var P,$;switch(s.util.type(_)){case"Object":if($=s.util.objId(_),R[$])return R[$];P={},R[$]=P;for(var z in _)_.hasOwnProperty(z)&&(P[z]=E(_[z],R));return P;case"Array":return $=s.util.objId(_),R[$]?R[$]:(P=[],R[$]=P,_.forEach(function(q,Y){P[Y]=E(q,R)}),P);default:return _}},getLanguage:function(E){for(;E;){var _=o.exec(E.className);if(_)return _[1].toLowerCase();E=E.parentElement}return"none"},setLanguage:function(E,_){E.className=E.className.replace(RegExp(o,"gi"),""),E.classList.add("language-"+_)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(P){var E=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(P.stack)||[])[1];if(E){var _=document.getElementsByTagName("script");for(var R in _)if(_[R].src==E)return _[R]}return null}},isActive:function(E,_,R){for(var P="no-"+_;E;){var $=E.classList;if($.contains(_))return!0;if($.contains(P))return!1;E=E.parentElement}return!!R}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(E,_){var R=s.util.clone(s.languages[E]);for(var P in _)R[P]=_[P];return R},insertBefore:function(E,_,R,P){P=P||s.languages;var $=P[E],z={};for(var q in $)if($.hasOwnProperty(q)){if(q==_)for(var Y in R)R.hasOwnProperty(Y)&&(z[Y]=R[Y]);R.hasOwnProperty(q)||(z[q]=$[q])}var J=P[E];return P[E]=z,s.languages.DFS(s.languages,function(K,ee){ee===J&&K!=E&&(this[K]=z)}),z},DFS:function E(_,R,P,$){$=$||{};var z=s.util.objId;for(var q in _)if(_.hasOwnProperty(q)){R.call(_,q,_[q],P||q);var Y=_[q],J=s.util.type(Y);J==="Object"&&!$[z(Y)]?($[z(Y)]=!0,E(Y,R,null,$)):J==="Array"&&!$[z(Y)]&&($[z(Y)]=!0,E(Y,R,q,$))}}},plugins:{},highlightAll:function(E,_){s.highlightAllUnder(document,E,_)},highlightAllUnder:function(E,_,R){var P={callback:R,container:E,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",P),P.elements=Array.prototype.slice.apply(P.container.querySelectorAll(P.selector)),s.hooks.run("before-all-elements-highlight",P);for(var $=0,z;z=P.elements[$++];)s.highlightElement(z,_===!0,P.callback)},highlightElement:function(E,_,R){var P=s.util.getLanguage(E),$=s.languages[P];s.util.setLanguage(E,P);var z=E.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(z,P);var q=E.textContent,Y={element:E,language:P,grammar:$,code:q};function J(ee){Y.highlightedCode=ee,s.hooks.run("before-insert",Y),Y.element.innerHTML=Y.highlightedCode,s.hooks.run("after-highlight",Y),s.hooks.run("complete",Y),R&&R.call(Y.element)}if(s.hooks.run("before-sanity-check",Y),z=Y.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!Y.code){s.hooks.run("complete",Y),R&&R.call(Y.element);return}if(s.hooks.run("before-highlight",Y),!Y.grammar){J(s.util.encode(Y.code));return}if(_&&r.Worker){var K=new Worker(s.filename);K.onmessage=function(ee){J(ee.data)},K.postMessage(JSON.stringify({language:Y.language,code:Y.code,immediateClose:!0}))}else J(s.highlight(Y.code,Y.grammar,Y.language))},highlight:function(E,_,R){var P={code:E,grammar:_,language:R};if(s.hooks.run("before-tokenize",P),!P.grammar)throw new Error('The language "'+P.language+'" has no grammar.');return P.tokens=s.tokenize(P.code,P.grammar),s.hooks.run("after-tokenize",P),c.stringify(s.util.encode(P.tokens),P.language)},tokenize:function(E,_){var R=_.rest;if(R){for(var P in R)_[P]=R[P];delete _.rest}var $=new m;return v($,$.head,E),p(E,$,_,$.head,0),w($)},hooks:{all:{},add:function(E,_){var R=s.hooks.all;R[E]=R[E]||[],R[E].push(_)},run:function(E,_){var R=s.hooks.all[E];if(!(!R||!R.length))for(var P=0,$;$=R[P++];)$(_)}},Token:c};r.Prism=s;function c(E,_,R,P){this.type=E,this.content=_,this.alias=R,this.length=(P||"").length|0}c.stringify=function E(_,R){if(typeof _=="string")return _;if(Array.isArray(_)){var P="";return _.forEach(function(J){P+=E(J,R)}),P}var $={type:_.type,content:E(_.content,R),tag:"span",classes:["token",_.type],attributes:{},language:R},z=_.alias;z&&(Array.isArray(z)?Array.prototype.push.apply($.classes,z):$.classes.push(z)),s.hooks.run("wrap",$);var q="";for(var Y in $.attributes)q+=" "+Y+'="'+($.attributes[Y]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+q+">"+$.content+"</"+$.tag+">"};function f(E,_,R,P){E.lastIndex=_;var $=E.exec(R);if($&&P&&$[1]){var z=$[1].length;$.index+=z,$[0]=$[0].slice(z)}return $}function p(E,_,R,P,$,z){for(var q in R)if(!(!R.hasOwnProperty(q)||!R[q])){var Y=R[q];Y=Array.isArray(Y)?Y:[Y];for(var J=0;J<Y.length;++J){if(z&&z.cause==q+","+J)return;var K=Y[J],ee=K.inside,re=!!K.lookbehind,ne=!!K.greedy,oe=K.alias;if(ne&&!K.pattern.global){var fe=K.pattern.toString().match(/[imsuy]*$/)[0];K.pattern=RegExp(K.pattern.source,fe+"g")}for(var se=K.pattern||K,ue=P.next,le=$;ue!==_.tail&&!(z&&le>=z.reach);le+=ue.value.length,ue=ue.next){var ce=ue.value;if(_.length>E.length)return;if(!(ce instanceof c)){var Se=1,Me;if(ne){if(Me=f(se,le,E,re),!Me||Me.index>=E.length)break;var Oe=Me.index,ze=Me.index+Me[0].length,ke=le;for(ke+=ue.value.length;Oe>=ke;)ue=ue.next,ke+=ue.value.length;if(ke-=ue.value.length,le=ke,ue.value instanceof c)continue;for(var pe=ue;pe!==_.tail&&(ke<ze||typeof pe.value=="string");pe=pe.next)Se++,ke+=pe.value.length;Se--,ce=E.slice(le,ke),Me.index-=le}else if(Me=f(se,0,ce,re),!Me)continue;var Oe=Me.index,Ae=Me[0],Pe=ce.slice(0,Oe),Ve=ce.slice(Oe+Ae.length),Le=le+ce.length;z&&Le>z.reach&&(z.reach=Le);var Ne=ue.prev;Pe&&(Ne=v(_,Ne,Pe),le+=Pe.length),y(_,Ne,Se);var Te=new c(q,ee?s.tokenize(Ae,ee):Ae,oe,Ae);if(ue=v(_,Ne,Te),Ve&&v(_,ue,Ve),Se>1){var He={cause:q+","+J,reach:Le};p(E,_,R,ue.prev,le,He),z&&He.reach>z.reach&&(z.reach=He.reach)}}}}}}function m(){var E={value:null,prev:null,next:null},_={value:null,prev:E,next:null};E.next=_,this.head=E,this.tail=_,this.length=0}function v(E,_,R){var P=_.next,$={value:R,prev:_,next:P};return _.next=$,P.prev=$,E.length++,$}function y(E,_,R){for(var P=_.next,$=0;$<R&&P!==E.tail;$++)P=P.next;_.next=P,P.prev=_,E.length-=$}function w(E){for(var _=[],R=E.head.next;R!==E.tail;)_.push(R.value),R=R.next;return _}if(!r.document)return r.addEventListener&&(s.disableWorkerMessageHandler||r.addEventListener("message",function(E){var _=JSON.parse(E.data),R=_.language,P=_.code,$=_.immediateClose;r.postMessage(s.highlight(P,s.languages[R],R)),$&&r.close()},!1)),s;var C=s.util.currentScript();C&&(s.filename=C.src,C.hasAttribute("data-manual")&&(s.manual=!0));function k(){s.manual||s.highlightAll()}if(!s.manual){var T=document.readyState;T==="loading"||T==="interactive"&&C&&C.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return s}(t);e.exports&&(e.exports=n),typeof bo<"u"&&(bo.Prism=n)})(OH);var i7e=OH.exports,a7e=dO;dO.displayName="markup",dO.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function dO(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var o={};o["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var MH=fO;fO.displayName="css",fO.aliases=[];function fO(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}var s7e=ro(MH),l7e=hO;hO.displayName="clike",hO.aliases=[];function hO(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var PH=pO;pO.displayName="javascript",pO.aliases=["js"];function pO(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var c7e=ro(PH),ab=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof bo=="object"?bo:{},u7e=T7e();ab.Prism={manual:!0,disableWorkerMessageHandler:!0};var d7e=Tze,f7e=H9e,NH=i7e,h7e=a7e,p7e=MH,m7e=l7e,g7e=PH;u7e();var mO={}.hasOwnProperty;function _H(){}_H.prototype=NH;var Ko=new _H,v7e=Ko;Ko.highlight=y7e,Ko.register=sb,Ko.alias=b7e,Ko.registered=x7e,Ko.listLanguages=w7e,sb(h7e),sb(p7e),sb(m7e),sb(g7e),Ko.util.encode=k7e,Ko.Token.stringify=C7e;function sb(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");Ko.languages[e.displayName]===void 0&&e(Ko)}function b7e(e,t){var n=Ko.languages,r=e,o,i,a,s;t&&(r={},r[e]=t);for(o in r)for(i=r[o],i=typeof i=="string"?[i]:i,a=i.length,s=-1;++s<a;)n[i[s]]=n[o]}function y7e(e,t){var n=NH.highlight,r;if(typeof e!="string")throw new Error("Expected `string` for `value`, got `"+e+"`");if(Ko.util.type(t)==="Object")r=t,t=null;else{if(typeof t!="string")throw new Error("Expected `string` for `name`, got `"+t+"`");if(mO.call(Ko.languages,t))r=Ko.languages[t];else throw new Error("Unknown language: `"+t+"` is not registered")}return n.call(this,e,r,t)}function x7e(e){if(typeof e!="string")throw new Error("Expected `string` for `language`, got `"+e+"`");return mO.call(Ko.languages,e)}function w7e(){var e=Ko.languages,t=[],n;for(n in e)mO.call(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function C7e(e,t,n){var r;return typeof e=="string"?{type:"text",value:e}:Ko.util.type(e)==="Array"?S7e(e,t):(r={type:e.type,content:Ko.Token.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n},e.alias&&(r.classes=r.classes.concat(e.alias)),Ko.hooks.run("wrap",r),d7e(r.tag+"."+r.classes.join("."),E7e(r.attributes),r.content))}function S7e(e,t){for(var n=[],r=e.length,o=-1,i;++o<r;)i=e[o],i!==""&&i!==null&&i!==void 0&&n.push(i);for(o=-1,r=n.length;++o<r;)i=n[o],n[o]=Ko.Token.stringify(i,t,n);return n}function k7e(e){return e}function E7e(e){var t;for(t in e)e[t]=f7e(e[t]);return e}function T7e(){var e="Prism"in ab,t=e?ab.Prism:void 0;return n;function n(){e?ab.Prism=t:delete ab.Prism,e=void 0,t=void 0}}var gO=ro(v7e),D7e=Object.defineProperty,A7e=Object.getOwnPropertyDescriptor,bc=(e,t,n,r)=>{for(var o=r>1?void 0:r?A7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&D7e(t,n,o),o},RH=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Eu=(e,t,n)=>(RH(e,t,"read from private field"),n?n.call(e):t.get(e)),vO=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},bO=(e,t,n,r)=>(RH(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),IH="data-code-block-language";function LH(e,t,n=[]){return e.map(r=>{const o=[...n];return r.type==="element"&&r.properties.className?o.push(...r.properties.className):r.type==="text"&&o.length===0&&t&&o.push(t),r.type==="element"?LH(r.children,t,o):{text:r.value,classes:o}})}function O7e(e,t){var n;const{node:r,pos:o}=e,i=Pw({language:(n=r.attrs.language)==null?void 0:n.replace("language-",""),fallback:"markup"}),a=gO.highlight(r.textContent??"",i),s=LH(a,t);let c=o+1;function f(p){const m=c,v=m+p.text.length;return c=v,{...p,from:m,to:v}}return nz(s).map(f)}function $H(e){const{blocks:t,skipLast:n,plainTextClassName:r}=e,o=[];for(const i of t){const a=O7e(i,r),s=n?a.length-1:a.length;for(const c of nD(s)){const f=a[c],p=f?.classes;if(!f||!p?.length)continue;const m=fo.inline(f.from,f.to,{class:p.join(" ")});o.push(m)}}return o}function M7e(e){return!!(e&&ii(e)&&Bn(e.language)&&e.language.length>0)}function P7e(e){return t=>({state:{tr:n,selection:r},dispatch:o})=>{if(!M7e(t))throw new Error("Invalid attrs passed to the updateAttributes method");const i=du({types:e,selection:r});return!i||NTe(t,i.node.attrs)?!1:(n.setNodeMarkup(i.pos,e,{...i.node.attrs,...t}),o&&o(n),!0)}}function Pw(e){const{language:t,fallback:n}=e;if(!t)return n;const r=gO.listLanguages();for(const o of r)if(o.toLowerCase()===t.toLowerCase())return o;return n}function N7e(e,t){const{language:n,wrap:r}=rA(e.attrs,t),{style:o,...i}=t.dom(e);let a=i.style;return r&&(a=Q9({whiteSpace:"pre-wrap",wordBreak:"break-all"},a)),["pre",{spellcheck:"false",...i,class:K1(i.class,`language-${n}`)},["code",{[IH]:n,style:a},0]]}function _7e(e){return({pos:t}=In())=>({tr:n,dispatch:r})=>{const{type:o,formatter:i,defaultLanguage:a}=e,{from:s,to:c}=t?{from:t,to:t}:n.selection,f=du({types:o,selection:n.selection});if(!f)return!1;const{node:{attrs:p,textContent:m},start:v}=f,y=s-v,w=c-v,C=Pw({language:p.language,fallback:a}),k=i({source:m,language:C,cursorOffset:y});let T;if(y!==w&&(T=i({source:m,language:C,cursorOffset:w})),!k)return!1;const{cursorOffset:E,formatted:_}=k;if(_===m)return!1;const R=v+m.length;n.insertText(_,v,R);const P=v+E,$=T?v+T.cursorOffset:void 0;return n.setSelection(Vn.between(n.doc.resolve(P),n.doc.resolve($??P))),r&&r(n),!0}}function R7e(e){var t;return(t=e.getAttribute(IH)??e.classList[0])==null?void 0:t.replace("language-","")}var{DESCRIPTION:I7e,LABEL:L7e}=sAe,$7e={icon:"bracesLine",description:({t:e})=>e(I7e),label:({t:e})=>e(L7e)},Xd,lb,cb,F7e=class{constructor(e,t){vO(this,Xd,void 0),vO(this,lb,void 0),vO(this,cb,!1),bO(this,lb,e),bO(this,Xd,t)}init(e){const t=_Pe({node:e.doc,type:Eu(this,lb)});return this.refreshDecorationSet(e.doc,t),this}refreshDecorationSet(e,t){const n=$H({blocks:t,skipLast:Eu(this,cb),defaultLanguage:Eu(this,Xd).options.defaultLanguage,plainTextClassName:Eu(this,Xd).options.plainTextClassName??void 0});this.decorationSet=wr.create(e,n)}apply(e,t){if(!e.docChanged)return this;this.decorationSet=this.decorationSet.map(e.mapping,e.doc);const n=RPe(e,{descend:!0,predicate:r=>r.type===Eu(this,lb),StepTypes:[]});return this.updateDecorationSet(e,n),this}updateDecorationSet(e,t){if(t.length===0)return;let n=this.decorationSet;for(const{node:r,pos:o}of t)n=this.decorationSet.remove(this.decorationSet.find(o,o+r.nodeSize));this.decorationSet=n.add(e.doc,$H({blocks:t,skipLast:Eu(this,cb),defaultLanguage:Eu(this,Xd).options.defaultLanguage,plainTextClassName:Eu(this,Xd).options.plainTextClassName??void 0}))}setDeleted(e){bO(this,cb,e)}};Xd=new WeakMap,lb=new WeakMap,cb=new WeakMap;var Rs=class extends aa{get name(){return"codeBlock"}createTags(){return[jn.Block,jn.Code]}init(){this.registerLanguages()}createNodeSpec(e,t){const n=/highlight-(?:text|source)-([\da-z]+)/;return{content:"text*",marks:"",defining:!0,draggable:!1,...t,code:!0,attrs:{...e.defaults(),language:{default:this.options.defaultLanguage},wrap:{default:this.options.defaultWrap}},parseDOM:[{tag:"div.highlight",preserveWhitespace:"full",getAttrs:r=>{var o,i;if(!ji(r))return!1;const a=r.querySelector("pre.code");if(!ji(a))return!1;const s=ts(a,"white-space")==="pre-wrap",c=(i=(o=r.className.match(n))==null?void 0:o[1])==null?void 0:i.replace("language-","");return{...e.parse(r),language:c,wrap:s}}},{tag:"pre",preserveWhitespace:"full",getAttrs:r=>{if(!ji(r))return!1;const o=r.querySelector("code");if(!ji(o))return!1;const i=ts(o,"white-space")==="pre-wrap",a=this.options.getLanguageFromDom(o,r);return{...e.parse(r),language:a,wrap:i}}},...t.parseDOM??[]],toDOM:r=>N7e(r,e)}}createAttributes(){return{class:t$e[this.options.syntaxTheme.toUpperCase()]}}createInputRules(){const e=/^```([\dA-Za-z]*) $/,t=n=>({language:Pw({language:cc(n,1),fallback:this.options.defaultLanguage})});return[a7({regexp:e,type:this.type,beforeDispatch:({tr:n,start:r})=>{const o=n.doc.resolve(r);n.setSelection(Vn.near(o))},getAttributes:t})]}onSetOptions(e){const{changes:t}=e;t.supportedLanguages.changed&&this.registerLanguages(),t.syntaxTheme.changed&&this.store.updateAttributes()}createPlugin(){const e=new F7e(this.type,this),t=()=>(e.setDeleted(!0),!1);return{state:{init(n,r){return e.init(r)},apply(n,r,o,i){return e.apply(n,i)}},props:{handleKeyDown:fA({Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t}),decorations(){return e.setDeleted(!1),e.decorationSet}}}}toggleCodeBlock(e={}){return iA({type:this.type,toggleType:this.options.toggleName,attrs:{language:this.options.defaultLanguage,...e}})}createCodeBlock(e){return kv(this.type,e)}updateCodeBlock(e){return P7e(this.type)(e)}formatCodeBlock(e){return _7e({type:this.type,formatter:this.options.formatter,defaultLanguage:this.options.defaultLanguage})(e)}tabKey({state:e,dispatch:t}){const{selection:n,tr:r,schema:o}=e,{node:i}=JMe(n);if(!F1({node:i,types:this.type}))return!1;if(n.empty)r.insertText(" ");else{const{from:a,to:s}=n;r.replaceWith(a,s,o.text(" "))}return t&&t(r),!0}backspaceKey({dispatch:e,tr:t,state:n}){if(!t.selection.empty)return!1;const r=du({types:this.type,selection:t.selection});if(r?.start!==t.selection.from)return!1;const{pos:o,node:i,start:a}=r,s=mo(n.schema.nodes,this.options.toggleName);return i.textContent.trim()===""?t.doc.lastChild===i&&t.doc.firstChild===i?XMe({pos:o,tr:t,content:s.create()}):GMe({pos:o,tr:t}):a>2?t.setSelection(Vn.near(t.doc.resolve(a-2))):(t.insert(0,s.create()),t.setSelection(Vn.near(t.doc.resolve(1)))),e&&e(t),!0}enterKey({dispatch:e,tr:t}){if(!(fu(t.selection)&&t.selection.empty))return!1;const{nodeBefore:n,parent:r}=t.selection.$anchor;if(!n?.isText||!r.type.isTextblock)return!1;const o=/^```([A-Za-z]*)?$/,{text:i,nodeSize:a}=n,{textContent:s}=r;if(!i)return!1;const c=i.match(o),f=s.match(o);if(!c||!f)return!1;const[,p]=c,m=Pw({language:p,fallback:this.options.defaultLanguage}),v=t.selection.$from.before(),y=v+a+1;return t.replaceWith(v,y,this.type.create({language:m})),t.setSelection(Vn.near(t.doc.resolve(v+1))),e&&e(t),!0}formatShortcut({tr:e}){const t=this.store.commands;if(!z9({type:this.type,state:e}))return!1;const n=t.formatCodeBlock.isEnabled();return n&&t.formatCodeBlock(),n}registerLanguages(){for(const e of this.options.supportedLanguages)gO.register(e)}};bc([Cn($7e)],Rs.prototype,"toggleCodeBlock",1),bc([Cn()],Rs.prototype,"createCodeBlock",1),bc([Cn()],Rs.prototype,"updateCodeBlock",1),bc([Cn()],Rs.prototype,"formatCodeBlock",1),bc([co({shortcut:"Tab"})],Rs.prototype,"tabKey",1),bc([co({shortcut:"Backspace"})],Rs.prototype,"backspaceKey",1),bc([co({shortcut:"Enter"})],Rs.prototype,"enterKey",1),bc([co({shortcut:on.Format})],Rs.prototype,"formatShortcut",1),Rs=bc([dr({defaultOptions:{supportedLanguages:[],toggleName:"paragraph",formatter:({source:e})=>({cursorOffset:0,formatted:e}),syntaxTheme:"a11y_dark",defaultLanguage:"markup",defaultWrap:!1,plainTextClassName:"",getLanguageFromDom:R7e},staticKeys:["getLanguageFromDom"]})],Rs);var B7e=Object.defineProperty,z7e=Object.getOwnPropertyDescriptor,FH=(e,t,n,r)=>{for(var o=r>1?void 0:r?z7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&B7e(t,n,o),o},yO=class extends aa{get name(){return"blockquote"}createTags(){return[jn.Block,jn.FormattingNode]}createNodeSpec(e,t){return{content:"block+",defining:!0,draggable:!1,...t,attrs:e.defaults(),parseDOM:[{tag:"blockquote",getAttrs:e.parse,priority:100},...t.parseDOM??[]],toDOM:n=>["blockquote",e.dom(n),0]}}toggleBlockquote(){return r7(this.type)}shortcut(e){return this.toggleBlockquote()(e)}createInputRules(){return[A1(/^\s*>\s$/,this.type)]}createPasteRules(){return{type:"node",nodeType:this.type,regexp:/^\s*>\s$/,startOfTextBlock:!0}}};FH([Cn({icon:"doubleQuotesL",description:({t:e})=>e(n8.DESCRIPTION),label:({t:e})=>e(n8.LABEL)})],yO.prototype,"toggleBlockquote",1),FH([co({shortcut:"Ctrl->",command:"toggleBlockquote"})],yO.prototype,"shortcut",1);var BH=new _d("trailingNode");function V7e(e){const{ignoredNodes:t=[],nodeName:n="paragraph"}=e??{},r=new Set([...t,n]);let o,i;return new rc({key:BH,appendTransaction(a,s,c){const{doc:f,tr:p}=c,m=BH.getState(c),v=f.content.size;if(m)return p.insert(v,o.create())},state:{init:(a,{doc:s,schema:c})=>{const f=c.nodes[n];if(!f)throw new Error(`Invalid node being used for trailing node extension: '${n}'`);return o=f,i=Object.values(c.nodes).map(p=>p).filter(p=>!r.has(p.name)),i.includes(s.lastChild?.type)},apply:(a,s)=>a.docChanged?i.includes(a.doc.lastChild?.type):s}})}var H7e=Object.defineProperty,j7e=Object.getOwnPropertyDescriptor,W7e=(e,t,n,r)=>{for(var o=r>1?void 0:r?j7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&H7e(t,n,o),o},xO=class extends Xr{get name(){return"trailingNode"}onSetOptions(e){const{changes:t}=e;(t.disableTags.changed||t.ignoredNodes.changed||t.nodeName.changed)&&this.store.updateExtensionPlugins(this)}createExternalPlugins(){const{tags:e}=this.store,{disableTags:t,nodeName:n}=this.options,r=t?[...this.options.ignoredNodes]:[...this.options.ignoredNodes,...e.lastNodeCompatible];return[V7e({ignoredNodes:r,nodeName:n})]}};xO=W7e([dr({defaultOptions:{ignoredNodes:[],disableTags:!1,nodeName:"paragraph"}})],xO);var Y7e=Object.defineProperty,U7e=Object.getOwnPropertyDescriptor,zH=(e,t,n,r)=>{for(var o=r>1?void 0:r?U7e(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&Y7e(t,n,o),o},q7e={icon:"separator",label:({t:e})=>e(o8.LABEL),description:({t:e})=>e(o8.DESCRIPTION)},Nw=class extends aa{get name(){return"horizontalRule"}createTags(){return[jn.Block]}createNodeSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:"hr",getAttrs:e.parse},...t.parseDOM??[]],toDOM:n=>["hr",e.dom(n)]}}insertHorizontalRule(){return e=>{const{tr:t,dispatch:n}=e,r=t.selection.$anchor,o=r.parent;return o.type.name==="doc"||o.isAtom||o.isLeaf?!1:(n&&(t.selection.empty&&H1(o)&&t.insert(r.pos+1,o),t.replaceSelectionWith(this.type.create()),this.updateFromNodeSelection(t),n(t.scrollIntoView())),!0)}}createInputRules(){return[a7({regexp:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type,beforeDispatch:({tr:e})=>{this.updateFromNodeSelection(e)}})]}updateFromNodeSelection(e){if(!Sv(e.selection)||e.selection.node.type.name!==this.name)return;const t=e.selection.$from.pos+1,{insertionNode:n}=this.options;if(!n)return;const r=this.store.schema.nodes[n];_n(r,{code:tn.EXTENSION,message:`'${n}' node provided as the insertionNode to the '${this.constructorName}' does not exist.`});const o=r.create();e.insert(t,o),e.setSelection(Vn.near(e.doc.resolve(t+1)))}};zH([Cn(q7e)],Nw.prototype,"insertHorizontalRule",1),Nw=zH([dr({defaultOptions:{insertionNode:"paragraph"}})],Nw);var VH=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Dr=(e,t,n)=>(VH(e,t,"read from private field"),n?n.call(e):t.get(e)),Op=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Tu=(e,t,n,r)=>(VH(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),K7e='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="22" height="22" fill="rgba(0, 0, 0, 0.65)" stroke="rgba(255, 255, 255, 0.5)" transform="rotate(90)" xmlns:v="https://vecta.io/nano"><path fill-rule="evenodd" d="M14 0a2 2 0 0 0-2 2v10H2a2 2 0 1 0 0 4h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/></svg>',G7e='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="22" height="22" fill="rgba(0, 0, 0, 0.65)" stroke="rgba(255, 255, 255, 0.5)" transform="matrix(0 1 1 0 0 0)" xmlns:v="https://vecta.io/nano"><path fill-rule="evenodd" d="M14 0a2 2 0 0 0-2 2v10H2a2 2 0 1 0 0 4h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/></svg>',X7e=encodeURIComponent(K7e),Z7e=encodeURIComponent(G7e),ca,J7e=class{constructor(e){Op(this,ca,void 0);const t=document.createElement("div"),n=document.createElement("div");this.dom=t,Tu(this,ca,n),this.type=e,this.createHandle(e)}createHandle(e){switch(Mi(this.dom,{position:"absolute",pointerEvents:"auto",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"100"}),Mi(Dr(this,ca),{opacity:"0",transition:"opacity 300ms ease-in 0s"}),Dr(this,ca).dataset.dragging="",e){case 0:Mi(this.dom,{right:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Mi(Dr(this,ca),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 1:Mi(this.dom,{left:"0px",top:"0px",height:"100%",width:"15px",cursor:"col-resize"}),Mi(Dr(this,ca),{width:" 4px",height:"36px",maxHeight:"50%",boxSizing:"content-box",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 2:Mi(this.dom,{bottom:"0px",width:"100%",height:"14px",cursor:"row-resize"}),Mi(Dr(this,ca),{width:" 42px",height:"4px",boxSizing:"content-box",maxWidth:"50%",background:"rgba(0, 0, 0, 0.65)",border:"1px solid rgba(255, 255, 255, 0.5)",borderRadius:"6px"});break;case 3:Mi(this.dom,{right:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nwse-resize",zIndex:"101"}),Mi(Dr(this,ca),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${Z7e}") `});break;case 4:Mi(this.dom,{left:"-1px",bottom:"-2px",width:"30px",height:"30px",cursor:"nesw-resize",zIndex:"101"}),Mi(Dr(this,ca),{height:"22px",width:"22px",backgroundRepeat:"no-repeat",backgroundImage:`url("data:image/svg+xml,${X7e}") `});break}this.dom.append(Dr(this,ca))}setHandleVisibility(e){const t=e||!!Dr(this,ca).dataset.dragging;Dr(this,ca).style.opacity=t?"1":"0"}dataSetDragging(e){Dr(this,ca).dataset.dragging=e?"true":""}};ca=new WeakMap;var _w=50,HH=(e=>(e[e.Fixed=0]="Fixed",e[e.Flexible=1]="Flexible",e))(HH||{}),Zd,Jd,Qd,yc,ef,Q7e=class{constructor({node:e,view:t,getPos:n,aspectRatio:r=0,options:o,initialSize:i}){Op(this,Zd,void 0),Op(this,Jd,void 0),Op(this,Qd,[]),Op(this,yc,void 0),Op(this,ef,void 0);const a=this.createWrapper(e,i),s=this.createElement({node:e,view:t,getPos:n,options:o}),f=(r===1?[0,1,2,3,4]:[0,1]).map(v=>new J7e(v));for(const v of f){const y=w=>{this.startResizing(w,t,n,v)};v.dom.addEventListener("mousedown",y),Dr(this,Qd).push(()=>v.dom.removeEventListener("mousedown",y)),a.append(v.dom)}const p=()=>{f.forEach(v=>v.setHandleVisibility(!0))},m=()=>{f.forEach(v=>v.setHandleVisibility(!1))};a.addEventListener("mouseover",p),a.addEventListener("mouseout",m),Dr(this,Qd).push(()=>a.removeEventListener("mouseover",p),()=>a.removeEventListener("mouseout",m)),a.append(s),this.dom=a,Tu(this,Jd,e),Tu(this,Zd,s),this.aspectRatio=r}createWrapper(e,t){const n=document.createElement("div");return n.classList.add("remirror-resizable-view"),n.style.position="relative",t?Mi(n,{width:jH(t.width),aspectRatio:`${t.width} / ${t.height}`}):Mi(n,{width:jH(e.attrs.width),aspectRatio:`${e.attrs.width} / ${e.attrs.height}`}),Mi(n,{maxWidth:"100%",minWidth:`${_w}px`,verticalAlign:"bottom",display:"inline-block",lineHeight:"0",transition:"width 0.15s ease-out, height 0.15s ease-out"}),n}startResizing(e,t,n,r){var o,i;e.preventDefault(),r.dataSetDragging(!0),Dr(this,Zd).style.pointerEvents="none";const a=e.pageX,s=e.pageY,c=((o=Dr(this,Zd))==null?void 0:o.getBoundingClientRect().width)||0,f=((i=Dr(this,Zd))==null?void 0:i.getBoundingClientRect().height)||0,p=QT(100,!1,v=>{const y=v.pageX,w=v.pageY,C=y-a,k=w-s;let T=null,E=null;if(this.aspectRatio===0&&c&&f)switch(r.type){case 0:case 3:T=c+C,E=f/c*T;break;case 1:case 4:T=c-C,E=f/c*T;break;case 2:E=f+k,T=c/f*E;break}else if(this.aspectRatio===1)switch(r.type){case 0:T=c+C;break;case 1:T=c-C;break;case 2:E=f+k;break;case 3:T=c+C,E=f+k;break;case 4:T=c-C,E=f+k;break}typeof T=="number"&&T<_w&&(this.aspectRatio===0&&c&&f?(T=_w,E=f/c*T):this.aspectRatio===1&&(T=_w)),T&&(Tu(this,yc,Math.round(T)),this.dom.style.width=`${Dr(this,yc)}px`),E&&Tu(this,ef,Math.round(E)),(T||E)&&(this.dom.style.aspectRatio=`${Dr(this,yc)} / ${Dr(this,ef)}`)}),m=v=>{v.preventDefault(),r.dataSetDragging(!1),r.setHandleVisibility(!1),Dr(this,Zd).style.pointerEvents="auto",document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",m);const y=n(),w=t.state.tr.setNodeMarkup(y,void 0,{...Dr(this,Jd).attrs,width:Dr(this,yc),height:Dr(this,ef)});t.dispatch(w)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",m),Dr(this,Qd).push(()=>document.removeEventListener("mousemove",p)),Dr(this,Qd).push(()=>document.removeEventListener("mouseup",m))}update(e){return e.type!==Dr(this,Jd).type||this.aspectRatio===0&&e.attrs.width&&e.attrs.width!==Dr(this,yc)||this.aspectRatio===1&&e.attrs.width&&e.attrs.height&&e.attrs.width!==Dr(this,yc)&&e.attrs.height!==Dr(this,ef)||!eVe(Dr(this,Jd),e,["width","height"])?!1:(Tu(this,Jd,e),Tu(this,yc,e.attrs.width),Tu(this,ef,e.attrs.height),!0)}destroy(){Dr(this,Qd).forEach(e=>e())}};Zd=new WeakMap,Jd=new WeakMap,Qd=new WeakMap,yc=new WeakMap,ef=new WeakMap;function eVe(e,t,n){return e===t||tVe(e,t,n)&&e.content.eq(t.content)}function tVe(e,t,n){const r=e.attrs,o=t.attrs,i={};for(const s of n)i[s]=null;e.attrs={...r,...i},t.attrs={...o,...i};const a=e.sameMarkup(t);return e.attrs=r,t.attrs=o,a}function jH(e){return typeof e=="number"?`${e}px`:e||void 0}var nVe=Object.defineProperty,rVe=Object.getOwnPropertyDescriptor,wO=(e,t,n,r)=>{for(var o=r>1?void 0:r?rVe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&nVe(t,n,o),o},oVe=class extends Q7e{constructor(e,t,n){super({node:e,view:t,getPos:n,aspectRatio:HH.Fixed})}createElement({node:e}){const t=document.createElement("img");return t.setAttribute("src",e.attrs.src),Mi(t,{width:"100%",minWidth:"50px",objectFit:"contain"}),t}},ub=class extends aa{get name(){return"image"}createTags(){return[jn.InlineNode,jn.Media]}createNodeSpec(e,t){const{preferPastedTextContent:n}=this.options;return{inline:!0,draggable:!0,selectable:!1,...t,attrs:{...e.defaults(),alt:{default:""},crop:{default:null},height:{default:null},width:{default:null},rotate:{default:null},src:{default:null},title:{default:""},fileName:{default:null},resizable:{default:!1}},parseDOM:[{tag:"img[src]",getAttrs:r=>{var o;if(ji(r)){const i=aVe({element:r,parse:e.parse});return n&&((o=i.src)!=null&&o.startsWith("file:///"))?!1:i}return{}}},...t.parseDOM??[]],toDOM:r=>{const o=rA(r.attrs,e);return["img",{...e.dom(r),...o}]}}}insertImage(e,t){return({tr:n,dispatch:r})=>{const{from:o,to:i}=Sa(t??n.selection,n.doc),a=this.type.create(e);return r?.(n.replaceRangeWith(o,i,a)),!0}}uploadImage(e,t){const{updatePlaceholder:n,destroyPlaceholder:r,createPlaceholder:o}=this.options;return i=>{const{tr:a}=i;let s=a.selection.from;return this.store.createPlaceholderCommand({promise:e,placeholder:{type:"widget",get pos(){return s},createElement:(c,f)=>{const p=o(c,f);return t?.(p),p},onUpdate:(c,f,p,m)=>{n(c,f,p,m)},onDestroy:(c,f)=>{r(c,f)}},onSuccess:(c,f,p)=>this.insertImage(c,f)(p)}).validate(({tr:c,dispatch:f})=>{const p=Bz(c.doc,s,this.type);return p==null?!1:(s=p,c.selection.empty||f?.(c.deleteSelection()),!0)},"unshift").generateCommand()(i)}}fileUploadFileHandler(e,t,n){var r;const{preferPastedTextContent:o,uploadHandler:i}=this.options;if(o&&cVe(t)&&((r=t.clipboardData)!=null&&r.getData("text/plain")))return!1;const{commands:a,chain:s}=this.store,c=e.map((p,m)=>({file:p,progress:v=>{a.updatePlaceholder(f[m],v)}})),f=i(c);wi(n)&&s.selectText(n);for(const p of f)s.uploadImage(p);return s.run(),!0}createPasteRules(){return[{type:"file",regexp:/image/i,fileHandler:e=>{const t=e.type==="drop"?e.pos:void 0;return this.fileUploadFileHandler(e.files,e.event,t)}}]}createNodeViews(){return this.options.enableResizing?(e,t,n)=>new oVe(e,t,n):{}}};wO([Cn()],ub.prototype,"insertImage",1),wO([Cn()],ub.prototype,"uploadImage",1),ub=wO([dr({defaultOptions:{createPlaceholder:sVe,updatePlaceholder:()=>{},destroyPlaceholder:()=>{},uploadHandler:lVe,enableResizing:!1,preferPastedTextContent:!0}})],ub);function iVe(e){let{width:t,height:n}=e.style;return t=t||e.getAttribute("width")||"",n=n||e.getAttribute("height")||"",{width:t,height:n}}function aVe({element:e,parse:t}){const{width:n,height:r}=iVe(e);return{...t(e),alt:e.getAttribute("alt")??"",height:Number.parseInt(r||"0",10)||null,src:e.getAttribute("src")??null,title:e.getAttribute("title")??"",width:Number.parseInt(n||"0",10)||null,fileName:e.getAttribute("data-file-name")??null}}function sVe(e,t){const n=document.createElement("div");return n.classList.add(r$e.IMAGE_LOADER),n}function lVe(e){_n(e.length>0,{code:tn.EXTENSION,message:"The upload handler was applied for the image extension without any valid files"});let t=0;const n=[];for(const{file:r,progress:o}of e)n.push(()=>new Promise(i=>{const a=new FileReader;a.addEventListener("load",s=>{var c;t+=1,o(t/e.length),i({src:(c=s.target)==null?void 0:c.result,fileName:r.name})},{once:!0}),a.readAsDataURL(r)}));return n}function cVe(e){return e.clipboardData!==void 0}var WH={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:bo,function(){return function(n){function r(i){if(o[i])return o[i].exports;var a=o[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}var o={};return r.m=n,r.c=o,r.d=function(i,a,s){r.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(a,"a",a),a},r.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},r.p="",r(r.s=0)}([function(n,r,o){function i(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function a(f){typeof f!="string"&&i();for(var p=0,m=0,v=0,y=f.length,w=0;y--&&++w&&!(p&&-1<s.indexOf(f[w]));)f[w]==="."&&(++p,m=w);for(p=w,w=m;w--;)if(c.indexOf(f[w])!==-1){v=w+1;break}return 2>v?"":f.slice(v,p)}var s=["/",":","?","#"],c=[".","/","@"];n.exports=function(f){if(typeof f=="string")return a(f);if(Array.isArray(f)){var p=[],m,v=0;for(m=f.length;v<m;v++)p.push(a(f[v]));return p}i()}}])})})(WH);var uVe=WH.exports,dVe=ro(uVe),fVe=Object.defineProperty,hVe=Object.getOwnPropertyDescriptor,db=(e,t,n,r)=>{for(var o=r>1?void 0:r?hVe(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&fVe(t,n,o),o},pVe=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],YH="updateLink",mVe=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,tf=class extends dp{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[jn.Link,jn.ExcludeInputRules]}createMarkSpec(e,t){const n="data-link-auto",r=o=>{const{defaultTarget:i,supportedTargets:a}=this.options,s=i?[...a,i]:a;return o&&Za(s,o)?{target:o}:void 0};return{inclusive:!1,excludes:"_",...t,attrs:{...e.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:o=>{if(!ji(o))return!1;const i=o.getAttribute("href"),a=o.textContent,s=this.options.autoLink&&(o.hasAttribute(n)||i===a||i?.replace(`${this.options.defaultProtocol}//`,"")===a);return{...e.parse(o),href:i,auto:s,...r(o.getAttribute("target"))}}},...t.parseDOM??[]],toDOM:o=>{const{auto:i,target:a,...s}=rA(o.attrs,e),c=o.attrs.auto?{[n]:""}:{};return["a",{...e.dom(o),...s,rel:"noopener noreferrer nofollow",...c,...r(o.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:e}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${e.source}$`,e.flags.replace("g",""))}shortcut({tr:e}){let t="",{from:n,to:r,empty:o,$from:i}=e.selection,a=!1;const s=lc(i,this.type);if(o){const c=s??q9(e);if(!c)return!1;({text:t,from:n,to:r}=c),a=!0}return n===r?!1:(a||(t=e.doc.textBetween(n,r)),this.options.onActivateLink(t),this.options.onShortcut({activeLink:s?{attrs:s.mark.attrs,from:s.from,to:s.to}:void 0,selectedText:t,from:n,to:r}),!0)}updateLink(e,t){return n=>{const{tr:r}=n;return!(fu(r.selection)&&!QD(r.selection)||lPe(r.selection)||z1({trState:r,type:this.type}))&&!t?!1:(r.setMeta(this.name,{command:YH,attrs:e,range:t}),DPe({type:this.type,attrs:e,range:t})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(e){return t=>{const{tr:n}=t;return z1({trState:n,type:this.type,...e})?i7({type:this.type,expand:!0,range:e})(t):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(e,t)=>({href:this.buildHref(cc(e)),auto:!t}),transformMatch:e=>{const t=cc(e);return!t||!this.isValidUrl(t)?!1:t}}]}createEventHandlers(){return{clickMark:(e,t)=>{const n=t.getMark(this.type);if(!n)return;const r=n.mark.attrs,o={...r,...n};if(this.options.onClick(e,o))return!0;if(!this.store.view.editable)return;let i=!1;if(this.options.openLinkOnClick){i=!0;const a=r.href;window.open(a,"_blank")}return this.options.selectTextOnClick&&(i=!0,this.store.commands.selectText(n)),i}}}createPlugin(){return{appendTransaction:(e,t,n)=>{if(e.filter(y=>!!y.getMeta(this.name)).forEach(y=>{const w=y.getMeta(this.name);if(w.command===YH){const{range:C,attrs:k}=w,{selection:T,doc:E}=n,_={range:C,selection:T,doc:E,attrs:k},{from:R,to:P}=C??T;this.options.onUpdateLink(E.textBetween(R,P),_)}}),!this.options.autoLink||AA(t)-AA(n)===1||!e.some(y=>y.docChanged))return;const a=KMe(e,t),s=U9(a,[Bo,di]),{mapping:c}=a,{tr:f,doc:p}=n,{updateLink:m,removeLink:v}=this.store.chain(f);if(s.forEach(({prevFrom:y,prevTo:w,from:C,to:k})=>{const T=[],E=k-C===2,_=this.getLinkMarksInRange(t.doc,y,w,!0).filter(R=>R.mark.type===this.type).map(({from:R,to:P,text:$})=>({mappedFrom:c.map(R),mappedTo:c.map(P),text:$,from:R,to:P}));_.forEach(({mappedFrom:R,mappedTo:P,from:$,to:z},q)=>this.getLinkMarksInRange(p,R,P,!0).filter(Y=>Y.mark.type===this.type).forEach(Y=>{const J=t.doc.textBetween($,z,void 0," "),K=p.textBetween(Y.from,Y.to+1,void 0," ").trim(),ee=this.isValidUrl(J);this.isValidUrl(K)||(ee&&(v({from:Y.from,to:Y.to}).tr(),_.splice(q,1)),!E&&C===k&&this.findAutoLinks(K).map(ne=>this.addLinkProperties({...ne,from:R+ne.start,to:R+ne.end})).forEach(({attrs:ne,range:oe,text:fe})=>{m(ne,oe).tr(),T.push({attrs:ne,range:oe,text:fe})}))})),this.findTextBlocksInRange(p,{from:C,to:k}).forEach(({text:R,positionStart:P})=>{this.findAutoLinks(R).map($=>this.addLinkProperties({...$,from:P+$.start+1,to:P+$.end+1})).filter(({range:$})=>{const z=C>=$.from&&C<=$.to,q=k>=$.from&&k<=$.to;return z||q||E}).filter(({range:$})=>this.getLinkMarksInRange(f.doc,$.from,$.to,!1).length===0).filter(({range:{from:$},text:z})=>!_.some(({text:q,mappedFrom:Y})=>Y===$&&q===z)).forEach(({attrs:$,text:z,range:q})=>{m($,q).tr(),T.push({attrs:$,range:q,text:z})})}),window.requestAnimationFrame(()=>{T.forEach(({attrs:R,range:P,text:$})=>{const{doc:z,selection:q}=f;this.options.onUpdateLink($,{attrs:R,doc:z,range:P,selection:q})})})}),f.steps.length!==0)return f}}}buildHref(e){return this.options.extractHref({url:e,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(e,t,n,r){const o=[];if(t===n){const i=Math.max(t-1,0),a=e.resolve(i),s=lc(a,this.type);s?.mark.attrs.auto===r&&o.push(s)}else e.nodesBetween(t,n,(i,a)=>{const c=(i.marks??[]).find(({type:f,attrs:p})=>f===this.type&&p.auto===r);c&&o.push({from:a,to:a+i.nodeSize,mark:c,text:i.textContent})});return o}findTextBlocksInRange(e,t){const n=[];return e.nodesBetween(t.from,t.to,(r,o)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:o})}),n.map(r=>({text:e.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:e,to:t,href:n,...r}){return{...r,range:{from:e,to:t},attrs:{href:n,auto:!0}}}findAutoLinks(e){if(this.options.findAutoLinks)return this.options.findAutoLinks(e,this.options.defaultProtocol);const t=[];for(const n of nv(e,this.options.autoLinkRegex)){const r=cc(n);if(!r)continue;const o=this.buildHref(r);!this.isValidTLD(o)&&!o.startsWith("tel:")||t.push({text:r,href:o,start:n.index,end:n.index+r.length})}return t}isValidUrl(e){var t;return this.options.isValidUrl?this.options.isValidUrl(e,this.options.defaultProtocol):this.isValidTLD(this.buildHref(e))&&!!((t=this._autoLinkRegexNonGlobal)!=null&&t.test(e))}isValidTLD(e){const{autoLinkAllowedTLDs:t}=this.options;if(t.length===0)return!0;const n=dVe(e);if(n==="")return!0;const r=oz(n.split("."));return t.includes(r)}};db([co({shortcut:on.InsertLink})],tf.prototype,"shortcut",1),db([Cn()],tf.prototype,"updateLink",1),db([Cn()],tf.prototype,"selectLink",1),db([Cn()],tf.prototype,"removeLink",1),tf=db([dr({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:mVe,autoLinkAllowedTLDs:pVe,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:gVe},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:Fr.Medium})],tf);function gVe({url:e,defaultProtocol:t}){const n=/^((?:https?|ftp)?:)\/\//.test(e);return!n&&e.includes("@")?`mailto:${e}`:n?e:`${t}//${e}`}var vVe=CO;CO.displayName="json",CO.aliases=["webmanifest"];function CO(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}var bVe=ro(vVe),yVe=SO;SO.displayName="markdown",SO.aliases=["md"];function SO(e){(function(t){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(m){return m=m.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var o=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return o}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(o),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(o),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(v){m!==v&&(t.languages.markdown[m].inside.content.inside[v]=t.languages.markdown[v])})}),t.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function v(y){if(!(!y||typeof y=="string"))for(var w=0,C=y.length;w<C;w++){var k=y[w];if(k.type!=="code"){v(k.content);continue}var T=k.content[1],E=k.content[3];if(T&&E&&T.type==="code-language"&&E.type==="code-block"&&typeof T.content=="string"){var _=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");_=(/[a-z][\w-]*/i.exec(_)||[""])[0].toLowerCase();var R="language-"+_;E.alias?typeof E.alias=="string"?E.alias=[E.alias,R]:E.alias.push(R):E.alias=[R]}}}v(m.tokens)}),t.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var v="",y=0,w=m.classes.length;y<w;y++){var C=m.classes[y],k=/language-(.+)/.exec(C);if(k){v=k[1];break}}var T=t.languages[v];if(T)m.content=t.highlight(p(m.content.value),T,v);else if(v&&v!=="none"&&t.plugins.autoloader){var E="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=E,t.plugins.autoloader.loadLanguages(v,function(){var _=document.getElementById(E);_&&(_.innerHTML=t.highlight(_.textContent,t.languages[v],v))})}}});var s=RegExp(t.languages.markup.tag.pattern.source,"gi"),c={amp:"&",lt:"<",gt:">",quot:'"'},f=String.fromCodePoint||String.fromCharCode;function p(m){var v=m.replace(s,"");return v=v.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(y,w){if(w=w.toLowerCase(),w[0]==="#"){var C;return w[1]==="x"?C=parseInt(w.slice(2),16):C=Number(w.slice(1)),f(C)}else{var k=c[w];return k||y}}),v}t.languages.md=t.languages.markdown})(e)}var xVe=ro(yVe),wVe=kO;kO.displayName="typescript",kO.aliases=["ts"];function kO(e){(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),t.languages.ts=t.languages.typescript})(e)}var CVe=ro(wVe);const SVe=new qd({}),kVe=new eb,EVe=new tb,TVe=new Dw({}),DVe=new UA,AVe=new nb,OVe=new Rs({supportedLanguages:[s7e,c7e,bVe,xVe,CVe]}),MVe=new JA,PVe=new yO,NVe=new Zv({}),_Ve=new Jv,RVe=new xO({}),IVe=new ui({}),LVe=new Nw({}),$Ve=new tf({autoLink:!0,openLinkOnClick:!0}),FVe=new ub({enableResizing:!0}),BVe=new Ew({autoUpdate:!0,defaultDirection:"rtl"}),zVe=()=>[SVe,BVe,$Ve,FVe,kVe,EVe,TVe,DVe,OVe,AVe,MVe,PVe,NVe,_Ve,RVe,LVe,IVe];function UH({iconSize:e=18,type:t,level:n}){const r=vc().heading({level:n}),{toggleHeading:o}=_s();function i(){o.enabled({level:n})&&o({level:n})}return mt(is,{type:t,isActive:r,onClick:i,disabled:!o.enabled({level:n}),children:[n,W(r6e,{size:e})]})}function VVe(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z",fill:"currentColor"}}]})(e)}function HVe({iconSize:e=18,type:t}){const n=Q$e().link()?.href??"",[r,o]=Tn(n),[i,a]=Tn(!1),s=vc().link(),c=eFe(),f=Yt();function p(){a(!1)}function m(){r||c.selectLink(),a(!0)}function v(){c.removeLink().focus().run(),o(null),a(!1)}function y(w){w.keyCode===13&&(r===""?(c.removeLink(),a(!1)):(c.updateLink({href:r}),a(!1)),c.run()),w.keyCode===27&&a(!1)}return mt(Or,{children:[W(is,{isActive:s,onClick:m,type:t,ref:f,children:W(i6e,{size:e})}),W(WR,{open:i,anchorEl:f.current,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"left"},className:"kd-popover",children:mt("div",{className:"kd-popover__link-url",children:[W(VVe,{size:e,className:"kd-popover__link-url__close-icon",onClick:v}),W(Km,{label:"\u0622\u062F\u0631\u0633 \u0644\u06CC\u0646\u06A9",className:"toggle-link-handler__href-input",onKeyUp:w=>y(w),onChange:w=>o(w.target.value),defaultValue:r})]})})]})}const jVe=[{name:"offset",options:{offset:[0,8]}}];function WVe(){const[e,t]=Tn(null),{ref:n,x:r,y:o,width:i,height:a,active:s}=JFe(()=>BA("selection"),[]),c=Ur(()=>({position:"absolute",pointerEvents:"none",left:r,top:o,width:i,height:a}),[r,o,i,a]),f=Zn(p=>{t(p),n?.(p)},[n]);return W("div",{ref:f,style:c,children:mt(Qf,{className:"kd-floating-toolbar",placement:"top",open:s,anchorEl:e,modifiers:jVe,children:[mt(Or,{children:[W(HVe,{iconSize:16,type:"flat"}),W(_V,{iconSize:16,type:"flat"}),W(RV,{iconSize:16,type:"flat"}),W(IV,{iconSize:16,type:"flat"})]}),mt(Or,{children:[W(UH,{iconSize:16,type:"flat",level:1}),W(UH,{iconSize:16,type:"flat",level:2})]})]})})}const YVe=({onChange:e,defaultValue:t,style:n,toolbar:r=["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","BULLET_LIST","ORDERED_LIST","TASK_LIST","RIGHT_ALIGN","CENTER_ALIGN","LEFT_ALIGN"],...o})=>{const{manager:i,state:a}=fFe({extensions:zVe,selection:"start"}),s=W1({content:c1.unescape(t??""),schema:a.schema});return W("div",{style:{height:"300px",...n},...o,children:W("div",{className:"remirror-theme kd-editor",children:mt(mFe,{manager:i,initialContent:s,children:[W(C6e,{toolbar:r}),W(jA,{}),W(WVe,{}),W(hFe,{onChange:c=>{e&&e(c1.escape(c))}})]})})})},UVe=Na`
|
|
1343
1343
|
from { transform: rotate(0deg); }
|
|
1344
1344
|
to { transform: rotate(360deg); }
|
|
1345
|
-
`,
|
|
1345
|
+
`,qVe=hi("figure")(`
|
|
1346
1346
|
position: relative;
|
|
1347
1347
|
display: inline-block;
|
|
1348
1348
|
width: auto;
|
|
@@ -1380,7 +1380,7 @@ Message: ${e}`),e}}const gu=e=>typeof e=="string",A3e=e=>typeof e=="function",B7
|
|
|
1380
1380
|
border-top-color: #333;
|
|
1381
1381
|
border-right-color: #333;
|
|
1382
1382
|
border-bottom-color: #333;
|
|
1383
|
-
animation: ${
|
|
1383
|
+
animation: ${UVe} 2s linear infinite;
|
|
1384
1384
|
opacity: 1;
|
|
1385
1385
|
transition: opacity 0.2s ease-in-out;
|
|
1386
1386
|
z-index: 2;
|
|
@@ -1398,17 +1398,17 @@ Message: ${e}`),e}}const gu=e=>typeof e=="string",A3e=e=>typeof e=="function",B7
|
|
|
1398
1398
|
opacity: 0;
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
|
-
`),
|
|
1401
|
+
`),KVe=hi("p")(`
|
|
1402
1402
|
width: 100%;
|
|
1403
1403
|
text-align: center;
|
|
1404
1404
|
border: 1px solid #f8f8f8;
|
|
1405
1405
|
padding: 8px 16px;
|
|
1406
1406
|
border-radius: 8px;
|
|
1407
1407
|
color: #555;
|
|
1408
|
-
`),
|
|
1408
|
+
`),GVe=hi("img")(`
|
|
1409
1409
|
transition: opacity 0.8s;
|
|
1410
1410
|
display: block;
|
|
1411
|
-
`);function KVe({zoom:e="200",alt:t="This is an imageZoom image",src:n,onError:r,className:o,errorContent:i=W(UVe,{children:"There was a problem loading your image"}),...a}){const[s,c]=Tn("1"),[f,p]=Tn("50% 50%"),[m,v]=Tn(null),[y,w]=Tn(!1),C=m?"loaded":"loading",k=s==="0"?"zoomed":"fullView",[T,E]=Tn(!1),_=q=>{const Y=q.currentTarget.getBoundingClientRect();let J,K;if(q.type==="touchmove"){T||(E(!0),document.body.style.overflow="hidden");const ee=q.touches[0];J=(ee.clientX-Y.x)/Y.width*100,K=(ee.clientY-Y.y)/Y.height*100}else J=(q.clientX-Y.x)/Y.width*100,K=(q.clientY-Y.y)/Y.height*100;p(`${Math.max(0,Math.min(J,100))}% ${Math.max(0,Math.min(K,100))}%`)},R=q=>{s==="0"?c("1"):(c("0"),_(q))},P=q=>{R(q)},$=q=>{s==="0"&&_(q)},z=()=>{c("1"),p("50% 50%"),T&&(E(!1),document.body.style.overflow="initial")};return dn(()=>{if(v(null),n===""||n===null)throw new Error("Prop src must be defined when using ImageZoom component!");c("0");const q=new Image;q.addEventListener("load",()=>{setTimeout(()=>{c("1"),v(q.src)},200)}),q.addEventListener("error",Y=>{w(!0),r&&r(Y)}),n&&(q.src=n)},[n,r]),y?W(Or,{children:i}):W(YVe,{className:[C,k,o].join(" "),style:{backgroundImage:`url( ${s==="0"&&m?m:""} )`,backgroundSize:e+"%",backgroundPosition:f},onClick:P,onMouseMove:$,onMouseLeave:z,onTouchStart:P,onTouchMove:$,onTouchEnd:z,...a,children:m&&W(qVe,{id:"imageZoom",src:m,alt:t,style:{opacity:s},...a})})}const GVe=hi("img")(),XVe=hi("div")(),ZVe=hi(qE)(),JVe=({src:e,quality:t="LOW",zoomable:n,loading:r="lazy",...o})=>{const[i,a]=Tn();dn(()=>{e===void 0?a(void 0):Array.isArray(e)?a(e[0]):a(e)},[e]);const s=f=>Array.isArray(e)?W(qI,{overlap:"circular",badgeContent:e.length,color:"primary",anchorOrigin:{vertical:"top",horizontal:"right"},children:f.children}):W(Or,{children:f.children}),c=f=>f==="small"?o.basePath?.basePathThumbnail?o.basePath?.basePathThumbnail+i:i:o.basePath?.basePathStream?o.basePath?.basePathStream+i:i;return i?W(s,{children:o.modal===!0?W(ZVe,{...o,loading:r,small:c(t==="HIGH"?"large":"small"),medium:c("large"),large:c("large"),hideZoom:!0}):n===!0?W(KVe,{...o,src:c(t==="HIGH"?"large":"small")}):W(GVe,{...o,loading:r,onError:f=>{f.onerror=null,!(f?.target?.src??"").endsWith(c("small"))&&(f.target.src=c("small"))},src:c(t==="HIGH"?"large":"small")})}):W(XVe,{sx:{...o?.style,...o?.sx},children:W(LV,{style:{color:"gray",height:"100%",width:"100%"}})})};function hr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Mp(e,t=[]){let n=[];function r(i,a){const s=kf(a),c=n.length;n=[...n,a];function f(m){const{scope:v,children:y,...w}=m,C=v?.[e][c]||s,k=Ur(()=>w,Object.values(w));return cn(C.Provider,{value:k},y)}function p(m,v){const y=v?.[e][c]||s,w=Sf(y);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return f.displayName=i+"Provider",[f,p]}const o=()=>{const i=n.map(a=>kf(a));return function(s){const c=s?.[e]||i;return Ur(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,QVe(o,...t)]}function QVe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:f})=>{const m=c(i)[`__scope${f}`];return{...s,...m}},{});return Ur(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function eHe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function EO(...e){return t=>e.forEach(n=>eHe(n,t))}function Aa(...e){return Zn(EO(...e),e)}const fb=or((e,t)=>{const{children:n,...r}=e,o=zu.toArray(n),i=o.find(nHe);if(i){const a=i.props.children,s=o.map(c=>c===i?zu.count(a)>1?zu.only(null):Ki(a)?a.props.children:null:c);return cn(TO,V({},r,{ref:t}),Ki(a)?Ws(a,void 0,s):null)}return cn(TO,V({},r,{ref:t}),n)});fb.displayName="Slot";const TO=or((e,t)=>{const{children:n,...r}=e;return Ki(n)?Ws(n,{...rHe(r,n.props),ref:t?EO(t,n.ref):n.ref}):zu.count(n)>1?zu.only(null):null});TO.displayName="SlotClone";const tHe=({children:e})=>cn(Q2,null,e);function nHe(e){return Ki(e)&&e.type===tHe}function rHe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function DO(e){const t=e+"CollectionProvider",[n,r]=Mp(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:w,children:C}=y,k=Pt.useRef(null),T=Pt.useRef(new Map).current;return Pt.createElement(o,{scope:w,itemMap:T,collectionRef:k},C)},s=e+"CollectionSlot",c=Pt.forwardRef((y,w)=>{const{scope:C,children:k}=y,T=i(s,C),E=Aa(w,T.collectionRef);return Pt.createElement(fb,{ref:E},k)}),f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Pt.forwardRef((y,w)=>{const{scope:C,children:k,...T}=y,E=Pt.useRef(null),_=Aa(w,E),R=i(f,C);return Pt.useEffect(()=>(R.itemMap.set(E,{ref:E,...T}),()=>void R.itemMap.delete(E))),Pt.createElement(fb,{[p]:"",ref:_},k)});function v(y){const w=i(e+"CollectionConsumer",y);return Pt.useCallback(()=>{const k=w.collectionRef.current;if(!k)return[];const T=Array.from(k.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((R,P)=>T.indexOf(R.ref.current)-T.indexOf(P.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:c,ItemSlot:m},v,r]}const Pp=globalThis?.document?Nl:()=>{},oHe=A.useId||(()=>{});let iHe=0;function nf(e){const[t,n]=A.useState(oHe());return Pp(()=>{e||n(r=>r??String(iHe++))},[e]),e||(t?`radix-${t}`:"")}const aHe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ui=aHe.reduce((e,t)=>{const n=or((r,o)=>{const{asChild:i,...a}=r,s=i?fb:t;return dn(()=>{window[Symbol.for("radix-ui")]=!0},[]),cn(s,V({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function sHe(e,t){e&&ly(()=>e.dispatchEvent(t))}function Is(e){const t=Yt(e);return dn(()=>{t.current=e}),Ur(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Rw({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=lHe({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Is(n),c=Zn(f=>{if(i){const m=typeof f=="function"?f(e):f;m!==e&&s(m)}else o(f)},[i,e,o,s]);return[a,c]}function lHe({defaultProp:e,onChange:t}){const n=Tn(e),[r]=n,o=Yt(r),i=Is(t);return dn(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const cHe=kf(void 0);function Iw(e){const t=Sf(cHe);return e||t||"ltr"}const AO="rovingFocusGroup.onEntryFocus",uHe={bubbles:!1,cancelable:!0},OO="RovingFocusGroup",[MO,qH,dHe]=DO(OO),[fHe,Np]=Mp(OO,[dHe]),[hHe,pHe]=fHe(OO),mHe=or((e,t)=>cn(MO.Provider,{scope:e.__scopeRovingFocusGroup},cn(MO.Slot,{scope:e.__scopeRovingFocusGroup},cn(gHe,V({},e,{ref:t}))))),gHe=or((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:f,...p}=e,m=Yt(null),v=Aa(t,m),y=Iw(i),[w=null,C]=Rw({prop:a,defaultProp:s,onChange:c}),[k,T]=Tn(!1),E=Is(f),_=qH(n),R=Yt(!1),[P,$]=Tn(0);return dn(()=>{const z=m.current;if(z)return z.addEventListener(AO,E),()=>z.removeEventListener(AO,E)},[E]),cn(hHe,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:w,onItemFocus:Zn(z=>C(z),[C]),onItemShiftTab:Zn(()=>T(!0),[]),onFocusableItemAdd:Zn(()=>$(z=>z+1),[]),onFocusableItemRemove:Zn(()=>$(z=>z-1),[])},cn(Ui.div,V({tabIndex:k||P===0?-1:0,"data-orientation":r},p,{ref:v,style:{outline:"none",...e.style},onMouseDown:hr(e.onMouseDown,()=>{R.current=!0}),onFocus:hr(e.onFocus,z=>{const q=!R.current;if(z.target===z.currentTarget&&q&&!k){const Y=new CustomEvent(AO,uHe);if(z.currentTarget.dispatchEvent(Y),!Y.defaultPrevented){const J=_().filter(oe=>oe.focusable),K=J.find(oe=>oe.active),ee=J.find(oe=>oe.id===w),ne=[K,ee,...J].filter(Boolean).map(oe=>oe.ref.current);KH(ne)}}R.current=!1}),onBlur:hr(e.onBlur,()=>T(!1))})))}),vHe="RovingFocusGroupItem",bHe=or((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=nf(),c=i||s,f=pHe(vHe,n),p=f.currentTabStopId===c,m=qH(n),{onFocusableItemAdd:v,onFocusableItemRemove:y}=f;return dn(()=>{if(r)return v(),()=>y()},[r,v,y]),cn(MO.ItemSlot,{scope:n,id:c,focusable:r,active:o},cn(Ui.span,V({tabIndex:p?0:-1,"data-orientation":f.orientation},a,{ref:t,onMouseDown:hr(e.onMouseDown,w=>{r?f.onItemFocus(c):w.preventDefault()}),onFocus:hr(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:hr(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const C=wHe(w,f.orientation,f.dir);if(C!==void 0){w.preventDefault();let T=m().filter(E=>E.focusable).map(E=>E.ref.current);if(C==="last")T.reverse();else if(C==="prev"||C==="next"){C==="prev"&&T.reverse();const E=T.indexOf(w.currentTarget);T=f.loop?CHe(T,E+1):T.slice(E+1)}setTimeout(()=>KH(T))}})})))}),yHe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xHe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function wHe(e,t,n){const r=xHe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yHe[r]}function KH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function CHe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const PO=mHe,NO=bHe;function SHe(e,t){return J2((n,r)=>{const o=t[n][r];return o??n},e)}const hb=e=>{const{present:t,children:n}=e,r=kHe(t),o=typeof n=="function"?n({present:r.isPresent}):zu.only(n),i=Aa(r.ref,o.ref);return typeof n=="function"||r.isPresent?Ws(o,{ref:i}):null};hb.displayName="Presence";function kHe(e){const[t,n]=Tn(),r=Yt({}),o=Yt(e),i=Yt("none"),a=e?"mounted":"unmounted",[s,c]=SHe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return dn(()=>{const f=Lw(r.current);i.current=s==="mounted"?f:"none"},[s]),Pp(()=>{const f=r.current,p=o.current;if(p!==e){const v=i.current,y=Lw(f);e?c("MOUNT"):y==="none"||f?.display==="none"?c("UNMOUNT"):c(p&&v!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pp(()=>{if(t){const f=m=>{const y=Lw(r.current).includes(m.animationName);m.target===t&&y&&ly(()=>c("ANIMATION_END"))},p=m=>{m.target===t&&(i.current=Lw(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Zn(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function Lw(e){return e?.animationName||"none"}const GH="Tabs",[EHe,AUe]=Mp(GH,[Np]),XH=Np(),[THe,_O]=EHe(GH),DHe=or((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:c="automatic",...f}=e,p=Iw(s),[m,v]=Rw({prop:r,onChange:o,defaultProp:i});return cn(THe,{scope:n,baseId:nf(),value:m,onValueChange:v,orientation:a,dir:p,activationMode:c},cn(Ui.div,V({dir:p,"data-orientation":a},f,{ref:t})))}),AHe="TabsList",OHe=or((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=_O(AHe,n),a=XH(n);return cn(PO,V({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),cn(Ui.div,V({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),MHe="TabsTrigger",PHe=or((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=_O(MHe,n),s=XH(n),c=ZH(a.baseId,r),f=JH(a.baseId,r),p=r===a.value;return cn(NO,V({asChild:!0},s,{focusable:!o,active:p}),cn(Ui.button,V({type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c},i,{ref:t,onMouseDown:hr(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?a.onValueChange(r):m.preventDefault()}),onKeyDown:hr(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(r)}),onFocus:hr(e.onFocus,()=>{const m=a.activationMode!=="manual";!p&&!o&&m&&a.onValueChange(r)})})))}),NHe="TabsContent",_He=or((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=_O(NHe,n),c=ZH(s.baseId,r),f=JH(s.baseId,r),p=r===s.value,m=Yt(p);return dn(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),cn(hb,{present:o||p},({present:v})=>cn(Ui.div,V({"data-state":p?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!v,id:f,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0}}),v&&i))});function ZH(e,t){return`${e}-trigger-${t}`}function JH(e,t){return`${e}-content-${t}`}const RHe=DHe,IHe=OHe,LHe=PHe,$He=_He,FHe=hi(RHe)();function BHe({children:e,...t}){return W(FHe,{dir:"rtl",className:"KdTabsRoot",...t,children:e})}const zHe=hi(IHe)();function VHe({children:e,...t}){return W(OE,{children:W(zHe,{className:"KdTabsList",...t,children:e})})}const HHe=hi($He)();function jHe({children:e,...t}){return W(HHe,{className:"KdTabsContent",...t,children:e})}const WHe=Xe(LHe)`
|
|
1411
|
+
`);function XVe({zoom:e="200",alt:t="This is an imageZoom image",src:n,onError:r,className:o,errorContent:i=W(KVe,{children:"There was a problem loading your image"}),...a}){const[s,c]=Tn("1"),[f,p]=Tn("50% 50%"),[m,v]=Tn(null),[y,w]=Tn(!1),C=m?"loaded":"loading",k=s==="0"?"zoomed":"fullView",[T,E]=Tn(!1),_=q=>{const Y=q.currentTarget.getBoundingClientRect();let J,K;if(q.type==="touchmove"){T||(E(!0),document.body.style.overflow="hidden");const ee=q.touches[0];J=(ee.clientX-Y.x)/Y.width*100,K=(ee.clientY-Y.y)/Y.height*100}else J=(q.clientX-Y.x)/Y.width*100,K=(q.clientY-Y.y)/Y.height*100;p(`${Math.max(0,Math.min(J,100))}% ${Math.max(0,Math.min(K,100))}%`)},R=q=>{s==="0"?c("1"):(c("0"),_(q))},P=q=>{R(q)},$=q=>{s==="0"&&_(q)},z=()=>{c("1"),p("50% 50%"),T&&(E(!1),document.body.style.overflow="initial")};return dn(()=>{if(v(null),n===""||n===null)throw new Error("Prop src must be defined when using ImageZoom component!");c("0");const q=new Image;q.addEventListener("load",()=>{setTimeout(()=>{c("1"),v(q.src)},200)}),q.addEventListener("error",Y=>{w(!0),r&&r(Y)}),n&&(q.src=n)},[n,r]),y?W(Or,{children:i}):W(qVe,{className:[C,k,o].join(" "),style:{backgroundImage:`url( ${s==="0"&&m?m:""} )`,backgroundSize:e+"%",backgroundPosition:f},onClick:P,onMouseMove:$,onMouseLeave:z,onTouchStart:P,onTouchMove:$,onTouchEnd:z,...a,children:m&&W(GVe,{id:"imageZoom",src:m,alt:t,style:{opacity:s},...a})})}const ZVe=hi("img")(),JVe=hi("div")(),QVe=hi(qE)(),eHe=({src:e,quality:t="LOW",zoomable:n,loading:r="lazy",...o})=>{const[i,a]=Tn();dn(()=>{e===void 0?a(void 0):Array.isArray(e)?a(e[0]):a(e)},[e]);const s=f=>Array.isArray(e)?W(qI,{overlap:"circular",badgeContent:e.length,color:"primary",anchorOrigin:{vertical:"top",horizontal:"right"},children:f.children}):W(Or,{children:f.children}),c=f=>f==="small"?o.basePath?.basePathThumbnail?o.basePath?.basePathThumbnail+i:i:o.basePath?.basePathStream?o.basePath?.basePathStream+i:i;return i?W(s,{children:o.modal===!0?W(QVe,{...o,loading:r,small:c(t==="HIGH"?"large":"small"),medium:c("large"),large:c("large"),hideZoom:!0}):n===!0?W(XVe,{...o,src:c(t==="HIGH"?"large":"small")}):W(ZVe,{...o,loading:r,onError:f=>{f.onerror=null,!(f?.target?.src??"").endsWith(c("small"))&&(f.target.src=c("small"))},src:c(t==="HIGH"?"large":"small")})}):W(JVe,{sx:{...o?.style,...o?.sx},children:W(LV,{style:{color:"gray",height:"100%",width:"100%"}})})};function hr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Mp(e,t=[]){let n=[];function r(i,a){const s=kf(a),c=n.length;n=[...n,a];function f(m){const{scope:v,children:y,...w}=m,C=v?.[e][c]||s,k=Ur(()=>w,Object.values(w));return cn(C.Provider,{value:k},y)}function p(m,v){const y=v?.[e][c]||s,w=Sf(y);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${i}\``)}return f.displayName=i+"Provider",[f,p]}const o=()=>{const i=n.map(a=>kf(a));return function(s){const c=s?.[e]||i;return Ur(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,tHe(o,...t)]}function tHe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:f})=>{const m=c(i)[`__scope${f}`];return{...s,...m}},{});return Ur(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function nHe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function EO(...e){return t=>e.forEach(n=>nHe(n,t))}function Aa(...e){return Zn(EO(...e),e)}const fb=or((e,t)=>{const{children:n,...r}=e,o=zu.toArray(n),i=o.find(oHe);if(i){const a=i.props.children,s=o.map(c=>c===i?zu.count(a)>1?zu.only(null):Ki(a)?a.props.children:null:c);return cn(TO,V({},r,{ref:t}),Ki(a)?Ws(a,void 0,s):null)}return cn(TO,V({},r,{ref:t}),n)});fb.displayName="Slot";const TO=or((e,t)=>{const{children:n,...r}=e;return Ki(n)?Ws(n,{...iHe(r,n.props),ref:t?EO(t,n.ref):n.ref}):zu.count(n)>1?zu.only(null):null});TO.displayName="SlotClone";const rHe=({children:e})=>cn(Q2,null,e);function oHe(e){return Ki(e)&&e.type===rHe}function iHe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function DO(e){const t=e+"CollectionProvider",[n,r]=Mp(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=y=>{const{scope:w,children:C}=y,k=Pt.useRef(null),T=Pt.useRef(new Map).current;return Pt.createElement(o,{scope:w,itemMap:T,collectionRef:k},C)},s=e+"CollectionSlot",c=Pt.forwardRef((y,w)=>{const{scope:C,children:k}=y,T=i(s,C),E=Aa(w,T.collectionRef);return Pt.createElement(fb,{ref:E},k)}),f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Pt.forwardRef((y,w)=>{const{scope:C,children:k,...T}=y,E=Pt.useRef(null),_=Aa(w,E),R=i(f,C);return Pt.useEffect(()=>(R.itemMap.set(E,{ref:E,...T}),()=>void R.itemMap.delete(E))),Pt.createElement(fb,{[p]:"",ref:_},k)});function v(y){const w=i(e+"CollectionConsumer",y);return Pt.useCallback(()=>{const k=w.collectionRef.current;if(!k)return[];const T=Array.from(k.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((R,P)=>T.indexOf(R.ref.current)-T.indexOf(P.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:c,ItemSlot:m},v,r]}const Pp=globalThis?.document?Nl:()=>{},aHe=A.useId||(()=>{});let sHe=0;function nf(e){const[t,n]=A.useState(aHe());return Pp(()=>{e||n(r=>r??String(sHe++))},[e]),e||(t?`radix-${t}`:"")}const lHe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ui=lHe.reduce((e,t)=>{const n=or((r,o)=>{const{asChild:i,...a}=r,s=i?fb:t;return dn(()=>{window[Symbol.for("radix-ui")]=!0},[]),cn(s,V({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cHe(e,t){e&&ly(()=>e.dispatchEvent(t))}function Is(e){const t=Yt(e);return dn(()=>{t.current=e}),Ur(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Rw({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=uHe({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=Is(n),c=Zn(f=>{if(i){const m=typeof f=="function"?f(e):f;m!==e&&s(m)}else o(f)},[i,e,o,s]);return[a,c]}function uHe({defaultProp:e,onChange:t}){const n=Tn(e),[r]=n,o=Yt(r),i=Is(t);return dn(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const dHe=kf(void 0);function Iw(e){const t=Sf(dHe);return e||t||"ltr"}const AO="rovingFocusGroup.onEntryFocus",fHe={bubbles:!1,cancelable:!0},OO="RovingFocusGroup",[MO,qH,hHe]=DO(OO),[pHe,Np]=Mp(OO,[hHe]),[mHe,gHe]=pHe(OO),vHe=or((e,t)=>cn(MO.Provider,{scope:e.__scopeRovingFocusGroup},cn(MO.Slot,{scope:e.__scopeRovingFocusGroup},cn(bHe,V({},e,{ref:t}))))),bHe=or((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:f,...p}=e,m=Yt(null),v=Aa(t,m),y=Iw(i),[w=null,C]=Rw({prop:a,defaultProp:s,onChange:c}),[k,T]=Tn(!1),E=Is(f),_=qH(n),R=Yt(!1),[P,$]=Tn(0);return dn(()=>{const z=m.current;if(z)return z.addEventListener(AO,E),()=>z.removeEventListener(AO,E)},[E]),cn(mHe,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:w,onItemFocus:Zn(z=>C(z),[C]),onItemShiftTab:Zn(()=>T(!0),[]),onFocusableItemAdd:Zn(()=>$(z=>z+1),[]),onFocusableItemRemove:Zn(()=>$(z=>z-1),[])},cn(Ui.div,V({tabIndex:k||P===0?-1:0,"data-orientation":r},p,{ref:v,style:{outline:"none",...e.style},onMouseDown:hr(e.onMouseDown,()=>{R.current=!0}),onFocus:hr(e.onFocus,z=>{const q=!R.current;if(z.target===z.currentTarget&&q&&!k){const Y=new CustomEvent(AO,fHe);if(z.currentTarget.dispatchEvent(Y),!Y.defaultPrevented){const J=_().filter(oe=>oe.focusable),K=J.find(oe=>oe.active),ee=J.find(oe=>oe.id===w),ne=[K,ee,...J].filter(Boolean).map(oe=>oe.ref.current);KH(ne)}}R.current=!1}),onBlur:hr(e.onBlur,()=>T(!1))})))}),yHe="RovingFocusGroupItem",xHe=or((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=nf(),c=i||s,f=gHe(yHe,n),p=f.currentTabStopId===c,m=qH(n),{onFocusableItemAdd:v,onFocusableItemRemove:y}=f;return dn(()=>{if(r)return v(),()=>y()},[r,v,y]),cn(MO.ItemSlot,{scope:n,id:c,focusable:r,active:o},cn(Ui.span,V({tabIndex:p?0:-1,"data-orientation":f.orientation},a,{ref:t,onMouseDown:hr(e.onMouseDown,w=>{r?f.onItemFocus(c):w.preventDefault()}),onFocus:hr(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:hr(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){f.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const C=SHe(w,f.orientation,f.dir);if(C!==void 0){w.preventDefault();let T=m().filter(E=>E.focusable).map(E=>E.ref.current);if(C==="last")T.reverse();else if(C==="prev"||C==="next"){C==="prev"&&T.reverse();const E=T.indexOf(w.currentTarget);T=f.loop?kHe(T,E+1):T.slice(E+1)}setTimeout(()=>KH(T))}})})))}),wHe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CHe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function SHe(e,t,n){const r=CHe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wHe[r]}function KH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kHe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const PO=vHe,NO=xHe;function EHe(e,t){return J2((n,r)=>{const o=t[n][r];return o??n},e)}const hb=e=>{const{present:t,children:n}=e,r=THe(t),o=typeof n=="function"?n({present:r.isPresent}):zu.only(n),i=Aa(r.ref,o.ref);return typeof n=="function"||r.isPresent?Ws(o,{ref:i}):null};hb.displayName="Presence";function THe(e){const[t,n]=Tn(),r=Yt({}),o=Yt(e),i=Yt("none"),a=e?"mounted":"unmounted",[s,c]=EHe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return dn(()=>{const f=Lw(r.current);i.current=s==="mounted"?f:"none"},[s]),Pp(()=>{const f=r.current,p=o.current;if(p!==e){const v=i.current,y=Lw(f);e?c("MOUNT"):y==="none"||f?.display==="none"?c("UNMOUNT"):c(p&&v!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Pp(()=>{if(t){const f=m=>{const y=Lw(r.current).includes(m.animationName);m.target===t&&y&&ly(()=>c("ANIMATION_END"))},p=m=>{m.target===t&&(i.current=Lw(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Zn(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function Lw(e){return e?.animationName||"none"}const GH="Tabs",[DHe,MUe]=Mp(GH,[Np]),XH=Np(),[AHe,_O]=DHe(GH),OHe=or((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",dir:s,activationMode:c="automatic",...f}=e,p=Iw(s),[m,v]=Rw({prop:r,onChange:o,defaultProp:i});return cn(AHe,{scope:n,baseId:nf(),value:m,onValueChange:v,orientation:a,dir:p,activationMode:c},cn(Ui.div,V({dir:p,"data-orientation":a},f,{ref:t})))}),MHe="TabsList",PHe=or((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=_O(MHe,n),a=XH(n);return cn(PO,V({asChild:!0},a,{orientation:i.orientation,dir:i.dir,loop:r}),cn(Ui.div,V({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),NHe="TabsTrigger",_He=or((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,a=_O(NHe,n),s=XH(n),c=ZH(a.baseId,r),f=JH(a.baseId,r),p=r===a.value;return cn(NO,V({asChild:!0},s,{focusable:!o,active:p}),cn(Ui.button,V({type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c},i,{ref:t,onMouseDown:hr(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?a.onValueChange(r):m.preventDefault()}),onKeyDown:hr(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(r)}),onFocus:hr(e.onFocus,()=>{const m=a.activationMode!=="manual";!p&&!o&&m&&a.onValueChange(r)})})))}),RHe="TabsContent",IHe=or((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...a}=e,s=_O(RHe,n),c=ZH(s.baseId,r),f=JH(s.baseId,r),p=r===s.value,m=Yt(p);return dn(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),cn(hb,{present:o||p},({present:v})=>cn(Ui.div,V({"data-state":p?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!v,id:f,tabIndex:0},a,{ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0}}),v&&i))});function ZH(e,t){return`${e}-trigger-${t}`}function JH(e,t){return`${e}-content-${t}`}const LHe=OHe,$He=PHe,FHe=_He,BHe=IHe,zHe=hi(LHe)();function VHe({children:e,...t}){return W(zHe,{dir:"rtl",className:"KdTabsRoot",...t,children:e})}const HHe=hi($He)();function jHe({children:e,...t}){return W(OE,{children:W(HHe,{className:"KdTabsList",...t,children:e})})}const WHe=hi(BHe)();function YHe({children:e,...t}){return W(WHe,{className:"KdTabsContent",...t,children:e})}const UHe=Xe(FHe)`
|
|
1412
1412
|
font-family: inherit;
|
|
1413
1413
|
background-color: inherit;
|
|
1414
1414
|
width: 50px;
|
|
@@ -1428,11 +1428,11 @@ Message: ${e}`),e}}const gu=e=>typeof e=="string",A3e=e=>typeof e=="function",B7
|
|
|
1428
1428
|
color: ${e=>e?.activeColor??"#7367aa"};
|
|
1429
1429
|
border-bottom: 3px solid ${e=>e?.activeColor??"#7367aa"};
|
|
1430
1430
|
}
|
|
1431
|
-
`;function
|
|
1431
|
+
`;function qHe({children:e,...t}){const r=Er()?.palette?.primary?.main;return W(UHe,{className:"KdTabsTrigger",activeColor:r,...t,children:e})}const KHe=hi("div")();function GHe({currentStep:e,setCurrentStep:t,defaultValue:n,children:r,orientation:o="horizontal",clickSteps:i=!1,showConnector:a=!0,...s}){return dn(()=>{n&&t(typeof n=="string"?parseInt(n):n)},[n]),W(KHe,{...s,className:`${s.className} KdStepRoot ${o==="vertical"?"KdStepRoot_vertical":"KdStepRoot_horizontal"}`,children:r.map((c,f)=>Pt.isValidElement(c)?Pt.cloneElement(c,{orientation:o,currentStep:e,setCurrentStep:t,clickSteps:i,showConnector:a,key:f}):c)})}function XHe({children:e,currentStep:t,setCurrentStep:n,orientation:r="horizontal",clickSteps:o=!0,showConnector:i=!0,...a}){return W(nle,{activeStep:t,orientation:r,...a,connector:W(RI,{sx:{visibility:i?"visible":"hidden"}}),sx:{...a.sx,".MuiStepConnector-lineVertical":{height:"100%"}},className:`${a.className} ${r==="vertical"?"KdStepper_vertical":"KdStepper_horizontal"}`,children:e.map((s,c)=>{if(s)return W(Ase,{active:t===c,completed:t!==void 0?t>c:!1,children:Pt.isValidElement(s)?Pt.cloneElement(s,{orientation:r,currentStep:t,setCurrentStep:n,clickSteps:o,key:c}):s})})})}const ZHe=hi("div")();function JHe({children:e,footer:t=!1,backButtonText:n="\u0642\u0628\u0644\u06CC",nextButtonText:r="\u0628\u0639\u062F\u06CC",index:o,currentStep:i,setCurrentStep:a,onPrev:s,onNext:c,orientation:f="horizontal",...p}){const m=()=>{a&&i!==void 0&&a(i+1)},v=()=>{a&&i!==void 0&&a(i-1)};return i===o?mt(ZHe,{className:f==="horizontal"?"KdStepContent_horizontal":"KdStepContent_vertical",...p,children:[W("div",{children:e}),t&&mt("div",{className:"KdStepContent_Buttons",children:[W(gx,{disabled:i===0,onClick:()=>{s?s():v()},children:n}),W(gx,{variant:"contained",onClick:()=>{c?c():m()},children:r})]})]}):W(Or,{})}function QHe({children:e,index:t,currentStep:n=0,setCurrentStep:r,clickSteps:o=!0,icon:i,completedIcon:a,activeIcon:s,...c}){const f=v=>{r&&r(v)},p=Er();function m(){return n===t?s??a??i:n>t?a??i:i}return W(Yse,{onClick:()=>{o&&f(t)},...c,icon:m(),className:"KdStepLabel",style:{...c?.style,"--primary-main":p.palette.primary.main},children:e})}const eje=or(function(t,n){const r={success:"bg-light-success",info:"bg-light-info",warning:"bg-light-warning",error:"bg-light-danger"}[t.severity??"info"],o=t.className??"d-flex align-items-center mb-50",i=UT.sanitize(t.title??"",{USE_PROFILES:{html:!0}}),a=UT.sanitize(t.children??"",{USE_PROFILES:{html:!0}});return mt(e_,{ref:n,severity:t.severity,className:`${o} ${r}`,children:[t.title&&W(o_,{children:W("div",{dangerouslySetInnerHTML:{__html:i}})}),W("div",{dangerouslySetInnerHTML:{__html:a}})]})});function QH({title:e,children:t,onClose:n,isOpen:r,fullWidth:o=!0,hasHeader:i=!0,backdropClick:a=!0,...s}){return mt(rd,{open:r,onClose:(c,f)=>{f==="backdropClick"&&!a||n?.()},fullWidth:o,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",...s,sx:{"& .MuiDialog-paper":{padding:"20px",...s?.sx}},children:[i&&mt(q_,{id:"alert-dialog-title",variant:"body1",sx:{display:"flex",padding:"0px !important",paddingBottom:"20px !important",fontSize:"16px",fontWeight:600,paddingLeft:"16px",alignItems:"center",justifyContent:"space-between"},children:[W("span",{children:e}),W(Qi,{onClick:n,children:W(h6e,{})})]}),W(Im,{sx:{padding:"1px"},children:t})]})}function ej({type:e="inline",...t}){const n=Ur(()=>e==="inline"?({children:r,isOpen:o,...i})=>W(Or,{children:o&&W(Or,{children:W("div",{...i,children:r})})}):({children:r,isOpen:o,label:i,...a})=>W(QH,{...a,title:i,isOpen:o,hasHeader:!1,sx:{padding:"0px",...a?.sx},children:r}),[e]);return W(n,{...t})}function tje({isOpen:e=!1,children:t,onClose:n,label:r,loading:o=!1,onSubmit:i,...a}){return W(ej,{isOpen:!!e,onClose:n,label:r,...a,children:W(AB,{onSubmit:i,loading:o,formState:a.formState,...a,children:mt("div",{children:[W("header",{style:{padding:"12px",borderBottom:"1px solid #eee"},children:W(qa,{variant:"h6",fontSize:"16px",children:r})}),t]})})})}var nje=pY(tje);function rje({title:e,children:t}){return mt("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[W(qa,{variant:"h6",children:e}),W("div",{style:{display:"flex",flexDirection:"row",gap:"4px"},children:t})]})}function oje(e){return Gt("MuiTreeView",e)}qt("MuiTreeView",["root"]);const tj={instance:null,multiSelect:!1,disabledItemsFocusable:!1,treeId:void 0,icons:{defaultCollapseIcon:null,defaultExpandIcon:null,defaultParentIcon:null,defaultEndIcon:null}},RO=A.createContext(tj);process.env.NODE_ENV!=="production"&&(RO.displayName="TreeViewContext");const ije=(e,t)=>{const n=A.useRef({}),[r,o]=A.useState(()=>{const a={};return e.forEach(s=>{s.models&&Object.entries(s.models).forEach(([c,f])=>{n.current[c]={controlledProp:f.controlledProp,defaultProp:f.defaultProp,isControlled:t[f.controlledProp]!==void 0},a[c]=t[f.defaultProp]})}),a}),i=Object.fromEntries(Object.entries(n.current).map(([a,s])=>{const c=s.isControlled?t[s.controlledProp]:r[a];return[a,{value:c,setValue:f=>{s.isControlled||o(p=>V({},p,{[a]:f}))}}]}));return process.env.NODE_ENV!=="production"&&Object.entries(n.current).forEach(([a,s])=>{const c=t[s.controlledProp],f=t[s.defaultProp];A.useEffect(()=>{s.isControlled!==(c!==void 0)&&console.error([`MUI: A component is changing the ${s.isControlled?"":"un"}controlled ${a} state of TreeView to be ${s.isControlled?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${a} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
1432
1432
|
`))},[c]);const{current:p}=A.useRef(f);A.useEffect(()=>{!s.isControlled&&p!==f&&console.error([`MUI: A component is changing the default ${a} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
|
|
1433
|
-
`))},[JSON.stringify(p)])}),i};class
|
|
1434
|
-
`)))}}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}const IO=(e,t)=>{const n=e.getNode(t),r=e.getNavigableChildrenIds(n.parentId),o=r.indexOf(t);if(o===0)return n.parentId;let i=r[o-1];for(;e.isNodeExpanded(i)&&e.getNavigableChildrenIds(i).length>0;)i=e.getNavigableChildrenIds(i).pop();return i},pb=(e,t)=>{if(e.isNodeExpanded(t)&&e.getNavigableChildrenIds(t).length>0)return e.getNavigableChildrenIds(t)[0];let n=e.getNode(t);for(;n!=null;){const r=e.getNavigableChildrenIds(n.parentId),o=r[r.indexOf(n.id)+1];if(o)return o;n=e.getNode(n.parentId)}return null},LO=e=>{let t=e.getNavigableChildrenIds(null).pop();for(;e.isNodeExpanded(t);)t=e.getNavigableChildrenIds(t).pop();return t},$O=e=>e.getNavigableChildrenIds(null)[0],_p=(e,t)=>{Object.assign(e,t)},ije=e=>e.isPropagationStopped!==void 0,aje=({instance:e})=>{const[t]=A.useState(()=>new oje),n=A.useCallback((...o)=>{const[i,a,s={}]=o;s.defaultMuiPrevented=!1,!(ije(s)&&s.isPropagationStopped())&&t.emit(i,a,s)},[t]),r=A.useCallback((o,i)=>(t.on(o,i),()=>{t.removeListener(o,i)}),[t]);_p(e,{$$publishEvent:n,$$subscribeEvent:r})},sje=[aje],lje=e=>{const t=[...sje,...e.plugins],n=t.reduce((w,C)=>C.getDefaultizedParams?C.getDefaultizedParams(w):w,e),r=rje(t,n),i=A.useRef({}).current,a=A.useRef(null),s=nr(a,e.rootRef),[c,f]=A.useState(()=>{const w={};return t.forEach(C=>{C.getInitialState&&Object.assign(w,C.getInitialState(n))}),w}),p=[];let m=tj;const v=w=>{const C=w({instance:i,params:n,state:c,setState:f,rootRef:a,models:r})||{};C.getRootProps&&p.push(C.getRootProps),C.contextValue&&(m=C.contextValue)};return t.forEach(v),{getRootProps:(w={})=>{const C=V({role:"tree",tabIndex:0},w,{ref:s});return p.forEach(k=>{Object.assign(C,k(w))}),C},rootRef:s,contextValue:m}},cje=["element"];function uje(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}function dje(e,t){let n=0,r=e.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(e[o].element===t)return o;e[o].element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING?r=o-1:n=o+1}return n}const FO=A.createContext({});process.env.NODE_ENV!=="production"&&(FO.displayName="DescendantContext");function fje(e){const t=A.useRef(null);return A.useEffect(()=>{t.current=e},[e]),t.current}const nj=()=>{};function hje(e){const[,t]=A.useState(),{registerDescendant:n=nj,unregisterDescendant:r=nj,descendants:o=[],parentId:i=null}=A.useContext(FO),a=uje(o,f=>f.element===e.element),s=fje(o),c=o.some((f,p)=>s&&s[p]&&s[p].element!==f.element);return Do(()=>{if(e.element)return n(V({},e,{index:a})),()=>{r(e.element)};t({})},[n,r,a,c,e]),{parentId:i,index:a}}function BO(e){const{children:t,id:n}=e,[r,o]=A.useState([]),i=A.useCallback(c=>{let{element:f}=c,p=bt(c,cje);o(m=>{if(m.length===0)return[V({},p,{element:f,index:0})];const v=dje(m,f);let y;if(m[v]&&m[v].element===f)y=m;else{const w=V({},p,{element:f,index:v});y=m.slice(),y.splice(v,0,w)}return y.forEach((w,C)=>{w.index=C}),y})},[]),a=A.useCallback(c=>{o(f=>f.filter(p=>c!==p.element))},[]),s=A.useMemo(()=>({descendants:r,registerDescendant:i,unregisterDescendant:a,parentId:n}),[r,i,a,n]);return W(FO.Provider,{value:s,children:t})}process.env.NODE_ENV!=="production"&&(BO.propTypes={children:u.node,id:u.string});function pje(e){const{value:t,children:n}=e;return W(RO.Provider,{value:t,children:W(BO,{children:n})})}const mje=(e,t,n)=>{e.$$publishEvent(t,n)},gje=({instance:e,params:t})=>{const n=A.useRef({}),r=A.useCallback(f=>n.current[f],[]),o=A.useCallback(f=>{n.current[f.id]=f},[]),i=A.useCallback(f=>{const p=V({},n.current);delete p[f],n.current=p,mje(e,"removeNode",{id:f})},[e]),a=A.useCallback(f=>{if(f==null)return!1;let p=e.getNode(f);if(!p)return!1;if(p.disabled)return!0;for(;p.parentId!=null;)if(p=e.getNode(p.parentId),p.disabled)return!0;return!1},[e]),s=pn(f=>Object.values(n.current).filter(p=>p.parentId===f).sort((p,m)=>p.index-m.index).map(p=>p.id));_p(e,{getNode:r,updateNode:o,removeNode:i,getChildrenIds:s,getNavigableChildrenIds:f=>{let p=e.getChildrenIds(f);return t.disabledItemsFocusable||(p=p.filter(m=>!e.isNodeDisabled(m))),p},isNodeDisabled:a})},zO=({instance:e,params:t,models:n})=>{const r=A.useCallback(s=>Array.isArray(n.expanded.value)?n.expanded.value.indexOf(s)!==-1:!1,[n.expanded.value]),o=A.useCallback(s=>{var c;return!!((c=e.getNode(s))!=null&&c.expandable)},[e]),i=pn((s,c)=>{if(c==null)return;let f;n.expanded.value.indexOf(c)!==-1?f=n.expanded.value.filter(p=>p!==c):f=[c].concat(n.expanded.value),t.onNodeToggle&&t.onNodeToggle(s,f),n.expanded.setValue(f)});_p(e,{isNodeExpanded:r,isNodeExpandable:o,toggleNodeExpansion:i,expandAllSiblings:(s,c)=>{const f=e.getNode(c),m=e.getChildrenIds(f.parentId).filter(y=>e.isNodeExpandable(y)&&!e.isNodeExpanded(y)),v=n.expanded.value.concat(m);m.length>0&&(n.expanded.setValue(v),t.onNodeToggle&&t.onNodeToggle(s,v))}})};zO.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const vje=[];zO.getDefaultizedParams=e=>{var t;return V({},e,{defaultExpanded:(t=e.defaultExpanded)!=null?t:vje})};const bje=(e,t,n)=>{if(t===n)return[t,n];const r=e.getNode(t),o=e.getNode(n);if(r.parentId===o.id||o.parentId===r.id)return o.parentId===r.id?[r.id,o.id]:[o.id,r.id];const i=[r.id],a=[o.id];let s=r.parentId,c=o.parentId,f=a.indexOf(s)!==-1,p=i.indexOf(c)!==-1,m=!0,v=!0;for(;!p&&!f;)m&&(i.push(s),f=a.indexOf(s)!==-1,m=s!==null,!f&&m&&(s=e.getNode(s).parentId)),v&&!f&&(a.push(c),p=i.indexOf(c)!==-1,v=c!==null,!p&&v&&(c=e.getNode(c).parentId));const y=f?s:c,w=e.getChildrenIds(y),C=i[i.indexOf(y)-1],k=a[a.indexOf(y)-1];return w.indexOf(C)<w.indexOf(k)?[t,n]:[n,t]},VO=({instance:e,params:t,models:n})=>{const r=A.useRef(null),o=A.useRef(!1),i=A.useRef([]),a=w=>Array.isArray(n.selected.value)?n.selected.value.indexOf(w)!==-1:n.selected.value===w,s=(w,C,k=!1)=>{if(!t.disableSelection){if(k){if(Array.isArray(n.selected.value)){let T;n.selected.value.indexOf(C)!==-1?T=n.selected.value.filter(E=>E!==C):T=[C].concat(n.selected.value),t.onNodeSelect&&t.onNodeSelect(w,T),n.selected.setValue(T)}}else{const T=t.multiSelect?[C]:C;t.onNodeSelect&&t.onNodeSelect(w,T),n.selected.setValue(T)}r.current=C,o.current=!1,i.current=[]}},c=(w,C)=>{const[k,T]=bje(e,w,C),E=[k];let _=k;for(;_!==T;)_=pb(e,_),E.push(_);return E},f=(w,C)=>{let k=n.selected.value.slice();const{start:T,next:E,current:_}=C;!E||!_||(i.current.indexOf(_)===-1&&(i.current=[]),o.current?i.current.indexOf(E)!==-1?(k=k.filter(R=>R===T||R!==_),i.current=i.current.filter(R=>R===T||R!==_)):(k.push(E),i.current.push(E)):(k.push(E),i.current.push(_,E)),t.onNodeSelect&&t.onNodeSelect(w,k),n.selected.setValue(k))},p=(w,C)=>{let k=n.selected.value.slice();const{start:T,end:E}=C;o.current&&(k=k.filter(P=>i.current.indexOf(P)===-1));let _=c(T,E);_=_.filter(P=>!e.isNodeDisabled(P)),i.current=_;let R=k.concat(_);R=R.filter((P,$)=>R.indexOf(P)===$),t.onNodeSelect&&t.onNodeSelect(w,R),n.selected.setValue(R)};return _p(e,{isNodeSelected:a,selectNode:s,selectRange:(w,C,k=!1)=>{if(t.disableSelection)return;const{start:T=r.current,end:E,current:_}=C;k?f(w,{start:T,next:E,current:_}):T!=null&&E!=null&&p(w,{start:T,end:E}),o.current=!0},rangeSelectToLast:(w,C)=>{r.current||(r.current=C);const k=o.current?r.current:C;e.selectRange(w,{start:k,end:LO(e)})},rangeSelectToFirst:(w,C)=>{r.current||(r.current=C);const k=o.current?r.current:C;e.selectRange(w,{start:k,end:$O(e)})}}),{getRootProps:()=>({"aria-multiselectable":t.multiSelect})}};VO.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const yje=[];VO.getDefaultizedParams=e=>{var t,n,r;return V({},e,{disableSelection:(t=e.disableSelection)!=null?t:!1,multiSelect:(n=e.multiSelect)!=null?n:!1,defaultSelected:(r=e.defaultSelected)!=null?r:e.multiSelect?yje:null})};const rj=1e3;class xje{constructor(t=rj){this.timeouts=new Map,this.cleanupTimeout=rj,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class wje{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class Cje{}function Sje(e){let t=0;return function(r,o,i){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new wje:new xje);const[a]=A.useState(new Cje),s=A.useRef(null),c=A.useRef();c.current=i;const f=A.useRef(null);if(!s.current&&c.current){const p=(m,v)=>{if(!v.defaultMuiPrevented){var y;(y=c.current)==null||y.call(c,m,v)}};s.current=r.$$subscribeEvent(o,p),t+=1,f.current={cleanupToken:t},e.registry.register(a,()=>{var m;(m=s.current)==null||m.call(s),s.current=null,f.current=null},f.current)}else!c.current&&s.current&&(s.current(),s.current=null,f.current&&(e.registry.unregister(f.current),f.current=null));A.useEffect(()=>{if(!s.current&&c.current){const p=(m,v)=>{if(!v.defaultMuiPrevented){var y;(y=c.current)==null||y.call(c,m,v)}};s.current=r.$$subscribeEvent(o,p)}return f.current&&e.registry&&(e.registry.unregister(f.current),f.current=null),()=>{var p;(p=s.current)==null||p.call(s),s.current=null}},[r,o])}}const kje={registry:null},Eje=Sje(kje),HO=({instance:e,params:t,state:n,setState:r,models:o,rootRef:i})=>{const a=pn(y=>{const w=typeof y=="function"?y(n.focusedNodeId):y;r(C=>V({},C,{focusedNodeId:w}))}),s=A.useCallback(y=>n.focusedNodeId===y,[n.focusedNodeId]),c=pn((y,w)=>{w&&(a(w),t.onNodeFocus&&t.onNodeFocus(y,w))});_p(e,{isNodeFocused:s,focusNode:c}),Eje(e,"removeNode",({id:y})=>{a(w=>w===y&&i.current===io(i.current).activeElement?e.getChildrenIds(null)[0]:w)});const f=y=>w=>{var C;if((C=y.onFocus)==null||C.call(y,w),w.target===w.currentTarget){const k=E=>{const _=e.getNode(E);return _&&(_.parentId==null||e.isNodeExpanded(_.parentId))};let T;Array.isArray(o.selected.value)?T=o.selected.value.find(k):o.selected.value!=null&&k(o.selected.value)&&(T=o.selected.value),T==null&&(T=e.getNavigableChildrenIds(null)[0]),e.focusNode(w,T)}},p=y=>w=>{var C;(C=y.onBlur)==null||C.call(y,w),a(null)},m=e.getNode(n.focusedNodeId),v=m?m.idAttribute:null;return{getRootProps:y=>({onFocus:f(y),onBlur:p(y),"aria-activedescendant":v??void 0})}};HO.getInitialState=()=>({focusedNodeId:null}),HO.getDefaultizedParams=e=>{var t;return V({},e,{disabledItemsFocusable:(t=e.disabledItemsFocusable)!=null?t:!1})};function Tje(e){return e&&e.length===1&&e.match(/\S/)}function oj(e,t,n){for(let r=t;r<e.length;r+=1)if(n===e[r])return r;return-1}const Dje=({instance:e,params:t,state:n})=>{const o=Er().direction==="rtl",i=A.useRef({}),a=pn((y,w)=>(i.current[y]=w,()=>{const C=V({},i.current);delete C[y],i.current=C}));_p(e,{mapFirstChar:a});const s=y=>(n.focusedNodeId!=null&&e.isNodeExpandable(n.focusedNodeId)&&(e.isNodeExpanded(n.focusedNodeId)?e.focusNode(y,pb(e,n.focusedNodeId)):e.isNodeDisabled(n.focusedNodeId)||e.toggleNodeExpansion(y,n.focusedNodeId)),!0),c=y=>{if(n.focusedNodeId==null)return!1;if(e.isNodeExpanded(n.focusedNodeId)&&!e.isNodeDisabled(n.focusedNodeId))return e.toggleNodeExpansion(y,n.focusedNodeId),!0;const w=e.getNode(n.focusedNodeId).parentId;return w?(e.focusNode(y,w),!0):!1},f=(y,w,C)=>{let k,T;const E=C.toLowerCase(),_=[],R=[];Object.keys(i.current).forEach(P=>{const $=e.getNode(P),z=$.parentId?e.isNodeExpanded($.parentId):!0,q=t.disabledItemsFocusable?!1:e.isNodeDisabled(P);z&&!q&&(_.push(P),R.push(i.current[P]))}),k=_.indexOf(w)+1,k>=_.length&&(k=0),T=oj(R,k,E),T===-1&&(T=oj(R,0,E)),T>-1&&e.focusNode(y,_[T])},p=(y,w)=>{e.isNodeDisabled(pb(e,w))||e.selectRange(y,{end:pb(e,w),current:w},!0)},m=(y,w)=>{e.isNodeDisabled(IO(e,w))||e.selectRange(y,{end:IO(e,w),current:w},!0)},v=y=>w=>{var C;(C=y.onKeyDown)==null||C.call(y,w);let k=!1;const T=w.key;if(w.altKey||w.currentTarget!==w.target||n.focusedNodeId==null)return;const E=w.ctrlKey||w.metaKey;switch(T){case" ":!t.disableSelection&&!e.isNodeDisabled(n.focusedNodeId)&&(k=!0,t.multiSelect&&w.shiftKey?e.selectRange(w,{end:n.focusedNodeId}):t.multiSelect?e.selectNode(w,n.focusedNodeId,!0):e.selectNode(w,n.focusedNodeId)),w.stopPropagation();break;case"Enter":e.isNodeDisabled(n.focusedNodeId)||(e.isNodeExpandable(n.focusedNodeId)?(e.toggleNodeExpansion(w,n.focusedNodeId),k=!0):t.disableSelection||(k=!0,t.multiSelect?e.selectNode(w,n.focusedNodeId,!0):e.selectNode(w,n.focusedNodeId))),w.stopPropagation();break;case"ArrowDown":t.multiSelect&&w.shiftKey&&!t.disableSelection&&p(w,n.focusedNodeId),e.focusNode(w,pb(e,n.focusedNodeId)),k=!0;break;case"ArrowUp":t.multiSelect&&w.shiftKey&&!t.disableSelection&&m(w,n.focusedNodeId),e.focusNode(w,IO(e,n.focusedNodeId)),k=!0;break;case"ArrowRight":o?k=c(w):k=s(w);break;case"ArrowLeft":o?k=s(w):k=c(w);break;case"Home":t.multiSelect&&E&&w.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(n.focusedNodeId)&&e.rangeSelectToFirst(w,n.focusedNodeId),e.focusNode(w,$O(e)),k=!0;break;case"End":t.multiSelect&&E&&w.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(n.focusedNodeId)&&e.rangeSelectToLast(w,n.focusedNodeId),e.focusNode(w,LO(e)),k=!0;break;default:T==="*"?(e.expandAllSiblings(w,n.focusedNodeId),k=!0):t.multiSelect&&E&&T.toLowerCase()==="a"&&!t.disableSelection?(e.selectRange(w,{start:$O(e),end:LO(e)}),k=!0):!E&&!w.shiftKey&&Tje(T)&&(f(w,n.focusedNodeId,T),k=!0)}k&&(w.preventDefault(),w.stopPropagation())};return{getRootProps:y=>({onKeyDown:v(y)})}},Aje=({instance:e,params:t})=>{const n=fs(t.id);return{getRootProps:()=>({id:n}),contextValue:{treeId:n,instance:e,multiSelect:t.multiSelect,disabledItemsFocusable:t.disabledItemsFocusable,icons:{defaultCollapseIcon:t.defaultCollapseIcon,defaultEndIcon:t.defaultEndIcon,defaultExpandIcon:t.defaultExpandIcon,defaultParentIcon:t.defaultParentIcon}}}},Oje=[gje,zO,VO,HO,Dje,Aje],Mje=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],Pje=e=>{const{classes:t}=e;return Kt({root:["root"]},nje,t)},ij=Xe("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0}),aj=A.forwardRef(function(t,n){const r=jt({props:t,name:"MuiTreeView"}),o=r,i=r,{disabledItemsFocusable:a,expanded:s,defaultExpanded:c,onNodeToggle:f,onNodeFocus:p,disableSelection:m,defaultSelected:v,selected:y,multiSelect:w,onNodeSelect:C,id:k,defaultCollapseIcon:T,defaultEndIcon:E,defaultExpandIcon:_,defaultParentIcon:R,children:P}=i,$=bt(i,Mje),{getRootProps:z,contextValue:q}=lje({disabledItemsFocusable:a,expanded:s,defaultExpanded:c,onNodeToggle:f,onNodeFocus:p,disableSelection:m,defaultSelected:v,selected:y,multiSelect:w,onNodeSelect:C,id:k,defaultCollapseIcon:T,defaultEndIcon:E,defaultExpandIcon:_,defaultParentIcon:R,plugins:Oje,rootRef:n}),Y=Pje(r),J=qn({elementType:ij,externalSlotProps:{},externalForwardedProps:$,className:Y.root,getSlotProps:z,ownerState:o});return W(pje,{value:q,children:W(ij,V({},J,{children:P}))})});process.env.NODE_ENV!=="production"&&(aj.propTypes={children:u.node,classes:u.object,className:u.string,defaultCollapseIcon:u.node,defaultEndIcon:u.node,defaultExpanded:u.arrayOf(u.string),defaultExpandIcon:u.node,defaultParentIcon:u.node,defaultSelected:u.oneOfType([u.arrayOf(u.string),u.string]),disabledItemsFocusable:u.bool,disableSelection:u.bool,expanded:u.arrayOf(u.string),id:u.string,multiSelect:u.bool,onNodeFocus:u.func,onNodeSelect:u.func,onNodeToggle:u.func,selected:u.any,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object])});const sj=()=>A.useContext(RO);function Nje(e){const{instance:t,multiSelect:n}=sj(),r=t?t.isNodeExpandable(e):!1,o=t?t.isNodeExpanded(e):!1,i=t?t.isNodeFocused(e):!1,a=t?t.isNodeSelected(e):!1,s=t?t.isNodeDisabled(e):!1;return{disabled:s,expanded:o,selected:a,focused:i,handleExpansion:m=>{if(t&&!s){i||t.focusNode(m,e);const v=n&&(m.shiftKey||m.ctrlKey||m.metaKey);r&&!(v&&t.isNodeExpanded(e))&&t.toggleNodeExpansion(m,e)}},handleSelection:m=>{t&&!s&&(i||t.focusNode(m,e),n&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?t.selectRange(m,{end:e}):t.selectNode(m,e,!0):t.selectNode(m,e))},preventSelection:m=>{(m.shiftKey||m.ctrlKey||m.metaKey||s)&&m.preventDefault()}}}const _je=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],jO=A.forwardRef(function(t,n){const{classes:r,className:o,displayIcon:i,expansionIcon:a,icon:s,label:c,nodeId:f,onClick:p,onMouseDown:m}=t,v=bt(t,_je),{disabled:y,expanded:w,selected:C,focused:k,handleExpansion:T,handleSelection:E,preventSelection:_}=Nje(f),R=s||a||i,P=z=>{_(z),m&&m(z)},$=z=>{T(z),E(z),p&&p(z)};return mt("div",V({},v,{className:Ot(o,r.root,w&&r.expanded,C&&r.selected,k&&r.focused,y&&r.disabled),onClick:$,onMouseDown:P,ref:n,children:[W("div",{className:r.iconContainer,children:R}),W("div",{className:r.label,children:c})]}))});process.env.NODE_ENV!=="production"&&(jO.propTypes={classes:u.object.isRequired,className:u.string,displayIcon:u.node,expansionIcon:u.node,icon:u.node,label:u.node,nodeId:u.string.isRequired});function Rje(e){return Gt("MuiTreeItem",e)}const Du=qt("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),Ije=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],Lje=e=>{const{classes:t}=e;return Kt({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},Rje,t)},$je=Xe("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),Fje=Xe(jO,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${Du.iconContainer}`]:t.iconContainer},t.label&&{[`& .${Du.label}`]:t.label}]})(({theme:e})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Du.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${Du.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Du.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Du.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${Du.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${Du.label}`]:V({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1)})),Bje=Xe(ym,{name:"MuiTreeItem",slot:"Group",overridesResolver:(e,t)=>t.group})({margin:0,padding:0,marginLeft:17}),lj=A.forwardRef(function(t,n){const r=jt({props:t,name:"MuiTreeItem"}),{children:o,className:i,collapseIcon:a,ContentComponent:s=jO,ContentProps:c,endIcon:f,expandIcon:p,disabled:m,icon:v,id:y,label:w,nodeId:C,onClick:k,onMouseDown:T,TransitionComponent:E=ym,TransitionProps:_}=r,R=bt(r,Ije),{icons:P,multiSelect:$,disabledItemsFocusable:z,treeId:q,instance:Y}=sj();let J;y!=null?J=y:q&&C&&(J=`${q}-${C}`);const[K,ee]=A.useState(null),re=A.useRef(null),ne=nr(ee,n),oe=A.useMemo(()=>({element:K,id:C}),[C,K]),{index:fe,parentId:se}=hje(oe),ue=!!(Array.isArray(o)?o.length:o),le=Y?Y.isNodeExpanded(C):!1,ce=Y?Y.isNodeFocused(C):!1,Se=Y?Y.isNodeSelected(C):!1,Me=Y?Y.isNodeDisabled(C):!1,ze=V({},r,{expanded:le,focused:ce,selected:Se,disabled:Me}),ke=Lje(ze);let pe,Oe;ue&&(le?Oe=a||P.defaultCollapseIcon:Oe=p||P.defaultExpandIcon),ue?pe=P.defaultParentIcon:pe=f||P.defaultEndIcon,A.useEffect(()=>{if(Y&&fe!==-1)return Y.updateNode({id:C,idAttribute:J,index:fe,parentId:se,expandable:ue,disabled:m}),()=>Y.removeNode(C)},[Y,se,fe,C,ue,m,J]),A.useEffect(()=>{if(Y&&w){var Ve,Le;return Y.mapFirstChar(C,((Ve=(Le=re.current)==null?void 0:Le.textContent)!=null?Ve:"").substring(0,1).toLowerCase())}},[Y,C,w]);let Ae;$?Ae=Se:Se&&(Ae=!0);function Pe(Ve){if(Ve.target===Ve.currentTarget){let Ne;typeof Ve.target.getRootNode=="function"?Ne=Ve.target.getRootNode():Ne=io(Ve.target),Ne.getElementById(q).focus({preventScroll:!0})}const Le=!z&&Me;Y&&!ce&&Ve.currentTarget===Ve.target&&!Le&&Y.focusNode(Ve,C)}return mt($je,V({className:Ot(ke.root,i),role:"treeitem","aria-expanded":ue?le:void 0,"aria-selected":Ae,"aria-disabled":Me||void 0,id:J,tabIndex:-1},R,{ownerState:ze,onFocus:Pe,ref:ne,children:[W(Fje,V({as:s,ref:re,classes:{root:ke.content,expanded:ke.expanded,selected:ke.selected,focused:ke.focused,disabled:ke.disabled,iconContainer:ke.iconContainer,label:ke.label},label:w,nodeId:C,onClick:k,onMouseDown:T,icon:v,expansionIcon:Oe,displayIcon:pe,ownerState:ze},c)),o&&W(BO,{id:C,children:W(Bje,V({as:E,unmountOnExit:!0,className:ke.group,in:le,component:"ul",role:"group"},_,{children:o}))})]}))});process.env.NODE_ENV!=="production"&&(lj.propTypes={children:u.node,classes:u.object,className:u.string,collapseIcon:u.node,ContentComponent:$f,ContentProps:u.object,disabled:u.bool,endIcon:u.node,expandIcon:u.node,icon:u.node,label:u.node,nodeId:u.string.isRequired,onFocus:LC,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),TransitionComponent:u.elementType,TransitionProps:u.object});const zje=()=>{const e=({data:r,getOptionLabel:o=p=>p.label,getOptionIcon:i=p=>p.icon,getOptionValue:a=p=>p.value,getOptionParent:s=p=>p.parent,getOptionNavlink:c=p=>p.navlink,getOptionExternalLink:f=p=>p.externalLink})=>{const p=[];return r?.forEach(m=>{a(m)&&p.push({value:a(m),label:mt(Or,{children:[i(m),o(m)]}),parent:s(m),externalLink:f(m),navlink:c(m)})}),p},t=(r=[],o)=>{const i=[];for(const a of r){const s=a;if(!o&&!s?.parent||s?.parent===o){const c=t(r,s.value);c.length>0&&(s.children=c),i.push(s)}}return i},n=(r,o)=>{const i=[];if(!o)return[];const a=r.find(s=>s.value===o);return a&&(i.push(a.value),i.push(...n(r,a.parent))),i};return{renderTreeToSpecificFieldName:e,buildTree:t,findAllExpanded:n}};function Vje({data:e,onClick:t,getOptionValue:n,getOptionIcon:r,getOptionLabel:o,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s,noDataText:c="no data",LinkComponent:f,hoverBackgroundColor:p,hoverTextColor:m,focusedBackgroundColor:v,focusedTextColor:y,...w}){const{buildTree:C,renderTreeToSpecificFieldName:k}=zje(),T=C(k({data:e,getOptionLabel:o,getOptionIcon:r,getOptionValue:n,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s})),E=({data:R,children:P,isLeaf:$})=>{if(!$)return W(Or,{children:P});const z=t||!R.navlink?"span":R.externalLink?"a":f||"a",q=t?{onClick:()=>{t(R)}}:R.externalLink||!f?{href:R.navlink}:{to:R.navlink};return W(z,{...q,style:{textDecoration:"none",color:"inherit"},children:P})},_=R=>R.map(P=>W(E,{isLeaf:!(P.children&&P.children.length>0),data:P,children:W(lj,{nodeId:P.value,label:P.label,sx:{"& .MuiTreeItem-content":{flexDirection:"row-reverse",padding:"10px 15px",...w.treeItemContentStyle??{}},...p&&{"& .MuiTreeItem-content:hover":{backgroundColor:p,color:m}},...v&&{"& .MuiTreeItem-content.Mui-focused":{backgroundColor:v,color:y}},"& .MuiTreeItem-label":{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px",...w.treeItemLabelStyle??{}}},children:P.children&&P.children.length>0&&_(P?.children)},P.value)}));return W(Or,{children:T.length>0?W(aj,{defaultCollapseIcon:W(c1e,{}),defaultExpanded:[],defaultExpandIcon:W(s1e,{}),disableSelection:!0,...w,children:_(T)}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})}function Hje(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10.25 2a8.25 8.25 0 0 1 6.34 13.53l5.69 5.69a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-5.69-5.69A8.25 8.25 0 1 1 10.25 2ZM3.5 10.25a6.75 6.75 0 1 0 13.5 0 6.75 6.75 0 0 0-13.5 0Z"}}]})(e)}function cj(e){let t;const n=(...r)=>{clearTimeout(t),t=setTimeout(()=>{e.onInputChange&&(!e.minLength||!r[1]||r[1].length>=e.minLength)&&e.onInputChange(...r)},300)};return W(Eg,{popupIcon:W(Hje,{size:"20px"}),...e,sx:{...e.sx,"& .MuiAutocomplete-popupIndicator":{transform:"none"}},onFocus:n,onInputChange:n,renderOption:(r,o)=>mt("div",{...r,className:"KdSearchableInput_options",children:[W("div",{className:"KdSearchableInput_option_icon",children:e.getOptionIcon?e.getOptionIcon(o):o?.icon}),mt("div",{children:[W("div",{className:"KdSearchableInput_option_label",children:e.getOptionLabel?e.getOptionLabel(o):o?.label}),W("div",{className:"KdSearchableInput_option_value",children:e.getOptionValue?e.getOptionValue(o):o?.id})]})]}),PaperComponent:r=>W("div",{...r,children:r.children}),ListboxComponent:r=>W(OE,{...r,style:{maxHeight:"40vh"},children:r.children}),PopperComponent:r=>r.open?mt("div",{...r,className:"KdSearchableInput_popper_component",children:[e.optionsLabel&&mt(Or,{children:[W("label",{className:"KdSearchableInput_popper_component_label",children:e.optionsLabel}),W(Z5,{})]}),e.loading?W("div",{className:"KdSearchableInput_popper_component_loading",children:W(ja,{size:"20px"})}):W(Or,{children:r.children})]}):null,filterOptions:r=>r,renderInput:e.renderInput?e.renderInput:r=>W(Km,{...r,size:"small",required:!!e?.required,variant:e?.variant,label:e?.label,helperText:e?.error?void 0:e?.helperText,error:!!e?.error})})}function jje(e,t=globalThis?.document){const n=Is(e);dn(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const WO="dismissableLayer.update",Wje="dismissableLayer.pointerDownOutside",Yje="dismissableLayer.focusOutside";let uj;const Uje=kf({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qje=or((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...f}=e,p=Sf(Uje),[m,v]=Tn(null),y=(n=m?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,w]=Tn({}),C=Aa(t,q=>v(q)),k=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(T),_=m?k.indexOf(m):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,P=_>=E,$=Kje(q=>{const Y=q.target,J=[...p.branches].some(K=>K.contains(Y));!P||J||(i?.(q),s?.(q),q.defaultPrevented||c?.())},y),z=Gje(q=>{const Y=q.target;[...p.branches].some(K=>K.contains(Y))||(a?.(q),s?.(q),q.defaultPrevented||c?.())},y);return jje(q=>{_===p.layers.size-1&&(o?.(q),!q.defaultPrevented&&c&&(q.preventDefault(),c()))},y),dn(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(uj=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),dj(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=uj)}},[m,y,r,p]),dn(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),dj())},[m,p]),dn(()=>{const q=()=>w({});return document.addEventListener(WO,q),()=>document.removeEventListener(WO,q)},[]),cn(Ui.div,V({},f,{ref:C,style:{pointerEvents:R?P?"auto":"none":void 0,...e.style},onFocusCapture:hr(e.onFocusCapture,z.onFocusCapture),onBlurCapture:hr(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:hr(e.onPointerDownCapture,$.onPointerDownCapture)}))});function Kje(e,t=globalThis?.document){const n=Is(e),r=Yt(!1),o=Yt(()=>{});return dn(()=>{const i=s=>{if(s.target&&!r.current){let f=function(){fj(Wje,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Gje(e,t=globalThis?.document){const n=Is(e),r=Yt(!1);return dn(()=>{const o=i=>{i.target&&!r.current&&fj(Yje,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dj(){const e=new CustomEvent(WO);document.dispatchEvent(e)}function fj(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?sHe(o,i):o.dispatchEvent(i)}let YO=0;function Xje(){dn(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:hj()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:hj()),YO++,()=>{YO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),YO--}},[])}function hj(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const UO="focusScope.autoFocusOnMount",qO="focusScope.autoFocusOnUnmount",pj={bubbles:!1,cancelable:!0},Zje=or((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=Tn(null),f=Is(o),p=Is(i),m=Yt(null),v=Aa(t,C=>c(C)),y=Yt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;dn(()=>{if(r){let C=function(_){if(y.paused||!s)return;const R=_.target;s.contains(R)?m.current=R:Au(m.current,{select:!0})},k=function(_){if(y.paused||!s)return;const R=_.relatedTarget;R!==null&&(s.contains(R)||Au(m.current,{select:!0}))},T=function(_){if(document.activeElement===document.body)for(const P of _)P.removedNodes.length>0&&Au(s)};document.addEventListener("focusin",C),document.addEventListener("focusout",k);const E=new MutationObserver(T);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",k),E.disconnect()}}},[r,s,y.paused]),dn(()=>{if(s){vj.add(y);const C=document.activeElement;if(!s.contains(C)){const T=new CustomEvent(UO,pj);s.addEventListener(UO,f),s.dispatchEvent(T),T.defaultPrevented||(Jje(rWe(mj(s)),{select:!0}),document.activeElement===C&&Au(s))}return()=>{s.removeEventListener(UO,f),setTimeout(()=>{const T=new CustomEvent(qO,pj);s.addEventListener(qO,p),s.dispatchEvent(T),T.defaultPrevented||Au(C??document.body,{select:!0}),s.removeEventListener(qO,p),vj.remove(y)},0)}}},[s,f,p,y]);const w=Zn(C=>{if(!n&&!r||y.paused)return;const k=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,T=document.activeElement;if(k&&T){const E=C.currentTarget,[_,R]=Qje(E);_&&R?!C.shiftKey&&T===R?(C.preventDefault(),n&&Au(_,{select:!0})):C.shiftKey&&T===_&&(C.preventDefault(),n&&Au(R,{select:!0})):T===E&&C.preventDefault()}},[n,r,y.paused]);return cn(Ui.div,V({tabIndex:-1},a,{ref:v,onKeyDown:w}))});function Jje(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Au(r,{select:t}),document.activeElement!==n)return}function Qje(e){const t=mj(e),n=gj(t,e),r=gj(t.reverse(),e);return[n,r]}function mj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gj(e,t){for(const n of e)if(!eWe(n,{upTo:t}))return n}function eWe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tWe(e){return e instanceof HTMLInputElement&&"select"in e}function Au(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tWe(e)&&t&&e.select()}}const vj=nWe();function nWe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=bj(e,t),e.unshift(t)},remove(t){var n;e=bj(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bj(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rWe(e){return e.filter(t=>t.tagName!=="A")}const oWe=or((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return cn(Ui.svg,V({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:cn("polygon",{points:"0,0 30,0 15,10"}))}),iWe=oWe;function aWe(e){const[t,n]=Tn(void 0);return Pp(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;a=f.inlineSize,s=f.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const yj="Popper",[xj,wj]=Mp(yj),[sWe,Cj]=xj(yj),lWe=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Tn(null);return cn(sWe,{scope:t,anchor:r,onAnchorChange:o},n)},cWe="PopperAnchor",uWe=or((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Cj(cWe,n),a=Yt(null),s=Aa(t,a);return dn(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:cn(Ui.div,V({},o,{ref:s}))}),Sj="PopperContent",[dWe,fWe]=xj(Sj),hWe=or((e,t)=>{var n,r,o,i,a,s,c,f;const{__scopePopper:p,side:m="bottom",sideOffset:v=0,align:y="center",alignOffset:w=0,arrowPadding:C=0,avoidCollisions:k=!0,collisionBoundary:T=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:R=!1,updatePositionStrategy:P="optimized",onPlaced:$,...z}=e,q=Cj(Sj,p),[Y,J]=Tn(null),K=Aa(t,Ge=>J(Ge)),[ee,re]=Tn(null),ne=aWe(ee),oe=(n=ne?.width)!==null&&n!==void 0?n:0,fe=(r=ne?.height)!==null&&r!==void 0?r:0,se=m+(y!=="center"?"-"+y:""),ue=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},le=Array.isArray(T)?T:[T],ce=le.length>0,Se={padding:ue,boundary:le.filter(gWe),altBoundary:ce},{refs:Me,floatingStyles:ze,placement:ke,isPositioned:pe,middlewareData:Oe}=xJ({strategy:"fixed",placement:se,whileElementsMounted:(...Ge)=>fJ(...Ge,{animationFrame:P==="always"}),elements:{reference:q.anchor},middleware:[WZ({mainAxis:v+fe,alignmentAxis:w}),k&&hJ({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?vJ():void 0,...Se}),k&&pJ({...Se}),mJ({...Se,apply:({elements:Ge,rects:tt,availableWidth:ot,availableHeight:Fe})=>{const{width:$e,height:Ce}=tt.reference,De=Ge.floating.style;De.setProperty("--radix-popper-available-width",`${ot}px`),De.setProperty("--radix-popper-available-height",`${Fe}px`),De.setProperty("--radix-popper-anchor-width",`${$e}px`),De.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),ee&&yJ({element:ee,padding:C}),vWe({arrowWidth:oe,arrowHeight:fe}),R&&gJ({strategy:"referenceHidden",...Se})]}),[Ae,Pe]=Ej(ke),Ve=Is($);Pp(()=>{pe&&Ve?.()},[pe,Ve]);const Le=(o=Oe.arrow)===null||o===void 0?void 0:o.x,Ne=(i=Oe.arrow)===null||i===void 0?void 0:i.y,Te=((a=Oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[He,Ie]=Tn();return Pp(()=>{Y&&Ie(window.getComputedStyle(Y).zIndex)},[Y]),cn("div",{ref:Me.setFloating,"data-radix-popper-content-wrapper":"",style:{...ze,transform:pe?ze.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:He,"--radix-popper-transform-origin":[(s=Oe.transformOrigin)===null||s===void 0?void 0:s.x,(c=Oe.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},cn(dWe,{scope:p,placedSide:Ae,onArrowChange:re,arrowX:Le,arrowY:Ne,shouldHideArrow:Te},cn(Ui.div,V({"data-side":Ae,"data-align":Pe},z,{ref:K,style:{...z.style,animation:pe?void 0:"none",opacity:(f=Oe.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))}),kj="PopperArrow",pWe={top:"bottom",right:"left",bottom:"top",left:"right"},mWe=or(function(t,n){const{__scopePopper:r,...o}=t,i=fWe(kj,r),a=pWe[i.placedSide];return cn("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},cn(iWe,V({},o,{ref:n,style:{...o.style,display:"block"}})))});function gWe(e){return e!==null}const vWe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:f}=t,m=((n=f.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,v=m?0:e.arrowWidth,y=m?0:e.arrowHeight,[w,C]=Ej(s),k={start:"0%",center:"50%",end:"100%"}[C],T=((r=(o=f.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+v/2,E=((i=(a=f.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+y/2;let _="",R="";return w==="bottom"?(_=m?k:`${T}px`,R=`${-y}px`):w==="top"?(_=m?k:`${T}px`,R=`${c.floating.height+y}px`):w==="right"?(_=`${-y}px`,R=m?k:`${E}px`):w==="left"&&(_=`${c.floating.width+y}px`,R=m?k:`${E}px`),{data:{x:_,y:R}}}});function Ej(e){const[t,n="center"]=e.split("-");return[t,n]}const Tj=lWe,bWe=uWe,yWe=hWe,xWe=or((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Ef.createPortal(cn(Ui.div,V({},o,{ref:t})),r):null});var $w="right-scroll-bar-position",Fw="width-before-scroll-bar",wWe="with-scroll-bars-hidden",CWe="--removed-body-scroll-bar-size";function KO(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function SWe(e,t){var n=Tn(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Dj=new WeakMap;function kWe(e,t){var n=SWe(t||null,function(r){return e.forEach(function(o){return KO(o,r)})});return A.useLayoutEffect(function(){var r=Dj.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||KO(s,null)}),i.forEach(function(s){o.has(s)||KO(s,a)})}Dj.set(n,e)},[e]),n}function EWe(e){return e}function TWe(e,t){t===void 0&&(t=EWe);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var p=a;a=[],p.forEach(i)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(p){a.push(p),f()},filter:function(p){return a=a.filter(p),n}}}};return o}function DWe(e){e===void 0&&(e={});var t=TWe(null);return t.options=fl({async:!0,ssr:!1},e),t}var Aj=function(e){var t=e.sideCar,n=J5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,fl({},n))};Aj.isSideCarExport=!0;function AWe(e,t){return e.useMedium(t),Aj}var Oj=DWe(),GO=function(){},Bw=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:GO,onWheelCapture:GO,onTouchMoveCapture:GO}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,y=e.noIsolation,w=e.inert,C=e.allowPinchZoom,k=e.as,T=k===void 0?"div":k,E=J5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=v,R=kWe([n,t]),P=fl(fl({},E),o);return A.createElement(A.Fragment,null,p&&A.createElement(_,{sideCar:Oj,removeScrollBar:f,shards:m,noIsolation:y,inert:w,setCallbacks:i,allowPinchZoom:!!C,lockRef:n}),a?A.cloneElement(A.Children.only(s),fl(fl({},P),{ref:R})):A.createElement(T,fl({},P,{className:c,ref:R}),s))});Bw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bw.classNames={fullWidth:Fw,zeroRight:$w};var OWe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function MWe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=OWe();return t&&e.setAttribute("nonce",t),e}function PWe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function NWe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _We=function(){var e=0,t=null;return{add:function(n){e==0&&(t=MWe())&&(PWe(t,n),NWe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},RWe=function(){var e=_We();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mj=function(){var e=RWe(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},IWe={left:0,top:0,right:0,gap:0},XO=function(e){return parseInt(e||"",10)||0},LWe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[XO(n),XO(r),XO(o)]},$We=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return IWe;var t=LWe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},FWe=Mj(),zw="data-scroll-locked",BWe=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
1435
|
-
.`.concat(
|
|
1433
|
+
`))},[JSON.stringify(p)])}),i};class aje{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];if(o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0),process.env.NODE_ENV!=="production"){const i=o.highPriority.size+o.regular.size;i>this.maxListeners&&!this.warnOnce&&(this.warnOnce=!0,console.warn([`Possible EventEmitter memory leak detected. ${i} ${t} listeners added.`].join(`
|
|
1434
|
+
`)))}}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a<i.length;a+=1){const s=i[a];r.regular.has(s)&&s.apply(this,n)}}once(t,n){const r=this;this.on(t,function o(...i){r.removeListener(t,o),n.apply(r,i)})}}const IO=(e,t)=>{const n=e.getNode(t),r=e.getNavigableChildrenIds(n.parentId),o=r.indexOf(t);if(o===0)return n.parentId;let i=r[o-1];for(;e.isNodeExpanded(i)&&e.getNavigableChildrenIds(i).length>0;)i=e.getNavigableChildrenIds(i).pop();return i},pb=(e,t)=>{if(e.isNodeExpanded(t)&&e.getNavigableChildrenIds(t).length>0)return e.getNavigableChildrenIds(t)[0];let n=e.getNode(t);for(;n!=null;){const r=e.getNavigableChildrenIds(n.parentId),o=r[r.indexOf(n.id)+1];if(o)return o;n=e.getNode(n.parentId)}return null},LO=e=>{let t=e.getNavigableChildrenIds(null).pop();for(;e.isNodeExpanded(t);)t=e.getNavigableChildrenIds(t).pop();return t},$O=e=>e.getNavigableChildrenIds(null)[0],_p=(e,t)=>{Object.assign(e,t)},sje=e=>e.isPropagationStopped!==void 0,lje=({instance:e})=>{const[t]=A.useState(()=>new aje),n=A.useCallback((...o)=>{const[i,a,s={}]=o;s.defaultMuiPrevented=!1,!(sje(s)&&s.isPropagationStopped())&&t.emit(i,a,s)},[t]),r=A.useCallback((o,i)=>(t.on(o,i),()=>{t.removeListener(o,i)}),[t]);_p(e,{$$publishEvent:n,$$subscribeEvent:r})},cje=[lje],uje=e=>{const t=[...cje,...e.plugins],n=t.reduce((w,C)=>C.getDefaultizedParams?C.getDefaultizedParams(w):w,e),r=ije(t,n),i=A.useRef({}).current,a=A.useRef(null),s=nr(a,e.rootRef),[c,f]=A.useState(()=>{const w={};return t.forEach(C=>{C.getInitialState&&Object.assign(w,C.getInitialState(n))}),w}),p=[];let m=tj;const v=w=>{const C=w({instance:i,params:n,state:c,setState:f,rootRef:a,models:r})||{};C.getRootProps&&p.push(C.getRootProps),C.contextValue&&(m=C.contextValue)};return t.forEach(v),{getRootProps:(w={})=>{const C=V({role:"tree",tabIndex:0},w,{ref:s});return p.forEach(k=>{Object.assign(C,k(w))}),C},rootRef:s,contextValue:m}},dje=["element"];function fje(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}function hje(e,t){let n=0,r=e.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(e[o].element===t)return o;e[o].element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING?r=o-1:n=o+1}return n}const FO=A.createContext({});process.env.NODE_ENV!=="production"&&(FO.displayName="DescendantContext");function pje(e){const t=A.useRef(null);return A.useEffect(()=>{t.current=e},[e]),t.current}const nj=()=>{};function mje(e){const[,t]=A.useState(),{registerDescendant:n=nj,unregisterDescendant:r=nj,descendants:o=[],parentId:i=null}=A.useContext(FO),a=fje(o,f=>f.element===e.element),s=pje(o),c=o.some((f,p)=>s&&s[p]&&s[p].element!==f.element);return Do(()=>{if(e.element)return n(V({},e,{index:a})),()=>{r(e.element)};t({})},[n,r,a,c,e]),{parentId:i,index:a}}function BO(e){const{children:t,id:n}=e,[r,o]=A.useState([]),i=A.useCallback(c=>{let{element:f}=c,p=bt(c,dje);o(m=>{if(m.length===0)return[V({},p,{element:f,index:0})];const v=hje(m,f);let y;if(m[v]&&m[v].element===f)y=m;else{const w=V({},p,{element:f,index:v});y=m.slice(),y.splice(v,0,w)}return y.forEach((w,C)=>{w.index=C}),y})},[]),a=A.useCallback(c=>{o(f=>f.filter(p=>c!==p.element))},[]),s=A.useMemo(()=>({descendants:r,registerDescendant:i,unregisterDescendant:a,parentId:n}),[r,i,a,n]);return W(FO.Provider,{value:s,children:t})}process.env.NODE_ENV!=="production"&&(BO.propTypes={children:u.node,id:u.string});function gje(e){const{value:t,children:n}=e;return W(RO.Provider,{value:t,children:W(BO,{children:n})})}const vje=(e,t,n)=>{e.$$publishEvent(t,n)},bje=({instance:e,params:t})=>{const n=A.useRef({}),r=A.useCallback(f=>n.current[f],[]),o=A.useCallback(f=>{n.current[f.id]=f},[]),i=A.useCallback(f=>{const p=V({},n.current);delete p[f],n.current=p,vje(e,"removeNode",{id:f})},[e]),a=A.useCallback(f=>{if(f==null)return!1;let p=e.getNode(f);if(!p)return!1;if(p.disabled)return!0;for(;p.parentId!=null;)if(p=e.getNode(p.parentId),p.disabled)return!0;return!1},[e]),s=pn(f=>Object.values(n.current).filter(p=>p.parentId===f).sort((p,m)=>p.index-m.index).map(p=>p.id));_p(e,{getNode:r,updateNode:o,removeNode:i,getChildrenIds:s,getNavigableChildrenIds:f=>{let p=e.getChildrenIds(f);return t.disabledItemsFocusable||(p=p.filter(m=>!e.isNodeDisabled(m))),p},isNodeDisabled:a})},zO=({instance:e,params:t,models:n})=>{const r=A.useCallback(s=>Array.isArray(n.expanded.value)?n.expanded.value.indexOf(s)!==-1:!1,[n.expanded.value]),o=A.useCallback(s=>{var c;return!!((c=e.getNode(s))!=null&&c.expandable)},[e]),i=pn((s,c)=>{if(c==null)return;let f;n.expanded.value.indexOf(c)!==-1?f=n.expanded.value.filter(p=>p!==c):f=[c].concat(n.expanded.value),t.onNodeToggle&&t.onNodeToggle(s,f),n.expanded.setValue(f)});_p(e,{isNodeExpanded:r,isNodeExpandable:o,toggleNodeExpansion:i,expandAllSiblings:(s,c)=>{const f=e.getNode(c),m=e.getChildrenIds(f.parentId).filter(y=>e.isNodeExpandable(y)&&!e.isNodeExpanded(y)),v=n.expanded.value.concat(m);m.length>0&&(n.expanded.setValue(v),t.onNodeToggle&&t.onNodeToggle(s,v))}})};zO.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const yje=[];zO.getDefaultizedParams=e=>{var t;return V({},e,{defaultExpanded:(t=e.defaultExpanded)!=null?t:yje})};const xje=(e,t,n)=>{if(t===n)return[t,n];const r=e.getNode(t),o=e.getNode(n);if(r.parentId===o.id||o.parentId===r.id)return o.parentId===r.id?[r.id,o.id]:[o.id,r.id];const i=[r.id],a=[o.id];let s=r.parentId,c=o.parentId,f=a.indexOf(s)!==-1,p=i.indexOf(c)!==-1,m=!0,v=!0;for(;!p&&!f;)m&&(i.push(s),f=a.indexOf(s)!==-1,m=s!==null,!f&&m&&(s=e.getNode(s).parentId)),v&&!f&&(a.push(c),p=i.indexOf(c)!==-1,v=c!==null,!p&&v&&(c=e.getNode(c).parentId));const y=f?s:c,w=e.getChildrenIds(y),C=i[i.indexOf(y)-1],k=a[a.indexOf(y)-1];return w.indexOf(C)<w.indexOf(k)?[t,n]:[n,t]},VO=({instance:e,params:t,models:n})=>{const r=A.useRef(null),o=A.useRef(!1),i=A.useRef([]),a=w=>Array.isArray(n.selected.value)?n.selected.value.indexOf(w)!==-1:n.selected.value===w,s=(w,C,k=!1)=>{if(!t.disableSelection){if(k){if(Array.isArray(n.selected.value)){let T;n.selected.value.indexOf(C)!==-1?T=n.selected.value.filter(E=>E!==C):T=[C].concat(n.selected.value),t.onNodeSelect&&t.onNodeSelect(w,T),n.selected.setValue(T)}}else{const T=t.multiSelect?[C]:C;t.onNodeSelect&&t.onNodeSelect(w,T),n.selected.setValue(T)}r.current=C,o.current=!1,i.current=[]}},c=(w,C)=>{const[k,T]=xje(e,w,C),E=[k];let _=k;for(;_!==T;)_=pb(e,_),E.push(_);return E},f=(w,C)=>{let k=n.selected.value.slice();const{start:T,next:E,current:_}=C;!E||!_||(i.current.indexOf(_)===-1&&(i.current=[]),o.current?i.current.indexOf(E)!==-1?(k=k.filter(R=>R===T||R!==_),i.current=i.current.filter(R=>R===T||R!==_)):(k.push(E),i.current.push(E)):(k.push(E),i.current.push(_,E)),t.onNodeSelect&&t.onNodeSelect(w,k),n.selected.setValue(k))},p=(w,C)=>{let k=n.selected.value.slice();const{start:T,end:E}=C;o.current&&(k=k.filter(P=>i.current.indexOf(P)===-1));let _=c(T,E);_=_.filter(P=>!e.isNodeDisabled(P)),i.current=_;let R=k.concat(_);R=R.filter((P,$)=>R.indexOf(P)===$),t.onNodeSelect&&t.onNodeSelect(w,R),n.selected.setValue(R)};return _p(e,{isNodeSelected:a,selectNode:s,selectRange:(w,C,k=!1)=>{if(t.disableSelection)return;const{start:T=r.current,end:E,current:_}=C;k?f(w,{start:T,next:E,current:_}):T!=null&&E!=null&&p(w,{start:T,end:E}),o.current=!0},rangeSelectToLast:(w,C)=>{r.current||(r.current=C);const k=o.current?r.current:C;e.selectRange(w,{start:k,end:LO(e)})},rangeSelectToFirst:(w,C)=>{r.current||(r.current=C);const k=o.current?r.current:C;e.selectRange(w,{start:k,end:$O(e)})}}),{getRootProps:()=>({"aria-multiselectable":t.multiSelect})}};VO.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const wje=[];VO.getDefaultizedParams=e=>{var t,n,r;return V({},e,{disableSelection:(t=e.disableSelection)!=null?t:!1,multiSelect:(n=e.multiSelect)!=null?n:!1,defaultSelected:(r=e.defaultSelected)!=null?r:e.multiSelect?wje:null})};const rj=1e3;class Cje{constructor(t=rj){this.timeouts=new Map,this.cleanupTimeout=rj,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class Sje{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}class kje{}function Eje(e){let t=0;return function(r,o,i){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Sje:new Cje);const[a]=A.useState(new kje),s=A.useRef(null),c=A.useRef();c.current=i;const f=A.useRef(null);if(!s.current&&c.current){const p=(m,v)=>{if(!v.defaultMuiPrevented){var y;(y=c.current)==null||y.call(c,m,v)}};s.current=r.$$subscribeEvent(o,p),t+=1,f.current={cleanupToken:t},e.registry.register(a,()=>{var m;(m=s.current)==null||m.call(s),s.current=null,f.current=null},f.current)}else!c.current&&s.current&&(s.current(),s.current=null,f.current&&(e.registry.unregister(f.current),f.current=null));A.useEffect(()=>{if(!s.current&&c.current){const p=(m,v)=>{if(!v.defaultMuiPrevented){var y;(y=c.current)==null||y.call(c,m,v)}};s.current=r.$$subscribeEvent(o,p)}return f.current&&e.registry&&(e.registry.unregister(f.current),f.current=null),()=>{var p;(p=s.current)==null||p.call(s),s.current=null}},[r,o])}}const Tje={registry:null},Dje=Eje(Tje),HO=({instance:e,params:t,state:n,setState:r,models:o,rootRef:i})=>{const a=pn(y=>{const w=typeof y=="function"?y(n.focusedNodeId):y;r(C=>V({},C,{focusedNodeId:w}))}),s=A.useCallback(y=>n.focusedNodeId===y,[n.focusedNodeId]),c=pn((y,w)=>{w&&(a(w),t.onNodeFocus&&t.onNodeFocus(y,w))});_p(e,{isNodeFocused:s,focusNode:c}),Dje(e,"removeNode",({id:y})=>{a(w=>w===y&&i.current===io(i.current).activeElement?e.getChildrenIds(null)[0]:w)});const f=y=>w=>{var C;if((C=y.onFocus)==null||C.call(y,w),w.target===w.currentTarget){const k=E=>{const _=e.getNode(E);return _&&(_.parentId==null||e.isNodeExpanded(_.parentId))};let T;Array.isArray(o.selected.value)?T=o.selected.value.find(k):o.selected.value!=null&&k(o.selected.value)&&(T=o.selected.value),T==null&&(T=e.getNavigableChildrenIds(null)[0]),e.focusNode(w,T)}},p=y=>w=>{var C;(C=y.onBlur)==null||C.call(y,w),a(null)},m=e.getNode(n.focusedNodeId),v=m?m.idAttribute:null;return{getRootProps:y=>({onFocus:f(y),onBlur:p(y),"aria-activedescendant":v??void 0})}};HO.getInitialState=()=>({focusedNodeId:null}),HO.getDefaultizedParams=e=>{var t;return V({},e,{disabledItemsFocusable:(t=e.disabledItemsFocusable)!=null?t:!1})};function Aje(e){return e&&e.length===1&&e.match(/\S/)}function oj(e,t,n){for(let r=t;r<e.length;r+=1)if(n===e[r])return r;return-1}const Oje=({instance:e,params:t,state:n})=>{const o=Er().direction==="rtl",i=A.useRef({}),a=pn((y,w)=>(i.current[y]=w,()=>{const C=V({},i.current);delete C[y],i.current=C}));_p(e,{mapFirstChar:a});const s=y=>(n.focusedNodeId!=null&&e.isNodeExpandable(n.focusedNodeId)&&(e.isNodeExpanded(n.focusedNodeId)?e.focusNode(y,pb(e,n.focusedNodeId)):e.isNodeDisabled(n.focusedNodeId)||e.toggleNodeExpansion(y,n.focusedNodeId)),!0),c=y=>{if(n.focusedNodeId==null)return!1;if(e.isNodeExpanded(n.focusedNodeId)&&!e.isNodeDisabled(n.focusedNodeId))return e.toggleNodeExpansion(y,n.focusedNodeId),!0;const w=e.getNode(n.focusedNodeId).parentId;return w?(e.focusNode(y,w),!0):!1},f=(y,w,C)=>{let k,T;const E=C.toLowerCase(),_=[],R=[];Object.keys(i.current).forEach(P=>{const $=e.getNode(P),z=$.parentId?e.isNodeExpanded($.parentId):!0,q=t.disabledItemsFocusable?!1:e.isNodeDisabled(P);z&&!q&&(_.push(P),R.push(i.current[P]))}),k=_.indexOf(w)+1,k>=_.length&&(k=0),T=oj(R,k,E),T===-1&&(T=oj(R,0,E)),T>-1&&e.focusNode(y,_[T])},p=(y,w)=>{e.isNodeDisabled(pb(e,w))||e.selectRange(y,{end:pb(e,w),current:w},!0)},m=(y,w)=>{e.isNodeDisabled(IO(e,w))||e.selectRange(y,{end:IO(e,w),current:w},!0)},v=y=>w=>{var C;(C=y.onKeyDown)==null||C.call(y,w);let k=!1;const T=w.key;if(w.altKey||w.currentTarget!==w.target||n.focusedNodeId==null)return;const E=w.ctrlKey||w.metaKey;switch(T){case" ":!t.disableSelection&&!e.isNodeDisabled(n.focusedNodeId)&&(k=!0,t.multiSelect&&w.shiftKey?e.selectRange(w,{end:n.focusedNodeId}):t.multiSelect?e.selectNode(w,n.focusedNodeId,!0):e.selectNode(w,n.focusedNodeId)),w.stopPropagation();break;case"Enter":e.isNodeDisabled(n.focusedNodeId)||(e.isNodeExpandable(n.focusedNodeId)?(e.toggleNodeExpansion(w,n.focusedNodeId),k=!0):t.disableSelection||(k=!0,t.multiSelect?e.selectNode(w,n.focusedNodeId,!0):e.selectNode(w,n.focusedNodeId))),w.stopPropagation();break;case"ArrowDown":t.multiSelect&&w.shiftKey&&!t.disableSelection&&p(w,n.focusedNodeId),e.focusNode(w,pb(e,n.focusedNodeId)),k=!0;break;case"ArrowUp":t.multiSelect&&w.shiftKey&&!t.disableSelection&&m(w,n.focusedNodeId),e.focusNode(w,IO(e,n.focusedNodeId)),k=!0;break;case"ArrowRight":o?k=c(w):k=s(w);break;case"ArrowLeft":o?k=s(w):k=c(w);break;case"Home":t.multiSelect&&E&&w.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(n.focusedNodeId)&&e.rangeSelectToFirst(w,n.focusedNodeId),e.focusNode(w,$O(e)),k=!0;break;case"End":t.multiSelect&&E&&w.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(n.focusedNodeId)&&e.rangeSelectToLast(w,n.focusedNodeId),e.focusNode(w,LO(e)),k=!0;break;default:T==="*"?(e.expandAllSiblings(w,n.focusedNodeId),k=!0):t.multiSelect&&E&&T.toLowerCase()==="a"&&!t.disableSelection?(e.selectRange(w,{start:$O(e),end:LO(e)}),k=!0):!E&&!w.shiftKey&&Aje(T)&&(f(w,n.focusedNodeId,T),k=!0)}k&&(w.preventDefault(),w.stopPropagation())};return{getRootProps:y=>({onKeyDown:v(y)})}},Mje=({instance:e,params:t})=>{const n=fs(t.id);return{getRootProps:()=>({id:n}),contextValue:{treeId:n,instance:e,multiSelect:t.multiSelect,disabledItemsFocusable:t.disabledItemsFocusable,icons:{defaultCollapseIcon:t.defaultCollapseIcon,defaultEndIcon:t.defaultEndIcon,defaultExpandIcon:t.defaultExpandIcon,defaultParentIcon:t.defaultParentIcon}}}},Pje=[bje,zO,VO,HO,Oje,Mje],Nje=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],_je=e=>{const{classes:t}=e;return Kt({root:["root"]},oje,t)},ij=Xe("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0}),aj=A.forwardRef(function(t,n){const r=jt({props:t,name:"MuiTreeView"}),o=r,i=r,{disabledItemsFocusable:a,expanded:s,defaultExpanded:c,onNodeToggle:f,onNodeFocus:p,disableSelection:m,defaultSelected:v,selected:y,multiSelect:w,onNodeSelect:C,id:k,defaultCollapseIcon:T,defaultEndIcon:E,defaultExpandIcon:_,defaultParentIcon:R,children:P}=i,$=bt(i,Nje),{getRootProps:z,contextValue:q}=uje({disabledItemsFocusable:a,expanded:s,defaultExpanded:c,onNodeToggle:f,onNodeFocus:p,disableSelection:m,defaultSelected:v,selected:y,multiSelect:w,onNodeSelect:C,id:k,defaultCollapseIcon:T,defaultEndIcon:E,defaultExpandIcon:_,defaultParentIcon:R,plugins:Pje,rootRef:n}),Y=_je(r),J=qn({elementType:ij,externalSlotProps:{},externalForwardedProps:$,className:Y.root,getSlotProps:z,ownerState:o});return W(gje,{value:q,children:W(ij,V({},J,{children:P}))})});process.env.NODE_ENV!=="production"&&(aj.propTypes={children:u.node,classes:u.object,className:u.string,defaultCollapseIcon:u.node,defaultEndIcon:u.node,defaultExpanded:u.arrayOf(u.string),defaultExpandIcon:u.node,defaultParentIcon:u.node,defaultSelected:u.oneOfType([u.arrayOf(u.string),u.string]),disabledItemsFocusable:u.bool,disableSelection:u.bool,expanded:u.arrayOf(u.string),id:u.string,multiSelect:u.bool,onNodeFocus:u.func,onNodeSelect:u.func,onNodeToggle:u.func,selected:u.any,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object])});const sj=()=>A.useContext(RO);function Rje(e){const{instance:t,multiSelect:n}=sj(),r=t?t.isNodeExpandable(e):!1,o=t?t.isNodeExpanded(e):!1,i=t?t.isNodeFocused(e):!1,a=t?t.isNodeSelected(e):!1,s=t?t.isNodeDisabled(e):!1;return{disabled:s,expanded:o,selected:a,focused:i,handleExpansion:m=>{if(t&&!s){i||t.focusNode(m,e);const v=n&&(m.shiftKey||m.ctrlKey||m.metaKey);r&&!(v&&t.isNodeExpanded(e))&&t.toggleNodeExpansion(m,e)}},handleSelection:m=>{t&&!s&&(i||t.focusNode(m,e),n&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?t.selectRange(m,{end:e}):t.selectNode(m,e,!0):t.selectNode(m,e))},preventSelection:m=>{(m.shiftKey||m.ctrlKey||m.metaKey||s)&&m.preventDefault()}}}const Ije=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],jO=A.forwardRef(function(t,n){const{classes:r,className:o,displayIcon:i,expansionIcon:a,icon:s,label:c,nodeId:f,onClick:p,onMouseDown:m}=t,v=bt(t,Ije),{disabled:y,expanded:w,selected:C,focused:k,handleExpansion:T,handleSelection:E,preventSelection:_}=Rje(f),R=s||a||i,P=z=>{_(z),m&&m(z)},$=z=>{T(z),E(z),p&&p(z)};return mt("div",V({},v,{className:Ot(o,r.root,w&&r.expanded,C&&r.selected,k&&r.focused,y&&r.disabled),onClick:$,onMouseDown:P,ref:n,children:[W("div",{className:r.iconContainer,children:R}),W("div",{className:r.label,children:c})]}))});process.env.NODE_ENV!=="production"&&(jO.propTypes={classes:u.object.isRequired,className:u.string,displayIcon:u.node,expansionIcon:u.node,icon:u.node,label:u.node,nodeId:u.string.isRequired});function Lje(e){return Gt("MuiTreeItem",e)}const Du=qt("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),$je=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],Fje=e=>{const{classes:t}=e;return Kt({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},Lje,t)},Bje=Xe("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),zje=Xe(jO,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${Du.iconContainer}`]:t.iconContainer},t.label&&{[`& .${Du.label}`]:t.label}]})(({theme:e})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Du.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${Du.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Du.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Du.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ri(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${Du.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${Du.label}`]:V({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1)})),Vje=Xe(ym,{name:"MuiTreeItem",slot:"Group",overridesResolver:(e,t)=>t.group})({margin:0,padding:0,marginLeft:17}),lj=A.forwardRef(function(t,n){const r=jt({props:t,name:"MuiTreeItem"}),{children:o,className:i,collapseIcon:a,ContentComponent:s=jO,ContentProps:c,endIcon:f,expandIcon:p,disabled:m,icon:v,id:y,label:w,nodeId:C,onClick:k,onMouseDown:T,TransitionComponent:E=ym,TransitionProps:_}=r,R=bt(r,$je),{icons:P,multiSelect:$,disabledItemsFocusable:z,treeId:q,instance:Y}=sj();let J;y!=null?J=y:q&&C&&(J=`${q}-${C}`);const[K,ee]=A.useState(null),re=A.useRef(null),ne=nr(ee,n),oe=A.useMemo(()=>({element:K,id:C}),[C,K]),{index:fe,parentId:se}=mje(oe),ue=!!(Array.isArray(o)?o.length:o),le=Y?Y.isNodeExpanded(C):!1,ce=Y?Y.isNodeFocused(C):!1,Se=Y?Y.isNodeSelected(C):!1,Me=Y?Y.isNodeDisabled(C):!1,ze=V({},r,{expanded:le,focused:ce,selected:Se,disabled:Me}),ke=Fje(ze);let pe,Oe;ue&&(le?Oe=a||P.defaultCollapseIcon:Oe=p||P.defaultExpandIcon),ue?pe=P.defaultParentIcon:pe=f||P.defaultEndIcon,A.useEffect(()=>{if(Y&&fe!==-1)return Y.updateNode({id:C,idAttribute:J,index:fe,parentId:se,expandable:ue,disabled:m}),()=>Y.removeNode(C)},[Y,se,fe,C,ue,m,J]),A.useEffect(()=>{if(Y&&w){var Ve,Le;return Y.mapFirstChar(C,((Ve=(Le=re.current)==null?void 0:Le.textContent)!=null?Ve:"").substring(0,1).toLowerCase())}},[Y,C,w]);let Ae;$?Ae=Se:Se&&(Ae=!0);function Pe(Ve){if(Ve.target===Ve.currentTarget){let Ne;typeof Ve.target.getRootNode=="function"?Ne=Ve.target.getRootNode():Ne=io(Ve.target),Ne.getElementById(q).focus({preventScroll:!0})}const Le=!z&&Me;Y&&!ce&&Ve.currentTarget===Ve.target&&!Le&&Y.focusNode(Ve,C)}return mt(Bje,V({className:Ot(ke.root,i),role:"treeitem","aria-expanded":ue?le:void 0,"aria-selected":Ae,"aria-disabled":Me||void 0,id:J,tabIndex:-1},R,{ownerState:ze,onFocus:Pe,ref:ne,children:[W(zje,V({as:s,ref:re,classes:{root:ke.content,expanded:ke.expanded,selected:ke.selected,focused:ke.focused,disabled:ke.disabled,iconContainer:ke.iconContainer,label:ke.label},label:w,nodeId:C,onClick:k,onMouseDown:T,icon:v,expansionIcon:Oe,displayIcon:pe,ownerState:ze},c)),o&&W(BO,{id:C,children:W(Vje,V({as:E,unmountOnExit:!0,className:ke.group,in:le,component:"ul",role:"group"},_,{children:o}))})]}))});process.env.NODE_ENV!=="production"&&(lj.propTypes={children:u.node,classes:u.object,className:u.string,collapseIcon:u.node,ContentComponent:$f,ContentProps:u.object,disabled:u.bool,endIcon:u.node,expandIcon:u.node,icon:u.node,label:u.node,nodeId:u.string.isRequired,onFocus:LC,sx:u.oneOfType([u.arrayOf(u.oneOfType([u.func,u.object,u.bool])),u.func,u.object]),TransitionComponent:u.elementType,TransitionProps:u.object});const Hje=()=>{const e=({data:r,getOptionLabel:o=p=>p.label,getOptionIcon:i=p=>p.icon,getOptionValue:a=p=>p.value,getOptionParent:s=p=>p.parent,getOptionNavlink:c=p=>p.navlink,getOptionExternalLink:f=p=>p.externalLink})=>{const p=[];return r?.forEach(m=>{a(m)&&p.push({value:a(m),label:mt(Or,{children:[i(m),o(m)]}),parent:s(m),externalLink:f(m),navlink:c(m)})}),p},t=(r=[],o)=>{const i=[];for(const a of r){const s=a;if(!o&&!s?.parent||s?.parent===o){const c=t(r,s.value);c.length>0&&(s.children=c),i.push(s)}}return i},n=(r,o)=>{const i=[];if(!o)return[];const a=r.find(s=>s.value===o);return a&&(i.push(a.value),i.push(...n(r,a.parent))),i};return{renderTreeToSpecificFieldName:e,buildTree:t,findAllExpanded:n}};function jje({data:e,onClick:t,getOptionValue:n,getOptionIcon:r,getOptionLabel:o,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s,noDataText:c="no data",LinkComponent:f,hoverBackgroundColor:p,hoverTextColor:m,focusedBackgroundColor:v,focusedTextColor:y,...w}){const{buildTree:C,renderTreeToSpecificFieldName:k}=Hje(),T=C(k({data:e,getOptionLabel:o,getOptionIcon:r,getOptionValue:n,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s})),E=({data:R,children:P,isLeaf:$})=>{if(!$)return W(Or,{children:P});const z=t||!R.navlink?"span":R.externalLink?"a":f||"a",q=t?{onClick:()=>{t(R)}}:R.externalLink||!f?{href:R.navlink}:{to:R.navlink};return W(z,{...q,style:{textDecoration:"none",color:"inherit"},children:P})},_=R=>R.map(P=>W(E,{isLeaf:!(P.children&&P.children.length>0),data:P,children:W(lj,{nodeId:P.value,label:P.label,sx:{"& .MuiTreeItem-content":{flexDirection:"row-reverse",padding:"10px 15px",...w.treeItemContentStyle??{}},...p&&{"& .MuiTreeItem-content:hover":{backgroundColor:p,color:m}},...v&&{"& .MuiTreeItem-content.Mui-focused":{backgroundColor:v,color:y}},"& .MuiTreeItem-label":{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px",...w.treeItemLabelStyle??{}}},children:P.children&&P.children.length>0&&_(P?.children)},P.value)}));return W(Or,{children:T.length>0?W(aj,{defaultCollapseIcon:W(c1e,{}),defaultExpanded:[],defaultExpandIcon:W(s1e,{}),disableSelection:!0,...w,children:_(T)}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})}function Wje(e){return ir({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M10.25 2a8.25 8.25 0 0 1 6.34 13.53l5.69 5.69a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-5.69-5.69A8.25 8.25 0 1 1 10.25 2ZM3.5 10.25a6.75 6.75 0 1 0 13.5 0 6.75 6.75 0 0 0-13.5 0Z"}}]})(e)}function cj(e){let t;const n=(...r)=>{clearTimeout(t),t=setTimeout(()=>{e.onInputChange&&(!e.minLength||!r[1]||r[1].length>=e.minLength)&&e.onInputChange(...r)},300)};return W(Eg,{popupIcon:W(Wje,{size:"20px"}),...e,sx:{...e.sx,"& .MuiAutocomplete-popupIndicator":{transform:"none"}},onFocus:n,onInputChange:n,renderOption:(r,o)=>mt("div",{...r,className:"KdSearchableInput_options",children:[W("div",{className:"KdSearchableInput_option_icon",children:e.getOptionIcon?e.getOptionIcon(o):o?.icon}),mt("div",{children:[W("div",{className:"KdSearchableInput_option_label",children:e.getOptionLabel?e.getOptionLabel(o):o?.label}),W("div",{className:"KdSearchableInput_option_value",children:e.getOptionValue?e.getOptionValue(o):o?.id})]})]}),PaperComponent:r=>W("div",{...r,children:r.children}),ListboxComponent:r=>W(OE,{...r,style:{maxHeight:"40vh"},children:r.children}),PopperComponent:r=>r.open?mt("div",{...r,className:"KdSearchableInput_popper_component",children:[e.optionsLabel&&mt(Or,{children:[W("label",{className:"KdSearchableInput_popper_component_label",children:e.optionsLabel}),W(Z5,{})]}),e.loading?W("div",{className:"KdSearchableInput_popper_component_loading",children:W(ja,{size:"20px"})}):W(Or,{children:r.children})]}):null,filterOptions:r=>r,renderInput:e.renderInput?e.renderInput:r=>W(Km,{...r,size:"small",required:!!e?.required,variant:e?.variant,label:e?.label,helperText:e?.error?void 0:e?.helperText,error:!!e?.error})})}function Yje(e,t=globalThis?.document){const n=Is(e);dn(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const WO="dismissableLayer.update",Uje="dismissableLayer.pointerDownOutside",qje="dismissableLayer.focusOutside";let uj;const Kje=kf({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gje=or((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...f}=e,p=Sf(Kje),[m,v]=Tn(null),y=(n=m?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,w]=Tn({}),C=Aa(t,q=>v(q)),k=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(T),_=m?k.indexOf(m):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,P=_>=E,$=Xje(q=>{const Y=q.target,J=[...p.branches].some(K=>K.contains(Y));!P||J||(i?.(q),s?.(q),q.defaultPrevented||c?.())},y),z=Zje(q=>{const Y=q.target;[...p.branches].some(K=>K.contains(Y))||(a?.(q),s?.(q),q.defaultPrevented||c?.())},y);return Yje(q=>{_===p.layers.size-1&&(o?.(q),!q.defaultPrevented&&c&&(q.preventDefault(),c()))},y),dn(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(uj=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),dj(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=uj)}},[m,y,r,p]),dn(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),dj())},[m,p]),dn(()=>{const q=()=>w({});return document.addEventListener(WO,q),()=>document.removeEventListener(WO,q)},[]),cn(Ui.div,V({},f,{ref:C,style:{pointerEvents:R?P?"auto":"none":void 0,...e.style},onFocusCapture:hr(e.onFocusCapture,z.onFocusCapture),onBlurCapture:hr(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:hr(e.onPointerDownCapture,$.onPointerDownCapture)}))});function Xje(e,t=globalThis?.document){const n=Is(e),r=Yt(!1),o=Yt(()=>{});return dn(()=>{const i=s=>{if(s.target&&!r.current){let f=function(){fj(Uje,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zje(e,t=globalThis?.document){const n=Is(e),r=Yt(!1);return dn(()=>{const o=i=>{i.target&&!r.current&&fj(qje,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dj(){const e=new CustomEvent(WO);document.dispatchEvent(e)}function fj(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?cHe(o,i):o.dispatchEvent(i)}let YO=0;function Jje(){dn(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:hj()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:hj()),YO++,()=>{YO===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),YO--}},[])}function hj(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const UO="focusScope.autoFocusOnMount",qO="focusScope.autoFocusOnUnmount",pj={bubbles:!1,cancelable:!0},Qje=or((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=Tn(null),f=Is(o),p=Is(i),m=Yt(null),v=Aa(t,C=>c(C)),y=Yt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;dn(()=>{if(r){let C=function(_){if(y.paused||!s)return;const R=_.target;s.contains(R)?m.current=R:Au(m.current,{select:!0})},k=function(_){if(y.paused||!s)return;const R=_.relatedTarget;R!==null&&(s.contains(R)||Au(m.current,{select:!0}))},T=function(_){if(document.activeElement===document.body)for(const P of _)P.removedNodes.length>0&&Au(s)};document.addEventListener("focusin",C),document.addEventListener("focusout",k);const E=new MutationObserver(T);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",k),E.disconnect()}}},[r,s,y.paused]),dn(()=>{if(s){vj.add(y);const C=document.activeElement;if(!s.contains(C)){const T=new CustomEvent(UO,pj);s.addEventListener(UO,f),s.dispatchEvent(T),T.defaultPrevented||(eWe(iWe(mj(s)),{select:!0}),document.activeElement===C&&Au(s))}return()=>{s.removeEventListener(UO,f),setTimeout(()=>{const T=new CustomEvent(qO,pj);s.addEventListener(qO,p),s.dispatchEvent(T),T.defaultPrevented||Au(C??document.body,{select:!0}),s.removeEventListener(qO,p),vj.remove(y)},0)}}},[s,f,p,y]);const w=Zn(C=>{if(!n&&!r||y.paused)return;const k=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,T=document.activeElement;if(k&&T){const E=C.currentTarget,[_,R]=tWe(E);_&&R?!C.shiftKey&&T===R?(C.preventDefault(),n&&Au(_,{select:!0})):C.shiftKey&&T===_&&(C.preventDefault(),n&&Au(R,{select:!0})):T===E&&C.preventDefault()}},[n,r,y.paused]);return cn(Ui.div,V({tabIndex:-1},a,{ref:v,onKeyDown:w}))});function eWe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Au(r,{select:t}),document.activeElement!==n)return}function tWe(e){const t=mj(e),n=gj(t,e),r=gj(t.reverse(),e);return[n,r]}function mj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gj(e,t){for(const n of e)if(!nWe(n,{upTo:t}))return n}function nWe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function rWe(e){return e instanceof HTMLInputElement&&"select"in e}function Au(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&rWe(e)&&t&&e.select()}}const vj=oWe();function oWe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=bj(e,t),e.unshift(t)},remove(t){var n;e=bj(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function bj(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function iWe(e){return e.filter(t=>t.tagName!=="A")}const aWe=or((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return cn(Ui.svg,V({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:cn("polygon",{points:"0,0 30,0 15,10"}))}),sWe=aWe;function lWe(e){const[t,n]=Tn(void 0);return Pp(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;a=f.inlineSize,s=f.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const yj="Popper",[xj,wj]=Mp(yj),[cWe,Cj]=xj(yj),uWe=e=>{const{__scopePopper:t,children:n}=e,[r,o]=Tn(null);return cn(cWe,{scope:t,anchor:r,onAnchorChange:o},n)},dWe="PopperAnchor",fWe=or((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Cj(dWe,n),a=Yt(null),s=Aa(t,a);return dn(()=>{i.onAnchorChange(r?.current||a.current)}),r?null:cn(Ui.div,V({},o,{ref:s}))}),Sj="PopperContent",[hWe,pWe]=xj(Sj),mWe=or((e,t)=>{var n,r,o,i,a,s,c,f;const{__scopePopper:p,side:m="bottom",sideOffset:v=0,align:y="center",alignOffset:w=0,arrowPadding:C=0,avoidCollisions:k=!0,collisionBoundary:T=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:R=!1,updatePositionStrategy:P="optimized",onPlaced:$,...z}=e,q=Cj(Sj,p),[Y,J]=Tn(null),K=Aa(t,Ge=>J(Ge)),[ee,re]=Tn(null),ne=lWe(ee),oe=(n=ne?.width)!==null&&n!==void 0?n:0,fe=(r=ne?.height)!==null&&r!==void 0?r:0,se=m+(y!=="center"?"-"+y:""),ue=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},le=Array.isArray(T)?T:[T],ce=le.length>0,Se={padding:ue,boundary:le.filter(bWe),altBoundary:ce},{refs:Me,floatingStyles:ze,placement:ke,isPositioned:pe,middlewareData:Oe}=xJ({strategy:"fixed",placement:se,whileElementsMounted:(...Ge)=>fJ(...Ge,{animationFrame:P==="always"}),elements:{reference:q.anchor},middleware:[WZ({mainAxis:v+fe,alignmentAxis:w}),k&&hJ({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?vJ():void 0,...Se}),k&&pJ({...Se}),mJ({...Se,apply:({elements:Ge,rects:tt,availableWidth:ot,availableHeight:Fe})=>{const{width:$e,height:Ce}=tt.reference,De=Ge.floating.style;De.setProperty("--radix-popper-available-width",`${ot}px`),De.setProperty("--radix-popper-available-height",`${Fe}px`),De.setProperty("--radix-popper-anchor-width",`${$e}px`),De.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),ee&&yJ({element:ee,padding:C}),yWe({arrowWidth:oe,arrowHeight:fe}),R&&gJ({strategy:"referenceHidden",...Se})]}),[Ae,Pe]=Ej(ke),Ve=Is($);Pp(()=>{pe&&Ve?.()},[pe,Ve]);const Le=(o=Oe.arrow)===null||o===void 0?void 0:o.x,Ne=(i=Oe.arrow)===null||i===void 0?void 0:i.y,Te=((a=Oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[He,Ie]=Tn();return Pp(()=>{Y&&Ie(window.getComputedStyle(Y).zIndex)},[Y]),cn("div",{ref:Me.setFloating,"data-radix-popper-content-wrapper":"",style:{...ze,transform:pe?ze.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:He,"--radix-popper-transform-origin":[(s=Oe.transformOrigin)===null||s===void 0?void 0:s.x,(c=Oe.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},cn(hWe,{scope:p,placedSide:Ae,onArrowChange:re,arrowX:Le,arrowY:Ne,shouldHideArrow:Te},cn(Ui.div,V({"data-side":Ae,"data-align":Pe},z,{ref:K,style:{...z.style,animation:pe?void 0:"none",opacity:(f=Oe.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))}),kj="PopperArrow",gWe={top:"bottom",right:"left",bottom:"top",left:"right"},vWe=or(function(t,n){const{__scopePopper:r,...o}=t,i=pWe(kj,r),a=gWe[i.placedSide];return cn("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},cn(sWe,V({},o,{ref:n,style:{...o.style,display:"block"}})))});function bWe(e){return e!==null}const yWe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:f}=t,m=((n=f.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,v=m?0:e.arrowWidth,y=m?0:e.arrowHeight,[w,C]=Ej(s),k={start:"0%",center:"50%",end:"100%"}[C],T=((r=(o=f.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+v/2,E=((i=(a=f.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+y/2;let _="",R="";return w==="bottom"?(_=m?k:`${T}px`,R=`${-y}px`):w==="top"?(_=m?k:`${T}px`,R=`${c.floating.height+y}px`):w==="right"?(_=`${-y}px`,R=m?k:`${E}px`):w==="left"&&(_=`${c.floating.width+y}px`,R=m?k:`${E}px`),{data:{x:_,y:R}}}});function Ej(e){const[t,n="center"]=e.split("-");return[t,n]}const Tj=uWe,xWe=fWe,wWe=mWe,CWe=or((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Ef.createPortal(cn(Ui.div,V({},o,{ref:t})),r):null});var $w="right-scroll-bar-position",Fw="width-before-scroll-bar",SWe="with-scroll-bars-hidden",kWe="--removed-body-scroll-bar-size";function KO(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function EWe(e,t){var n=Tn(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Dj=new WeakMap;function TWe(e,t){var n=EWe(t||null,function(r){return e.forEach(function(o){return KO(o,r)})});return A.useLayoutEffect(function(){var r=Dj.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||KO(s,null)}),i.forEach(function(s){o.has(s)||KO(s,a)})}Dj.set(n,e)},[e]),n}function DWe(e){return e}function AWe(e,t){t===void 0&&(t=DWe);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var p=a;a=[],p.forEach(i)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(p){a.push(p),f()},filter:function(p){return a=a.filter(p),n}}}};return o}function OWe(e){e===void 0&&(e={});var t=AWe(null);return t.options=fl({async:!0,ssr:!1},e),t}var Aj=function(e){var t=e.sideCar,n=J5(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,fl({},n))};Aj.isSideCarExport=!0;function MWe(e,t){return e.useMedium(t),Aj}var Oj=OWe(),GO=function(){},Bw=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:GO,onWheelCapture:GO,onTouchMoveCapture:GO}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,v=e.sideCar,y=e.noIsolation,w=e.inert,C=e.allowPinchZoom,k=e.as,T=k===void 0?"div":k,E=J5(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=v,R=TWe([n,t]),P=fl(fl({},E),o);return A.createElement(A.Fragment,null,p&&A.createElement(_,{sideCar:Oj,removeScrollBar:f,shards:m,noIsolation:y,inert:w,setCallbacks:i,allowPinchZoom:!!C,lockRef:n}),a?A.cloneElement(A.Children.only(s),fl(fl({},P),{ref:R})):A.createElement(T,fl({},P,{className:c,ref:R}),s))});Bw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bw.classNames={fullWidth:Fw,zeroRight:$w};var PWe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NWe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=PWe();return t&&e.setAttribute("nonce",t),e}function _We(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RWe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var IWe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=NWe())&&(_We(t,n),RWe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},LWe=function(){var e=IWe();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mj=function(){var e=LWe(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},$We={left:0,top:0,right:0,gap:0},XO=function(e){return parseInt(e||"",10)||0},FWe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[XO(n),XO(r),XO(o)]},BWe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $We;var t=FWe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},zWe=Mj(),zw="data-scroll-locked",VWe=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
1435
|
+
.`.concat(SWe,` {
|
|
1436
1436
|
overflow: hidden `).concat(r,`;
|
|
1437
1437
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
1438
1438
|
}
|
|
@@ -1466,9 +1466,9 @@ Message: ${e}`),e}}const gu=e=>typeof e=="string",A3e=e=>typeof e=="function",B7
|
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
1468
|
body[`).concat(zw,`] {
|
|
1469
|
-
`).concat(
|
|
1469
|
+
`).concat(kWe,": ").concat(s,`px;
|
|
1470
1470
|
}
|
|
1471
|
-
`)},
|
|
1471
|
+
`)},HWe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=A.useMemo(function(){return BWe(o)},[o]);return A.useEffect(function(){return document.body.setAttribute(zw,""),function(){document.body.removeAttribute(zw)}},[]),A.createElement(zWe,{styles:VWe(i,!t,o,n?"":"!important")})},ZO=!1;if(typeof window<"u")try{var Vw=Object.defineProperty({},"passive",{get:function(){return ZO=!0,!0}});window.addEventListener("test",Vw,Vw),window.removeEventListener("test",Vw,Vw)}catch{ZO=!1}var Rp=ZO?{passive:!1}:!1,jWe=function(e){return e.tagName==="TEXTAREA"},Pj=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jWe(e)&&n[t]==="visible")},WWe=function(e){return Pj(e,"overflowY")},YWe=function(e){return Pj(e,"overflowX")},Nj=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_j(e,n);if(r){var o=Rj(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},UWe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},qWe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_j=function(e,t){return e==="v"?WWe(t):YWe(t)},Rj=function(e,t){return e==="v"?UWe(t):qWe(t)},KWe=function(e,t){return e==="h"&&t==="rtl"?-1:1},GWe=function(e,t,n,r,o){var i=KWe(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),f=!1,p=a>0,m=0,v=0;do{var y=Rj(e,s),w=y[0],C=y[1],k=y[2],T=C-k-i*w;(w||T)&&_j(e,s)&&(m+=T,v+=w),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(p&&(o&&m===0||!o&&a>m)||!p&&(o&&v===0||!o&&-a>v))&&(f=!0),f},Hw=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ij=function(e){return[e.deltaX,e.deltaY]},Lj=function(e){return e&&"current"in e?e.current:e},XWe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZWe=function(e){return`
|
|
1472
1472
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
1473
1473
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
1474
|
-
`)},XWe=0,Ip=[];function ZWe(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),o=A.useState(XWe++)[0],i=A.useState(function(){return Mj()})[0],a=A.useRef(e);A.useEffect(function(){a.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=bE([e.lockRef.current],(e.shards||[]).map(Lj),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=A.useCallback(function(C,k){if("touches"in C&&C.touches.length===2)return!a.current.allowPinchZoom;var T=Hw(C),E=n.current,_="deltaX"in C?C.deltaX:E[0]-T[0],R="deltaY"in C?C.deltaY:E[1]-T[1],P,$=C.target,z=Math.abs(_)>Math.abs(R)?"h":"v";if("touches"in C&&z==="h"&&$.type==="range")return!1;var q=Nj(z,$);if(!q)return!0;if(q?P=z:(P=z==="v"?"h":"v",q=Nj(z,$)),!q)return!1;if(!r.current&&"changedTouches"in C&&(_||R)&&(r.current=P),!P)return!0;var Y=r.current||P;return qWe(Y,k,C,Y==="h"?_:R,!0)},[]),c=A.useCallback(function(C){var k=C;if(!(!Ip.length||Ip[Ip.length-1]!==i)){var T="deltaY"in k?Ij(k):Hw(k),E=t.current.filter(function(P){return P.name===k.type&&P.target===k.target&&KWe(P.delta,T)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var _=(a.current.shards||[]).map(Lj).filter(Boolean).filter(function(P){return P.contains(k.target)}),R=_.length>0?s(k,_[0]):!a.current.noIsolation;R&&k.cancelable&&k.preventDefault()}}},[]),f=A.useCallback(function(C,k,T,E){var _={name:C,delta:k,target:T,should:E};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(R){return R!==_})},1)},[]),p=A.useCallback(function(C){n.current=Hw(C),r.current=void 0},[]),m=A.useCallback(function(C){f(C.type,Ij(C),C.target,s(C,e.lockRef.current))},[]),v=A.useCallback(function(C){f(C.type,Hw(C),C.target,s(C,e.lockRef.current))},[]);A.useEffect(function(){return Ip.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Rp),document.addEventListener("touchmove",c,Rp),document.addEventListener("touchstart",p,Rp),function(){Ip=Ip.filter(function(C){return C!==i}),document.removeEventListener("wheel",c,Rp),document.removeEventListener("touchmove",c,Rp),document.removeEventListener("touchstart",p,Rp)}},[]);var y=e.removeScrollBar,w=e.inert;return A.createElement(A.Fragment,null,w?A.createElement(i,{styles:GWe(o)}):null,y?A.createElement(zWe,{gapMode:"margin"}):null)}var JWe=AWe(Oj,ZWe),$j=A.forwardRef(function(e,t){return A.createElement(Bw,fl({},e,{ref:t,sideCar:JWe}))});$j.classNames=Bw.classNames;var QWe=$j;const Fj=["Enter"," "],eYe=["ArrowDown","PageUp","Home"],Bj=["ArrowUp","PageDown","End"],tYe=[...eYe,...Bj],nYe={ltr:[...Fj,"ArrowRight"],rtl:[...Fj,"ArrowLeft"]},rYe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jw="Menu",[mb,oYe,iYe]=DO(jw),[rf,aYe]=Mp(jw,[iYe,wj,Np]),Ww=wj(),zj=Np(),[Vj,Ou]=rf(jw),[sYe,Yw]=rf(jw),lYe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ww(t),[c,f]=Tn(null),p=Yt(!1),m=Is(i),v=Iw(o);return dn(()=>{const y=()=>{p.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>p.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),cn(Tj,s,cn(Vj,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:f},cn(sYe,{scope:t,onClose:Zn(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:v,modal:a},r)))},Hj=or((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ww(n);return cn(bWe,V({},o,r,{ref:t}))}),jj="MenuPortal",[cYe,Wj]=rf(jj,{forceMount:void 0}),uYe=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Ou(jj,t);return cn(cYe,{scope:t,forceMount:n},cn(hb,{present:n||i.open},cn(xWe,{asChild:!0,container:o},r)))},Ls="MenuContent",[dYe,Yj]=rf(Ls),fYe=or((e,t)=>{const n=Wj(Ls,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ou(Ls,e.__scopeMenu),a=Yw(Ls,e.__scopeMenu);return cn(mb.Provider,{scope:e.__scopeMenu},cn(hb,{present:r||i.open},cn(mb.Slot,{scope:e.__scopeMenu},a.modal?cn(hYe,V({},o,{ref:t})):cn(pYe,V({},o,{ref:t})))))}),hYe=or((e,t)=>{const n=Ou(Ls,e.__scopeMenu),r=Yt(null),o=Aa(t,r);return dn(()=>{const i=r.current;if(i)return WFe(i)},[]),cn(JO,V({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:hr(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),pYe=or((e,t)=>{const n=Ou(Ls,e.__scopeMenu);return cn(JO,V({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),JO=or((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:y,disableOutsideScroll:w,...C}=e,k=Ou(Ls,n),T=Yw(Ls,n),E=Ww(n),_=zj(n),R=oYe(n),[P,$]=Tn(null),z=Yt(null),q=Aa(t,z,k.onContentChange),Y=Yt(0),J=Yt(""),K=Yt(0),ee=Yt(null),re=Yt("right"),ne=Yt(0),oe=w?QWe:Q2,fe=w?{as:fb,allowPinchZoom:!0}:void 0,se=le=>{var ce,Se;const Me=J.current+le,ze=R().filter(Ve=>!Ve.disabled),ke=document.activeElement,pe=(ce=ze.find(Ve=>Ve.ref.current===ke))===null||ce===void 0?void 0:ce.textValue,Oe=ze.map(Ve=>Ve.textValue),Ae=TYe(Oe,Me,pe),Pe=(Se=ze.find(Ve=>Ve.textValue===Ae))===null||Se===void 0?void 0:Se.ref.current;(function Ve(Le){J.current=Le,window.clearTimeout(Y.current),Le!==""&&(Y.current=window.setTimeout(()=>Ve(""),1e3))})(Me),Pe&&setTimeout(()=>Pe.focus())};dn(()=>()=>window.clearTimeout(Y.current),[]),Xje();const ue=Zn(le=>{var ce,Se;return re.current===((ce=ee.current)===null||ce===void 0?void 0:ce.side)&&AYe(le,(Se=ee.current)===null||Se===void 0?void 0:Se.area)},[]);return cn(dYe,{scope:n,searchRef:J,onItemEnter:Zn(le=>{ue(le)&&le.preventDefault()},[ue]),onItemLeave:Zn(le=>{var ce;ue(le)||((ce=z.current)===null||ce===void 0||ce.focus(),$(null))},[ue]),onTriggerLeave:Zn(le=>{ue(le)&&le.preventDefault()},[ue]),pointerGraceTimerRef:K,onPointerGraceIntentChange:Zn(le=>{ee.current=le},[])},cn(oe,fe,cn(Zje,{asChild:!0,trapped:o,onMountAutoFocus:hr(i,le=>{var ce;le.preventDefault(),(ce=z.current)===null||ce===void 0||ce.focus()}),onUnmountAutoFocus:a},cn(qje,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:y},cn(PO,V({asChild:!0},_,{dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:$,onEntryFocus:hr(c,le=>{T.isUsingKeyboardRef.current||le.preventDefault()})}),cn(yWe,V({role:"menu","aria-orientation":"vertical","data-state":Kj(k.open),"data-radix-menu-content":"",dir:T.dir},E,C,{ref:q,style:{outline:"none",...C.style},onKeyDown:hr(C.onKeyDown,le=>{const Se=le.target.closest("[data-radix-menu-content]")===le.currentTarget,Me=le.ctrlKey||le.altKey||le.metaKey,ze=le.key.length===1;Se&&(le.key==="Tab"&&le.preventDefault(),!Me&&ze&&se(le.key));const ke=z.current;if(le.target!==ke||!tYe.includes(le.key))return;le.preventDefault();const Oe=R().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);Bj.includes(le.key)&&Oe.reverse(),kYe(Oe)}),onBlur:hr(e.onBlur,le=>{le.currentTarget.contains(le.target)||(window.clearTimeout(Y.current),J.current="")}),onPointerMove:hr(e.onPointerMove,gb(le=>{const ce=le.target,Se=ne.current!==le.clientX;if(le.currentTarget.contains(ce)&&Se){const Me=le.clientX>ne.current?"right":"left";re.current=Me,ne.current=le.clientX}}))})))))))}),mYe="MenuItem",gYe=or((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=Yj(mYe,n),s=zj(n),c=Yt(null),f=Aa(t,c),[p,m]=Tn(!1),[v,y]=Tn("");return dn(()=>{const w=c.current;if(w){var C;y(((C=w.textContent)!==null&&C!==void 0?C:"").trim())}},[i.children]),cn(mb.ItemSlot,{scope:n,disabled:r,textValue:o??v},cn(NO,V({asChild:!0},s,{focusable:!r}),cn(Ui.div,V({role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:f,onPointerMove:hr(e.onPointerMove,gb(w=>{r?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus())})),onPointerLeave:hr(e.onPointerLeave,gb(w=>a.onItemLeave(w))),onFocus:hr(e.onFocus,()=>m(!0)),onBlur:hr(e.onBlur,()=>m(!1))}))))}),vYe="MenuRadioGroup";rf(vYe,{value:void 0,onValueChange:()=>{}});const bYe="MenuItemIndicator";rf(bYe,{checked:!1});const Uj="MenuSub",[yYe,qj]=rf(Uj),xYe=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=Ou(Uj,t),a=Ww(t),[s,c]=Tn(null),[f,p]=Tn(null),m=Is(o);return dn(()=>(i.open===!1&&m(!1),()=>m(!1)),[i.open,m]),cn(Tj,a,cn(Vj,{scope:t,open:r,onOpenChange:m,content:f,onContentChange:p},cn(yYe,{scope:t,contentId:nf(),triggerId:nf(),trigger:s,onTriggerChange:c},n)))},Uw="MenuSubTrigger",wYe=or((e,t)=>{const n=Ou(Uw,e.__scopeMenu),r=Yw(Uw,e.__scopeMenu),o=qj(Uw,e.__scopeMenu),i=Yj(Uw,e.__scopeMenu),a=Yt(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=i,f={__scopeMenu:e.__scopeMenu},p=Zn(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return dn(()=>p,[p]),dn(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),cn(Hj,V({asChild:!0},f),cn(gYe,V({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Kj(n.open)},e,{ref:EO(t,o.onTriggerChange),onClick:m=>{var v;(v=e.onClick)===null||v===void 0||v.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:hr(e.onPointerMove,gb(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:hr(e.onPointerLeave,gb(m=>{var v;p();const y=(v=n.content)===null||v===void 0?void 0:v.getBoundingClientRect();if(y){var w;const C=(w=n.content)===null||w===void 0?void 0:w.dataset.side,k=C==="right",T=k?-5:5,E=y[k?"left":"right"],_=y[k?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+T,y:m.clientY},{x:E,y:y.top},{x:_,y:y.top},{x:_,y:y.bottom},{x:E,y:y.bottom}],side:C}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:hr(e.onKeyDown,m=>{const v=i.searchRef.current!=="";if(!(e.disabled||v&&m.key===" ")&&nYe[r.dir].includes(m.key)){var y;n.onOpenChange(!0),(y=n.content)===null||y===void 0||y.focus(),m.preventDefault()}})})))}),CYe="MenuSubContent",SYe=or((e,t)=>{const n=Wj(Ls,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ou(Ls,e.__scopeMenu),a=Yw(Ls,e.__scopeMenu),s=qj(CYe,e.__scopeMenu),c=Yt(null),f=Aa(t,c);return cn(mb.Provider,{scope:e.__scopeMenu},cn(hb,{present:r||i.open},cn(mb.Slot,{scope:e.__scopeMenu},cn(JO,V({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var m;a.isUsingKeyboardRef.current&&((m=c.current)===null||m===void 0||m.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:hr(e.onFocusOutside,p=>{p.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:hr(e.onEscapeKeyDown,p=>{a.onClose(),p.preventDefault()}),onKeyDown:hr(e.onKeyDown,p=>{const m=p.currentTarget.contains(p.target),v=rYe[a.dir].includes(p.key);if(m&&v){var y;i.onOpenChange(!1),(y=s.trigger)===null||y===void 0||y.focus(),p.preventDefault()}})})))))});function Kj(e){return e?"open":"closed"}function kYe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function EYe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function TYe(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=EYe(e,Math.max(i,0));o.length===1&&(a=a.filter(f=>f!==n));const c=a.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function DYe(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,f=t[a].x,p=t[a].y;c>r!=p>r&&n<(f-s)*(r-c)/(p-c)+s&&(o=!o)}return o}function AYe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return DYe(n,t)}function gb(e){return t=>t.pointerType==="mouse"?e(t):void 0}const OYe=lYe,MYe=Hj,PYe=uYe,NYe=fYe,_Ye=xYe,RYe=wYe,IYe=SYe,QO="Menubar",[eM,LYe,$Ye]=DO(QO),[Gj,OUe]=Mp(QO,[$Ye,Np]),of=aYe(),Xj=Np(),[FYe,tM]=Gj(QO),BYe=or((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:i,loop:a=!0,dir:s,...c}=e,f=Iw(s),p=Xj(n),[m="",v]=Rw({prop:r,onChange:o,defaultProp:i}),[y,w]=Tn(null);return cn(FYe,{scope:n,value:m,onMenuOpen:Zn(C=>{v(C),w(C)},[v]),onMenuClose:Zn(()=>v(""),[v]),onMenuToggle:Zn(C=>{v(k=>k?"":C),w(C)},[v]),dir:f,loop:a},cn(eM.Provider,{scope:n},cn(eM.Slot,{scope:n},cn(PO,V({asChild:!0},p,{orientation:"horizontal",loop:a,dir:f,currentTabStopId:y,onCurrentTabStopIdChange:w}),cn(Ui.div,V({role:"menubar"},c,{ref:t}))))))}),Zj="MenubarMenu",[zYe,Jj]=Gj(Zj),VYe=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=nf(),i=n||o||"LEGACY_REACT_AUTO_VALUE",a=tM(Zj,t),s=of(t),c=Yt(null),f=Yt(!1),p=a.value===i;return dn(()=>{p||(f.current=!1)},[p]),cn(zYe,{scope:t,value:i,triggerId:nf(),triggerRef:c,contentId:nf(),wasKeyboardTriggerOpenRef:f},cn(OYe,V({},s,{open:p,onOpenChange:m=>{m||a.onMenuClose()},modal:!1,dir:a.dir},r)))},Qj="MenubarTrigger",HYe=or((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,i=Xj(n),a=of(n),s=tM(Qj,n),c=Jj(Qj,n),f=Yt(null),p=Aa(t,f,c.triggerRef),[m,v]=Tn(!1),y=s.value===c.value;return cn(eM.ItemSlot,{scope:n,value:c.value,disabled:r},cn(NO,V({asChild:!0},i,{focusable:!r,tabStopId:c.value}),cn(MYe,V({asChild:!0},a),cn(Ui.button,V({type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":y,"aria-controls":y?c.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":y?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:p,onPointerDown:hr(e.onPointerDown,w=>{!r&&w.button===0&&w.ctrlKey===!1&&(s.onMenuOpen(c.value),y||w.preventDefault())}),onPointerEnter:hr(e.onPointerEnter,()=>{if(!!s.value&&!y){var C;s.onMenuOpen(c.value),(C=f.current)===null||C===void 0||C.focus()}}),onKeyDown:hr(e.onKeyDown,w=>{r||(["Enter"," "].includes(w.key)&&s.onMenuToggle(c.value),w.key==="ArrowDown"&&s.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(w.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,w.preventDefault()))}),onFocus:hr(e.onFocus,()=>v(!0)),onBlur:hr(e.onBlur,()=>v(!1))})))))}),jYe=e=>{const{__scopeMenubar:t,...n}=e,r=of(t);return cn(PYe,V({},r,n))},eW="MenubarContent",WYe=or((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,i=of(n),a=tM(eW,n),s=Jj(eW,n),c=LYe(n),f=Yt(!1);return cn(NYe,V({id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":""},i,o,{ref:t,align:r,onCloseAutoFocus:hr(e.onCloseAutoFocus,p=>{if(!!!a.value&&!f.current){var v;(v=s.triggerRef.current)===null||v===void 0||v.focus()}f.current=!1,p.preventDefault()}),onFocusOutside:hr(e.onFocusOutside,p=>{const m=p.target;c().some(y=>{var w;return(w=y.ref.current)===null||w===void 0?void 0:w.contains(m)})&&p.preventDefault()}),onInteractOutside:hr(e.onInteractOutside,()=>{f.current=!0}),onEntryFocus:p=>{s.wasKeyboardTriggerOpenRef.current||p.preventDefault()},onKeyDown:hr(e.onKeyDown,p=>{if(["ArrowRight","ArrowLeft"].includes(p.key)){const m=p.target,v=m.hasAttribute("data-radix-menubar-subtrigger"),y=m.closest("[data-radix-menubar-content]")!==p.currentTarget,C=(a.dir==="rtl"?"ArrowRight":"ArrowLeft")===p.key;if(!C&&v||y&&C)return;let E=c().filter(P=>!P.disabled).map(P=>P.value);C&&E.reverse();const _=E.indexOf(s.value);E=a.loop?KYe(E,_+1):E.slice(_+1);const[R]=E;R&&a.onMenuOpen(R)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))}),YYe=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=of(t),[s=!1,c]=Rw({prop:r,defaultProp:i,onChange:o});return cn(_Ye,V({},a,{open:s,onOpenChange:c}),n)},UYe=or((e,t)=>{const{__scopeMenubar:n,...r}=e,o=of(n);return cn(RYe,V({"data-radix-menubar-subtrigger":""},o,r,{ref:t}))}),qYe=or((e,t)=>{const{__scopeMenubar:n,...r}=e,o=of(n);return cn(IYe,V({},o,{"data-radix-menubar-content":""},r,{ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))});function KYe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const tW=BYe,nW=VYe,rW=HYe,nM=jYe,oW=WYe,GYe=YYe,XYe=UYe,ZYe=qYe,JYe=()=>{const e=({data:n,getOptionLabel:r=c=>c.label,getOptionValue:o=c=>c.value,getOptionParent:i=c=>c.parent,getOptionNavlink:a=c=>c.navlink,getOptionExternalLink:s=c=>c.externalLink})=>{const c=[];return n?.forEach(f=>{o(f)&&c.push({value:o(f),label:r(f),parent:i(f),externalLink:s(f),navlink:a(f)})}),c},t=(n=[],r)=>{const o=[];return n.forEach(i=>{const a=i;if(!r&&!a?.parent||a?.parent===r){const s=t(n,a.value);s.length>0&&(a.children=s),o.push(a)}}),o};return{renderMenubarToSpecificFieldName:e,buildMenubar:t}},QYe=({data:e,onClick:t,orientation:n="horizontal",getOptionValue:r,getOptionLabel:o,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s,noDataText:c="no data",LinkComponent:f,...p})=>{const{buildMenubar:m,renderMenubarToSpecificFieldName:v}=JYe(),y=m(v({data:e,getOptionLabel:o,getOptionValue:r,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s})),w=({data:T})=>mt(nW,{children:[mt(rW,{className:"MenubarTrigger",children:[T.label,W("div",{className:"LeftMainSlot",children:W(h6e,{size:10})})]}),W(nM,{children:W(oW,{className:"MenubarContent",align:"start",side:n==="horizontal"?"bottom":"right",sideOffset:5,children:(T.children??[]).map(E=>E.children&&E.children.length>0?W(k,{data:E}):W(C,{data:E}))})})]}),C=({data:T})=>{const E=t||!T.navlink?"span":T.externalLink?"a":f||"a",_=t?{onClick:()=>{t(T)}}:T.externalLink||!f?{href:T.navlink}:{to:T.navlink};return W(E,{className:"MenubarItem MenubarTriggerText",..._,children:T.label})},k=({data:T})=>mt(GYe,{children:[mt(XYe,{className:"MenubarSubTrigger",children:[W("span",{className:"MenubarTriggerText",children:T.label}),W("div",{className:"LeftSlot",children:W(p6e,{size:10})})]}),W(nM,{children:W(ZYe,{className:"MenubarSubContent",alignOffset:-5,sideOffset:10,children:(T.children??[]).map(E=>E.children&&E.children.length>0?W(k,{data:E}):W(C,{data:E}))})})]});return W(Or,{children:y.length>0?W(tW,{...p,className:"MenubarRoot",dir:"rtl",style:{flexDirection:n==="horizontal"?"unset":"column",...p.style},children:y.map(T=>W(w,{data:T,...p}))}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})};function eUe({label:e,...t}){return W(aR,{...t,label:e,sx:{margin:"0px","& .MuiFormControlLabel-label":{width:"100%",border:n=>t.isActive?`2px solid ${n.palette.primary.main}`:"unset"}},control:W(lL,{sx:{display:"none"}})})}function tUe(e){return W(ja,{...e})}var iW,aW;function rM(){return rM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rM.apply(this,arguments)}var sW=function(t){return A.createElement("svg",rM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480"},t),iW||(iW=A.createElement("defs",null,A.createElement("clipPath",{id:"ir_svg__a"},A.createElement("path",{fillOpacity:.7,d:"M-85.3 0h682.7v512H-85.3z"})))),aW||(aW=A.createElement("g",{fillRule:"evenodd",clipPath:"url(#ir_svg__a)",transform:"translate(80)scale(.9375)"},A.createElement("path",{fill:"#fff",d:"M-192 0h896v512h-896z"}),A.createElement("path",{fill:"#da0000",d:"M-192 343.8h896V512h-896z"}),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-21.6 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M52.4 367.7v3.4H33.8v-3.4zm-34.6-7.9H21v11.3h-3.3z"}),A.createElement("path",{d:"M49.6 351H53v20h-3.4zm-8.4 0h3.3v20h-3.3zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M17.8 359.9H21V371h-3.3z"}),A.createElement("path",{d:"M17.8 359.9H21V371h-3.3z"}),A.createElement("path",{d:"M17.8 359.9H21V371h-3.3zm-39.3 0h3.3V371h-3.3zm28.8 0h3.4V371H7.3zm-14.3 0h3.4V371H-7z"}),A.createElement("path",{d:"M9.6 367.7v3.4H-5.5v-3.4zm1-8.7v3.4H1V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-102.2 351h49v3.3h-49zm7.3 16.8h3.4v3.3H-95zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M-28.2 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-31 351h3.4v20H-31zm-8.4 0h3.3v20h-3.3zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M-62.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M-62.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M-62.8 359.9h3.3V371h-3.3zm-39.3 0h3.3V371h-3.3zm28.8 0h3.3V371h-3.3zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M-71 367.7v3.4h-15v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M58.3 351h49v3.3h-49zm7.3 16.8H69v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.3-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M132.3 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M129.5 351h3.4v20h-3.4zm-8.4 0h3.4v20H121zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M97.7 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M97.7 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M97.7 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M89.6 367.7v3.4H74.4v-3.4zm1-8.7v3.4H81V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M622.7 351h49v3.3h-49zm7.3 16.8h3.4v3.3H630zm41.9 0v3.3H662v-3.4zm5.3-16.8h3.3v20h-3.4z"}),A.createElement("path",{d:"M696.7 367.7v3.4H678v-3.4zm-34.6-7.9h3.4v11.3H662z"}),A.createElement("path",{d:"M694 351h3.3v20h-3.4zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M662 359.9h3.5V371H662z"}),A.createElement("path",{d:"M662 359.9h3.5V371H662z"}),A.createElement("path",{d:"M662 359.9h3.5V371H662zm-39.2 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M654 367.7v3.4h-15.2v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M138.7 351h49.1v3.3h-49zm7.4 16.8h3.3v3.3h-3.3zm41.8 0v3.3h-9.8v-3.4zm5.3-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M212.8 367.7v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M210 351h3.4v20H210zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-17.9V359zm39.3 0v3.4h-17.9V359z"}),A.createElement("path",{d:"M178.1 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M178.1 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M178.1 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.2 0h3.3V371h-3.3z"}),A.createElement("path",{d:"M170 367.7v3.4h-15.1v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M219.5 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zM274 351h3.3v20H274z"}),A.createElement("path",{d:"M293.5 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M290.7 351h3.4v20h-3.4zm-8.4 0h3.4v20h-3.4zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M258.9 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M258.9 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M258.9 359.9h3.4V371h-3.4zm-39.3 0h3.3V371h-3.3zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371H234z"}),A.createElement("path",{d:"M250.8 367.7v3.4h-15.2v-3.4zm1-8.7v3.4H242V359z"})),A.createElement("path",{fill:"#239f40",d:"M-192 0h896v168.2h-896z"}),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M300.7 351h49v3.3h-49zm7.3 16.8h3.4v3.3H308zm41.9 0v3.3H340v-3.4zm5.3-16.8h3.3v20h-3.3z"}),A.createElement("path",{d:"M374.7 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3H340z"}),A.createElement("path",{d:"M372 351h3.3v20H372zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M340 359.9h3.5V371H340z"}),A.createElement("path",{d:"M340 359.9h3.5V371H340z"}),A.createElement("path",{d:"M340 359.9h3.5V371H340zm-39.2 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M332 367.7v3.4h-15.2v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M381.4 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm42 0v3.3h-9.9v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M455.4 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M452.7 351h3.3v20h-3.3zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-17.9V359zm39.3 0v3.4h-17.9V359z"}),A.createElement("path",{d:"M420.8 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M420.8 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M420.8 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.3z"}),A.createElement("path",{d:"M412.7 367.7v3.4h-15.1v-3.4zm1-8.7v3.4H404V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M462.2 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M536.2 367.7v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M533.4 351h3.4v20h-3.4zm-8.4 0h3.3v20H525zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M501.6 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M501.6 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M501.6 359.9h3.3V371h-3.3zm-39.4 0h3.4V371h-3.4zm28.9 0h3.3V371h-3.3zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M493.4 367.7v3.4h-15.1v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M543.4 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M617.4 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M614.6 351h3.4v20h-3.4zm-8.4 0h3.3v20h-3.3zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M582.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M582.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M582.8 359.9h3.3V371h-3.3zm-39.3 0h3.3V371h-3.3zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371H558z"}),A.createElement("path",{d:"M574.6 367.7v3.4h-15.1v-3.4zm1-8.7v3.4H566V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-183.8 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm42 0v3.3h-9.9v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M-109.8 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-112.5 351h3.3v20h-3.3zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-17.9V359zm39.3 0v3.4h-17.9V359z"}),A.createElement("path",{d:"M-144.4 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M-144.4 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M-144.4 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M-152.5 367.7v3.4h-15.2v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-21.6 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M52.4 160.2v3.4H33.8v-3.4zm-34.6-7.9H21v11.3h-3.3z"}),A.createElement("path",{d:"M49.6 143.4H53v20.2h-3.4zm-8.4 0h3.3v20.2h-3.3zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M17.8 152.3H21v11.3h-3.3z"}),A.createElement("path",{d:"M17.8 152.3H21v11.3h-3.3z"}),A.createElement("path",{d:"M17.8 152.3H21v11.3h-3.3zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.4v11.3H7.3zm-14.3 0h3.4v11.3H-7z"}),A.createElement("path",{d:"M9.6 160.2v3.4H-5.5v-3.4zm1-8.7v3.3H1v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-102.2 143.4h49v3.4h-49zm7.3 17h3.4v3.2H-95zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M-28.2 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-31 143.4h3.4v20.2H-31zm-8.4 0h3.3v20.2h-3.3zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M-62.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-62.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-62.8 152.3h3.3v11.3h-3.3zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.3v11.3h-3.3zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-71 160.2v3.4h-15v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M58.3 143.4h49v3.4h-49zm7.3 17H69v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.3-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M132.3 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M129.5 143.4h3.4v20.2h-3.4zm-8.4 0h3.4v20.2H121zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M97.7 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M97.7 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M97.7 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M89.6 160.2v3.4H74.4v-3.4zm1-8.7v3.3H81v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M622.7 143.4h49v3.4h-49zm7.3 17h3.4v3.2H630zm41.9-.2v3.4H662v-3.4zm5.3-16.8h3.3v20.2h-3.4z"}),A.createElement("path",{d:"M696.7 160.2v3.4H678v-3.4zm-34.6-7.9h3.4v11.3H662z"}),A.createElement("path",{d:"M694 143.4h3.3v20.2h-3.4zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M662 152.3h3.5v11.3H662z"}),A.createElement("path",{d:"M662 152.3h3.5v11.3H662z"}),A.createElement("path",{d:"M662 152.3h3.5v11.3H662zm-39.2 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M654 160.2v3.4h-15.2v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M138.7 143.4h49.1v3.4h-49zm7.4 17h3.3v3.2h-3.3zm41.8-.2v3.4h-9.8v-3.4zm5.3-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M212.8 160.2v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M210 143.4h3.4v20.2H210zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-17.9v-3.3zm39.3 0v3.4h-17.9v-3.3z"}),A.createElement("path",{d:"M178.1 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M178.1 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M178.1 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.2 0h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M170 160.2v3.4h-15.1v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M219.5 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.3-16.8h3.3v20.2H274z"}),A.createElement("path",{d:"M293.5 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M290.7 143.4h3.4v20.2h-3.4zm-8.4 0h3.4v20.2h-3.4zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M258.9 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M258.9 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M258.9 152.3h3.4v11.3h-3.4zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3H234z"}),A.createElement("path",{d:"M250.8 160.2v3.4h-15.2v-3.4zm1-8.7v3.3H242v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M300.7 143.4h49v3.4h-49zm7.3 17h3.4v3.2H308zm41.9-.2v3.4H340v-3.4zm5.3-16.8h3.3v20.2h-3.3z"}),A.createElement("path",{d:"M374.7 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3H340z"}),A.createElement("path",{d:"M372 143.4h3.3v20.2H372zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M340 152.3h3.5v11.3H340z"}),A.createElement("path",{d:"M340 152.3h3.5v11.3H340z"}),A.createElement("path",{d:"M340 152.3h3.5v11.3H340zm-39.2 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M332 160.2v3.4h-15.2v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M381.4 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm42-.2v3.4h-9.9v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M455.4 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M452.7 143.4h3.3v20.2h-3.3zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-17.9v-3.3zm39.3 0v3.4h-17.9v-3.3z"}),A.createElement("path",{d:"M420.8 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M420.8 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M420.8 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.3z"}),A.createElement("path",{d:"M412.7 160.2v3.4h-15.1v-3.4zm1-8.7v3.3H404v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M462.2 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M536.2 160.2v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M533.4 143.4h3.4v20.2h-3.4zm-8.4 0h3.3v20.2H525zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M501.6 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M501.6 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M501.6 152.3h3.3v11.3h-3.3zm-39.4 0h3.4v11.3h-3.4zm28.9 0h3.3v11.3h-3.3zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M493.4 160.2v3.4h-15.1v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M543.4 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M617.4 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M614.6 143.4h3.4v20.2h-3.4zm-8.4 0h3.3v20.2h-3.3zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M582.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M582.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M582.8 152.3h3.3v11.3h-3.3zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3H558z"}),A.createElement("path",{d:"M574.6 160.2v3.4h-15.1v-3.4zm1-8.7v3.3H566v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-183.8 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm42-.2v3.4h-9.9v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M-109.8 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-112.5 143.4h3.3v20.2h-3.3zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-17.9v-3.3zm39.3 0v3.4h-17.9v-3.3z"}),A.createElement("path",{d:"M-144.4 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-144.4 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-144.4 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-152.5 160.2v3.4h-15.2v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("path",{fill:"#d90000",d:"M-68.8 339.5h6V350h-6zm160.5 0h6V350h-6zm-283.7 0h6V350h-6zm81.5 0h6V350h-6zm80.9 0h6V350h-6zm40 0h6V350h-6zm40.9 0h6V350h-6zm80.4 0h6V350h-6zm203 0h6.1V350h-6zm-162.1 0h6V350h-6zm40 0h6V350h-6zm40.5 0h6V350h-6zm40.4 0h6V350h-6zm323.2 0h6V350h-6zm-242.7 0h6V350h-6zm40.8 0h6V350h-6zm41.3 0h6V350h-6zm38.8 0h6V350h-6zm41.3 0h6V350h-6zm40.4 0h6V350h-6zm119.7 0h6V350h-6zm-38.8 0h6V350h-6zm-808.9 0h6V350h-6z"}),A.createElement("path",{fill:"#239e3f",d:"M-68.8 162.6h6v10.5h-6zm160.5 0h6v10.5h-6zm-283.7 0h6v10.5h-6zm81.5 0h6v10.5h-6zm80.9 0h6v10.5h-6zm40 0h6v10.5h-6zm40.9 0h6v10.5h-6zm80.4 0h6v10.5h-6zm203 0h6.1v10.5h-6zm-162.1 0h6v10.5h-6zm40 0h6v10.5h-6zm40.5 0h6v10.5h-6zm40.4 0h6v10.5h-6zm323.2 0h6v10.5h-6zm-242.7 0h6v10.5h-6zm40.8 0h6v10.5h-6zm41.3 0h6v10.5h-6zm38.8 0h6v10.5h-6zm41.3 0h6v10.5h-6zm40.4 0h6v10.5h-6zm119.7 0h6v10.5h-6zm-38.8 0h6v10.5h-6zm-808.9 0h6v10.5h-6z"}),A.createElement("g",{fill:"#da0000"},A.createElement("path",{d:"M279.8 197.5c8.4 10.4 34.5 67.6-15.7 105.2-23.7 17.8-9 18.6-8.3 21.6 38-20.1 50.3-47.5 50-72-.2-24.4-13.2-46-26-54.8"}),A.createElement("path",{d:"M284.8 194.8a73.3 73.3 0 0 1 15.7 112.4c27.2-6 62-86.4-15.7-112.4m-57.6 0a73.3 73.3 0 0 0-15.6 112.4c-27.3-6-62-86.4 15.6-112.4"}),A.createElement("path",{d:"M232.2 197.5c-8.4 10.4-34.5 67.6 15.7 105.2 23.6 17.8 9 18.6 8.3 21.6-38-20.1-50.3-47.5-50-72 .2-24.4 13.2-46 26-54.8"}),A.createElement("path",{d:"M304.2 319.1c-14.9.2-33.6-2-47.5-9.3 2.3 4.5 4.2 7.3 6.5 11.7 13.2 1.3 31.5 2.8 41-2.4m-95 0c14.9.2 33.6-2 47.5-9.3-2.3 4.5-4.2 7.3-6.5 11.7-13.2 1.3-31.5 2.8-41-2.4m27.3-138.7c3 8 10.9 9.2 19.3 4.5 6.2 3.6 15.7 3.9 19-4.1 2.5 19.8-18.3 15-19 11.2-7.8 7.5-22.2 3.2-19.3-11.6"}),A.createElement("path",{d:"m256.4 331.6 7.8-9 1.1-120.1-9.3-8.2-9.3 7.8 1.9 121z"})))))},lW,cW,uW,dW,fW;function oM(){return oM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oM.apply(this,arguments)}var nUe=function(t){return A.createElement("svg",oM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480"},t),lW||(lW=A.createElement("path",{fill:"#bd3d44",d:"M0 0h640v480H0"})),cW||(cW=A.createElement("path",{stroke:"#fff",strokeWidth:37,d:"M0 55.3h640M0 129h640M0 203h640M0 277h640M0 351h640M0 425h640"})),uW||(uW=A.createElement("path",{fill:"#192f5d",d:"M0 0h364.8v258.5H0"})),dW||(dW=A.createElement("marker",{id:"us_svg__a",markerHeight:30,markerWidth:30},A.createElement("path",{fill:"#fff",d:"m14 0 9 27L0 10h28L5 27z"}))),fW||(fW=A.createElement("path",{fill:"none",markerMid:"url(#us_svg__a)",d:"m0 0 16 11h61 61 61 61 60L47 37h61 61 60 61L16 63h61 61 61 61 60L47 89h61 61 60 61L16 115h61 61 61 61 60L47 141h61 61 60 61L16 166h61 61 61 61 60L47 192h61 61 60 61L16 218h61 61 61 61 60z"})))},hW,pW;function iM(){return iM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iM.apply(this,arguments)}var rUe=function(t){return A.createElement("svg",iM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480"},t),hW||(hW=A.createElement("defs",null,A.createElement("clipPath",{id:"sa_svg__a"},A.createElement("path",{fillOpacity:.7,d:"M-85.3 0h682.6v512H-85.3z"})))),pW||(pW=A.createElement("g",{fillRule:"evenodd",clipPath:"url(#sa_svg__a)",transform:"translate(80)scale(.9375)"},A.createElement("path",{fill:"#165d31",d:"M-128 0h768v512h-768z"}),A.createElement("path",{fill:"#fff",d:"M65.5 145.1c-.8 12-2 33 8.3 35.2 12.3 1.2 5.5-20.8 10-24.8.8-2 2.3-2 2.4.5v18.7c0 6 4 7.8 7 9 3.2-.2 5.4 0 6.6 3l1.6 32.3s7.4 2.2 7.8-18.1c.3-12-2.4-21.9-.8-24.2 0-2.3 3-2.4 5-1.3 3.2 2.2 4.6 5 9.6 4 7.6-2.2 12.2-5.9 12.3-11.7a47 47 0 0 0-3.5-16.6c.4-1-1.4-3.7-1-4.7 1.3 2.2 3.4 2 3.8 0-1.3-4.2-3.3-8.3-6.5-10-2.7-2.4-6.7-2-8 3-.8 5.7 2 12.4 6.1 18 .9 2.1 2.1 5.7 1.6 8.9-2.2 1.3-4.4.7-6.3-1.2 0 0-6-4.5-6-5.6 1.6-10.2.3-11.4-.6-14.3-.6-3.9-2.5-5.2-4-7.8-1.5-1.6-3.5-1.6-4.5 0-2.7 4.6-1.4 14.5.5 19 1.4 4.1 3.5 6.7 2.5 6.7-.8 2.3-2.5 1.7-3.8-1a66.6 66.6 0 0 1-2.1-17.4c-.5-4.6-1.1-14.4-4.2-17-1.8-2.4-4.5-1.2-5.5 1a82.4 82.4 0 0 0 .3 13.4c2 7.4 2.7 14 3.7 21.5.3 10.1-5.8 4.4-5.5-.7a45 45 0 0 0-.3-19.4c-1-2.6-2.1-3.2-4.6-2.8-1.9 0-6.8 5.3-8.2 14.3 0 0-1.2 4.6-1.7 8.7-.7 4.6-3.7 8-5.9-.6-1.8-6.3-3-21.6-6-18z"}),A.createElement("path",{fill:"#fff",d:"m99 194.2-32 15.4c.3-7.3 15.1-20.4 25.3-20.5 6.5.1 4.9 2.5 6.6 5.1z"}),A.createElement("path",{fill:"#fff",d:"M93.3 204.2c-16.8 43.5 39.5 49.6 45.8 1.8.6-2 3-3.9 3.4-.7-1.3 43.3-43.6 46.2-50.8 32.6a41.9 41.9 0 0 1-2.5-14.6c-1-8.5-5.5-5.2-6.2 3.2-.7 4.7-.5 6-.5 10.5 2.2 34.2 56.7 19.5 65.6-8.7 4.7-15.6-.8-27.1 1.7-27.1 5.4 5.8 13 .8 14.7-1.2.7-1 2.5-1.7 3.7-.4 4.2 3 11.6 1.6 13.2-3.7.9-5.3 1.6-10.7 1.8-16.2-3.5 1-6 1.7-6.3 3.2l-.7 4.6c-.3 1.5-3.2 1.5-3.4-.4-1.3-6-6.7-6.7-10 2.5-2.1 1.8-6.1 2.2-6.5-.5.5-6.2-2-7-7-4.1l-4.8-36.2c2 0 4 1.5 5.9-.9-2-6.5-6.5-19.7-9-20.7-1.1-1.4-2.1-.5-3.7-.1-2.6.8-5 3-4.2 7.4 3 18.8 5 33.1 8.1 52 .5 2.1-1.3 5-3.7 4.7-4-2.7-5-8.2-12-8-5 0-10.6 5.5-11.3 10.7-.9 4.2-1.2 8.7 0 12.3 3.5 4.2 7.7 3.8 11.4 2.9 3-1.3 5.5-4.3 6.6-3.6.7.9.1 10.9-14.3 18.5-8.7 4-15.7 4.8-19.4-2.3-2.3-4.5.2-21.4-5.6-17.5"}),A.createElement("path",{fill:"#fff",d:"M165 160c3.3-1.2 19.3-19.6 19.3-19.6l-2.4-2c-.9-.7-.8-1.5 0-2.2 4-2.4 2.7-7.4.7-9.8a9.7 9.7 0 0 0-8.7.1c-2.8 2.7-3.4 7-1.2 9.6 2.1 1 4.2 3.2 2.8 4.4-6.6 7-24.5 19.1-22.4 19.5.4.6 11.5.6 11.8 0zm-97 65c-6 9.6-6.5 23.9-3.2 28.2 1.8 2 4.7 2.9 6.8 2.2 3.8-1.6 5.5-9.3 4.6-12-1.3-2-2.3-2.3-3.6-.7-2.6 5.4-3.7 1.7-4-1.3a70 70 0 0 1 .8-15.2c.7-4.2 0-3-1.4-1.2m257.1-15.3c-5.8-12.6-13.9-25-16.4-29.7a558 558 0 0 0-24.8-36c-6.2-7.4 10.2 3.1-2-11.7l-8.9-7.5c-2-1.4-6.8-4-7.6.2-.4 3.8-.2 5.8.4 8.9.5 2 3.5 5.5 5 7.5a565 565 0 0 1 53.8 86.5c2.6-1.3 2-16.1.5-18.2"}),A.createElement("path",{fill:"#fff",d:"M299.6 251.5c-1.2 1.3 2.8 6.8 8 6.8 8.6-1 16.2-5.8 23.2-18.6a33 33 0 0 0 5.3-14.2 317 317 0 0 0-5.8-72.4c-.3-2 0-4.4.2-5 .6-.7 2.5 0 3.5-1.7 1.5-1.5-4-14-7-18.7-1-2.2-1.5-3.6-3.3.2a27 27 0 0 0-3 13.6c4.1 28.5 5.4 53.4 8 81.9.3 2.8-.1 6.8-2 8.4a80.2 80.2 0 0 1-27.1 19.7m116.5-.1c-6.2 3.6-6.2 7.7-1.2 7.8 8.6-1 18.8-1.7 25.8-12.3a41 41 0 0 0 4.2-16 303 303 0 0 0-4.7-71.4c-.2-2-1.1-6.7-.8-7.3.6-1.4 3.4.1 4.4-1.5 1.4-1.5-7.3-12.7-10.4-17.5-1-2.2-1.4-3.6-3.3.2a22.3 22.3 0 0 0-1.8 13.6c4.6 31 8 54.2 8.7 81.6-.4 2.6-.5 4-1.7 7.3-2.7 3.4-5.7 7.8-8.5 9.9-2.8 2-8.8 4-10.7 5.6"}),A.createElement("path",{fill:"#fff",d:"M420.7 223.7c0-7.3.1-13.5-.1-19a34 34 0 0 0-3-13.5c-1.8-4.1-.7-7.4-1.6-11.8-.8-4.4-.6-11-1.8-16.1-.4-2-1.4-8.5-1.1-9.2.5-1.4 2.4 0 3.4-1.6 1.4-1.5-5-18-8.2-22.7-1.1-2.1-3.3-1.4-5.8 2-2.5 2.3-1.6 7.4-.6 12.3 6.1 32.3 10.8 61.6 9.8 92.3-.4 2.6 9-7.8 9-12.7m-45.7-40c-3.9-.2-12-7.7-14.4-12a8 8 0 0 1 .4-6.5c1.5-1 3.7-2 5.4-1 0 0 1.7 2.4 1.4 2.7 2 1 3 .5 3.2-.4.1-1.5-.6-2.4-.6-4 .9-4.6 6-5.3 8-2.4 1.4 1.8 2 5.5 2.1 8 0 1.3-2-.2-3.3 0-1.1.4-1.4 1.8-1.5 3-.2 3.3-.6 8.6-.7 12.5zm-71.8 48c1-9.8-.4-27.3-.5-33.1A477 477 0 0 0 299 154c-1.2-8.4 3.4.9 2.8-4-1.5-8.3-6.1-14-11.6-21.5-1.7-2.5-1.7-3-4.4.6-3 6.7-.4 11.4.4 16.7 3.9 17.2 6.2 33 7.3 48.7a393 393 0 0 1 .4 49c3 .1 7.6-4.7 9.3-11.8"}),A.createElement("path",{fill:"#fff",d:"M434 216c-6.9-11.6-17.2-24-20-28.7a658 658 0 0 0-29.2-37.8c-8.5-9 4-1.5-1.6-8.5-4.7-5.1-6-6.8-10.1-9.9-2-1.3-3.2-3.8-4 .5a83 83 0 0 0-.2 11.2c0 1.7 1.8 5 3.4 7 20.7 25.5 43.4 51.5 61.6 84.2 2.6-1.3 1.7-16 0-18z"}),A.createElement("path",{fill:"#165d31",d:"M122.6 194.7c-.5.9-1.6 2-1.2 3.1.7 1 1.4 1.3 2.6 1.3 1.1 0 2.7.3 3-.3.6-.7 1-2 .6-3.3-1.2-3-4.4-1.8-5-.8"}),A.createElement("path",{fill:"#fff",d:"M354.2 362.5c9.2.4 15.2.5 23.3 1.4l9.6-1c10.6-1 11 15.1 11 15.1 0 9.5-3.7 10-8.4 11-2.7.4-4-1.6-5.5-3.6a14 14 0 0 1-7 .4c-3.9-.2-7.7-.2-11.5-.5-4-.3-6.2.5-10.3.1-.8 1.3-2 3.1-4.4 2.6-2-.3-4.5-6-3.8-10.5 1.5-3.2 1-2.1 1-3.5-37.6-1-75.5-2.7-112.3-2.2-28.8.1-57.2 1.3-85.7 2.5-15.2-.2-26.8-2.6-34.8-14.3.8 0 38.8 2.1 49.9 1.4 20.5-.2 39.3-1.9 60.2-2.5 41.2.7 82.1.7 123.3 3.6-4-2.7-4-9 2-10.6.5-.4.8 3.1 1.7 3 4.9-.3 2.7 6.3 1.7 7.6M188.6 135.3c-6.2 17.8 3.6 37.4 10.4 35.5 5 2 8-7.4 10-17.6 1.5-2.9 2.5-3.2 3.2-1.7-.2 13.6 1 16.7 4.5 20.8 7.8 6 14.3.8 14.8.3l6-6.1c1.4-1.5 3.2-1.5 5.1-.3 1.9 1.7 1.6 4.6 5.6 6.6 3.4 1.4 10.5.4 12.2-2.5 2.2-3.9 2.8-5.2 3.8-6.6 1.6-2.1 4.3-1.2 4.3-.5-.3 1.2-1.9 2.3-.8 4.5 2 1.4 2.4.5 3.5.2 4-2 7-10.6 7-10.6.1-3.2-1.7-3-2.9-2.2l-3.1 2.1c-2 .3-5.7 1.6-7.6-1.3-1.9-3.4-1.9-8.3-3.3-11.8 0-.2-2.6-5.5-.2-5.8 1.2.2 3.7.9 4.1-1.2 1.2-2.1-2.6-8-5.3-11-2.3-2.5-5.5-2.8-8.6-.2-2.2 2-1.9 4.2-2.3 6.3a9.8 9.8 0 0 0 2 8.7c2.2 4.2 6.1 9.7 4.8 17.5 0 0-2.3 3.6-6.3 3.1-1.7-.3-4.4-1-5.8-11.8-1.1-8 .2-19.4-3.2-24.7-1.3-3.3-2.2-6.4-5.2-.9-.8 2.2-4.3 5.5-1.8 12.2a36 36 0 0 1 2 19c-1.5 2.2-1.8 2.9-3.7 5-2.6 3-5.5 2.2-7.7 1.1-2-1.3-3.6-2-4.6-6.5.2-7 .6-18.5-.7-20.9-1.9-3.8-5-2.4-6.3-1.2a47.7 47.7 0 0 0-11.5 23.5c-1.8 5.8-3.7 4.1-5 1.8-3.2-3-3.5-26.7-7.4-22.8"}),A.createElement("path",{fill:"#fff",d:"M207.4 174.1c2.9-2 1.6-3.4 5.8.8a72 72 0 0 1 9.2 31.3c-.2 2.6 1.6 4.2 2.5 3.6.4-6 15.1-14.4 28.6-15.6 2-.5 1-4.4 1.3-6.4-.8-7.5 4.2-14.3 11.2-14.8 9.6 1.4 12.8 6.5 13 14.2-1.1 15-16.7 17.5-25.4 18.7-1.3.5-1.9 1.1 0 1.8l36.6.2 1.9 1c.2 1-.6.2-2 2.6a29.5 29.5 0 0 0-3.7 11.5c-10.9 3.6-22.2 5-33.6 6.5-4 2-6 4.7-5.2 7.7 1.4 3.3 10.2 6.7 10.2 6.8 1.7 1 3.6 3.5-.5 8.6-17.8-.8-31.7-8.4-36.5-19.1-1.4-1.1-3 0-4 1.4-7 9-13.8 17-25.7 21.4-7 1.8-14.3-1.1-17.7-5.7-2.3-2.7-2.2-5.6-3-6.2-3.9 1.7-36.9 15.7-32.7 9.1 8-8.5 22-14.9 34.2-23.3.9-2.9 2.5-12.5 7.3-15.6.3 0-.7 5.6-.6 8 0 2-.2 2.7.2 2.2.9-.5 15.7-12.2 17-15.8 1.4-2 .3-7.2.3-7.4-2.8-7.2-6.7-7.8-8.1-11.4-1.3-4.7-.7-10.1 2-11.7 2.4-2.1 5.2-1.9 7.9.5 3 2.7 5.6 8 6.4 11.9-.5 1.5-4-1-5-.3a16 16 0 0 1 3.7 7.8c2 8.2 1.4 11.4-.6 16.7-6.6 13.9-15 18-22.4 23.2-.2 0-.3 3.5 2.4 5.4 1 1 4.9 1.5 9.4 0a54.5 54.5 0 0 0 22.3-23.3 51 51 0 0 0-2.4-22.2c-2.9-6.7-6.3-16.2-6.3-16.4-.1-4.2.2-5.6 2-7.7m-95.8-38.6c4.2 2 12.2 1.1 11.8-5.7l-.2-3.1c-.8-2-3.2-1.5-3.7.5-.2.7.3 1.8-.3 2.1-.4.4-1.7.2-1.7-1.7 0-.6-.4-1.2-.7-1.6-.2-.2-.4-.2-.9-.2-.6 0-.6.1-.9.6-.1.5-.3 1-.3 1.6 0 .7-.4.9-.8 1-.6 0-.5 0-1-.2-.2-.3-.5-.4-.5-1l-.3-1.6c-.2-.3-.6-.5-1-.6-2.3 0-2.5 2.7-2.3 3.7-.2.2-.3 4.9 2.8 6.2"}),A.createElement("path",{fill:"#fff",d:"M235.1 187.7c4.2 2 14.3.9 11.8-5.6l-.2-3.2c-.9-2-3.2-1.5-3.7.6-.2.6.3 1.7-.4 2-.3.4-1.7.2-1.6-1.6 0-.6-.4-1.3-.7-1.7-.3-.1-.4-.2-1-.2-.5 0-.5.2-.8.7-.2.5-.3 1-.3 1.6-.1.6-.4.8-.9 1-.5 0-.4 0-.8-.3-.3-.3-.6-.4-.6-.9l-.3-1.6c-.2-.3-.6-.5-1-.6-2.3 0-2.5 2.6-2.4 3.6-.1.2-.2 5 3 6.2zm72-21.6c4.2 2 12.1 1.1 11.8-5.6l-.2-3.2c-.9-2-3.2-1.5-3.7.5-.2.7.3 1.8-.4 2.2-.3.3-1.7.1-1.6-1.8 0-.6-.4-1.2-.7-1.6-.3-.2-.4-.2-1-.2-.5 0-.5.2-.8.7l-.3 1.5c-.1.7-.4 1-.9 1s-.4 0-.8-.2c-.3-.3-.6-.4-.6-.9s-.1-1.3-.3-1.7c-.2-.3-.6-.4-1-.5-2.3 0-2.5 2.6-2.4 3.6-.1.2-.2 4.9 3 6.2zm37.3 54.3c-7.3 8.3-4.1 22-2.4 25 2.4 4.8 4.3 7.9 9 10.3 4.3 3.1 7.7 1.2 9.5-1 4.3-4.5 4.4-16 6.4-18.2 1.4-4.2 5-3.5 6.7-1.6a16.5 16.5 0 0 0 6.2 5.3c4 3.5 8.8 4.2 13.6 1 3.2-1.9 5.3-4.2 7.2-8.9 2-5.6 1-31.6.5-47l-4.2-21.5c0-.2-.5-10.2-1-12.5 0-1-.3-1.3.7-1.2 1.1 1 1.2 1 2 1.3 1 .2 2-1.7 1.3-3.3l-10-18.6c-.8-.8-1.9-1.6-3.2.2a7.3 7.3 0 0 0-2.4 5.5c.3 4.4 1 8.9 1.3 13.3l4 22.6c1.3 16 1.6 29.2 2.9 45.3-.2 6.8-2.3 12.7-4.3 13.6 0 0-3 1.7-5-.2-1.5-.6-7.4-9.9-7.4-9.9-3-2.7-5-2-7.1 0-6 5.8-8.6 16.4-12.7 23.8-1 1.7-4 3-7.2-.1-8.2-11.3-3.4-27.3-4.4-23.2M309 126.7c3.8 1.5 6.4 9.2 5.6 13-.8 4.5-2.8 9.5-4.2 8.9-1.6-.6 1-4.6-.5-8.8-.8-2.8-6-7.8-5.4-9.2-1-3.1 2.2-4.5 4.5-4z"}),A.createElement("path",{fill:"#fff",d:"M356.6 225c.7-9.2-.6-14.8-.8-20.2s-6.1-46.6-7.3-50.6c-1.5-7.8 5.7-1 4.9-5.6-2.5-5.6-8.6-13.9-10.5-18.8-1.2-2-.7-4-3.3-.5a42.3 42.3 0 0 0-2.3 19.2c6.2 32.3 12.5 59.1 11.5 89.8 3 0 6.3-6.7 7.8-13.3m64.4-85.3c3.5 1.7 5.5 11.3 5.1 14-.7 5-2.5 10.4-3.8 9.7-1.5-.6.3-7.4-.4-9.5-.8-3-5.5-8.4-5-10-1-3.4 2-4.8 4.1-4.2m-255.7 67.9c3.3 1.3 5.3 8.3 5 10.3-.8 3.7-2.5 7.7-3.8 7.1-1.3-.4.3-5.4-.3-7-.3-3.7-4.9-5.7-4.8-7.3-.8-3 2-3.5 4-3.1z"}),A.createElement("path",{fill:"#165d31",d:"M244.9 218.2c4.2.2 6.3 3.6 2.4 5-4 1.3-7.7 2.4-7.8 8 1.5 8-2 5.2-4 4.2-2.4-1.8-9.2-6-10.2-15-.1-2.1 1.6-4 4.3-4 4 1.1 10 1.2 15.3 1.8"}),A.createElement("path",{fill:"#fff",d:"M77.4 124.4c4.8 1.4 5.1 8.6 4.8 10.7-.7 3.8-2.4 7.9-3.6 7.4-1.4-.5 0-5.7-.7-7.3-.7-2.2-4.8-6.4-4.4-7.6-.9-2.5 2-3.7 3.9-3.2m95.9 33.6c-3.8 2-5.2 8-2.9 11.6 2.2 3 5.6 1.9 6 1.9 3.7.4 5.9-6.9 5.9-6.9s.1-2-4.2 1.9c-1.9.3-2-.4-2.5-1.4a9 9 0 0 1 .5-5.7c.7-1.8-.7-2.6-2.8-1.4m28-36.4c-2 1.3-5.7 5.2-5.8 9.6-.1 2.5-.6 2.5 1 4 1.3 1.8 2.4 1.7 4.8.4a5.1 5.1 0 0 0 2.3-3.4c.6-2.8-3 1.4-3.4-1.8-.8-3 1.5-4.2 3.7-7 0-2 0-3.3-2.7-1.8zm22.4 4a59.5 59.5 0 0 0-1.6 11.1c-.6 2.8 3 4 4.5.4 2.4-6.5 2.4-9.3 2.6-12-.7-4.3-3.6-4.2-5.5.5m142 72.3c.4-.5 20-14.4 20-14.4 2-.7 1.5 7.2.6 7.1a77.8 77.8 0 0 1-20.7 14.3c-1 .7-1.9-5.3 0-7zm17.7-.2c3.5 1.7 4.9 11.8 4.5 14.5 0 5.4-3.3 9.6-4.7 9-1.4-.7.2-6.7-.5-8.8-.8-3-3.7-8.5-3.2-10.1-1-3.4 1.8-5.2 4-4.6zm-116 43.4a26 26 0 0 1 5.6-4.9c2-1 3.8.8 3.7.7.3 2-1.2 3.7-.7 6.3.4 1 .7 2.2 2.6 1.8 3.1-2.5 6-2.7 9-2.8 2.5.1 2.6 4.2 1 4.2-5.7 1.2-8.2 2.8-12.3 4.3-2 1.2-3.6-.3-3.6-.4s-1.1-1.1-.4-3.7c.2-2-.6-3.2-2.4-3-1.2.8-2.4 1.2-3-.3-.3-1-.4-1.6.5-2.2m136.6 5.4c.8 1 1.4 2-.1 3.8l-3.7 3.2c-.6 1-1 2.8 1 3.3 3.6 1 12-4.5 12-4.6 1.4-1 1-3 .8-3-.8-.9-2.6-.3-3.8-.5-.6 0-2.5-.2-1.6-2a11.4 11.4 0 0 0 1.6-2.9c.5-1.2 0-2-2-2.7-2.1-.4-3-.2-5.3 0-1.2.2-1.6.8-1.9 2.3.1 2.3 1.5 2.2 3 3z"}),A.createElement("path",{fill:"#165d31",d:"M268.1 189.7c-.5 1-2.3 1-4 0s-2.7-2.6-2.1-3.5 2.3-.9 4 0 2.6 2.6 2.1 3.5m-89-53.6c-1 .3-2.4-.6-3-2s-.3-2.6.7-2.9 2.3.7 3 2 .3 2.7-.8 3zM355.2 375c9.4.4 18.2 0 27.5.5 1.7 1.5.5 5-.6 4.8l-7.8-.3c-.1-3-7.7-2.5-7.5.1-4.1.5-7.8-.1-12-.3-1.2-1.5-1-4.2.4-4.8"}))))};const oUe=({defaultValue:e,...t})=>{const[n,r]=Tn(e??"fa"),o={fa:"\u0641\u0627\u0631\u0633\u06CC",en:"English",ar:"\u0627\u0644\u0639\u0631\u0628\u06CC\u0629"},i=s=>{switch(s){case"fa":return W(sW,{className:"KdLanguageChange-country-flag"});case"ar":return W(rUe,{className:"KdLanguageChange-country-flag"});case"en":return W(nUe,{className:"KdLanguageChange-country-flag"});default:return W(sW,{className:"KdLanguageChange-country-flag"})}},a=s=>{r(s),t?.onChange(s)};return W(tW,{className:"KdLanguageChange-MenubarRoot",dir:"rtl",...t,children:mt(nW,{children:[mt(rW,{className:"KdLanguageChange-MenubarTrigger",children:[i(n),o[n]]}),W(nM,{children:W(oW,{align:"start",side:"bottom",sideOffset:10,className:"KdLanguageChange-MenubarContent",children:Object.keys(o).map((s,c)=>mt("div",{className:"KdLanguageChange-MenubarItem",onClick:()=>a(s),children:[i(s),o[s]]},c))})})]})})},iUe=hi("img")(),aUe=({pathProp:e,randomNumber:t,...n})=>W(iUe,{...n,alt:"CAPTCHA",src:`${e.APIURL}${OEe}${t}`});function sUe({Component:e,...t}){const n=Ur(()=>hi(e)(),[e]);return W(n,{...t})}function lUe({isOpen:e,onClose:t,...n}){return W(Ere,{...n,open:e,onClose:t})}const cUe=hi("span")(),uUe=({title:e="",arrow:t,children:n,placement:r,enterDelay:o,leaveDelay:i,...a})=>W(DI,{title:e,TransitionComponent:QS,enterDelay:o,leaveDelay:i,arrow:t,placement:r,children:W(cUe,{...a,children:n})}),mW=hi("img")(),gW=hi("div")();function dUe({children:e,open:t}){return W(rd,{open:t,fullScreen:!0,children:W(Im,{sx:{padding:"0px"},children:e})})}function fUe({src:e,modal:t=!1,basePath:n,pathProp:r,...o}){const[i,a]=Tn({fileType:"",extention:""}),[s,c]=Tn(!1);dn(()=>{(async()=>{if(e&&r?.APIURL){const w=(await qT(r.APIURL,[e])??[]).find(k=>k.guid===e)?.fileName,C=w&&w?.split(".").pop();a({extention:C,fileType:Object.keys(Di).find(k=>Di[k].includes(C))??""})}})()},[e]);const f=v=>v==="small"?n?.basePathThumbnail?n?.basePathThumbnail+e:e:n?.basePathStream?n?.basePathStream+e:e;if(!e)return W(gW,{sx:{...o?.style,...o?.sx},children:W(LV,{style:{color:"gray",height:"100%",width:"100%"}})});function p(){if(i.fileType==="text"&&i.extention==="pdf")return W(sM,{handleClose:()=>c(!1),fileUrl:f("large")})}const m=p();if(t===!0)return mt(Or,{children:[W(mW,{...o,src:f("small"),onClick:()=>m&&c(!0)}),m&&W(dUe,{open:s,children:m})]});if(m){if(m)return W(gW,{...o,children:m})}else W(mW,{...o,src:f("small")})}const hUe=(e,t,n,r,o)=>{const i={IMG:"create/image",TEXT:"create/text",VIDEO:"create/video",COMPRESS:"create/compress",FONT:"create/font"};return e?{url:i.IMG,type:"IMG"}:t?{url:i.TEXT,type:"TEXT"}:n?{url:i.VIDEO,type:"VIDEO"}:r?{url:i.COMPRESS,type:"COMPRESS"}:o?{url:i.FONT,type:"FONT"}:{url:"create",type:void 0}};function aM({APIURL:e=window?.env?.REACT_APP_APIURL??void 0,sessionId:t=localStorage.getItem("sessionId")??"",fileSizeLimit:n=2,fileCountLimit:r=20,validUploadType:o=["IMG","TEXT","VIDEO","COMPRESS","FONT"],multiple:i=!0,onError:a}){const[s,c]=Tn([]),f=Yt(0),[p,m]=Tn([]),v={},y=k=>{c(T=>{const E=T.filter(_=>_.session!==k);return f.current=E.length,E})},w=(k,T)=>{console.log(k,"err"),a&&a("\u0639\u0645\u0644\u06CC\u0627\u062A \u0628\u0627 \u062E\u0637\u0627 \u0645\u0648\u0627\u062C\u0647 \u0634\u062F"),m(E=>E.filter(_=>_.file!==T))};function C(k,T){if(!e)a&&a("Not exist APIURL"),console.error("Not exist APIURL");else try{const E=k.target.files||[];if(!i&&E.length>1){a&&a("\u062D\u062F\u0627\u06A9\u062B\u0631 1 \u0641\u0627\u06CC\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F.");return}if(i&&E.length+f.current>r){a&&a(`\u062D\u062F\u0627\u06A9\u062B\u0631 ${r} \u0641\u0627\u06CC\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F.`);return}for(let _=0;_<E.length;_++){const R=E[_];if(R.size===0){a&&a("\u0634\u0645\u0627 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0641\u0627\u06CC\u0644 \u062E\u0627\u0644\u06CC \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F");return}const P=R.size/1024/1024,$=R.name,z=$.lastIndexOf(".")+1,q=$.substr(z,$.length).toLowerCase(),Y=T?!!T?.image&&!!(T?.image==="ALL"?Di.image:T?.image)?.find(se=>se===q):!!o?.find(se=>se==="IMG")&&!!Di?.image?.find(se=>se===q),J=T?!!T?.text&&!!(T?.text==="ALL"?Di.text:T?.text)?.find(se=>se===q):!!o?.find(se=>se==="TEXT")&&!!Di?.text?.find(se=>se===q),K=T?!!T?.video&&!!(T?.video==="ALL"?Di.video:T?.video)?.find(se=>se===q):!!o?.find(se=>se==="VIDEO")&&!!Di?.video?.find(se=>se===q),ee=T?!!T?.compress&&!!(T?.compress==="ALL"?Di.compress:T?.compress)?.find(se=>se===q):!!o?.find(se=>se==="COMPRESS")&&!!Di?.compress?.find(se=>se===q),re=T?!!T?.font&&!!(T?.font==="ALL"?Di.font:T?.font)?.find(se=>se===q):!!o?.find(se=>se==="FONT")&&!!Di?.font?.find(se=>se===q),{url:ne,type:oe}=hUe(Y,J,K,ee,re),fe=`${e}${ml.upload}${u1.pathFileUpload}${ne}`;if(P>n)a&&a(`\u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0622\u067E\u0644\u0648\u062F ${n} \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC\u200C\u0628\u0627\u0634\u062F.`);else if(oe){const se={file:R,progress:0,type:oe};m(ze=>i?[...ze,se]:[se]);const ue=512*1024,le=new FormData;le.append("chunkSize",String(ue)),le.append("totalSize",String(R.size)),le.append("fileName",R.name);const ce=Math.ceil(R.size/ue),Se=[];for(let ze=1;ze<=ce;ze++)Se.push(ze);fetch(fe,{method:"POST",headers:v,body:le,credentials:"include"}).then(ze=>ze.json()).then(async ze=>{let ke=0;if(ze?.data?.sessionId?.length>0){let pe=1,Oe=!1;for(let Ae=0;Ae<R.size;Ae+=ue,pe++)if(!Oe){const Pe=R.slice(Ae,Ae+ue),Ve=new FormData;Ve.append("data",Pe);const Le={method:"PUT",headers:{...v,sessionId:t},body:Ve,credentials:"include"};await fetch(`${e}${ml.upload}${u1.pathForUploadCunk}${ze?.data?.sessionId}?chunkNumber=${pe}`,Le).then(Ne=>{if(Ne.status!==200)Oe=!0,w(Oe,R);else{ke=ke+Pe.size;const Te=Math.round(ke/R.size*100);m(He=>He.map(Ie=>Ie.file===R?{...Ie,progress:Te,session:ze?.data?.sessionId}:Ie))}})}if(!Oe){const Ae={method:"GET",headers:{...v,sessionId:t},credentials:"include"};await fetch(`${e}${ml.upload}${u1.pathForGetFile}${ze?.data?.sessionId}`,Ae).then(Pe=>Pe.json()).then(Pe=>{m(Le=>Le.filter(Ne=>Ne.session!==ze?.data?.sessionId));const Ve={session:ze?.data?.sessionId,concluded:Pe.concluded,progress:100,fileURL:`${e}${ml.upload}${Pe.fileLink}`,fileName:$??"",type:oe};c(Le=>(i?f.current=Le.length+1:f.current=1,i?[...Le,Ve]:[Ve]))}).catch(Pe=>{w(Pe,R)})}}else w(`err in ${ne} service`,R)}).catch(ze=>{w(ze,R)})}else a&&a("\u0644\u0637\u0641\u0627 \u0641\u0631\u0645\u062A \u0645\u0646\u0627\u0633\u0628 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F.")}}catch(E){console.log("Error",E)}}return{APIURL:e,uploadingFiles:p,files:s,removeFile:y,handleFileChange:C,fileExtension:Di}}const pUe=(e,t)=>W(e,{children:n=>{const{CurrentPageInput:r,Download:o,EnterFullScreen:i,GoToNextPage:a,GoToPreviousPage:s,NumberOfPages:c,Print:f,Zoom:p,ZoomIn:m,ZoomOut:v}=n;return mt("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",paddingInline:"20px"},children:[mt("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"},children:[W(v,{}),W(p,{}),W(m,{})]}),mt("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"},children:[W(s,{}),W(r,{}),mt("div",{style:{color:"white"},children:["/ ",W(c,{})]}),W(a,{})]}),mt("div",{style:{display:"flex",gap:"10px"},children:[W(i,{}),W(o,{}),W(f,{}),W(l1e,{size:24,onClick:()=>{t?.()},style:{cursor:"pointer",color:"white"}})]})]})}}),sM=({fileUrl:e,handleClose:t})=>{const n=xY({renderToolbar:r=>pUe(r,()=>{t()}),sidebarTabs:r=>[r[0]]});return W(bY,{workerUrl:"https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",children:W(yY,{theme:"dark",fileUrl:e,plugins:[n],withCredentials:!0})})};function lM({sessionId:e,fileName:t,onDelete:n,smallUrl:r,largeUrl:o,modal:i=!0,downloadSmallSize:a=!1,extention:s}){const c=!!s&&Object.keys(Di).find(v=>Di[v].includes(s)),[f,p]=Tn(!1);function m(){return s==="pdf"?mt(Or,{children:[W("img",{src:r,className:"modal-image",style:{cursor:"pointer"},onClick:()=>p(!0)}),W(rd,{open:f,fullScreen:!0,children:W(Im,{sx:{padding:"0px"},children:W(sM,{handleClose:()=>p(!1),fileUrl:o})})})]}):W(qE,{small:r,medium:c==="image"?o:r,large:o,hideZoom:!0,className:"modal-image"})}return mt("div",{className:"kdpa-uploaded-file",children:[mt("div",{className:"parent",children:[i?m():W("img",{src:r,className:"modal-image"}),(n||a)&&mt("div",{className:"child",children:[n&&W(rEe,{className:"icon-actions",size:20,onClick:()=>{n(e)}}),a&&W(u1e,{className:"icon-actions",size:20,onClick:()=>{o&&window.open(o,"_blank")}})]})]}),t&&W("span",{style:{fontSize:"12px"},children:t?.split("\\")?.slice(-1)?.[0]})]})}export{NEe as KdAdvanceFileUploader,JHe as KdAlert,aUe as KdCaptcha,qEe as KdChart2D,YEe as KdChart3D,lUe as KdDrawer,OB as KdDropDownField,MEe as KdFileUploader,fUe as KdFileViewer,AB as KdFormContainer,dEe as KdFormField,tje as KdGridHeader,eje as KdGridPanel,jVe as KdHtmlEditor,JVe as KdImageBox,oUe as KdLanguageChange,fEe as KdLazyDropDownField,tUe as KdLoading,QYe as KdMenubar,QH as KdModal,ej as KdPanelWrapper,eUe as KdRadioListCustom,cj as KdSearchableInput,hEe as KdSearchableInputField,XHe as KdStepContent,KHe as KdStepList,qHe as KdStepRoot,ZHe as KdStepTrigger,sUe as KdStyledComponent,jHe as KdTabsContent,VHe as KdTabsList,BHe as KdTabsRoot,YHe as KdTabsTrigger,gEe as KdTagBoxInput,uUe as KdTooltip,Vje as KdTree,mEe as KdTreeField,DEe as KdTypography,Ake as KdpaAccordion,Mke as KdpaAccordionDetails,Oke as KdpaAccordionSummary,Wle as KdpaAlert,Yle as KdpaAlertTitle,Eg as KdpaAutoComplete,cL as KdpaAvatar,Ule as KdpaBadge,X0e as KdpaButton,Z0e as KdpaCheckBox,Zle as KdpaChip,rxe as KdpaCircularProgress,X5 as KdpaCollapse,vE as KdpaCollapseTransitions,iwe as KdpaCopyToClipboard,O0e as KdpaDatePicker,K0e as KdpaDateTimePicker,lEe as KdpaDialog,Z5 as KdpaDivider,O1e as KdpaDropDownLazy,f1e as KdpaDropZone,sxe as KdpaFade,oEe as KdpaFileUploader,aEe as KdpaFormContainer,Y5 as KdpaFormControl,G0e as KdpaFormControlLabel,sEe as KdpaFormField,Qke as KdpaFullScreenDialog,ik as KdpaGrid,qle as KdpaGridBadge,lxe as KdpaGrow,q5 as KdpaIconButton,swe as KdpaInlineSpinner,Km as KdpaInput,Sce as KdpaInputLabel,kce as KdpaInputMultiline,lwe as KdpaLoading,mE as KdpaMenuItem,Gwe as KdpaModal,Kwe as KdpaModalImage,qI as KdpaMuiBadge,Zwe as KdpaPaginationGrid,sM as KdpaPdfViewer,gx as KdpaPrimaryButton,lL as KdpaRadio,Ece as KdpaRadioGroup,Zke as KdpaRtlProvider,Tg as KdpaSecondaryButton,nEe as KdpaSegment,U5 as KdpaSelect,cwe as KdpaSkeleton,cxe as KdpaSlide,Xwe as KdpaSlider,exe as KdpaSweetAlertConfirm,txe as KdpaSweetAlertDelete,nxe as KdpaSweetAlertOK,Tce as KdpaSwitch,ixe as KdpaTab,axe as KdpaTabs,Pke as KdpaThemeProvider,Aye as KdpaTimePicker,Wl as KdpaTooltip,Qwe as KdpaTree,Dke as KdpaTreeSelect,qa as KdpaTypography,lM as KdpaUploadedFile,YT as KdpaUploadingFile,aM as KdpaUseFileUploadHook,uxe as KdpaZoom,Di as fileExtension,Td as pathFile,u1 as pathServicesUpload,ml as serviceName};
|
|
1474
|
+
`)},JWe=0,Ip=[];function QWe(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),o=A.useState(JWe++)[0],i=A.useState(function(){return Mj()})[0],a=A.useRef(e);A.useEffect(function(){a.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=bE([e.lockRef.current],(e.shards||[]).map(Lj),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=A.useCallback(function(C,k){if("touches"in C&&C.touches.length===2)return!a.current.allowPinchZoom;var T=Hw(C),E=n.current,_="deltaX"in C?C.deltaX:E[0]-T[0],R="deltaY"in C?C.deltaY:E[1]-T[1],P,$=C.target,z=Math.abs(_)>Math.abs(R)?"h":"v";if("touches"in C&&z==="h"&&$.type==="range")return!1;var q=Nj(z,$);if(!q)return!0;if(q?P=z:(P=z==="v"?"h":"v",q=Nj(z,$)),!q)return!1;if(!r.current&&"changedTouches"in C&&(_||R)&&(r.current=P),!P)return!0;var Y=r.current||P;return GWe(Y,k,C,Y==="h"?_:R,!0)},[]),c=A.useCallback(function(C){var k=C;if(!(!Ip.length||Ip[Ip.length-1]!==i)){var T="deltaY"in k?Ij(k):Hw(k),E=t.current.filter(function(P){return P.name===k.type&&P.target===k.target&&XWe(P.delta,T)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var _=(a.current.shards||[]).map(Lj).filter(Boolean).filter(function(P){return P.contains(k.target)}),R=_.length>0?s(k,_[0]):!a.current.noIsolation;R&&k.cancelable&&k.preventDefault()}}},[]),f=A.useCallback(function(C,k,T,E){var _={name:C,delta:k,target:T,should:E};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(R){return R!==_})},1)},[]),p=A.useCallback(function(C){n.current=Hw(C),r.current=void 0},[]),m=A.useCallback(function(C){f(C.type,Ij(C),C.target,s(C,e.lockRef.current))},[]),v=A.useCallback(function(C){f(C.type,Hw(C),C.target,s(C,e.lockRef.current))},[]);A.useEffect(function(){return Ip.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Rp),document.addEventListener("touchmove",c,Rp),document.addEventListener("touchstart",p,Rp),function(){Ip=Ip.filter(function(C){return C!==i}),document.removeEventListener("wheel",c,Rp),document.removeEventListener("touchmove",c,Rp),document.removeEventListener("touchstart",p,Rp)}},[]);var y=e.removeScrollBar,w=e.inert;return A.createElement(A.Fragment,null,w?A.createElement(i,{styles:ZWe(o)}):null,y?A.createElement(HWe,{gapMode:"margin"}):null)}var eYe=MWe(Oj,QWe),$j=A.forwardRef(function(e,t){return A.createElement(Bw,fl({},e,{ref:t,sideCar:eYe}))});$j.classNames=Bw.classNames;var tYe=$j;const Fj=["Enter"," "],nYe=["ArrowDown","PageUp","Home"],Bj=["ArrowUp","PageDown","End"],rYe=[...nYe,...Bj],oYe={ltr:[...Fj,"ArrowRight"],rtl:[...Fj,"ArrowLeft"]},iYe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jw="Menu",[mb,aYe,sYe]=DO(jw),[rf,lYe]=Mp(jw,[sYe,wj,Np]),Ww=wj(),zj=Np(),[Vj,Ou]=rf(jw),[cYe,Yw]=rf(jw),uYe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ww(t),[c,f]=Tn(null),p=Yt(!1),m=Is(i),v=Iw(o);return dn(()=>{const y=()=>{p.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>p.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),cn(Tj,s,cn(Vj,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:f},cn(cYe,{scope:t,onClose:Zn(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:v,modal:a},r)))},Hj=or((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ww(n);return cn(xWe,V({},o,r,{ref:t}))}),jj="MenuPortal",[dYe,Wj]=rf(jj,{forceMount:void 0}),fYe=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Ou(jj,t);return cn(dYe,{scope:t,forceMount:n},cn(hb,{present:n||i.open},cn(CWe,{asChild:!0,container:o},r)))},Ls="MenuContent",[hYe,Yj]=rf(Ls),pYe=or((e,t)=>{const n=Wj(Ls,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ou(Ls,e.__scopeMenu),a=Yw(Ls,e.__scopeMenu);return cn(mb.Provider,{scope:e.__scopeMenu},cn(hb,{present:r||i.open},cn(mb.Slot,{scope:e.__scopeMenu},a.modal?cn(mYe,V({},o,{ref:t})):cn(gYe,V({},o,{ref:t})))))}),mYe=or((e,t)=>{const n=Ou(Ls,e.__scopeMenu),r=Yt(null),o=Aa(t,r);return dn(()=>{const i=r.current;if(i)return UFe(i)},[]),cn(JO,V({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:hr(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),gYe=or((e,t)=>{const n=Ou(Ls,e.__scopeMenu);return cn(JO,V({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),JO=or((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:y,disableOutsideScroll:w,...C}=e,k=Ou(Ls,n),T=Yw(Ls,n),E=Ww(n),_=zj(n),R=aYe(n),[P,$]=Tn(null),z=Yt(null),q=Aa(t,z,k.onContentChange),Y=Yt(0),J=Yt(""),K=Yt(0),ee=Yt(null),re=Yt("right"),ne=Yt(0),oe=w?tYe:Q2,fe=w?{as:fb,allowPinchZoom:!0}:void 0,se=le=>{var ce,Se;const Me=J.current+le,ze=R().filter(Ve=>!Ve.disabled),ke=document.activeElement,pe=(ce=ze.find(Ve=>Ve.ref.current===ke))===null||ce===void 0?void 0:ce.textValue,Oe=ze.map(Ve=>Ve.textValue),Ae=AYe(Oe,Me,pe),Pe=(Se=ze.find(Ve=>Ve.textValue===Ae))===null||Se===void 0?void 0:Se.ref.current;(function Ve(Le){J.current=Le,window.clearTimeout(Y.current),Le!==""&&(Y.current=window.setTimeout(()=>Ve(""),1e3))})(Me),Pe&&setTimeout(()=>Pe.focus())};dn(()=>()=>window.clearTimeout(Y.current),[]),Jje();const ue=Zn(le=>{var ce,Se;return re.current===((ce=ee.current)===null||ce===void 0?void 0:ce.side)&&MYe(le,(Se=ee.current)===null||Se===void 0?void 0:Se.area)},[]);return cn(hYe,{scope:n,searchRef:J,onItemEnter:Zn(le=>{ue(le)&&le.preventDefault()},[ue]),onItemLeave:Zn(le=>{var ce;ue(le)||((ce=z.current)===null||ce===void 0||ce.focus(),$(null))},[ue]),onTriggerLeave:Zn(le=>{ue(le)&&le.preventDefault()},[ue]),pointerGraceTimerRef:K,onPointerGraceIntentChange:Zn(le=>{ee.current=le},[])},cn(oe,fe,cn(Qje,{asChild:!0,trapped:o,onMountAutoFocus:hr(i,le=>{var ce;le.preventDefault(),(ce=z.current)===null||ce===void 0||ce.focus()}),onUnmountAutoFocus:a},cn(Gje,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:v,onDismiss:y},cn(PO,V({asChild:!0},_,{dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:$,onEntryFocus:hr(c,le=>{T.isUsingKeyboardRef.current||le.preventDefault()})}),cn(wWe,V({role:"menu","aria-orientation":"vertical","data-state":Kj(k.open),"data-radix-menu-content":"",dir:T.dir},E,C,{ref:q,style:{outline:"none",...C.style},onKeyDown:hr(C.onKeyDown,le=>{const Se=le.target.closest("[data-radix-menu-content]")===le.currentTarget,Me=le.ctrlKey||le.altKey||le.metaKey,ze=le.key.length===1;Se&&(le.key==="Tab"&&le.preventDefault(),!Me&&ze&&se(le.key));const ke=z.current;if(le.target!==ke||!rYe.includes(le.key))return;le.preventDefault();const Oe=R().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);Bj.includes(le.key)&&Oe.reverse(),TYe(Oe)}),onBlur:hr(e.onBlur,le=>{le.currentTarget.contains(le.target)||(window.clearTimeout(Y.current),J.current="")}),onPointerMove:hr(e.onPointerMove,gb(le=>{const ce=le.target,Se=ne.current!==le.clientX;if(le.currentTarget.contains(ce)&&Se){const Me=le.clientX>ne.current?"right":"left";re.current=Me,ne.current=le.clientX}}))})))))))}),vYe="MenuItem",bYe=or((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=Yj(vYe,n),s=zj(n),c=Yt(null),f=Aa(t,c),[p,m]=Tn(!1),[v,y]=Tn("");return dn(()=>{const w=c.current;if(w){var C;y(((C=w.textContent)!==null&&C!==void 0?C:"").trim())}},[i.children]),cn(mb.ItemSlot,{scope:n,disabled:r,textValue:o??v},cn(NO,V({asChild:!0},s,{focusable:!r}),cn(Ui.div,V({role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:f,onPointerMove:hr(e.onPointerMove,gb(w=>{r?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus())})),onPointerLeave:hr(e.onPointerLeave,gb(w=>a.onItemLeave(w))),onFocus:hr(e.onFocus,()=>m(!0)),onBlur:hr(e.onBlur,()=>m(!1))}))))}),yYe="MenuRadioGroup";rf(yYe,{value:void 0,onValueChange:()=>{}});const xYe="MenuItemIndicator";rf(xYe,{checked:!1});const Uj="MenuSub",[wYe,qj]=rf(Uj),CYe=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=Ou(Uj,t),a=Ww(t),[s,c]=Tn(null),[f,p]=Tn(null),m=Is(o);return dn(()=>(i.open===!1&&m(!1),()=>m(!1)),[i.open,m]),cn(Tj,a,cn(Vj,{scope:t,open:r,onOpenChange:m,content:f,onContentChange:p},cn(wYe,{scope:t,contentId:nf(),triggerId:nf(),trigger:s,onTriggerChange:c},n)))},Uw="MenuSubTrigger",SYe=or((e,t)=>{const n=Ou(Uw,e.__scopeMenu),r=Yw(Uw,e.__scopeMenu),o=qj(Uw,e.__scopeMenu),i=Yj(Uw,e.__scopeMenu),a=Yt(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=i,f={__scopeMenu:e.__scopeMenu},p=Zn(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return dn(()=>p,[p]),dn(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),cn(Hj,V({asChild:!0},f),cn(bYe,V({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Kj(n.open)},e,{ref:EO(t,o.onTriggerChange),onClick:m=>{var v;(v=e.onClick)===null||v===void 0||v.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:hr(e.onPointerMove,gb(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:hr(e.onPointerLeave,gb(m=>{var v;p();const y=(v=n.content)===null||v===void 0?void 0:v.getBoundingClientRect();if(y){var w;const C=(w=n.content)===null||w===void 0?void 0:w.dataset.side,k=C==="right",T=k?-5:5,E=y[k?"left":"right"],_=y[k?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+T,y:m.clientY},{x:E,y:y.top},{x:_,y:y.top},{x:_,y:y.bottom},{x:E,y:y.bottom}],side:C}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:hr(e.onKeyDown,m=>{const v=i.searchRef.current!=="";if(!(e.disabled||v&&m.key===" ")&&oYe[r.dir].includes(m.key)){var y;n.onOpenChange(!0),(y=n.content)===null||y===void 0||y.focus(),m.preventDefault()}})})))}),kYe="MenuSubContent",EYe=or((e,t)=>{const n=Wj(Ls,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ou(Ls,e.__scopeMenu),a=Yw(Ls,e.__scopeMenu),s=qj(kYe,e.__scopeMenu),c=Yt(null),f=Aa(t,c);return cn(mb.Provider,{scope:e.__scopeMenu},cn(hb,{present:r||i.open},cn(mb.Slot,{scope:e.__scopeMenu},cn(JO,V({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:f,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var m;a.isUsingKeyboardRef.current&&((m=c.current)===null||m===void 0||m.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:hr(e.onFocusOutside,p=>{p.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:hr(e.onEscapeKeyDown,p=>{a.onClose(),p.preventDefault()}),onKeyDown:hr(e.onKeyDown,p=>{const m=p.currentTarget.contains(p.target),v=iYe[a.dir].includes(p.key);if(m&&v){var y;i.onOpenChange(!1),(y=s.trigger)===null||y===void 0||y.focus(),p.preventDefault()}})})))))});function Kj(e){return e?"open":"closed"}function TYe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function DYe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function AYe(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=DYe(e,Math.max(i,0));o.length===1&&(a=a.filter(f=>f!==n));const c=a.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function OYe(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,f=t[a].x,p=t[a].y;c>r!=p>r&&n<(f-s)*(r-c)/(p-c)+s&&(o=!o)}return o}function MYe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return OYe(n,t)}function gb(e){return t=>t.pointerType==="mouse"?e(t):void 0}const PYe=uYe,NYe=Hj,_Ye=fYe,RYe=pYe,IYe=CYe,LYe=SYe,$Ye=EYe,QO="Menubar",[eM,FYe,BYe]=DO(QO),[Gj,PUe]=Mp(QO,[BYe,Np]),of=lYe(),Xj=Np(),[zYe,tM]=Gj(QO),VYe=or((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:i,loop:a=!0,dir:s,...c}=e,f=Iw(s),p=Xj(n),[m="",v]=Rw({prop:r,onChange:o,defaultProp:i}),[y,w]=Tn(null);return cn(zYe,{scope:n,value:m,onMenuOpen:Zn(C=>{v(C),w(C)},[v]),onMenuClose:Zn(()=>v(""),[v]),onMenuToggle:Zn(C=>{v(k=>k?"":C),w(C)},[v]),dir:f,loop:a},cn(eM.Provider,{scope:n},cn(eM.Slot,{scope:n},cn(PO,V({asChild:!0},p,{orientation:"horizontal",loop:a,dir:f,currentTabStopId:y,onCurrentTabStopIdChange:w}),cn(Ui.div,V({role:"menubar"},c,{ref:t}))))))}),Zj="MenubarMenu",[HYe,Jj]=Gj(Zj),jYe=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=nf(),i=n||o||"LEGACY_REACT_AUTO_VALUE",a=tM(Zj,t),s=of(t),c=Yt(null),f=Yt(!1),p=a.value===i;return dn(()=>{p||(f.current=!1)},[p]),cn(HYe,{scope:t,value:i,triggerId:nf(),triggerRef:c,contentId:nf(),wasKeyboardTriggerOpenRef:f},cn(PYe,V({},s,{open:p,onOpenChange:m=>{m||a.onMenuClose()},modal:!1,dir:a.dir},r)))},Qj="MenubarTrigger",WYe=or((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,i=Xj(n),a=of(n),s=tM(Qj,n),c=Jj(Qj,n),f=Yt(null),p=Aa(t,f,c.triggerRef),[m,v]=Tn(!1),y=s.value===c.value;return cn(eM.ItemSlot,{scope:n,value:c.value,disabled:r},cn(NO,V({asChild:!0},i,{focusable:!r,tabStopId:c.value}),cn(NYe,V({asChild:!0},a),cn(Ui.button,V({type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":y,"aria-controls":y?c.contentId:void 0,"data-highlighted":m?"":void 0,"data-state":y?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:p,onPointerDown:hr(e.onPointerDown,w=>{!r&&w.button===0&&w.ctrlKey===!1&&(s.onMenuOpen(c.value),y||w.preventDefault())}),onPointerEnter:hr(e.onPointerEnter,()=>{if(!!s.value&&!y){var C;s.onMenuOpen(c.value),(C=f.current)===null||C===void 0||C.focus()}}),onKeyDown:hr(e.onKeyDown,w=>{r||(["Enter"," "].includes(w.key)&&s.onMenuToggle(c.value),w.key==="ArrowDown"&&s.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(w.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,w.preventDefault()))}),onFocus:hr(e.onFocus,()=>v(!0)),onBlur:hr(e.onBlur,()=>v(!1))})))))}),YYe=e=>{const{__scopeMenubar:t,...n}=e,r=of(t);return cn(_Ye,V({},r,n))},eW="MenubarContent",UYe=or((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,i=of(n),a=tM(eW,n),s=Jj(eW,n),c=FYe(n),f=Yt(!1);return cn(RYe,V({id:s.contentId,"aria-labelledby":s.triggerId,"data-radix-menubar-content":""},i,o,{ref:t,align:r,onCloseAutoFocus:hr(e.onCloseAutoFocus,p=>{if(!!!a.value&&!f.current){var v;(v=s.triggerRef.current)===null||v===void 0||v.focus()}f.current=!1,p.preventDefault()}),onFocusOutside:hr(e.onFocusOutside,p=>{const m=p.target;c().some(y=>{var w;return(w=y.ref.current)===null||w===void 0?void 0:w.contains(m)})&&p.preventDefault()}),onInteractOutside:hr(e.onInteractOutside,()=>{f.current=!0}),onEntryFocus:p=>{s.wasKeyboardTriggerOpenRef.current||p.preventDefault()},onKeyDown:hr(e.onKeyDown,p=>{if(["ArrowRight","ArrowLeft"].includes(p.key)){const m=p.target,v=m.hasAttribute("data-radix-menubar-subtrigger"),y=m.closest("[data-radix-menubar-content]")!==p.currentTarget,C=(a.dir==="rtl"?"ArrowRight":"ArrowLeft")===p.key;if(!C&&v||y&&C)return;let E=c().filter(P=>!P.disabled).map(P=>P.value);C&&E.reverse();const _=E.indexOf(s.value);E=a.loop?XYe(E,_+1):E.slice(_+1);const[R]=E;R&&a.onMenuOpen(R)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))}),qYe=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=of(t),[s=!1,c]=Rw({prop:r,defaultProp:i,onChange:o});return cn(IYe,V({},a,{open:s,onOpenChange:c}),n)},KYe=or((e,t)=>{const{__scopeMenubar:n,...r}=e,o=of(n);return cn(LYe,V({"data-radix-menubar-subtrigger":""},o,r,{ref:t}))}),GYe=or((e,t)=>{const{__scopeMenubar:n,...r}=e,o=of(n);return cn($Ye,V({},o,{"data-radix-menubar-content":""},r,{ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))});function XYe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const tW=VYe,nW=jYe,rW=WYe,nM=YYe,oW=UYe,ZYe=qYe,JYe=KYe,QYe=GYe,eUe=()=>{const e=({data:n,getOptionLabel:r=c=>c.label,getOptionValue:o=c=>c.value,getOptionParent:i=c=>c.parent,getOptionNavlink:a=c=>c.navlink,getOptionExternalLink:s=c=>c.externalLink})=>{const c=[];return n?.forEach(f=>{o(f)&&c.push({value:o(f),label:r(f),parent:i(f),externalLink:s(f),navlink:a(f)})}),c},t=(n=[],r)=>{const o=[];return n.forEach(i=>{const a=i;if(!r&&!a?.parent||a?.parent===r){const s=t(n,a.value);s.length>0&&(a.children=s),o.push(a)}}),o};return{renderMenubarToSpecificFieldName:e,buildMenubar:t}},tUe=({data:e,onClick:t,orientation:n="horizontal",getOptionValue:r,getOptionLabel:o,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s,noDataText:c="no data",LinkComponent:f,...p})=>{const{buildMenubar:m,renderMenubarToSpecificFieldName:v}=eUe(),y=m(v({data:e,getOptionLabel:o,getOptionValue:r,getOptionParent:i,getOptionNavlink:a,getOptionExternalLink:s})),w=({data:T})=>mt(nW,{children:[mt(rW,{className:"MenubarTrigger",children:[T.label,W("div",{className:"LeftMainSlot",children:W(m6e,{size:10})})]}),W(nM,{children:W(oW,{className:"MenubarContent",align:"start",side:n==="horizontal"?"bottom":"right",sideOffset:5,children:(T.children??[]).map(E=>E.children&&E.children.length>0?W(k,{data:E}):W(C,{data:E}))})})]}),C=({data:T})=>{const E=t||!T.navlink?"span":T.externalLink?"a":f||"a",_=t?{onClick:()=>{t(T)}}:T.externalLink||!f?{href:T.navlink}:{to:T.navlink};return W(E,{className:"MenubarItem MenubarTriggerText",..._,children:T.label})},k=({data:T})=>mt(ZYe,{children:[mt(JYe,{className:"MenubarSubTrigger",children:[W("span",{className:"MenubarTriggerText",children:T.label}),W("div",{className:"LeftSlot",children:W(g6e,{size:10})})]}),W(nM,{children:W(QYe,{className:"MenubarSubContent",alignOffset:-5,sideOffset:10,children:(T.children??[]).map(E=>E.children&&E.children.length>0?W(k,{data:E}):W(C,{data:E}))})})]});return W(Or,{children:y.length>0?W(tW,{...p,className:"MenubarRoot",dir:"rtl",style:{flexDirection:n==="horizontal"?"unset":"column",...p.style},children:y.map(T=>W(w,{data:T,...p}))}):W("div",{style:{width:"100%",textAlign:"center"},children:c})})};function nUe({label:e,...t}){return W(aR,{...t,label:e,sx:{margin:"0px","& .MuiFormControlLabel-label":{width:"100%",border:n=>t.isActive?`2px solid ${n.palette.primary.main}`:"unset"}},control:W(lL,{sx:{display:"none"}})})}function rUe(e){return W(ja,{...e})}var iW,aW;function rM(){return rM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rM.apply(this,arguments)}var sW=function(t){return A.createElement("svg",rM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480"},t),iW||(iW=A.createElement("defs",null,A.createElement("clipPath",{id:"ir_svg__a"},A.createElement("path",{fillOpacity:.7,d:"M-85.3 0h682.7v512H-85.3z"})))),aW||(aW=A.createElement("g",{fillRule:"evenodd",clipPath:"url(#ir_svg__a)",transform:"translate(80)scale(.9375)"},A.createElement("path",{fill:"#fff",d:"M-192 0h896v512h-896z"}),A.createElement("path",{fill:"#da0000",d:"M-192 343.8h896V512h-896z"}),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-21.6 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M52.4 367.7v3.4H33.8v-3.4zm-34.6-7.9H21v11.3h-3.3z"}),A.createElement("path",{d:"M49.6 351H53v20h-3.4zm-8.4 0h3.3v20h-3.3zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M17.8 359.9H21V371h-3.3z"}),A.createElement("path",{d:"M17.8 359.9H21V371h-3.3z"}),A.createElement("path",{d:"M17.8 359.9H21V371h-3.3zm-39.3 0h3.3V371h-3.3zm28.8 0h3.4V371H7.3zm-14.3 0h3.4V371H-7z"}),A.createElement("path",{d:"M9.6 367.7v3.4H-5.5v-3.4zm1-8.7v3.4H1V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-102.2 351h49v3.3h-49zm7.3 16.8h3.4v3.3H-95zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M-28.2 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-31 351h3.4v20H-31zm-8.4 0h3.3v20h-3.3zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M-62.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M-62.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M-62.8 359.9h3.3V371h-3.3zm-39.3 0h3.3V371h-3.3zm28.8 0h3.3V371h-3.3zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M-71 367.7v3.4h-15v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M58.3 351h49v3.3h-49zm7.3 16.8H69v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.3-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M132.3 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M129.5 351h3.4v20h-3.4zm-8.4 0h3.4v20H121zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M97.7 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M97.7 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M97.7 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M89.6 367.7v3.4H74.4v-3.4zm1-8.7v3.4H81V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M622.7 351h49v3.3h-49zm7.3 16.8h3.4v3.3H630zm41.9 0v3.3H662v-3.4zm5.3-16.8h3.3v20h-3.4z"}),A.createElement("path",{d:"M696.7 367.7v3.4H678v-3.4zm-34.6-7.9h3.4v11.3H662z"}),A.createElement("path",{d:"M694 351h3.3v20h-3.4zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M662 359.9h3.5V371H662z"}),A.createElement("path",{d:"M662 359.9h3.5V371H662z"}),A.createElement("path",{d:"M662 359.9h3.5V371H662zm-39.2 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M654 367.7v3.4h-15.2v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M138.7 351h49.1v3.3h-49zm7.4 16.8h3.3v3.3h-3.3zm41.8 0v3.3h-9.8v-3.4zm5.3-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M212.8 367.7v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M210 351h3.4v20H210zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-17.9V359zm39.3 0v3.4h-17.9V359z"}),A.createElement("path",{d:"M178.1 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M178.1 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M178.1 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.2 0h3.3V371h-3.3z"}),A.createElement("path",{d:"M170 367.7v3.4h-15.1v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M219.5 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zM274 351h3.3v20H274z"}),A.createElement("path",{d:"M293.5 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M290.7 351h3.4v20h-3.4zm-8.4 0h3.4v20h-3.4zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M258.9 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M258.9 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M258.9 359.9h3.4V371h-3.4zm-39.3 0h3.3V371h-3.3zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371H234z"}),A.createElement("path",{d:"M250.8 367.7v3.4h-15.2v-3.4zm1-8.7v3.4H242V359z"})),A.createElement("path",{fill:"#239f40",d:"M-192 0h896v168.2h-896z"}),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M300.7 351h49v3.3h-49zm7.3 16.8h3.4v3.3H308zm41.9 0v3.3H340v-3.4zm5.3-16.8h3.3v20h-3.3z"}),A.createElement("path",{d:"M374.7 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3H340z"}),A.createElement("path",{d:"M372 351h3.3v20H372zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M340 359.9h3.5V371H340z"}),A.createElement("path",{d:"M340 359.9h3.5V371H340z"}),A.createElement("path",{d:"M340 359.9h3.5V371H340zm-39.2 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M332 367.7v3.4h-15.2v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M381.4 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm42 0v3.3h-9.9v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M455.4 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M452.7 351h3.3v20h-3.3zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-17.9V359zm39.3 0v3.4h-17.9V359z"}),A.createElement("path",{d:"M420.8 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M420.8 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M420.8 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.3z"}),A.createElement("path",{d:"M412.7 367.7v3.4h-15.1v-3.4zm1-8.7v3.4H404V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M462.2 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M536.2 367.7v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M533.4 351h3.4v20h-3.4zm-8.4 0h3.3v20H525zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M501.6 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M501.6 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M501.6 359.9h3.3V371h-3.3zm-39.4 0h3.4V371h-3.4zm28.9 0h3.3V371h-3.3zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M493.4 367.7v3.4h-15.1v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M543.4 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm41.9 0v3.3h-9.8v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M617.4 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M614.6 351h3.4v20h-3.4zm-8.4 0h3.3v20h-3.3zm-44.8 8v3.4h-18V359zm39.3 0v3.4h-18V359z"}),A.createElement("path",{d:"M582.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M582.8 359.9h3.3V371h-3.3z"}),A.createElement("path",{d:"M582.8 359.9h3.3V371h-3.3zm-39.3 0h3.3V371h-3.3zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371H558z"}),A.createElement("path",{d:"M574.6 367.7v3.4h-15.1v-3.4zm1-8.7v3.4H566V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-183.8 351h49v3.3h-49zm7.3 16.8h3.4v3.3h-3.4zm42 0v3.3h-9.9v-3.4zm5.2-16.8h3.4v20h-3.4z"}),A.createElement("path",{d:"M-109.8 367.7v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-112.5 351h3.3v20h-3.3zm-8.5 0h3.4v20h-3.4zm-44.8 8v3.4h-17.9V359zm39.3 0v3.4h-17.9V359z"}),A.createElement("path",{d:"M-144.4 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M-144.4 359.9h3.4V371h-3.4z"}),A.createElement("path",{d:"M-144.4 359.9h3.4V371h-3.4zm-39.3 0h3.4V371h-3.4zm28.8 0h3.4V371h-3.4zm-14.3 0h3.4V371h-3.4z"}),A.createElement("path",{d:"M-152.5 367.7v3.4h-15.2v-3.4zm1-8.7v3.4h-9.6V359z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-21.6 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M52.4 160.2v3.4H33.8v-3.4zm-34.6-7.9H21v11.3h-3.3z"}),A.createElement("path",{d:"M49.6 143.4H53v20.2h-3.4zm-8.4 0h3.3v20.2h-3.3zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M17.8 152.3H21v11.3h-3.3z"}),A.createElement("path",{d:"M17.8 152.3H21v11.3h-3.3z"}),A.createElement("path",{d:"M17.8 152.3H21v11.3h-3.3zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.4v11.3H7.3zm-14.3 0h3.4v11.3H-7z"}),A.createElement("path",{d:"M9.6 160.2v3.4H-5.5v-3.4zm1-8.7v3.3H1v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-102.2 143.4h49v3.4h-49zm7.3 17h3.4v3.2H-95zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M-28.2 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-31 143.4h3.4v20.2H-31zm-8.4 0h3.3v20.2h-3.3zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M-62.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-62.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M-62.8 152.3h3.3v11.3h-3.3zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.3v11.3h-3.3zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-71 160.2v3.4h-15v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M58.3 143.4h49v3.4h-49zm7.3 17H69v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.3-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M132.3 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M129.5 143.4h3.4v20.2h-3.4zm-8.4 0h3.4v20.2H121zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M97.7 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M97.7 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M97.7 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M89.6 160.2v3.4H74.4v-3.4zm1-8.7v3.3H81v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M622.7 143.4h49v3.4h-49zm7.3 17h3.4v3.2H630zm41.9-.2v3.4H662v-3.4zm5.3-16.8h3.3v20.2h-3.4z"}),A.createElement("path",{d:"M696.7 160.2v3.4H678v-3.4zm-34.6-7.9h3.4v11.3H662z"}),A.createElement("path",{d:"M694 143.4h3.3v20.2h-3.4zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M662 152.3h3.5v11.3H662z"}),A.createElement("path",{d:"M662 152.3h3.5v11.3H662z"}),A.createElement("path",{d:"M662 152.3h3.5v11.3H662zm-39.2 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M654 160.2v3.4h-15.2v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M138.7 143.4h49.1v3.4h-49zm7.4 17h3.3v3.2h-3.3zm41.8-.2v3.4h-9.8v-3.4zm5.3-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M212.8 160.2v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M210 143.4h3.4v20.2H210zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-17.9v-3.3zm39.3 0v3.4h-17.9v-3.3z"}),A.createElement("path",{d:"M178.1 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M178.1 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M178.1 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.2 0h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M170 160.2v3.4h-15.1v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M219.5 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.3-16.8h3.3v20.2H274z"}),A.createElement("path",{d:"M293.5 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M290.7 143.4h3.4v20.2h-3.4zm-8.4 0h3.4v20.2h-3.4zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M258.9 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M258.9 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M258.9 152.3h3.4v11.3h-3.4zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3H234z"}),A.createElement("path",{d:"M250.8 160.2v3.4h-15.2v-3.4zm1-8.7v3.3H242v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M300.7 143.4h49v3.4h-49zm7.3 17h3.4v3.2H308zm41.9-.2v3.4H340v-3.4zm5.3-16.8h3.3v20.2h-3.3z"}),A.createElement("path",{d:"M374.7 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3H340z"}),A.createElement("path",{d:"M372 143.4h3.3v20.2H372zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M340 152.3h3.5v11.3H340z"}),A.createElement("path",{d:"M340 152.3h3.5v11.3H340z"}),A.createElement("path",{d:"M340 152.3h3.5v11.3H340zm-39.2 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M332 160.2v3.4h-15.2v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M381.4 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm42-.2v3.4h-9.9v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M455.4 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M452.7 143.4h3.3v20.2h-3.3zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-17.9v-3.3zm39.3 0v3.4h-17.9v-3.3z"}),A.createElement("path",{d:"M420.8 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M420.8 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M420.8 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.3z"}),A.createElement("path",{d:"M412.7 160.2v3.4h-15.1v-3.4zm1-8.7v3.3H404v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M462.2 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M536.2 160.2v3.4h-18.6v-3.4zm-34.7-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M533.4 143.4h3.4v20.2h-3.4zm-8.4 0h3.3v20.2H525zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M501.6 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M501.6 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M501.6 152.3h3.3v11.3h-3.3zm-39.4 0h3.4v11.3h-3.4zm28.9 0h3.3v11.3h-3.3zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M493.4 160.2v3.4h-15.1v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M543.4 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm41.9-.2v3.4h-9.8v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M617.4 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M614.6 143.4h3.4v20.2h-3.4zm-8.4 0h3.3v20.2h-3.3zm-44.8 8v3.4h-18v-3.3zm39.3 0v3.4h-18v-3.3z"}),A.createElement("path",{d:"M582.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M582.8 152.3h3.3v11.3h-3.3z"}),A.createElement("path",{d:"M582.8 152.3h3.3v11.3h-3.3zm-39.3 0h3.3v11.3h-3.3zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3H558z"}),A.createElement("path",{d:"M574.6 160.2v3.4h-15.1v-3.4zm1-8.7v3.3H566v-3.3z"})),A.createElement("g",{fill:"#fff",strokeWidth:"1pt"},A.createElement("path",{d:"M-183.8 143.4h49v3.4h-49zm7.3 17h3.4v3.2h-3.4zm42-.2v3.4h-9.9v-3.4zm5.2-16.8h3.4v20.2h-3.4z"}),A.createElement("path",{d:"M-109.8 160.2v3.4h-18.6v-3.4zm-34.6-7.9h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-112.5 143.4h3.3v20.2h-3.3zm-8.5 0h3.4v20.2h-3.4zm-44.8 8v3.4h-17.9v-3.3zm39.3 0v3.4h-17.9v-3.3z"}),A.createElement("path",{d:"M-144.4 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-144.4 152.3h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-144.4 152.3h3.4v11.3h-3.4zm-39.3 0h3.4v11.3h-3.4zm28.8 0h3.4v11.3h-3.4zm-14.3 0h3.4v11.3h-3.4z"}),A.createElement("path",{d:"M-152.5 160.2v3.4h-15.2v-3.4zm1-8.7v3.3h-9.6v-3.3z"})),A.createElement("path",{fill:"#d90000",d:"M-68.8 339.5h6V350h-6zm160.5 0h6V350h-6zm-283.7 0h6V350h-6zm81.5 0h6V350h-6zm80.9 0h6V350h-6zm40 0h6V350h-6zm40.9 0h6V350h-6zm80.4 0h6V350h-6zm203 0h6.1V350h-6zm-162.1 0h6V350h-6zm40 0h6V350h-6zm40.5 0h6V350h-6zm40.4 0h6V350h-6zm323.2 0h6V350h-6zm-242.7 0h6V350h-6zm40.8 0h6V350h-6zm41.3 0h6V350h-6zm38.8 0h6V350h-6zm41.3 0h6V350h-6zm40.4 0h6V350h-6zm119.7 0h6V350h-6zm-38.8 0h6V350h-6zm-808.9 0h6V350h-6z"}),A.createElement("path",{fill:"#239e3f",d:"M-68.8 162.6h6v10.5h-6zm160.5 0h6v10.5h-6zm-283.7 0h6v10.5h-6zm81.5 0h6v10.5h-6zm80.9 0h6v10.5h-6zm40 0h6v10.5h-6zm40.9 0h6v10.5h-6zm80.4 0h6v10.5h-6zm203 0h6.1v10.5h-6zm-162.1 0h6v10.5h-6zm40 0h6v10.5h-6zm40.5 0h6v10.5h-6zm40.4 0h6v10.5h-6zm323.2 0h6v10.5h-6zm-242.7 0h6v10.5h-6zm40.8 0h6v10.5h-6zm41.3 0h6v10.5h-6zm38.8 0h6v10.5h-6zm41.3 0h6v10.5h-6zm40.4 0h6v10.5h-6zm119.7 0h6v10.5h-6zm-38.8 0h6v10.5h-6zm-808.9 0h6v10.5h-6z"}),A.createElement("g",{fill:"#da0000"},A.createElement("path",{d:"M279.8 197.5c8.4 10.4 34.5 67.6-15.7 105.2-23.7 17.8-9 18.6-8.3 21.6 38-20.1 50.3-47.5 50-72-.2-24.4-13.2-46-26-54.8"}),A.createElement("path",{d:"M284.8 194.8a73.3 73.3 0 0 1 15.7 112.4c27.2-6 62-86.4-15.7-112.4m-57.6 0a73.3 73.3 0 0 0-15.6 112.4c-27.3-6-62-86.4 15.6-112.4"}),A.createElement("path",{d:"M232.2 197.5c-8.4 10.4-34.5 67.6 15.7 105.2 23.6 17.8 9 18.6 8.3 21.6-38-20.1-50.3-47.5-50-72 .2-24.4 13.2-46 26-54.8"}),A.createElement("path",{d:"M304.2 319.1c-14.9.2-33.6-2-47.5-9.3 2.3 4.5 4.2 7.3 6.5 11.7 13.2 1.3 31.5 2.8 41-2.4m-95 0c14.9.2 33.6-2 47.5-9.3-2.3 4.5-4.2 7.3-6.5 11.7-13.2 1.3-31.5 2.8-41-2.4m27.3-138.7c3 8 10.9 9.2 19.3 4.5 6.2 3.6 15.7 3.9 19-4.1 2.5 19.8-18.3 15-19 11.2-7.8 7.5-22.2 3.2-19.3-11.6"}),A.createElement("path",{d:"m256.4 331.6 7.8-9 1.1-120.1-9.3-8.2-9.3 7.8 1.9 121z"})))))},lW,cW,uW,dW,fW;function oM(){return oM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oM.apply(this,arguments)}var oUe=function(t){return A.createElement("svg",oM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480"},t),lW||(lW=A.createElement("path",{fill:"#bd3d44",d:"M0 0h640v480H0"})),cW||(cW=A.createElement("path",{stroke:"#fff",strokeWidth:37,d:"M0 55.3h640M0 129h640M0 203h640M0 277h640M0 351h640M0 425h640"})),uW||(uW=A.createElement("path",{fill:"#192f5d",d:"M0 0h364.8v258.5H0"})),dW||(dW=A.createElement("marker",{id:"us_svg__a",markerHeight:30,markerWidth:30},A.createElement("path",{fill:"#fff",d:"m14 0 9 27L0 10h28L5 27z"}))),fW||(fW=A.createElement("path",{fill:"none",markerMid:"url(#us_svg__a)",d:"m0 0 16 11h61 61 61 61 60L47 37h61 61 60 61L16 63h61 61 61 61 60L47 89h61 61 60 61L16 115h61 61 61 61 60L47 141h61 61 60 61L16 166h61 61 61 61 60L47 192h61 61 60 61L16 218h61 61 61 61 60z"})))},hW,pW;function iM(){return iM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iM.apply(this,arguments)}var iUe=function(t){return A.createElement("svg",iM({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480"},t),hW||(hW=A.createElement("defs",null,A.createElement("clipPath",{id:"sa_svg__a"},A.createElement("path",{fillOpacity:.7,d:"M-85.3 0h682.6v512H-85.3z"})))),pW||(pW=A.createElement("g",{fillRule:"evenodd",clipPath:"url(#sa_svg__a)",transform:"translate(80)scale(.9375)"},A.createElement("path",{fill:"#165d31",d:"M-128 0h768v512h-768z"}),A.createElement("path",{fill:"#fff",d:"M65.5 145.1c-.8 12-2 33 8.3 35.2 12.3 1.2 5.5-20.8 10-24.8.8-2 2.3-2 2.4.5v18.7c0 6 4 7.8 7 9 3.2-.2 5.4 0 6.6 3l1.6 32.3s7.4 2.2 7.8-18.1c.3-12-2.4-21.9-.8-24.2 0-2.3 3-2.4 5-1.3 3.2 2.2 4.6 5 9.6 4 7.6-2.2 12.2-5.9 12.3-11.7a47 47 0 0 0-3.5-16.6c.4-1-1.4-3.7-1-4.7 1.3 2.2 3.4 2 3.8 0-1.3-4.2-3.3-8.3-6.5-10-2.7-2.4-6.7-2-8 3-.8 5.7 2 12.4 6.1 18 .9 2.1 2.1 5.7 1.6 8.9-2.2 1.3-4.4.7-6.3-1.2 0 0-6-4.5-6-5.6 1.6-10.2.3-11.4-.6-14.3-.6-3.9-2.5-5.2-4-7.8-1.5-1.6-3.5-1.6-4.5 0-2.7 4.6-1.4 14.5.5 19 1.4 4.1 3.5 6.7 2.5 6.7-.8 2.3-2.5 1.7-3.8-1a66.6 66.6 0 0 1-2.1-17.4c-.5-4.6-1.1-14.4-4.2-17-1.8-2.4-4.5-1.2-5.5 1a82.4 82.4 0 0 0 .3 13.4c2 7.4 2.7 14 3.7 21.5.3 10.1-5.8 4.4-5.5-.7a45 45 0 0 0-.3-19.4c-1-2.6-2.1-3.2-4.6-2.8-1.9 0-6.8 5.3-8.2 14.3 0 0-1.2 4.6-1.7 8.7-.7 4.6-3.7 8-5.9-.6-1.8-6.3-3-21.6-6-18z"}),A.createElement("path",{fill:"#fff",d:"m99 194.2-32 15.4c.3-7.3 15.1-20.4 25.3-20.5 6.5.1 4.9 2.5 6.6 5.1z"}),A.createElement("path",{fill:"#fff",d:"M93.3 204.2c-16.8 43.5 39.5 49.6 45.8 1.8.6-2 3-3.9 3.4-.7-1.3 43.3-43.6 46.2-50.8 32.6a41.9 41.9 0 0 1-2.5-14.6c-1-8.5-5.5-5.2-6.2 3.2-.7 4.7-.5 6-.5 10.5 2.2 34.2 56.7 19.5 65.6-8.7 4.7-15.6-.8-27.1 1.7-27.1 5.4 5.8 13 .8 14.7-1.2.7-1 2.5-1.7 3.7-.4 4.2 3 11.6 1.6 13.2-3.7.9-5.3 1.6-10.7 1.8-16.2-3.5 1-6 1.7-6.3 3.2l-.7 4.6c-.3 1.5-3.2 1.5-3.4-.4-1.3-6-6.7-6.7-10 2.5-2.1 1.8-6.1 2.2-6.5-.5.5-6.2-2-7-7-4.1l-4.8-36.2c2 0 4 1.5 5.9-.9-2-6.5-6.5-19.7-9-20.7-1.1-1.4-2.1-.5-3.7-.1-2.6.8-5 3-4.2 7.4 3 18.8 5 33.1 8.1 52 .5 2.1-1.3 5-3.7 4.7-4-2.7-5-8.2-12-8-5 0-10.6 5.5-11.3 10.7-.9 4.2-1.2 8.7 0 12.3 3.5 4.2 7.7 3.8 11.4 2.9 3-1.3 5.5-4.3 6.6-3.6.7.9.1 10.9-14.3 18.5-8.7 4-15.7 4.8-19.4-2.3-2.3-4.5.2-21.4-5.6-17.5"}),A.createElement("path",{fill:"#fff",d:"M165 160c3.3-1.2 19.3-19.6 19.3-19.6l-2.4-2c-.9-.7-.8-1.5 0-2.2 4-2.4 2.7-7.4.7-9.8a9.7 9.7 0 0 0-8.7.1c-2.8 2.7-3.4 7-1.2 9.6 2.1 1 4.2 3.2 2.8 4.4-6.6 7-24.5 19.1-22.4 19.5.4.6 11.5.6 11.8 0zm-97 65c-6 9.6-6.5 23.9-3.2 28.2 1.8 2 4.7 2.9 6.8 2.2 3.8-1.6 5.5-9.3 4.6-12-1.3-2-2.3-2.3-3.6-.7-2.6 5.4-3.7 1.7-4-1.3a70 70 0 0 1 .8-15.2c.7-4.2 0-3-1.4-1.2m257.1-15.3c-5.8-12.6-13.9-25-16.4-29.7a558 558 0 0 0-24.8-36c-6.2-7.4 10.2 3.1-2-11.7l-8.9-7.5c-2-1.4-6.8-4-7.6.2-.4 3.8-.2 5.8.4 8.9.5 2 3.5 5.5 5 7.5a565 565 0 0 1 53.8 86.5c2.6-1.3 2-16.1.5-18.2"}),A.createElement("path",{fill:"#fff",d:"M299.6 251.5c-1.2 1.3 2.8 6.8 8 6.8 8.6-1 16.2-5.8 23.2-18.6a33 33 0 0 0 5.3-14.2 317 317 0 0 0-5.8-72.4c-.3-2 0-4.4.2-5 .6-.7 2.5 0 3.5-1.7 1.5-1.5-4-14-7-18.7-1-2.2-1.5-3.6-3.3.2a27 27 0 0 0-3 13.6c4.1 28.5 5.4 53.4 8 81.9.3 2.8-.1 6.8-2 8.4a80.2 80.2 0 0 1-27.1 19.7m116.5-.1c-6.2 3.6-6.2 7.7-1.2 7.8 8.6-1 18.8-1.7 25.8-12.3a41 41 0 0 0 4.2-16 303 303 0 0 0-4.7-71.4c-.2-2-1.1-6.7-.8-7.3.6-1.4 3.4.1 4.4-1.5 1.4-1.5-7.3-12.7-10.4-17.5-1-2.2-1.4-3.6-3.3.2a22.3 22.3 0 0 0-1.8 13.6c4.6 31 8 54.2 8.7 81.6-.4 2.6-.5 4-1.7 7.3-2.7 3.4-5.7 7.8-8.5 9.9-2.8 2-8.8 4-10.7 5.6"}),A.createElement("path",{fill:"#fff",d:"M420.7 223.7c0-7.3.1-13.5-.1-19a34 34 0 0 0-3-13.5c-1.8-4.1-.7-7.4-1.6-11.8-.8-4.4-.6-11-1.8-16.1-.4-2-1.4-8.5-1.1-9.2.5-1.4 2.4 0 3.4-1.6 1.4-1.5-5-18-8.2-22.7-1.1-2.1-3.3-1.4-5.8 2-2.5 2.3-1.6 7.4-.6 12.3 6.1 32.3 10.8 61.6 9.8 92.3-.4 2.6 9-7.8 9-12.7m-45.7-40c-3.9-.2-12-7.7-14.4-12a8 8 0 0 1 .4-6.5c1.5-1 3.7-2 5.4-1 0 0 1.7 2.4 1.4 2.7 2 1 3 .5 3.2-.4.1-1.5-.6-2.4-.6-4 .9-4.6 6-5.3 8-2.4 1.4 1.8 2 5.5 2.1 8 0 1.3-2-.2-3.3 0-1.1.4-1.4 1.8-1.5 3-.2 3.3-.6 8.6-.7 12.5zm-71.8 48c1-9.8-.4-27.3-.5-33.1A477 477 0 0 0 299 154c-1.2-8.4 3.4.9 2.8-4-1.5-8.3-6.1-14-11.6-21.5-1.7-2.5-1.7-3-4.4.6-3 6.7-.4 11.4.4 16.7 3.9 17.2 6.2 33 7.3 48.7a393 393 0 0 1 .4 49c3 .1 7.6-4.7 9.3-11.8"}),A.createElement("path",{fill:"#fff",d:"M434 216c-6.9-11.6-17.2-24-20-28.7a658 658 0 0 0-29.2-37.8c-8.5-9 4-1.5-1.6-8.5-4.7-5.1-6-6.8-10.1-9.9-2-1.3-3.2-3.8-4 .5a83 83 0 0 0-.2 11.2c0 1.7 1.8 5 3.4 7 20.7 25.5 43.4 51.5 61.6 84.2 2.6-1.3 1.7-16 0-18z"}),A.createElement("path",{fill:"#165d31",d:"M122.6 194.7c-.5.9-1.6 2-1.2 3.1.7 1 1.4 1.3 2.6 1.3 1.1 0 2.7.3 3-.3.6-.7 1-2 .6-3.3-1.2-3-4.4-1.8-5-.8"}),A.createElement("path",{fill:"#fff",d:"M354.2 362.5c9.2.4 15.2.5 23.3 1.4l9.6-1c10.6-1 11 15.1 11 15.1 0 9.5-3.7 10-8.4 11-2.7.4-4-1.6-5.5-3.6a14 14 0 0 1-7 .4c-3.9-.2-7.7-.2-11.5-.5-4-.3-6.2.5-10.3.1-.8 1.3-2 3.1-4.4 2.6-2-.3-4.5-6-3.8-10.5 1.5-3.2 1-2.1 1-3.5-37.6-1-75.5-2.7-112.3-2.2-28.8.1-57.2 1.3-85.7 2.5-15.2-.2-26.8-2.6-34.8-14.3.8 0 38.8 2.1 49.9 1.4 20.5-.2 39.3-1.9 60.2-2.5 41.2.7 82.1.7 123.3 3.6-4-2.7-4-9 2-10.6.5-.4.8 3.1 1.7 3 4.9-.3 2.7 6.3 1.7 7.6M188.6 135.3c-6.2 17.8 3.6 37.4 10.4 35.5 5 2 8-7.4 10-17.6 1.5-2.9 2.5-3.2 3.2-1.7-.2 13.6 1 16.7 4.5 20.8 7.8 6 14.3.8 14.8.3l6-6.1c1.4-1.5 3.2-1.5 5.1-.3 1.9 1.7 1.6 4.6 5.6 6.6 3.4 1.4 10.5.4 12.2-2.5 2.2-3.9 2.8-5.2 3.8-6.6 1.6-2.1 4.3-1.2 4.3-.5-.3 1.2-1.9 2.3-.8 4.5 2 1.4 2.4.5 3.5.2 4-2 7-10.6 7-10.6.1-3.2-1.7-3-2.9-2.2l-3.1 2.1c-2 .3-5.7 1.6-7.6-1.3-1.9-3.4-1.9-8.3-3.3-11.8 0-.2-2.6-5.5-.2-5.8 1.2.2 3.7.9 4.1-1.2 1.2-2.1-2.6-8-5.3-11-2.3-2.5-5.5-2.8-8.6-.2-2.2 2-1.9 4.2-2.3 6.3a9.8 9.8 0 0 0 2 8.7c2.2 4.2 6.1 9.7 4.8 17.5 0 0-2.3 3.6-6.3 3.1-1.7-.3-4.4-1-5.8-11.8-1.1-8 .2-19.4-3.2-24.7-1.3-3.3-2.2-6.4-5.2-.9-.8 2.2-4.3 5.5-1.8 12.2a36 36 0 0 1 2 19c-1.5 2.2-1.8 2.9-3.7 5-2.6 3-5.5 2.2-7.7 1.1-2-1.3-3.6-2-4.6-6.5.2-7 .6-18.5-.7-20.9-1.9-3.8-5-2.4-6.3-1.2a47.7 47.7 0 0 0-11.5 23.5c-1.8 5.8-3.7 4.1-5 1.8-3.2-3-3.5-26.7-7.4-22.8"}),A.createElement("path",{fill:"#fff",d:"M207.4 174.1c2.9-2 1.6-3.4 5.8.8a72 72 0 0 1 9.2 31.3c-.2 2.6 1.6 4.2 2.5 3.6.4-6 15.1-14.4 28.6-15.6 2-.5 1-4.4 1.3-6.4-.8-7.5 4.2-14.3 11.2-14.8 9.6 1.4 12.8 6.5 13 14.2-1.1 15-16.7 17.5-25.4 18.7-1.3.5-1.9 1.1 0 1.8l36.6.2 1.9 1c.2 1-.6.2-2 2.6a29.5 29.5 0 0 0-3.7 11.5c-10.9 3.6-22.2 5-33.6 6.5-4 2-6 4.7-5.2 7.7 1.4 3.3 10.2 6.7 10.2 6.8 1.7 1 3.6 3.5-.5 8.6-17.8-.8-31.7-8.4-36.5-19.1-1.4-1.1-3 0-4 1.4-7 9-13.8 17-25.7 21.4-7 1.8-14.3-1.1-17.7-5.7-2.3-2.7-2.2-5.6-3-6.2-3.9 1.7-36.9 15.7-32.7 9.1 8-8.5 22-14.9 34.2-23.3.9-2.9 2.5-12.5 7.3-15.6.3 0-.7 5.6-.6 8 0 2-.2 2.7.2 2.2.9-.5 15.7-12.2 17-15.8 1.4-2 .3-7.2.3-7.4-2.8-7.2-6.7-7.8-8.1-11.4-1.3-4.7-.7-10.1 2-11.7 2.4-2.1 5.2-1.9 7.9.5 3 2.7 5.6 8 6.4 11.9-.5 1.5-4-1-5-.3a16 16 0 0 1 3.7 7.8c2 8.2 1.4 11.4-.6 16.7-6.6 13.9-15 18-22.4 23.2-.2 0-.3 3.5 2.4 5.4 1 1 4.9 1.5 9.4 0a54.5 54.5 0 0 0 22.3-23.3 51 51 0 0 0-2.4-22.2c-2.9-6.7-6.3-16.2-6.3-16.4-.1-4.2.2-5.6 2-7.7m-95.8-38.6c4.2 2 12.2 1.1 11.8-5.7l-.2-3.1c-.8-2-3.2-1.5-3.7.5-.2.7.3 1.8-.3 2.1-.4.4-1.7.2-1.7-1.7 0-.6-.4-1.2-.7-1.6-.2-.2-.4-.2-.9-.2-.6 0-.6.1-.9.6-.1.5-.3 1-.3 1.6 0 .7-.4.9-.8 1-.6 0-.5 0-1-.2-.2-.3-.5-.4-.5-1l-.3-1.6c-.2-.3-.6-.5-1-.6-2.3 0-2.5 2.7-2.3 3.7-.2.2-.3 4.9 2.8 6.2"}),A.createElement("path",{fill:"#fff",d:"M235.1 187.7c4.2 2 14.3.9 11.8-5.6l-.2-3.2c-.9-2-3.2-1.5-3.7.6-.2.6.3 1.7-.4 2-.3.4-1.7.2-1.6-1.6 0-.6-.4-1.3-.7-1.7-.3-.1-.4-.2-1-.2-.5 0-.5.2-.8.7-.2.5-.3 1-.3 1.6-.1.6-.4.8-.9 1-.5 0-.4 0-.8-.3-.3-.3-.6-.4-.6-.9l-.3-1.6c-.2-.3-.6-.5-1-.6-2.3 0-2.5 2.6-2.4 3.6-.1.2-.2 5 3 6.2zm72-21.6c4.2 2 12.1 1.1 11.8-5.6l-.2-3.2c-.9-2-3.2-1.5-3.7.5-.2.7.3 1.8-.4 2.2-.3.3-1.7.1-1.6-1.8 0-.6-.4-1.2-.7-1.6-.3-.2-.4-.2-1-.2-.5 0-.5.2-.8.7l-.3 1.5c-.1.7-.4 1-.9 1s-.4 0-.8-.2c-.3-.3-.6-.4-.6-.9s-.1-1.3-.3-1.7c-.2-.3-.6-.4-1-.5-2.3 0-2.5 2.6-2.4 3.6-.1.2-.2 4.9 3 6.2zm37.3 54.3c-7.3 8.3-4.1 22-2.4 25 2.4 4.8 4.3 7.9 9 10.3 4.3 3.1 7.7 1.2 9.5-1 4.3-4.5 4.4-16 6.4-18.2 1.4-4.2 5-3.5 6.7-1.6a16.5 16.5 0 0 0 6.2 5.3c4 3.5 8.8 4.2 13.6 1 3.2-1.9 5.3-4.2 7.2-8.9 2-5.6 1-31.6.5-47l-4.2-21.5c0-.2-.5-10.2-1-12.5 0-1-.3-1.3.7-1.2 1.1 1 1.2 1 2 1.3 1 .2 2-1.7 1.3-3.3l-10-18.6c-.8-.8-1.9-1.6-3.2.2a7.3 7.3 0 0 0-2.4 5.5c.3 4.4 1 8.9 1.3 13.3l4 22.6c1.3 16 1.6 29.2 2.9 45.3-.2 6.8-2.3 12.7-4.3 13.6 0 0-3 1.7-5-.2-1.5-.6-7.4-9.9-7.4-9.9-3-2.7-5-2-7.1 0-6 5.8-8.6 16.4-12.7 23.8-1 1.7-4 3-7.2-.1-8.2-11.3-3.4-27.3-4.4-23.2M309 126.7c3.8 1.5 6.4 9.2 5.6 13-.8 4.5-2.8 9.5-4.2 8.9-1.6-.6 1-4.6-.5-8.8-.8-2.8-6-7.8-5.4-9.2-1-3.1 2.2-4.5 4.5-4z"}),A.createElement("path",{fill:"#fff",d:"M356.6 225c.7-9.2-.6-14.8-.8-20.2s-6.1-46.6-7.3-50.6c-1.5-7.8 5.7-1 4.9-5.6-2.5-5.6-8.6-13.9-10.5-18.8-1.2-2-.7-4-3.3-.5a42.3 42.3 0 0 0-2.3 19.2c6.2 32.3 12.5 59.1 11.5 89.8 3 0 6.3-6.7 7.8-13.3m64.4-85.3c3.5 1.7 5.5 11.3 5.1 14-.7 5-2.5 10.4-3.8 9.7-1.5-.6.3-7.4-.4-9.5-.8-3-5.5-8.4-5-10-1-3.4 2-4.8 4.1-4.2m-255.7 67.9c3.3 1.3 5.3 8.3 5 10.3-.8 3.7-2.5 7.7-3.8 7.1-1.3-.4.3-5.4-.3-7-.3-3.7-4.9-5.7-4.8-7.3-.8-3 2-3.5 4-3.1z"}),A.createElement("path",{fill:"#165d31",d:"M244.9 218.2c4.2.2 6.3 3.6 2.4 5-4 1.3-7.7 2.4-7.8 8 1.5 8-2 5.2-4 4.2-2.4-1.8-9.2-6-10.2-15-.1-2.1 1.6-4 4.3-4 4 1.1 10 1.2 15.3 1.8"}),A.createElement("path",{fill:"#fff",d:"M77.4 124.4c4.8 1.4 5.1 8.6 4.8 10.7-.7 3.8-2.4 7.9-3.6 7.4-1.4-.5 0-5.7-.7-7.3-.7-2.2-4.8-6.4-4.4-7.6-.9-2.5 2-3.7 3.9-3.2m95.9 33.6c-3.8 2-5.2 8-2.9 11.6 2.2 3 5.6 1.9 6 1.9 3.7.4 5.9-6.9 5.9-6.9s.1-2-4.2 1.9c-1.9.3-2-.4-2.5-1.4a9 9 0 0 1 .5-5.7c.7-1.8-.7-2.6-2.8-1.4m28-36.4c-2 1.3-5.7 5.2-5.8 9.6-.1 2.5-.6 2.5 1 4 1.3 1.8 2.4 1.7 4.8.4a5.1 5.1 0 0 0 2.3-3.4c.6-2.8-3 1.4-3.4-1.8-.8-3 1.5-4.2 3.7-7 0-2 0-3.3-2.7-1.8zm22.4 4a59.5 59.5 0 0 0-1.6 11.1c-.6 2.8 3 4 4.5.4 2.4-6.5 2.4-9.3 2.6-12-.7-4.3-3.6-4.2-5.5.5m142 72.3c.4-.5 20-14.4 20-14.4 2-.7 1.5 7.2.6 7.1a77.8 77.8 0 0 1-20.7 14.3c-1 .7-1.9-5.3 0-7zm17.7-.2c3.5 1.7 4.9 11.8 4.5 14.5 0 5.4-3.3 9.6-4.7 9-1.4-.7.2-6.7-.5-8.8-.8-3-3.7-8.5-3.2-10.1-1-3.4 1.8-5.2 4-4.6zm-116 43.4a26 26 0 0 1 5.6-4.9c2-1 3.8.8 3.7.7.3 2-1.2 3.7-.7 6.3.4 1 .7 2.2 2.6 1.8 3.1-2.5 6-2.7 9-2.8 2.5.1 2.6 4.2 1 4.2-5.7 1.2-8.2 2.8-12.3 4.3-2 1.2-3.6-.3-3.6-.4s-1.1-1.1-.4-3.7c.2-2-.6-3.2-2.4-3-1.2.8-2.4 1.2-3-.3-.3-1-.4-1.6.5-2.2m136.6 5.4c.8 1 1.4 2-.1 3.8l-3.7 3.2c-.6 1-1 2.8 1 3.3 3.6 1 12-4.5 12-4.6 1.4-1 1-3 .8-3-.8-.9-2.6-.3-3.8-.5-.6 0-2.5-.2-1.6-2a11.4 11.4 0 0 0 1.6-2.9c.5-1.2 0-2-2-2.7-2.1-.4-3-.2-5.3 0-1.2.2-1.6.8-1.9 2.3.1 2.3 1.5 2.2 3 3z"}),A.createElement("path",{fill:"#165d31",d:"M268.1 189.7c-.5 1-2.3 1-4 0s-2.7-2.6-2.1-3.5 2.3-.9 4 0 2.6 2.6 2.1 3.5m-89-53.6c-1 .3-2.4-.6-3-2s-.3-2.6.7-2.9 2.3.7 3 2 .3 2.7-.8 3zM355.2 375c9.4.4 18.2 0 27.5.5 1.7 1.5.5 5-.6 4.8l-7.8-.3c-.1-3-7.7-2.5-7.5.1-4.1.5-7.8-.1-12-.3-1.2-1.5-1-4.2.4-4.8"}))))};const aUe=({defaultValue:e,...t})=>{const[n,r]=Tn(e??"fa"),o={fa:"\u0641\u0627\u0631\u0633\u06CC",en:"English",ar:"\u0627\u0644\u0639\u0631\u0628\u06CC\u0629"},i=s=>{switch(s){case"fa":return W(sW,{className:"KdLanguageChange-country-flag"});case"ar":return W(iUe,{className:"KdLanguageChange-country-flag"});case"en":return W(oUe,{className:"KdLanguageChange-country-flag"});default:return W(sW,{className:"KdLanguageChange-country-flag"})}},a=s=>{r(s),t?.onChange(s)};return W(tW,{className:"KdLanguageChange-MenubarRoot",dir:"rtl",...t,children:mt(nW,{children:[mt(rW,{className:"KdLanguageChange-MenubarTrigger",children:[i(n),o[n]]}),W(nM,{children:W(oW,{align:"start",side:"bottom",sideOffset:10,className:"KdLanguageChange-MenubarContent",children:Object.keys(o).map((s,c)=>mt("div",{className:"KdLanguageChange-MenubarItem",onClick:()=>a(s),children:[i(s),o[s]]},c))})})]})})},sUe=hi("img")(),lUe=({pathProp:e,randomNumber:t,...n})=>W(sUe,{...n,alt:"CAPTCHA",src:`${e.APIURL}${PEe}${t}`});function cUe({Component:e,...t}){const n=Ur(()=>hi(e)(),[e]);return W(n,{...t})}function uUe({isOpen:e,onClose:t,...n}){return W(Ere,{...n,open:e,onClose:t})}const dUe=hi("span")(),fUe=({title:e="",arrow:t,children:n,placement:r,enterDelay:o,leaveDelay:i,...a})=>W(DI,{title:e,TransitionComponent:QS,enterDelay:o,leaveDelay:i,arrow:t,placement:r,children:W(dUe,{...a,children:n})}),mW=hi("img")(),gW=hi("div")();function hUe({children:e,open:t}){return W(rd,{open:t,fullScreen:!0,children:W(Im,{sx:{padding:"0px"},children:e})})}function pUe({src:e,modal:t=!1,basePath:n,pathProp:r,...o}){const[i,a]=Tn({fileType:"",extention:""}),[s,c]=Tn(!1);dn(()=>{(async()=>{if(e&&r?.APIURL){const w=(await qT(r.APIURL,[e])??[]).find(k=>k.guid===e)?.fileName,C=w&&w?.split(".").pop();a({extention:C,fileType:Object.keys(Di).find(k=>Di[k].includes(C))??""})}})()},[e]);const f=v=>v==="small"?n?.basePathThumbnail?n?.basePathThumbnail+e:e:n?.basePathStream?n?.basePathStream+e:e;if(!e)return W(gW,{sx:{...o?.style,...o?.sx},children:W(LV,{style:{color:"gray",height:"100%",width:"100%"}})});function p(){if(i.fileType==="text"&&i.extention==="pdf")return W(sM,{handleClose:()=>c(!1),fileUrl:f("large")})}const m=p();if(t===!0)return mt(Or,{children:[W(mW,{...o,src:f("small"),onClick:()=>m&&c(!0)}),m&&W(hUe,{open:s,children:m})]});if(m){if(m)return W(gW,{...o,children:m})}else W(mW,{...o,src:f("small")})}const mUe=(e,t,n,r,o)=>{const i={IMG:"create/image",TEXT:"create/text",VIDEO:"create/video",COMPRESS:"create/compress",FONT:"create/font"};return e?{url:i.IMG,type:"IMG"}:t?{url:i.TEXT,type:"TEXT"}:n?{url:i.VIDEO,type:"VIDEO"}:r?{url:i.COMPRESS,type:"COMPRESS"}:o?{url:i.FONT,type:"FONT"}:{url:"create",type:void 0}};function aM({APIURL:e=window?.env?.REACT_APP_APIURL??void 0,sessionId:t=localStorage.getItem("sessionId")??"",fileSizeLimit:n=2,fileCountLimit:r=20,validUploadType:o=["IMG","TEXT","VIDEO","COMPRESS","FONT"],multiple:i=!0,onError:a}){const[s,c]=Tn([]),f=Yt(0),[p,m]=Tn([]),v={},y=k=>{c(T=>{const E=T.filter(_=>_.session!==k);return f.current=E.length,E})},w=(k,T)=>{console.log(k,"err"),a&&a("\u0639\u0645\u0644\u06CC\u0627\u062A \u0628\u0627 \u062E\u0637\u0627 \u0645\u0648\u0627\u062C\u0647 \u0634\u062F"),m(E=>E.filter(_=>_.file!==T))};function C(k,T){if(!e)a&&a("Not exist APIURL"),console.error("Not exist APIURL");else try{const E=k.target.files||[];if(!i&&E.length>1){a&&a("\u062D\u062F\u0627\u06A9\u062B\u0631 1 \u0641\u0627\u06CC\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F.");return}if(i&&E.length+f.current>r){a&&a(`\u062D\u062F\u0627\u06A9\u062B\u0631 ${r} \u0641\u0627\u06CC\u0644 \u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F.`);return}for(let _=0;_<E.length;_++){const R=E[_];if(R.size===0){a&&a("\u0634\u0645\u0627 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u06CC\u062F \u0641\u0627\u06CC\u0644 \u062E\u0627\u0644\u06CC \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0646\u06CC\u062F");return}const P=R.size/1024/1024,$=R.name,z=$.lastIndexOf(".")+1,q=$.substr(z,$.length).toLowerCase(),Y=T?!!T?.image&&!!(T?.image==="ALL"?Di.image:T?.image)?.find(se=>se===q):!!o?.find(se=>se==="IMG")&&!!Di?.image?.find(se=>se===q),J=T?!!T?.text&&!!(T?.text==="ALL"?Di.text:T?.text)?.find(se=>se===q):!!o?.find(se=>se==="TEXT")&&!!Di?.text?.find(se=>se===q),K=T?!!T?.video&&!!(T?.video==="ALL"?Di.video:T?.video)?.find(se=>se===q):!!o?.find(se=>se==="VIDEO")&&!!Di?.video?.find(se=>se===q),ee=T?!!T?.compress&&!!(T?.compress==="ALL"?Di.compress:T?.compress)?.find(se=>se===q):!!o?.find(se=>se==="COMPRESS")&&!!Di?.compress?.find(se=>se===q),re=T?!!T?.font&&!!(T?.font==="ALL"?Di.font:T?.font)?.find(se=>se===q):!!o?.find(se=>se==="FONT")&&!!Di?.font?.find(se=>se===q),{url:ne,type:oe}=mUe(Y,J,K,ee,re),fe=`${e}${ml.upload}${u1.pathFileUpload}${ne}`;if(P>n)a&&a(`\u062D\u062F\u0627\u06A9\u062B\u0631 \u062D\u062C\u0645 \u0622\u067E\u0644\u0648\u062F ${n} \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A \u0645\u06CC\u200C\u0628\u0627\u0634\u062F.`);else if(oe){const se={file:R,progress:0,type:oe};m(ze=>i?[...ze,se]:[se]);const ue=512*1024,le=new FormData;le.append("chunkSize",String(ue)),le.append("totalSize",String(R.size)),le.append("fileName",R.name);const ce=Math.ceil(R.size/ue),Se=[];for(let ze=1;ze<=ce;ze++)Se.push(ze);fetch(fe,{method:"POST",headers:v,body:le,credentials:"include"}).then(ze=>ze.json()).then(async ze=>{let ke=0;if(ze?.data?.sessionId?.length>0){let pe=1,Oe=!1;for(let Ae=0;Ae<R.size;Ae+=ue,pe++)if(!Oe){const Pe=R.slice(Ae,Ae+ue),Ve=new FormData;Ve.append("data",Pe);const Le={method:"PUT",headers:{...v,sessionId:t},body:Ve,credentials:"include"};await fetch(`${e}${ml.upload}${u1.pathForUploadCunk}${ze?.data?.sessionId}?chunkNumber=${pe}`,Le).then(Ne=>{if(Ne.status!==200)Oe=!0,w(Oe,R);else{ke=ke+Pe.size;const Te=Math.round(ke/R.size*100);m(He=>He.map(Ie=>Ie.file===R?{...Ie,progress:Te,session:ze?.data?.sessionId}:Ie))}})}if(!Oe){const Ae={method:"GET",headers:{...v,sessionId:t},credentials:"include"};await fetch(`${e}${ml.upload}${u1.pathForGetFile}${ze?.data?.sessionId}`,Ae).then(Pe=>Pe.json()).then(Pe=>{m(Le=>Le.filter(Ne=>Ne.session!==ze?.data?.sessionId));const Ve={session:ze?.data?.sessionId,concluded:Pe.concluded,progress:100,fileURL:`${e}${ml.upload}${Pe.fileLink}`,fileName:$??"",type:oe};c(Le=>(i?f.current=Le.length+1:f.current=1,i?[...Le,Ve]:[Ve]))}).catch(Pe=>{w(Pe,R)})}}else w(`err in ${ne} service`,R)}).catch(ze=>{w(ze,R)})}else a&&a("\u0644\u0637\u0641\u0627 \u0641\u0631\u0645\u062A \u0645\u0646\u0627\u0633\u0628 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F.")}}catch(E){console.log("Error",E)}}return{APIURL:e,uploadingFiles:p,files:s,removeFile:y,handleFileChange:C,fileExtension:Di}}const gUe=(e,t)=>W(e,{children:n=>{const{CurrentPageInput:r,Download:o,EnterFullScreen:i,GoToNextPage:a,GoToPreviousPage:s,NumberOfPages:c,Print:f,Zoom:p,ZoomIn:m,ZoomOut:v}=n;return mt("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",paddingInline:"20px"},children:[mt("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"},children:[W(v,{}),W(p,{}),W(m,{})]}),mt("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"},children:[W(s,{}),W(r,{}),mt("div",{style:{color:"white"},children:["/ ",W(c,{})]}),W(a,{})]}),mt("div",{style:{display:"flex",gap:"10px"},children:[W(i,{}),W(o,{}),W(f,{}),W(l1e,{size:24,onClick:()=>{t?.()},style:{cursor:"pointer",color:"white"}})]})]})}}),sM=({fileUrl:e,handleClose:t})=>{const n=xY({renderToolbar:r=>gUe(r,()=>{t()}),sidebarTabs:r=>[r[0]]});return W(bY,{workerUrl:"https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",children:W(yY,{theme:"dark",fileUrl:e,plugins:[n],withCredentials:!0})})};function lM({sessionId:e,fileName:t,onDelete:n,smallUrl:r,largeUrl:o,modal:i=!0,downloadSmallSize:a=!1,extention:s}){const c=!!s&&Object.keys(Di).find(v=>Di[v].includes(s)),[f,p]=Tn(!1);function m(){return s==="pdf"?mt(Or,{children:[W("img",{src:r,className:"modal-image",style:{cursor:"pointer"},onClick:()=>p(!0)}),W(rd,{open:f,fullScreen:!0,children:W(Im,{sx:{padding:"0px"},children:W(sM,{handleClose:()=>p(!1),fileUrl:o})})})]}):W(qE,{small:r,medium:c==="image"?o:r,large:o,hideZoom:!0,className:"modal-image"})}return mt("div",{className:"kdpa-uploaded-file",children:[mt("div",{className:"parent",children:[i?m():W("img",{src:r,className:"modal-image"}),(n||a)&&mt("div",{className:"child",children:[n&&W(rEe,{className:"icon-actions",size:20,onClick:()=>{n(e)}}),a&&W(u1e,{className:"icon-actions",size:20,onClick:()=>{o&&window.open(o,"_blank")}})]})]}),t&&W("span",{style:{fontSize:"12px"},children:t?.split("\\")?.slice(-1)?.[0]})]})}export{REe as KdAdvanceFileUploader,eje as KdAlert,lUe as KdCaptcha,GEe as KdChart2D,qEe as KdChart3D,uUe as KdDrawer,OB as KdDropDownField,NEe as KdFileUploader,pUe as KdFileViewer,AB as KdFormContainer,fEe as KdFormField,rje as KdGridHeader,nje as KdGridPanel,YVe as KdHtmlEditor,eHe as KdImageBox,aUe as KdLanguageChange,pEe as KdLazyDropDownField,rUe as KdLoading,tUe as KdMenubar,QH as KdModal,ej as KdPanelWrapper,nUe as KdRadioListCustom,cj as KdSearchableInput,mEe as KdSearchableInputField,JHe as KdStepContent,XHe as KdStepList,GHe as KdStepRoot,QHe as KdStepTrigger,cUe as KdStyledComponent,YHe as KdTabsContent,jHe as KdTabsList,VHe as KdTabsRoot,qHe as KdTabsTrigger,bEe as KdTagBoxInput,fUe as KdTooltip,jje as KdTree,vEe as KdTreeField,OEe as KdTypography,Ake as KdpaAccordion,Mke as KdpaAccordionDetails,Oke as KdpaAccordionSummary,Wle as KdpaAlert,Yle as KdpaAlertTitle,Eg as KdpaAutoComplete,cL as KdpaAvatar,Ule as KdpaBadge,X0e as KdpaButton,Z0e as KdpaCheckBox,Zle as KdpaChip,rxe as KdpaCircularProgress,X5 as KdpaCollapse,vE as KdpaCollapseTransitions,iwe as KdpaCopyToClipboard,O0e as KdpaDatePicker,K0e as KdpaDateTimePicker,lEe as KdpaDialog,Z5 as KdpaDivider,O1e as KdpaDropDownLazy,f1e as KdpaDropZone,sxe as KdpaFade,oEe as KdpaFileUploader,aEe as KdpaFormContainer,Y5 as KdpaFormControl,G0e as KdpaFormControlLabel,sEe as KdpaFormField,Qke as KdpaFullScreenDialog,ik as KdpaGrid,qle as KdpaGridBadge,lxe as KdpaGrow,q5 as KdpaIconButton,swe as KdpaInlineSpinner,Km as KdpaInput,Sce as KdpaInputLabel,kce as KdpaInputMultiline,lwe as KdpaLoading,mE as KdpaMenuItem,Gwe as KdpaModal,Kwe as KdpaModalImage,qI as KdpaMuiBadge,Zwe as KdpaPaginationGrid,sM as KdpaPdfViewer,gx as KdpaPrimaryButton,lL as KdpaRadio,Ece as KdpaRadioGroup,Zke as KdpaRtlProvider,Tg as KdpaSecondaryButton,nEe as KdpaSegment,U5 as KdpaSelect,cwe as KdpaSkeleton,cxe as KdpaSlide,Xwe as KdpaSlider,exe as KdpaSweetAlertConfirm,txe as KdpaSweetAlertDelete,nxe as KdpaSweetAlertOK,Tce as KdpaSwitch,ixe as KdpaTab,axe as KdpaTabs,Pke as KdpaThemeProvider,Aye as KdpaTimePicker,Wl as KdpaTooltip,Qwe as KdpaTree,Dke as KdpaTreeSelect,qa as KdpaTypography,lM as KdpaUploadedFile,YT as KdpaUploadingFile,aM as KdpaUseFileUploadHook,uxe as KdpaZoom,Di as fileExtension,Td as pathFile,u1 as pathServicesUpload,ml as serviceName};
|