efficient-easel 11.0.0 → 11.1.0

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.
Files changed (43) hide show
  1. package/dist/{canvas-typing-CJodefPO.d.ts → canvas-typing-DvoqQINU.d.ts} +43 -1
  2. package/dist/chunk-2PTAR4TA.js +56 -0
  3. package/dist/{chunk-6FFSDH62.js → chunk-3KAQXJVI.js} +1 -1
  4. package/dist/{chunk-BGY4Q2SL.js → chunk-4MPCFKFG.js} +1 -1
  5. package/dist/{chunk-FAAZZXIS.js → chunk-7GYJG6CL.js} +1 -1
  6. package/dist/chunk-FGJSCWUN.js +7 -0
  7. package/dist/{chunk-XZDHQ4DN.js → chunk-HUI44HA5.js} +4 -4
  8. package/dist/chunk-I55LUW3C.js +12 -0
  9. package/dist/{chunk-PPHUWGLZ.js → chunk-IOZKOGFR.js} +1 -1
  10. package/dist/{chunk-PZHQVOTU.js → chunk-O66SKO3J.js} +1 -1
  11. package/dist/chunk-OHRS7Q3E.js +5 -0
  12. package/dist/{chunk-GJC6SNQC.js → chunk-PQMCHTVE.js} +1 -1
  13. package/dist/{chunk-JTOZJXD7.js → chunk-UB5JFMRN.js} +1 -1
  14. package/dist/{chunk-26GHWMNN.js → chunk-XAF6J6TB.js} +12 -12
  15. package/dist/{chunk-QOYOE5CU.js → chunk-YJQYO6TA.js} +1 -1
  16. package/dist/{chunk-ISZI4T6A.js → chunk-YXIR3EI3.js} +4 -4
  17. package/dist/copy/index.d.ts +2 -2
  18. package/dist/copy/index.js +19 -25
  19. package/dist/easel/index.d.ts +8 -1
  20. package/dist/easel/index.js +1 -1
  21. package/dist/fields/index.js +1 -1
  22. package/dist/screen/components/AddBlockRow.js +1 -1
  23. package/dist/screen/components/AddSidePanel.js +1 -1
  24. package/dist/screen/components/MediaSidePanel.js +1 -1
  25. package/dist/screen/components/NodeContextMenu.js +1 -1
  26. package/dist/screen/components/ScreenChrome.js +1 -1
  27. package/dist/screen/components/ScreenMount.js +1 -1
  28. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  29. package/dist/screen/components/SectionScreenShell.js +15 -15
  30. package/dist/screen/components/usePartBridge.js +1 -1
  31. package/dist/screen/index.js +1 -1
  32. package/dist/screen/lib/key-scope.js +1 -1
  33. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  34. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  35. package/dist/screen/lib/screen-parts.js +1 -1
  36. package/dist/strings/catalogue.js +1 -1
  37. package/dist/strings/index.js +1 -1
  38. package/dist/text-styles/index.js +19 -19
  39. package/package.json +1 -1
  40. package/dist/chunk-77DQCEEF.js +0 -5
  41. package/dist/chunk-7LP3OD2E.js +0 -56
  42. package/dist/chunk-PE6ZY5IW.js +0 -11
  43. package/dist/chunk-TJ6NRHYF.js +0 -1
