@stlite/desktop 0.87.0 → 0.89.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 (79) hide show
  1. package/bin/dump_artifacts.js +2 -2
  2. package/build/assets/{ErrorOutline.esm-C8z2dN3x.js → ErrorOutline.esm-D2SwfuYU.js} +1 -1
  3. package/build/assets/{FileDownload.esm-kSzyJagP.js → FileDownload.esm-C2Gywq_5.js} +1 -1
  4. package/build/assets/{FileHelper-BbrZYz8x.js → FileHelper-TEIN3a2s.js} +1 -1
  5. package/build/assets/{FormClearHelper-fvwQICEk.js → FormClearHelper-DBsQ33IR.js} +1 -1
  6. package/build/assets/{Hooks-CCS44jMc.js → Hooks-BdfQKLev.js} +1 -1
  7. package/build/assets/{InputInstructions-BgxdtQsQ.js → InputInstructions-CtPX8G6i.js} +1 -1
  8. package/build/assets/{Particles-C6lCS8Mc.js → Particles-CftaQRnu.js} +1 -1
  9. package/build/assets/{ProgressBar-CXipOcU9.js → ProgressBar-M7ATKOrt.js} +1 -1
  10. package/build/assets/{Toolbar-DiWCQxr5.js → Toolbar-AvCHJeN3.js} +1 -1
  11. package/build/assets/{base-input-D2OIsCyG.js → base-input-C1jq7mBd.js} +1 -1
  12. package/build/assets/{checkbox-BNaalk8J.js → checkbox-mkpBvvtC.js} +1 -1
  13. package/build/assets/{createSuper-CQM18OGw.js → createSuper-BqkNEFMI.js} +1 -1
  14. package/build/assets/{data-grid-overlay-editor-CK8RiHSC.js → data-grid-overlay-editor-Kkg8Jnuo.js} +1 -1
  15. package/build/assets/{downloader-CE817MUq.js → downloader-D5bOXv0f.js} +1 -1
  16. package/build/assets/{es6-D9GNxEuI.js → es6-dD9evgqV.js} +2 -2
  17. package/build/assets/{iframeResizer.contentWindow-CNYkPhE6.js → iframeResizer.contentWindow-CcIGM7Tj.js} +1 -1
  18. package/build/assets/{index-X9E9p-kg.js → index-65i-IYyx.js} +1 -1
  19. package/build/assets/{index-BGbl-ncy.js → index-6GmirbOq.js} +1 -1
  20. package/build/assets/{index-CjHv4qYi.js → index-B6MoDIcs.js} +1 -1
  21. package/build/assets/{index-BDOZpIxN.js → index-B6dp8D8K.js} +1 -1
  22. package/build/assets/{index-CKEBU2Tu.js → index-B_ESKJn8.js} +1 -1
  23. package/build/assets/{index-DFlTnZFo.js → index-Bn07Nrcj.js} +1 -1
  24. package/build/assets/{index-C1VFEx3W.js → index-BvsGq1E8.js} +1 -1
  25. package/build/assets/{index-CDtHDDVr.js → index-BwDs6Dqm.js} +1 -1
  26. package/build/assets/{index-Dc2c4xJB.js → index-BzxHONei.js} +1 -1
  27. package/build/assets/{index-DhxOxSgZ.js → index-C3s_fpYA.js} +1 -1
  28. package/build/assets/{index-DhqQeff3.js → index-COglCO5Z.js} +5 -5
  29. package/build/assets/{index-XLeMBlQJ.js → index-CRXKMFnY.js} +1 -1
  30. package/build/assets/{index-DyVqVg90.js → index-CZ-g3tsi.js} +1 -1
  31. package/build/assets/{index-B-7mLFMQ.js → index-CaQBKEJy.js} +1 -1
  32. package/build/assets/{index-Wzix0Ssr.js → index-Cbwanp8_.js} +1 -1
  33. package/build/assets/{index---v6J_Xe.js → index-CmCzhGLu.js} +1 -1
  34. package/build/assets/{index-DFWekVRf.js → index-Cmk6T6xH.js} +1 -1
  35. package/build/assets/{index-B5zkrGKq.js → index-CuAJIEXV.js} +1 -1
  36. package/build/assets/{index-CxsEqDQL.js → index-CyGIJHIN.js} +1 -1
  37. package/build/assets/{index-DXGgezsh.js → index-D9I-_Axj.js} +1 -1
  38. package/build/assets/{index-B3wu97uA.js → index-DRnW2Id8.js} +1 -1
  39. package/build/assets/{index-Bnvb95fQ.js → index-Dpl6MGkr.js} +1 -1
  40. package/build/assets/{index-Vs85zs5K.js → index-Du10bw-R.js} +1 -1
  41. package/build/assets/{index-C6fUDD3N.js → index-GIlSUqbu.js} +1 -1
  42. package/build/assets/{index-CI7_FxNG.js → index-GZIk974x.js} +1 -1
  43. package/build/assets/{index--SdlqSfi.js → index-GZgkD7uG.js} +1 -1
  44. package/build/assets/{index-mlKr_pQQ.js → index-N4aGA-cE.js} +1 -1
  45. package/build/assets/{index-CnRs0MgX.js → index-P6F5Xebr.js} +1 -1
  46. package/build/assets/{index-CGMUJ4kd.js → index-XJiwj79b.js} +1 -1
  47. package/build/assets/{index-BI9UgvCi.js → index-_maoKajI.js} +1 -1
  48. package/build/assets/{index-DDiZtaVk.js → index-cMy3wqhE.js} +1 -1
  49. package/build/assets/{index-DCNLpqIv.js → index-clm6On2Y.js} +4 -4
  50. package/build/assets/{index-D0YDqQsn.js → index-i6_APaSl.js} +1 -1
  51. package/build/assets/{index-DqnX_TF4.js → index-npEbF0j6.js} +1 -1
  52. package/build/assets/{index-cAlcGRT2.js → index-o_WbG_Oh.js} +1 -1
  53. package/build/assets/{index-CT5_r023.js → index-w_HPESMz.js} +1 -1
  54. package/build/assets/{index-7qt3HHfl.js → index-yIAfElop.js} +1 -1
  55. package/build/assets/{inherits-BWX75f6B.js → inherits-D8N0057t.js} +1 -1
  56. package/build/assets/{input-DTfsWA-x.js → input-D2HjwqoP.js} +1 -1
  57. package/build/assets/{memory-DS2CpVMo.js → memory-DWwc6pLO.js} +1 -1
  58. package/build/assets/{mergeWith-fWFIuGgc.js → mergeWith-BGcS1SpY.js} +1 -1
  59. package/build/assets/{number-overlay-editor-DDQgeQYn.js → number-overlay-editor-B6CLC0X9.js} +1 -1
  60. package/build/assets/{sandbox-VD4WfD0W.js → sandbox-C6oygvjW.js} +1 -1
  61. package/build/assets/{slicedToArray-CgI3PJi3.js → slicedToArray-DOoFLiRi.js} +1 -1
  62. package/build/assets/{timepicker-qd0SiRjC.js → timepicker-C7DrJdVV.js} +1 -1
  63. package/build/assets/{uniqueId-Dgo2nsPZ.js → uniqueId-C1Mkja_B.js} +1 -1
  64. package/build/assets/{useBasicWidgetState-9vtYd9vP.js → useBasicWidgetState-CCltHZT9.js} +1 -1
  65. package/build/assets/{useTextInputAutoExpand-BFx1z0yW.js → useTextInputAutoExpand-LP-kJAB7.js} +1 -1
  66. package/build/assets/{useUpdateUiValue-BF7Ryinr.js → useUpdateUiValue-JsRPimPm.js} +1 -1
  67. package/build/assets/{withFullScreenWrapper-C3PKUCi4.js → withFullScreenWrapper-CKQjmc-1.js} +1 -1
  68. package/build/assets/worker-CiNU4sgs.js +105 -0
  69. package/build/electron/worker.js +9 -9
  70. package/build/index.html +1 -1
  71. package/build/pyodide/pyodide-lock.json +1 -1
  72. package/build/pyodide/pyodide.asm.js +2 -4
  73. package/build/pyodide/pyodide.asm.wasm +0 -0
  74. package/build/pyodide/pyodide.mjs +3 -3
  75. package/build/pyodide/python_stdlib.zip +0 -0
  76. package/package.json +6 -6
  77. package/wheels/streamlit-1.48.0-cp313-none-any.whl +0 -0
  78. package/build/assets/worker-B7Gzidb7.js +0 -105
  79. package/wheels/streamlit-1.48.0-cp312-none-any.whl +0 -0
