ados-rcm 1.1.344 → 1.1.345

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/index.cjs.js CHANGED
@@ -344,7 +344,7 @@ Error generating stack: `+d.message+`
344
344
  `,"user"),this.quill.setSelection(i+1,0),t.index=i+1}else{const l=this.quill.getLine(t.index)[0];l&&l.length()>1?(this.quill.insertText(t.index,`
345
345
 
346
346
  `,"user"),t.index+=2):(this.quill.insertText(t.index,`
347
- `,"user"),t.index+=1)}}findTableParent(e){let t=e;for(;t;){if(t.domNode&&t.domNode.tagName==="TABLE")return t;t=t.parent}return null}hidePicker(){this.removeTooltip(),this.picker&&(this.picker.remove(),this.picker=null),this.tableButton&&this.tableButton.classList.remove("ql-expanded")}}var Iu={},Wb;function IP(){if(Wb)return Iu;Wb=1;var r=Fs;if(process.env.NODE_ENV==="production")Iu.createRoot=r.createRoot,Iu.hydrateRoot=r.hydrateRoot;else{var e=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Iu.createRoot=function(t,n){e.usingClientEntryPoint=!0;try{return r.createRoot(t,n)}finally{e.usingClientEntryPoint=!1}},Iu.hydrateRoot=function(t,n,i){e.usingClientEntryPoint=!0;try{return r.hydrateRoot(t,n,i)}finally{e.usingClientEntryPoint=!1}}}return Iu}var LP=IP();const Vb=il(LP);class MP{constructor(e,t){ot(this,"DEFAULTS",{maxRowCount:-1});ot(this,"quill");ot(this,"options");ot(this,"position",null);ot(this,"table");ot(this,"selectedCell",null);ot(this,"menuRoot",null);ot(this,"helperTextElement",null);ot(this,"scrollTimeout",null);ot(this,"SCROLL_DEBOUNCE_TIME",80);ot(this,"lastSelectedCellRef",null);ot(this,"boundDocClickHandler",this.hideMenu.bind(this));ot(this,"boundEditorChangeHandler",this.editorChangeHandler.bind(this));ot(this,"boundContextMenuHandler",this.contextMenuHandler.bind(this));ot(this,"boundCopyHandler",this.copyHandler.bind(this));ot(this,"boundScrollHandler",this.handleScroll.bind(this));ot(this,"boundPasteHandler",this.pasteHandler.bind(this));ot(this,"menuItems",[]);ot(this,"positionCache",new Map);ot(this,"POSITION_CACHE_LIFETIME",1e3);ot(this,"reactRoot",null);if(this.quill=e,this.options={...this.DEFAULTS,...t},this.table=e.getModule("table"),!this.table){console.error('"table" module not found');return}this.initializeMenuItems(),this.overrideTableMethods(),this.initializeHelperText(),this.attachEventListeners()}initializeMenuItems(){this.menuItems=[{handler:()=>{(!(this.options.maxRowCount!==void 0&&this.options.maxRowCount>0)||this.getColCount()<(this.options.maxRowCount||0))&&this.table.insertColumnRight()},icon:Os.renderToString(v.jsx(Br,{icon:"AddColRight"})),title:hn.AEditor["Insert Column Right"]},{handler:()=>{(!(this.options.maxRowCount!==void 0&&this.options.maxRowCount>0)||this.getColCount()<(this.options.maxRowCount||0))&&this.table.insertColumnLeft()},icon:Os.renderToString(v.jsx(Br,{icon:"AddColLeft"})),title:hn.AEditor["Insert Column Left"]},{handler:()=>{this.table.insertRowAbove()},icon:Os.renderToString(v.jsx(Br,{icon:"AddRowAbove"})),title:hn.AEditor["Insert Row Top"]},{handler:()=>{this.table.insertRowBelow()},icon:Os.renderToString(v.jsx(Br,{icon:"AddRowBelow"})),title:hn.AEditor["Insert Row Bottom"]},{handler:()=>{this.table.deleteColumn()},icon:Os.renderToString(v.jsx(Br,{icon:"RemoveCol"})),title:hn.AEditor["Delete Column"]},{handler:()=>{this.table.deleteRow()},icon:Os.renderToString(v.jsx(Br,{icon:"RemoveRow"})),title:hn.AEditor["Delete Row"]},{handler:()=>{this.table.deleteTable()},icon:Os.renderToString(v.jsx(Br,{icon:"Trash"})),title:hn.AEditor["Delete Table"]}]}overrideTableMethods(){const e=this.table.insertTable;this.table.insertTable=(...n)=>{const i=e.apply(this.table,n),l=this.quill.getSelection();return l&&(this.quill.focus(),setTimeout(()=>this.detectButton(l),0)),i};const t=this.table.deleteTable;this.table.deleteTable=(...n)=>{const i=t.apply(this.table,n);return this.cleanupTableUI(),i}}initializeHelperText(){this.helperTextElement=document.createElement("div"),this.helperTextElement.className=Wn["ql-tableui-helper"];const e=document.createElement("span");e.className=Be.clsx("Caption1",Wn["ql-tableui-helper__text"],"NoSelect"),e.textContent=hn.AEditor["Right click to open properties"];const t=document.createElement("span");t.className=Wn["ql-tableui-helper__icon"],t.innerHTML=Os.renderToString(v.jsx(Br,{icon:"MoreHorizontal",size:"xs"})),t.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.menuRoot?this.hideMenu():this.showMenu()}),this.helperTextElement.appendChild(e),this.helperTextElement.appendChild(t),this.helperTextElement.style.display="none",this.quill.container.appendChild(this.helperTextElement)}attachEventListeners(){this.quill.on("editor-change",this.boundEditorChangeHandler),this.quill.root.addEventListener("contextmenu",this.boundContextMenuHandler),this.quill.root.addEventListener("copy",this.boundCopyHandler),this.quill.root.addEventListener("paste",this.boundPasteHandler),window.addEventListener("scroll",this.boundScrollHandler,!0)}removeEventListeners(){this.quill.off("editor-change",this.boundEditorChangeHandler),this.quill.root.removeEventListener("contextmenu",this.boundContextMenuHandler),this.quill.root.removeEventListener("copy",this.boundCopyHandler),this.quill.root.removeEventListener("paste",this.boundPasteHandler),document.removeEventListener("click",this.boundDocClickHandler),window.removeEventListener("scroll",this.boundScrollHandler,!0)}editorChangeHandler(e,t,n,i){e==="selection-change"&&this.detectButton(t)}contextMenuHandler(e){return this.isTable()?(e.preventDefault(),this.showMenu(),!1):!0}copyHandler(e){if(!this.selectedCell||!e.clipboardData)return;e.preventDefault();const t=this.selectedCell.textContent||"";e.clipboardData.setData("text/plain",t)}isTable(e){return e=e||this.quill.getSelection(),e?!!(this.quill.getFormat(e.index).table&&!e.length):!1}getColCount(e){if(e=e||this.quill.getSelection(),!e)return 0;const[t]=this.table.getTable(e);return t?t.rows().reduce((n,i)=>Math.max(i.children.length,n),0):0}showMenu(){if(this.menuRoot){this.hideMenu();return}if(!this.selectedCell)return;this.menuRoot||(this.menuRoot=document.createElement("div"),document.body.appendChild(this.menuRoot));const e=this.getBoundingRectWithCache(this.selectedCell),t=window.innerWidth,n=window.innerHeight,i=I.memo(({item:u,index:h})=>v.jsxs("div",{className:Wn["ql-tableui-options__item"],onClick:this.createItemClickHandler(u),children:[v.jsx("span",{className:Wn["ql-tableui-options__item-icon"],dangerouslySetInnerHTML:{__html:u.icon}}),v.jsx("span",{className:Wn["ql-tableui-options__item-text"],children:u.title})]},h)),l=()=>v.jsx("div",{className:Wn["ql-tableui-options"],style:{position:"fixed",visibility:"hidden",zIndex:1e4},children:this.menuItems.map((u,h)=>v.jsx(i,{item:u,index:h},h))});try{Vb.createRoot?(this.reactRoot=Vb.createRoot(this.menuRoot),this.reactRoot.render(v.jsx(l,{}))):Fs.render(v.jsx(l,{}),this.menuRoot)}catch{Fs.render(v.jsx(l,{}),this.menuRoot)}document.addEventListener("click",this.boundDocClickHandler),requestAnimationFrame(()=>{if(!this.menuRoot)return;const u=this.menuRoot.firstElementChild;if(u){const h=u.getBoundingClientRect();let g=e.bottom+window.scrollY,m=e.left+window.scrollX;m+h.width>t&&(m=e.right-h.width+window.scrollX),g+h.height>n+window.scrollY&&(g=e.top-h.height+window.scrollY),u.style.top=`${g}px`,u.style.left=`${m}px`,u.style.visibility="visible"}})}hideMenu(){this.menuRoot&&(document.removeEventListener("click",this.boundDocClickHandler),this.reactRoot?(this.reactRoot.unmount(),this.reactRoot=null):Fs.unmountComponentAtNode(this.menuRoot),this.menuRoot.remove(),this.menuRoot=null)}detectButton(e){if(e)if(this.isTable(e)){const[t,n]=this.quill.getLine(e.index);if(!t||!t.domNode)return;const i=t.domNode,l=`${i.tagName}-${i.offsetLeft}-${i.offsetTop}`;this.selectedCell===i||this.lastSelectedCellRef===l||(this.clearAllTableCellOutlines(),i.style.outline="2px solid var(--acent-brand)",i.style.outlineOffset="-1px",this.selectedCell=i,this.lastSelectedCellRef=l),this.showHelperText();const h=this.quill.container.getBoundingClientRect(),g=i.getBoundingClientRect(),m={bottom:g.bottom-h.top,height:g.height,left:g.left-h.left,right:g.right-h.left,top:g.top-h.top,width:g.width,x:g.x,y:g.y,toJSON:()=>JSON.stringify(m)};this.position&&(this.position.top!==m.top||this.position.left!==m.left)&&this.hideMenu(),this.position=m}else this.cleanupTableUI()}clearAllTableCellOutlines(){this.selectedCell&&(this.selectedCell.style.removeProperty("outline"),this.selectedCell.style.removeProperty("outline-offset"),this.selectedCell=null),this.quill.root.querySelectorAll("td, th").forEach(t=>{t instanceof HTMLElement&&(t.style.removeProperty("outline"),t.style.removeProperty("outline-offset"))}),this.lastSelectedCellRef=null}showHelperText(){if(!this.selectedCell||!this.helperTextElement)return;const e=this.quill.getSelection();if(!e)return;const[t]=this.table.getTable(e);if(!t||!t.domNode)return;const i=t.domNode.getBoundingClientRect(),l=this.quill.container.getBoundingClientRect();if(!(i.bottom<l.top+5||i.top>l.bottom-5)){let h=i.top-l.top-20;i.top<l.top&&(h=5),this.helperTextElement.style.display="block",this.helperTextElement.style.left=`${i.left-l.left}px`,this.helperTextElement.style.top=`${h}px`}else this.helperTextElement.style.display="none"}removeHelperText(){this.helperTextElement&&(this.helperTextElement.style.display="none")}handleScroll(){this.removeHelperText(),this.hideMenu(),this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{const e=this.quill.getSelection();e&&this.isTable(e)&&this.detectButton(e),this.scrollTimeout=null},this.SCROLL_DEBOUNCE_TIME)}destroy(){this.removeEventListeners(),this.cleanupTableUI(),this.helperTextElement&&this.helperTextElement.remove(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.positionCache.clear(),this.reactRoot=null,this.selectedCell=null,this.helperTextElement=null,this.position=null,this.options=this.DEFAULTS,this.menuRoot=null,this.table=null}createItemClickHandler(e){return t=>{t.preventDefault(),t.stopPropagation(),this.quill.focus(),e.handler(),this.hideMenu(),this.detectButton(this.quill.getSelection())}}getBoundingRectWithCache(e){const t=Date.now(),n=this.positionCache.get(e);if(n&&t-n.timestamp<this.POSITION_CACHE_LIFETIME)return n.rect;const i=e.getBoundingClientRect();return this.positionCache.set(e,{rect:i,timestamp:t}),i}pasteHandler(){this.clearAllTableCellOutlines(),setTimeout(()=>{const e=this.quill.getSelection();e&&this.detectButton(e)},0)}cleanupTableUI(){this.removeHelperText(),this.clearAllTableCellOutlines(),this.hideMenu(),this.lastSelectedCellRef=null}}const lS=[1,2,3,!1,4],cS=Ue.import("ui/icons");cS.table=Os.renderToString(v.jsx(Br,{icon:"Table",strokeWidth:2.5}));cS.divider=Os.renderToString(v.jsx(Br,{icon:"Minus",strokeWidth:2.5}));const DP=Ue.import("blots/block/embed");class rm extends DP{}ot(rm,"blotName","divider"),ot(rm,"tagName","hr");Ue.register({"modules/imageCompress":ZD,"modules/resize":JD,"modules/tablePicker":RP,"modules/tableUI":MP,"formats/header":FP(lS),"formats/divider":rm},!0);const OP=["bold","italic","underline","strike","blockquote","table","size","header","color","indent","list","align","image","link","video","divider"],PP=[[{header:lS}],["bold","italic","underline","strike","blockquote","divider","table",{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],NP=r=>{const{onEnterPress:e,errorMessage:t,type:n="Primary",editorRef:i,useValue:l,useError:u,placeholder:h,tabIndex:g,autoFocus:m,editorProps:M,wrapProps:T,helperText:C,label:_,labelProps:S,wrapType:D,style:A,minHeight:b="100%",contentHeight:k,maxHeight:O=1e3,toolbarSize:q="Med",readOnly:H,...G}=r,Y=I.useMemo(()=>n==="ReadOnly"||H,[n,H]),de=I.useMemo(()=>k?20:0,[k]),[te,ue]=I.useState(q==="Med"?40:50),P=I.useMemo(()=>Y?0:te,[Y,te]),[re,K]=I.useMemo(()=>[20,6],[]),ne=I.useMemo(()=>u?re+K:0,[u,re,K]),[ie,ce]=I.useState(k),[me,ae]=I.useState(!1),[be,ge]=I.useState(!1),Se=I.useRef(null),Ie=I.useRef(0),Pe=I.useRef(0),Ze=I.useCallback(ze=>{if(!me||!k)return;const Ve=ze.clientY-Pe.current,ft=Math.min(O,Math.max(k,Ie.current+Ve));ce(ft)},[k,me,O]),Te=I.useCallback(()=>{ae(!1),ge(!1),window.removeEventListener("mousemove",Ze),window.removeEventListener("mouseup",Te)},[Ze]),st=I.useCallback(ze=>{if(!ie)return;if(ze.detail===2){ce(k);return}ae(!0),ge(!0),Ie.current=ie,Pe.current=ze.clientY;const Ve=we=>{if(!k)return;const Xe=we.clientY-Pe.current,pt=Math.min(O,Math.max(k,Ie.current+Xe));ce(pt)},ft=()=>{ae(!1),ge(!1),window.removeEventListener("mousemove",Ve),window.removeEventListener("mouseup",ft)};window.addEventListener("mousemove",Ve),window.addEventListener("mouseup",ft)},[k,ie,O]),dt=I.useMemo(()=>{if(k){if(ie)switch(n){case"ReadOnly":return ie;case"Raw":return ie+ne;default:return ie+P+ne}}else return b},[k,ie,n,P,ne,b]),Je=I.useMemo(()=>jP(t)?"Error":n,[t,n]),[Ke,Oe]=pn(l,""),[ke,Ee]=pn(u,!1),[Ne,Re]=I.useState(()=>{if(!Ke)return new $t;try{const ze=document.createElement("div");return ze.innerHTML=Ke,new Ue(ze,{readOnly:!0}).getContents()}catch(ze){return console.warn("Error parsing HTML content:",ze),new $t}}),Qe=I.useMemo(()=>Math.floor(5e4*.68234)*3,[]),ct=I.useCallback(ze=>ze.ops?ze.ops.reduce((Ve,ft)=>{if(typeof ft.insert=="string"){const we=ft.insert.replace(/\n/g,"");return Ve+we.split("").reduce((Xe,pt)=>Xe+(pt.charCodeAt(0)<=127?1:3),0)}return typeof ft.insert=="object"&&ft.insert.image?Ve+ft.insert.image.length:Ve},0):0,[]),St=I.useMemo(()=>({clipboard:{matchVisual:!1},imageCompress:{quality:.5},...!Y&&{resize:{locale:{altTip:hn.AEditor["Image size adjust"],center:hn.AEditor.Center,floatLeft:hn.AEditor.floatLeft,floatRight:hn.AEditor.floatRight,inputTip:hn.AEditor["Input on mouse down"],restore:hn.AEditor.Restore}},table:!0,tablePicker:!0,tableUI:!0,toolbar:{container:PP,handlers:{divider:function(){const ze=this.quill,Ve=ze.getSelection(!0),ft=ze.getModule("table"),we=ft&&(()=>{try{return!!ft.getTable(Ve)[0]}catch{return!1}})();we||ze.insertText(Ve.index,`
347
+ `,"user"),t.index+=1)}}findTableParent(e){let t=e;for(;t;){if(t.domNode&&t.domNode.tagName==="TABLE")return t;t=t.parent}return null}hidePicker(){this.removeTooltip(),this.picker&&(this.picker.remove(),this.picker=null),this.tableButton&&this.tableButton.classList.remove("ql-expanded")}}var Iu={},Wb;function IP(){if(Wb)return Iu;Wb=1;var r=Fs;if(process.env.NODE_ENV==="production")Iu.createRoot=r.createRoot,Iu.hydrateRoot=r.hydrateRoot;else{var e=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Iu.createRoot=function(t,n){e.usingClientEntryPoint=!0;try{return r.createRoot(t,n)}finally{e.usingClientEntryPoint=!1}},Iu.hydrateRoot=function(t,n,i){e.usingClientEntryPoint=!0;try{return r.hydrateRoot(t,n,i)}finally{e.usingClientEntryPoint=!1}}}return Iu}var LP=IP();const Vb=il(LP);class MP{constructor(e,t){ot(this,"DEFAULTS",{maxRowCount:-1});ot(this,"quill");ot(this,"options");ot(this,"position",null);ot(this,"table");ot(this,"selectedCell",null);ot(this,"menuRoot",null);ot(this,"helperTextElement",null);ot(this,"scrollTimeout",null);ot(this,"SCROLL_DEBOUNCE_TIME",80);ot(this,"lastSelectedCellRef",null);ot(this,"boundDocClickHandler",this.hideMenu.bind(this));ot(this,"boundEditorChangeHandler",this.editorChangeHandler.bind(this));ot(this,"boundContextMenuHandler",this.contextMenuHandler.bind(this));ot(this,"boundCopyHandler",this.copyHandler.bind(this));ot(this,"boundScrollHandler",this.handleScroll.bind(this));ot(this,"boundPasteHandler",this.pasteHandler.bind(this));ot(this,"menuItems",[]);ot(this,"positionCache",new Map);ot(this,"POSITION_CACHE_LIFETIME",1e3);ot(this,"reactRoot",null);if(this.quill=e,this.options={...this.DEFAULTS,...t},this.table=e.getModule("table"),!this.table){console.error('"table" module not found');return}this.initializeMenuItems(),this.overrideTableMethods(),this.initializeHelperText(),this.attachEventListeners()}initializeMenuItems(){this.menuItems=[{handler:()=>{(!(this.options.maxRowCount!==void 0&&this.options.maxRowCount>0)||this.getColCount()<(this.options.maxRowCount||0))&&this.table.insertColumnRight()},icon:Os.renderToString(v.jsx(Br,{icon:"AddColRight"})),title:hn.AEditor["Insert Column Right"]},{handler:()=>{(!(this.options.maxRowCount!==void 0&&this.options.maxRowCount>0)||this.getColCount()<(this.options.maxRowCount||0))&&this.table.insertColumnLeft()},icon:Os.renderToString(v.jsx(Br,{icon:"AddColLeft"})),title:hn.AEditor["Insert Column Left"]},{handler:()=>{this.table.insertRowAbove()},icon:Os.renderToString(v.jsx(Br,{icon:"AddRowAbove"})),title:hn.AEditor["Insert Row Top"]},{handler:()=>{this.table.insertRowBelow()},icon:Os.renderToString(v.jsx(Br,{icon:"AddRowBelow"})),title:hn.AEditor["Insert Row Bottom"]},{handler:()=>{this.table.deleteColumn()},icon:Os.renderToString(v.jsx(Br,{icon:"RemoveCol"})),title:hn.AEditor["Delete Column"]},{handler:()=>{this.table.deleteRow()},icon:Os.renderToString(v.jsx(Br,{icon:"RemoveRow"})),title:hn.AEditor["Delete Row"]},{handler:()=>{this.table.deleteTable()},icon:Os.renderToString(v.jsx(Br,{icon:"Trash"})),title:hn.AEditor["Delete Table"]}]}overrideTableMethods(){const e=this.table.insertTable;this.table.insertTable=(...n)=>{const i=e.apply(this.table,n),l=this.quill.getSelection();return l&&(this.quill.focus(),setTimeout(()=>this.detectButton(l),0)),i};const t=this.table.deleteTable;this.table.deleteTable=(...n)=>{const i=t.apply(this.table,n);return this.cleanupTableUI(),i}}initializeHelperText(){this.helperTextElement=document.createElement("div"),this.helperTextElement.className=Wn["ql-tableui-helper"];const e=document.createElement("span");e.className=Be.clsx("Caption1",Wn["ql-tableui-helper__text"],"NoSelect"),e.textContent=hn.AEditor["Right click to open properties"];const t=document.createElement("span");t.className=Wn["ql-tableui-helper__icon"],t.innerHTML=Os.renderToString(v.jsx(Br,{icon:"MoreHorizontal",size:"xs"})),t.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.menuRoot?this.hideMenu():this.showMenu()}),this.helperTextElement.appendChild(e),this.helperTextElement.appendChild(t),this.helperTextElement.style.display="none",this.quill.container.appendChild(this.helperTextElement)}attachEventListeners(){this.quill.on("editor-change",this.boundEditorChangeHandler),this.quill.root.addEventListener("contextmenu",this.boundContextMenuHandler),this.quill.root.addEventListener("copy",this.boundCopyHandler),this.quill.root.addEventListener("paste",this.boundPasteHandler),window.addEventListener("scroll",this.boundScrollHandler,!0)}removeEventListeners(){this.quill.off("editor-change",this.boundEditorChangeHandler),this.quill.root.removeEventListener("contextmenu",this.boundContextMenuHandler),this.quill.root.removeEventListener("copy",this.boundCopyHandler),this.quill.root.removeEventListener("paste",this.boundPasteHandler),document.removeEventListener("click",this.boundDocClickHandler),window.removeEventListener("scroll",this.boundScrollHandler,!0)}editorChangeHandler(e,t,n,i){e==="selection-change"&&this.detectButton(t)}contextMenuHandler(e){return this.isTable()?(e.preventDefault(),this.showMenu(),!1):!0}copyHandler(e){if(!this.selectedCell||!e.clipboardData)return;e.preventDefault();const t=this.selectedCell.textContent||"";e.clipboardData.setData("text/plain",t)}isTable(e){return e=e||this.quill.getSelection(),e?!!(this.quill.getFormat(e.index).table&&!e.length):!1}getColCount(e){if(e=e||this.quill.getSelection(),!e)return 0;const[t]=this.table.getTable(e);return t?t.rows().reduce((n,i)=>Math.max(i.children.length,n),0):0}showMenu(){if(this.menuRoot){this.hideMenu();return}if(!this.selectedCell)return;this.menuRoot||(this.menuRoot=document.createElement("div"),document.body.appendChild(this.menuRoot));const e=this.getBoundingRectWithCache(this.selectedCell),t=window.innerWidth,n=window.innerHeight,i=I.memo(({item:u,index:h})=>v.jsxs("div",{className:Wn["ql-tableui-options__item"],onClick:this.createItemClickHandler(u),children:[v.jsx("span",{className:Wn["ql-tableui-options__item-icon"],dangerouslySetInnerHTML:{__html:u.icon}}),v.jsx("span",{className:Wn["ql-tableui-options__item-text"],children:u.title})]},h)),l=()=>v.jsx("div",{className:Wn["ql-tableui-options"],style:{position:"fixed",visibility:"hidden",zIndex:1e4},children:this.menuItems.map((u,h)=>v.jsx(i,{item:u,index:h},h))});try{Vb.createRoot?(this.reactRoot=Vb.createRoot(this.menuRoot),this.reactRoot.render(v.jsx(l,{}))):Fs.render(v.jsx(l,{}),this.menuRoot)}catch{Fs.render(v.jsx(l,{}),this.menuRoot)}document.addEventListener("click",this.boundDocClickHandler),requestAnimationFrame(()=>{if(!this.menuRoot)return;const u=this.menuRoot.firstElementChild;if(u){const h=u.getBoundingClientRect();let g=e.bottom+window.scrollY,m=e.left+window.scrollX;m+h.width>t&&(m=e.right-h.width+window.scrollX),g+h.height>n+window.scrollY&&(g=e.top-h.height+window.scrollY),u.style.top=`${g}px`,u.style.left=`${m}px`,u.style.visibility="visible"}})}hideMenu(){this.menuRoot&&(document.removeEventListener("click",this.boundDocClickHandler),this.reactRoot?(this.reactRoot.unmount(),this.reactRoot=null):Fs.unmountComponentAtNode(this.menuRoot),this.menuRoot.remove(),this.menuRoot=null)}detectButton(e){if(e)if(this.isTable(e)){const[t,n]=this.quill.getLine(e.index);if(!t||!t.domNode)return;const i=t.domNode,l=`${i.tagName}-${i.offsetLeft}-${i.offsetTop}`;this.selectedCell===i||this.lastSelectedCellRef===l||(this.clearAllTableCellOutlines(),i.style.outline="2px solid var(--acent-brand)",i.style.outlineOffset="-1px",this.selectedCell=i,this.lastSelectedCellRef=l),this.showHelperText();const h=this.quill.container.getBoundingClientRect(),g=i.getBoundingClientRect(),m={bottom:g.bottom-h.top,height:g.height,left:g.left-h.left,right:g.right-h.left,top:g.top-h.top,width:g.width,x:g.x,y:g.y,toJSON:()=>JSON.stringify(m)};this.position&&(this.position.top!==m.top||this.position.left!==m.left)&&this.hideMenu(),this.position=m}else this.cleanupTableUI()}clearAllTableCellOutlines(){this.selectedCell&&(this.selectedCell.style.removeProperty("outline"),this.selectedCell.style.removeProperty("outline-offset"),this.selectedCell=null),this.quill.root.querySelectorAll("td, th").forEach(t=>{t instanceof HTMLElement&&(t.style.removeProperty("outline"),t.style.removeProperty("outline-offset"))}),this.lastSelectedCellRef=null}showHelperText(){if(!this.selectedCell||!this.helperTextElement)return;const e=this.quill.getSelection();if(!e)return;const[t]=this.table.getTable(e);if(!t||!t.domNode)return;const i=t.domNode.getBoundingClientRect(),l=this.quill.container.getBoundingClientRect();if(!(i.bottom<l.top+5||i.top>l.bottom-5)){let h=i.top-l.top-20;i.top<l.top&&(h=5),this.helperTextElement.style.display="block",this.helperTextElement.style.left=`${i.left-l.left}px`,this.helperTextElement.style.top=`${h}px`}else this.helperTextElement.style.display="none"}removeHelperText(){this.helperTextElement&&(this.helperTextElement.style.display="none")}handleScroll(){this.removeHelperText(),this.hideMenu(),this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{const e=this.quill.getSelection();e&&this.isTable(e)&&this.detectButton(e),this.scrollTimeout=null},this.SCROLL_DEBOUNCE_TIME)}destroy(){this.removeEventListeners(),this.cleanupTableUI(),this.helperTextElement&&this.helperTextElement.remove(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.positionCache.clear(),this.reactRoot=null,this.selectedCell=null,this.helperTextElement=null,this.position=null,this.options=this.DEFAULTS,this.menuRoot=null,this.table=null}createItemClickHandler(e){return t=>{t.preventDefault(),t.stopPropagation(),this.quill.focus(),e.handler(),this.hideMenu(),this.detectButton(this.quill.getSelection())}}getBoundingRectWithCache(e){const t=Date.now(),n=this.positionCache.get(e);if(n&&t-n.timestamp<this.POSITION_CACHE_LIFETIME)return n.rect;const i=e.getBoundingClientRect();return this.positionCache.set(e,{rect:i,timestamp:t}),i}pasteHandler(){this.clearAllTableCellOutlines(),setTimeout(()=>{const e=this.quill.getSelection();e&&this.detectButton(e)},0)}cleanupTableUI(){this.removeHelperText(),this.clearAllTableCellOutlines(),this.hideMenu(),this.lastSelectedCellRef=null}}const lS=[1,2,3,!1,4],cS=Ue.import("ui/icons");cS.table=Os.renderToString(v.jsx(Br,{icon:"Table",strokeWidth:2.5}));cS.divider=Os.renderToString(v.jsx(Br,{icon:"Minus",strokeWidth:2.5}));const DP=Ue.import("blots/block/embed");class rm extends DP{static create(e){const t=super.create(e);return t.style.border="var(--AEditor_Addon_Primary_border)",t.style.borderBottom="none",t.style.transition="border var(--Transition)",t}}ot(rm,"blotName","divider"),ot(rm,"tagName","hr");Ue.register({"modules/imageCompress":ZD,"modules/resize":JD,"modules/tablePicker":RP,"modules/tableUI":MP,"formats/header":FP(lS),"formats/divider":rm},!0);const OP=["bold","italic","underline","strike","blockquote","table","size","header","color","indent","list","align","image","link","video","divider"],PP=[[{header:lS}],["bold","italic","underline","strike","blockquote","divider","table",{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],NP=r=>{const{onEnterPress:e,errorMessage:t,type:n="Primary",editorRef:i,useValue:l,useError:u,placeholder:h,tabIndex:g,autoFocus:m,editorProps:M,wrapProps:T,helperText:C,label:_,labelProps:S,wrapType:D,style:A,minHeight:b="100%",contentHeight:k,maxHeight:O=1e3,toolbarSize:q="Med",readOnly:H,...G}=r,Y=I.useMemo(()=>n==="ReadOnly"||H,[n,H]),de=I.useMemo(()=>k?20:0,[k]),[te,ue]=I.useState(q==="Med"?40:50),P=I.useMemo(()=>Y?0:te,[Y,te]),[re,K]=I.useMemo(()=>[20,6],[]),ne=I.useMemo(()=>u?re+K:0,[u,re,K]),[ie,ce]=I.useState(k),[me,ae]=I.useState(!1),[be,ge]=I.useState(!1),Se=I.useRef(null),Ie=I.useRef(0),Pe=I.useRef(0),Ze=I.useCallback(ze=>{if(!me||!k)return;const Ve=ze.clientY-Pe.current,ft=Math.min(O,Math.max(k,Ie.current+Ve));ce(ft)},[k,me,O]),Te=I.useCallback(()=>{ae(!1),ge(!1),window.removeEventListener("mousemove",Ze),window.removeEventListener("mouseup",Te)},[Ze]),st=I.useCallback(ze=>{if(!ie)return;if(ze.detail===2){ce(k);return}ae(!0),ge(!0),Ie.current=ie,Pe.current=ze.clientY;const Ve=we=>{if(!k)return;const Xe=we.clientY-Pe.current,pt=Math.min(O,Math.max(k,Ie.current+Xe));ce(pt)},ft=()=>{ae(!1),ge(!1),window.removeEventListener("mousemove",Ve),window.removeEventListener("mouseup",ft)};window.addEventListener("mousemove",Ve),window.addEventListener("mouseup",ft)},[k,ie,O]),dt=I.useMemo(()=>{if(k){if(ie)switch(n){case"ReadOnly":return ie;case"Raw":return ie+ne;default:return ie+P+ne}}else return b},[k,ie,n,P,ne,b]),Je=I.useMemo(()=>jP(t)?"Error":n,[t,n]),[Ke,Oe]=pn(l,""),[ke,Ee]=pn(u,!1),[Ne,Re]=I.useState(()=>{if(!Ke)return new $t;try{const ze=document.createElement("div");return ze.innerHTML=Ke,new Ue(ze,{readOnly:!0}).getContents()}catch(ze){return console.warn("Error parsing HTML content:",ze),new $t}}),Qe=I.useMemo(()=>Math.floor(5e4*.68234)*3,[]),ct=I.useCallback(ze=>ze.ops?ze.ops.reduce((Ve,ft)=>{if(typeof ft.insert=="string"){const we=ft.insert.replace(/\n/g,"");return Ve+we.split("").reduce((Xe,pt)=>Xe+(pt.charCodeAt(0)<=127?1:3),0)}return typeof ft.insert=="object"&&ft.insert.image?Ve+ft.insert.image.length:Ve},0):0,[]),St=I.useMemo(()=>({clipboard:{matchVisual:!1},imageCompress:{quality:.5},...!Y&&{resize:{locale:{altTip:hn.AEditor["Image size adjust"],center:hn.AEditor.Center,floatLeft:hn.AEditor.floatLeft,floatRight:hn.AEditor.floatRight,inputTip:hn.AEditor["Input on mouse down"],restore:hn.AEditor.Restore}},table:!0,tablePicker:!0,tableUI:!0,toolbar:{container:PP,handlers:{divider:function(){const ze=this.quill,Ve=ze.getSelection(!0),ft=ze.getModule("table"),we=ft&&(()=>{try{return!!ft.getTable(Ve)[0]}catch{return!1}})();we||ze.insertText(Ve.index,`
348
348
  `,Ue.sources.USER);const Xe=we?0:1;ze.insertEmbed(Ve.index+Xe,"divider",!0,Ue.sources.USER),ze.setSelection(Ve.index+Xe+1,0,Ue.sources.SILENT)}}}}}),[Y]),Ct=I.useCallback((ze,Ve,ft,we)=>{var Lt;if(!Oe||ft!=="user")return;const Xe=we.getContents(),pt=we.getHTML(),yt=((Lt=Xe.ops)==null?void 0:Lt.length)===1&&Xe.ops[0].insert===`