@@ -1,21 +1,21 @@
1
- import{TreeSeam as e}from"./chunk-4JSBIW5H.js";import{SETTINGS_BUCKETS as n,SettingsGroup as l}from"./chunk-RC25EGHD.js";import{DEFAULT_TREE_WORDS as t}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as a}from"./chunk-KFV7N2DJ.js";import{EaselMenuItems as r}from"./chunk-EA2HTX37.js";import{FieldNumber as o}from"./chunk-66LWADFP.js";import{FieldSelect as i}from"./chunk-65Z5FSAW.js";import{SettingsField as s,SettingsSegmented as c}from"./chunk-XJCMEEBH.js";import{DEFAULT_FIELDS_WORDS as d}from"./chunk-FFYXVAAL.js";import{useWords as u}from"./chunk-MFIRYGHW.js";import{useTreeDrag as m,gapToMoveIndex as p}from"./chunk-67GNT6PF.js";import{withTip as h}from"./chunk-P2VEMZH5.js";import{Textarea as f,Input as b,SortableList as g,ListRow as v,ContextMenu as y,tabPanelId as k,Tabs as x,tabButtonId as w}from"efficient-shell/ui";export{LinkPicker}from"efficient-shell/ui";import{useRef as N,useState as C,useLayoutEffect as O,useId as $}from"react";import{jsx as j,jsxs as S}from"react/jsx-runtime";import{ChevronIcon as D,LockIcon as I,MoveUpIcon as F,MoveDownIcon as L,DuplicateIcon as P,TrashIcon as A}from"efficient-shell/icons/efficient";function E({id:e,value:n,onChange:l,placeholder:t,multiline:a=!1,rows:r=3,readOnly:o=!1,ariaLabel:i,ariaLabelledBy:s}){const c=n??"";return a?/* @__PURE__ */j(f,{id:e,size:"sm",className:"es-fin",value:c,rows:r,placeholder:t,readOnly:o,"aria-label":i,"aria-labelledby":s,onChange:e=>l(e.target.value)}):/* @__PURE__ */j(b,{id:e,size:"sm",className:"es-fin",type:"text",value:c,placeholder:t,readOnly:o,"aria-label":i,"aria-labelledby":s,onChange:e=>l(e.target.value)})}function M(e,n,l){const t=e.slice();return t.splice(Math.max(0,Math.min(n,t.length)),0,l),t}function T(e,n,l){const t=e.slice(),[a]=t.splice(n,1);return t.splice(Math.max(0,Math.min(l,t.length)),0,a),t}function H(e,n){return e.filter((e,l)=>l!==n)}function R(e){return null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e))}var z='input, textarea, select, button, [contenteditable]:not([contenteditable="false"]), [tabindex]',B={parentId:"list",slot:"items"};function J({label:n,icon:l,noun:a,items:o,onChange:i,newItem:s,summary:c,itemName:f,thumb:b,min:k=0,max:x,readOnly:w=!1,open:$,onOpen:E,renderItem:J,renderRow:K,canRemove:Y,lockedReason:V,fixed:W=!1,removeOnRow:X=!0,canDuplicate:G,above:Z,head:q=!0}){const Q=u("fields",d).list,U=u("tree",t),_=a??Q.item,ee=!w&&!W&&("number"!=typeof x||o.length<x),ne=o.length<=k,le=e=>!!Y&&!Y(o[e],e),te=e=>!w&&!W&&X&&!ne&&!le(e),ae=e=>ee&&(!G||G(o[e],e)),re=(e,n)=>f?f(e,n):Q.itemName({noun:_,n:n+1}),oe=N([]),ie=N(null),[se,ce]=C(null),de=N(null),[ue,me]=C(null),[pe,he]=C("");O(()=>{const e=ie.current;if(!e)return;ie.current=null;const n=oe.current[e.index]?.querySelectorAll(z)[e.nth]??oe.current[e.index];if(n?.focus(),n&&null!==e.start&&"setSelectionRange"in n)try{n.setSelectionRange(e.start,e.end)}catch{}});const fe=(e,n)=>{if(n<0||n>=o.length||n===e)return;const l=oe.current[e],t=l?.ownerDocument.activeElement;if(l&&t&&l.contains(t)){const e=[...l.querySelectorAll(z)].indexOf(t),a=t;ie.current={index:n,nth:e,start:"number"==typeof a.selectionStart?a.selectionStart:null,end:"number"==typeof a.selectionEnd?a.selectionEnd:null}}i(T(o,e,n));const a=function(e,n,l){return null===e?null:e===n?l:n<e&&l>=e?e-1:n>e&&l<=e?e+1:e}($,e,n);a!==$&&E(a),he(Q.moved({n:n+1,total:o.length}))},be=e=>{ee&&(i(M(o,e,s())),K?(ie.current={index:e,nth:0,start:null,end:null},null!==$&&$>=e&&E($+1)):E(e))},ge=e=>{te(e)&&(i(H(o,e)),$===e?E(null):null!==$&&$>e&&E($-1))},ve=m({keyOf:e=>String(e),canDrop:(e,n)=>n.parentId===B.parentId&&n.slot===B.slot,onDrop:(e,n)=>{const l=p({...B,index:e},n);l!==e&&fe(e,l)},onStep:(e,n)=>fe(e,e+n),canStep:(e,n)=>e+n>=0&&e+n<o.length,readOnly:w}),ye=e=>{const n=[];return e>0&&n.push({label:Q.moveUp,icon:/* @__PURE__ */j(F,{size:14}),shortcut:"⌥↑",onClick:()=>fe(e,e-1)}),e<o.length-1&&n.push({label:Q.moveDown,icon:/* @__PURE__ */j(L,{size:14}),shortcut:"⌥↓",onClick:()=>fe(e,e+1)}),ae(e)&&n.push({label:Q.duplicate,icon:/* @__PURE__ */j(P,{size:14}),onClick:()=>(e=>{ae(e)&&(i(M(o,e+1,R(o[e]))),null!==$&&$>e&&E($+1))})(e)}),te(e)&&n.push({label:Q.delete,icon:/* @__PURE__ */j(A,{size:14}),danger:!0,onClick:()=>ge(e)}),n},ke=(e,n,l,t)=>{w||0===ye(e).length||me({index:e,x:n,y:l,owner:t})},xe=e=>n=>{const l=o.slice();l[e]=n,i(l)};/* @__PURE__ */
1
+ import{TreeSeam as e}from"./chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as n}from"./chunk-K56YDHYQ.js";import{SETTINGS_BUCKETS as l,SettingsGroup as t}from"./chunk-RC25EGHD.js";import{DEFAULT_PANEL_WORDS as a}from"./chunk-KFV7N2DJ.js";import{EaselMenuItems as r}from"./chunk-EA2HTX37.js";import{FieldNumber as o}from"./chunk-66LWADFP.js";import{FieldSelect as i}from"./chunk-65Z5FSAW.js";import{DEFAULT_FIELDS_WORDS as s}from"./chunk-FFYXVAAL.js";import{SettingsField as c,SettingsSegmented as d}from"./chunk-XJCMEEBH.js";import{useWords as u}from"./chunk-MFIRYGHW.js";import{useTreeDrag as m,gapToMoveIndex as p}from"./chunk-67GNT6PF.js";import{withTip as h}from"./chunk-P2VEMZH5.js";import{Textarea as f,Input as b,SortableList as g,ListRow as v,ContextMenu as y,tabPanelId as k,Tabs as x,tabButtonId as w}from"efficient-shell/ui";export{LinkPicker}from"efficient-shell/ui";import{useRef as N,useState as C,useLayoutEffect as O,useId as $}from"react";import{jsx as j,jsxs as S}from"react/jsx-runtime";import{ChevronIcon as D,LockIcon as I,MoveUpIcon as F,MoveDownIcon as L,DuplicateIcon as P,TrashIcon as A}from"efficient-shell/icons/efficient";function E({id:e,value:n,onChange:l,placeholder:t,multiline:a=!1,rows:r=3,readOnly:o=!1,ariaLabel:i,ariaLabelledBy:s}){const c=n??"";return a?/* @__PURE__ */j(f,{id:e,size:"sm",className:"es-fin",value:c,rows:r,placeholder:t,readOnly:o,"aria-label":i,"aria-labelledby":s,onChange:e=>l(e.target.value)}):/* @__PURE__ */j(b,{id:e,size:"sm",className:"es-fin",type:"text",value:c,placeholder:t,readOnly:o,"aria-label":i,"aria-labelledby":s,onChange:e=>l(e.target.value)})}function M(e,n,l){const t=e.slice();return t.splice(Math.max(0,Math.min(n,t.length)),0,l),t}function T(e,n,l){const t=e.slice(),[a]=t.splice(n,1);return t.splice(Math.max(0,Math.min(l,t.length)),0,a),t}function H(e,n){return e.filter((e,l)=>l!==n)}function R(e){return null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e))}var z='input, textarea, select, button, [contenteditable]:not([contenteditable="false"]), [tabindex]',B={parentId:"list",slot:"items"};function J({label:l,icon:t,noun:a,items:o,onChange:i,newItem:c,summary:d,itemName:f,thumb:b,min:k=0,max:x,readOnly:w=!1,open:$,onOpen:E,renderItem:J,renderRow:K,canRemove:Y,lockedReason:V,fixed:W=!1,removeOnRow:X=!0,canDuplicate:G,above:Z,head:q=!0}){const Q=u("fields",s).list,U=u("tree",n),_=a??Q.item,ee=!w&&!W&&("number"!=typeof x||o.length<x),ne=o.length<=k,le=e=>!!Y&&!Y(o[e],e),te=e=>!w&&!W&&X&&!ne&&!le(e),ae=e=>ee&&(!G||G(o[e],e)),re=(e,n)=>f?f(e,n):Q.itemName({noun:_,n:n+1}),oe=N([]),ie=N(null),[se,ce]=C(null),de=N(null),[ue,me]=C(null),[pe,he]=C("");O(()=>{const e=ie.current;if(!e)return;ie.current=null;const n=oe.current[e.index]?.querySelectorAll(z)[e.nth]??oe.current[e.index];if(n?.focus(),n&&null!==e.start&&"setSelectionRange"in n)try{n.setSelectionRange(e.start,e.end)}catch{}});const fe=(e,n)=>{if(n<0||n>=o.length||n===e)return;const l=oe.current[e],t=l?.ownerDocument.activeElement;if(l&&t&&l.contains(t)){const e=[...l.querySelectorAll(z)].indexOf(t),a=t;ie.current={index:n,nth:e,start:"number"==typeof a.selectionStart?a.selectionStart:null,end:"number"==typeof a.selectionEnd?a.selectionEnd:null}}i(T(o,e,n));const a=function(e,n,l){return null===e?null:e===n?l:n<e&&l>=e?e-1:n>e&&l<=e?e+1:e}($,e,n);a!==$&&E(a),he(Q.moved({n:n+1,total:o.length}))},be=e=>{ee&&(i(M(o,e,c())),K?(ie.current={index:e,nth:0,start:null,end:null},null!==$&&$>=e&&E($+1)):E(e))},ge=e=>{te(e)&&(i(H(o,e)),$===e?E(null):null!==$&&$>e&&E($-1))},ve=m({keyOf:e=>String(e),canDrop:(e,n)=>n.parentId===B.parentId&&n.slot===B.slot,onDrop:(e,n)=>{const l=p({...B,index:e},n);l!==e&&fe(e,l)},onStep:(e,n)=>fe(e,e+n),canStep:(e,n)=>e+n>=0&&e+n<o.length,readOnly:w}),ye=e=>{const n=[];return e>0&&n.push({label:Q.moveUp,icon:/* @__PURE__ */j(F,{size:14}),shortcut:"⌥↑",onClick:()=>fe(e,e-1)}),e<o.length-1&&n.push({label:Q.moveDown,icon:/* @__PURE__ */j(L,{size:14}),shortcut:"⌥↓",onClick:()=>fe(e,e+1)}),ae(e)&&n.push({label:Q.duplicate,icon:/* @__PURE__ */j(P,{size:14}),onClick:()=>(e=>{ae(e)&&(i(M(o,e+1,R(o[e]))),null!==$&&$>e&&E($+1))})(e)}),te(e)&&n.push({label:Q.delete,icon:/* @__PURE__ */j(A,{size:14}),danger:!0,onClick:()=>ge(e)}),n},ke=(e,n,l,t)=>{w||0===ye(e).length||me({index:e,x:n,y:l,owner:t})},xe=e=>n=>{const l=o.slice();l[e]=n,i(l)};/* @__PURE__ */
2
2
  return S("div",{className:"es-list",children:[q?/* @__PURE__ */S("div",{className:"es-list-head",children:[
3
- /* @__PURE__ */S("span",{className:"es-list-label",children:[l?/* @__PURE__ */j("span",{className:"es-field-icon","aria-hidden":"true",children:l}):null,n]}),
4
- /* @__PURE__ */j("span",{className:"es-list-count",children:o.length})]}):null,Z?/* @__PURE__ */j("div",{className:"es-list-above",children:Z}):null,o.length?/* @__PURE__ */S(g,{"aria-label":n,spacing:"comfortable",className:"es-list-rows",rootProps:ve.rootProps(),children:[o.map((n,l)=>{const t=ve.row({item:l,place:{...B,index:l}}),a=t.draggable&&se!==l,r=!K&&$===l,o=!w&&!W&&X&&le(l),i=["es-list-row",K?"is-inline":"is-item",r?"is-open":"",a?"is-draggable":"",t.dragging?"is-dragging":"",t.drop?`is-drop-${t.drop}`:""].filter(Boolean).join(" ");return[l>0?/* @__PURE__ */j(e,{...ve.seam({place:{...B,index:l}}),onAdd:ee?()=>be(l):void 0,label:Q.addHere({noun:_})},`seam-${l}`):null,
3
+ /* @__PURE__ */S("span",{className:"es-list-label",children:[t?/* @__PURE__ */j("span",{className:"es-field-icon","aria-hidden":"true",children:t}):null,l]}),
4
+ /* @__PURE__ */j("span",{className:"es-list-count",children:o.length})]}):null,Z?/* @__PURE__ */j("div",{className:"es-list-above",children:Z}):null,o.length?/* @__PURE__ */S(g,{"aria-label":l,spacing:"comfortable",className:"es-list-rows",rootProps:ve.rootProps(),children:[o.map((n,l)=>{const t=ve.row({item:l,place:{...B,index:l}}),a=t.draggable&&se!==l,r=!K&&$===l,o=!w&&!W&&X&&le(l),i=["es-list-row",K?"is-inline":"is-item",r?"is-open":"",a?"is-draggable":"",t.dragging?"is-dragging":"",t.drop?`is-drop-${t.drop}`:""].filter(Boolean).join(" ");return[l>0?/* @__PURE__ */j(e,{...ve.seam({place:{...B,index:l}}),onAdd:ee?()=>be(l):void 0,label:Q.addHere({noun:_})},`seam-${l}`):null,
5
5
  /* @__PURE__ */j(v,{className:i,flat:!!K,active:r,draggable:t.draggable,dragHint:U.dragHint,dragging:t.dragging,drop:"before"===t.drop||"after"===t.drop?t.drop:void 0,onMove:t.draggable?e=>fe(l,"up"===e?l-1:l+1):void 0,rowRef:e=>{oe.current[l]=e},rowProps:{...t.rowProps,draggable:a||void 0,onPointerDown:e=>{const n=e.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'),a=!!n&&n===n.ownerDocument.activeElement;e.currentTarget.draggable=t.draggable&&!a,de.current=n&&!a?n:null,ce(a?l:null)},onDragStart:e=>{const n=de.current;de.current=null,n&&n.ownerDocument.activeElement===n&&n.blur(),t.rowProps.onDragStart?.(e)},onContextMenu:e=>{w||(e.preventDefault(),e.stopPropagation(),ke(l,e.clientX,e.clientY,e.currentTarget))},onKeyDown:e=>{if("ContextMenu"===e.key||e.shiftKey&&"F10"===e.key){e.preventDefault();const n=e.currentTarget.ownerDocument,t=e=>e.preventDefault();n.addEventListener("contextmenu",t,{capture:!0,once:!0}),n.defaultView?.setTimeout(()=>n.removeEventListener("contextmenu",t,{capture:!0}),500);const a=e.currentTarget.getBoundingClientRect();return void ke(l,a.left+24,a.bottom,e.currentTarget)}t.rowProps.onKeyDown?.(e)}},actions:w||W||!X?void 0:o?h(V?V(n,l):Q.locked,/* @__PURE__ */j("span",{className:"es-list-lock",role:"img","aria-label":V?V(n,l):Q.locked,children:/* @__PURE__ */j(I,{size:13})})):h(Q.deleteItem({noun:_}),/* @__PURE__ */j("button",{type:"button",className:"es-list-x","aria-label":Q.deleteItem({noun:_}),disabled:!te(l),onClick:()=>ge(l),children:"×"})),below:r?/* @__PURE__ */j("div",{className:"es-list-item",children:J(n,l,xe(l))}):void 0,children:K?/* @__PURE__ */j("div",{className:"es-list-row-main",children:K(n,l,xe(l))}):/* @__PURE__ */S("button",{type:"button",className:"es-list-open","aria-expanded":r,onClick:()=>E(r?null:l),children:[b?/* @__PURE__ */j("span",{className:"es-list-thumb","aria-hidden":"true",children:b(n,l)}):null,
6
- /* @__PURE__ */j("span",{className:"es-list-row-name",children:re(n,l)}),/* @__PURE__ */j("span",c?{className:"es-list-row-summary",children:c(n,l)}:{className:"es-list-row-summary"}),
6
+ /* @__PURE__ */j("span",{className:"es-list-row-name",children:re(n,l)}),/* @__PURE__ */j("span",d?{className:"es-list-row-summary",children:d(n,l)}:{className:"es-list-row-summary"}),
7
7
  /* @__PURE__ */j(D,{size:14,className:"es-list-chev","aria-hidden":"true"})]})},l)]}),
8
8
  /* @__PURE__ */j(e,{...ve.seam({place:{...B,index:o.length}})})]}):null,w||W?null:/* @__PURE__ */j("button",{type:"button",className:"es-list-add",disabled:!ee,onClick:()=>be(o.length),children:Q.add({noun:_})}),
9
9
  /* @__PURE__ */j("span",{className:"es-list-said","aria-live":"polite",children:pe}),ue&&ue.index<o.length?
10
- /* @__PURE__ */j(y,{at:{x:ue.x,y:ue.y},owner:ue.owner,onClose:()=>me(null),children:/* @__PURE__ */j(r,{items:ye(ue.index),onClose:()=>me(null)})}):null]})}var K=e=>e<6?e+1:6,Y=(e,n)=>"string"==typeof e.label&&e.label?e.label:n;function V({field:e,name:n,id:t,value:a,onChange:r,readOnly:o,context:i,renderers:s,headingLevel:c=3}){const[d,u]=C(!0),m=a&&"object"==typeof a?a:{};/* @__PURE__ */
11
- return j(l,{id:`${t}-group`,title:Y(e,n),open:d,onToggle:u,level:c,children:Object.entries(e.objectFields).map(([e,l])=>/* @__PURE__ */j(X,{field:l,name:`${n}.${e}`,id:`${t}-${e}`,value:m[e],onChange:n=>r({...m,[e]:n}),readOnly:o,context:i,renderers:s,headingLevel:K(c)},e))})}function W({field:e,name:n,id:l,value:t,onChange:a,readOnly:r,context:o,renderers:i,openItem:s,onOpenItem:c,headingLevel:d}){const[u,m]=C(null),p=c?s??null:u,h=c??m,f=Array.isArray(t)?t:[],b=e.getItemSummary;/* @__PURE__ */
12
- return j(J,{label:Y(e,n),icon:e.icon,noun:"string"==typeof e.noun?e.noun:void 0,items:f,onChange:a,newItem:()=>R({...e.defaultItemProps??{}}),summary:b?(e,n)=>b(e,n):void 0,min:e.min,max:e.max,readOnly:r,open:p,onOpen:h,renderItem:(t,a,s)=>Object.entries(e.arrayFields).map(([e,c])=>/* @__PURE__ */j(X,{field:c,name:`${n}[${a}].${e}`,id:`${l}-${a}-${e}`,value:t?.[e],onChange:n=>s({...t,[e]:n}),readOnly:r,context:o,renderers:i,headingLevel:d},e))})}function X(e){const{field:n,name:l,id:t,value:a,onChange:r,readOnly:d,context:u,renderers:m}=e;if(!n||n.marker||!1===n.visible)return null;const p=m?.[n.type];if(p)return p({field:n,name:l,id:t,value:a,onChange:r,readOnly:d});switch(n.type){case"custom":{const e={...u,field:n,name:l,id:t,value:a,onChange:r,readOnly:d};return n.render(e)}case"text":case"textarea":/* @__PURE__ */
13
- return j(s,{label:Y(n,l),htmlFor:t,icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(E,{id:t,value:"string"==typeof a?a:null==a?"":String(a),onChange:r,placeholder:n.placeholder,multiline:"textarea"===n.type,readOnly:d})});case"number":/* @__PURE__ */
14
- return j(s,{label:Y(n,l),htmlFor:t,icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(o,{id:t,value:"number"==typeof a?a:void 0,onChange:r,min:n.min,max:n.max,step:n.step,placeholder:n.placeholder,readOnly:d})});case"select":{const e=`${t}-label`;/* @__PURE__ */
15
- return j(s,{label:Y(n,l),labelId:e,htmlFor:t,icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(i,{id:t,value:a,options:n.options,onChange:r,readOnly:d,ariaLabelledBy:e})})}case"radio":/* @__PURE__ */
16
- return j(s,{label:Y(n,l),icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(c,{ariaLabel:Y(n,l),value:a,options:n.options.map(e=>({id:e.value,label:e.label,icon:e.icon,disabled:e.disabled||d})),onChange:e=>{d||r(e)}})});case"object":/* @__PURE__ */
10
+ /* @__PURE__ */j(y,{at:{x:ue.x,y:ue.y},owner:ue.owner,onClose:()=>me(null),children:/* @__PURE__ */j(r,{items:ye(ue.index),onClose:()=>me(null)})}):null]})}var K=e=>e<6?e+1:6,Y=(e,n)=>"string"==typeof e.label&&e.label?e.label:n;function V({field:e,name:n,id:l,value:a,onChange:r,readOnly:o,context:i,renderers:s,headingLevel:c=3}){const[d,u]=C(!0),m=a&&"object"==typeof a?a:{};/* @__PURE__ */
11
+ return j(t,{id:`${l}-group`,title:Y(e,n),open:d,onToggle:u,level:c,children:Object.entries(e.objectFields).map(([e,t])=>/* @__PURE__ */j(X,{field:t,name:`${n}.${e}`,id:`${l}-${e}`,value:m[e],onChange:n=>r({...m,[e]:n}),readOnly:o,context:i,renderers:s,headingLevel:K(c)},e))})}function W({field:e,name:n,id:l,value:t,onChange:a,readOnly:r,context:o,renderers:i,openItem:s,onOpenItem:c,headingLevel:d}){const[u,m]=C(null),p=c?s??null:u,h=c??m,f=Array.isArray(t)?t:[],b=e.getItemSummary;/* @__PURE__ */
12
+ return j(J,{label:Y(e,n),icon:e.icon,noun:"string"==typeof e.noun?e.noun:void 0,items:f,onChange:a,newItem:()=>R({...e.defaultItemProps??{}}),summary:b?(e,n)=>b(e,n):void 0,min:e.min,max:e.max,readOnly:r,open:p,onOpen:h,renderItem:(t,a,s)=>Object.entries(e.arrayFields).map(([e,c])=>/* @__PURE__ */j(X,{field:c,name:`${n}[${a}].${e}`,id:`${l}-${a}-${e}`,value:t?.[e],onChange:n=>s({...t,[e]:n}),readOnly:r,context:o,renderers:i,headingLevel:d},e))})}function X(e){const{field:n,name:l,id:t,value:a,onChange:r,readOnly:s,context:u,renderers:m}=e;if(!n||n.marker||!1===n.visible)return null;const p=m?.[n.type];if(p)return p({field:n,name:l,id:t,value:a,onChange:r,readOnly:s});switch(n.type){case"custom":{const e={...u,field:n,name:l,id:t,value:a,onChange:r,readOnly:s};return n.render(e)}case"text":case"textarea":/* @__PURE__ */
13
+ return j(c,{label:Y(n,l),htmlFor:t,icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(E,{id:t,value:"string"==typeof a?a:null==a?"":String(a),onChange:r,placeholder:n.placeholder,multiline:"textarea"===n.type,readOnly:s})});case"number":/* @__PURE__ */
14
+ return j(c,{label:Y(n,l),htmlFor:t,icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(o,{id:t,value:"number"==typeof a?a:void 0,onChange:r,min:n.min,max:n.max,step:n.step,placeholder:n.placeholder,readOnly:s})});case"select":{const e=`${t}-label`;/* @__PURE__ */
15
+ return j(c,{label:Y(n,l),labelId:e,htmlFor:t,icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(i,{id:t,value:a,options:n.options,onChange:r,readOnly:s,ariaLabelledBy:e})})}case"radio":/* @__PURE__ */
16
+ return j(c,{label:Y(n,l),icon:n.icon,hint:n.hint,children:/* @__PURE__ */j(d,{ariaLabel:Y(n,l),value:a,options:n.options.map(e=>({id:e.value,label:e.label,icon:e.icon,disabled:e.disabled||s})),onChange:e=>{s||r(e)}})});case"object":/* @__PURE__ */
17
17
  return j(V,{...e,field:n});case"array":/* @__PURE__ */
18
- return j(W,{...e,field:n});case"slot":return null}}var G=e=>n.includes(e);function Z(e){let l,t=n[0];const a=[],r=/* @__PURE__ */new Set;for(const[n,o]of Object.entries(e))o&&(G(o.bucket)&&((o.marker||o.bucket!==t)&&(l=void 0),t=o.bucket),o.marker&&"string"==typeof o.fold?l={key:n,title:o.fold}:o.marker&&!1===o.fold&&(l=void 0),o.marker||!1===o.visible||(a.push(l?{name:n,field:o,bucket:t,fold:l}:{name:n,field:o,bucket:t}),"slot"!==o.type&&r.add(t)));return{rows:a,buckets:n.filter(e=>r.has(e))}}function q(e){return new Map(Z(e).rows.map(e=>[e.name,e.bucket]))}function Q(e){const n=[];for(const l of e){const e=n[n.length-1];e&&e.fold?.key===l.fold?.key?e.rows.push(l):n.push({fold:l.fold,rows:[l]})}return n}function U({fields:e,values:n,onChange:t,readOnly:r=!1,context:o,tab:i,onTab:s,tabs:c=!0,tabIcons:d,renderers:m,idPrefix:p,ariaLabel:h,lead:f,children:b,leadFold:g,closedFolds:v,onFold:y,headingLevel:N=3}){const O=u("panel",a),D=$(),I=p??`es-insp${D.replace(/:/g,"")}`,F=Z(e),[L,P]=C(void 0),A=i??L,E=A&&F.buckets.includes(A)?A:F.buckets[0],[M,T]=C(null),H=M&&M.panel===I&&F.rows.some(e=>e.name===M.name)?M:null,R=c&&F.buckets.length>1,z=R&&E?k(I,E):`${I}-rows`,[B,J]=C(()=>/* @__PURE__ */new Set),Y=v??B,V=(e,n)=>{/* @__PURE__ */return j(l,{title:e.title,open:!Y.has(e.key),onToggle:n=>((e,n)=>{void 0===v&&J(l=>{const t=new Set(l);return n?t.delete(e):t.add(e),t}),y?.(e,n)})(e.key,n),id:`${I}-fold-${t=e.key,[...t].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("")}`,level:N,children:n});var t},W=e=>R&&e!==E,G=({name:e,field:l,bucket:a,fold:i})=>/* @__PURE__ */j("div",{className:"es-insp-row","data-field":e,"data-bucket":a,hidden:!!W(a)||void 0,children:/* @__PURE__ */j(X,{field:l,name:e,id:`${I}-${e}`,value:n[e],onChange:n=>t(e,n),readOnly:r,context:o,renderers:m,openItem:H&&H.name===e?H.index:null,onOpenItem:n=>T(null===n?null:{panel:I,name:e,index:n}),headingLevel:i?K(N):N})},e);/* @__PURE__ */
18
+ return j(W,{...e,field:n});case"slot":return null}}var G=e=>l.includes(e);function Z(e){let n,t=l[0];const a=[],r=/* @__PURE__ */new Set;for(const[l,o]of Object.entries(e))o&&(G(o.bucket)&&((o.marker||o.bucket!==t)&&(n=void 0),t=o.bucket),o.marker&&"string"==typeof o.fold?n={key:l,title:o.fold}:o.marker&&!1===o.fold&&(n=void 0),o.marker||!1===o.visible||(a.push(n?{name:l,field:o,bucket:t,fold:n}:{name:l,field:o,bucket:t}),"slot"!==o.type&&r.add(t)));return{rows:a,buckets:l.filter(e=>r.has(e))}}function q(e){return new Map(Z(e).rows.map(e=>[e.name,e.bucket]))}function Q(e){const n=[];for(const l of e){const e=n[n.length-1];e&&e.fold?.key===l.fold?.key?e.rows.push(l):n.push({fold:l.fold,rows:[l]})}return n}function U({fields:e,values:n,onChange:l,readOnly:r=!1,context:o,tab:i,onTab:s,tabs:c=!0,tabIcons:d,renderers:m,idPrefix:p,ariaLabel:h,lead:f,children:b,leadFold:g,closedFolds:v,onFold:y,headingLevel:N=3}){const O=u("panel",a),D=$(),I=p??`es-insp${D.replace(/:/g,"")}`,F=Z(e),[L,P]=C(void 0),A=i??L,E=A&&F.buckets.includes(A)?A:F.buckets[0],[M,T]=C(null),H=M&&M.panel===I&&F.rows.some(e=>e.name===M.name)?M:null,R=c&&F.buckets.length>1,z=R&&E?k(I,E):`${I}-rows`,[B,J]=C(()=>/* @__PURE__ */new Set),Y=v??B,V=(e,n)=>{/* @__PURE__ */return j(t,{title:e.title,open:!Y.has(e.key),onToggle:n=>((e,n)=>{void 0===v&&J(l=>{const t=new Set(l);return n?t.delete(e):t.add(e),t}),y?.(e,n)})(e.key,n),id:`${I}-fold-${l=e.key,[...l].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("")}`,level:N,children:n});var l},W=e=>R&&e!==E,G=({name:e,field:t,bucket:a,fold:i})=>/* @__PURE__ */j("div",{className:"es-insp-row","data-field":e,"data-bucket":a,hidden:!!W(a)||void 0,children:/* @__PURE__ */j(X,{field:t,name:e,id:`${I}-${e}`,value:n[e],onChange:n=>l(e,n),readOnly:r,context:o,renderers:m,openItem:H&&H.name===e?H.index:null,onOpenItem:n=>T(null===n?null:{panel:I,name:e,index:n}),headingLevel:i?K(N):N})},e);/* @__PURE__ */
19
19
  return S("div",{className:"es-insp",children:[R?/* @__PURE__ */j("div",{className:"es-insp-tabs",children:/* @__PURE__ */j(x,{variant:"underline",block:!0,"aria-label":h??O.settings,idPrefix:I,value:E,onChange:e=>{const n=e;void 0===i&&P(n),s?.(n)},items:F.buckets.map(e=>{const n=O.buckets[e],l=d?.[e];return l?{id:e,icon:l,label:/* @__PURE__ */j("span",{className:"sr-only",children:n}),tooltip:n}:{id:e,label:n}})})}):null,
20
20
  /* @__PURE__ */S("div",{className:"es-insp-rows",id:z,role:R?"tabpanel":void 0,"aria-labelledby":R&&E?w(I,E):void 0,children:[f?g?/* @__PURE__ */j("div",{className:"es-insp-band","data-fold":g.key,children:V(g,f)}):f:null,Q(F.rows).map((e,n)=>{if(!e.fold)return e.rows.map(G);const l=e.rows[0].bucket,t=e.rows.every(e=>"slot"===e.field.type);/* @__PURE__ */
21
21
  return j("div",{className:"es-insp-band","data-fold":e.fold.key,"data-bucket":l,hidden:!(!W(l)&&!t)||void 0,children:V(e.fold,e.rows.map(G))},`fold-${e.fold.key}-${n}`)}),b]})]})}export{E as FieldText,U as Inspector,X as InspectorField,J as ListField,q as bucketsOf,R as copyItem,M as insertAt,Y as labelOf,T as moveTo,Z as planFields,H as removeAt};