@@ -1 +1 @@
1
- import{r,d as J}from"./index-DCNLpqIv.js";import{s as Q,i as R,a as U,b as Z,T as _,C as ee,m as te}from"./index-DhqQeff3.js";import"./withFullScreenWrapper-C3PKUCi4.js";import"./Toolbar-DiWCQxr5.js";import"./FormClearHelper-fvwQICEk.js";import"./mergeWith-fWFIuGgc.js";import"./sprintf-D7DtBTRn.js";import"./checkbox-BNaalk8J.js";import"./createDownloadLinkElement-ZaXNnPK4.js";import"./slicedToArray-CgI3PJi3.js";import"./inherits-BWX75f6B.js";import"./createSuper-CQM18OGw.js";import"./FileDownload.esm-kSzyJagP.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,oe=()=>t=>t.targetWidth,ae=()=>t=>t.targetHeight,ne=()=>t=>t.targetY+10,se=()=>t=>Math.max(0,(t.targetHeight-28)/2),de=Q("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ie(),"px"],"d19meir1-1":[re(),"px"],"d19meir1-2":[oe(),"px"],"d19meir1-3":[ae(),"px"],"d19meir1-4":[ne(),"px"],"d19meir1-5":[se(),"px"]}});function le(){const[t,a]=r.useState();return[t??void 0,a]}function ce(){const[t,a]=le(),[o,f]=r.useState(0),[m,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const n=new IntersectionObserver(s=>{s.length!==0&&b(s[0].isIntersecting)},{threshold:1});return n.observe(t),()=>n.disconnect()},[t]),r.useEffect(()=>{if(m||t===void 0)return;let n;const s=()=>{const{right:k}=t.getBoundingClientRect();f(g=>Math.min(g+window.innerWidth-k-10,0)),n=requestAnimationFrame(s)};return n=requestAnimationFrame(s),()=>{n!==void 0&&cancelAnimationFrame(n)}},[t,m]);const C=r.useMemo(()=>({transform:`translateX(${o}px)`}),[o]);return{ref:a,style:C}}const ue=t=>{const{target:a,content:o,onFinishEditing:f,forceEditMode:m,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:n,highlight:s,className:k,theme:g,id:V,cell:p,bloom:S,portalElementRef:D,validateCell:v,getCellRenderer:P,provideEditor:M,isOutsideClick:W,customEventTarget:X}=t,[d,Y]=r.useState(m?o:void 0),w=r.useRef(d??o);w.current=d??o;const[h,N]=r.useState(()=>v===void 0?!0:!(R(o)&&v?.(p,o,w.current)===!1)),c=r.useCallback((e,i)=>{f(h?e:void 0,i)},[h,f]),q=r.useCallback(e=>{if(v!==void 0&&e!==void 0&&R(e)){const i=v(p,e,w.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[p,v]),y=r.useRef(!1),u=r.useRef(void 0),B=r.useCallback(()=>{c(d,[0,0]),y.current=!0},[d,c]),G=r.useCallback((e,i)=>{c(e,i??u.current??[0,0]),y.current=!0},[c]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),u.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),u.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),u.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!y.current&&u.current!==void 0&&(c(i?d:void 0,u.current),y.current=!0)},0)},[c,d]),x=d??o,[l,L]=r.useMemo(()=>{if(U(o))return[];const e={...o,location:p},i=M?.(e);return i!==void 0?[i,!1]:[P(o)?.provideEditor?.(e),!1]},[p,o,P,M]),{ref:$,style:z}=ce();let F=!0,I,T=!0,E;if(l!==void 0){F=l.disablePadding!==!0,T=l.disableStyling!==!0;const e=Z(l);e&&(E=l.styleOverride);const i=e?l.editor:l;I=r.createElement(i,{portalElementRef:D,isHighlighted:s,onChange:q,value:x,initialValue:b,onFinishedEditing:G,validatedSelection:R(x)?x.selectionRange:void 0,forceEditMode:m,target:a,imageEditorOverride:C,markdownDivCreateNode:n,isValid:h,theme:g})}E={...E,...z};const A=D?.current??document.getElementById("portal");if(A===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please, either provide a portalElementRef or add `<div id="portal" />` as the last child of your `<body>`.'),null;let O=T?"gdg-style":"gdg-unstyle";h||(O+=" gdg-invalid"),F&&(O+=" gdg-pad");const H=S?.[0]??1,K=S?.[1]??1;return J.createPortal(r.createElement(_.Provider,{value:g},r.createElement(ee,{style:te(g),className:k,onClickOutside:B,isOutsideClick:W,customEventTarget:X},r.createElement(de,{ref:$,id:V,className:O,style:E,as:L===!0?"label":void 0,targetX:a.x-H,targetY:a.y-K,targetWidth:a.width+H*2,targetHeight:a.height+K*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},I)))),A)};export{ue as default};
1
+ import{r,d as J}from"./index-clm6On2Y.js";import{s as Q,i as R,a as U,b as Z,T as _,C as ee,m as te}from"./index-COglCO5Z.js";import"./withFullScreenWrapper-CKQjmc-1.js";import"./Toolbar-AvCHJeN3.js";import"./FormClearHelper-DBsQ33IR.js";import"./mergeWith-BGcS1SpY.js";import"./sprintf-D7DtBTRn.js";import"./checkbox-mkpBvvtC.js";import"./createDownloadLinkElement-ZaXNnPK4.js";import"./slicedToArray-DOoFLiRi.js";import"./inherits-D8N0057t.js";import"./createSuper-BqkNEFMI.js";import"./FileDownload.esm-C2Gywq_5.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,oe=()=>t=>t.targetWidth,ae=()=>t=>t.targetHeight,ne=()=>t=>t.targetY+10,se=()=>t=>Math.max(0,(t.targetHeight-28)/2),de=Q("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ie(),"px"],"d19meir1-1":[re(),"px"],"d19meir1-2":[oe(),"px"],"d19meir1-3":[ae(),"px"],"d19meir1-4":[ne(),"px"],"d19meir1-5":[se(),"px"]}});function le(){const[t,a]=r.useState();return[t??void 0,a]}function ce(){const[t,a]=le(),[o,f]=r.useState(0),[m,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const n=new IntersectionObserver(s=>{s.length!==0&&b(s[0].isIntersecting)},{threshold:1});return n.observe(t),()=>n.disconnect()},[t]),r.useEffect(()=>{if(m||t===void 0)return;let n;const s=()=>{const{right:k}=t.getBoundingClientRect();f(g=>Math.min(g+window.innerWidth-k-10,0)),n=requestAnimationFrame(s)};return n=requestAnimationFrame(s),()=>{n!==void 0&&cancelAnimationFrame(n)}},[t,m]);const C=r.useMemo(()=>({transform:`translateX(${o}px)`}),[o]);return{ref:a,style:C}}const ue=t=>{const{target:a,content:o,onFinishEditing:f,forceEditMode:m,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:n,highlight:s,className:k,theme:g,id:V,cell:p,bloom:S,portalElementRef:D,validateCell:v,getCellRenderer:P,provideEditor:M,isOutsideClick:W,customEventTarget:X}=t,[d,Y]=r.useState(m?o:void 0),w=r.useRef(d??o);w.current=d??o;const[h,N]=r.useState(()=>v===void 0?!0:!(R(o)&&v?.(p,o,w.current)===!1)),c=r.useCallback((e,i)=>{f(h?e:void 0,i)},[h,f]),q=r.useCallback(e=>{if(v!==void 0&&e!==void 0&&R(e)){const i=v(p,e,w.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[p,v]),y=r.useRef(!1),u=r.useRef(void 0),B=r.useCallback(()=>{c(d,[0,0]),y.current=!0},[d,c]),G=r.useCallback((e,i)=>{c(e,i??u.current??[0,0]),y.current=!0},[c]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),u.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),u.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),u.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!y.current&&u.current!==void 0&&(c(i?d:void 0,u.current),y.current=!0)},0)},[c,d]),x=d??o,[l,L]=r.useMemo(()=>{if(U(o))return[];const e={...o,location:p},i=M?.(e);return i!==void 0?[i,!1]:[P(o)?.provideEditor?.(e),!1]},[p,o,P,M]),{ref:$,style:z}=ce();let F=!0,I,T=!0,E;if(l!==void 0){F=l.disablePadding!==!0,T=l.disableStyling!==!0;const e=Z(l);e&&(E=l.styleOverride);const i=e?l.editor:l;I=r.createElement(i,{portalElementRef:D,isHighlighted:s,onChange:q,value:x,initialValue:b,onFinishedEditing:G,validatedSelection:R(x)?x.selectionRange:void 0,forceEditMode:m,target:a,imageEditorOverride:C,markdownDivCreateNode:n,isValid:h,theme:g})}E={...E,...z};const A=D?.current??document.getElementById("portal");if(A===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please, either provide a portalElementRef or add `<div id="portal" />` as the last child of your `<body>`.'),null;let O=T?"gdg-style":"gdg-unstyle";h||(O+=" gdg-invalid"),F&&(O+=" gdg-pad");const H=S?.[0]??1,K=S?.[1]??1;return J.createPortal(r.createElement(_.Provider,{value:g},r.createElement(ee,{style:te(g),className:k,onClickOutside:B,isOutsideClick:W,customEventTarget:X},r.createElement(de,{ref:$,id:V,className:O,style:E,as:L===!0?"label":void 0,targetX:a.x-H,targetY:a.y-K,targetWidth:a.width+H*2,targetHeight:a.height+K*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},I)))),A)};export{ue as default};
@@ -1 +1 @@
1
- import{c as b,e as f}from"./es6-D9GNxEuI.js";import"./index-DCNLpqIv.js";const{WritableStream:y,TransformStream:_,DOMException:P,Blob:m}=b,{GONE:v}=f,M=/constructor/i.test(window.HTMLElement);class E{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new P(...v)}async isSameEntry(e){return this===e}async createWritable(e={}){const t=await navigator.serviceWorker?.getRegistration(),a=document.createElement("a"),o=new _,u=o.writable;if(a.download=this.name,M||!t){let s=[];o.readable.pipeTo(new y({write(r){s.push(new m([r]))},close(){const r=new m(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new C(y),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),g={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},w=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new _({transform(c,l){if(c instanceof Uint8Array)return l.enqueue(c);const R=new Response(c).body.getReader(),d=S=>R.read().then(p=>p.done?0:d(l.enqueue(p.value)));return d()}})).pipeTo(s).finally(()=>{clearInterval(w)}),t.active.postMessage({url:t.scope+n,headers:g,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return u.getWriter()}}const T=0,U=0,j=1,k=1,L=2;class O{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:T,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:L}),this._port.close()}abort(e){this._port.postMessage({type:k,reason:e}),this._port.close()}_onMessage(e){e.type===U&&this._resolveReady(),e.type===j&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class C{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new O(t.port2))}}export{E as FileHandle};
1
+ import{c as b,e as f}from"./es6-dD9evgqV.js";import"./index-clm6On2Y.js";const{WritableStream:y,TransformStream:_,DOMException:P,Blob:m}=b,{GONE:v}=f,M=/constructor/i.test(window.HTMLElement);class E{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new P(...v)}async isSameEntry(e){return this===e}async createWritable(e={}){const t=await navigator.serviceWorker?.getRegistration(),a=document.createElement("a"),o=new _,u=o.writable;if(a.download=this.name,M||!t){let s=[];o.readable.pipeTo(new y({write(r){s.push(new m([r]))},close(){const r=new m(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new C(y),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),g={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},w=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new _({transform(c,l){if(c instanceof Uint8Array)return l.enqueue(c);const R=new Response(c).body.getReader(),d=S=>R.read().then(p=>p.done?0:d(l.enqueue(p.value)));return d()}})).pipeTo(s).finally(()=>{clearInterval(w)}),t.active.postMessage({url:t.scope+n,headers:g,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return u.getWriter()}}const T=0,U=0,j=1,k=1,L=2;class O{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:T,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:L}),this._port.close()}abort(e){this._port.postMessage({type:k,reason:e}),this._port.close()}_onMessage(e){e.type===U&&this._resolveReady(),e.type===j&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class C{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new O(t.port2))}}export{E as FileHandle};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-CE817MUq.js","assets/index-DCNLpqIv.js","assets/index.DGR6f4hm.css","assets/sandbox-VD4WfD0W.js","assets/memory-DS2CpVMo.js"])))=>i.map(i=>d[i]);
2
- import{B as c,__tla as J}from"./index-DCNLpqIv.js";let j,I,E,K=Promise.all([(()=>{try{return J}catch{}})()]).then(async()=>{const k=globalThis.showDirectoryPicker;async function N(r={}){if(k&&!r._preferPolyfill)return k(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const t=c(()=>Promise.resolve().then(()=>M),void 0);return await new Promise(n=>{e.addEventListener("change",n),e.click()}),t.then(n=>n.getDirHandlesFromInput(e))}const V={accepts:[]},A=globalThis.showOpenFilePicker;async function W(r={}){const e={...V,...r};if(A&&!r._preferPolyfill)return A(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(s=>[...(s.extensions||[]).map(i=>"."+i),...s.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const n=c(()=>Promise.resolve().then(()=>M),void 0);return await new Promise(s=>{t.addEventListener("change",s,{once:!0}),t.click()}),t.remove(),n.then(s=>s.getFileHandlesFromInput(t))}const L=globalThis.showSaveFilePicker;async function q(r={}){if(L&&!r._preferPolyfill)return L(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:n}},void 0),{FileHandle:t}=await c(async()=>{const{FileHandle:n}=await import("./downloader-CE817MUq.js");return{FileHandle:n}},__vite__mapDeps([0,1,2]));return new e(new t(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:n},{FileSystemFileHandle:s}]=await Promise.all([c(()=>import("./sandbox-VD4WfD0W.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0),c(()=>Promise.resolve().then(()=>w),void 0)]);return r.isFile?new s(new e(r,!1)):new n(new t(r,!1))});async function z(r,e={}){if(!r)return globalThis.navigator?.storage?.getDirectory()||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:t}=await c(async()=>{const{FileSystemDirectoryHandle:i}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:i}},void 0),n=await r,s=await(n.default?n.default(e):n(e));return new t(s)}let x;I={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:x}=I;class m extends x{#e;constructor(e){super(e),this.#e=e,Object.setPrototypeOf(this,m.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}}Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(m.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=m);const p=Symbol("adapter");class H{[p];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[p]=e}async queryPermission(e={}){const{mode:t="read"}=e,n=this[p];if(n.queryPermission)return n.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[p];if(t.requestPermission)return t.requestPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[p].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[p]?!1:this[p].isSameEntry(e[p])}}Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(r){return"granted"});let R;E={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},R={writable:globalThis.WritableStream};async function U(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,n]=await Promise.all([c(()=>import("./memory-DS2CpVMo.js"),__vite__mapDeps([4,1,2])),c(()=>import("./sandbox-VD4WfD0W.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0)]),s=new e.FolderHandle("",!1);return s._entries=r.map(i=>i.isFile?new t.FileHandle(i,!1):new t.FolderHandle(i,!1)),new n.FileSystemDirectoryHandle(s)}async function B(r){const{FolderHandle:e,FileHandle:t}=await c(async()=>{const{FolderHandle:y,FileHandle:o}=await import("./memory-DS2CpVMo.js");return{FolderHandle:y,FileHandle:o}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:n}=await c(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:y}},void 0),s=Array.from(r.files),i=s[0].webkitRelativePath.split("/",1)[0],l=new e(i,!1);return s.forEach(y=>{const o=y.webkitRelativePath.split("/");o.shift();const d=o.pop(),f=o.reduce((h,b)=>(h._entries[b]||(h._entries[b]=new e(b,!1)),h._entries[b]),l);f._entries[d]=new t(y.name,y,!1)}),new n(l)}async function C(r){const{FileHandle:e}=await c(async()=>{const{FileHandle:n}=await import("./memory-DS2CpVMo.js");return{FileHandle:n}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:t}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:n}},void 0);return Array.from(r.files).map(n=>new t(new e(n.name,n,!1)))}const M=Object.freeze(Object.defineProperty({__proto__:null,config:R,errors:E,fromDataTransfer:U,getDirHandlesFromInput:B,getFileHandlesFromInput:C},Symbol.toStringTag,{value:"Module"})),{GONE:G,MOD_ERR:$}=E,u=Symbol("adapter");let g=class D extends H{[u];constructor(e){super(e),this[u]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[u].getDirectoryHandle(e,t);return new D(n)}async*entries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[u].entries())yield[n.name,n.kind==="file"?new e(n):new D(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[u].entries())yield t.kind==="file"?new e(t):new D(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await c(async()=>{const{FileSystemFileHandle:i}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:i}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[u].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[u].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const i of n.values()){if(await i.isSameEntry(e))return[...s,i.name];i.kind==="directory"&&t.push({handle:i,path:[...s,i.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}};if(Object.defineProperty(g.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(g.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(s){if(await s.isSameEntry(this))return[];const i=[{handle:this,path:[]}];for(;i.length;){let{handle:l,path:y}=i.pop();for await(const o of l.values()){if(await o.isSameEntry(s))return[...y,o.name];o.kind==="directory"&&i.push({handle:o,path:[...y,o.name]})}}return null};async function e(s){if(await(await navigator.storage.getDirectory()).resolve(s)===null)throw new DOMException(...G)}const t=r.entries;r.entries=async function*(){await e(this),yield*t.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const n=r.removeEntry;r.removeEntry=async function(s,i={}){return n.call(this,s,i).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!i.recursive&&!(await t.call(this).next()).done?new DOMException(...$):l})}}const T=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:g,default:g},Symbol.toStringTag,{value:"Module"})),{INVALID:Y,SYNTAX:O,GONE:X}=E,P=Symbol("adapter");class _ extends H{[P];constructor(e){super(e),this[P]=e}async createWritable(e={}){return new m(await this[P].createWritable(e))}async getFile(){return this[P].getFile()}}if(Object.defineProperty(_.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(_.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let e;const t=()=>{let s,i;onmessage=async l=>{const y=l.ports[0],o=l.data;switch(o.type){case"open":const d=o.name;let f=await navigator.storage.getDirectory();for(const h of o.path)f=await f.getDirectoryHandle(h);s=await f.getFileHandle(d),i=await s.createSyncAccessHandle();break;case"write":i.write(o.data,{at:o.position}),i.flush();break;case"truncate":i.truncate(o.size);break;case"abort":case"close":i.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(s){if(!e){const a=`(${t.toString()})()`,F=new Blob([a],{type:"text/javascript"});e=URL.createObjectURL(F)}const i=new Worker(e,{type:"module"});let l=0;const y=new TextEncoder;let o=await this.getFile().then(a=>a.size);const d=a=>new Promise((F,Q)=>{const S=new MessageChannel;S.port1.onmessage=v=>{v.data instanceof Error?Q(v.data):F(v.data),S.port1.close(),S.port2.close(),S.port1.onmessage=null},i.postMessage(a,[S.port2])}),f=await navigator.storage.getDirectory(),h=await r.get(this),b=await f.resolve(h);if(b===null)throw new DOMException(...X);return await d({type:"open",path:b,name:this.name}),s?.keepExistingData===!1&&(await d({type:"truncate",size:0}),o=0),new m({start:a=>{},async write(a){if(a?.constructor===Object?a={...a}:a={type:"write",data:a,position:l},a.type==="write"){if(!("data"in a))throw await d({type:"close"}),new DOMException(...O("write requires a data argument"));if(a.position??=l,typeof a.data=="string")a.data=y.encode(a.data);else if(a.data instanceof ArrayBuffer)a.data=new Uint8Array(a.data);else if(!(a.data instanceof Uint8Array)&&ArrayBuffer.isView(a.data))a.data=new Uint8Array(a.data.buffer,a.data.byteOffset,a.data.byteLength);else if(!(a.data instanceof Uint8Array)){const F=await new Response(a.data).arrayBuffer();a.data=new Uint8Array(F)}Number.isInteger(a.position)&&a.position>=0&&(l=a.position),l+=a.data.byteLength,o+=a.data.byteLength}else if(a.type==="seek")if(Number.isInteger(a.position)&&a.position>=0){if(o<a.position)throw new DOMException(...Y);console.log("seeking",a),l=a.position;return}else throw await d({type:"close"}),new DOMException(...O("seek requires a position argument"));else if(a.type==="truncate")if(Number.isInteger(a.size)&&a.size>=0)o=a.size,l>o&&(l=o);else throw await d({type:"close"}),new DOMException(...O("truncate requires a size argument"));await d(a)},async close(){await d({type:"close"}),i.terminate()},async abort(a){await d({type:"abort",reason:a}),i.terminate()}})};const n=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...s){const i=await n.call(this,...s);return r.set(i,this),i}}let w;w=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:_,default:_},Symbol.toStringTag,{value:"Module"})),j=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:g,FileSystemFileHandle:_,FileSystemHandle:H,FileSystemWritableFileStream:m,getOriginPrivateDirectory:z,showDirectoryPicker:N,showOpenFilePicker:W,showSaveFilePicker:q},Symbol.toStringTag,{value:"Module"}))});export{K as __tla,j as a,I as c,E as e};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-D5bOXv0f.js","assets/index-clm6On2Y.js","assets/index.DGR6f4hm.css","assets/sandbox-C6oygvjW.js","assets/memory-DWwc6pLO.js"])))=>i.map(i=>d[i]);
2
+ import{B as c,__tla as J}from"./index-clm6On2Y.js";let j,I,E,K=Promise.all([(()=>{try{return J}catch{}})()]).then(async()=>{const k=globalThis.showDirectoryPicker;async function N(r={}){if(k&&!r._preferPolyfill)return k(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const t=c(()=>Promise.resolve().then(()=>M),void 0);return await new Promise(n=>{e.addEventListener("change",n),e.click()}),t.then(n=>n.getDirHandlesFromInput(e))}const V={accepts:[]},A=globalThis.showOpenFilePicker;async function W(r={}){const e={...V,...r};if(A&&!r._preferPolyfill)return A(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(s=>[...(s.extensions||[]).map(i=>"."+i),...s.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const n=c(()=>Promise.resolve().then(()=>M),void 0);return await new Promise(s=>{t.addEventListener("change",s,{once:!0}),t.click()}),t.remove(),n.then(s=>s.getFileHandlesFromInput(t))}const L=globalThis.showSaveFilePicker;async function q(r={}){if(L&&!r._preferPolyfill)return L(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:n}},void 0),{FileHandle:t}=await c(async()=>{const{FileHandle:n}=await import("./downloader-D5bOXv0f.js");return{FileHandle:n}},__vite__mapDeps([0,1,2]));return new e(new t(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:n},{FileSystemFileHandle:s}]=await Promise.all([c(()=>import("./sandbox-C6oygvjW.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0),c(()=>Promise.resolve().then(()=>w),void 0)]);return r.isFile?new s(new e(r,!1)):new n(new t(r,!1))});async function z(r,e={}){if(!r)return globalThis.navigator?.storage?.getDirectory()||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:t}=await c(async()=>{const{FileSystemDirectoryHandle:i}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:i}},void 0),n=await r,s=await(n.default?n.default(e):n(e));return new t(s)}let x;I={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:x}=I;class m extends x{#e;constructor(e){super(e),this.#e=e,Object.setPrototypeOf(this,m.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}}Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(m.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=m);const p=Symbol("adapter");class H{[p];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[p]=e}async queryPermission(e={}){const{mode:t="read"}=e,n=this[p];if(n.queryPermission)return n.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[p];if(t.requestPermission)return t.requestPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[p].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[p]?!1:this[p].isSameEntry(e[p])}}Object.defineProperty(H.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0}),globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(r){return"granted"});let R;E={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},R={writable:globalThis.WritableStream};async function U(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,n]=await Promise.all([c(()=>import("./memory-DWwc6pLO.js"),__vite__mapDeps([4,1,2])),c(()=>import("./sandbox-C6oygvjW.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0)]),s=new e.FolderHandle("",!1);return s._entries=r.map(i=>i.isFile?new t.FileHandle(i,!1):new t.FolderHandle(i,!1)),new n.FileSystemDirectoryHandle(s)}async function B(r){const{FolderHandle:e,FileHandle:t}=await c(async()=>{const{FolderHandle:y,FileHandle:o}=await import("./memory-DWwc6pLO.js");return{FolderHandle:y,FileHandle:o}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:n}=await c(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:y}},void 0),s=Array.from(r.files),i=s[0].webkitRelativePath.split("/",1)[0],l=new e(i,!1);return s.forEach(y=>{const o=y.webkitRelativePath.split("/");o.shift();const d=o.pop(),f=o.reduce((h,b)=>(h._entries[b]||(h._entries[b]=new e(b,!1)),h._entries[b]),l);f._entries[d]=new t(y.name,y,!1)}),new n(l)}async function C(r){const{FileHandle:e}=await c(async()=>{const{FileHandle:n}=await import("./memory-DWwc6pLO.js");return{FileHandle:n}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:t}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:n}},void 0);return Array.from(r.files).map(n=>new t(new e(n.name,n,!1)))}const M=Object.freeze(Object.defineProperty({__proto__:null,config:R,errors:E,fromDataTransfer:U,getDirHandlesFromInput:B,getFileHandlesFromInput:C},Symbol.toStringTag,{value:"Module"})),{GONE:G,MOD_ERR:$}=E,u=Symbol("adapter");let g=class D extends H{[u];constructor(e){super(e),this[u]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[u].getDirectoryHandle(e,t);return new D(n)}async*entries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[u].entries())yield[n.name,n.kind==="file"?new e(n):new D(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[u].entries())yield t.kind==="file"?new e(t):new D(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await c(async()=>{const{FileSystemFileHandle:i}=await Promise.resolve().then(()=>w);return{FileSystemFileHandle:i}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[u].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[u].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const i of n.values()){if(await i.isSameEntry(e))return[...s,i.name];i.kind==="directory"&&t.push({handle:i,path:[...s,i.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}};if(Object.defineProperty(g.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(g.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(s){if(await s.isSameEntry(this))return[];const i=[{handle:this,path:[]}];for(;i.length;){let{handle:l,path:y}=i.pop();for await(const o of l.values()){if(await o.isSameEntry(s))return[...y,o.name];o.kind==="directory"&&i.push({handle:o,path:[...y,o.name]})}}return null};async function e(s){if(await(await navigator.storage.getDirectory()).resolve(s)===null)throw new DOMException(...G)}const t=r.entries;r.entries=async function*(){await e(this),yield*t.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const n=r.removeEntry;r.removeEntry=async function(s,i={}){return n.call(this,s,i).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!i.recursive&&!(await t.call(this).next()).done?new DOMException(...$):l})}}const T=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:g,default:g},Symbol.toStringTag,{value:"Module"})),{INVALID:Y,SYNTAX:O,GONE:X}=E,P=Symbol("adapter");class _ extends H{[P];constructor(e){super(e),this[P]=e}async createWritable(e={}){return new m(await this[P].createWritable(e))}async getFile(){return this[P].getFile()}}if(Object.defineProperty(_.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(_.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let e;const t=()=>{let s,i;onmessage=async l=>{const y=l.ports[0],o=l.data;switch(o.type){case"open":const d=o.name;let f=await navigator.storage.getDirectory();for(const h of o.path)f=await f.getDirectoryHandle(h);s=await f.getFileHandle(d),i=await s.createSyncAccessHandle();break;case"write":i.write(o.data,{at:o.position}),i.flush();break;case"truncate":i.truncate(o.size);break;case"abort":case"close":i.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(s){if(!e){const a=`(${t.toString()})()`,F=new Blob([a],{type:"text/javascript"});e=URL.createObjectURL(F)}const i=new Worker(e,{type:"module"});let l=0;const y=new TextEncoder;let o=await this.getFile().then(a=>a.size);const d=a=>new Promise((F,Q)=>{const S=new MessageChannel;S.port1.onmessage=v=>{v.data instanceof Error?Q(v.data):F(v.data),S.port1.close(),S.port2.close(),S.port1.onmessage=null},i.postMessage(a,[S.port2])}),f=await navigator.storage.getDirectory(),h=await r.get(this),b=await f.resolve(h);if(b===null)throw new DOMException(...X);return await d({type:"open",path:b,name:this.name}),s?.keepExistingData===!1&&(await d({type:"truncate",size:0}),o=0),new m({start:a=>{},async write(a){if(a?.constructor===Object?a={...a}:a={type:"write",data:a,position:l},a.type==="write"){if(!("data"in a))throw await d({type:"close"}),new DOMException(...O("write requires a data argument"));if(a.position??=l,typeof a.data=="string")a.data=y.encode(a.data);else if(a.data instanceof ArrayBuffer)a.data=new Uint8Array(a.data);else if(!(a.data instanceof Uint8Array)&&ArrayBuffer.isView(a.data))a.data=new Uint8Array(a.data.buffer,a.data.byteOffset,a.data.byteLength);else if(!(a.data instanceof Uint8Array)){const F=await new Response(a.data).arrayBuffer();a.data=new Uint8Array(F)}Number.isInteger(a.position)&&a.position>=0&&(l=a.position),l+=a.data.byteLength,o+=a.data.byteLength}else if(a.type==="seek")if(Number.isInteger(a.position)&&a.position>=0){if(o<a.position)throw new DOMException(...Y);console.log("seeking",a),l=a.position;return}else throw await d({type:"close"}),new DOMException(...O("seek requires a position argument"));else if(a.type==="truncate")if(Number.isInteger(a.size)&&a.size>=0)o=a.size,l>o&&(l=o);else throw await d({type:"close"}),new DOMException(...O("truncate requires a size argument"));await d(a)},async close(){await d({type:"close"}),i.terminate()},async abort(a){await d({type:"abort",reason:a}),i.terminate()}})};const n=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...s){const i=await n.call(this,...s);return r.set(i,this),i}}let w;w=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:_,default:_},Symbol.toStringTag,{value:"Module"})),j=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:g,FileSystemFileHandle:_,FileSystemHandle:H,FileSystemWritableFileStream:m,getOriginPrivateDirectory:z,showDirectoryPicker:N,showOpenFilePicker:W,showSaveFilePicker:q},Symbol.toStringTag,{value:"Module"}))});export{K as __tla,j as a,I as c,E as e};
@@ -1 +1 @@
1
- import{g as it}from"./index-DCNLpqIv.js";function rt(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},Le;function at(){return Le||(Le=1,function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,j="",J=null,ie="",D=!1,Fe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,je=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function qe(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){We(),i("Initialising iFrame ("+window.location.href+")"),Je(),_e(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),Ve(),Ze(),Ge(),Oe(),k=Qe(),A("init","Init message from host page"),G()}function We(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),D=u===t[2]?D:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),j=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function Be(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Je(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(Be,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Ue(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function _e(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function Ve(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Xe(){J!==null&&J.disconnect()}function Ye(){we("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){i("Enable public methods"),je.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function $e(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function et(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=$e():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function tt(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),tt(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var ot=Math.abs(b-C)<=K;return!ot}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||D&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||D&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var nt=qe(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Fe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):nt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,He(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()}(ke)),ke.exports}var Pe=at();const ct=it(Pe),ut=rt({__proto__:null,default:ct},[Pe]);export{ut as i};
1
+ import{g as it}from"./index-clm6On2Y.js";function rt(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},Le;function at(){return Le||(Le=1,function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,j="",J=null,ie="",D=!1,Fe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,je=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function qe(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){We(),i("Initialising iFrame ("+window.location.href+")"),Je(),_e(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),Ve(),Ze(),Ge(),Oe(),k=Qe(),A("init","Init message from host page"),G()}function We(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),D=u===t[2]?D:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),j=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function Be(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Je(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(Be,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Ue(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function _e(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function Ve(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Xe(){J!==null&&J.disconnect()}function Ye(){we("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){i("Enable public methods"),je.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function $e(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function et(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=$e():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function tt(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),tt(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var ot=Math.abs(b-C)<=K;return!ot}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||D&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||D&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var nt=qe(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Fe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):nt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,He(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()}(ke)),ke.exports}var Pe=at();const ct=it(Pe),ut=rt({__proto__:null,default:ct},[Pe]);export{ut as i};
@@ -1,4 +1,4 @@
1
- import{r as h,cr as vr,cs as wr,ct as Dr,cu as Sr,h as Hn,cv as xn,g as En,c3 as K,co as Fe,cp as We,cw as An,cn as Or,c4 as z,b5 as kr,cx as In,cy as Mr,cz as Cr,cA as Ln,c5 as Ne,cB as Rn,cC as Tn,cD as Bn,b6 as Pr,ba as $n,ap as jr,cE as Fn,L as Wn,J as Ye,F as Hr,j as Ce,b$ as Nn,c0 as Yn,ch as zn,c1 as Vn,bJ as xr,b8 as mt,c2 as _n,bY as qn,bc as Un}from"./index-DCNLpqIv.js";import{a as Qn}from"./useBasicWidgetState-9vtYd9vP.js";import{D as Ae,a as Ie,T as Xn}from"./timepicker-qd0SiRjC.js";import{I as Gn}from"./input-DTfsWA-x.js";import{I as Kn}from"./base-input-D2OIsCyG.js";import{E as Jn}from"./ErrorOutline.esm-C8z2dN3x.js";import"./FormClearHelper-fvwQICEk.js";import"./inherits-BWX75f6B.js";import"./createSuper-CQM18OGw.js";var Zn=["title","size","color","overrides"];function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},yt.apply(this,arguments)}function eo(e,t){if(e==null)return{};var n=to(e,t),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)o=a[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function to(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,a;for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function ro(e,t){return io(e)||ao(e,t)||oo(e,t)||no()}function no(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as h,cr as vr,cs as wr,ct as Dr,cu as Sr,h as Hn,cv as xn,g as En,c3 as K,co as Fe,cp as We,cw as An,cn as Or,c4 as z,b5 as kr,cx as In,cy as Mr,cz as Cr,cA as Ln,c5 as Ne,cB as Rn,cC as Tn,cD as Bn,b6 as Pr,ba as $n,ap as jr,cE as Fn,L as Wn,J as Ye,F as Hr,j as Ce,b$ as Nn,c0 as Yn,ch as zn,c1 as Vn,bJ as xr,b8 as mt,c2 as _n,bY as qn,bc as Un}from"./index-clm6On2Y.js";import{a as Qn}from"./useBasicWidgetState-CCltHZT9.js";import{D as Ae,a as Ie,T as Xn}from"./timepicker-C7DrJdVV.js";import{I as Gn}from"./input-D2HjwqoP.js";import{I as Kn}from"./base-input-C1jq7mBd.js";import{E as Jn}from"./ErrorOutline.esm-D2SwfuYU.js";import"./FormClearHelper-DBsQ33IR.js";import"./inherits-D8N0057t.js";import"./createSuper-BqkNEFMI.js";var Zn=["title","size","color","overrides"];function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},yt.apply(this,arguments)}function eo(e,t){if(e==null)return{};var n=to(e,t),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)o=a[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function to(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,a;for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function ro(e,t){return io(e)||ao(e,t)||oo(e,t)||no()}function no(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oo(e,t){if(e){if(typeof e=="string")return Er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Er(e,t)}}function Er(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function ao(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],r=!0,a=!1,i,s;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(o.push(i.value),!(t&&o.length===t));r=!0);}catch(d){a=!0,s=d}finally{try{!r&&n.return!=null&&n.return()}finally{if(a)throw s}}return o}}function io(e){if(Array.isArray(e))return e}function so(e,t){var n=vr(),o=ro(n,2),r=o[1],a=e.title,i=a===void 0?"Left":a,s=e.size,d=e.color,c=e.overrides,y=c===void 0?{}:c,u=eo(e,Zn),f=wr({component:r.icons&&r.icons.ChevronLeft?r.icons.ChevronLeft:null},y&&y.Svg?Dr(y.Svg):{});return h.createElement(Sr,yt({viewBox:"0 0 24 24",ref:t,title:i,size:s,color:d,overrides:{Svg:f}},u),h.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"}))}const Ar=h.forwardRef(so);var lo=["title","size","color","overrides"];function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},bt.apply(this,arguments)}function uo(e,t){if(e==null)return{};var n=co(e,t),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)o=a[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function co(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,a;for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function po(e,t){return mo(e)||go(e,t)||ho(e,t)||fo()}function fo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ho(e,t){if(e){if(typeof e=="string")return Ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ir(e,t)}}function Ir(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function go(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],r=!0,a=!1,i,s;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(o.push(i.value),!(t&&o.length===t));r=!0);}catch(d){a=!0,s=d}finally{try{!r&&n.return!=null&&n.return()}finally{if(a)throw s}}return o}}function mo(e){if(Array.isArray(e))return e}function yo(e,t){var n=vr(),o=po(n,2),r=o[1],a=e.title,i=a===void 0?"Right":a,s=e.size,d=e.color,c=e.overrides,y=c===void 0?{}:c,u=uo(e,lo),f=wr({component:r.icons&&r.icons.ChevronRight?r.icons.ChevronRight:null},y&&y.Svg?Dr(y.Svg):{});return h.createElement(Sr,bt({viewBox:"0 0 24 24",ref:t,title:i,size:s,color:d,overrides:{Svg:f}},u),h.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 7.29289C8.90237 7.68342 8.90237 8.31658 9.29289 8.70711L12.5858 12L9.29289 15.2929C8.90237 15.6834 8.90237 16.3166 9.29289 16.7071C9.68342 17.0976 10.3166 17.0976 10.7071 16.7071L14.7071 12.7071C14.8946 12.5196 15 12.2652 15 12C15 11.7348 14.8946 11.4804 14.7071 11.2929L10.7071 7.29289C10.3166 6.90237 9.68342 6.90237 9.29289 7.29289Z"}))}const Lr=h.forwardRef(yo);var Rr={exports:{}},vt,Tr;function bo(){if(Tr)return vt;Tr=1;function e(p){return p&&typeof p=="object"&&"default"in p?p.default:p}var t=e(Hn()),n=xn();function o(p,v){for(var O=Object.getOwnPropertyNames(v),m=0;m<O.length;m++){var l=O[m],j=Object.getOwnPropertyDescriptor(v,l);j&&j.configurable&&p[l]===void 0&&Object.defineProperty(p,l,j)}return p}function r(){return(r=Object.assign||function(p){for(var v=1;v<arguments.length;v++){var O=arguments[v];for(var m in O)Object.prototype.hasOwnProperty.call(O,m)&&(p[m]=O[m])}return p}).apply(this,arguments)}function a(p,v){p.prototype=Object.create(v.prototype),o(p.prototype.constructor=p,v)}function i(p,v){if(p==null)return{};var O,m,l={},j=Object.keys(p);for(m=0;m<j.length;m++)O=j[m],0<=v.indexOf(O)||(l[O]=p[O]);return l}function s(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}var d=function(p,v,O,m,l,j,q,re){if(!p){var L;if(v===void 0)L=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var F=[O,m,l,j,q,re],Y=0;(L=new Error(v.replace(/%s/g,function(){return F[Y++]}))).name="Invariant Violation"}throw L.framesToPop=1,L}},c=d;function y(p,v,O){if("selectionStart"in p&&"selectionEnd"in p)p.selectionStart=v,p.selectionEnd=O;else{var m=p.createTextRange();m.collapse(!0),m.moveStart("character",v),m.moveEnd("character",O-v),m.select()}}function u(p){var v=0,O=0;if("selectionStart"in p&&"selectionEnd"in p)v=p.selectionStart,O=p.selectionEnd;else{var m=document.selection.createRange();m.parentElement()===p&&(v=-m.moveStart("character",-p.value.length),O=-m.moveEnd("character",-p.value.length))}return{start:v,end:O,length:O-v}}var f={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},w="_";function b(p,v,O){var m="",l="",j=null,q=[];if(v===void 0&&(v=w),O==null&&(O=f),!p||typeof p!="string")return{maskChar:v,formatChars:O,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var re=!1;return p.split("").forEach(function(L){re=!re&&L==="\\"||(re||!O[L]?(q.push(m.length),m.length===q.length-1&&(l+=L)):j=m.length+1,m+=L,!1)}),{maskChar:v,formatChars:O,prefix:l,mask:m,lastEditablePosition:j,permanents:q}}function g(p,v){return p.permanents.indexOf(v)!==-1}function D(p,v,O){var m=p.mask,l=p.formatChars;if(!O)return!1;if(g(p,v))return m[v]===O;var j=l[m[v]];return new RegExp(j).test(O)}function M(p,v){return v.split("").every(function(O,m){return g(p,m)||!D(p,m,O)})}function S(p,v){var O=p.maskChar,m=p.prefix;if(!O){for(;v.length>m.length&&g(p,v.length-1);)v=v.slice(0,v.length-1);return v.length}for(var l=m.length,j=v.length;j>=m.length;j--){var q=v[j];if(!g(p,j)&&D(p,j,q)){l=j+1;break}}return l}function k(p,v){return S(p,v)===p.mask.length}function C(p,v){var O=p.maskChar,m=p.mask,l=p.prefix;if(!O){for((v=R(p,"",v,0)).length<l.length&&(v=l);v.length<m.length&&g(p,v.length);)v+=m[v.length];return v}if(v)return R(p,C(p,""),v,0);for(var j=0;j<m.length;j++)g(p,j)?v+=m[j]:v+=O;return v}function N(p,v,O,m){var l=O+m,j=p.maskChar,q=p.mask,re=p.prefix,L=v.split("");if(j)return L.map(function(Y,ne){return ne<O||l<=ne?Y:g(p,ne)?q[ne]:j}).join("");for(var F=l;F<L.length;F++)g(p,F)&&(L[F]="");return O=Math.max(re.length,O),L.splice(O,l-O),v=L.join(""),C(p,v)}function R(p,v,O,m){var l=p.mask,j=p.maskChar,q=p.prefix,re=O.split(""),L=k(p,v);return!j&&m>v.length&&(v+=l.slice(v.length,m)),re.every(function(F){for(;se=F,g(p,U=m)&&se!==l[U];){if(m>=v.length&&(v+=l[m]),Y=F,ne=m,j&&g(p,ne)&&Y===j)return!0;if(++m>=l.length)return!1}var Y,ne,U,se;return!D(p,m,F)&&F!==j||(m<v.length?v=j||L||m<q.length?v.slice(0,m)+F+v.slice(m+1):(v=v.slice(0,m)+F+v.slice(m),C(p,v)):j||(v+=F),++m<l.length)}),v}function T(p,v,O,m){var l=p.mask,j=p.maskChar,q=O.split(""),re=m;return q.every(function(L){for(;Y=L,g(p,F=m)&&Y!==l[F];)if(++m>=l.length)return!1;var F,Y;return(D(p,m,L)||L===j)&&m++,m<l.length}),m-re}function B(p,v){for(var O=v;0<=O;--O)if(!g(p,O))return O;return null}function A(p,v){for(var O=p.mask,m=v;m<O.length;++m)if(!g(p,m))return m;return null}function x(p){return p||p===0?p+"":""}function E(p,v,O,m,l){var j=p.mask,q=p.prefix,re=p.lastEditablePosition,L=v,F="",Y=0,ne=0,U=Math.min(l.start,O.start);return O.end>l.start?ne=(Y=T(p,m,F=L.slice(l.start,O.end),U))?l.length:0:L.length<m.length&&(ne=m.length-L.length),L=m,ne&&(ne===1&&!l.length&&(U=l.start===O.start?A(p,O.start):B(p,O.start)),L=N(p,L,U,ne)),L=R(p,L,F,U),(U+=Y)>=j.length?U=j.length:U<q.length&&!Y?U=q.length:U>=q.length&&U<re&&Y&&(U=A(p,U)),F||(F=null),{value:L=C(p,L),enteredString:F,selection:{start:U,end:U}}}function H(){var p=new RegExp("windows","i"),v=new RegExp("phone","i"),O=navigator.userAgent;return p.test(O)&&v.test(O)}function I(p){return typeof p=="function"}function X(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function G(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function me(p){return(G()?X():function(){return setTimeout(p,1e3/60)})(p)}function $(p){(G()||clearTimeout)(p)}var Be=function(p){function v(m){var l=p.call(this,m)||this;l.focused=!1,l.mounted=!1,l.previousSelection=null,l.selectionDeferId=null,l.saveSelectionLoopDeferId=null,l.saveSelectionLoop=function(){l.previousSelection=l.getSelection(),l.saveSelectionLoopDeferId=me(l.saveSelectionLoop)},l.runSaveSelectionLoop=function(){l.saveSelectionLoopDeferId===null&&l.saveSelectionLoop()},l.stopSaveSelectionLoop=function(){l.saveSelectionLoopDeferId!==null&&($(l.saveSelectionLoopDeferId),l.saveSelectionLoopDeferId=null,l.previousSelection=null)},l.getInputDOMNode=function(){if(!l.mounted)return null;var P=n.findDOMNode(s(s(l))),W=typeof window<"u"&&P instanceof window.Element;if(P&&!W)return null;if(P.nodeName!=="INPUT"&&(P=P.querySelector("input")),!P)throw new Error("react-input-mask: inputComponent doesn't contain input node");return P},l.getInputValue=function(){var P=l.getInputDOMNode();return P?P.value:null},l.setInputValue=function(P){var W=l.getInputDOMNode();W&&(l.value=P,W.value=P)},l.setCursorToEnd=function(){var P=S(l.maskOptions,l.value),W=A(l.maskOptions,P);W!==null&&l.setCursorPosition(W)},l.setSelection=function(P,W,Q){Q===void 0&&(Q={});var V=l.getInputDOMNode(),Z=l.isFocused();V&&Z&&(Q.deferred||y(V,P,W),l.selectionDeferId!==null&&$(l.selectionDeferId),l.selectionDeferId=me(function(){l.selectionDeferId=null,y(V,P,W)}),l.previousSelection={start:P,end:W,length:Math.abs(W-P)})},l.getSelection=function(){return u(l.getInputDOMNode())},l.getCursorPosition=function(){return l.getSelection().start},l.setCursorPosition=function(P){l.setSelection(P,P)},l.isFocused=function(){return l.focused},l.getBeforeMaskedValueChangeConfig=function(){var P=l.maskOptions,W=P.mask,Q=P.maskChar,V=P.permanents,Z=P.formatChars;return{mask:W,maskChar:Q,permanents:V,alwaysShowMask:!!l.props.alwaysShowMask,formatChars:Z}},l.isInputAutofilled=function(P,W,Q,V){var Z=l.getInputDOMNode();try{if(Z.matches(":-webkit-autofill"))return!0}catch{}return!l.focused||V.end<Q.length&&W.end===P.length},l.onChange=function(P){var W=s(s(l)).beforePasteState,Q=s(s(l)).previousSelection,V=l.props.beforeMaskedValueChange,Z=l.getInputValue(),ge=l.value,fe=l.getSelection();l.isInputAutofilled(Z,fe,ge,Q)&&(ge=C(l.maskOptions,""),Q={start:0,end:0,length:0}),W&&(Q=W.selection,ge=W.value,fe={start:Q.start+Z.length,end:Q.start+Z.length,length:0},Z=ge.slice(0,Q.start)+Z+ge.slice(Q.end),l.beforePasteState=null);var Me=E(l.maskOptions,Z,fe,ge,Q),Je=Me.enteredString,be=Me.selection,Ee=Me.value;if(I(V)){var $e=V({value:Ee,selection:be},{value:ge,selection:Q},Je,l.getBeforeMaskedValueChangeConfig());Ee=$e.value,be=$e.selection}l.setInputValue(Ee),I(l.props.onChange)&&l.props.onChange(P),l.isWindowsPhoneBrowser?l.setSelection(be.start,be.end,{deferred:!0}):l.setSelection(be.start,be.end)},l.onFocus=function(P){var W=l.props.beforeMaskedValueChange,Q=l.maskOptions,V=Q.mask,Z=Q.prefix;if(l.focused=!0,l.mounted=!0,V){if(l.value)S(l.maskOptions,l.value)<l.maskOptions.mask.length&&l.setCursorToEnd();else{var ge=C(l.maskOptions,Z),fe=C(l.maskOptions,ge),Me=S(l.maskOptions,fe),Je=A(l.maskOptions,Me),be={start:Je,end:Je};if(I(W)){var Ee=W({value:fe,selection:be},{value:l.value,selection:null},null,l.getBeforeMaskedValueChangeConfig());fe=Ee.value,be=Ee.selection}var $e=fe!==l.getInputValue();$e&&l.setInputValue(fe),$e&&I(l.props.onChange)&&l.props.onChange(P),l.setSelection(be.start,be.end)}l.runSaveSelectionLoop()}I(l.props.onFocus)&&l.props.onFocus(P)},l.onBlur=function(P){var W=l.props.beforeMaskedValueChange,Q=l.maskOptions.mask;if(l.stopSaveSelectionLoop(),l.focused=!1,Q&&!l.props.alwaysShowMask&&M(l.maskOptions,l.value)){var V="";I(W)&&(V=W({value:V,selection:null},{value:l.value,selection:l.previousSelection},null,l.getBeforeMaskedValueChangeConfig()).value);var Z=V!==l.getInputValue();Z&&l.setInputValue(V),Z&&I(l.props.onChange)&&l.props.onChange(P)}I(l.props.onBlur)&&l.props.onBlur(P)},l.onMouseDown=function(P){if(!l.focused&&document.addEventListener){l.mouseDownX=P.clientX,l.mouseDownY=P.clientY,l.mouseDownTime=new Date().getTime();var W=function Q(V){if(document.removeEventListener("mouseup",Q),l.focused){var Z=Math.abs(V.clientX-l.mouseDownX),ge=Math.abs(V.clientY-l.mouseDownY),fe=Math.max(Z,ge),Me=new Date().getTime()-l.mouseDownTime;(fe<=10&&Me<=200||fe<=5&&Me<=300)&&l.setCursorToEnd()}};document.addEventListener("mouseup",W)}I(l.props.onMouseDown)&&l.props.onMouseDown(P)},l.onPaste=function(P){I(l.props.onPaste)&&l.props.onPaste(P),P.defaultPrevented||(l.beforePasteState={value:l.getInputValue(),selection:l.getSelection()},l.setInputValue(""))},l.handleRef=function(P){l.props.children==null&&I(l.props.inputRef)&&l.props.inputRef(P)};var j=m.mask,q=m.maskChar,re=m.formatChars,L=m.alwaysShowMask,F=m.beforeMaskedValueChange,Y=m.defaultValue,ne=m.value;l.maskOptions=b(j,q,re),Y==null&&(Y=""),ne==null&&(ne=Y);var U=x(ne);if(l.maskOptions.mask&&(L||U)&&(U=C(l.maskOptions,U),I(F))){var se=m.value;m.value==null&&(se=Y),U=F({value:U,selection:null},{value:se=x(se),selection:null},null,l.getBeforeMaskedValueChangeConfig()).value}return l.value=U,l}a(v,p);var O=v.prototype;return O.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=H(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},O.componentDidUpdate=function(){var m=this.previousSelection,l=this.props,j=l.beforeMaskedValueChange,q=l.alwaysShowMask,re=l.mask,L=l.maskChar,F=l.formatChars,Y=this.maskOptions,ne=q||this.isFocused(),U=this.props.value!=null,se=U?x(this.props.value):this.value,P=m?m.start:null;if(this.maskOptions=b(re,L,F),this.maskOptions.mask){!Y.mask&&this.isFocused()&&this.runSaveSelectionLoop();var W=this.maskOptions.mask&&this.maskOptions.mask!==Y.mask;if(Y.mask||U||(se=this.getInputValue()),(W||this.maskOptions.mask&&(se||ne))&&(se=C(this.maskOptions,se)),W){var Q=S(this.maskOptions,se);(P===null||Q<P)&&(P=k(this.maskOptions,se)?Q:A(this.maskOptions,Q))}!this.maskOptions.mask||!M(this.maskOptions,se)||ne||U&&this.props.value||(se="");var V={start:P,end:P};if(I(j)){var Z=j({value:se,selection:V},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());se=Z.value,V=Z.selection}this.value=se;var ge=this.getInputValue()!==this.value;ge?(this.setInputValue(this.value),this.forceUpdate()):W&&this.forceUpdate();var fe=!1;V.start!=null&&V.end!=null&&(fe=!m||m.start!==V.start||m.end!==V.end),(fe||ge)&&this.setSelection(V.start,V.end)}else Y.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},O.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&$(this.selectionDeferId),this.stopSaveSelectionLoop()},O.render=function(){var m,l=this.props,j=(l.mask,l.alwaysShowMask,l.maskChar,l.formatChars,l.inputRef,l.beforeMaskedValueChange,l.children),q=i(l,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(j){I(j)||c(!1);var re=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],L=r({},q);re.forEach(function(Y){return delete L[Y]}),m=j(L),re.filter(function(Y){return m.props[Y]!=null&&m.props[Y]!==q[Y]}).length&&c(!1)}else m=t.createElement("input",r({ref:this.handleRef},q));var F={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(q.disabled||q.readOnly||(F.onChange=this.onChange,F.onPaste=this.onPaste,F.onMouseDown=this.onMouseDown),q.value!=null&&(F.value=this.value)),m=t.cloneElement(m,F)},v}(t.Component);return vt=Be,vt}var Br;function vo(){return Br||(Br=1,Rr.exports=bo()),Rr.exports}var wo=vo();const Do=En(wo);var So=["startEnhancer","endEnhancer","error","positive","onChange","onFocus","onBlur","value","disabled","readOnly"],Oo=["Input"],ko=["mask","maskChar","overrides"];function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$r(Object(n),!0).forEach(function(o){Mo(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Mo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ze.apply(this,arguments)}function Dt(e,t){if(e==null)return{};var n=Co(e,t),o,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)o=a[r],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Co(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,a;for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var Fr=h.forwardRef(function(e,t){e.startEnhancer,e.endEnhancer,e.error,e.positive;var n=e.onChange,o=e.onFocus,r=e.onBlur,a=e.value,i=e.disabled,s=e.readOnly,d=Dt(e,So);return h.createElement(Do,ze({onChange:n,onFocus:o,onBlur:r,value:a,disabled:i,readOnly:s},d),function(c){return h.createElement(Kn,ze({ref:t,onChange:n,onFocus:o,onBlur:r,value:a,disabled:i,readOnly:s},c))})});Fr.displayName="MaskOverride";function Wr(e){var t=e.mask,n=e.maskChar,o=e.overrides;o=o===void 0?{}:o;var r=o.Input,a=r===void 0?{}:r,i=Dt(o,Oo),s=Dt(e,ko),d=Fr,c={},y={};typeof a=="function"?d=a:Ze(a)==="object"&&(d=a.component||d,c=a.props||{},y=a.style||{}),Ze(c)==="object"&&(c=wt(wt({},c),{},{mask:c.mask||t,maskChar:c.maskChar||n}));var u=wt({Input:{component:d,props:c,style:y}},i);return h.createElement(Gn,ze({},s,{overrides:u}))}Wr.defaultProps={maskChar:" "};var St=Object.freeze({horizontal:"horizontal",vertical:"vertical"}),Nr=[0,1,2,3,4,5,6],Po=[0,1,2,3,4,5,6,7,8,9,10,11],ae={high:"high",default:"default"},ke={startDate:"startDate",endDate:"endDate"},jo={locked:"locked"};function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(n),!0).forEach(function(o){Ho(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ot=K("label",function(e){var t=e.$disabled,n=e.$theme,o=n.colors,r=n.typography;return Le(Le({},r.font250),{},{width:"100%",color:t?o.contentSecondary:o.contentPrimary,display:"block",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0})});Ot.displayName="Label",Ot.displayName="Label";var kt=K("span",function(e){var t=e.$theme.sizing;return{display:"flex",width:"100%",marginTop:t.scale300,marginRight:0,marginBottom:t.scale300,marginLeft:0}});kt.displayName="LabelContainer",kt.displayName="LabelContainer";var Mt=K("span",function(e){var t=e.$disabled,n=e.$counterError,o=e.$theme,r=o.colors,a=o.typography;return Le(Le({},a.font100),{},{flex:0,width:"100%",color:n?r.negative400:t?r.contentSecondary:r.contentPrimary})});Mt.displayName="LabelEndEnhancer",Mt.displayName="LabelEndEnhancer";var Ct=K("div",function(e){var t=e.$error,n=e.$positive,o=e.$theme,r=o.colors,a=o.sizing,i=o.typography,s=r.contentSecondary;return t?s=r.negative400:n&&(s=r.positive400),Le(Le({},i.font100),{},{color:s,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:a.scale300,marginRight:0,marginBottom:a.scale300,marginLeft:0})});Ct.displayName="Caption",Ct.displayName="Caption";var Pt=K("div",function(e){var t=e.$theme.sizing;return{width:"100%",marginBottom:t.scale600}});Pt.displayName="ControlContainer",Pt.displayName="ControlContainer";function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},He.apply(this,arguments)}function et(e){"@babel/helpers - typeof";return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(e)}function xo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ao(e,t,n){return t&&Eo(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Io(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jt(e,t)}function jt(e,t){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},jt(e,t)}function Lo(e){var t=Bo();return function(){var n=tt(e),o;if(t){var r=tt(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Ro(this,o)}}function Ro(e,t){if(t&&(et(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return To(e)}function To(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bo(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tt(e)}function $o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fo(e,t,n,o){return t&&typeof t!="boolean"?typeof t=="function"?t(o):t:n&&typeof n!="boolean"?typeof n=="function"?n(o):n:e?typeof e=="function"?e(o):e:null}var Ht=function(e){Io(n,e);var t=Lo(n);function n(){return xo(this,n),t.apply(this,arguments)}return Ao(n,[{key:"render",value:function(){var o=this.props,r=o.overrides,a=r.Label,i=r.LabelEndEnhancer,s=r.LabelContainer,d=r.Caption,c=r.ControlContainer,y=o.label,u=o.caption,f=o.disabled,w=o.error,b=o.positive,g=o.htmlFor,D=o.children,M=o.counter,S=h.Children.only(D).props,k={$disabled:!!f,$error:!!w,$positive:!!b},C=Fe(a)||Ot,N=Fe(i)||Mt,R=Fe(s)||kt,T=Fe(d)||Ct,B=Fe(c)||Pt,A=Fo(u,w,b,k),x=this.props.labelEndEnhancer;if(M){var E=null,H=null,I=null;et(M)==="object"&&(H=M.length,E=M.maxLength,I=M.error),E=E||S.maxLength,H==null&&typeof S.value=="string"&&(H=S.value.length),H==null&&(H=0),k.$length=H,E==null?x||(x="".concat(H)):(k.$maxLength=H,x||(x="".concat(H,"/").concat(E)),H>E&&I==null&&(I=!0)),I&&(k.$error=!0,k.$counterError=!0)}return h.createElement(h.Fragment,null,y&&h.createElement(R,He({},k,We(s)),h.createElement(C,He({"data-baseweb":"form-control-label",htmlFor:g||S.id},k,We(a)),typeof y=="function"?y(k):y),!!x&&h.createElement(N,He({},k,We(i)),typeof x=="function"?x(k):x)),h.createElement(An,null,function(X){return h.createElement(B,He({"data-baseweb":"form-control-container"},k,We(c)),h.Children.map(D,function(G,me){if(G){var $=G.key||String(me);return h.cloneElement(G,{key:$,"aria-errormessage":w?X:null,"aria-describedby":u||b?X:null,disabled:S.disabled||f,error:typeof S.error<"u"?S.error:k.$error,positive:typeof S.positive<"u"?S.positive:k.$positive})}}),(!!u||!!w||b)&&h.createElement(T,He({"data-baseweb":"form-control-caption",id:X},k,We(d)),A))}))}}]),n}(h.Component);$o(Ht,"defaultProps",{overrides:{},label:null,caption:null,disabled:!1,counter:!1});function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Vr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zr(Object(n),!0).forEach(function(o){Wo(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Wo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var No=function(e){return Po.map(function(t){return{id:t.toString(),label:e(t)}})},Yo=function(e,t){return e.map(function(n){return t.includes(Number(n.id))?n:Vr(Vr({},n),{},{disabled:!0})})},zo=function(e){var t=e.filterMonthsList,n=e.formatMonthLabel,o=No(n);return t&&(o=Yo(o,t)),o};function Vo(e){var t=e.$range,n=t===void 0?!1:t,o=e.$disabled,r=o===void 0?!1:o,a=e.$isHighlighted,i=a===void 0?!1:a,s=e.$isHovered,d=s===void 0?!1:s,c=e.$selected,y=c===void 0?!1:c,u=e.$hasRangeSelected,f=u===void 0?!1:u,w=e.$startDate,b=w===void 0?!1:w,g=e.$endDate,D=g===void 0?!1:g,M=e.$pseudoSelected,S=M===void 0?!1:M,k=e.$hasRangeHighlighted,C=k===void 0?!1:k,N=e.$pseudoHighlighted,R=N===void 0?!1:N,T=e.$hasRangeOnRight,B=T===void 0?!1:T,A=e.$startOfMonth,x=A===void 0?!1:A,E=e.$endOfMonth,H=E===void 0?!1:E,I=e.$outsideMonth,X=I===void 0?!1:I;return"".concat(+n).concat(+r).concat(+(i||d)).concat(+y).concat(+f).concat(+b).concat(+D).concat(+S).concat(+C).concat(+R).concat(+(C&&!R&&B)).concat(+(C&&!R&&!B)).concat(+x).concat(+H).concat(+X)}function _o(e,t){return Xo(e)||Qo(e,t)||Uo(e,t)||qo()}function qo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uo(e,t){if(e){if(typeof e=="string")return _r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _r(e,t)}}function _r(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Qo(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o=[],r=!0,a=!1,i,s;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(o.push(i.value),!(t&&o.length===t));r=!0);}catch(d){a=!0,s=d}finally{try{!r&&n.return!=null&&n.return()}finally{if(a)throw s}}return o}}function Xo(e){if(Array.isArray(e))return e}function qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qr(Object(n),!0).forEach(function(o){Ve(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qr(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt=K("div",function(e){var t=e.$separateRangeInputs;return oe({width:"100%"},t?{display:"flex",justifyContent:"center"}:{})});xt.displayName="StyledInputWrapper",xt.displayName="StyledInputWrapper";var Et=K("div",function(e){var t=e.$theme;return oe(oe({},t.typography.LabelMedium),{},{marginBottom:t.sizing.scale300})});Et.displayName="StyledInputLabel",Et.displayName="StyledInputLabel";var At=K("div",function(e){var t=e.$theme;return{width:"100%",marginRight:t.sizing.scale300}});At.displayName="StyledStartDate",At.displayName="StyledStartDate";var It=K("div",function(e){return e.$theme,{width:"100%"}});It.displayName="StyledEndDate",It.displayName="StyledEndDate";var Lt=K("div",function(e){var t=e.$theme,n=t.typography,o=t.colors,r=t.borders;return oe(oe({},n.font200),{},{color:o.calendarForeground,backgroundColor:o.calendarBackground,textAlign:"center",borderTopLeftRadius:r.surfaceBorderRadius,borderTopRightRadius:r.surfaceBorderRadius,borderBottomRightRadius:r.surfaceBorderRadius,borderBottomLeftRadius:r.surfaceBorderRadius,display:"inline-block"})});Lt.displayName="StyledRoot",Lt.displayName="StyledRoot";var Rt=K("div",function(e){var t=e.$orientation;return{display:"flex",flexDirection:t===St.vertical?"column":"row"}});Rt.displayName="StyledMonthContainer",Rt.displayName="StyledMonthContainer";var Tt=K("div",function(e){var t=e.$theme.sizing,n=e.$density;return{paddingTop:t.scale300,paddingBottom:n===ae.high?t.scale400:t.scale300,paddingLeft:t.scale500,paddingRight:t.scale500}});Tt.displayName="StyledCalendarContainer",Tt.displayName="StyledCalendarContainer";var rt=K("div",function(e){var t=e.$theme,n=t.direction==="rtl"?"right":"left";return{marginBottom:t.sizing.scale600,paddingLeft:t.sizing.scale600,paddingRight:t.sizing.scale600,textAlign:n}});rt.displayName="StyledSelectorContainer",rt.displayName="StyledSelectorContainer";var Bt=K("div",function(e){var t=e.$theme,n=t.typography,o=t.borders,r=t.colors,a=t.sizing,i=e.$density;return oe(oe({},i===ae.high?n.LabelMedium:n.LabelLarge),{},{color:r.calendarHeaderForeground,display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:a.scale600,paddingBottom:a.scale300,paddingLeft:a.scale600,paddingRight:a.scale600,backgroundColor:r.calendarHeaderBackground,borderTopLeftRadius:o.surfaceBorderRadius,borderTopRightRadius:o.surfaceBorderRadius,borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:i===ae.high?"calc(".concat(a.scale800," + ").concat(a.scale0,")"):a.scale950})});Bt.displayName="StyledCalendarHeader",Bt.displayName="StyledCalendarHeader";var $t=K("div",function(e){return{color:e.$theme.colors.calendarHeaderForeground,backgroundColor:e.$theme.colors.calendarHeaderBackground,whiteSpace:"nowrap"}});$t.displayName="StyledMonthHeader",$t.displayName="StyledMonthHeader";var Ft=K("button",function(e){var t=e.$theme,n=t.typography,o=t.colors,r=e.$isFocusVisible,a=e.$density;return oe(oe({},a===ae.high?n.LabelMedium:n.LabelLarge),{},{alignItems:"center",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,color:o.calendarHeaderForeground,cursor:"pointer",display:"flex",outline:"none",":focus":{boxShadow:r?"0 0 0 3px ".concat(o.accent):"none"}})});Ft.displayName="StyledMonthYearSelectButton",Ft.displayName="StyledMonthYearSelectButton";var Wt=K("span",function(e){var t=e.$theme.direction==="rtl"?"marginRight":"marginLeft";return Ve({alignItems:"center",display:"flex"},t,e.$theme.sizing.scale500)});Wt.displayName="StyledMonthYearSelectIconContainer",Wt.displayName="StyledMonthYearSelectIconContainer";function Ur(e){var t=e.$theme,n=e.$disabled,o=e.$isFocusVisible;return{boxSizing:"border-box",display:"flex",color:n?t.colors.calendarHeaderForegroundDisabled:t.colors.calendarHeaderForeground,cursor:n?"default":"pointer",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0",marginBottom:0,marginTop:0,outline:"none",":focus":n?{}:{boxShadow:o?"0 0 0 3px ".concat(t.colors.accent):"none"}}}var Nt=K("button",Ur);Nt.displayName="StyledPrevButton",Nt.displayName="StyledPrevButton";var Yt=K("button",Ur);Yt.displayName="StyledNextButton",Yt.displayName="StyledNextButton";var zt=K("div",function(e){return{display:"inline-block"}});zt.displayName="StyledMonth",zt.displayName="StyledMonth";var Vt=K("div",function(e){var t=e.$theme.sizing;return{whiteSpace:"nowrap",display:"flex",marginBottom:t.scale0}});Vt.displayName="StyledWeek",Vt.displayName="StyledWeek";function J(e,t){var n,o=e.substr(0,12)+"1"+e.substr(13),r=e.substr(0,13)+"1"+e.substr(14);return n={},Ve(n,e,t),Ve(n,o,t),Ve(n,r,t),n}function _t(e,t){var n=t.colors,o={":before":{content:null},":after":{content:null}},r=o,a={color:n.calendarForegroundDisabled,":before":{content:null},":after":{content:null}},i={color:n.calendarForegroundDisabled,":before":{borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",backgroundColor:"transparent"},":after":{borderTopLeftRadius:"0%",borderTopRightRadius:"0%",borderBottomLeftRadius:"0%",borderBottomRightRadius:"0%",borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}},s={":before":{content:null}},d=1;e&&e[d]==="1"&&(r=a);var c=Object.assign({},J("001000000000000",{color:n.calendarDayForegroundPseudoSelected}),J("000100000000000",{color:n.calendarDayForegroundSelected}),J("001100000000000",{color:n.calendarDayForegroundSelectedHighlighted}),{"010000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},{"011000000000000":{color:n.calendarForegroundDisabled,":after":{content:null}}},J("000000000000001",i),J("101000000000000",s),J("101010000000000",s),J("100100000000000",{color:n.calendarDayForegroundSelected}),J("101100000000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),J("100111100000000",{color:n.calendarDayForegroundSelected,":before":{content:null}}),J("101111100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{content:null}}),J("100111000000000",{color:n.calendarDayForegroundSelected}),J("100110100000000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),J("100100001010000",{color:n.calendarDayForegroundSelected}),J("100100001001000",{color:n.calendarDayForegroundSelected,":before":{left:null,right:"50%"}}),J("101000001010000",{":before":{left:null,right:"50%"}}),{"101000001001000":{}},{"101000001001100":{}},{"101000001001010":{}},J("100010010000000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),{"101000001100000":{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}},J("100000001100000",{color:n.calendarDayForegroundPseudoSelected,":before":{left:"0",width:"100%"},":after":{content:null}}),J("101111000000000",{color:n.calendarDayForegroundSelectedHighlighted}),J("101110100000000",{color:n.calendarDayForegroundSelectedHighlighted,":before":{left:null,right:"50%"}}),J("101010010000000",{color:n.calendarDayForegroundPseudoSelectedHighlighted,":before":{left:"0",width:"100%"}}),J("100000000000001",i),J("100000001010001",i),J("100000001001001",i),J("100010000000001",i));return c[e]||r}var qt=K("div",function(e){var t=e.$disabled,n=e.$isFocusVisible,o=e.$isHighlighted,r=e.$peekNextMonth,a=e.$pseudoSelected,i=e.$range,s=e.$selected,d=e.$outsideMonth,c=e.$outsideMonthWithinRange,y=e.$hasDateLabel,u=e.$density,f=e.$hasLockedBehavior,w=e.$selectedInput,b=e.$value,g=e.$theme,D=g.colors,M=g.typography,S=g.sizing,k=Vo(e),C;y?u===ae.high?C="60px":C="70px":u===ae.high?C="40px":C="48px";var N=Array.isArray(b)?b:[b,null],R=_o(N,2),T=R[0],B=R[1],A=w===ke.startDate?B!==null&&typeof B<"u":T!==null&&typeof T<"u",x=i&&!(f&&!A);return oe(oe(oe({},u===ae.high?M.ParagraphSmall:M.ParagraphMedium),{},{boxSizing:"border-box",position:"relative",cursor:t||!r&&d?"default":"pointer",color:D.calendarForeground,display:"inline-block",width:u===ae.high?"42px":"50px",height:C,lineHeight:u===ae.high?S.scale700:S.scale900,textAlign:"center",paddingTop:S.scale300,paddingBottom:S.scale300,paddingLeft:S.scale300,paddingRight:S.scale300,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,outline:"none",backgroundColor:"transparent",transform:"scale(1)"},_t(k,e.$theme)),{},{":after":oe(oe({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",boxShadow:n&&(!d||r)?"0 0 0 3px ".concat(D.accent):"none",backgroundColor:s?D.calendarDayBackgroundSelectedHighlighted:a&&o?D.calendarDayBackgroundPseudoSelectedHighlighted:D.calendarBackground,height:y?"100%":u===ae.high?"42px":"50px",width:"100%",position:"absolute",top:y?0:"-1px",left:0,paddingTop:S.scale200,paddingBottom:S.scale200,borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderTopColor:D.borderSelected,borderBottomColor:D.borderSelected,borderRightColor:D.borderSelected,borderLeftColor:D.borderSelected,borderTopLeftRadius:y?S.scale800:"100%",borderTopRightRadius:y?S.scale800:"100%",borderBottomLeftRadius:y?S.scale800:"100%",borderBottomRightRadius:y?S.scale800:"100%"},_t(k,e.$theme)[":after"]||{}),c?{content:null}:{})},x?{":before":oe(oe({zIndex:-1,content:'""',boxSizing:"border-box",display:"inline-block",backgroundColor:D.mono300,position:"absolute",height:"100%",width:"50%",top:0,left:"50%",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftWidth:"0",borderRightWidth:"0",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},_t(k,e.$theme)[":before"]||{}),c?{backgroundColor:D.mono300,left:"0",width:"100%",content:'""'}:{})}:{})});qt.displayName="StyledDay",qt.displayName="StyledDay";var Ut=K("div",function(e){var t=e.$theme,n=t.typography,o=t.colors,r=e.$selected;return oe(oe({},n.ParagraphXSmall),{},{color:r?o.contentInverseTertiary:o.contentTertiary})});Ut.displayName="StyledDayLabel",Ut.displayName="StyledDayLabel";var Qt=K("div",function(e){var t=e.$theme,n=t.typography,o=t.colors,r=t.sizing,a=e.$density;return oe(oe({},n.LabelMedium),{},{color:o.contentTertiary,boxSizing:"border-box",position:"relative",cursor:"default",display:"inline-block",width:a===ae.high?"42px":"50px",height:a===ae.high?"40px":"48px",textAlign:"center",lineHeight:r.scale900,paddingTop:r.scale300,paddingBottom:r.scale300,paddingLeft:r.scale200,paddingRight:r.scale200,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,backgroundColor:"transparent"})});Qt.displayName="StyledWeekdayHeader",Qt.displayName="StyledWeekdayHeader";function Xt(e){"@babel/helpers - typeof";return Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(e)}function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},he.apply(this,arguments)}function ve(e,t){return Zo(e)||Jo(e,t)||Ko(e,t)||Go()}function Go(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -1,4 +1,4 @@
1
- import{r as h,E as B,_ as F,L as Bt,F as $,H,bK as ht,bT as Ft,bU as zt,bV as Vt,c as k,j as f,bW as _t,bX as $t,bF as Ht,bY as Xt,l as Gt,bZ as qt,ap as Yt,b_ as Q,aq as Jt,b4 as Kt,b$ as Zt,c0 as Qt,c1 as te,bJ as ee}from"./index-DCNLpqIv.js";import{T as ie,a as ut}from"./Toolbar-DiWCQxr5.js";import{u as se,F as re}from"./FormClearHelper-fvwQICEk.js";import{c as ne}from"./createDownloadLinkElement-ZaXNnPK4.js";import{u as oe}from"./Hooks-CCS44jMc.js";import{F as ae,D as le}from"./FileDownload.esm-kSzyJagP.js";var pt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});pt.displayName="Mic";var mt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});mt.displayName="Pause";var gt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});gt.displayName="PlayArrow";var ft=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});ft.displayName="Refresh";var vt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});vt.displayName="StopCircle";function R(s,t,e,i){return new(e||(e=Promise))(function(r,n){function o(d){try{c(i.next(d))}catch(l){n(l)}}function a(d){try{c(i.throw(d))}catch(l){n(l)}}function c(d){var l;d.done?r(d.value):(l=d.value,l instanceof e?l:new e(function(p){p(l)})).then(o,a)}c((i=i.apply(s,t||[])).next())})}let z=class{constructor(){this.listeners={}}on(s,t,e){if(this.listeners[s]||(this.listeners[s]=new Set),this.listeners[s].add(t),e?.once){const i=()=>{this.un(s,i),this.un(s,t)};return this.on(s,i),i}return()=>this.un(s,t)}un(s,t){var e;(e=this.listeners[s])===null||e===void 0||e.delete(t)}once(s,t){return this.on(s,t,{once:!0})}unAll(){this.listeners={}}emit(s,...t){this.listeners[s]&&this.listeners[s].forEach(e=>e(...t))}};const X={decode:function(s,t){return R(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(r=>r>1||r<-1)){const r=i.length;let n=0;for(let o=0;o<r;o++){const a=Math.abs(i[o]);a>n&&(n=a)}for(const o of e)for(let a=0;a<r;a++)o[a]/=n}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s?.[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function bt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,r]of Object.entries(t))if(i==="children"&&r)for(const[n,o]of Object.entries(r))o instanceof Node?e.appendChild(o):typeof o=="string"?e.appendChild(document.createTextNode(o)):e.appendChild(bt(n,o));else i==="style"?Object.assign(e.style,r):i==="textContent"?e.textContent=r:e.setAttribute(i,r.toString());return e}function yt(s,t,e){const i=bt(s,t||{});return e?.appendChild(i),i}var de=Object.freeze({__proto__:null,createElement:yt,default:yt});const ce={fetchBlob:function(s,t,e){return R(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(r,n){R(this,void 0,void 0,function*(){if(!r.body||!r.headers)return;const o=r.body.getReader(),a=Number(r.headers.get("Content-Length"))||0;let c=0;const d=p=>R(this,void 0,void 0,function*(){c+=p?.length||0;const u=Math.round(c/a*100);n(u)}),l=()=>R(this,void 0,void 0,function*(){let p;try{p=yield o.read()}catch{return}p.done||(d(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class he extends z{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;if(i&&this.media.removeAttribute("src"),r||t)try{this.media.src=r}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load())}setMediaElement(t){this.media=t}play(){return R(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class N extends z{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[r,n]=this.initHtml();i.appendChild(r),this.container=r,this.scrollContainer=n.querySelector(".scroll"),this.wrapper=n.querySelector(".wrapper"),this.canvasWrapper=n.querySelector(".canvases"),this.progressWrapper=n.querySelector(".progress"),this.cursor=n.querySelector(".cursor"),e&&n.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),r=e.clientX-i.left,n=e.clientY-i.top;return[r/i.width,n/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,r]=t(e);this.emit("click",i,r)}),this.wrapper.addEventListener("dblclick",e=>{const[i,r]=t(e);this.emit("dblclick",i,r)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:r}=this.scrollContainer,n=e/i,o=(e+r)/i;this.emit("scroll",n,o,e,e+r)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,r,n=3,o=0,a=100){if(!t)return()=>{};const c=matchMedia("(pointer: coarse)").matches;let d=()=>{};const l=p=>{if(p.button!==o)return;p.preventDefault(),p.stopPropagation();let u=p.clientX,m=p.clientY,g=!1;const y=Date.now(),v=w=>{if(w.preventDefault(),w.stopPropagation(),c&&Date.now()-y<a)return;const P=w.clientX,W=w.clientY,A=P-u,D=W-m;if(g||Math.abs(A)>n||Math.abs(D)>n){const j=t.getBoundingClientRect(),{left:U,top:L}=j;g||(i?.(u-U,m-L),g=!0),e(A,D,P-U,W-L),u=P,m=W}},C=w=>{if(g){const P=w.clientX,W=w.clientY,A=t.getBoundingClientRect(),{left:D,top:j}=A;r?.(P-D,W-j)}d()},b=w=>{w.relatedTarget&&w.relatedTarget!==document.documentElement||C(w)},M=w=>{g&&(w.stopPropagation(),w.preventDefault())},E=w=>{g&&w.preventDefault()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",C),document.addEventListener("pointerout",b),document.addEventListener("pointercancel",b),document.addEventListener("touchmove",E,{passive:!1}),document.addEventListener("click",M,{capture:!0}),d=()=>{document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",C),document.removeEventListener("pointerout",b),document.removeEventListener("pointercancel",b),document.removeEventListener("touchmove",E),setTimeout(()=>{document.removeEventListener("click",M,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{d(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const r=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const n=this.parent.clientHeight||128;return e?.every(o=>!o.overlay)?n/r:n}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
1
+ import{r as h,E as B,_ as F,L as Bt,F as $,H,bK as ht,bT as Ft,bU as zt,bV as Vt,c as k,j as f,bW as _t,bX as $t,bF as Ht,bY as Xt,l as Gt,bZ as qt,ap as Yt,b_ as Q,aq as Jt,b4 as Kt,b$ as Zt,c0 as Qt,c1 as te,bJ as ee}from"./index-clm6On2Y.js";import{T as ie,a as ut}from"./Toolbar-AvCHJeN3.js";import{u as se,F as re}from"./FormClearHelper-DBsQ33IR.js";import{c as ne}from"./createDownloadLinkElement-ZaXNnPK4.js";import{u as oe}from"./Hooks-BdfQKLev.js";import{F as ae,D as le}from"./FileDownload.esm-C2Gywq_5.js";var pt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});pt.displayName="Mic";var mt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});mt.displayName="Pause";var gt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});gt.displayName="PlayArrow";var ft=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});ft.displayName="Refresh";var vt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement(B,F({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});vt.displayName="StopCircle";function R(s,t,e,i){return new(e||(e=Promise))(function(r,n){function o(d){try{c(i.next(d))}catch(l){n(l)}}function a(d){try{c(i.throw(d))}catch(l){n(l)}}function c(d){var l;d.done?r(d.value):(l=d.value,l instanceof e?l:new e(function(p){p(l)})).then(o,a)}c((i=i.apply(s,t||[])).next())})}let z=class{constructor(){this.listeners={}}on(s,t,e){if(this.listeners[s]||(this.listeners[s]=new Set),this.listeners[s].add(t),e?.once){const i=()=>{this.un(s,i),this.un(s,t)};return this.on(s,i),i}return()=>this.un(s,t)}un(s,t){var e;(e=this.listeners[s])===null||e===void 0||e.delete(t)}once(s,t){return this.on(s,t,{once:!0})}unAll(){this.listeners={}}emit(s,...t){this.listeners[s]&&this.listeners[s].forEach(e=>e(...t))}};const X={decode:function(s,t){return R(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(r=>r>1||r<-1)){const r=i.length;let n=0;for(let o=0;o<r;o++){const a=Math.abs(i[o]);a>n&&(n=a)}for(const o of e)for(let a=0;a<r;a++)o[a]/=n}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s?.[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function bt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,r]of Object.entries(t))if(i==="children"&&r)for(const[n,o]of Object.entries(r))o instanceof Node?e.appendChild(o):typeof o=="string"?e.appendChild(document.createTextNode(o)):e.appendChild(bt(n,o));else i==="style"?Object.assign(e.style,r):i==="textContent"?e.textContent=r:e.setAttribute(i,r.toString());return e}function yt(s,t,e){const i=bt(s,t||{});return e?.appendChild(i),i}var de=Object.freeze({__proto__:null,createElement:yt,default:yt});const ce={fetchBlob:function(s,t,e){return R(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(r,n){R(this,void 0,void 0,function*(){if(!r.body||!r.headers)return;const o=r.body.getReader(),a=Number(r.headers.get("Content-Length"))||0;let c=0;const d=p=>R(this,void 0,void 0,function*(){c+=p?.length||0;const u=Math.round(c/a*100);n(u)}),l=()=>R(this,void 0,void 0,function*(){let p;try{p=yield o.read()}catch{return}p.done||(d(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class he extends z{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;if(i&&this.media.removeAttribute("src"),r||t)try{this.media.src=r}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load())}setMediaElement(t){this.media=t}play(){return R(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class N extends z{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[r,n]=this.initHtml();i.appendChild(r),this.container=r,this.scrollContainer=n.querySelector(".scroll"),this.wrapper=n.querySelector(".wrapper"),this.canvasWrapper=n.querySelector(".canvases"),this.progressWrapper=n.querySelector(".progress"),this.cursor=n.querySelector(".cursor"),e&&n.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),r=e.clientX-i.left,n=e.clientY-i.top;return[r/i.width,n/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,r]=t(e);this.emit("click",i,r)}),this.wrapper.addEventListener("dblclick",e=>{const[i,r]=t(e);this.emit("dblclick",i,r)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:r}=this.scrollContainer,n=e/i,o=(e+r)/i;this.emit("scroll",n,o,e,e+r)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,r,n=3,o=0,a=100){if(!t)return()=>{};const c=matchMedia("(pointer: coarse)").matches;let d=()=>{};const l=p=>{if(p.button!==o)return;p.preventDefault(),p.stopPropagation();let u=p.clientX,m=p.clientY,g=!1;const y=Date.now(),v=w=>{if(w.preventDefault(),w.stopPropagation(),c&&Date.now()-y<a)return;const P=w.clientX,W=w.clientY,A=P-u,D=W-m;if(g||Math.abs(A)>n||Math.abs(D)>n){const j=t.getBoundingClientRect(),{left:U,top:L}=j;g||(i?.(u-U,m-L),g=!0),e(A,D,P-U,W-L),u=P,m=W}},C=w=>{if(g){const P=w.clientX,W=w.clientY,A=t.getBoundingClientRect(),{left:D,top:j}=A;r?.(P-D,W-j)}d()},b=w=>{w.relatedTarget&&w.relatedTarget!==document.documentElement||C(w)},M=w=>{g&&(w.stopPropagation(),w.preventDefault())},E=w=>{g&&w.preventDefault()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",C),document.addEventListener("pointerout",b),document.addEventListener("pointercancel",b),document.addEventListener("touchmove",E,{passive:!1}),document.addEventListener("click",M,{capture:!0}),d=()=>{document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",C),document.removeEventListener("pointerout",b),document.removeEventListener("pointercancel",b),document.removeEventListener("touchmove",E),setTimeout(()=>{document.removeEventListener("click",M,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{d(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const r=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const n=this.parent.clientHeight||128;return e?.every(o=>!o.overlay)?n/r:n}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
2
2
  <style${i?` nonce="${i}"`:""}>
3
3
  :host {
4
4
  user-select: none;
@@ -1,4 +1,4 @@
1
- import{r as reactExports,j as jsxRuntimeExports}from"./index-DCNLpqIv.js";/*!
1
+ import{r as reactExports,j as jsxRuntimeExports}from"./index-clm6On2Y.js";/*!
2
2
  * Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
3
3
  * All rights reserved.
4
4
  *
@@ -1 +1 @@
1
- import{r as l,E as K,_ as O,c as p,j as o,c1 as ne,bJ as Y,bX as G,bF as J,bY as F,ci as y,ap as U,c2 as le,bx as de,bW as ce,bT as pe,cg as Q,b8 as ge,bm as ue,bQ as he,cj as me,F as H,bV as fe,bU as xe}from"./index-DCNLpqIv.js";import{g as be,C as ve,I as ye,F as M,E as je,a as Ie,s as we,u as Ce,b as ze}from"./FileHelper-BbrZYz8x.js";import{I as Fe}from"./InputInstructions-BgxdtQsQ.js";import{u as Ee,T as Te}from"./useTextInputAutoExpand-BFx1z0yW.js";import{i as Re}from"./inputUtils-CptNuJwn.js";import{E as Le}from"./ErrorOutline.esm-C8z2dN3x.js";import{U as _}from"./UploadFileInfo-C-jY39rj.js";import"./base-input-D2OIsCyG.js";var q=l.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(K,O({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});q.displayName="AttachFile";var Z=l.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(K,O({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});Z.displayName="Send";const Se=p("div",{target:"e3id6jz12"})(({theme:e,height:t})=>({backgroundColor:e.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${e.sizes.emptyDropdownHeight}, ${t})`,width:"100%",zIndex:e.zIndices.priority}),""),Ue=p("div",{target:"e3id6jz11"})(({theme:e,height:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:t,width:"100%",fontWeight:e.fontWeights.bold}),""),He=p("div",{target:"e3id6jz10"})(({theme:e,disabled:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${e.sizes.borderWidth}`,cursor:t?"not-allowed":"auto"}),""),Me=p("div",{target:"e3id6jz9"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),ke=p("div",{target:"e3id6jz8"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20}),""),Be=p("div",{target:"e3id6jz7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"}),""),Pe=p("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),We=p("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),Ne=p("div",{target:"e3id6jz4"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS}),""),De=p("div",{target:"e3id6jz3"})(({theme:e})=>({color:e.colors.fadedText60}),""),$e=p("div",{target:"e3id6jz2"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60}),""),Ve=p("div",{target:"e3id6jz1"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60}),""),Ae=p("small",{target:"e3id6jz0"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}),""),Xe=({getRootProps:e,getInputProps:t,acceptFile:a,disabled:d,theme:m})=>o.jsxs(He,{disabled:d,children:[o.jsxs(Me,{"data-testid":"stChatInputFileUploadButton",disabled:d,...e(),children:[o.jsx("input",{...t()}),o.jsx(ne,{content:`Upload or drag and drop ${a===y.Multiple?"files":"a file"}`,placement:Y.TOP,onMouseEnterDelay:500,children:o.jsx(G,{kind:J.MINIMAL,disabled:d,children:o.jsx(F,{content:q,size:"lg",color:d?m.colors.fadedText40:m.colors.fadedText60})})})]}),o.jsx(ke,{})]}),Ke=l.memo(Xe),Oe=({getRootProps:e,getInputProps:t,acceptFile:a,inputHeight:d})=>o.jsxs(o.Fragment,{children:[o.jsx(Se,{height:d,...e(),children:o.jsx("input",{...t()})}),o.jsx(Ue,{height:d,children:`Drag and drop ${a===y.Multiple?"files":"a file"} here`})]}),Ye=l.memo(Oe);function Ge({children:e,content:t}){const a=U();return o.jsx(le,{content:t,placement:Y.TOP,overrides:{Body:{style:{top:`-${a.sizes.minElementHeight}`}}},children:e})}const Je=({fileInfo:e})=>{const t=U(),{type:a}=e.status;switch(a){case"uploading":return o.jsx(ce,{"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return o.jsx(Ge,{content:e.status.errorMessage,children:o.jsx(F,{color:t.colors.red,content:Le,size:"lg"})});case"uploaded":return o.jsx(F,{content:ye,size:"lg"});default:return de(a),null}},Qe=({fileInfo:e,onDelete:t})=>o.jsxs(Ne,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[o.jsx(De,{children:o.jsx(Je,{fileInfo:e})}),o.jsx($e,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),o.jsx(Ve,{children:be(e.size,M.Byte)}),o.jsx(Ae,{"data-testid":"stChatInputDeleteBtn",children:o.jsx(G,{onClick:()=>t(e.id),kind:J.MINIMAL,children:o.jsx(F,{content:ve,size:"lg"})})})]}),_e=l.memo(Qe),qe=({items:e,onDelete:t})=>o.jsx(Be,{"data-testid":"stChatUploadedFiles",children:o.jsx(Pe,{children:e.map(a=>o.jsx(We,{children:o.jsx(_e,{fileInfo:a,onDelete:t})},a.id))})}),Ze=l.memo(qe),et=({acceptMultipleFiles:e,maxFileSize:t,uploadClient:a,uploadFile:d,addFiles:m,getNextLocalFileId:c,deleteExistingFiles:b,onUploadComplete:x})=>(f,u)=>{if(!e&&f.length===0&&u.length>1){const g=u.findIndex(h=>h.errors?.[0].code===je.TooManyFiles);g>=0&&(f.push(u[g].file),u.splice(g,1))}if(!e&&f.length>0&&b(),a.fetchFileURLs(f).then(g=>{pe(g,f).forEach(([h,E])=>{d(h,E)})}).catch(g=>{m(f.map(h=>new _(h.name,h.size,c(),{type:"error",errorMessage:g})))}),u.length>0){const g=u.map(h=>Ie(h,c(),t));m(g)}x()},tt=({getNextLocalFileId:e,addFiles:t,updateFile:a,uploadClient:d,element:m,onUploadProgress:c,onUploadComplete:b})=>(x,f)=>{const u=Q.CancelToken.source(),g=new _(f.name,f.size,e(),{type:"uploading",cancelToken:u,progress:1});t([g]),d.uploadFile({formId:"",...m},x.uploadUrl,f,h=>c(h,g.id),u.token).then(()=>b(g.id,x)).catch(h=>{Q.isCancel(h)||a(g.id,g.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},ot=p("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),it=p("div",{target:"e1d2x3se3"})(({theme:e,extended:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:e.spacing.lg,maxHeight:t?"none":e.sizes.minElementHeight,gap:e.spacing.sm,overflow:"hidden",":focus-within":{borderColor:e.colors.primary}}),""),st=p("button",{target:"e1d2x3se2"})(({theme:e,disabled:t,extended:a})=>{const d=ge(e),[m,c]=d?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:a?"0":e.radii.chatInput,borderTopLeftRadius:a?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:t?m:c,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:d?e.colors.gray10:e.colors.gray90},"&:hover":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray,cursor:"not-allowed"}}},""),at=p("div",{target:"e1d2x3se1"})(({theme:e})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${e.sizes.borderWidth}`,pointerEvents:"none"}),""),rt=p("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),k=(e,t,a)=>a.map(d=>d.id===e?t:d),B=(e,t)=>t.find(a=>a.id===e);function nt({disabled:e,element:t,widgetMgr:a,fragmentId:d,uploadClient:m}){const c=U(),{placeholder:b,maxChars:x}=t,f=l.useRef(0),u=l.useRef(null),[g,h]=ue(),{innerWidth:E,innerHeight:P}=he(),[C,R]=l.useState(t.default),[j,I]=l.useState([]),[z,L]=l.useState(!1),w=Ee({textareaRef:u,dependencies:[b]}),S=l.useMemo(()=>j.some(i=>i.status.type==="uploading")?!1:C!==""||j.length>0,[j,C]),v=me(t.acceptFile),W=we(t.maxUploadSizeMb,M.Megabyte,M.Byte),N=l.useCallback(i=>I(r=>[...r,...i]),[]),D=l.useCallback(i=>{I(r=>{const n=B(i,r);return H(n)?r:(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&m.deleteFile(n.status.fileUrls.deleteUrl),r.filter(s=>s.id!==i))})},[m]),ee=()=>{const i=j.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:s,status:T}=r,{fileId:ae,fileUrls:re}=T;return new fe({fileId:ae,fileUrls:re,name:n,size:s})});return new xe({uploadedFileInfo:i})},$=()=>f.current++,te=et({acceptMultipleFiles:v===y.Multiple,maxFileSize:W,uploadClient:m,uploadFile:tt({getNextLocalFileId:$,addFiles:N,updateFile:(i,r)=>{I(n=>k(i,r,n))},uploadClient:m,element:t,onUploadProgress:(i,r)=>{I(n=>{const s=B(r,n);if(H(s)||s.status.type!=="uploading")return n;const T=Math.round(i.loaded*100/i.total);return s.status.progress===T?n:k(r,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:T}),n)})},onUploadComplete:(i,r)=>{I(n=>{const s=B(i,n);return H(s)||s.status.type!=="uploading"?n:k(s.id,s.setStatus({type:"uploaded",fileId:r.fileId,fileUrls:r}),n)})}}),addFiles:N,getNextLocalFileId:$,deleteExistingFiles:()=>j.forEach(i=>D(i.id)),onUploadComplete:()=>{u.current&&u.current.focus()}}),{getRootProps:V,getInputProps:A}=Ce({onDrop:te,multiple:v===y.Multiple,accept:ze(t.fileType),maxSize:W}),X=()=>{if(u.current&&u.current.focus(),!S||e)return;const i={data:C,fileUploaderState:ee()};a.setChatInputValue(t,i,{fromUi:!0},d),I([]),R("")},oe=i=>{const{metaKey:r,ctrlKey:n,shiftKey:s}=i;Re(i)&&!s&&!n&&!r&&(i.preventDefault(),X())},ie=i=>{const{value:r}=i.target;x!==0&&r.length>x||(R(r),w.updateScrollHeight())};l.useEffect(()=>{if(t.setValue){t.setValue=!1;const i=t.value||"";R(i)}},[t]),l.useEffect(()=>{const i=s=>{s.preventDefault(),s.stopPropagation(),!z&&s.dataTransfer?.types.includes("Files")&&L(!0)},r=s=>{s.preventDefault(),s.stopPropagation(),z&&(s.clientX<=0&&s.clientY<=0||s.clientX>=E&&s.clientY>=P)&&L(!1)},n=s=>{s.preventDefault(),s.stopPropagation(),z&&L(!1)};return window.addEventListener("dragover",i),window.addEventListener("drop",n),window.addEventListener("dragleave",r),()=>{window.removeEventListener("dragover",i),window.removeEventListener("drop",n),window.removeEventListener("dragleave",r)}},[z,E,P]);const se=v!==y.None&&z;return o.jsxs(o.Fragment,{children:[v===y.None?null:o.jsx(Ze,{items:[...j],onDelete:D}),o.jsx(ot,{className:"stChatInput","data-testid":"stChatInput",ref:h,children:se?o.jsx(Ye,{getRootProps:V,getInputProps:A,acceptFile:v,inputHeight:w.height}):o.jsxs(it,{extended:w.isExtended,children:[v===y.None?null:o.jsx(Ke,{getRootProps:V,getInputProps:A,acceptFile:v,disabled:e,theme:c}),o.jsx(Te,{inputRef:u,value:C,placeholder:b,onChange:ie,onKeyDown:oe,"aria-label":b,disabled:e,rows:1,overrides:{Root:{style:{minHeight:c.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:c.fontWeights.normal,lineHeight:c.lineHeights.inputWidget,"::placeholder":{color:c.colors.fadedText60},height:w.height,maxHeight:w.maxHeight,paddingLeft:c.spacing.none,paddingBottom:c.spacing.sm,paddingTop:c.spacing.sm,paddingRight:`calc(${c.iconSizes.xl} + 2 * ${c.spacing.sm} + ${c.spacing.sm})`}}}}),g>c.breakpoints.hideWidgetDetails&&o.jsx(rt,{children:o.jsx(Fe,{dirty:S,value:C,maxLength:x,type:"chat",inForm:!1})}),o.jsx(at,{children:o.jsx(st,{onClick:X,disabled:!S||e,extended:w.isExtended,"data-testid":"stChatInputSubmitButton",children:o.jsx(F,{content:Z,size:"xl",color:"inherit"})})})]})})]})}const lt=l.memo(nt);export{lt as default};
1
+ import{r as l,E as K,_ as O,c as p,j as o,c1 as ne,bJ as Y,bX as G,bF as J,bY as F,ci as y,ap as U,c2 as le,bx as de,bW as ce,bT as pe,cg as Q,b8 as ge,bm as ue,bQ as he,cj as me,F as H,bV as fe,bU as xe}from"./index-clm6On2Y.js";import{g as be,C as ve,I as ye,F as M,E as je,a as Ie,s as we,u as Ce,b as ze}from"./FileHelper-TEIN3a2s.js";import{I as Fe}from"./InputInstructions-CtPX8G6i.js";import{u as Ee,T as Te}from"./useTextInputAutoExpand-LP-kJAB7.js";import{i as Re}from"./inputUtils-CptNuJwn.js";import{E as Le}from"./ErrorOutline.esm-D2SwfuYU.js";import{U as _}from"./UploadFileInfo-C-jY39rj.js";import"./base-input-C1jq7mBd.js";var q=l.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(K,O({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});q.displayName="AttachFile";var Z=l.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(K,O({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});Z.displayName="Send";const Se=p("div",{target:"e3id6jz12"})(({theme:e,height:t})=>({backgroundColor:e.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${e.sizes.emptyDropdownHeight}, ${t})`,width:"100%",zIndex:e.zIndices.priority}),""),Ue=p("div",{target:"e3id6jz11"})(({theme:e,height:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:t,width:"100%",fontWeight:e.fontWeights.bold}),""),He=p("div",{target:"e3id6jz10"})(({theme:e,disabled:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${e.sizes.borderWidth}`,cursor:t?"not-allowed":"auto"}),""),Me=p("div",{target:"e3id6jz9"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),ke=p("div",{target:"e3id6jz8"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20}),""),Be=p("div",{target:"e3id6jz7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"}),""),Pe=p("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),We=p("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),Ne=p("div",{target:"e3id6jz4"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS}),""),De=p("div",{target:"e3id6jz3"})(({theme:e})=>({color:e.colors.fadedText60}),""),$e=p("div",{target:"e3id6jz2"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60}),""),Ve=p("div",{target:"e3id6jz1"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60}),""),Ae=p("small",{target:"e3id6jz0"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}),""),Xe=({getRootProps:e,getInputProps:t,acceptFile:a,disabled:d,theme:m})=>o.jsxs(He,{disabled:d,children:[o.jsxs(Me,{"data-testid":"stChatInputFileUploadButton",disabled:d,...e(),children:[o.jsx("input",{...t()}),o.jsx(ne,{content:`Upload or drag and drop ${a===y.Multiple?"files":"a file"}`,placement:Y.TOP,onMouseEnterDelay:500,children:o.jsx(G,{kind:J.MINIMAL,disabled:d,children:o.jsx(F,{content:q,size:"lg",color:d?m.colors.fadedText40:m.colors.fadedText60})})})]}),o.jsx(ke,{})]}),Ke=l.memo(Xe),Oe=({getRootProps:e,getInputProps:t,acceptFile:a,inputHeight:d})=>o.jsxs(o.Fragment,{children:[o.jsx(Se,{height:d,...e(),children:o.jsx("input",{...t()})}),o.jsx(Ue,{height:d,children:`Drag and drop ${a===y.Multiple?"files":"a file"} here`})]}),Ye=l.memo(Oe);function Ge({children:e,content:t}){const a=U();return o.jsx(le,{content:t,placement:Y.TOP,overrides:{Body:{style:{top:`-${a.sizes.minElementHeight}`}}},children:e})}const Je=({fileInfo:e})=>{const t=U(),{type:a}=e.status;switch(a){case"uploading":return o.jsx(ce,{"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return o.jsx(Ge,{content:e.status.errorMessage,children:o.jsx(F,{color:t.colors.red,content:Le,size:"lg"})});case"uploaded":return o.jsx(F,{content:ye,size:"lg"});default:return de(a),null}},Qe=({fileInfo:e,onDelete:t})=>o.jsxs(Ne,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[o.jsx(De,{children:o.jsx(Je,{fileInfo:e})}),o.jsx($e,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),o.jsx(Ve,{children:be(e.size,M.Byte)}),o.jsx(Ae,{"data-testid":"stChatInputDeleteBtn",children:o.jsx(G,{onClick:()=>t(e.id),kind:J.MINIMAL,children:o.jsx(F,{content:ve,size:"lg"})})})]}),_e=l.memo(Qe),qe=({items:e,onDelete:t})=>o.jsx(Be,{"data-testid":"stChatUploadedFiles",children:o.jsx(Pe,{children:e.map(a=>o.jsx(We,{children:o.jsx(_e,{fileInfo:a,onDelete:t})},a.id))})}),Ze=l.memo(qe),et=({acceptMultipleFiles:e,maxFileSize:t,uploadClient:a,uploadFile:d,addFiles:m,getNextLocalFileId:c,deleteExistingFiles:b,onUploadComplete:x})=>(f,u)=>{if(!e&&f.length===0&&u.length>1){const g=u.findIndex(h=>h.errors?.[0].code===je.TooManyFiles);g>=0&&(f.push(u[g].file),u.splice(g,1))}if(!e&&f.length>0&&b(),a.fetchFileURLs(f).then(g=>{pe(g,f).forEach(([h,E])=>{d(h,E)})}).catch(g=>{m(f.map(h=>new _(h.name,h.size,c(),{type:"error",errorMessage:g})))}),u.length>0){const g=u.map(h=>Ie(h,c(),t));m(g)}x()},tt=({getNextLocalFileId:e,addFiles:t,updateFile:a,uploadClient:d,element:m,onUploadProgress:c,onUploadComplete:b})=>(x,f)=>{const u=Q.CancelToken.source(),g=new _(f.name,f.size,e(),{type:"uploading",cancelToken:u,progress:1});t([g]),d.uploadFile({formId:"",...m},x.uploadUrl,f,h=>c(h,g.id),u.token).then(()=>b(g.id,x)).catch(h=>{Q.isCancel(h)||a(g.id,g.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},ot=p("div",{target:"e1d2x3se4"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),it=p("div",{target:"e1d2x3se3"})(({theme:e,extended:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:e.spacing.lg,maxHeight:t?"none":e.sizes.minElementHeight,gap:e.spacing.sm,overflow:"hidden",":focus-within":{borderColor:e.colors.primary}}),""),st=p("button",{target:"e1d2x3se2"})(({theme:e,disabled:t,extended:a})=>{const d=ge(e),[m,c]=d?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:a?"0":e.radii.chatInput,borderTopLeftRadius:a?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:t?m:c,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:d?e.colors.gray10:e.colors.gray90},"&:hover":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray,cursor:"not-allowed"}}},""),at=p("div",{target:"e1d2x3se1"})(({theme:e})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${e.sizes.borderWidth}`,pointerEvents:"none"}),""),rt=p("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),k=(e,t,a)=>a.map(d=>d.id===e?t:d),B=(e,t)=>t.find(a=>a.id===e);function nt({disabled:e,element:t,widgetMgr:a,fragmentId:d,uploadClient:m}){const c=U(),{placeholder:b,maxChars:x}=t,f=l.useRef(0),u=l.useRef(null),[g,h]=ue(),{innerWidth:E,innerHeight:P}=he(),[C,R]=l.useState(t.default),[j,I]=l.useState([]),[z,L]=l.useState(!1),w=Ee({textareaRef:u,dependencies:[b]}),S=l.useMemo(()=>j.some(i=>i.status.type==="uploading")?!1:C!==""||j.length>0,[j,C]),v=me(t.acceptFile),W=we(t.maxUploadSizeMb,M.Megabyte,M.Byte),N=l.useCallback(i=>I(r=>[...r,...i]),[]),D=l.useCallback(i=>{I(r=>{const n=B(i,r);return H(n)?r:(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&m.deleteFile(n.status.fileUrls.deleteUrl),r.filter(s=>s.id!==i))})},[m]),ee=()=>{const i=j.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:s,status:T}=r,{fileId:ae,fileUrls:re}=T;return new fe({fileId:ae,fileUrls:re,name:n,size:s})});return new xe({uploadedFileInfo:i})},$=()=>f.current++,te=et({acceptMultipleFiles:v===y.Multiple,maxFileSize:W,uploadClient:m,uploadFile:tt({getNextLocalFileId:$,addFiles:N,updateFile:(i,r)=>{I(n=>k(i,r,n))},uploadClient:m,element:t,onUploadProgress:(i,r)=>{I(n=>{const s=B(r,n);if(H(s)||s.status.type!=="uploading")return n;const T=Math.round(i.loaded*100/i.total);return s.status.progress===T?n:k(r,s.setStatus({type:"uploading",cancelToken:s.status.cancelToken,progress:T}),n)})},onUploadComplete:(i,r)=>{I(n=>{const s=B(i,n);return H(s)||s.status.type!=="uploading"?n:k(s.id,s.setStatus({type:"uploaded",fileId:r.fileId,fileUrls:r}),n)})}}),addFiles:N,getNextLocalFileId:$,deleteExistingFiles:()=>j.forEach(i=>D(i.id)),onUploadComplete:()=>{u.current&&u.current.focus()}}),{getRootProps:V,getInputProps:A}=Ce({onDrop:te,multiple:v===y.Multiple,accept:ze(t.fileType),maxSize:W}),X=()=>{if(u.current&&u.current.focus(),!S||e)return;const i={data:C,fileUploaderState:ee()};a.setChatInputValue(t,i,{fromUi:!0},d),I([]),R("")},oe=i=>{const{metaKey:r,ctrlKey:n,shiftKey:s}=i;Re(i)&&!s&&!n&&!r&&(i.preventDefault(),X())},ie=i=>{const{value:r}=i.target;x!==0&&r.length>x||(R(r),w.updateScrollHeight())};l.useEffect(()=>{if(t.setValue){t.setValue=!1;const i=t.value||"";R(i)}},[t]),l.useEffect(()=>{const i=s=>{s.preventDefault(),s.stopPropagation(),!z&&s.dataTransfer?.types.includes("Files")&&L(!0)},r=s=>{s.preventDefault(),s.stopPropagation(),z&&(s.clientX<=0&&s.clientY<=0||s.clientX>=E&&s.clientY>=P)&&L(!1)},n=s=>{s.preventDefault(),s.stopPropagation(),z&&L(!1)};return window.addEventListener("dragover",i),window.addEventListener("drop",n),window.addEventListener("dragleave",r),()=>{window.removeEventListener("dragover",i),window.removeEventListener("drop",n),window.removeEventListener("dragleave",r)}},[z,E,P]);const se=v!==y.None&&z;return o.jsxs(o.Fragment,{children:[v===y.None?null:o.jsx(Ze,{items:[...j],onDelete:D}),o.jsx(ot,{className:"stChatInput","data-testid":"stChatInput",ref:h,children:se?o.jsx(Ye,{getRootProps:V,getInputProps:A,acceptFile:v,inputHeight:w.height}):o.jsxs(it,{extended:w.isExtended,children:[v===y.None?null:o.jsx(Ke,{getRootProps:V,getInputProps:A,acceptFile:v,disabled:e,theme:c}),o.jsx(Te,{inputRef:u,value:C,placeholder:b,onChange:ie,onKeyDown:oe,"aria-label":b,disabled:e,rows:1,overrides:{Root:{style:{minHeight:c.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:c.fontWeights.normal,lineHeight:c.lineHeights.inputWidget,"::placeholder":{color:c.colors.fadedText60},height:w.height,maxHeight:w.maxHeight,paddingLeft:c.spacing.none,paddingBottom:c.spacing.sm,paddingTop:c.spacing.sm,paddingRight:`calc(${c.iconSizes.xl} + 2 * ${c.spacing.sm} + ${c.spacing.sm})`}}}}),g>c.breakpoints.hideWidgetDetails&&o.jsx(rt,{children:o.jsx(Fe,{dirty:S,value:C,maxLength:x,type:"chat",inForm:!1})}),o.jsx(at,{children:o.jsx(st,{onClick:X,disabled:!S||e,extended:w.isExtended,"data-testid":"stChatInputSubmitButton",children:o.jsx(F,{content:Z,size:"xl",color:"inherit"})})})]})})]})}const lt=l.memo(nt);export{lt as default};
@@ -1,2 +1,2 @@
1
- import{c3 as q,c4 as H,r as f,c5 as J,ap as Q,c6 as Y,c7 as u,j as g,c8 as Z,b$ as ee,c0 as te,c9 as re,c1 as ne,bJ as oe,ca as ie,bX as ae,bF as C,bE as U,bI as ce}from"./index-DCNLpqIv.js";import{a as le}from"./useBasicWidgetState-9vtYd9vP.js";import"./FormClearHelper-fvwQICEk.js";var ue={secondary:"secondary"},A={default:"default"},se={default:"default"},x=Object.freeze({radio:"radio",checkbox:"checkbox"}),N=q("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==A.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});N.displayName="StyledRoot",N.displayName="StyledRoot";function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(this,arguments)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V(Object(r),!0).forEach(function(n){$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pe(e,t){return me(e)||be(e,t)||ye(e,t)||de()}function de(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{c3 as q,c4 as H,r as f,c5 as J,ap as Q,c6 as Y,c7 as u,j as g,c8 as Z,b$ as ee,c0 as te,c9 as re,c1 as ne,bJ as oe,ca as ie,bX as ae,bF as C,bE as U,bI as ce}from"./index-clm6On2Y.js";import{a as le}from"./useBasicWidgetState-CCltHZT9.js";import"./FormClearHelper-DBsQ33IR.js";var ue={secondary:"secondary"},A={default:"default"},se={default:"default"},x=Object.freeze({radio:"radio",checkbox:"checkbox"}),N=q("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==A.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});N.displayName="StyledRoot",N.displayName="StyledRoot";function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(this,arguments)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V(Object(r),!0).forEach(function(n){$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pe(e,t){return me(e)||be(e,t)||ye(e,t)||de()}function de(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function be(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,p;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,p=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw p}}return n}}function me(e){if(Array.isArray(e))return e}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ve(e,t,r){return t&&ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},B(e,t)}function Se(e){var t=Ee();return function(){var r=I(e),n;if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return we(this,n)}}function we(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W(e)}function W(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ee(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(e)}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function je(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var F=function(e){Oe(r,e);var t=Se(r);function r(){var n;he(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),$(W(n),"childRefs",{}),n}return ve(r,[{key:"render",value:function(){var n=this,o=this.props,a=o.overrides,i=a===void 0?{}:a,p=o.mode,b=p===void 0?x.checkbox:p,l=o.children,m=o.selected,E=o.disabled,d=o.onClick,S=o.kind,y=o.shape,j=o.size,v=H(i.Root,N),P=pe(v,2),L=P[0],_=P[1],R=this.props["aria-label"]||this.props.ariaLabel,s=b===x.radio,w=f.Children.count(l);return f.createElement(J.Consumer,null,function(K){return f.createElement(L,z({"aria-label":R||K.buttongroup.ariaLabel,"data-baseweb":"button-group",role:s?"radiogroup":"group",$shape:y,$length:l.length},_),f.Children.map(l,function(h,k){if(!f.isValidElement(h))return null;var M=h.props.isSelected?h.props.isSelected:je(m,k);return s&&(n.childRefs[k]=f.createRef()),f.cloneElement(h,{disabled:E||h.props.disabled,isSelected:M,ref:s?n.childRefs[k]:void 0,tabIndex:!s||M||s&&(!m||m===-1)&&k===0?0:-1,onKeyDown:function(c){if(s){var O=Number(m)?Number(m):0;if(c.key==="ArrowUp"||c.key==="ArrowLeft"){c.preventDefault&&c.preventDefault();var T=O-1<0?w-1:O-1;d&&d(c,T),n.childRefs[T].current&&n.childRefs[T].current.focus()}if(c.key==="ArrowDown"||c.key==="ArrowRight"){c.preventDefault&&c.preventDefault();var D=O+1>w-1?0:O+1;d&&d(c,D),n.childRefs[D].current&&n.childRefs[D].current.focus()}}},kind:S,onClick:function(c){E||(h.props.onClick&&h.props.onClick(c),d&&d(c,k))},shape:y,size:j,overrides:fe({BaseButton:{style:function(c){var O=c.$theme;return l.length===1?{}:y!==A.default?{marginLeft:O.sizing.scale100,marginRight:O.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":M,role:s?"radio":"checkbox"}}},h.props.overrides)})}))})}}]),r}(f.Component);$(F,"defaultProps",{disabled:!1,onClick:function(){},shape:A.default,size:se.default,kind:ue.secondary});function Le(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Re(e,t,r){return e==u.ClickMode.MULTI_SELECT?Le(t,r??[]):r?.includes(t)?[]:[t]}function ke(e){return e.length===0?-1:e[0]}function Ce(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Pe(e,t,r){const n=r===u.Style.PILLS?C.PILLS:r===u.Style.BORDERLESS?C.BORDERLESS_ICON:C.SEGMENTED_CONTROL,o=r===u.Style.BORDERLESS?U.XSMALL:U.MEDIUM,a=n===C.PILLS||n===C.SEGMENTED_CONTROL,i=r===u.Style.BORDERLESS?"lg":"base";return{element:g.jsx(ce,{icon:t,label:e,iconSize:i,useSmallerFont:a}),kind:n,size:o}}function xe(e,t,r,n){return r.indexOf(n)>-1?!0:t!==u.ClickMode.SINGLE_SELECT||e!==u.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ie(e,t){return e&&(t=`${t}Active`),t}function _e(e,t,r){const n={flexWrap:"wrap",maxWidth:"100%",margin:"0 0"},o=r?"100%":"auto",a=r?{}:{content:"''",flex:1e4};switch(e){case u.Style.BORDERLESS:return{...n,columnGap:t.threeXS,rowGap:t.threeXS};case u.Style.PILLS:return{...n,columnGap:t.twoXS,rowGap:t.twoXS,width:o};case u.Style.SEGMENTED_CONTROL:return{...n,columnGap:t.none,rowGap:t.twoXS,"::after":a,width:o};default:return n}}function Me(e,t,r,n,o,a,i){const p=xe(r,n,o,t);let b=e.content,l=e.contentIcon;return p&&(b=e.selectedContent?e.selectedContent:b,l=e.selectedContentIcon?e.selectedContentIcon:l),f.forwardRef(function(m,E){const{element:d,kind:S,size:y}=Pe(b??"",l??void 0,a),j=Ie(!!(p&&!e.selectedContent&&!e.selectedContentIcon),S);return g.jsx(ae,{...m,size:y,kind:j,containerWidth:i,children:d})})}function Te(e,t){return e.getIntArrayValue(t)}function De(e){return e.default??null}function Ae(e){return e.value??null}function Ne(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o,widthConfig:a}=e,{clickMode:i,options:p,selectionVisualization:b,style:l,label:m,labelVisibility:E,help:d}=r,S=Q(),[y,j]=le({getStateFromWidgetMgr:Te,getDefaultStateFromProto:De,getCurrStateFromProto:Ae,updateWidgetMgrState:Ce,element:r,widgetMgr:o,fragmentId:n}),v=Y(a),P=(R,s)=>{const w=Re(i,s,y);j({value:w,fromUi:!0})};let L;i===u.ClickMode.SINGLE_SELECT?L=x.radio:i===u.ClickMode.MULTI_SELECT&&(L=x.checkbox);const _=f.useMemo(()=>p.map((R,s)=>{const w=Me(R,s,b,i,y,l,v);return g.jsx(w,{},`${R.content}-${s}`)}),[i,p,b,l,y,v]);return g.jsxs(Z,{className:"stButtonGroup","data-testid":"stButtonGroup",containerWidth:v,children:[g.jsx(ee,{label:m,disabled:t,labelVisibility:te(E?.value??ie.LabelVisibilityOptions.COLLAPSED),children:d&&g.jsx(re,{children:g.jsx(ne,{content:d,placement:oe.TOP})})}),g.jsx(F,{disabled:t,mode:L,onClick:P,selected:i===u.ClickMode.MULTI_SELECT?y:ke(y),overrides:{Root:{style:f.useCallback(()=>_e(l,S.spacing,v),[l,S.spacing,v])}},children:_})]})}const Ge=f.memo(Ne);export{Ge as default};
@@ -1,4 +1,4 @@
1
- import{c as p,k as l,r,j as n,b as d}from"./index-DCNLpqIv.js";import{R as g,P as f}from"./Particles-C6lCS8Mc.js";const u="/assets/flake-0.DgWaVvm5.png",x="/assets/flake-1.B2r5AHMK.png",$="/assets/flake-2.BnWSExPC.png",o=150,i=150,h=10,k=90,I=4e3,a=(t,e=0)=>Math.random()*(t-e)+e,P=()=>l`
1
+ import{c as p,k as l,r,j as n,b as d}from"./index-clm6On2Y.js";import{R as g,P as f}from"./Particles-CftaQRnu.js";const u="/assets/flake-0.DgWaVvm5.png",x="/assets/flake-1.B2r5AHMK.png",$="/assets/flake-2.BnWSExPC.png",o=150,i=150,h=10,k=90,I=4e3,a=(t,e=0)=>Math.random()*(t-e)+e,P=()=>l`
2
2
  from {
3
3
  transform:
4
4
  translateY(0)
@@ -1 +1 @@
1
- import{r as o,F as i,j as h,cM as w,c0 as M}from"./index-DCNLpqIv.js";import{a as S}from"./useBasicWidgetState-9vtYd9vP.js";import"./FormClearHelper-fvwQICEk.js";const V=(e,t)=>e.getStringValue(t),v=e=>e.options.length===0||i(e.default)?null:e.options[e.default],F=e=>e.rawValue??null,U=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},j=({disabled:e,element:t,widgetMgr:a,fragmentId:l})=>{const{options:s,help:n,label:g,labelVisibility:u,placeholder:d,acceptNewOptions:m}=t,[p,r]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:v,getCurrStateFromProto:F,updateWidgetMgrState:U,element:t,widgetMgr:a,fragmentId:l}),c=o.useCallback(b=>{r({value:b,fromUi:!0})},[r]),f=i(t.default)&&!e;return h.jsx(w,{label:g,labelVisibility:M(u?.value),options:s,disabled:e,onChange:c,value:p,help:n,placeholder:d,clearable:f,acceptNewOptions:m??!1})},x=o.memo(j);export{x as default};
1
+ import{r as o,F as i,j as h,cM as w,c0 as M}from"./index-clm6On2Y.js";import{a as S}from"./useBasicWidgetState-CCltHZT9.js";import"./FormClearHelper-DBsQ33IR.js";const V=(e,t)=>e.getStringValue(t),v=e=>e.options.length===0||i(e.default)?null:e.options[e.default],F=e=>e.rawValue??null,U=(e,t,a,l)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},l)},j=({disabled:e,element:t,widgetMgr:a,fragmentId:l})=>{const{options:s,help:n,label:g,labelVisibility:u,placeholder:d,acceptNewOptions:m}=t,[p,r]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:v,getCurrStateFromProto:F,updateWidgetMgrState:U,element:t,widgetMgr:a,fragmentId:l}),c=o.useCallback(b=>{r({value:b,fromUi:!0})},[r]),f=i(t.default)&&!e;return h.jsx(w,{label:g,labelVisibility:M(u?.value),options:s,disabled:e,onChange:c,value:p,help:n,placeholder:d,clearable:f,acceptNewOptions:m??!1})},x=o.memo(j);export{x as default};
@@ -1 +1 @@
1
- import{r as d,bF as s,j as t,bG as o,bH as c,bX as b,bE as m,bI as h}from"./index-DCNLpqIv.js";function p(i){const{disabled:r,element:e,widgetMgr:n,fragmentId:l}=i;let a=s.SECONDARY;return e.type==="primary"?a=s.PRIMARY:e.type==="tertiary"&&(a=s.TERTIARY),t.jsx(o,{className:"stButton","data-testid":"stButton",children:t.jsx(c,{help:e.help,containerWidth:!0,children:t.jsx(b,{kind:a,size:m.SMALL,disabled:r,containerWidth:!0,onClick:()=>n.setTriggerValue(e,{fromUi:!0},l),children:t.jsx(h,{icon:e.icon,label:e.label})})})})}const u=d.memo(p);export{u as default};
1
+ import{r as d,bF as s,j as t,bG as o,bH as c,bX as b,bE as m,bI as h}from"./index-clm6On2Y.js";function p(i){const{disabled:r,element:e,widgetMgr:n,fragmentId:l}=i;let a=s.SECONDARY;return e.type==="primary"?a=s.PRIMARY:e.type==="tertiary"&&(a=s.TERTIARY),t.jsx(o,{className:"stButton","data-testid":"stButton",children:t.jsx(c,{help:e.help,containerWidth:!0,children:t.jsx(b,{kind:a,size:m.SMALL,disabled:r,containerWidth:!0,onClick:()=>n.setTriggerValue(e,{fromUi:!0},l),children:t.jsx(h,{icon:e.icon,label:e.label})})})})}const u=d.memo(p);export{u as default};
@@ -1 +1 @@
1
- import{r as u,ap as k,b8 as T,j as c,ck as y,cl as L,c0 as w,bc as C,c9 as S,c1 as $,bJ as R,b1 as W,cm as B}from"./index-DCNLpqIv.js";import{a as v}from"./useBasicWidgetState-9vtYd9vP.js";import{S as j,L as X,a as p}from"./checkbox-BNaalk8J.js";import"./FormClearHelper-fvwQICEk.js";function H({element:e,disabled:a,widgetMgr:s,fragmentId:n}){const[f,g]=v({getStateFromWidgetMgr:M,getDefaultStateFromProto:V,getCurrStateFromProto:F,updateWidgetMgrState:P,element:e,widgetMgr:s,fragmentId:n}),x=u.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=k(),{colors:o,spacing:h,sizes:r}=t,b=T(t),m=a?o.fadedText40:o.bodyText;return c.jsx(y,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:c.jsx(j,{checked:f,disabled:a,onChange:x,"aria-label":e.label,checkmarkType:e.type===B.StyleType.TOGGLE?p.toggle:p.default,labelPlacement:X.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let d=b?o.bgColor:o.bodyText;return a&&(d=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:d,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:d})=>{let l=o.fadedText40;return d&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:d})=>{const l=d&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&d?`0 0 0 0.2rem ${W(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:m}}},children:c.jsxs(L,{visibility:w(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[c.jsx(C,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&c.jsx(S,{color:m,children:c.jsx($,{content:e.help,placement:R.TOP_RIGHT})})]})})})}function M(e,a){return e.getBoolValue(a)}function V(e){return e.default??null}function F(e){return e.value??null}function P(e,a,s,n){a.setBoolValue(e,s.value,{fromUi:s.fromUi},n)}const I=u.memo(H);export{I as default};
1
+ import{r as u,ap as k,b8 as T,j as c,ck as y,cl as L,c0 as w,bc as C,c9 as S,c1 as $,bJ as R,b1 as W,cm as B}from"./index-clm6On2Y.js";import{a as v}from"./useBasicWidgetState-CCltHZT9.js";import{S as j,L as X,a as p}from"./checkbox-mkpBvvtC.js";import"./FormClearHelper-DBsQ33IR.js";function H({element:e,disabled:a,widgetMgr:s,fragmentId:n}){const[f,g]=v({getStateFromWidgetMgr:M,getDefaultStateFromProto:V,getCurrStateFromProto:F,updateWidgetMgrState:P,element:e,widgetMgr:s,fragmentId:n}),x=u.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=k(),{colors:o,spacing:h,sizes:r}=t,b=T(t),m=a?o.fadedText40:o.bodyText;return c.jsx(y,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:c.jsx(j,{checked:f,disabled:a,onChange:x,"aria-label":e.label,checkmarkType:e.type===B.StyleType.TOGGLE?p.toggle:p.default,labelPlacement:X.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let d=b?o.bgColor:o.bodyText;return a&&(d=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:d,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:d})=>{let l=o.fadedText40;return d&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:d})=>{const l=d&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&d?`0 0 0 0.2rem ${W(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:m}}},children:c.jsxs(L,{visibility:w(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[c.jsx(C,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&c.jsx(S,{color:m,children:c.jsx($,{content:e.help,placement:R.TOP_RIGHT})})]})})})}function M(e,a){return e.getBoolValue(a)}function V(e){return e.default??null}function F(e){return e.value??null}function P(e,a,s,n){a.setBoolValue(e,s.value,{fromUi:s.fromUi},n)}const I=u.memo(H);export{I as default};
@@ -1,4 +1,4 @@
1
- import{c as m,k as p,r as c,j as n,b as g}from"./index-DCNLpqIv.js";import{R as d,P as x}from"./Particles-C6lCS8Mc.js";const f="/assets/balloon-0.Czj7AKwE.png",b="/assets/balloon-1.CNvFFrND.png",u="/assets/balloon-2.DTvC6B1t.png",h="/assets/balloon-3.CgSk4tbL.png",C="/assets/balloon-4.mbtFrzxf.png",N="/assets/balloon-5.CSwkUfRA.png",t=300,o=121,e=20,$=80,w=1e3,I=p`
1
+ import{c as m,k as p,r as c,j as n,b as g}from"./index-clm6On2Y.js";import{R as d,P as x}from"./Particles-CftaQRnu.js";const f="/assets/balloon-0.Czj7AKwE.png",b="/assets/balloon-1.CNvFFrND.png",u="/assets/balloon-2.DTvC6B1t.png",h="/assets/balloon-3.CgSk4tbL.png",C="/assets/balloon-4.mbtFrzxf.png",N="/assets/balloon-5.CSwkUfRA.png",t=300,o=121,e=20,$=80,w=1e3,I=p`
2
2
  from {
3
3
  transform: translateY(calc(100vh + ${t}px));
4
4
  }