349
349
  `;if(Ee){const qe=ct(Xe);Ee(qe>Qe)}Oe(yt?"":pt),Re(Xe)},[ct,Qe,Ee,Oe]),gt=I.useMemo(()=>q==="Med"?8:12.5,[q]),kt=I.useCallback(ze=>{if(!ze)return;const Ve=ze.getEditor();if(!Ve)return;const ft=[],we={input:_t=>{const Gt=_t.target;Gt.value=Gt.value.replace(/[^0-9]/g,"");const fr=parseInt(Gt.value);fr>100&&(Gt.value="100"),fr<1&&(Gt.value="1")},keyDown:_t=>{if(_t.key!=="Delete"&&_t.key!=="Backspace")return;const Gt=document.querySelector("#image-resizer");if(!Gt)return;const fr=Gt.getBoundingClientRect(),wr=document.querySelectorAll(".ql-editor img"),pe=Array.from(wr).find(ee=>{const je=ee.getBoundingClientRect();return Math.abs(je.left-fr.left)<5&&Math.abs(je.top-fr.top)<5});if(pe){Gt.style.display="none";const ee=Ue.find(pe),je=Ve.getIndex(ee);ee.remove(),Ve.setSelection(je,0,Ue.sources.USER)}},formatExpand:_t=>{const Gt=Ve.getFormat();_t.forEach(fr=>{if(Gt[fr]){const wr=Gt[fr],pe=`.ql-${fr}`,ee=document.querySelector(`${pe} .ql-picker-label`),je=document.querySelectorAll(`${pe} .ql-picker-item`),nt=Array.from(je).find(jt=>jt.getAttribute("data-value")===wr);nt&&(nt.classList.add("ql-selected"),ee==null||ee.classList.add("ql-active"))}})},resizeToolbar:_t=>{requestAnimationFrame(()=>{for(const Gt of _t)ue(Gt.contentRect.height+gt*2)})}},Xe=Ve.root,pt=document.querySelector(".ql-snow.ql-toolbar"),yt=document.querySelector("#image-resizer .input-wrapper input"),Lt=new ResizeObserver(we.resizeToolbar),qe=["header","color"],xt=[];return Xe==null||Xe.addEventListener("keydown",we.keyDown),yt==null||yt.addEventListener("input",we.input),Lt.observe(pt),qe.forEach(_t=>{const Gt=document.querySelector(`.ql-${_t} .ql-picker-label`);Gt&&(Gt.addEventListener("click",()=>we.formatExpand(qe)),xt.push(Gt))}),ft.push(()=>{Xe==null||Xe.removeEventListener("keydown",we.keyDown),yt==null||yt.removeEventListener("input",we.input),Lt.disconnect(),xt.forEach(_t=>_t.removeEventListener("click",()=>we.formatExpand(qe)))}),()=>ft.forEach(_t=>_t())},[gt]),wt=I.useCallback(ze=>{i&&(typeof i=="function"?i(ze):i.current=ze),ze&&kt(ze)},[i,kt]);return v.jsx(Uc,{helperText:C,label:_,wrapType:D,labelProps:S,errorMessage:t,wrapProps:{...T,style:{...T==null?void 0:T.style,height:dt,maxHeight:O,minHeight:"fit-content"}},children:v.jsxs(Ur,{...G,className:Be.clsx(G.className,Wn.AEditorContainer),style:{...A,height:dt},children:[v.jsx(bh,{...M,ref:wt,className:Be.clsx(M==null?void 0:M.className,Wn.AEditor,Wn[Je]),formats:OP,modules:St,placeholder:h,readOnly:Y,theme:"snow",value:Ne,style:{"--icon-size":`${q==="Med"?18:24}px`,"--toolbar-padding":`${gt}px`,"--content-height":ie?`${ie-de}px`:"100%","--default-text":`'${hn.AEditor.Default}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(Os.renderToString(v.jsx(Br,{icon:"EditorArrow"})))}`},onChange:Ct}),k&&v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:Se,className:Wn.Resizer,style:{height:de,bottom:u&&!Y?ne:0},onMouseDown:st}),be&&v.jsx("div",{className:Be.clsx(Wn.Indicator,"NoSelect","Caption"),style:{bottom:u&&!Y?ne+2:2},children:`${Math.round(ie)}px`})]}),u&&!Y&&v.jsx("div",{className:Be.clsx(Wn.LimitContainer,"NoSelect"),style:{marginTop:K,minHeight:re},children:v.jsxs(Xl,{className:Wn.Limit,children:["(",v.jsx("span",{className:ke?Wn.Error:void 0,children:nm(ct(Ne))})," / ",nm(Qe),")"]})})]})})};function jP(r){return Array.isArray(r)?r.filter(Boolean).length>0:!!r}function FP(r){const e=Ue.import("formats/header");return e.whitelist=r,e}const nm=r=>{if(!r)return"0 bytes";const e=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB","RB","QB"];let t=0;for(;r>=1024&&t<e.length-1;)r/=1024,t++;return`${t===0?Math.floor(r):r.toFixed(1)} ${e[t]}`};function eh(r,e){Array.isArray(r)||(r=[r]);for(const t of r){if(e(t))return t;if(!t.children||t.children.length<1)continue;const n=eh(t.children,e);if(n)return n}}function sd(r,e){Array.isArray(r)||(r=[r]);for(const t of r)e(t),!(!t.children||t.children.length<1)&&sd(t.children,e)}function uS(r,e){Array.isArray(r)||(r=[r]);const t=[];return sd(r,(n,i)=>t.push(e(n,i))),t}function fS(r,e){Array.isArray(r)||(r=[r]);for(const t of r){if(!e(t))return!1;if(!(!t.children||t.children.length<1)&&!fS(t.children,e))return!1}return!0}function BP(r,e){Array.isArray(r)||(r=[r]);const t=[];return sd(r,(n,i)=>{e(n,i)&&t.push(n)}),t}function qP(r){Array.isArray(r)||(r=[r]);let e=0;return sd(r,()=>e++),e}function HP(r,e,t,n){if(n(e,t))return null;Array.isArray(r)||(r=[r]);const i=eh(r,u=>{var h;return(h=u.children)==null?void 0:h.some(g=>n(g,e))}),l=eh(r,u=>{var h;return(h=u.children)==null?void 0:h.some(g=>n(g,t))});if(i===void 0&&l===void 0){const u=r.findIndex(g=>n(g,e)),h=r.findIndex(g=>n(g,t));return r.splice(u,1),r.splice(h,0,e),[...r]}else if(i!==void 0&&l!==void 0&&n(i,l)&&i.children){const u=i.children.findIndex(g=>n(g,e)),h=i.children.findIndex(g=>n(g,t));return u===void 0||h===void 0?null:(i.children.splice(u,1),i.children.splice(h,0,e),i.children=[...i.children],[...r])}return null}function zP(r,e,t){const n=[],i=[...e];for(;i.length>0;){const l=i.shift();if(l&&!n.find(u=>t(u,l))&&(n.push(l),!(!l.children||l.children.length<1)))for(const u of l.children)i.push(u)}return n}function $P(r,e,t){Array.isArray(r)||(r=[r]);const n=uS(r,u=>u),i=[],l=[...e];for(;l.length>0;){const u=l.shift();if(!u||i.find(g=>t(g,u)))continue;i.push(u);const h=n.find(g=>{var m;return(m=g.children)==null?void 0:m.some(M=>t(M,u))});h&&l.push(h)}return i}const Qa={find:eh,forEach:sd,map:uS,every:fS,filter:BP,length:qP,replace:HP,descendants:zP,ancestors:$P},UP="_AWrap_f5le3_1",WP="_AContainer_f5le3_10",VP="_ATree_f5le3_18",GP="_ATreeBody_f5le3_30",ZP="_CoverBorder_f5le3_36",YP="_InsertBorder_f5le3_45",KP="_ATreeHeader_f5le3_76",XP="_ATreeBodyHeader_f5le3_82",JP="_ATreeBodyHeaderResources_f5le3_92",QP="_ATreeItem_f5le3_98",eN="_IsSelectUsed_f5le3_114",tN="_IsSelected_f5le3_117",rN="_IsSearchSelected_f5le3_122",nN="_IsHovered_f5le3_133",iN="_CheckBox_f5le3_137",oN="_Indents_f5le3_149",sN="_ExpandIcon_f5le3_156",aN="_Content_f5le3_168",lN="_RightSticky_f5le3_177",cN="_SearchInputWrap_f5le3_188",uN="_SearchInput_f5le3_188",fN="_RightAddon_f5le3_200",dN="_RightAddonIcon_f5le3_211",hN="_Loader_f5le3_218",fn={AWrap:UP,AContainer:WP,ATree:VP,ATreeBody:GP,CoverBorder:ZP,InsertBorder:YP,ATreeHeader:KP,ATreeBodyHeader:XP,ATreeBodyHeaderResources:JP,ATreeItem:QP,IsSelectUsed:eN,IsSelected:tN,IsSearchSelected:rN,IsHovered:nN,CheckBox:iN,Indents:oN,ExpandIcon:sN,Content:aN,RightSticky:lN,SearchInputWrap:cN,SearchInput:uN,RightAddon:fN,RightAddonIcon:dN,Loader:hN},pN=r=>{const{isEqual:e,item:t,selectDisabled:n,selectUnused:i,isParentDisabled:l,indents:u,extIndents:h,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:O,hoverdItem:q,onMouseOver:H,onMouseLeave:G,ContentRenderer:Y,TreeItemRenderer:de,RightStickyAddon:te,resources:ue,containerRef:P,TreeItemStyle:re,TreeItemClassName:K,searchItemStyle:ne,searchItemClassName:ie,height:ce}=r,{children:me}=I.useMemo(()=>t,[t]),[ae,be]=I.useMemo(()=>g,[g]),[ge,Se]=I.useMemo(()=>m,[m]),[Ie,Pe]=I.useMemo(()=>M,[M]),Ze=I.useMemo(()=>i?i(t):!1,[i,t]),Te=I.useMemo(()=>!n||l?l:n(t),[n,l,t]),st=I.useMemo(()=>ae.some(qe=>e(qe,t)),[ae,e,t]),dt=I.useMemo(()=>!me||me.length<1?"noChild":st?"expanded":"collapsed",[me,st]),Je=I.useMemo(()=>{const qe=D[dt];return am.includes(qe)?v.jsx(Br,{style:{width:A,height:A},icon:qe}):qe},[D,A,dt]),Ke=I.useCallback(qe=>{!be||dt==="noChild"||(be(st?ae.filter(xt=>!e(xt,t)):[...ae,t]),qe.stopPropagation())},[be,ae,st,t,e,dt]),Oe=I.useMemo(()=>ge.some(qe=>e(qe,t)),[ge,e,t]),ke=I.useCallback(()=>{!Se||Te||(Se(b?Oe?ge.filter(qe=>!e(qe,t)):[...ge,t]:[t]),Ie&&Pe&&Ie.items.some(qe=>e(qe,t))&&Pe({...Ie,item:t}))},[b,Te,Oe,Ie,Pe,Se,e,ge,t]),Ee=I.useMemo(()=>Ie==null?void 0:Ie.items.some(qe=>e(qe,t)),[Ie,e,t]),Ne=I.useMemo(()=>Ee&&(Ie==null?void 0:Ie.item)&&e(Ie.item,t),[Ee,Ie,e,t]),Re=I.useRef(null);I.useEffect(()=>{setTimeout(()=>{if(Ne&&Re.current&&P.current){const{top:qe,bottom:xt}=Re.current.getBoundingClientRect(),{top:_t,bottom:Gt}=P.current.getBoundingClientRect();(qe<_t||xt>Gt)&&Re.current.scrollIntoView({behavior:"smooth",block:"center"})}},10)},[P,Ne]);const[Qe,ct]=I.useState(!1),St=I.useCallback(()=>!Te&&ct(!0),[Te]),Ct=I.useCallback(()=>!Te&&ct(!1),[Te]),gt=I.useMemo(()=>Qa.map(t,qe=>qe).filter(qe=>!(n!=null&&n(qe))&&!(i!=null&&i(qe))),[n,i,t]),kt=I.useMemo(()=>!S||!b?!1:Oe&&gt.some(qe=>ge.some(xt=>e(qe,xt)))&&gt.some(qe=>!ge.some(xt=>e(qe,xt))),[S,b,Oe,gt,e,ge]),wt=I.useMemo(()=>S?b?gt.every(qe=>ge.some(xt=>e(qe,xt))):ge.some(qe=>e(qe,t)):!1,[S,b,gt,t,e,ge]),ze=I.useCallback(()=>{if(!(!Se||Te))if(b)if(Oe){const qe=ge.filter(xt=>!(i!=null&&i(xt))&&!(n!=null&&n(xt))&&gt.some(_t=>e(_t,xt)));qe.length>0&&Se(ge.filter(xt=>!qe.some(_t=>e(xt,_t))))}else{const qe=gt.filter(xt=>!(i!=null&&i(xt))&&!(n!=null&&n(xt))&&!ge.some(_t=>e(_t,xt)));qe.length>0&&Se([...ge,...qe])}else Se([t])},[Te,n,i,b,Se,e,Oe,ge,gt,t]),Ve=I.useCallback(qe=>{Te||ze(),qe.stopPropagation()},[Te,ze]),ft=I.useMemo(()=>{if(!S||!b||Te)return"";if(Oe){const xt=ge.filter(_t=>!(i!=null&&i(_t))&&!(n!=null&&n(_t))&&gt.some(Gt=>e(Gt,_t)));if(xt.length>0)return ue["deselect n"](xt.length)}const qe=gt.filter(xt=>!(i!=null&&i(xt))&&!(n!=null&&n(xt))&&!ge.some(_t=>e(_t,xt)));return ue["select n"](qe.length)},[n,i,ue,Te,S,b,Oe,gt,e,ge]),we=I.useMemo(()=>kr.getContent(te,r),[te,r]),Xe=I.useMemo(()=>kr.getContent(re,r),[r,re]),pt=I.useMemo(()=>kr.getContent(K,r),[r,K]),yt=I.useMemo(()=>kr.getContent(ie,r),[r,ie]),Lt=I.useMemo(()=>kr.getContent(ne,r),[r,ne]);return v.jsxs(I.Fragment,{children:[v.jsxs(Ur,{className:Be.clsx(fn.ATreeItem,Oe&&fn.IsSelected,!Te&&(Qe||O)&&fn.IsHovered,Ee&&fn.IsSearched,Ne&&(yt||fn.IsSearchSelected),!Ze&&fn.IsSelectUsed,"NoSelect",pt),style:{...Xe,...Ne&&Lt,"--ATreeItem_height":`${ce}px`},draggable:k,onDragStart:()=>T==null?void 0:T(t),onDragEnter:qe=>C==null?void 0:C(qe,t),onDragEnd:qe=>_==null?void 0:_(qe,t),onClick:ke,abaseRef:Re,isDisabled:Te,onMouseOver:qe=>H==null?void 0:H(qe,t),onMouseLeave:qe=>G==null?void 0:G(qe,t),children:[S&&v.jsx(Uu,{style:{visibility:Te||Ze?"hidden":"visible",zIndex:Te||Ze?0:2},className:fn.CheckBox,useCheck:[+wt,ze],onClick:Ve,isIndeterminate:kt,onMouseOver:St,onMouseOut:Ct,tooltip:ft,isDisabled:Te}),v.jsx("div",{className:fn.Indents,style:{paddingLeft:S?0:r.icons.noChild?12:0},children:u.map((qe,xt)=>{const _t=xt===u.length-1;return v.jsx(I2,{value:qe,map:{Collapsed:h?h({iconWidth:A}).collapsed:v.jsx(mN,{iconWidth:A}),Expanded:h?h({iconWidth:A,isLast:_t}).expanded:v.jsx(gN,{iconWidth:A,isLast:_t}),IsLast:h?h({iconWidth:A}).isLast:v.jsx(vN,{iconWidth:A})}},xt)})}),Je&&v.jsx("div",{className:fn.ExpandIcon,style:{width:A,minWidth:A,maxWidth:A},onClick:Ke,children:Je}),v.jsx("div",{className:Be.clsx(fn.Content,"NoSelect"),children:v.jsx(Y,{isEqual:e,item:t,indents:u,extIndents:h,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:b&&(Qe||O),hoverdItem:q,onMouseOver:H,onMouseLeave:G,ContentRenderer:Y,TreeItemRenderer:de,RightStickyAddon:te,resources:ue,containerRef:P,TreeItemStyle:re,TreeItemClassName:K,searchItemClassName:yt,searchItemStyle:ne,height:ce})}),we&&v.jsx("div",{className:fn.RightSticky,children:we})]}),st&&(me==null?void 0:me.map((qe,xt)=>v.jsx(de,{isEqual:e,item:qe,selectDisabled:n,selectUnused:i,indents:[...u.map(_t=>_t==="IsLast"?"Collapsed":_t),xt===me.length-1?"IsLast":"Expanded"],extIndents:h,ContentRenderer:Y,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:b&&(Qe||O),hoverdItem:q,onMouseOver:H,onMouseLeave:G,TreeItemRenderer:de,RightStickyAddon:te,resources:ue,containerRef:P,TreeItemStyle:re,TreeItemClassName:K,searchItemClassName:yt,searchItemStyle:ne,height:ce},xt)))]})},gN=({iconWidth:r,isLast:e})=>v.jsx("div",{style:{width:r/8*3,height:"100%",borderLeft:"var(--ATree_Indent_border)",marginLeft:r/2,marginRight:r/8,boxSizing:"border-box",transition:"border-color var(--Transition)"},children:e&&v.jsx("div",{style:{borderBottom:"var(--ATree_Indent_border)",height:"50%",transition:"border-color var(--Transition)"}})}),mN=({iconWidth:r})=>v.jsx("div",{style:{width:r,height:"100%",borderLeft:"none",marginLeft:0,transition:"border-color var(--Transition)"}}),vN=({iconWidth:r})=>v.jsx("div",{style:{width:r/8*3,height:"50%",borderLeft:"var(--ATree_Indent_border)",borderBottom:"var(--ATree_Indent_border)",marginLeft:r/2,marginRight:r/8,boxSizing:"border-box",transition:"border-color var(--Transition)"}}),yN=r=>{const{isEqual:e,searchResult:t,initSearch:n,searchUp:i,searchDown:l,searchEnter:u,isDisabled:h,isLoading:g,resources:m,maxLength:M,autoFocus:T}=r,C=I.useCallback(D=>{D.key==="Enter"?u():D.key==="ArrowDown"?l():D.key==="ArrowUp"&&i(),D.preventDefault(),D.stopPropagation()},[l,u,i]),_=I.useCallback(D=>{n(D)},[n]),S=I.useMemo(()=>h||g?-1:void 0,[h,g]);return v.jsx(Jl,{className:fn.SearchInput,wrapProps:{className:fn.SearchInputWrap},isDisabled:h,tabIndex:S,useValue:[(t==null?void 0:t.keyword)??"",_],onKeyDown:C,placeholder:m["Search(Placeholder)"],RightAddon:v.jsx(bN,{isEqual:e,searchResult:t,searchUp:i,searchDown:l,searchEnter:u,resources:m}),maxLength:M,autoFocus:T})},bN=r=>{const{isEqual:e,searchResult:t,searchUp:n,searchDown:i,searchEnter:l,resources:u}=r,h=I.useMemo(()=>!t||t.items.length<1?0:t.items.findIndex(S=>t.item&&e(S,t.item))+1,[t,e]),g=I.useMemo(()=>!t||t.items.length<1?0:t.items.length,[t]),m=I.useMemo(()=>h<2,[h]),M=I.useMemo(()=>h>=g,[h,g]),T=I.useCallback(S=>{S.stopPropagation(),!m&&n()},[n,m]),C=I.useCallback(S=>{S.stopPropagation(),!M&&i()},[i,M]),_=I.useCallback(S=>{S.stopPropagation(),l()},[l]);return v.jsx("div",{className:Be.clsx(fn.RightAddon,"NoSelect"),children:t?v.jsxs(v.Fragment,{children:[h,"/",g,v.jsx(Ur,{onClick:T,isDisabled:m,children:v.jsx(Br,{className:fn.RightAddonIcon,icon:"ArrowUp",mask:""})}),v.jsx(Ur,{onClick:C,isDisabled:M,children:v.jsx(Br,{className:fn.RightAddonIcon,icon:"ArrowDown"})})]}):v.jsx(vo,{type:"Raw",className:fn.RightAddonIcon,style:{marginRight:4},icon:"Search",onClick:_,tooltip:u["Search(Button)"]})})},_N=r=>{var Wr;const{pk:e,selectDisabled:t,selectUnused:n,useItems:i,useExpand:l,useSelect:u,useSearch:h,showCheckbox:g,iconWidth:m=24,icons:M={noChild:"Folder",collapsed:"FolderCopy",expanded:"FolderOpen"},indents:T,isSelectMulti:C=!1,noSearch:_=!1,isDraggable:S,noSyncSearchSelect:D=!1,actionRef:A,placeholder:b,searchPredicate:k=SN,isDisabled:O,isLoading:q,ContentRenderer:H=xN,TreeItemRenderer:G=pN,RightStickyAddon:Y,TopRightAddon:de,TreeTopAddon:te,resources:ue,maxLength:P,autoFocus:re,TreeItemStyle:K,TreeItemClassName:ne,OverflowPadding:ie,insertBorder:ce,width:me,searchItemClassName:ae,searchItemStyle:be,height:ge=40,...Se}=r,Ie=I.useMemo(()=>({...hn.ATree,...ue}),[ue]),Pe=I.useCallback((at,It)=>e!==void 0?Array.isArray(e)?e.every(vt=>el.isEqual(at[vt],It[vt])):el.isEqual(at[e],It[e]):el.isEqual(at,It),[e]),Ze=I.useRef(null),[Te,st]=pn(i,[]),dt=I.useMemo(()=>Qa.map(Te,at=>at),[Te]),[Je,Ke]=pn(l,[]),[Oe,ke]=pn(u,[]),[Ee,Ne]=pn(h,void 0),Re=I.useCallback(at=>{if(O||!Ke||Je.some(et=>Pe(et,at)))return;const It=[];let vt=at;for(;vt;){const et=vt;Je.find(Pt=>Pe(Pt,et))||It.push(et),vt=dt.find(Pt=>{var Q;return(Q=Pt.children)==null?void 0:Q.some(He=>Pe(He,et))})}Ke([...Je,...It])},[Je,O,Pe,Ke,dt]),Qe=I.useCallback(()=>{!Ke||O||Ke([...dt])},[dt,O,Ke]),ct=I.useCallback(()=>{!Ke||O||Ke([])},[Ke,O]),St=I.useCallback(at=>{!ke||O||n!=null&&n(at)||(ke([at]),Re(at))},[ke,O,n,Re]),Ct=I.useCallback(at=>{if(!Ne||O)return;if(!at||_){Ne(void 0),D||ke==null||ke([]);return}const It=Qa.filter(Te,et=>k(at,et));let vt;if(It.find(et=>(Ee==null?void 0:Ee.item)&&Pe(et,Ee.item))?vt=Ee==null?void 0:Ee.item:It.length>0&&(vt=It[0]),Ne({keyword:at,items:It,item:vt}),vt&&Re(vt),ke&&!D)if(C)ke(It);else{const et=It.find(Pt=>vt&&Pe(Pt,vt));ke(et?[et]:[])}},[Te,O,Pe,k,Ne,ke,Re,D,_,C,Ee]),gt=I.useRef(!1);I.useEffect(()=>{gt.current=!0},[Te]),I.useEffect(()=>{Ee&&gt.current&&(Ct(Ee.keyword),gt.current=!1)},[Ct,Ee]);const kt=I.useCallback(()=>{if(!Ee||!Ne||O)return;let at=Ee.items.findIndex(It=>Ee.item&&Pe(It,Ee.item))-1;at<0||(Ne({...Ee,item:Ee.items[at]}),Re(Ee.items[at]),D||St(Ee.items[at]))},[Ee,Re,Ne,O,St,Pe,D]),wt=I.useCallback(()=>{if(!Ee||!Ne||O)return;let at=Ee.items.findIndex(It=>Ee.item&&Pe(It,Ee.item))+1;at>=Ee.items.length||(Ne({...Ee,item:Ee.items[at]}),Re(Ee.items[at]),D||St(Ee.items[at]))},[Ee,Re,O,Ne,St,Pe,D]),ze=I.useCallback(()=>{if(!Ee||!Ne||O)return;let at=Ee.items.findIndex(vt=>Ee.item&&Pe(vt,Ee.item));if(!D||n!=null&&n(Ee.items[at])){wt();return}if(Oe.some(vt=>Ee.item&&Pe(vt,Ee.item))){let vt=at+1;const et=Ee.items[vt];if(vt>=Ee.items.length)return;Ne({...Ee,item:et}),St(et)}else St(Ee.items[at])},[Ee,Ne,O,Oe,D,wt,Pe,St,n]),[Ve,ft]=I.useState(!1),we=I.useCallback(()=>ft(!0),[]),Xe=I.useCallback(()=>ft(!1),[]),pt=I.useMemo(()=>n?Qa.map(Te,at=>at).filter(at=>!n(at)):t?Qa.map(Te,at=>at).filter(at=>!t(at)):Qa.map(Te,at=>at),[n,t,Te]),yt=I.useMemo(()=>!g||!C?!1:Oe.length>0&&pt.length>Oe.length,[g,C,Oe,pt]),Lt=I.useMemo(()=>!g||!C?!1:Oe.length>0&&pt.length===Oe.length,[g,C,Oe,pt]),qe=I.useCallback(()=>{if(!ke||!C||O)return;const at=Oe.filter(It=>!(n!=null&&n(It))&&!(t!=null&&t(It))&&pt.some(vt=>Pe(vt,It)));if(at.length>0)ke(Oe.filter(It=>!at.some(vt=>Pe(It,vt))));else{const It=pt.filter(vt=>!(n!=null&&n(vt))&&!(t!=null&&t(vt))&&!Oe.some(et=>Pe(et,vt)));It.length>0&&ke([...Oe,...It])}},[C,O,n,t,ke,Oe,pt,Pe]),xt=I.useMemo(()=>{if(!g||!C||O)return"";const at=Oe.filter(It=>!(n!=null&&n(It))&&!(t!=null&&t(It))&&pt.some(vt=>Pe(vt,It)));if(at.length>0)return Ie["deselect n"](at.length);{const It=pt.filter(vt=>!(n!=null&&n(vt))&&!(t!=null&&t(vt))&&!Oe.some(et=>Pe(et,vt)));return Ie["select n"](It.length)}},[n,t,O,Ie,g,C,pt,Oe,Pe]),[_t,Gt]=I.useState(null),[fr,wr]=I.useState(null),pe=I.useCallback(at=>{!S||O||Gt(at)},[O,S]),ee=I.useCallback((at,It)=>{if(!S||O||!_t||(at.preventDefault(),at.stopPropagation(),wr(It),!st))return;const vt=Qa.replace(Te,_t,It,Pe);vt&&st(vt)},[S,Te,_t,O,st,Pe]),je=I.useCallback(()=>{if(!S||O||!_t||!fr||!st||Pe(_t,fr))return;const at=Qa.replace(Te,_t,fr,Pe);at&&(st(at),Gt(null))},[S,st,Te,_t,fr,Pe,O]);I.useEffect(()=>{var at;g||(at=Ze.current)==null||at.scrollTo(0,0)},[g,Ze]),I.useEffect(()=>{!C&&Oe.length>1&&(ke==null||ke([Oe[Oe.length-1]]))},[C,ke,Oe]),I.useEffect(()=>{A&&(A.current={expandAll:Qe,collapseAll:ct})},[A,Qe,ct]),I.useEffect(()=>{if(!t||!ke)return;const at=Oe.filter(It=>!t(It));Oe.length!==at.length&&ke(at)},[t,Oe,ke]),I.useEffect(()=>{if(!n||!ke)return;const at=Oe.filter(It=>!n(It));Oe.length!==at.length&&ke(at)},[n,Oe,ke]),I.useEffect(()=>{Ne&&Ne(void 0)},[Ne]);const[nt,jt]=I.useState(!1);I.useEffect(()=>{jt(at=>!at)},[Te]);const[bt,Rt]=I.useState(null),Zt=I.useCallback((at,It)=>{O||(at.stopPropagation(),at.preventDefault(),Rt(It))},[O]),Ft=I.useCallback((at,It)=>{bt===null||O||Pe(It,bt)&&(at.stopPropagation(),at.preventDefault(),Rt(null))},[bt,O,Pe]),or=I.useRef(null),[dr,Rr]=I.useState(!1),[cr,_r]=I.useState((Wr=or.current)==null?void 0:Wr.scrollHeight);return I.useEffect(()=>{if(Je.length<0)return;const at=Ze.current,It=or.current,vt=at.clientHeight<It.clientHeight;_r(vt?It.scrollHeight:at.clientHeight),Rr(vt)},[Je]),v.jsxs(Ur,{...Se,isDisabled:O,className:Be.clsx(Se.className,fn.AWrap),children:[(!_||de)&&v.jsxs(si,{className:fn.ATreeHeader,children:[!_&&v.jsx(yN,{isEqual:Pe,searchResult:Ee,initSearch:Ct,searchUp:kt,searchDown:wt,searchEnter:ze,isLoading:q,isDisabled:O,resources:Ie,maxLength:P,autoFocus:re}),!_&&de&&v.jsx(mn,{w:8}),de]}),(!_||de||g&&C||S)&&v.jsx(hm,{isLoading:q&&Te.length!==0}),(g&&C||S)&&v.jsxs("div",{className:Be.clsx(fn.ATreeBodyHeader,"NoSelect"),children:[g&&v.jsx(Uu,{className:fn.CheckBox,useCheck:[+Lt,()=>qe()],isIndeterminate:yt,onMouseOver:we,onMouseOut:Xe,isDisabled:O,tooltip:xt}),Ie.Items,v.jsx(Yc,{}),v.jsxs("div",{className:Be.clsx(fn.ATreeBodyHeaderResources,"NoSelect"),style:{marginRight:dr?8:0},children:[v.jsx("span",{children:g&&Ie["*Click row for single select"]}),v.jsx("span",{children:S&&Ie["*Change order to row drag"]})]})]}),v.jsx("div",{ref:Ze,className:Be.clsx(Se.className,fn.AContainer),children:v.jsxs("div",{className:fn.ATree,style:{minWidth:me||"fit-content",marginRight:ie&&dr?8:0},children:[v.jsxs("div",{ref:or,className:fn.ATreeBody,children:[Te.length===0?q?v.jsx(CN,{text:Ie["Loading Contents..."]}):b:te,Te.map((at,It)=>v.jsx(G,{isEqual:Pe,indents:[],extIndents:T,item:at,selectDisabled:t,selectUnused:n,isParentDisabled:O,useExpand:[Je,Ke],useSelect:[Oe,ke],useSearch:[Ee,Ne],onDragStart:pe,onDragOver:ee,onDragEnd:je,showCheckbox:g,icons:M,iconWidth:m,isSelectMulti:C,isDraggable:S,isParentCheckHovered:C&&Ve,ContentRenderer:H,TreeItemRenderer:G,RightStickyAddon:Y,resources:Ie,containerRef:Ze,TreeItemStyle:K,TreeItemClassName:ne,hoverdItem:bt,onMouseOver:Zt,onMouseLeave:Ft,searchItemClassName:ae,searchItemStyle:be,height:ge},`${It}${nt}`))]}),ce&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:fn.CoverBorder}),v.jsx("div",{className:fn.InsertBorder,style:{"--InsertBorder_height":`${ge}px`,height:dr?cr:"100%"}})]})]})})]})},xN=r=>{const{item:e}=r,t={};return Xt.keys(e).forEach(n=>{n!=="children"&&(t[n]=e[n])}),JSON.stringify(t)};function SN(r,e){return Xt.some(e,(t,n)=>{var i;return(i=Xt.stringify(n))==null?void 0:i.toLowerCase().includes(r.toLowerCase())})}const CN=r=>{const{text:e}=r;return v.jsxs(si,{className:Be.clsx(fn.Loader,"NoSelect"),children:[v.jsx(Br,{icon:"Spinner",style:{height:40},height:40,width:40}),v.jsx(z2,{text:e})]})};var $g,Gb;function Qu(){return Gb||(Gb=1,$g=TypeError),$g}const wN={},AN=Object.freeze(Object.defineProperty({__proto__:null,default:wN},Symbol.toStringTag,{value:"Module"})),TN=t4(AN);var Ug,Zb;function _h(){if(Zb)return Ug;Zb=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=r&&e&&typeof e.get=="function"?e.get:null,n=r&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,l=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=i&&l&&typeof l.get=="function"?l.get:null,h=i&&Set.prototype.forEach,g=typeof WeakMap=="function"&&WeakMap.prototype,m=g?WeakMap.prototype.has:null,M=typeof WeakSet=="function"&&WeakSet.prototype,T=M?WeakSet.prototype.has:null,C=typeof WeakRef=="function"&&WeakRef.prototype,_=C?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,D=Object.prototype.toString,A=Function.prototype.toString,b=String.prototype.match,k=String.prototype.slice,O=String.prototype.replace,q=String.prototype.toUpperCase,H=String.prototype.toLowerCase,G=RegExp.prototype.test,Y=Array.prototype.concat,de=Array.prototype.join,te=Array.prototype.slice,ue=Math.floor,P=typeof BigInt=="function"?BigInt.prototype.valueOf:null,re=Object.getOwnPropertySymbols,K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ne=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ie=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ne||!0)?Symbol.toStringTag:null,ce=Object.prototype.propertyIsEnumerable,me=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(pe){return pe.__proto__}:null);function ae(pe,ee){if(pe===1/0||pe===-1/0||pe!==pe||pe&&pe>-1e3&&pe<1e3||G.call(/e/,ee))return ee;var je=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof pe=="number"){var nt=pe<0?-ue(-pe):ue(pe);if(nt!==pe){var jt=String(nt),bt=k.call(ee,jt.length+1);return O.call(jt,je,"$&_")+"."+O.call(O.call(bt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O.call(ee,je,"$&_")}var be=TN,ge=be.custom,Se=Re(ge)?ge:null,Ie={__proto__:null,double:'"',single:"'"},Pe={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ug=function pe(ee,je,nt,jt){var bt=je||{};if(St(bt,"quoteStyle")&&!St(Ie,bt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(St(bt,"maxStringLength")&&(typeof bt.maxStringLength=="number"?bt.maxStringLength<0&&bt.maxStringLength!==1/0:bt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Rt=St(bt,"customInspect")?bt.customInspect:!0;if(typeof Rt!="boolean"&&Rt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(St(bt,"indent")&&bt.indent!==null&&bt.indent!==" "&&!(parseInt(bt.indent,10)===bt.indent&&bt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(St(bt,"numericSeparator")&&typeof bt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Zt=bt.numericSeparator;if(typeof ee>"u")return"undefined";if(ee===null)return"null";if(typeof ee=="boolean")return ee?"true":"false";if(typeof ee=="string")return pt(ee,bt);if(typeof ee=="number"){if(ee===0)return 1/0/ee>0?"0":"-0";var Ft=String(ee);return Zt?ae(ee,Ft):Ft}if(typeof ee=="bigint"){var or=String(ee)+"n";return Zt?ae(ee,or):or}var dr=typeof bt.depth>"u"?5:bt.depth;if(typeof nt>"u"&&(nt=0),nt>=dr&&dr>0&&typeof ee=="object")return dt(ee)?"[Array]":"[Object]";var Rr=Gt(bt,nt);if(typeof jt>"u")jt=[];else if(kt(jt,ee)>=0)return"[Circular]";function cr(sr,ur,zr){if(ur&&(jt=te.call(jt),jt.push(ur)),zr){var gr={depth:bt.depth};return St(bt,"quoteStyle")&&(gr.quoteStyle=bt.quoteStyle),pe(sr,gr,nt+1,jt)}return pe(sr,bt,nt+1,jt)}if(typeof ee=="function"&&!Ke(ee)){var _r=gt(ee),Wr=wr(ee,cr);return"[Function"+(_r?": "+_r:" (anonymous)")+"]"+(Wr.length>0?" { "+de.call(Wr,", ")+" }":"")}if(Re(ee)){var at=ne?O.call(String(ee),/^(Symbol\(.*\))_[^)]*$/,"$1"):K.call(ee);return typeof ee=="object"&&!ne?Lt(at):at}if(Xe(ee)){for(var It="<"+H.call(String(ee.nodeName)),vt=ee.attributes||[],et=0;et<vt.length;et++)It+=" "+vt[et].name+"="+Ze(Te(vt[et].value),"double",bt);return It+=">",ee.childNodes&&ee.childNodes.length&&(It+="..."),It+="</"+H.call(String(ee.nodeName))+">",It}if(dt(ee)){if(ee.length===0)return"[]";var Pt=wr(ee,cr);return Rr&&!_t(Pt)?"["+fr(Pt,Rr)+"]":"[ "+de.call(Pt,", ")+" ]"}if(Oe(ee)){var Q=wr(ee,cr);return!("cause"in Error.prototype)&&"cause"in ee&&!ce.call(ee,"cause")?"{ ["+String(ee)+"] "+de.call(Y.call("[cause]: "+cr(ee.cause),Q),", ")+" }":Q.length===0?"["+String(ee)+"]":"{ ["+String(ee)+"] "+de.call(Q,", ")+" }"}if(typeof ee=="object"&&Rt){if(Se&&typeof ee[Se]=="function"&&be)return be(ee,{depth:dr-nt});if(Rt!=="symbol"&&typeof ee.inspect=="function")return ee.inspect()}if(wt(ee)){var He=[];return n&&n.call(ee,function(sr,ur){He.push(cr(ur,ee,!0)+" => "+cr(sr,ee))}),xt("Map",t.call(ee),He,Rr)}if(ft(ee)){var ht=[];return h&&h.call(ee,function(sr){ht.push(cr(sr,ee))}),xt("Set",u.call(ee),ht,Rr)}if(ze(ee))return qe("WeakMap");if(we(ee))return qe("WeakSet");if(Ve(ee))return qe("WeakRef");if(Ee(ee))return Lt(cr(Number(ee)));if(Qe(ee))return Lt(cr(P.call(ee)));if(Ne(ee))return Lt(S.call(ee));if(ke(ee))return Lt(cr(String(ee)));if(typeof window<"u"&&ee===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ee===globalThis||typeof yi<"u"&&ee===yi)return"{ [object globalThis] }";if(!Je(ee)&&!Ke(ee)){var Dt=wr(ee,cr),er=me?me(ee)===Object.prototype:ee instanceof Object||ee.constructor===Object,Yt=ee instanceof Object?"":"null prototype",Mt=!er&&ie&&Object(ee)===ee&&ie in ee?k.call(Ct(ee),8,-1):Yt?"Object":"",Kt=er||typeof ee.constructor!="function"?"":ee.constructor.name?ee.constructor.name+" ":"",Mr=Kt+(Mt||Yt?"["+de.call(Y.call([],Mt||[],Yt||[]),": ")+"] ":"");return Dt.length===0?Mr+"{}":Rr?Mr+"{"+fr(Dt,Rr)+"}":Mr+"{ "+de.call(Dt,", ")+" }"}return String(ee)};function Ze(pe,ee,je){var nt=je.quoteStyle||ee,jt=Ie[nt];return jt+pe+jt}function Te(pe){return O.call(String(pe),/"/g,"&quot;")}function st(pe){return!ie||!(typeof pe=="object"&&(ie in pe||typeof pe[ie]<"u"))}function dt(pe){return Ct(pe)==="[object Array]"&&st(pe)}function Je(pe){return Ct(pe)==="[object Date]"&&st(pe)}function Ke(pe){return Ct(pe)==="[object RegExp]"&&st(pe)}function Oe(pe){return Ct(pe)==="[object Error]"&&st(pe)}function ke(pe){return Ct(pe)==="[object String]"&&st(pe)}function Ee(pe){return Ct(pe)==="[object Number]"&&st(pe)}function Ne(pe){return Ct(pe)==="[object Boolean]"&&st(pe)}function Re(pe){if(ne)return pe&&typeof pe=="object"&&pe instanceof Symbol;if(typeof pe=="symbol")return!0;if(!pe||typeof pe!="object"||!K)return!1;try{return K.call(pe),!0}catch{}return!1}function Qe(pe){if(!pe||typeof pe!="object"||!P)return!1;try{return P.call(pe),!0}catch{}return!1}var ct=Object.prototype.hasOwnProperty||function(pe){return pe in this};function St(pe,ee){return ct.call(pe,ee)}function Ct(pe){return D.call(pe)}function gt(pe){if(pe.name)return pe.name;var ee=b.call(A.call(pe),/^function\s*([\w$]+)/);return ee?ee[1]:null}function kt(pe,ee){if(pe.indexOf)return pe.indexOf(ee);for(var je=0,nt=pe.length;je<nt;je++)if(pe[je]===ee)return je;return-1}function wt(pe){if(!t||!pe||typeof pe!="object")return!1;try{t.call(pe);try{u.call(pe)}catch{return!0}return pe instanceof Map}catch{}return!1}function ze(pe){if(!m||!pe||typeof pe!="object")return!1;try{m.call(pe,m);try{T.call(pe,T)}catch{return!0}return pe instanceof WeakMap}catch{}return!1}function Ve(pe){if(!_||!pe||typeof pe!="object")return!1;try{return _.call(pe),!0}catch{}return!1}function ft(pe){if(!u||!pe||typeof pe!="object")return!1;try{u.call(pe);try{t.call(pe)}catch{return!0}return pe instanceof Set}catch{}return!1}function we(pe){if(!T||!pe||typeof pe!="object")return!1;try{T.call(pe,T);try{m.call(pe,m)}catch{return!0}return pe instanceof WeakSet}catch{}return!1}function Xe(pe){return!pe||typeof pe!="object"?!1:typeof HTMLElement<"u"&&pe instanceof HTMLElement?!0:typeof pe.nodeName=="string"&&typeof pe.getAttribute=="function"}function pt(pe,ee){if(pe.length>ee.maxStringLength){var je=pe.length-ee.maxStringLength,nt="... "+je+" more character"+(je>1?"s":"");return pt(k.call(pe,0,ee.maxStringLength),ee)+nt}var jt=Pe[ee.quoteStyle||"single"];jt.lastIndex=0;var bt=O.call(O.call(pe,jt,"\\$1"),/[\x00-\x1f]/g,yt);return Ze(bt,"single",ee)}function yt(pe){var ee=pe.charCodeAt(0),je={8:"b",9:"t",10:"n",12:"f",13:"r"}[ee];return je?"\\"+je:"\\x"+(ee<16?"0":"")+q.call(ee.toString(16))}function Lt(pe){return"Object("+pe+")"}function qe(pe){return pe+" { ? }"}function xt(pe,ee,je,nt){var jt=nt?fr(je,nt):de.call(je,", ");return pe+" ("+ee+") {"+jt+"}"}function _t(pe){for(var ee=0;ee<pe.length;ee++)if(kt(pe[ee],`