@@ -1 +1 @@
1
- import{useSectionOps as o}from"./chunk-GJC6SNQC.js";import{decodePartId as e,encodePartId as r}from"./chunk-IYT6NN2J.js";import{usePreviewParts as t}from"./chunk-I54UCYOU.js";import{SELECTION_MODE as n}from"./chunk-77DQCEEF.js";import{useEasel as p}from"./chunk-PE6ZY5IW.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:I}){const{getSelectorForId:a}=p(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=t(),l=d(o=>{const r=e(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),I?.(t)):i(o=>"part"===o.kind?n:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?r(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>n);const e=a(o);e&&u.select(e)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
1
+ import{useSectionOps as o}from"./chunk-PQMCHTVE.js";import{decodePartId as e,encodePartId as r}from"./chunk-IYT6NN2J.js";import{usePreviewParts as t}from"./chunk-I54UCYOU.js";import{SELECTION_MODE as n}from"./chunk-OHRS7Q3E.js";import{useEasel as p}from"./chunk-I55LUW3C.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:I}){const{getSelectorForId:a}=p(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=t(),l=d(o=>{const r=e(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),I?.(t)):i(o=>"part"===o.kind?n:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?r(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>n);const e=a(o);e&&u.select(e)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
@@ -1,7 +1,7 @@
1
- import{clientOnly as r}from"./chunk-GXQCZJOP.js";import{ScreenStoreProvider as n}from"./chunk-JTOZJXD7.js";import{ScreenChrome as e}from"./chunk-7LP3OD2E.js";import{ScreenDocumentProvider as i,useScreenDocument as a}from"./chunk-GCCBEY2W.js";import{DEFAULT_SCREEN_WORDS as o}from"./chunk-VWXUMVCD.js";import{documentPermissions as s}from"./chunk-THWO5YVZ.js";import{useWords as c}from"./chunk-MFIRYGHW.js";import{useMemo as t,useState as d,useRef as l,useEffect as m,useCallback as g}from"react";import{Dialog as h,Button as f}from"efficient-shell/ui";import{jsx as u,jsxs as p,Fragment as v}from"react/jsx-runtime";var C=r(n),k=r(e);function j({onCancel:r,onDiscard:n,onSave:e}){const i=c("screen",o).leave,[a,s]=d(!1),t=l(!0);m(()=>(t.current=!0,()=>{t.current=!1}),[]);const C=g(async()=>{s(!0);try{await e()}finally{t.current&&s(!1)}},[e]);/* @__PURE__ */
1
+ import{clientOnly as r}from"./chunk-GXQCZJOP.js";import{ScreenStoreProvider as n}from"./chunk-UB5JFMRN.js";import{ScreenChrome as e}from"./chunk-2PTAR4TA.js";import{ScreenDocumentProvider as i,useScreenDocument as a}from"./chunk-GCCBEY2W.js";import{DEFAULT_SCREEN_WORDS as o}from"./chunk-VWXUMVCD.js";import{documentPermissions as s}from"./chunk-THWO5YVZ.js";import{useWords as c}from"./chunk-MFIRYGHW.js";import{useMemo as t,useState as d,useRef as l,useEffect as m,useCallback as g}from"react";import{Dialog as h,Button as f}from"efficient-shell/ui";import{jsx as u,jsxs as p,Fragment as v}from"react/jsx-runtime";var C=r(n),k=r(e);function N({onCancel:r,onDiscard:n,onSave:e}){const i=c("screen",o).leave,[a,s]=d(!1),t=l(!0);m(()=>(t.current=!0,()=>{t.current=!1}),[]);const C=g(async()=>{s(!0);try{await e()}finally{t.current&&s(!1)}},[e]);/* @__PURE__ */
2
2
  return u(h,{open:!0,role:"alertdialog",size:"sm",title:i.title,onClose:r,footer:/* @__PURE__ */p(v,{children:[
3
3
  /* @__PURE__ */u(f,{variant:"secondary",onClick:r,children:i.cancel}),
4
4
  /* @__PURE__ */u(f,{variant:"ghost-danger",onClick:n,children:i.discard}),
5
- /* @__PURE__ */u(f,{variant:"primary",loading:a,onClick:()=>{C()},children:i.save})]}),children:i.body})}function y({target:r,addressing:n,onHostMessage:e,children:a}){/* @__PURE__ */
6
- return u(i,{target:r,addressing:n,onHostMessage:e,children:a})}var N=(r,n)=>/* @__PURE__ */p(v,{children:[r,n]});function D({config:r,parts:n,wrap:e=N}){const{data:i,error:d,redirecting:l,ready:m,readOnly:g,onChange:h,pendingNav:f,cancelPendingNav:p,discardAndNavigate:v,saveAndNavigate:y}=a(),D=t(()=>s(!g),[g]),O=c("screen",o);return l?/* @__PURE__ */u("div",{className:"sf-msg",children:O.loading}):d?/* @__PURE__ */u("div",{className:"sf-msg sf-msg--error",children:d}):m?i?e(
7
- /* @__PURE__ */u(C,{config:r,data:i,onChange:h,permissions:D,parts:n,children:/* @__PURE__ */u(k,{})}),f&&/* @__PURE__ */u(j,{onCancel:p,onDiscard:v,onSave:y})):/* @__PURE__ */u("div",{className:"sf-msg",children:O.loading}):/* @__PURE__ */u("div",{className:"sf-msg",children:O.waitingForAuthorization})}export{D as DocumentScreen,y as ScreenMount};
5
+ /* @__PURE__ */u(f,{variant:"primary",loading:a,onClick:()=>{C()},children:i.save})]}),children:i.body})}function j({target:r,addressing:n,onHostMessage:e,children:a}){/* @__PURE__ */
6
+ return u(i,{target:r,addressing:n,onHostMessage:e,children:a})}var y=(r,n)=>/* @__PURE__ */p(v,{children:[r,n]});function A({config:r,parts:n,wrap:e=y}){const{data:i,error:d,redirecting:l,ready:m,readOnly:g,onChange:h,pendingNav:f,cancelPendingNav:p,discardAndNavigate:v,saveAndNavigate:j}=a(),A=t(()=>s(!g),[g]),M=c("screen",o);return l?/* @__PURE__ */u("div",{className:"sf-msg",children:M.loading}):d?/* @__PURE__ */u("div",{className:"sf-msg sf-msg--error",children:d}):m?i?e(
7
+ /* @__PURE__ */u(C,{config:r,data:i,onChange:h,permissions:A,parts:n,children:/* @__PURE__ */u(k,{})}),f&&/* @__PURE__ */u(N,{onCancel:p,onDiscard:v,onSave:j})):/* @__PURE__ */u("div",{className:"sf-msg",children:M.loading}):/* @__PURE__ */u("div",{className:"sf-msg",children:M.waitingForAuthorization})}export{A as DocumentScreen,j as ScreenMount};
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { b as CopyBoxProps, c as CopyCell, T as TextBoxHandle } from '../canvas-typing-CJodefPO.js';
3
- export { d as COPY_CELLS, a as CanvasTypingEnd, e as CanvasTypingOptions, f as CanvasTypingSession, g as ColorWindow, h as CopyBoxAlign, i as CopyBoxFooter, C as CopyBoxLastTool, j as CopyCase, k as CopyCellPreset, l as CopyCells, m as CopyThemeColor, M as MarkBar, n as MarkBarProps, o as MarkWriter, S as SelectionSource, p as TextAreaHandle, q as TextMap, r as ToolbarMark, s as ariaShortcut, t as insertSelection, u as markSelection, v as startCanvasTyping, w as textMap } from '../canvas-typing-CJodefPO.js';
2
+ import { c as CopyBoxProps, d as CopyCell, T as TextBoxHandle } from '../canvas-typing-DvoqQINU.js';
3
+ export { e as COPY_CELLS, b as CanvasTypingEnd, f as CanvasTypingOptions, g as CanvasTypingSession, h as ColorWindow, i as CopyBoxAlign, j as CopyBoxFooter, C as CopyBoxLastTool, k as CopyCase, l as CopyCellPreset, m as CopyCells, a as CopyThemeColor, M as MarkBar, n as MarkBarProps, o as MarkWriter, S as SelectionSource, p as TextAreaHandle, q as TextMap, r as ToolbarMark, s as ariaShortcut, t as colorRunOf, u as insertSelection, v as markSelection, w as startCanvasTyping, x as textMap } from '../canvas-typing-DvoqQINU.js';
4
4
  export { TextToolbar, TextToolbarProps } from 'efficient-shell/ui';
5
5
  import { F as FieldOption } from '../types-Dkx1VAIQ.js';
6
6
  import { a as CopyAlign } from '../words-dsex49Jh.js';
@@ -1,25 +1,19 @@
1
- import{DEFAULT_COPY_WORDS as e}from"../chunk-Q6AM43CA.js";import{selectionToVisible as t,selectionToSource as n,richLayout as r,createHistory as l,markPress as o,pasteToMarkup as a,richInput as s,editVisible as i,MARKUP_CLIPBOARD_TYPE as c,markupOfRange as u}from"../chunk-TJ6NRHYF.js";export{MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-TJ6NRHYF.js";import{FieldNumber as d}from"../chunk-66LWADFP.js";import{FieldSelect as p}from"../chunk-65Z5FSAW.js";import{SettingsSegmented as h,SettingsSwitch as f,SettingsField as m}from"../chunk-XJCMEEBH.js";import"../chunk-FFYXVAAL.js";import{GoldTextInput as g}from"../chunk-2FZJWH24.js";import{RETIRED_MARKS as y,applyMark as v,markupTools as b,marksIn as w,STANDARD_MARKUP as k,findLink as S,markedAt as x,listIn as C,colorIn as E,spanFor as D,clearStyle as N,toggleMark as L,colorOver as T,setList as M,unlinkAt as O,removeLink as R,linkOver as z,writeLink as P}from"../chunk-546BBOPE.js";import{useWords as B}from"../chunk-MFIRYGHW.js";import{withTip as F}from"../chunk-P2VEMZH5.js";import{Tooltip as H,ColorSwatch as $,ColorPickerPanel as K,Button as j,IconButton as V,registerModalEscapeInterceptor as W,textToolbarRows as A,TextToolbar as U,LinkPicker as I}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as Y,useState as q,useLayoutEffect as J,useEffect as Z,useId as _}from"react";import{AlignJustifyIcon as X,AlignRightIcon as G,AlignCenterIcon as Q,AlignLeftIcon as ee,ParagraphSpacingIcon as te,LetterSpacingIcon as ne,LineSpacingIcon as re,TextSizeIcon as le,ClearMarksIcon as oe,StylesIcon as ae,TypeIcon as se,AlignmentIcon as ie,ListFormatIcon as ce,CaseIcon as ue,ItalicIcon as de,LinkIcon as pe,QuietIcon as he,EmphasisIcon as fe,StrikeIcon as me,BoldIcon as ge,NumberedListIcon as ye,ListIcon as ve,ListNoneIcon as be,CaseLowerIcon as we,CaseCapitalizedIcon as ke,CaseUpperIcon as Se,CaseNormalIcon as xe}from"efficient-shell/icons/efficient";import{jsx as Ce,jsxs as Ee,Fragment as De}from"react/jsx-runtime";var Ne=["left","center","right","justify"],Le=e.align,Te={left:/* @__PURE__ */Ce(ee,{}),center:/* @__PURE__ */Ce(Q,{}),right:/* @__PURE__ */Ce(G,{}),justify:/* @__PURE__ */Ce(X,{})},Me={three:{labelsPx:94.5,widestLabelPx:39.94},four:{labelsPx:140,widestLabelPx:44}};function Oe(e,t=Le){return Ne.filter(t=>e.includes(t)).map(e=>({id:e,label:t[e],icon:Te[e],title:t[e]}))}var Re=/[\u1100-\u11ff\u2e80-\u9fff\uac00-\ud7af\uf900-\ufaff\uff00-\uffef]/;function ze(e){if(e.every(e=>e.label===Le[e.id]))return e.length>3?Me.four:Me.three;const t=e.map(e=>[...e.label].reduce((e,t)=>e+(Re.test(t)?13:8),0));return{labelsPx:t.reduce((e,t)=>e+t,0),widestLabelPx:Math.max(0,...t)}}function Pe(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function Be(e,t,n,r=v){const{start:l,end:o}=Pe(e,n);return r(e,l,o,t)}function Fe(e,t,n){const{start:r,end:l}=Pe(e,n),o=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:o,selectionEnd:o}}function He(e,t,n,r){switch(t){case"bold":return e.createElement("strong");case"italic":return e.createElement("em");case"strike":return e.createElement("s");case"underline":return e.createElement("u");case"sup":return e.createElement("sup");case"sub":return e.createElement("sub");case"color":{const t=e.createElement("span");return t.className="es-rich-color",r&&(t.dataset.color=r,t.title=r.startsWith("#")?r.toUpperCase():r,t.style.color=r.startsWith("#")?r:`var(--es-color-${r}, inherit)`),t}case"link":{const t=e.createElement("a");return t.className="es-rich-link",n&&(t.title=n),t}default:{const n=e.createElement("span");return n.className="highlight"===t||"accent"===t?"es-rich-emphasis":`es-rich-${t}`,n}}}function $e(e,t,n,r){const l=e.layout.lines;if(n===t)return r>=e.lines.length?e.layout.text.length:l[r].vis;const o=e.lines.findIndex(e=>e===n||e.contains(n));if(-1===o)return 0;const a=t.ownerDocument.createRange();a.setStart(e.lines[o],0);try{a.setEnd(n,r)}catch{return l[o].vis}return l[o].vis+Math.min(a.toString().length,l[o].text.length)}function Ke(e,t){const n=e.layout.lines;let r=n.length-1;for(let e=0;e<n.length;e+=1)if(t<=n[e].vis+n[e].text.length){r=e;break}let l=Math.max(0,t-n[r].vis);const o=e.lines[r].ownerDocument.createTreeWalker(e.lines[r],4);let a=o.nextNode(),s=null;for(;a;){if(l<=a.data.length)return[a,l];l-=a.data.length,s=a,a=o.nextNode()}return s?[s,s.data.length]:[e.lines[r],0]}function je({value:e,rules:l,multiline:o,readOnly:d=!1,placeholder:p,ariaLabel:h,handle:f,onEdit:m,onSelect:g,onHistory:y,onFormat:v,pending:b,onCommit:w,onCancel:k}){const S=Y(null),x=Y(null),C=Y(null),E=Y(null),D=Y(null),N=Y(e),[L,T]=q(0),M=Y({value:e,rules:l,multiline:o,readOnly:d,pending:b,onEdit:m,onHistory:y,onFormat:v});M.current={value:e,rules:l,multiline:o,readOnly:d,pending:b,onEdit:m,onHistory:y,onFormat:v};const O=()=>{const e=S.current,t=x.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=$e(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?$e(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},R=(e,t)=>{const n=S.current,r=x.current;if(!n||!r)return;const[l,o]=Ke(r,e),[a,s]=Ke(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,o,a,s)};f.current={getSource(){const e=O(),t=x.current;if(!e||!t)return null;const[r,l]=n(t.layout,e[0],e[1]);return{start:r,end:l}},setSource(e,t,n){E.current={text:n,src:[e,t]},T(e=>e+1)},focus(){S.current?.focus()},rangeOf(e,n){const r=S.current,l=x.current;if(!r||!l)return null;const[o,a]=t(l.layout,e,n),[s,i]=Ke(l,o),[c,u]=Ke(l,a),d=r.ownerDocument.createRange();return d.setStart(s,i),d.setEnd(c,u),d}},J(()=>{const n=S.current;if(!n||D.current)return;const o=E.current?null:O();x.current=function(e,t){const n=e.ownerDocument;e.replaceChildren();const r=t.lines.map(t=>{const r=n.createElement("div");r.className=null!=t.number?"es-rich-line is-numbered":t.bullet?"es-rich-line is-bullet":"es-rich-line",null!=t.number&&(r.dataset.number=t.number);const l=[],o=()=>l.length?l[l.length-1].el:r;let a=null;for(const e of t.chars){let t=0;for(;t<l.length&&t<e.marks.length&&l[t].id===e.marks[t].id;)t+=1;(l.length>t||e.marks.length>t)&&(a=null),l.length=t;for(let r=t;r<e.marks.length;r+=1){const t=He(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color);o().appendChild(t),l.push({id:e.marks[r].id,el:t})}a||(a=n.createTextNode(""),o().appendChild(a)),a.data+=e.ch}return 0===t.chars.length&&r.appendChild(n.createElement("br")),e.appendChild(r),r});return{layout:t,lines:r}}(n,r(e,l)),C.current=e;const a=E.current;if(!a||a.text!==e)return void(o&&n.ownerDocument.activeElement===n&&R(o[0],Math.min(o[1],x.current.layout.text.length)));E.current=null;const s=x.current.layout,[i,c]=a.vis??t(s,a.src[0],a.src[1]);n.ownerDocument.activeElement!==n&&n.focus(),R(i,c)},[e,l,L]);const z=(e,t,r)=>{const l=x.current,[o,a]=n(l.layout,t[0],t[1]);E.current={text:e.text,vis:[e.caret,e.caret]},e.text!==M.current.value?M.current.onEdit(e.text,{start:o,end:a},r):T(e=>e+1)};Z(()=>{const e=S.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:o,pending:a}=M.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),o)return;const i=x.current,c=O();if(!i||!c)return;const u="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,d=u&&!u.collapsed?[$e(i,e,u.startContainer,u.startOffset),$e(i,e,u.endContainer,u.endOffset)]:null,p=s({value:n,rules:r,multiline:l,inputType:t.inputType,data:t.data??t.dataTransfer?.getData("text/plain")??"",html:t.dataTransfer?.getData("text/html"),doc:e.ownerDocument,sel:c,target:d,pending:a});p&&("history"!==p.kind?"format"!==p.kind?z(p.edit,p.range,p.kind):M.current.onFormat(p.style):M.current.onHistory(p.dir))},n=()=>{D.current||T(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),Z(()=>{const e=S.current;if(!e)return;const t=e.ownerDocument,n=()=>{const e=f.current?.getSource();e&&g(e)};return t.addEventListener("selectionchange",n),()=>t.removeEventListener("selectionchange",n)});const P=(t,n=!1)=>{const r=O();if(!r||r[0]===r[1])return;t.preventDefault();const o=x.current;t.clipboardData.setData("text/plain",o.layout.text.slice(r[0],r[1])),t.clipboardData.setData(c,u(e,l,r[0],r[1])),n&&!d&&z(i(e,l,r[0],r[1],{text:""}),r,"edit")};/* @__PURE__ */
2
- return Ee("div",{className:"es-rich-wrap",children:[p&&""===e?/* @__PURE__ */Ce("div",{className:"es-rich-placeholder","aria-hidden":"true",children:p}):null,
3
- /* @__PURE__ */Ce("div",{ref:S,className:`es-rich${o?" is-multiline":" is-single"}${d?" is-off":""}`,contentEditable:!d,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":o,"aria-label":h,"aria-readonly":d||void 0,"aria-placeholder":p,tabIndex:d?-1:0,spellCheck:!0,onFocus:()=>{N.current=e},onBlur:()=>{e!==N.current&&w?.(e),N.current=e},onKeyDown:t=>{if("Escape"===t.key)return t.preventDefault(),k?.(N.current),void(N.current=e);"Enter"!==t.key||o||(t.preventDefault(),e!==N.current&&w?.(e),N.current=e)},onCompositionStart:()=>{const e=O()??[0,0];D.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=D.current;if(D.current=null,!t)return;const{value:n,rules:r,pending:l}=M.current;e.data?z(i(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):T(e=>e+1)},onCopy:e=>P(e),onCut:e=>P(e,!0),onPaste:t=>{if(t.preventDefault(),d)return;const n=O();if(!n)return;const r=t.clipboardData.getData(c),s=r?o?r:r.replace(/\s*\r?\n\s*/g," "):a({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:t.currentTarget.ownerDocument,multiline:o,rules:l});z(i(e,l,n[0],n[1],{markup:s}),n,"edit")}})]})}var Ve={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */Ce(le,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */Ce(re,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */Ce(ne,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */Ce(te,{}),unit:"px",step:1,shiftStep:10,min:0}};function We(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Ae({cells:t,words:n,readOnly:r=!1}){const l=n??e.cells,o=_();/* @__PURE__ */
4
- return Ce("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */Ce("div",{className:"es-copy-cells",children:t.map(e=>{const t=e.scale??1,n=e.name??(e.nameKey?l[e.nameKey]:e.key),a=e.unit??"",s=e.step??1,i=`${o}-${e.key}`;/* @__PURE__ */
5
- return Ee("div",{className:"es-copy-cell",children:[
6
- /* @__PURE__ */Ce("label",{className:"es-field-label es-copy-cell-name",htmlFor:i,children:n}),
7
- /* @__PURE__ */Ce(d,{id:i,value:We(e.value,t),styleValue:We(e.styleValue,t),onChange:n=>e.onChange(void 0===n?void 0:Number((n/t).toFixed(6))),min:e.min,max:e.max,step:s,shiftStep:e.shiftStep,icon:e.icon,unit:a||void 0,steppers:"compact",readOnly:r,ariaLabel:n,title:l.tip({name:n,step:s,unit:a})})]},e.key)})})})}var Ue=e=>e.preventDefault();function Ie({colors:e,current:t,words:n,onPick:r}){const l=null===t?null:t.startsWith("#")?t.toLowerCase():e.find(e=>e.name===t)?.value.toLowerCase()??null;/* @__PURE__ */
8
- return Ee("div",{className:"es-copy-pop es-copy-colors",role:"dialog","aria-label":n.title,onMouseDown:e=>{"INPUT"!==e.target.tagName&&e.preventDefault()},children:[
9
- /* @__PURE__ */Ce("span",{className:"es-copy-pop-label",children:n.theme}),
10
- /* @__PURE__ */Ce("div",{className:"es-copy-theme",role:"group","aria-label":n.theme,children:e.map(e=>/* @__PURE__ */Ce(H,{content:`${e.label} · ${e.value.toUpperCase()}`,children:/* @__PURE__ */Ce($,{color:e.value,size:"sm",className:"es-copy-theme-swatch","data-color":e.name,"aria-label":e.label,selected:t===e.name,onMouseDown:Ue,onClick:()=>r(e.name)})},e.name))}),
11
- /* @__PURE__ */Ce("span",{className:"es-copy-pop-label",children:n.any}),
12
- /* @__PURE__ */Ce(K,{className:"es-copy-any",value:l??"",onChange:e=>{e!==t&&r(e)},label:n.title,dragWrites:"end"}),
13
- /* @__PURE__ */Ce("div",{className:"es-copy-pop-foot",children:/* @__PURE__ */Ce(j,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onMouseDown:Ue,onClick:()=>r(null),children:n.remove})})]})}var Ye=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n));var qe=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom});function Je(e){const t=e.ownerDocument,n=t.documentElement,r={left:0,top:0,right:n.clientWidth,bottom:n.clientHeight},l=t.defaultView?.getComputedStyle.bind(t.defaultView);for(let o=e.parentElement;o&&o!==n&&o!==t.body;o=o.parentElement){const e=l?.(o);if(!e||"visible"===e.overflowX&&"visible"===e.overflowY)continue;const t=o.getBoundingClientRect();if(0===t.width&&0===t.height)continue;const n=t.left+o.clientLeft,a=t.top+o.clientTop;r.left=Math.max(r.left,n),r.top=Math.max(r.top,a),r.right=Math.min(r.right,n+(o.clientWidth||t.width)),r.bottom=Math.min(r.bottom,a+(o.clientHeight||t.height))}return r}function Ze(e){const t=e.offsetParent??e.parentElement;if(!t)return{left:0,top:0};const n=t.getBoundingClientRect();return{left:n.left+t.clientLeft-t.scrollLeft,top:n.top+t.clientTop-t.scrollTop}}var _e=/* @__PURE__ */new Set([...y,"clear"]),Xe={bold:/* @__PURE__ */Ce(ge,{size:16}),italic:/* @__PURE__ */Ce(de,{size:16}),strike:/* @__PURE__ */Ce(me,{size:16}),highlight:/* @__PURE__ */Ce(fe,{size:16}),quiet:/* @__PURE__ */Ce(he,{size:16}),link:/* @__PURE__ */Ce(pe,{size:16}),clear:/* @__PURE__ */Ce(oe,{size:16})};function Ge(e){if(!e)return;const t=e.split("+"),n=t.pop().toUpperCase();return["Meta",...t.map(e=>e[0].toUpperCase()+e.slice(1)),n].join("+")}var Qe={bold:"is-bold",italic:"is-italic",strike:"is-strike"};function et({tools:t,onApply:n,disabled:r=!1,actions:l,align:o,glyphs:a,ariaLabel:s,pressed:i,open:c=null}){const u=B("copy",e),d=("string"==typeof t[0]?b(t).map(e=>({...e,...u.marks[e.style]})):t).filter(e=>!_e.has(e.style));return 0!==d.length||l||o?/* @__PURE__ */Ee("div",{className:"es-copy-bar",role:"group","aria-label":s??u.formatting,children:[d.map(e=>{const t=a?.[e.style]??Xe[e.style],l=c===e.style||Boolean(i?.[e.style]),o="link"===e.style&&Boolean(i);return F(e.title,/* @__PURE__ */Ce(V,{onMouseDown:e=>e.preventDefault(),onClick:()=>n(e.style),disabled:r,"aria-label":e.name??e.title,"aria-keyshortcuts":Ge(e.shortcut),"aria-pressed":o||!i&&!c?void 0:l,pressed:o?l:void 0,"aria-haspopup":o?"dialog":void 0,"aria-expanded":o?"link"===c:void 0,className:`es-copy-mark${t?" has-glyph":Qe[e.style]?` ${Qe[e.style]}`:""}${l?" is-active":""}`,children:t??e.label},e.style))}),l?/* @__PURE__ */Ee(De,{children:[
14
- /* @__PURE__ */Ce("span",{className:"es-copy-bar-split","aria-hidden":"true"}),l]}):null,o?/* @__PURE__ */Ce("span",{className:"es-copy-bar-end",children:o}):null]}):null}function tt({target:e,onChange:t}){const n=Y(null);return J(()=>{const t=n.current,r=e.current;t&&r&&r.value===t.text&&(n.current=null,r.focus(),r.setSelectionRange(t.start,t.end))}),r=>{const l=r(e.current);t(l.text),n.current={start:l.selectionStart,end:l.selectionEnd,text:l.text}}}var nt=["bold","italic","underline","strike","sup","sub"];function rt({value:t,onChange:n,onCommit:r,onCancel:s,multiline:i=!1,placeholder:c,ariaLabel:u,className:d,readOnly:p=!1,rules:m,tools:y=[],writeMark:H,actions:$,align:K,glyphs:V,barLabel:X,renderFooter:G,inputRef:Q,barShows:ee="always",richText:te=!0,defaultShowMarks:ne=!1,toolbar:re="final",colors:le,cells:ae,letterCase:se,lastTool:ie}){const ce="final"===re,ue=B("copy",e),de=Y(null),pe=Q??de,[he,fe]=q(!1),[me,ge]=q(null),ye=Y(l()).current,ve=Y(null);Z(()=>{const e=ve.current;e&&t===e.to?ve.current=null:e&&t===e.from||(ve.current=null,ye.reset())},[t,ye]);const be=e=>{ve.current={from:ve.current?.from??t,to:e},n(e)},we=e=>({text:t,start:e?.selectionStart??me?.start??t.length,end:e?.selectionEnd??me?.end??t.length}),[ke,Se]=q(ne),xe=te&&!(i&&ke),Ne=Y(null),Le=_(),[Te,Me]=q(null),[Re,Pe]=q(!1),He=()=>{if(!xe)return pe.current;const e=Ne.current?.getSource()??me;return e?{selectionStart:e.start,selectionEnd:e.end}:null},$e=tt({target:pe,onChange:be}),Ke=e=>(ge({start:e.selectionStart,end:e.selectionEnd}),e),Ve=(e,n)=>{if(!xe)return void $e(t=>(n&&ye.record(we(t),"edit",Date.now()),Ke(e(t))));const r=He(),l=Ke(e(r));n&&ye.record(we(r),"edit",Date.now()),Me(null),l.text!==t&&be(l.text),Ne.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},We=e=>Ve(e,!0),Ue=e=>Ve(t=>{const n=we(t),r=ye[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),Xe=Y(null);J(()=>{const e=Xe.current;e&&(Xe.current=null,xe?Ne.current?.setSource(e.start,e.end,t):(pe.current?.focus(),pe.current?.setSelectionRange(e.start,e.end),ge(e)))},[xe]);const[Ge,Qe]=q(null),rt=m??k,lt=("string"==typeof y[0]?b(y):y).filter(e=>!_e.has(e.style)),ot=ce?("string"==typeof y[0]?y:y.map(e=>e.style)).filter(e=>!_e.has(e)):lt.map(e=>e.style),at={};if(me&&(xe||ce)){const e=w(t,me.start,me.end,rt);for(const t of ot){const n=e.has(t)||"highlight"===t&&e.has("accent");at[t]=!!Te?.add.includes(t)||!Te?.drop.includes(t)&&n}ce&&(at.link=e.has("link"))}else if(me)for(const e of ot)at[e]="link"===e?null!==S(t,me.start,me.end):x(t,me.start,me.end,e);const st=()=>{const e=He(),n=e?.selectionStart??t.length;return{start:n,end:e?.selectionEnd??n}},it=e=>{if(ce&&"link"!==e&&D(0,e)){const{start:n,end:r}=st();if(n===r&&!xe)return void We(n=>Be(t,e,n,(e,t,n,r)=>v(e,t,n,r,rt,ue.placeholders)));const l=o({value:t,rules:rt,start:n,end:r,style:e,pending:Te});return void("pending"===l.kind?Me(l.pending):We(()=>l.result))}if("clear"===e)return void We(n=>Be(t,e,n,(e,t,n)=>v(e,t,n,"clear",rt)));if("link"!==e&&xe&&D(0,e)){const n=He(),r=n?.selectionStart??t.length,l=n?.selectionEnd??r;if(r===l){const n=w(t,r,l,rt),o=n.has(e)||"highlight"===e&&n.has("accent"),a=Te&&Te.at===r?Te:null,s=!!a?.add.includes(e)||!a?.drop.includes(e)&&o,i=(a?.add??[]).filter(t=>t!==e),c=(a?.drop??[]).filter(t=>t!==e);return s&&o?c.push(e):s||o||i.push(e),void Me(i.length||c.length?{add:i,drop:c,at:r}:null)}return void We(n=>L(t,n?.selectionStart??r,n?.selectionEnd??l,e,rt))}if("link"!==e){const n=H??((e,t,n,r)=>v(e,t,n,r,k,ue.placeholders));return void We(r=>Be(t,e,r,n))}const n=He(),r=n?.selectionStart??t.length,l=n?.selectionEnd??r;Pe(!1),Qe({start:r,end:l,link:S(t,r,l)})},ct=Boolean(me&&me.start!==me.end),ut=me?C(t,me.start,me.end,rt):null,dt=me?Te&&void 0!==Te.color&&Te.at===me.start?Te.color:E(t,me.start,me.end,rt):null,pt=dt?dt.startsWith("#")?dt:le?.find(e=>e.name===dt)?.value:void 0,ht=e=>{xe?e?Ne.current?.setSource(e.start,e.end,t):Ne.current?.focus():(pe.current?.focus(),e&&pe.current?.setSelectionRange(e.start,e.end))},ft=()=>{const e=Ge;Qe(null),ht(e?{start:e.start,end:e.end}:me)},mt=()=>{const e=yt.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));Pe(!1),t&&ht(me)},gt=Y(mt);gt.current=mt,Z(()=>{if(Re)return W(e=>{const t=yt.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(gt.current(),!0)},()=>yt.current?.querySelector(".es-copy-colors"))},[Re]);const yt=Y(null),vt=Re||null!==Ge;Z(()=>{const e=yt.current;if(!vt||!e)return;const t=e.ownerDocument,n=()=>{Pe(!1),Qe(null)},r=t=>{e.contains(t.target)||n()};let l;const o=r=>{const o=r.relatedTarget;o?e.contains(o)||n():(clearTimeout(l),l=setTimeout(()=>{const r=t.activeElement;t.hasFocus()&&r&&r!==t.body&&!e.contains(r)&&n()},0))};return t.addEventListener("pointerdown",r,!0),e.addEventListener("focusout",o),()=>{clearTimeout(l),t.removeEventListener("pointerdown",r,!0),e.removeEventListener("focusout",o)}},[vt]);const bt=Ge??(Re?me??{start:t.length,end:t.length}:null),wt=Y(()=>{});wt.current=()=>{const e=yt.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!bt)return;const n=xe?null:e.querySelector(".es-gold-layer"),r=xe?Ne.current?.rangeOf(bt.start,bt.end)??null:n?function(e,t,n){const r=e.ownerDocument,l=r.createTreeWalker(e,4),o=e=>{let t=e,n=null;for(let e=l.nextNode();e;e=l.nextNode()){if(t<=e.data.length)return[e,t];t-=e.data.length,n=e}return n?[n,n.data.length]:null},a=o(t);l.currentNode=e;const s=o(n);if(!a||!s)return null;const i=r.createRange();return i.setStart(a[0],a[1]),i.setEnd(s[0],s[1]),i}(n,bt.start,bt.end):null,l=r?.endContainer,o=l?1===l.nodeType?l:l.parentElement:null,a=r?function(e,t){const n=("function"==typeof e.getClientRects?[...e.getClientRects()]:[]).filter(e=>e.height>0);if(n.length>0){const t="function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():n[0];return t.height>0?qe(t):qe(n[0])}if(!t)return null;const r=t.getBoundingClientRect();return{left:r.left,top:r.top,right:r.left,bottom:r.bottom}}(r,o?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!a)return;const s=function({anchor:e,size:t,within:n,clip:r,parent:l,gap:o=8}){const a=Math.max(n.left,r.left),s=Math.min(n.right,r.right)-t.width,i=Ye(e.left,a,s),c=r.bottom-(e.bottom+o),u=e.top-o-r.top,d=t.height>c&&(t.height<=u||u>c),p=d?e.top-o-t.height:e.bottom+o,h=e.left+Math.min((e.right-e.left)/2,10),f=Ye(h-5-i,10,t.width-10-10);return{top:p-l.top,left:i-l.left,above:d,point:f}}({anchor:a,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:Je(e),parent:Ze(t)});t.style.top=`${s.top}px`,t.style.left=`${s.left}px`,t.style.setProperty("--es-pop-point",`${s.point}px`),t.dataset.side=s.above?"above":"below"},J(()=>{const e=yt.current;if(!vt||!e)return;const t=()=>wt.current();t();const n=e.ownerDocument.defaultView;n?.addEventListener("resize",t);const r=e.querySelector(".rosh-tb-wrap > .es-copy-pop"),l=n?.ResizeObserver,o=l&&r?new l(t):null;return o&&r&&o.observe(r),()=>{n?.removeEventListener("resize",t),o?.disconnect()}},[vt,Re,Ge,bt?.start,bt?.end,xe]);const kt=e=>Ge&&/* @__PURE__ */Ce(I,{className:e?"es-copy-link es-copy-pop":"es-copy-link",value:Ge.link?.href??"",onApply:e=>{const n=Ge;Qe(null),We(()=>xe?z(t,n.start,n.end,e,rt):P(t,n.start,n.end,e))},onRemove:Ge.link?()=>{const e=Ge.link,n=Ge;Qe(null),e&&We(()=>xe?O(t,n.start,n.end,rt):R(t,e))}:void 0,onCancel:ft}),St=K?Oe(K.allow,ue.align):[],xt="always"===ee||he||null!==Ge||Re,Ct=le&&le.length>0?{run:pt,open:Re,onToggle:()=>{Qe(null),Re?mt():Pe(!0)}}:void 0,Et=xt&&ce&&ie?ie({className:"rosh-tb-btn",disabled:p,selected:ct,keepCaret:e=>e.preventDefault(),insert:e=>We(n=>Fe(t,e,n))}):void 0,Dt=new Set(ot),Nt=K?{value:K.value,allow:K.allow,onChange:K.onChange,disabled:K.disabled}:void 0,Lt={pressed:ut,onList:e=>{const{start:n,end:r}=st(),l=C(t,n,r,rt);We(()=>M(t,n,r,l===e?null:e,rt))}},Tt=A({offered:Dt,color:Ct,last:Et,alignment:Nt,list:Lt,letterCase:se}),Mt=ce&&xt&&(nt.some(e=>Dt.has(e))||Boolean(Ct));/* @__PURE__ */
15
- return Ee("div",{ref:yt,className:"es-copy"+(d?` ${d}`:""),onFocus:()=>fe(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||fe(!1)},onKeyDown:e=>{const t=e.target===pe.current||Boolean(e.target.closest?.(".es-rich"));if(p||!t)return;if(e.altKey||e.metaKey===e.ctrlKey)return;const n=e.key.toLowerCase(),r="KeyZ"===e.code||"z"===n,l=("KeyY"===e.code||"y"===n)&&!e.shiftKey;if(r||l)return e.preventDefault(),e.stopPropagation(),void Ue(l||e.shiftKey?"redo":"undo");const o=`${e.shiftKey?"shift+":""}${n}`;if(ce){const t={b:"bold",i:"italic",u:"underline",k:"link"}[o];if(!t||!ot.includes(t))return;return e.preventDefault(),e.stopPropagation(),void it(t)}const a=lt.find(e=>e.shortcut===o);a&&(e.preventDefault(),e.stopPropagation(),it(a.style))},onPaste:e=>{const n=pe.current;if(p||!n||e.target!==n)return;e.preventDefault();const r=a({html:e.clipboardData.getData("text/html"),text:e.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:i,rules:rt});We(e=>Fe(t,r,e))},style:le&&le.length>0?Object.fromEntries(le.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const e=pe.current;e&&e.ownerDocument.activeElement===e&&ge({start:e.selectionStart??t.length,end:e.selectionEnd??t.length})},children:[xt&&ce&&(Tt.words||Tt.paragraph)?
16
- /* @__PURE__ */Ce(U,{className:"es-copy-toolbar","aria-label":X??ue.formatting,offered:Dt,pressed:at,onMark:e=>it(e),color:Ct,linkOpen:null!==Ge,last:Et,alignment:Nt,list:Lt,letterCase:se,disabled:p,windows:/* @__PURE__ */Ee(De,{children:[Re&&le&&le.length>0?/* @__PURE__ */Ce(Ie,{colors:le,current:dt,words:ue.colors??e.colors,onPick:e=>{const{start:n,end:r}=st();if(n!==r)We(()=>T(t,n,r,e,rt));else{if(!xe)return;Me({add:Te?.add??[],drop:Te?.drop??[],color:e,at:n})}}}):null,Ge?kt(!0):null]})}):null,ce&&ae&&ae.length>0?/* @__PURE__ */Ce(Ae,{cells:ae,words:ue.cells??e.cells,readOnly:p}):null,xt&&!ce?/* @__PURE__ */Ce(et,{tools:y,disabled:p,actions:$,glyphs:V,ariaLabel:X,pressed:at,open:Ge?"link":null,onApply:it,align:K?/* @__PURE__ */Ce(h,{options:St,value:K.value,onChange:K.onChange,ariaLabel:ue.alignment,disabled:p||K.disabled,fit:ze(St)}):null}):null,xe?/* @__PURE__ */Ce(je,{value:t,rules:rt,multiline:i,readOnly:p,placeholder:c,ariaLabel:u,handle:Ne,pending:Te??void 0,onEdit:(e,n,r)=>{ye.record({text:t,start:n.start,end:n.end},r,Date.now()),Me(null),be(e)},onSelect:e=>{ge(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Te||e.start===Te.at&&e.end===Te.at||Me(null)},onHistory:Ue,onFormat:e=>{ot.includes(e)&&it(e)},onCommit:r,onCancel:s}):/* @__PURE__ */Ce(g,{value:t,onInput:e=>{ye.record(we(null),"type",Date.now()),be(e)},onCommit:r,onCancel:s,multiline:i,placeholder:c,ariaLabel:u,rules:m,disabled:p,inputRef:pe,className:"es-copy-box"}),Ge&&!ce?kt(!1):null,G?G({focused:he,insert:e=>We(n=>Fe(t,e,n))}):null,te&&i||Mt?
17
- /* @__PURE__ */Ee("div",{className:"es-copy-marks",children:[te&&i?/* @__PURE__ */Ee(De,{children:[
18
- /* @__PURE__ */Ce(f,{checked:ke,onChange:()=>{const e=He();Xe.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:me,Me(null),Se(e=>!e)},ariaLabelledBy:Le,disabled:p}),
19
- /* @__PURE__ */Ce("span",{id:Le,className:"es-copy-marks-label",children:ue.showMarks??"Show marks"})]}):null,Mt?F(ct?void 0:ue.clearStyleEmpty??"Select words first",/* @__PURE__ */Ee(j,{variant:"secondary",size:"sm",className:"es-copy-clear",disabled:p||!ct,onMouseDown:e=>e.preventDefault(),onClick:()=>{const{start:e,end:n}=st();if(e===n)return;const r=N(t,e,n,rt);r.text!==t&&We(()=>r)},children:[
20
- /* @__PURE__ */Ce(oe,{size:16}),ue.clearStyle??e.clearStyle]})):null]}):null]})}var lt=["none","bullet","number"],ot=["none","upper","capitalize","lower"],at={none:/* @__PURE__ */Ce(be,{}),bullet:/* @__PURE__ */Ce(ve,{}),number:/* @__PURE__ */Ce(ye,{})},st={none:/* @__PURE__ */Ce(xe,{}),upper:/* @__PURE__ */Ce(Se,{}),capitalize:/* @__PURE__ */Ce(ke,{}),lower:/* @__PURE__ */Ce(we,{})};function it({label:e,icon:t,answers:n,names:r,glyphs:l,row:o,readOnly:a}){const s=o.value||o.styleValue||"";/* @__PURE__ */
21
- return Ce(m,{label:e,icon:t,children:/* @__PURE__ */Ce(h,{ariaLabel:e,value:s,disabled:a,onChange:e=>{a||o.onChange(function(e,t){return t===e.value||""===e.value&&t===e.styleValue?"":t}(o,e))},options:n.map(e=>({id:e,label:l[e],title:r[e]}))})})}function ct({kept:t,keptHint:n,readOnly:r=!1,style:l,font:o,italic:a,cells:s,align:i,list:c,letterCase:u}){const d=B("copy",e),h={...e.panel,...d.panel},f=d.clearStyle??e.clearStyle,g=l&&!r?[l.onClearChanges&&{label:f,onSelect:l.onClearChanges},l.onEditStyles&&{label:h.editStyles,onSelect:l.onEditStyles},l.onUpdateStyle&&{label:h.updateStyle,onSelect:l.onUpdateStyle}].filter(e=>!!e):[],y=!!a&&(a.value??a.styleValue??!1),v=a?/* @__PURE__ */Ce(H,{content:h.italic,children:/* @__PURE__ */Ce(V,{size:"sm",variant:"ghost","aria-label":h.italic,"aria-pressed":y,disabled:r,onClick:()=>{if(r)return;const e=!y;a.onChange(e===(a.styleValue??!1)?void 0:e)},children:/* @__PURE__ */Ce(de,{})})}):null;/* @__PURE__ */
22
- return Ee("div",{className:"es-tpp",children:[t?/* @__PURE__ */Ee("div",{className:"es-tpp-kept",children:[
23
- /* @__PURE__ */Ce(rt,{...t,readOnly:r||t.readOnly}),n?/* @__PURE__ */Ce("p",{className:"es-field-hint",children:n}):null]}):null,l?/* @__PURE__ */Ce(m,{label:h.style,icon:/* @__PURE__ */Ce(ae,{}),children:/* @__PURE__ */Ce(p,{ariaLabel:h.style,value:l.value,options:l.options,onChange:l.onChange,changed:l.changed,footer:g,readOnly:r})}):null,o?/* @__PURE__ */Ce(m,{label:h.font,icon:/* @__PURE__ */Ce(se,{}),children:/* @__PURE__ */Ee("div",{className:"es-tpp-font",children:[
24
- /* @__PURE__ */Ce("div",{className:"es-tpp-font-select",children:/* @__PURE__ */Ce(p,{ariaLabel:h.font,value:o.value||void 0,placeholder:o.styleValue,options:o.options,onChange:o.onChange,searchable:o.searchable,readOnly:r})}),v]})}):v?
25
- /* @__PURE__ */Ce(m,{label:h.italic,icon:/* @__PURE__ */Ce(se,{}),children:/* @__PURE__ */Ce("div",{className:"es-tpp-font",children:v})}):null,s?.length?/* @__PURE__ */Ce(Ae,{cells:s,words:d.cells,readOnly:r}):null,i?/* @__PURE__ */Ce(it,{label:d.alignment,icon:/* @__PURE__ */Ce(ie,{}),answers:Ne.filter(e=>!i.allow||i.allow.includes(e)),names:d.align,glyphs:Te,row:i,readOnly:r}):null,c?/* @__PURE__ */Ce(it,{label:h.list,icon:/* @__PURE__ */Ce(ce,{}),answers:lt,names:h.lists,glyphs:at,row:c,readOnly:r}):null,u?/* @__PURE__ */Ce(it,{label:h.capitalization,icon:/* @__PURE__ */Ce(ue,{}),answers:ot,names:h.cases,glyphs:st,row:u,readOnly:r}):null]})}export{Ne as COPY_ALIGNS,Me as COPY_ALIGN_FIT,Te as COPY_ALIGN_GLYPHS,Le as COPY_ALIGN_LABELS,Ve as COPY_CELLS,Ie as ColorWindow,rt as CopyBox,Ae as CopyCells,et as MarkBar,je as RichBox,ct as TextPartPanel,Ge as ariaShortcut,Oe as copyAlignOptions,Fe as insertSelection,Be as markSelection,tt as useCaretEdit};
1
+ import{selectionToVisible as e,selectionToSource as t,richLayout as n,createHistory as r,colorRunOf as l,textRange as a,selectionBox as o,placeWindow as s,offsetOrigin as i,visibleArea as c,ColorWindow as u,markPress as d,pasteToMarkup as p,richInput as h,editVisible as f,MARKUP_CLIPBOARD_TYPE as m,markupOfRange as g}from"../chunk-FGJSCWUN.js";export{ColorWindow,MARKUP_CLIPBOARD_TYPE,TYPING_BURST_MS,colorRunOf,createHistory,editVisible,markupOfRange,newLine,pasteToMarkup,richInput,richLayout,selectionToSource,selectionToVisible,setBullet,startCanvasTyping,textMap,toSource,toSourceStart,toVisible}from"../chunk-FGJSCWUN.js";import{DEFAULT_COPY_WORDS as y}from"../chunk-Q6AM43CA.js";import{FieldNumber as v}from"../chunk-66LWADFP.js";import{FieldSelect as b}from"../chunk-65Z5FSAW.js";import"../chunk-FFYXVAAL.js";import{SettingsSegmented as k,SettingsSwitch as S,SettingsField as x}from"../chunk-XJCMEEBH.js";import{GoldTextInput as w}from"../chunk-2FZJWH24.js";import{RETIRED_MARKS as E,applyMark as C,markupTools as D,marksIn as N,STANDARD_MARKUP as L,findLink as O,markedAt as T,listIn as z,colorIn as F,spanFor as P,clearStyle as M,toggleMark as R,colorOver as B,setList as K,unlinkAt as j,removeLink as $,linkOver as H,writeLink as V}from"../chunk-546BBOPE.js";import{useWords as A}from"../chunk-MFIRYGHW.js";import{withTip as W}from"../chunk-P2VEMZH5.js";import{IconButton as U,registerModalEscapeInterceptor as I,textToolbarRows as q,TextToolbar as Y,Button as G,LinkPicker as J,Tooltip as Z}from"efficient-shell/ui";export{TextToolbar}from"efficient-shell/ui";import{useRef as _,useState as X,useLayoutEffect as Q,useEffect as ee,useId as te}from"react";import{AlignJustifyIcon as ne,AlignRightIcon as re,AlignCenterIcon as le,AlignLeftIcon as ae,ParagraphSpacingIcon as oe,LetterSpacingIcon as se,LineSpacingIcon as ie,TextSizeIcon as ce,ClearMarksIcon as ue,StylesIcon as de,TypeIcon as pe,AlignmentIcon as he,ListFormatIcon as fe,CaseIcon as me,ItalicIcon as ge,LinkIcon as ye,QuietIcon as ve,EmphasisIcon as be,StrikeIcon as ke,BoldIcon as Se,NumberedListIcon as xe,ListIcon as we,ListNoneIcon as Ee,CaseLowerIcon as Ce,CaseCapitalizedIcon as De,CaseUpperIcon as Ne,CaseNormalIcon as Le}from"efficient-shell/icons/efficient";import{jsx as Oe,jsxs as Te,Fragment as ze}from"react/jsx-runtime";var Fe=["left","center","right","justify"],Pe=y.align,Me={left:/* @__PURE__ */Oe(ae,{}),center:/* @__PURE__ */Oe(le,{}),right:/* @__PURE__ */Oe(re,{}),justify:/* @__PURE__ */Oe(ne,{})},Re={three:{labelsPx:94.5,widestLabelPx:39.94},four:{labelsPx:140,widestLabelPx:44}};function Be(e,t=Pe){return Fe.filter(t=>e.includes(t)).map(e=>({id:e,label:t[e],icon:Me[e],title:t[e]}))}var Ke=/[\u1100-\u11ff\u2e80-\u9fff\uac00-\ud7af\uf900-\ufaff\uff00-\uffef]/;function je(e){if(e.every(e=>e.label===Pe[e.id]))return e.length>3?Re.four:Re.three;const t=e.map(e=>[...e.label].reduce((e,t)=>e+(Ke.test(t)?13:8),0));return{labelsPx:t.reduce((e,t)=>e+t,0),widestLabelPx:Math.max(0,...t)}}function $e(e,t){const n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}}function He(e,t,n,r=C){const{start:l,end:a}=$e(e,n);return r(e,l,a,t)}function Ve(e,t,n){const{start:r,end:l}=$e(e,n),a=r+t.length;return{text:e.slice(0,r)+t+e.slice(l),selectionStart:a,selectionEnd:a}}function Ae(e,t,n,r){switch(t){case"bold":return e.createElement("strong");case"italic":return e.createElement("em");case"strike":return e.createElement("s");case"underline":return e.createElement("u");case"sup":return e.createElement("sup");case"sub":return e.createElement("sub");case"color":{const t=e.createElement("span");return t.className="es-rich-color",r&&(t.dataset.color=r,t.title=r.startsWith("#")?r.toUpperCase():r,t.style.color=r.startsWith("#")?r:`var(--es-color-${r}, inherit)`),t}case"link":{const t=e.createElement("a");return t.className="es-rich-link",n&&(t.title=n),t}default:{const n=e.createElement("span");return n.className="highlight"===t||"accent"===t?"es-rich-emphasis":`es-rich-${t}`,n}}}function We(e,t,n,r){const l=e.layout.lines;if(n===t)return r>=e.lines.length?e.layout.text.length:l[r].vis;const a=e.lines.findIndex(e=>e===n||e.contains(n));if(-1===a)return 0;const o=t.ownerDocument.createRange();o.setStart(e.lines[a],0);try{o.setEnd(n,r)}catch{return l[a].vis}return l[a].vis+Math.min(o.toString().length,l[a].text.length)}function Ue(e,t){const n=e.layout.lines;let r=n.length-1;for(let e=0;e<n.length;e+=1)if(t<=n[e].vis+n[e].text.length){r=e;break}let l=Math.max(0,t-n[r].vis);const a=e.lines[r].ownerDocument.createTreeWalker(e.lines[r],4);let o=a.nextNode(),s=null;for(;o;){if(l<=o.data.length)return[o,l];l-=o.data.length,s=o,o=a.nextNode()}return s?[s,s.data.length]:[e.lines[r],0]}function Ie({value:r,rules:l,multiline:a,readOnly:o=!1,placeholder:s,ariaLabel:i,handle:c,onEdit:u,onSelect:d,onHistory:y,onFormat:v,pending:b,onCommit:k,onCancel:S}){const x=_(null),w=_(null),E=_(null),C=_(null),D=_(null),N=_(r),[L,O]=X(0),T=_({value:r,rules:l,multiline:a,readOnly:o,pending:b,onEdit:u,onHistory:y,onFormat:v});T.current={value:r,rules:l,multiline:a,readOnly:o,pending:b,onEdit:u,onHistory:y,onFormat:v};const z=()=>{const e=x.current,t=w.current,n=e?.ownerDocument.getSelection();if(!(e&&t&&n&&0!==n.rangeCount&&n.anchorNode&&e.contains(n.anchorNode)))return null;const r=We(t,e,n.anchorNode,n.anchorOffset),l=n.focusNode&&e.contains(n.focusNode)?We(t,e,n.focusNode,n.focusOffset):r;return r<=l?[r,l]:[l,r]},F=(e,t)=>{const n=x.current,r=w.current;if(!n||!r)return;const[l,a]=Ue(r,e),[o,s]=Ue(r,t);n.ownerDocument.getSelection()?.setBaseAndExtent(l,a,o,s)};c.current={getSource(){const e=z(),n=w.current;if(!e||!n)return null;const[r,l]=t(n.layout,e[0],e[1]);return{start:r,end:l}},setSource(e,t,n){C.current={text:n,src:[e,t]},O(e=>e+1)},focus(){x.current?.focus()},rangeOf(t,n){const r=x.current,l=w.current;if(!r||!l)return null;const[a,o]=e(l.layout,t,n),[s,i]=Ue(l,a),[c,u]=Ue(l,o),d=r.ownerDocument.createRange();return d.setStart(s,i),d.setEnd(c,u),d}},Q(()=>{const t=x.current;if(!t||D.current)return;const a=C.current?null:z();w.current=function(e,t){const n=e.ownerDocument;e.replaceChildren();const r=t.lines.map(t=>{const r=n.createElement("div");r.className=null!=t.number?"es-rich-line is-numbered":t.bullet?"es-rich-line is-bullet":"es-rich-line",null!=t.number&&(r.dataset.number=t.number);const l=[],a=()=>l.length?l[l.length-1].el:r;let o=null;for(const e of t.chars){let t=0;for(;t<l.length&&t<e.marks.length&&l[t].id===e.marks[t].id;)t+=1;(l.length>t||e.marks.length>t)&&(o=null),l.length=t;for(let r=t;r<e.marks.length;r+=1){const t=Ae(n,e.marks[r].kind,e.marks[r].href,e.marks[r].color);a().appendChild(t),l.push({id:e.marks[r].id,el:t})}o||(o=n.createTextNode(""),a().appendChild(o)),o.data+=e.ch}return 0===t.chars.length&&r.appendChild(n.createElement("br")),e.appendChild(r),r});return{layout:t,lines:r}}(t,n(r,l)),E.current=r;const o=C.current;if(!o||o.text!==r)return void(a&&t.ownerDocument.activeElement===t&&F(a[0],Math.min(a[1],w.current.layout.text.length)));C.current=null;const s=w.current.layout,[i,c]=o.vis??e(s,o.src[0],o.src[1]);t.ownerDocument.activeElement!==t&&t.focus(),F(i,c)},[r,l,L]);const P=(e,n,r)=>{const l=w.current,[a,o]=t(l.layout,n[0],n[1]);C.current={text:e.text,vis:[e.caret,e.caret]},e.text!==T.current.value?T.current.onEdit(e.text,{start:a,end:o},r):O(e=>e+1)};ee(()=>{const e=x.current;if(!e)return;const t=t=>{const{value:n,rules:r,multiline:l,readOnly:a,pending:o}=T.current;if("insertCompositionText"===t.inputType)return;if(t.preventDefault(),a)return;const s=w.current,i=z();if(!s||!i)return;const c="function"==typeof t.getTargetRanges?t.getTargetRanges()[0]:void 0,u=c&&!c.collapsed?[We(s,e,c.startContainer,c.startOffset),We(s,e,c.endContainer,c.endOffset)]:null,d=h({value:n,rules:r,multiline:l,inputType:t.inputType,data:t.data??t.dataTransfer?.getData("text/plain")??"",html:t.dataTransfer?.getData("text/html"),doc:e.ownerDocument,sel:i,target:u,pending:o});d&&("history"!==d.kind?"format"!==d.kind?P(d.edit,d.range,d.kind):T.current.onFormat(d.style):T.current.onHistory(d.dir))},n=()=>{D.current||O(e=>e+1)};return e.addEventListener("beforeinput",t),e.addEventListener("input",n),()=>{e.removeEventListener("beforeinput",t),e.removeEventListener("input",n)}},[]),ee(()=>{const e=x.current;if(!e)return;const t=e.ownerDocument,n=()=>{const e=c.current?.getSource();e&&d(e)};return t.addEventListener("selectionchange",n),()=>t.removeEventListener("selectionchange",n)});const M=(e,t=!1)=>{const n=z();if(!n||n[0]===n[1])return;e.preventDefault();const a=w.current;e.clipboardData.setData("text/plain",a.layout.text.slice(n[0],n[1])),e.clipboardData.setData(m,g(r,l,n[0],n[1])),t&&!o&&P(f(r,l,n[0],n[1],{text:""}),n,"edit")};/* @__PURE__ */
2
+ return Te("div",{className:"es-rich-wrap",children:[s&&""===r?/* @__PURE__ */Oe("div",{className:"es-rich-placeholder","aria-hidden":"true",children:s}):null,
3
+ /* @__PURE__ */Oe("div",{ref:x,className:`es-rich${a?" is-multiline":" is-single"}${o?" is-off":""}`,contentEditable:!o,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":a,"aria-label":i,"aria-readonly":o||void 0,"aria-placeholder":s,tabIndex:o?-1:0,spellCheck:!0,onFocus:()=>{N.current=r},onBlur:()=>{r!==N.current&&k?.(r),N.current=r},onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),S?.(N.current),void(N.current=r);"Enter"!==e.key||a||(e.preventDefault(),r!==N.current&&k?.(r),N.current=r)},onCompositionStart:()=>{const e=z()??[0,0];D.current={from:e[0],to:e[1]}},onCompositionEnd:e=>{const t=D.current;if(D.current=null,!t)return;const{value:n,rules:r,pending:l}=T.current;e.data?P(f(n,r,t.from,t.to,{text:e.data,add:l?.add,drop:l?.drop,color:l?.color}),[t.from,t.to],"type"):O(e=>e+1)},onCopy:e=>M(e),onCut:e=>M(e,!0),onPaste:e=>{if(e.preventDefault(),o)return;const t=z();if(!t)return;const n=e.clipboardData.getData(m),s=n?a?n:n.replace(/\s*\r?\n\s*/g," "):p({html:e.clipboardData.getData("text/html"),text:e.clipboardData.getData("text/plain")},{doc:e.currentTarget.ownerDocument,multiline:a,rules:l});P(f(r,l,t[0],t[1],{markup:s}),t,"edit")}})]})}var qe={fontSize:{key:"fontSize",nameKey:"fontSize",icon:/* @__PURE__ */Oe(ce,{}),unit:"px",step:1,shiftStep:10,min:5},lineHeight:{key:"lineHeight",nameKey:"lineHeight",icon:/* @__PURE__ */Oe(ie,{}),unit:"%",step:1,shiftStep:10,min:50,max:250,scale:100},letterSpacing:{key:"letterSpacing",nameKey:"letterSpacing",icon:/* @__PURE__ */Oe(se,{}),unit:"px",step:.1,shiftStep:1,min:-10},paragraphSpacing:{key:"paragraphSpacing",nameKey:"paragraphSpacing",icon:/* @__PURE__ */Oe(oe,{}),unit:"px",step:1,shiftStep:10,min:0}};function Ye(e,t){return void 0===e?void 0:Number((e*t).toFixed(6))}function Ge({cells:e,words:t,readOnly:n=!1}){const r=t??y.cells,l=te();/* @__PURE__ */
4
+ return Oe("div",{className:"es-copy-cells-fit",children:/* @__PURE__ */Oe("div",{className:"es-copy-cells",children:e.map(e=>{const t=e.scale??1,a=e.name??(e.nameKey?r[e.nameKey]:e.key),o=e.unit??"",s=e.step??1,i=`${l}-${e.key}`;/* @__PURE__ */
5
+ return Te("div",{className:"es-copy-cell",children:[
6
+ /* @__PURE__ */Oe("label",{className:"es-field-label es-copy-cell-name",htmlFor:i,children:a}),
7
+ /* @__PURE__ */Oe(v,{id:i,value:Ye(e.value,t),styleValue:Ye(e.styleValue,t),onChange:n=>e.onChange(void 0===n?void 0:Number((n/t).toFixed(6))),min:e.min,max:e.max,step:s,shiftStep:e.shiftStep,icon:e.icon,unit:o||void 0,steppers:"compact",readOnly:n,ariaLabel:a,title:r.tip({name:a,step:s,unit:o})})]},e.key)})})})}var Je=/* @__PURE__ */new Set([...E,"clear"]),Ze={bold:/* @__PURE__ */Oe(Se,{size:16}),italic:/* @__PURE__ */Oe(ge,{size:16}),strike:/* @__PURE__ */Oe(ke,{size:16}),highlight:/* @__PURE__ */Oe(be,{size:16}),quiet:/* @__PURE__ */Oe(ve,{size:16}),link:/* @__PURE__ */Oe(ye,{size:16}),clear:/* @__PURE__ */Oe(ue,{size:16})};function _e(e){if(!e)return;const t=e.split("+"),n=t.pop().toUpperCase();return["Meta",...t.map(e=>e[0].toUpperCase()+e.slice(1)),n].join("+")}var Xe={bold:"is-bold",italic:"is-italic",strike:"is-strike"};function Qe({tools:e,onApply:t,disabled:n=!1,actions:r,align:l,glyphs:a,ariaLabel:o,pressed:s,open:i=null}){const c=A("copy",y),u=("string"==typeof e[0]?D(e).map(e=>({...e,...c.marks[e.style]})):e).filter(e=>!Je.has(e.style));return 0!==u.length||r||l?/* @__PURE__ */Te("div",{className:"es-copy-bar",role:"group","aria-label":o??c.formatting,children:[u.map(e=>{const r=a?.[e.style]??Ze[e.style],l=i===e.style||Boolean(s?.[e.style]),o="link"===e.style&&Boolean(s);return W(e.title,/* @__PURE__ */Oe(U,{onMouseDown:e=>e.preventDefault(),onClick:()=>t(e.style),disabled:n,"aria-label":e.name??e.title,"aria-keyshortcuts":_e(e.shortcut),"aria-pressed":o||!s&&!i?void 0:l,pressed:o?l:void 0,"aria-haspopup":o?"dialog":void 0,"aria-expanded":o?"link"===i:void 0,className:`es-copy-mark${r?" has-glyph":Xe[e.style]?` ${Xe[e.style]}`:""}${l?" is-active":""}`,children:r??e.label},e.style))}),r?/* @__PURE__ */Te(ze,{children:[
8
+ /* @__PURE__ */Oe("span",{className:"es-copy-bar-split","aria-hidden":"true"}),r]}):null,l?/* @__PURE__ */Oe("span",{className:"es-copy-bar-end",children:l}):null]}):null}function et({target:e,onChange:t}){const n=_(null);return Q(()=>{const t=n.current,r=e.current;t&&r&&r.value===t.text&&(n.current=null,r.focus(),r.setSelectionRange(t.start,t.end))}),r=>{const l=r(e.current);t(l.text),n.current={start:l.selectionStart,end:l.selectionEnd,text:l.text}}}var tt=["bold","italic","underline","strike","sup","sub"];function nt({value:e,onChange:t,onCommit:n,onCancel:h,multiline:f=!1,placeholder:m,ariaLabel:g,className:v,readOnly:b=!1,rules:x,tools:E=[],writeMark:U,actions:Z,align:ne,glyphs:re,barLabel:le,renderFooter:ae,inputRef:oe,barShows:se="always",richText:ie=!0,defaultShowMarks:ce=!1,toolbar:de="final",colors:pe,cells:he,letterCase:fe,lastTool:me}){const ge="final"===de,ye=A("copy",y),ve=_(null),be=oe??ve,[ke,Se]=X(!1),[xe,we]=X(null),Ee=_(r()).current,Ce=_(null);ee(()=>{const t=Ce.current;t&&e===t.to?Ce.current=null:t&&e===t.from||(Ce.current=null,Ee.reset())},[e,Ee]);const De=n=>{Ce.current={from:Ce.current?.from??e,to:n},t(n)},Ne=t=>({text:e,start:t?.selectionStart??xe?.start??e.length,end:t?.selectionEnd??xe?.end??e.length}),[Le,Fe]=X(ce),Pe=ie&&!(f&&Le),Me=_(null),Re=te(),[Ke,$e]=X(null),[Ae,We]=X(!1),Ue=()=>{if(!Pe)return be.current;const e=Me.current?.getSource()??xe;return e?{selectionStart:e.start,selectionEnd:e.end}:null},qe=et({target:be,onChange:De}),Ye=e=>(we({start:e.selectionStart,end:e.selectionEnd}),e),Ze=(t,n)=>{if(!Pe)return void qe(e=>(n&&Ee.record(Ne(e),"edit",Date.now()),Ye(t(e))));const r=Ue(),l=Ye(t(r));n&&Ee.record(Ne(r),"edit",Date.now()),$e(null),l.text!==e&&De(l.text),Me.current?.setSource(l.selectionStart,l.selectionEnd,l.text)},_e=e=>Ze(e,!0),Xe=e=>Ze(t=>{const n=Ne(t),r=Ee[e](n);return r?{text:r.text,selectionStart:r.start,selectionEnd:r.end}:{text:n.text,selectionStart:n.start,selectionEnd:n.end}},!1),nt=_(null);Q(()=>{const t=nt.current;t&&(nt.current=null,Pe?Me.current?.setSource(t.start,t.end,e):(be.current?.focus(),be.current?.setSelectionRange(t.start,t.end),we(t)))},[Pe]);const[rt,lt]=X(null),at=x??L,ot=("string"==typeof E[0]?D(E):E).filter(e=>!Je.has(e.style)),st=ge?("string"==typeof E[0]?E:E.map(e=>e.style)).filter(e=>!Je.has(e)):ot.map(e=>e.style),it={};if(xe&&(Pe||ge)){const t=N(e,xe.start,xe.end,at);for(const e of st){const n=t.has(e)||"highlight"===e&&t.has("accent");it[e]=!!Ke?.add.includes(e)||!Ke?.drop.includes(e)&&n}ge&&(it.link=t.has("link"))}else if(xe)for(const t of st)it[t]="link"===t?null!==O(e,xe.start,xe.end):T(e,xe.start,xe.end,t);const ct=()=>{const t=Ue(),n=t?.selectionStart??e.length;return{start:n,end:t?.selectionEnd??n}},ut=t=>{if(ge&&"link"!==t&&P(0,t)){const{start:n,end:r}=ct();if(n===r&&!Pe)return void _e(n=>He(e,t,n,(e,t,n,r)=>C(e,t,n,r,at,ye.placeholders)));const l=d({value:e,rules:at,start:n,end:r,style:t,pending:Ke});return void("pending"===l.kind?$e(l.pending):_e(()=>l.result))}if("clear"===t)return void _e(n=>He(e,t,n,(e,t,n)=>C(e,t,n,"clear",at)));if("link"!==t&&Pe&&P(0,t)){const n=Ue(),r=n?.selectionStart??e.length,l=n?.selectionEnd??r;if(r===l){const n=N(e,r,l,at),a=n.has(t)||"highlight"===t&&n.has("accent"),o=Ke&&Ke.at===r?Ke:null,s=!!o?.add.includes(t)||!o?.drop.includes(t)&&a,i=(o?.add??[]).filter(e=>e!==t),c=(o?.drop??[]).filter(e=>e!==t);return s&&a?c.push(t):s||a||i.push(t),void $e(i.length||c.length?{add:i,drop:c,at:r}:null)}return void _e(n=>R(e,n?.selectionStart??r,n?.selectionEnd??l,t,at))}if("link"!==t){const n=U??((e,t,n,r)=>C(e,t,n,r,L,ye.placeholders));return void _e(r=>He(e,t,r,n))}const n=Ue(),r=n?.selectionStart??e.length,l=n?.selectionEnd??r;We(!1),lt({start:r,end:l,link:O(e,r,l)})},dt=Boolean(xe&&xe.start!==xe.end),pt=xe?z(e,xe.start,xe.end,at):null,ht=xe?Ke&&void 0!==Ke.color&&Ke.at===xe.start?Ke.color:F(e,xe.start,xe.end,at):null,ft=l(ht,pe),mt=t=>{Pe?t?Me.current?.setSource(t.start,t.end,e):Me.current?.focus():(be.current?.focus(),t&&be.current?.setSelectionRange(t.start,t.end))},gt=()=>{const e=rt;lt(null),mt(e?{start:e.start,end:e.end}:xe)},yt=()=>{const e=bt.current,t=Boolean(e&&e.querySelector(".es-copy-colors")?.contains(e.ownerDocument.activeElement));We(!1),t&&mt(xe)},vt=_(yt);vt.current=yt,ee(()=>{if(Ae)return I(e=>{const t=bt.current;return!!("Escape"===e.key&&t&&e.target instanceof Node&&t.contains(e.target))&&(vt.current(),!0)},()=>bt.current?.querySelector(".es-copy-colors"))},[Ae]);const bt=_(null),kt=Ae||null!==rt;ee(()=>{const e=bt.current;if(!kt||!e)return;const t=e.ownerDocument,n=()=>{We(!1),lt(null)},r=t=>{e.contains(t.target)||n()};let l;const a=r=>{const a=r.relatedTarget;a?e.contains(a)||n():(clearTimeout(l),l=setTimeout(()=>{const r=t.activeElement;t.hasFocus()&&r&&r!==t.body&&!e.contains(r)&&n()},0))};return t.addEventListener("pointerdown",r,!0),e.addEventListener("focusout",a),()=>{clearTimeout(l),t.removeEventListener("pointerdown",r,!0),e.removeEventListener("focusout",a)}},[kt]);const St=rt??(Ae?xe??{start:e.length,end:e.length}:null),xt=_(()=>{});xt.current=()=>{const e=bt.current,t=e?.querySelector(".rosh-tb-wrap > .es-copy-pop");if(!e||!t||!St)return;const n=Pe?null:e.querySelector(".es-gold-layer"),r=Pe?Me.current?.rangeOf(St.start,St.end)??null:n?a(n,St.start,St.end):null,l=r?.endContainer,u=l?1===l.nodeType?l:l.parentElement:null,d=r?o(r,u?.closest(".es-rich-line, .es-gold-layer")??null):null;if(!d)return;const p=s({anchor:d,size:{width:t.offsetWidth,height:t.offsetHeight},within:e.getBoundingClientRect(),clip:c(e),parent:i(t)});t.style.top=`${p.top}px`,t.style.left=`${p.left}px`,t.style.setProperty("--es-pop-point",`${p.point}px`),t.dataset.side=p.above?"above":"below"},Q(()=>{const e=bt.current;if(!kt||!e)return;const t=()=>xt.current();t();const n=e.ownerDocument.defaultView;n?.addEventListener("resize",t);const r=e.querySelector(".rosh-tb-wrap > .es-copy-pop"),l=n?.ResizeObserver,a=l&&r?new l(t):null;return a&&r&&a.observe(r),()=>{n?.removeEventListener("resize",t),a?.disconnect()}},[kt,Ae,rt,St?.start,St?.end,Pe]);const wt=t=>rt&&/* @__PURE__ */Oe(J,{className:t?"es-copy-link es-copy-pop":"es-copy-link",value:rt.link?.href??"",onApply:t=>{const n=rt;lt(null),_e(()=>Pe?H(e,n.start,n.end,t,at):V(e,n.start,n.end,t))},onRemove:rt.link?()=>{const t=rt.link,n=rt;lt(null),t&&_e(()=>Pe?j(e,n.start,n.end,at):$(e,t))}:void 0,onCancel:gt}),Et=ne?Be(ne.allow,ye.align):[],Ct="always"===se||ke||null!==rt||Ae,Dt=pe&&pe.length>0?{run:ft,open:Ae,onToggle:()=>{lt(null),Ae?yt():We(!0)}}:void 0,Nt=Ct&&ge&&me?me({className:"rosh-tb-btn",disabled:b,selected:dt,keepCaret:e=>e.preventDefault(),insert:t=>_e(n=>Ve(e,t,n))}):void 0,Lt=new Set(st),Ot=ne?{value:ne.value,allow:ne.allow,onChange:ne.onChange,disabled:ne.disabled}:void 0,Tt={pressed:pt,onList:t=>{const{start:n,end:r}=ct(),l=z(e,n,r,at);_e(()=>K(e,n,r,l===t?null:t,at))}},zt=q({offered:Lt,color:Dt,last:Nt,alignment:Ot,list:Tt,letterCase:fe}),Ft=ge&&Ct&&(tt.some(e=>Lt.has(e))||Boolean(Dt));/* @__PURE__ */
9
+ return Te("div",{ref:bt,className:"es-copy"+(v?` ${v}`:""),onFocus:()=>Se(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||Se(!1)},onKeyDown:e=>{const t=e.target===be.current||Boolean(e.target.closest?.(".es-rich"));if(b||!t)return;if(e.altKey||e.metaKey===e.ctrlKey)return;const n=e.key.toLowerCase(),r="KeyZ"===e.code||"z"===n,l=("KeyY"===e.code||"y"===n)&&!e.shiftKey;if(r||l)return e.preventDefault(),e.stopPropagation(),void Xe(l||e.shiftKey?"redo":"undo");const a=`${e.shiftKey?"shift+":""}${n}`;if(ge){const t={b:"bold",i:"italic",u:"underline",k:"link"}[a];if(!t||!st.includes(t))return;return e.preventDefault(),e.stopPropagation(),void ut(t)}const o=ot.find(e=>e.shortcut===a);o&&(e.preventDefault(),e.stopPropagation(),ut(o.style))},onPaste:t=>{const n=be.current;if(b||!n||t.target!==n)return;t.preventDefault();const r=p({html:t.clipboardData.getData("text/html"),text:t.clipboardData.getData("text/plain")},{doc:n.ownerDocument,multiline:f,rules:at});_e(t=>Ve(e,r,t))},style:pe&&pe.length>0?Object.fromEntries(pe.map(e=>[`--es-color-${e.name}`,e.value])):void 0,onSelect:()=>{const t=be.current;t&&t.ownerDocument.activeElement===t&&we({start:t.selectionStart??e.length,end:t.selectionEnd??e.length})},children:[Ct&&ge&&(zt.words||zt.paragraph)?
10
+ /* @__PURE__ */Oe(Y,{className:"es-copy-toolbar","aria-label":le??ye.formatting,offered:Lt,pressed:it,onMark:e=>ut(e),color:Dt,linkOpen:null!==rt,last:Nt,alignment:Ot,list:Tt,letterCase:fe,disabled:b,windows:/* @__PURE__ */Te(ze,{children:[Ae&&pe&&pe.length>0?/* @__PURE__ */Oe(u,{colors:pe,current:ht,words:ye.colors??y.colors,onPick:t=>{const{start:n,end:r}=ct();if(n!==r)_e(()=>B(e,n,r,t,at));else{if(!Pe)return;$e({add:Ke?.add??[],drop:Ke?.drop??[],color:t,at:n})}}}):null,rt?wt(!0):null]})}):null,ge&&he&&he.length>0?/* @__PURE__ */Oe(Ge,{cells:he,words:ye.cells??y.cells,readOnly:b}):null,Ct&&!ge?/* @__PURE__ */Oe(Qe,{tools:E,disabled:b,actions:Z,glyphs:re,ariaLabel:le,pressed:it,open:rt?"link":null,onApply:ut,align:ne?/* @__PURE__ */Oe(k,{options:Et,value:ne.value,onChange:ne.onChange,ariaLabel:ye.alignment,disabled:b||ne.disabled,fit:je(Et)}):null}):null,Pe?/* @__PURE__ */Oe(Ie,{value:e,rules:at,multiline:f,readOnly:b,placeholder:m,ariaLabel:g,handle:Me,pending:Ke??void 0,onEdit:(t,n,r)=>{Ee.record({text:e,start:n.start,end:n.end},r,Date.now()),$e(null),De(t)},onSelect:e=>{we(t=>t&&t.start===e.start&&t.end===e.end?t:e),!Ke||e.start===Ke.at&&e.end===Ke.at||$e(null)},onHistory:Xe,onFormat:e=>{st.includes(e)&&ut(e)},onCommit:n,onCancel:h}):/* @__PURE__ */Oe(w,{value:e,onInput:e=>{Ee.record(Ne(null),"type",Date.now()),De(e)},onCommit:n,onCancel:h,multiline:f,placeholder:m,ariaLabel:g,rules:x,disabled:b,inputRef:be,className:"es-copy-box"}),rt&&!ge?wt(!1):null,ae?ae({focused:ke,insert:t=>_e(n=>Ve(e,t,n))}):null,ie&&f||Ft?
11
+ /* @__PURE__ */Te("div",{className:"es-copy-marks",children:[ie&&f?/* @__PURE__ */Te(ze,{children:[
12
+ /* @__PURE__ */Oe(S,{checked:Le,onChange:()=>{const e=Ue();nt.current=e&&null!==e.selectionStart&&null!==e.selectionEnd?{start:e.selectionStart,end:e.selectionEnd}:xe,$e(null),Fe(e=>!e)},ariaLabelledBy:Re,disabled:b}),
13
+ /* @__PURE__ */Oe("span",{id:Re,className:"es-copy-marks-label",children:ye.showMarks??"Show marks"})]}):null,Ft?W(dt?void 0:ye.clearStyleEmpty??"Select words first",/* @__PURE__ */Te(G,{variant:"secondary",size:"sm",className:"es-copy-clear",disabled:b||!dt,onMouseDown:e=>e.preventDefault(),onClick:()=>{const{start:t,end:n}=ct();if(t===n)return;const r=M(e,t,n,at);r.text!==e&&_e(()=>r)},children:[
14
+ /* @__PURE__ */Oe(ue,{size:16}),ye.clearStyle??y.clearStyle]})):null]}):null]})}var rt=["none","bullet","number"],lt=["none","upper","capitalize","lower"],at={none:/* @__PURE__ */Oe(Ee,{}),bullet:/* @__PURE__ */Oe(we,{}),number:/* @__PURE__ */Oe(xe,{})},ot={none:/* @__PURE__ */Oe(Le,{}),upper:/* @__PURE__ */Oe(Ne,{}),capitalize:/* @__PURE__ */Oe(De,{}),lower:/* @__PURE__ */Oe(Ce,{})};function st({label:e,icon:t,answers:n,names:r,glyphs:l,row:a,readOnly:o}){const s=a.value||a.styleValue||"";/* @__PURE__ */
15
+ return Oe(x,{label:e,icon:t,children:/* @__PURE__ */Oe(k,{ariaLabel:e,value:s,disabled:o,onChange:e=>{o||a.onChange(function(e,t){return t===e.value||""===e.value&&t===e.styleValue?"":t}(a,e))},options:n.map(e=>({id:e,label:l[e],title:r[e]}))})})}function it({kept:e,keptHint:t,readOnly:n=!1,style:r,font:l,italic:a,cells:o,align:s,list:i,letterCase:c}){const u=A("copy",y),d={...y.panel,...u.panel},p=u.clearStyle??y.clearStyle,h=r&&!n?[r.onClearChanges&&{label:p,onSelect:r.onClearChanges},r.onEditStyles&&{label:d.editStyles,onSelect:r.onEditStyles},r.onUpdateStyle&&{label:d.updateStyle,onSelect:r.onUpdateStyle}].filter(e=>!!e):[],f=!!a&&(a.value??a.styleValue??!1),m=a?/* @__PURE__ */Oe(Z,{content:d.italic,children:/* @__PURE__ */Oe(U,{size:"sm",variant:"ghost","aria-label":d.italic,"aria-pressed":f,disabled:n,onClick:()=>{if(n)return;const e=!f;a.onChange(e===(a.styleValue??!1)?void 0:e)},children:/* @__PURE__ */Oe(ge,{})})}):null;/* @__PURE__ */
16
+ return Te("div",{className:"es-tpp",children:[e?/* @__PURE__ */Te("div",{className:"es-tpp-kept",children:[
17
+ /* @__PURE__ */Oe(nt,{...e,readOnly:n||e.readOnly}),t?/* @__PURE__ */Oe("p",{className:"es-field-hint",children:t}):null]}):null,r?/* @__PURE__ */Oe(x,{label:d.style,icon:/* @__PURE__ */Oe(de,{}),children:/* @__PURE__ */Oe(b,{ariaLabel:d.style,value:r.value,options:r.options,onChange:r.onChange,changed:r.changed,footer:h,readOnly:n})}):null,l?/* @__PURE__ */Oe(x,{label:d.font,icon:/* @__PURE__ */Oe(pe,{}),children:/* @__PURE__ */Te("div",{className:"es-tpp-font",children:[
18
+ /* @__PURE__ */Oe("div",{className:"es-tpp-font-select",children:/* @__PURE__ */Oe(b,{ariaLabel:d.font,value:l.value||void 0,placeholder:l.styleValue,options:l.options,onChange:l.onChange,searchable:l.searchable,readOnly:n})}),m]})}):m?
19
+ /* @__PURE__ */Oe(x,{label:d.italic,icon:/* @__PURE__ */Oe(pe,{}),children:/* @__PURE__ */Oe("div",{className:"es-tpp-font",children:m})}):null,o?.length?/* @__PURE__ */Oe(Ge,{cells:o,words:u.cells,readOnly:n}):null,s?/* @__PURE__ */Oe(st,{label:u.alignment,icon:/* @__PURE__ */Oe(he,{}),answers:Fe.filter(e=>!s.allow||s.allow.includes(e)),names:u.align,glyphs:Me,row:s,readOnly:n}):null,i?/* @__PURE__ */Oe(st,{label:d.list,icon:/* @__PURE__ */Oe(fe,{}),answers:rt,names:d.lists,glyphs:at,row:i,readOnly:n}):null,c?/* @__PURE__ */Oe(st,{label:d.capitalization,icon:/* @__PURE__ */Oe(me,{}),answers:lt,names:d.cases,glyphs:ot,row:c,readOnly:n}):null]})}export{Fe as COPY_ALIGNS,Re as COPY_ALIGN_FIT,Me as COPY_ALIGN_GLYPHS,Pe as COPY_ALIGN_LABELS,qe as COPY_CELLS,nt as CopyBox,Ge as CopyCells,Qe as MarkBar,Ie as RichBox,it as TextPartPanel,_e as ariaShortcut,Be as copyAlignOptions,Ve as insertSelection,He as markSelection,et as useCaretEdit};
@@ -8,7 +8,7 @@ import { c as ResolveTrigger, a as ResolveCache, R as ResolvableItem } from '../
8
8
  import * as react from 'react';
9
9
  import { ReactNode, CSSProperties, ComponentType, ReactElement } from 'react';
10
10
  import { TextToolbarProps } from 'efficient-shell/ui';
11
- import { C as CopyBoxLastTool, a as CanvasTypingEnd } from '../canvas-typing-CJodefPO.js';
11
+ import { C as CopyBoxLastTool, a as CopyThemeColor, b as CanvasTypingEnd } from '../canvas-typing-DvoqQINU.js';
12
12
  import { InlineRule } from '../markup/index.js';
13
13
  import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-BHRkUFfG.js';
14
14
  import { I as InspectorFields } from '../types-Dkx1VAIQ.js';
@@ -372,6 +372,13 @@ interface CanvasTypingTarget {
372
372
  * the tool's menu take focus without ending typing.
373
373
  */
374
374
  lastTool?: (slot: CopyBoxLastTool) => ReactNode;
375
+ /**
376
+ * The theme colours the words may wear — the panel box's `colors`
377
+ * (`CopyBox`), the same `CopyThemeColor[]`. Given (and not empty), the bar
378
+ * offers the colour window, the panel box's own (`ColorWindow`): a theme
379
+ * colour is written by NAME, any colour as a hex. Left out, no colour button.
380
+ */
381
+ colors?: readonly CopyThemeColor[];
375
382
  };
376
383
  }
377
384
  type CanvasTypingState = {
@@ -1 +1 @@
1
- export{CanvasFrame,CanvasPassThroughContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-PE6ZY5IW.js";import"../chunk-TBY3DFKS.js";import"../chunk-YRLPFZW3.js";import"../chunk-ECM5F6JJ.js";import"../chunk-TJ6NRHYF.js";import"../chunk-546BBOPE.js";import"../chunk-MFIRYGHW.js";import"../chunk-ILXP5VX5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ export{CanvasFrame,CanvasPassThroughContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-I55LUW3C.js";import"../chunk-TBY3DFKS.js";import"../chunk-YRLPFZW3.js";import"../chunk-ECM5F6JJ.js";import"../chunk-FGJSCWUN.js";import"../chunk-Q6AM43CA.js";import"../chunk-546BBOPE.js";import"../chunk-MFIRYGHW.js";import"../chunk-ILXP5VX5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-26GHWMNN.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";import"../chunk-4JSBIW5H.js";import"../chunk-RC25EGHD.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-EA2HTX37.js";export{FieldNumber}from"../chunk-66LWADFP.js";export{FieldSelect,optionFor}from"../chunk-65Z5FSAW.js";import"../chunk-XJCMEEBH.js";import"../chunk-FFYXVAAL.js";import"../chunk-MFIRYGHW.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
1
+ export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-XAF6J6TB.js";import"../chunk-4JSBIW5H.js";import"../chunk-K56YDHYQ.js";export{FieldSlider}from"../chunk-XWFH2NHZ.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-EA2HTX37.js";export{FieldNumber}from"../chunk-66LWADFP.js";export{FieldSelect,optionFor}from"../chunk-65Z5FSAW.js";import"../chunk-FFYXVAAL.js";import"../chunk-XJCMEEBH.js";import"../chunk-MFIRYGHW.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{AddBlockRow as default}from"../../chunk-PZHQVOTU.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-77DQCEEF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-PE6ZY5IW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-TJ6NRHYF.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{AddBlockRow as default}from"../../chunk-O66SKO3J.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-OHRS7Q3E.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-I55LUW3C.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-XAF6J6TB.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-FGJSCWUN.js";import"../../chunk-Q6AM43CA.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-XZDHQ4DN.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-77DQCEEF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-PE6ZY5IW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-TJ6NRHYF.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-47RGVCPH.js";import"../../chunk-GG4FGBFR.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-HUI44HA5.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-OHRS7Q3E.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-I55LUW3C.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-XAF6J6TB.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-FGJSCWUN.js";import"../../chunk-Q6AM43CA.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-47RGVCPH.js";import"../../chunk-GG4FGBFR.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{MediaSidePanel as default}from"../../chunk-6FFSDH62.js";import"../../chunk-77DQCEEF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PE6ZY5IW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-TJ6NRHYF.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{MediaSidePanel as default}from"../../chunk-3KAQXJVI.js";import"../../chunk-OHRS7Q3E.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-I55LUW3C.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-XAF6J6TB.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-FGJSCWUN.js";import"../../chunk-Q6AM43CA.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-PPHUWGLZ.js";import"../../chunk-V7U33NF2.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-IOZKOGFR.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{ScreenChrome as default}from"../../chunk-7LP3OD2E.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-IFS5P7CO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-DGAXQTDW.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-BGY4Q2SL.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-QOYOE5CU.js";import"../../chunk-GJC6SNQC.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PPHUWGLZ.js";import"../../chunk-AFSSKGTD.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-GCCBEY2W.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-V7U33NF2.js";import"../../chunk-XZDHQ4DN.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-6FFSDH62.js";import"../../chunk-77DQCEEF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-PE6ZY5IW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-TJ6NRHYF.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-47RGVCPH.js";import"../../chunk-GG4FGBFR.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenChrome as default}from"../../chunk-2PTAR4TA.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-IFS5P7CO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-DGAXQTDW.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-4MPCFKFG.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-YJQYO6TA.js";import"../../chunk-PQMCHTVE.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-IOZKOGFR.js";import"../../chunk-AFSSKGTD.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-GCCBEY2W.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-HUI44HA5.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-3KAQXJVI.js";import"../../chunk-OHRS7Q3E.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-I55LUW3C.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-XAF6J6TB.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-FGJSCWUN.js";import"../../chunk-Q6AM43CA.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-47RGVCPH.js";import"../../chunk-GG4FGBFR.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{DocumentScreen,ScreenMount as default}from"../../chunk-ISZI4T6A.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-JTOZJXD7.js";import"../../chunk-7LP3OD2E.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-IFS5P7CO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-DGAXQTDW.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-BGY4Q2SL.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-QOYOE5CU.js";import"../../chunk-GJC6SNQC.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PPHUWGLZ.js";import"../../chunk-AFSSKGTD.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-GCCBEY2W.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-V7U33NF2.js";import"../../chunk-XZDHQ4DN.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-6FFSDH62.js";import"../../chunk-77DQCEEF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-PE6ZY5IW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-TJ6NRHYF.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-47RGVCPH.js";import"../../chunk-GG4FGBFR.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{DocumentScreen,ScreenMount as default}from"../../chunk-YXIR3EI3.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-UB5JFMRN.js";import"../../chunk-2PTAR4TA.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-IFS5P7CO.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-DGAXQTDW.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-4MPCFKFG.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TZIIRGVY.js";import"../../chunk-YJQYO6TA.js";import"../../chunk-PQMCHTVE.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-IOZKOGFR.js";import"../../chunk-AFSSKGTD.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-W4U4SHKW.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-GCCBEY2W.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-HUI44HA5.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-PPL7GB7D.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-3KAQXJVI.js";import"../../chunk-OHRS7Q3E.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-VWXUMVCD.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-I55LUW3C.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-XAF6J6TB.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-4VJATVVR.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-IE55HNMA.js";import"../../chunk-Z6PVRXVY.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-FGJSCWUN.js";import"../../chunk-Q6AM43CA.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-47RGVCPH.js";import"../../chunk-GG4FGBFR.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
@@ -1 +1 @@
1
- export{ScreenStoreProvider as default}from"../../chunk-JTOZJXD7.js";import"../../chunk-77DQCEEF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PE6ZY5IW.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-26GHWMNN.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-RC25EGHD.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-TJ6NRHYF.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
1
+ export{ScreenStoreProvider as default}from"../../chunk-UB5JFMRN.js";import"../../chunk-OHRS7Q3E.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-I55LUW3C.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-XAF6J6TB.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-ECM5F6JJ.js";import"../../chunk-FGJSCWUN.js";import"../../chunk-Q6AM43CA.js";import"../../chunk-66LWADFP.js";import"../../chunk-65Z5FSAW.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-XJCMEEBH.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ILXP5VX5.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";