350
350
  `)>=0)return!1;return!0}function Gt(pe,ee){var je;if(pe.indent===" ")je=" ";else if(typeof pe.indent=="number"&&pe.indent>0)je=de.call(Array(pe.indent+1)," ");else return null;return{base:je,prev:de.call(Array(ee+1),je)}}function fr(pe,ee){if(pe.length===0)return"";var je=`
package/dist/index.es.js CHANGED
@@ -30573,6 +30573,10 @@ wx.table = Bs.renderToString(/* @__PURE__ */ v.jsx(Ur, { icon: "Table", strokeWi
30573
30573
  wx.divider = Bs.renderToString(/* @__PURE__ */ v.jsx(Ur, { icon: "Minus", strokeWidth: 2.5 }));
30574
30574
  const rM = We.import("blots/block/embed");
30575
30575
  class sm extends rM {
30576
+ static create(e) {
30577
+ const t = super.create(e);
30578
+ return t.style.border = "var(--AEditor_Addon_Primary_border)", t.style.borderBottom = "none", t.style.transition = "border var(--Transition)", t;
30579
+ }
30576
30580
  }
30577
30581
  st(sm, "blotName", "divider"), st(sm, "tagName", "hr");
30578
30582
  We.register(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ados-rcm",
3
- "version": "1.1.344",
3
+ "version": "1.1.345",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",