@stlite/desktop 0.80.4 → 0.80.5

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 (68) hide show
  1. package/build/assets/{FileDownload.esm-Cz2LbMhY.js → FileDownload.esm-DwbGKHOa.js} +1 -1
  2. package/build/assets/{FormClearHelper-EZKsnYaC.js → FormClearHelper-BG2GkAQw.js} +1 -1
  3. package/build/assets/{Hooks-DqtQqOH-.js → Hooks-KkSJrfSy.js} +1 -1
  4. package/build/assets/{InputInstructions-DjR1o_IC.js → InputInstructions-B7n1tTWv.js} +1 -1
  5. package/build/assets/{ProgressBar-BaA1RCol.js → ProgressBar-D2M_PckP.js} +1 -1
  6. package/build/assets/{RenderInPortalIfExists-BahSgp7T.js → RenderInPortalIfExists-CDyzSL-1.js} +1 -1
  7. package/build/assets/{Toolbar-BeKg-rY_.js → Toolbar-BE-lNYTp.js} +1 -1
  8. package/build/assets/{base-input-7pZdCg4C.js → base-input-Dd63Ml1u.js} +1 -1
  9. package/build/assets/{createSuper-Bqo77rD3.js → createSuper-PQLITmDX.js} +1 -1
  10. package/build/assets/{data-grid-overlay-editor-6ASg9CnD.js → data-grid-overlay-editor-D414XRi5.js} +1 -1
  11. package/build/assets/{downloader-D4L4FTII.js → downloader-BmTU6BwD.js} +1 -1
  12. package/build/assets/{es6-GdMCiz1N.js → es6-Cj19I0qh.js} +2 -2
  13. package/build/assets/{getPrototypeOf-Dklemi9S.js → getPrototypeOf-BmWw5w7W.js} +1 -1
  14. package/build/assets/{iframeResizer.contentWindow-CRAvgT5G.js → iframeResizer.contentWindow-BgMumslU.js} +1 -1
  15. package/build/assets/{index-DAhsgsYC.js → index-0dAeg_zU.js} +1 -1
  16. package/build/assets/{index-5yVA-bl8.js → index-1HUa5ATR.js} +1 -1
  17. package/build/assets/{index-BSA4PqEL.js → index-2hlX80ki.js} +1 -1
  18. package/build/assets/{index-TDAWCZaF.js → index-3DMkQLdF.js} +1 -1
  19. package/build/assets/{index-BOejvDqO.js → index-5kiOYhdB.js} +1 -1
  20. package/build/assets/{index-CEDVfch7.js → index-BB3BGPej.js} +1 -1
  21. package/build/assets/{index-8ikjqTDj.js → index-BQPcQzvX.js} +1 -1
  22. package/build/assets/{index-CLUlOndI.js → index-BRPXQK5q.js} +1 -1
  23. package/build/assets/{index-BdwwnBBF.js → index-BSSQjtpJ.js} +1 -1
  24. package/build/assets/{index-DdoeZmBn.js → index-BVwSJdSM.js} +1 -1
  25. package/build/assets/{index-lK_Z41d7.js → index-BWK23GTl.js} +1 -1
  26. package/build/assets/{index-gQih6j7P.js → index-BYzlt2oO.js} +1 -1
  27. package/build/assets/{index-BuJCpP7X.js → index-Bel0w1Js.js} +1 -1
  28. package/build/assets/{index-CnK5OFBo.js → index-BfKB37J6.js} +1 -1
  29. package/build/assets/{index-D_5yFUtX.js → index-BvJG8eXG.js} +1 -1
  30. package/build/assets/{index-B-uPh0v-.js → index-BxvtW9WP.js} +1 -1
  31. package/build/assets/{index-BldW1rGN.js → index-BzOI4Tk9.js} +1 -1
  32. package/build/assets/{index-BrwVL_Zl.js → index-CL2nG2_R.js} +1 -1
  33. package/build/assets/{index-DS7pLXMF.js → index-CQ2DGykN.js} +5 -5
  34. package/build/assets/{index-DrSKeLtv.js → index-Cf8QIPjF.js} +1 -1
  35. package/build/assets/{index-B6GOeWBY.js → index-CiBnD_4r.js} +1 -1
  36. package/build/assets/{index-BxmhUlpg.js → index-CpGssi5U.js} +1 -1
  37. package/build/assets/{index-se3PiCWO.js → index-Cwv5nzs4.js} +1 -1
  38. package/build/assets/{index-CK59iqlY.js → index-CzfOJyD2.js} +1 -1
  39. package/build/assets/{index-CbCdgvRj.js → index-D1ZIYmPp.js} +1 -1
  40. package/build/assets/{index-dy4Fq-_I.js → index-D2DMp7ZV.js} +1 -1
  41. package/build/assets/{index-BcbEpO1A.js → index-D89-kuqE.js} +1 -1
  42. package/build/assets/{index-DlZHr_LT.js → index-DANAhovw.js} +1 -1
  43. package/build/assets/{index-CuBoBzf5.js → index-DSjuUKdC.js} +1 -1
  44. package/build/assets/{index-D_MPEPA-.js → index-Dl_mA1Nl.js} +1 -1
  45. package/build/assets/{index-Cr6ZktV0.js → index-TUoqyzwU.js} +1 -1
  46. package/build/assets/{index-Djk6g3D7.js → index-alz1Rvq4.js} +1 -1
  47. package/build/assets/{index-Bx_n8HNg.js → index-hH8Sut1X.js} +4 -4
  48. package/build/assets/{index-LrDlyKHF.js → index-lLC7Tx4g.js} +1 -1
  49. package/build/assets/{index-ririmK9i.js → index-pJYKsVzM.js} +1 -1
  50. package/build/assets/{index-DdYwgLCs.js → index-qtdhMqAD.js} +1 -1
  51. package/build/assets/{index-yNPtrbxs.js → index-zLJxz6wD.js} +1 -1
  52. package/build/assets/{input-D70-L3j9.js → input-CrUUFRwU.js} +1 -1
  53. package/build/assets/{memory-CcbiQyNI.js → memory-Dh-HNzmo.js} +1 -1
  54. package/build/assets/{number-overlay-editor-DwRDmB7O.js → number-overlay-editor-DuocIhYg.js} +1 -1
  55. package/build/assets/{sandbox-DNuj5tuK.js → sandbox-BY7dxj3-.js} +1 -1
  56. package/build/assets/{slicedToArray-DvZOPupn.js → slicedToArray-C2pdyuaM.js} +1 -1
  57. package/build/assets/{textarea-CwCvq-TS.js → textarea-OrCHMQgB.js} +1 -1
  58. package/build/assets/{timepicker-D2Q8PdLE.js → timepicker-DAlQ6jj1.js} +1 -1
  59. package/build/assets/{uniqueId-CZt8iarg.js → uniqueId-quqTbt0N.js} +1 -1
  60. package/build/assets/{useBasicWidgetState-T4r0nY5O.js → useBasicWidgetState-Bs4S52cR.js} +1 -1
  61. package/build/assets/{useOnInputChange-Cs15AJnE.js → useOnInputChange-BSBe29sU.js} +1 -1
  62. package/build/assets/{withFullScreenWrapper-i_wAtCLZ.js → withFullScreenWrapper-B4K8Mx23.js} +1 -1
  63. package/build/assets/worker-DJFo-in0.js +215 -0
  64. package/build/electron/worker.js +41 -45
  65. package/build/index.html +1 -1
  66. package/package.json +4 -4
  67. package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
  68. package/build/assets/worker-DWdDGetD.js +0 -219
@@ -1 +1 @@
1
- import{r as o,B as h,j as v,bP as c,a$ as I}from"./index-Bx_n8HNg.js";import{a as S}from"./useBasicWidgetState-T4r0nY5O.js";import"./FormClearHelper-EZKsnYaC.js";const V=(e,t)=>e.getIntValue(t),w=e=>e.default??null,M=e=>e.value??null,P=(e,t,l,a)=>{t.setIntValue(e,l.value,{fromUi:l.fromUi},a)},U=({disabled:e,element:t,widgetMgr:l,width:a,fragmentId:d})=>{const{options:m,help:u,label:s,labelVisibility:r,placeholder:g}=t,[n,i]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:w,getCurrStateFromProto:M,updateWidgetMgrState:P,element:t,widgetMgr:l,fragmentId:d}),b=o.useCallback(p=>{i({value:p,fromUi:!0})},[i]),f=h(t.default)&&!e;return v.jsx(c,{label:s,labelVisibility:I(r==null?void 0:r.value),options:m,disabled:e,width:a,onChange:b,value:n,help:u,placeholder:g,clearable:f})},j=o.memo(U);export{j as default};
1
+ import{r as o,B as h,j as v,bP as c,a$ as I}from"./index-hH8Sut1X.js";import{a as S}from"./useBasicWidgetState-Bs4S52cR.js";import"./FormClearHelper-BG2GkAQw.js";const V=(e,t)=>e.getIntValue(t),w=e=>e.default??null,M=e=>e.value??null,P=(e,t,l,a)=>{t.setIntValue(e,l.value,{fromUi:l.fromUi},a)},U=({disabled:e,element:t,widgetMgr:l,width:a,fragmentId:d})=>{const{options:m,help:u,label:s,labelVisibility:r,placeholder:g}=t,[n,i]=S({getStateFromWidgetMgr:V,getDefaultStateFromProto:w,getCurrStateFromProto:M,updateWidgetMgrState:P,element:t,widgetMgr:l,fragmentId:d}),b=o.useCallback(p=>{i({value:p,fromUi:!0})},[i]),f=h(t.default)&&!e;return v.jsx(c,{label:s,labelVisibility:I(r==null?void 0:r.value),options:m,disabled:e,width:a,onChange:b,value:n,help:u,placeholder:g,clearable:f})},j=o.memo(U);export{j as default};
@@ -1,2 +1,2 @@
1
- import{r as at,j as bt}from"./index-Bx_n8HNg.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:ie,setPrototypeOf:le,isFrozen:Ge,getPrototypeOf:Ye,getOwnPropertyDescriptor:je}=Object;let{freeze:E,seal:b,create:ce}=Object,{apply:St,construct:Rt}=typeof Reflect<"u"&&Reflect;E||(E=function(r){return r}),b||(b=function(r){return r}),St||(St=function(r,o,l){return r.apply(o,l)}),Rt||(Rt=function(r,o){return new r(...o)});const it=A(Array.prototype.forEach),se=A(Array.prototype.pop),X=A(Array.prototype.push),lt=A(String.prototype.toLowerCase),wt=A(String.prototype.toString),ue=A(String.prototype.match),q=A(String.prototype.replace),Xe=A(String.prototype.indexOf),qe=A(String.prototype.trim),S=A(Object.prototype.hasOwnProperty),_=A(RegExp.prototype.test),$=$e(TypeError);function A(r){return function(o){for(var l=arguments.length,i=new Array(l>1?l-1:0),d=1;d<l;d++)i[d-1]=arguments[d];return St(r,o,i)}}function $e(r){return function(){for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];return Rt(r,l)}}function a(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt;le&&le(r,null);let i=o.length;for(;i--;){let d=o[i];if(typeof d=="string"){const h=l(d);h!==d&&(Ge(o)||(o[i]=h),d=h)}r[d]=!0}return r}function Ke(r){for(let o=0;o<r.length;o++)S(r,o)||(r[o]=null);return r}function x(r){const o=ce(null);for(const[l,i]of ie(r))S(r,l)&&(Array.isArray(i)?o[l]=Ke(i):i&&typeof i=="object"&&i.constructor===Object?o[l]=x(i):o[l]=i);return o}function K(r,o){for(;r!==null;){const i=je(r,o);if(i){if(i.get)return A(i.get);if(typeof i.value=="function")return A(i.value)}r=Ye(r)}function l(){return null}return l}const me=E(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Lt=E(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ct=E(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ve=E(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vt=E(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ze=E(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pe=E(["#text"]),fe=E(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Dt=E(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),de=E(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ct=E(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Je=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qe=b(/<%[\w\W]*|[\w\W]*%>/gm),tn=b(/\${[\w\W]*}/gm),en=b(/^data-[\-\w.\u00B7-\uFFFF]/),nn=b(/^aria-[\-\w]+$/),ge=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),on=b(/^(?:\w+script|data):/i),rn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),he=b(/^html$/i),an=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var Te=Object.freeze({__proto__:null,MUSTACHE_EXPR:Je,ERB_EXPR:Qe,TMPLIT_EXPR:tn,DATA_ATTR:en,ARIA_ATTR:nn,IS_ALLOWED_URI:ge,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:rn,DOCTYPE_NAME:he,CUSTOM_ELEMENT:an});const V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ln=function(){return typeof window>"u"?null:window},cn=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let l=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(l=o.getAttribute(i));const d="dompurify"+(l?"#"+l:"");try{return r.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}};function ye(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ln();const o=t=>ye(t);if(o.version="3.1.7",o.removed=[],!r||!r.document||r.document.nodeType!==V.document)return o.isSupported=!1,o;let{document:l}=r;const i=l,d=i.currentScript,{DocumentFragment:h,HTMLTemplateElement:Z,Node:k,Element:xt,NodeFilter:z,NamedNodeMap:Ee=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:_e,DOMParser:Ae,trustedTypes:J}=r,W=xt.prototype,Ne=K(W,"cloneNode"),be=K(W,"remove"),Se=K(W,"nextSibling"),Re=K(W,"childNodes"),Q=K(W,"parentNode");if(typeof Z=="function"){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let T,B="";const{implementation:st,createNodeIterator:we,createDocumentFragment:Le,getElementsByTagName:Ce}=l,{importNode:ve}=i;let R={};o.isSupported=typeof ie=="function"&&typeof Q=="function"&&st&&st.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ut,ERB_EXPR:mt,TMPLIT_EXPR:pt,DATA_ATTR:De,ARIA_ATTR:Oe,IS_SCRIPT_OR_DATA:xe,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:ke}=Te;let{IS_ALLOWED_URI:It}=Te,m=null;const Mt=a({},[...me,...Lt,...Ct,...vt,...pe]);let p=null;const Ut=a({},[...fe,...Dt,...de,...ct]);let s=Object.seal(ce(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,ft=null,Pt=!0,dt=!0,Ht=!1,Ft=!0,I=!1,gt=!0,D=!1,ht=!1,Tt=!1,M=!1,tt=!1,et=!1,zt=!0,Wt=!1;const Ie="user-content-";let yt=!0,Y=!1,U={},P=null;const Bt=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gt=null;const Yt=a({},["audio","video","img","source","image","track"]);let Et=null;const jt=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nt="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",L="http://www.w3.org/1999/xhtml";let H=L,_t=!1,At=null;const Me=a({},[nt,ot,L],wt);let j=null;const Ue=["application/xhtml+xml","text/html"],Pe="text/html";let f=null,F=null;const He=l.createElement("form"),Xt=function(t){return t instanceof RegExp||t instanceof Function},Nt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===t)){if((!t||typeof t!="object")&&(t={}),t=x(t),j=Ue.indexOf(t.PARSER_MEDIA_TYPE)===-1?Pe:t.PARSER_MEDIA_TYPE,f=j==="application/xhtml+xml"?wt:lt,m=S(t,"ALLOWED_TAGS")?a({},t.ALLOWED_TAGS,f):Mt,p=S(t,"ALLOWED_ATTR")?a({},t.ALLOWED_ATTR,f):Ut,At=S(t,"ALLOWED_NAMESPACES")?a({},t.ALLOWED_NAMESPACES,wt):Me,Et=S(t,"ADD_URI_SAFE_ATTR")?a(x(jt),t.ADD_URI_SAFE_ATTR,f):jt,Gt=S(t,"ADD_DATA_URI_TAGS")?a(x(Yt),t.ADD_DATA_URI_TAGS,f):Yt,P=S(t,"FORBID_CONTENTS")?a({},t.FORBID_CONTENTS,f):Bt,G=S(t,"FORBID_TAGS")?a({},t.FORBID_TAGS,f):{},ft=S(t,"FORBID_ATTR")?a({},t.FORBID_ATTR,f):{},U=S(t,"USE_PROFILES")?t.USE_PROFILES:!1,Pt=t.ALLOW_ARIA_ATTR!==!1,dt=t.ALLOW_DATA_ATTR!==!1,Ht=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=t.SAFE_FOR_TEMPLATES||!1,gt=t.SAFE_FOR_XML!==!1,D=t.WHOLE_DOCUMENT||!1,M=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Tt=t.FORCE_BODY||!1,zt=t.SANITIZE_DOM!==!1,Wt=t.SANITIZE_NAMED_PROPS||!1,yt=t.KEEP_CONTENT!==!1,Y=t.IN_PLACE||!1,It=t.ALLOWED_URI_REGEXP||ge,H=t.NAMESPACE||L,s=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(s.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(s.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(s.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(dt=!1),tt&&(M=!0),U&&(m=a({},pe),p=[],U.html===!0&&(a(m,me),a(p,fe)),U.svg===!0&&(a(m,Lt),a(p,Dt),a(p,ct)),U.svgFilters===!0&&(a(m,Ct),a(p,Dt),a(p,ct)),U.mathMl===!0&&(a(m,vt),a(p,de),a(p,ct))),t.ADD_TAGS&&(m===Mt&&(m=x(m)),a(m,t.ADD_TAGS,f)),t.ADD_ATTR&&(p===Ut&&(p=x(p)),a(p,t.ADD_ATTR,f)),t.ADD_URI_SAFE_ATTR&&a(Et,t.ADD_URI_SAFE_ATTR,f),t.FORBID_CONTENTS&&(P===Bt&&(P=x(P)),a(P,t.FORBID_CONTENTS,f)),yt&&(m["#text"]=!0),D&&a(m,["html","head","body"]),m.table&&(a(m,["tbody"]),delete G.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=t.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=cn(J,d)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));E&&E(t),F=t}},qt=a({},["mi","mo","mn","ms","mtext"]),$t=a({},["annotation-xml"]),Fe=a({},["title","style","font","a","script"]),Kt=a({},[...Lt,...Ct,...Ve]),Vt=a({},[...vt,...Ze]),ze=function(t){let n=Q(t);(!n||!n.tagName)&&(n={namespaceURI:H,tagName:"template"});const e=lt(t.tagName),c=lt(n.tagName);return At[t.namespaceURI]?t.namespaceURI===ot?n.namespaceURI===L?e==="svg":n.namespaceURI===nt?e==="svg"&&(c==="annotation-xml"||qt[c]):!!Kt[e]:t.namespaceURI===nt?n.namespaceURI===L?e==="math":n.namespaceURI===ot?e==="math"&&$t[c]:!!Vt[e]:t.namespaceURI===L?n.namespaceURI===ot&&!$t[c]||n.namespaceURI===nt&&!qt[c]?!1:!Vt[e]&&(Fe[e]||!Kt[e]):!!(j==="application/xhtml+xml"&&At[t.namespaceURI]):!1},O=function(t){X(o.removed,{element:t});try{Q(t).removeChild(t)}catch{be(t)}},rt=function(t,n){try{X(o.removed,{attribute:n.getAttributeNode(t),from:n})}catch{X(o.removed,{attribute:null,from:n})}if(n.removeAttribute(t),t==="is"&&!p[t])if(M||tt)try{O(n)}catch{}else try{n.setAttribute(t,"")}catch{}},Zt=function(t){let n=null,e=null;if(Tt)t="<remove></remove>"+t;else{const u=ue(t,/^[\r\n\t ]+/);e=u&&u[0]}j==="application/xhtml+xml"&&H===L&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const c=T?T.createHTML(t):t;if(H===L)try{n=new Ae().parseFromString(c,j)}catch{}if(!n||!n.documentElement){n=st.createDocument(H,"template",null);try{n.documentElement.innerHTML=_t?B:c}catch{}}const g=n.body||n.documentElement;return t&&e&&g.insertBefore(l.createTextNode(e),g.childNodes[0]||null),H===L?Ce.call(n,D?"html":"body")[0]:D?n.documentElement:g},Jt=function(t){return we.call(t.ownerDocument||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Qt=function(t){return t instanceof _e&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof Ee)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},te=function(t){return typeof k=="function"&&t instanceof k},C=function(t,n,e){R[t]&&it(R[t],c=>{c.call(o,n,e,F)})},ee=function(t){let n=null;if(C("beforeSanitizeElements",t,null),Qt(t))return O(t),!0;const e=f(t.nodeName);if(C("uponSanitizeElement",t,{tagName:e,allowedTags:m}),t.hasChildNodes()&&!te(t.firstElementChild)&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent)||t.nodeType===V.progressingInstruction||gt&&t.nodeType===V.comment&&_(/<[/\w]/g,t.data))return O(t),!0;if(!m[e]||G[e]){if(!G[e]&&oe(e)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e)))return!1;if(yt&&!P[e]){const c=Q(t)||t.parentNode,g=Re(t)||t.childNodes;if(g&&c){const u=g.length;for(let v=u-1;v>=0;--v){const N=Ne(g[v],!0);N.__removalCount=(t.__removalCount||0)+1,c.insertBefore(N,Se(t))}}}return O(t),!0}return t instanceof xt&&!ze(t)||(e==="noscript"||e==="noembed"||e==="noframes")&&_(/<\/no(script|embed|frames)/i,t.innerHTML)?(O(t),!0):(I&&t.nodeType===V.text&&(n=t.textContent,it([ut,mt,pt],c=>{n=q(n,c," ")}),t.textContent!==n&&(X(o.removed,{element:t.cloneNode()}),t.textContent=n)),C("afterSanitizeElements",t,null),!1)},ne=function(t,n,e){if(zt&&(n==="id"||n==="name")&&(e in l||e in He))return!1;if(!(dt&&!ft[n]&&_(De,n))&&!(Pt&&_(Oe,n))){if(!p[n]||ft[n]){if(!(oe(t)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,t)||s.tagNameCheck instanceof Function&&s.tagNameCheck(t))&&(s.attributeNameCheck instanceof RegExp&&_(s.attributeNameCheck,n)||s.attributeNameCheck instanceof Function&&s.attributeNameCheck(n))||n==="is"&&s.allowCustomizedBuiltInElements&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e))))return!1}else if(!Et[n]&&!_(It,q(e,kt,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&Xe(e,"data:")===0&&Gt[t])&&!(Ht&&!_(xe,q(e,kt,"")))&&e)return!1}return!0},oe=function(t){return t!=="annotation-xml"&&ue(t,ke)},re=function(t){C("beforeSanitizeAttributes",t,null);const{attributes:n}=t;if(!n)return;const e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=n.length;for(;c--;){const g=n[c],{name:u,namespaceURI:v,value:N}=g,w=f(u);let y=u==="value"?N:qe(N);if(e.attrName=w,e.attrValue=y,e.keepAttr=!0,e.forceKeepAttr=void 0,C("uponSanitizeAttribute",t,e),y=e.attrValue,e.forceKeepAttr||(rt(u,t),!e.keepAttr))continue;if(!Ft&&_(/\/>/i,y)){rt(u,t);continue}I&&it([ut,mt,pt],Be=>{y=q(y,Be," ")});const ae=f(t.nodeName);if(ne(ae,w,y)){if(Wt&&(w==="id"||w==="name")&&(rt(u,t),y=Ie+y),gt&&_(/((--!?|])>)|<\/(style|title)/i,y)){rt(u,t);continue}if(T&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!v)switch(J.getAttributeType(ae,w)){case"TrustedHTML":{y=T.createHTML(y);break}case"TrustedScriptURL":{y=T.createScriptURL(y);break}}try{v?t.setAttributeNS(v,u,y):t.setAttribute(u,y),Qt(t)?O(t):se(o.removed)}catch{}}}C("afterSanitizeAttributes",t,null)},We=function t(n){let e=null;const c=Jt(n);for(C("beforeSanitizeShadowDOM",n,null);e=c.nextNode();)C("uponSanitizeShadowNode",e,null),!ee(e)&&(e.content instanceof h&&t(e.content),re(e));C("afterSanitizeShadowDOM",n,null)};return o.sanitize=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,c=null,g=null,u=null;if(_t=!t,_t&&(t="<!-->"),typeof t!="string"&&!te(t))if(typeof t.toString=="function"){if(t=t.toString(),typeof t!="string")throw $("dirty is not a string, aborting")}else throw $("toString is not a function");if(!o.isSupported)return t;if(ht||Nt(n),o.removed=[],typeof t=="string"&&(Y=!1),Y){if(t.nodeName){const w=f(t.nodeName);if(!m[w]||G[w])throw $("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)e=Zt("<!---->"),c=e.ownerDocument.importNode(t,!0),c.nodeType===V.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?e=c:e.appendChild(c);else{if(!M&&!I&&!D&&t.indexOf("<")===-1)return T&&et?T.createHTML(t):t;if(e=Zt(t),!e)return M?null:et?B:""}e&&Tt&&O(e.firstChild);const v=Jt(Y?t:e);for(;g=v.nextNode();)ee(g)||(g.content instanceof h&&We(g.content),re(g));if(Y)return t;if(M){if(tt)for(u=Le.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(p.shadowroot||p.shadowrootmode)&&(u=ve.call(i,u,!0)),u}let N=D?e.outerHTML:e.innerHTML;return D&&m["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&_(he,e.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
1
+ import{r as at,j as bt}from"./index-hH8Sut1X.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:ie,setPrototypeOf:le,isFrozen:Ge,getPrototypeOf:Ye,getOwnPropertyDescriptor:je}=Object;let{freeze:E,seal:b,create:ce}=Object,{apply:St,construct:Rt}=typeof Reflect<"u"&&Reflect;E||(E=function(r){return r}),b||(b=function(r){return r}),St||(St=function(r,o,l){return r.apply(o,l)}),Rt||(Rt=function(r,o){return new r(...o)});const it=A(Array.prototype.forEach),se=A(Array.prototype.pop),X=A(Array.prototype.push),lt=A(String.prototype.toLowerCase),wt=A(String.prototype.toString),ue=A(String.prototype.match),q=A(String.prototype.replace),Xe=A(String.prototype.indexOf),qe=A(String.prototype.trim),S=A(Object.prototype.hasOwnProperty),_=A(RegExp.prototype.test),$=$e(TypeError);function A(r){return function(o){for(var l=arguments.length,i=new Array(l>1?l-1:0),d=1;d<l;d++)i[d-1]=arguments[d];return St(r,o,i)}}function $e(r){return function(){for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];return Rt(r,l)}}function a(r,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lt;le&&le(r,null);let i=o.length;for(;i--;){let d=o[i];if(typeof d=="string"){const h=l(d);h!==d&&(Ge(o)||(o[i]=h),d=h)}r[d]=!0}return r}function Ke(r){for(let o=0;o<r.length;o++)S(r,o)||(r[o]=null);return r}function x(r){const o=ce(null);for(const[l,i]of ie(r))S(r,l)&&(Array.isArray(i)?o[l]=Ke(i):i&&typeof i=="object"&&i.constructor===Object?o[l]=x(i):o[l]=i);return o}function K(r,o){for(;r!==null;){const i=je(r,o);if(i){if(i.get)return A(i.get);if(typeof i.value=="function")return A(i.value)}r=Ye(r)}function l(){return null}return l}const me=E(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Lt=E(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ct=E(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ve=E(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vt=E(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ze=E(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pe=E(["#text"]),fe=E(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Dt=E(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),de=E(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ct=E(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Je=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Qe=b(/<%[\w\W]*|[\w\W]*%>/gm),tn=b(/\${[\w\W]*}/gm),en=b(/^data-[\-\w.\u00B7-\uFFFF]/),nn=b(/^aria-[\-\w]+$/),ge=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),on=b(/^(?:\w+script|data):/i),rn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),he=b(/^html$/i),an=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var Te=Object.freeze({__proto__:null,MUSTACHE_EXPR:Je,ERB_EXPR:Qe,TMPLIT_EXPR:tn,DATA_ATTR:en,ARIA_ATTR:nn,IS_ALLOWED_URI:ge,IS_SCRIPT_OR_DATA:on,ATTR_WHITESPACE:rn,DOCTYPE_NAME:he,CUSTOM_ELEMENT:an});const V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ln=function(){return typeof window>"u"?null:window},cn=function(r,o){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let l=null;const i="data-tt-policy-suffix";o&&o.hasAttribute(i)&&(l=o.getAttribute(i));const d="dompurify"+(l?"#"+l:"");try{return r.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}};function ye(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ln();const o=t=>ye(t);if(o.version="3.1.7",o.removed=[],!r||!r.document||r.document.nodeType!==V.document)return o.isSupported=!1,o;let{document:l}=r;const i=l,d=i.currentScript,{DocumentFragment:h,HTMLTemplateElement:Z,Node:k,Element:xt,NodeFilter:z,NamedNodeMap:Ee=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:_e,DOMParser:Ae,trustedTypes:J}=r,W=xt.prototype,Ne=K(W,"cloneNode"),be=K(W,"remove"),Se=K(W,"nextSibling"),Re=K(W,"childNodes"),Q=K(W,"parentNode");if(typeof Z=="function"){const t=l.createElement("template");t.content&&t.content.ownerDocument&&(l=t.content.ownerDocument)}let T,B="";const{implementation:st,createNodeIterator:we,createDocumentFragment:Le,getElementsByTagName:Ce}=l,{importNode:ve}=i;let R={};o.isSupported=typeof ie=="function"&&typeof Q=="function"&&st&&st.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ut,ERB_EXPR:mt,TMPLIT_EXPR:pt,DATA_ATTR:De,ARIA_ATTR:Oe,IS_SCRIPT_OR_DATA:xe,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:ke}=Te;let{IS_ALLOWED_URI:It}=Te,m=null;const Mt=a({},[...me,...Lt,...Ct,...vt,...pe]);let p=null;const Ut=a({},[...fe,...Dt,...de,...ct]);let s=Object.seal(ce(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,ft=null,Pt=!0,dt=!0,Ht=!1,Ft=!0,I=!1,gt=!0,D=!1,ht=!1,Tt=!1,M=!1,tt=!1,et=!1,zt=!0,Wt=!1;const Ie="user-content-";let yt=!0,Y=!1,U={},P=null;const Bt=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gt=null;const Yt=a({},["audio","video","img","source","image","track"]);let Et=null;const jt=a({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),nt="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",L="http://www.w3.org/1999/xhtml";let H=L,_t=!1,At=null;const Me=a({},[nt,ot,L],wt);let j=null;const Ue=["application/xhtml+xml","text/html"],Pe="text/html";let f=null,F=null;const He=l.createElement("form"),Xt=function(t){return t instanceof RegExp||t instanceof Function},Nt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===t)){if((!t||typeof t!="object")&&(t={}),t=x(t),j=Ue.indexOf(t.PARSER_MEDIA_TYPE)===-1?Pe:t.PARSER_MEDIA_TYPE,f=j==="application/xhtml+xml"?wt:lt,m=S(t,"ALLOWED_TAGS")?a({},t.ALLOWED_TAGS,f):Mt,p=S(t,"ALLOWED_ATTR")?a({},t.ALLOWED_ATTR,f):Ut,At=S(t,"ALLOWED_NAMESPACES")?a({},t.ALLOWED_NAMESPACES,wt):Me,Et=S(t,"ADD_URI_SAFE_ATTR")?a(x(jt),t.ADD_URI_SAFE_ATTR,f):jt,Gt=S(t,"ADD_DATA_URI_TAGS")?a(x(Yt),t.ADD_DATA_URI_TAGS,f):Yt,P=S(t,"FORBID_CONTENTS")?a({},t.FORBID_CONTENTS,f):Bt,G=S(t,"FORBID_TAGS")?a({},t.FORBID_TAGS,f):{},ft=S(t,"FORBID_ATTR")?a({},t.FORBID_ATTR,f):{},U=S(t,"USE_PROFILES")?t.USE_PROFILES:!1,Pt=t.ALLOW_ARIA_ATTR!==!1,dt=t.ALLOW_DATA_ATTR!==!1,Ht=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=t.SAFE_FOR_TEMPLATES||!1,gt=t.SAFE_FOR_XML!==!1,D=t.WHOLE_DOCUMENT||!1,M=t.RETURN_DOM||!1,tt=t.RETURN_DOM_FRAGMENT||!1,et=t.RETURN_TRUSTED_TYPE||!1,Tt=t.FORCE_BODY||!1,zt=t.SANITIZE_DOM!==!1,Wt=t.SANITIZE_NAMED_PROPS||!1,yt=t.KEEP_CONTENT!==!1,Y=t.IN_PLACE||!1,It=t.ALLOWED_URI_REGEXP||ge,H=t.NAMESPACE||L,s=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(s.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Xt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(s.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(s.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(dt=!1),tt&&(M=!0),U&&(m=a({},pe),p=[],U.html===!0&&(a(m,me),a(p,fe)),U.svg===!0&&(a(m,Lt),a(p,Dt),a(p,ct)),U.svgFilters===!0&&(a(m,Ct),a(p,Dt),a(p,ct)),U.mathMl===!0&&(a(m,vt),a(p,de),a(p,ct))),t.ADD_TAGS&&(m===Mt&&(m=x(m)),a(m,t.ADD_TAGS,f)),t.ADD_ATTR&&(p===Ut&&(p=x(p)),a(p,t.ADD_ATTR,f)),t.ADD_URI_SAFE_ATTR&&a(Et,t.ADD_URI_SAFE_ATTR,f),t.FORBID_CONTENTS&&(P===Bt&&(P=x(P)),a(P,t.FORBID_CONTENTS,f)),yt&&(m["#text"]=!0),D&&a(m,["html","head","body"]),m.table&&(a(m,["tbody"]),delete G.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=t.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=cn(J,d)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));E&&E(t),F=t}},qt=a({},["mi","mo","mn","ms","mtext"]),$t=a({},["annotation-xml"]),Fe=a({},["title","style","font","a","script"]),Kt=a({},[...Lt,...Ct,...Ve]),Vt=a({},[...vt,...Ze]),ze=function(t){let n=Q(t);(!n||!n.tagName)&&(n={namespaceURI:H,tagName:"template"});const e=lt(t.tagName),c=lt(n.tagName);return At[t.namespaceURI]?t.namespaceURI===ot?n.namespaceURI===L?e==="svg":n.namespaceURI===nt?e==="svg"&&(c==="annotation-xml"||qt[c]):!!Kt[e]:t.namespaceURI===nt?n.namespaceURI===L?e==="math":n.namespaceURI===ot?e==="math"&&$t[c]:!!Vt[e]:t.namespaceURI===L?n.namespaceURI===ot&&!$t[c]||n.namespaceURI===nt&&!qt[c]?!1:!Vt[e]&&(Fe[e]||!Kt[e]):!!(j==="application/xhtml+xml"&&At[t.namespaceURI]):!1},O=function(t){X(o.removed,{element:t});try{Q(t).removeChild(t)}catch{be(t)}},rt=function(t,n){try{X(o.removed,{attribute:n.getAttributeNode(t),from:n})}catch{X(o.removed,{attribute:null,from:n})}if(n.removeAttribute(t),t==="is"&&!p[t])if(M||tt)try{O(n)}catch{}else try{n.setAttribute(t,"")}catch{}},Zt=function(t){let n=null,e=null;if(Tt)t="<remove></remove>"+t;else{const u=ue(t,/^[\r\n\t ]+/);e=u&&u[0]}j==="application/xhtml+xml"&&H===L&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const c=T?T.createHTML(t):t;if(H===L)try{n=new Ae().parseFromString(c,j)}catch{}if(!n||!n.documentElement){n=st.createDocument(H,"template",null);try{n.documentElement.innerHTML=_t?B:c}catch{}}const g=n.body||n.documentElement;return t&&e&&g.insertBefore(l.createTextNode(e),g.childNodes[0]||null),H===L?Ce.call(n,D?"html":"body")[0]:D?n.documentElement:g},Jt=function(t){return we.call(t.ownerDocument||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Qt=function(t){return t instanceof _e&&(typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||!(t.attributes instanceof Ee)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function")},te=function(t){return typeof k=="function"&&t instanceof k},C=function(t,n,e){R[t]&&it(R[t],c=>{c.call(o,n,e,F)})},ee=function(t){let n=null;if(C("beforeSanitizeElements",t,null),Qt(t))return O(t),!0;const e=f(t.nodeName);if(C("uponSanitizeElement",t,{tagName:e,allowedTags:m}),t.hasChildNodes()&&!te(t.firstElementChild)&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent)||t.nodeType===V.progressingInstruction||gt&&t.nodeType===V.comment&&_(/<[/\w]/g,t.data))return O(t),!0;if(!m[e]||G[e]){if(!G[e]&&oe(e)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e)))return!1;if(yt&&!P[e]){const c=Q(t)||t.parentNode,g=Re(t)||t.childNodes;if(g&&c){const u=g.length;for(let v=u-1;v>=0;--v){const N=Ne(g[v],!0);N.__removalCount=(t.__removalCount||0)+1,c.insertBefore(N,Se(t))}}}return O(t),!0}return t instanceof xt&&!ze(t)||(e==="noscript"||e==="noembed"||e==="noframes")&&_(/<\/no(script|embed|frames)/i,t.innerHTML)?(O(t),!0):(I&&t.nodeType===V.text&&(n=t.textContent,it([ut,mt,pt],c=>{n=q(n,c," ")}),t.textContent!==n&&(X(o.removed,{element:t.cloneNode()}),t.textContent=n)),C("afterSanitizeElements",t,null),!1)},ne=function(t,n,e){if(zt&&(n==="id"||n==="name")&&(e in l||e in He))return!1;if(!(dt&&!ft[n]&&_(De,n))&&!(Pt&&_(Oe,n))){if(!p[n]||ft[n]){if(!(oe(t)&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,t)||s.tagNameCheck instanceof Function&&s.tagNameCheck(t))&&(s.attributeNameCheck instanceof RegExp&&_(s.attributeNameCheck,n)||s.attributeNameCheck instanceof Function&&s.attributeNameCheck(n))||n==="is"&&s.allowCustomizedBuiltInElements&&(s.tagNameCheck instanceof RegExp&&_(s.tagNameCheck,e)||s.tagNameCheck instanceof Function&&s.tagNameCheck(e))))return!1}else if(!Et[n]&&!_(It,q(e,kt,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&t!=="script"&&Xe(e,"data:")===0&&Gt[t])&&!(Ht&&!_(xe,q(e,kt,"")))&&e)return!1}return!0},oe=function(t){return t!=="annotation-xml"&&ue(t,ke)},re=function(t){C("beforeSanitizeAttributes",t,null);const{attributes:n}=t;if(!n)return;const e={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=n.length;for(;c--;){const g=n[c],{name:u,namespaceURI:v,value:N}=g,w=f(u);let y=u==="value"?N:qe(N);if(e.attrName=w,e.attrValue=y,e.keepAttr=!0,e.forceKeepAttr=void 0,C("uponSanitizeAttribute",t,e),y=e.attrValue,e.forceKeepAttr||(rt(u,t),!e.keepAttr))continue;if(!Ft&&_(/\/>/i,y)){rt(u,t);continue}I&&it([ut,mt,pt],Be=>{y=q(y,Be," ")});const ae=f(t.nodeName);if(ne(ae,w,y)){if(Wt&&(w==="id"||w==="name")&&(rt(u,t),y=Ie+y),gt&&_(/((--!?|])>)|<\/(style|title)/i,y)){rt(u,t);continue}if(T&&typeof J=="object"&&typeof J.getAttributeType=="function"&&!v)switch(J.getAttributeType(ae,w)){case"TrustedHTML":{y=T.createHTML(y);break}case"TrustedScriptURL":{y=T.createScriptURL(y);break}}try{v?t.setAttributeNS(v,u,y):t.setAttribute(u,y),Qt(t)?O(t):se(o.removed)}catch{}}}C("afterSanitizeAttributes",t,null)},We=function t(n){let e=null;const c=Jt(n);for(C("beforeSanitizeShadowDOM",n,null);e=c.nextNode();)C("uponSanitizeShadowNode",e,null),!ee(e)&&(e.content instanceof h&&t(e.content),re(e));C("afterSanitizeShadowDOM",n,null)};return o.sanitize=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,c=null,g=null,u=null;if(_t=!t,_t&&(t="<!-->"),typeof t!="string"&&!te(t))if(typeof t.toString=="function"){if(t=t.toString(),typeof t!="string")throw $("dirty is not a string, aborting")}else throw $("toString is not a function");if(!o.isSupported)return t;if(ht||Nt(n),o.removed=[],typeof t=="string"&&(Y=!1),Y){if(t.nodeName){const w=f(t.nodeName);if(!m[w]||G[w])throw $("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)e=Zt("<!---->"),c=e.ownerDocument.importNode(t,!0),c.nodeType===V.element&&c.nodeName==="BODY"||c.nodeName==="HTML"?e=c:e.appendChild(c);else{if(!M&&!I&&!D&&t.indexOf("<")===-1)return T&&et?T.createHTML(t):t;if(e=Zt(t),!e)return M?null:et?B:""}e&&Tt&&O(e.firstChild);const v=Jt(Y?t:e);for(;g=v.nextNode();)ee(g)||(g.content instanceof h&&We(g.content),re(g));if(Y)return t;if(M){if(tt)for(u=Le.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(p.shadowroot||p.shadowrootmode)&&(u=ve.call(i,u,!0)),u}let N=D?e.outerHTML:e.innerHTML;return D&&m["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&_(he,e.ownerDocument.doctype.name)&&(N="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
2
2
  `+N),I&&it([ut,mt,pt],w=>{N=q(N,w," ")}),T&&et?T.createHTML(N):N},o.setConfig=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nt(t),ht=!0},o.clearConfig=function(){F=null,ht=!1},o.isValidAttribute=function(t,n,e){F||Nt({});const c=f(t),g=f(n);return ne(c,g,e)},o.addHook=function(t,n){typeof n=="function"&&(R[t]=R[t]||[],X(R[t],n))},o.removeHook=function(t){if(R[t])return se(R[t])},o.removeHooks=function(t){R[t]&&(R[t]=[])},o.removeAllHooks=function(){R={}},o}var sn=ye();const Ot=r=>{const o={USE_PROFILES:{html:!0},FORCE_BODY:!0};return sn.sanitize(r,o)};function un({element:r,width:o}){const{body:l}=r,[i,d]=at.useState(Ot(l)),h=at.useRef(null);return at.useEffect(()=>{Ot(l)!==i&&d(Ot(l))},[l]),at.useEffect(()=>{var Z,k;((Z=h.current)==null?void 0:Z.clientHeight)===0&&((k=h.current.parentElement)==null?void 0:k.childElementCount)===1&&h.current.parentElement.classList.add("stHtml-empty")}),bt.jsx(bt.Fragment,{children:i&&bt.jsx("div",{className:"stHtml","data-testid":"stHtml",ref:h,style:{width:o},dangerouslySetInnerHTML:{__html:i}})})}export{un as default};
@@ -1 +1 @@
1
- import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-Bx_n8HNg.js";import{I as K}from"./InputInstructions-DjR1o_IC.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-CwCvq-TS.js";import"./base-input-7pZdCg4C.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.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"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};
1
+ import{r as a,E as S,_ as B,c,a5 as T,M as L,j as s,aY as V}from"./index-hH8Sut1X.js";import{I as K}from"./InputInstructions-B7n1tTWv.js";import{i as M}from"./inputUtils-CptNuJwn.js";import{T as A}from"./textarea-OrCHMQgB.js";import"./base-input-Dd63Ml1u.js";var R=a.forwardRef(function(e,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(S,B({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:r}),a.createElement("rect",{width:24,height:24,fill:"none"}),a.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"}))});R.displayName="Send";const D=c("div",{target:"e1d2x3se4"})(({theme:e,width:r})=>({borderRadius:e.radii.default,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${r}px`}),""),N=c("div",{target:"e1d2x3se3"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"relative",flexGrow:1,borderRadius:e.radii.default,display:"flex",alignItems:"center"}),""),F=c("button",{target:"e1d2x3se2"})(({theme:e,disabled:r,extended:l})=>{const g=T(e),[t,h]=g?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:l?"0":e.radii.default,borderTopLeftRadius:l?e.radii.default:"0",borderBottomRightRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:r?t:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:g?e.colors.gray10:e.colors.gray90},"&:hover":{backgroundColor:e.colors.primary,color:e.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}},""),G=c("div",{target:"e1d2x3se1"})({name:"1v03qtz",styles:"display:flex;align-items:flex-end;height:100%;position:absolute;right:0;pointer-events:none"}),U=c("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),_=6.5,k=1;function q({width:e,element:r,widgetMgr:l,fragmentId:g}){const t=L(),[h,p]=a.useState(!1),[u,m]=a.useState(r.default),[f,x]=a.useState(0),n=a.useRef(null),b=a.useRef({minHeight:0,maxHeight:0}),z=()=>{let o=0;const{current:i}=n;if(i){const d=i.placeholder;i.placeholder="",i.style.height="auto",o=i.scrollHeight,i.placeholder=d,i.style.height=""}return o},y=()=>{n.current&&n.current.focus(),u&&(l.setStringTriggerValue(r,u,{fromUi:!0},g),p(!1),m(""),x(0))},j=o=>{const{metaKey:i,ctrlKey:d,shiftKey:E}=o;M(o)&&!E&&!d&&!i&&(o.preventDefault(),y())},I=o=>{const{value:i}=o.target,{maxChars:d}=r;d!==0&&i.length>d||(p(i!==""),m(i),x(z()))};a.useEffect(()=>{if(r.setValue){r.setValue=!1;const o=r.value||"";m(o),p(o!=="")}},[r]),a.useEffect(()=>{if(n.current){const{offsetHeight:o}=n.current;b.current.minHeight=o,b.current.maxHeight=o*_}},[n]);const{disabled:v,placeholder:C,maxChars:W}=r,{minHeight:$,maxHeight:w}=b.current,H=f>0&&n.current?Math.abs(f-$)>k:!1;return s.jsx(D,{className:"stChatInput","data-testid":"stChatInput",width:e,children:s.jsxs(N,{children:[s.jsx(A,{inputRef:n,value:u,placeholder:C,onChange:I,onKeyDown:j,"aria-label":C,disabled:v,rows:1,overrides:{Root:{style:{minHeight:t.sizes.minElementHeight,outline:"none",backgroundColor:t.colors.transparent,borderLeftWidth:t.sizes.borderWidth,borderRightWidth:t.sizes.borderWidth,borderTopWidth:t.sizes.borderWidth,borderBottomWidth:t.sizes.borderWidth,width:`${e}px`}},InputContainer:{style:{backgroundColor:t.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:t.lineHeights.inputWidget,backgroundColor:t.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:H?`${f+k}px`:"auto",maxHeight:w?`${w}px`:"none",paddingLeft:t.spacing.sm,paddingBottom:t.spacing.sm,paddingTop:t.spacing.sm,paddingRight:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`}}}}),e>t.breakpoints.hideWidgetDetails&&s.jsx(U,{children:s.jsx(K,{dirty:h,value:u,maxLength:W,type:"chat",inForm:!1})}),s.jsx(G,{children:s.jsx(F,{onClick:y,disabled:!h||v,extended:H,"data-testid":"stChatInputSubmitButton",children:s.jsx(V,{content:R,size:"xl",color:"inherit"})})})]})})}export{q as default};
@@ -1 +1 @@
1
- import{c as l,aD as y,j as i}from"./index-Bx_n8HNg.js";import{S as m,T as F}from"./Toolbar-BeKg-rY_.js";import{w as b,u as C,E as I}from"./withFullScreenWrapper-i_wAtCLZ.js";const S=l("div",{target:"e115fcil2"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"}),""),W=l("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),v=l("div",{target:"e115fcil0"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,color:e.colors.fadedText60,textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),"");function E({element:e,width:g,endpoints:h,disableFullscreenMode:p}){const x=y(e.imgs),{expanded:s,width:f,height:o,expand:u,collapse:w}=C(I),r=s?f:g;let n;const a=e.width;if([-1,-3,-4].includes(a))n=void 0;else if([-2,-5].includes(a))n=r;else if(a>0)n=a;else throw Error(`Invalid image width: ${a}`);const t={};return o&&s?(t.maxHeight=o,t.objectFit="contain"):(t.width=n,t.maxWidth="100%"),i.jsxs(m,{width:r,height:o,useContainerWidth:s,topCentered:!0,children:[i.jsx(F,{target:m,isFullScreen:s,onExpand:u,onCollapse:w,disableFullscreenMode:p}),i.jsx(S,{className:"stImage","data-testid":"stImage",children:x.map((j,c)=>{const d=j;return i.jsxs(W,{"data-testid":"stImageContainer",children:[i.jsx("img",{style:t,src:h.buildMediaURL(d.url),alt:c.toString()}),d.caption&&i.jsx(v,{"data-testid":"stImageCaption",style:t,children:` ${d.caption} `})]},c)})})]})}const T=b(E);export{T as default};
1
+ import{c as l,aD as y,j as i}from"./index-hH8Sut1X.js";import{S as m,T as F}from"./Toolbar-BE-lNYTp.js";import{w as b,u as C,E as I}from"./withFullScreenWrapper-B4K8Mx23.js";const S=l("div",{target:"e115fcil2"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:"fit-content"}),""),W=l("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),v=l("div",{target:"e115fcil0"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,color:e.colors.fadedText60,textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),"");function E({element:e,width:g,endpoints:h,disableFullscreenMode:p}){const x=y(e.imgs),{expanded:s,width:f,height:o,expand:u,collapse:w}=C(I),r=s?f:g;let n;const a=e.width;if([-1,-3,-4].includes(a))n=void 0;else if([-2,-5].includes(a))n=r;else if(a>0)n=a;else throw Error(`Invalid image width: ${a}`);const t={};return o&&s?(t.maxHeight=o,t.objectFit="contain"):(t.width=n,t.maxWidth="100%"),i.jsxs(m,{width:r,height:o,useContainerWidth:s,topCentered:!0,children:[i.jsx(F,{target:m,isFullScreen:s,onExpand:u,onCollapse:w,disableFullscreenMode:p}),i.jsx(S,{className:"stImage","data-testid":"stImage",children:x.map((j,c)=>{const d=j;return i.jsxs(W,{"data-testid":"stImageContainer",children:[i.jsx("img",{style:t,src:h.buildMediaURL(d.url),alt:c.toString()}),d.caption&&i.jsx(v,{"data-testid":"stImageCaption",style:t,children:` ${d.caption} `})]},c)})})]})}const T=b(E);export{T as default};
@@ -1,2 +1,2 @@
1
- import{r as f,bJ as U,b3 as m,bM as p,bO as S}from"./index-Bx_n8HNg.js";import{R as G,c as P,d as H,B as K}from"./base-input-7pZdCg4C.js";function v(t){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},v(t)}var L=["Root","StartEnhancer","EndEnhancer"],N=["startEnhancer","endEnhancer","overrides"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},i.apply(this,arguments)}function O(t,r){return X(t)||W(t,r)||V(t,r)||Q()}function Q(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as f,bJ as U,b3 as m,bM as p,bO as S}from"./index-hH8Sut1X.js";import{R as G,c as P,d as H,B as K}from"./base-input-Dd63Ml1u.js";function v(t){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},v(t)}var L=["Root","StartEnhancer","EndEnhancer"],N=["startEnhancer","endEnhancer","overrides"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},i.apply(this,arguments)}function O(t,r){return X(t)||W(t,r)||V(t,r)||Q()}function Q(){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 V(t,r){if(t){if(typeof t=="string")return F(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(t,r)}}function F(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}function W(t,r){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var e=[],o=!0,u=!1,a,c;try{for(n=n.call(t);!(o=(a=n.next()).done)&&(e.push(a.value),!(r&&e.length===r));o=!0);}catch(d){u=!0,c=d}finally{try{!o&&n.return!=null&&n.return()}finally{if(u)throw c}}return e}}function X(t){if(Array.isArray(t))return t}function R(t,r){if(t==null)return{};var n=Y(t,r),e,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o<u.length;o++)e=u[o],!(r.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(n[e]=t[e])}return n}function Y(t,r){if(t==null)return{};var n={},e=Object.keys(t),o,u;for(u=0;u<e.length;u++)o=e[u],!(r.indexOf(o)>=0)&&(n[o]=t[o]);return n}function Z(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tt(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function rt(t,r,n){return tt(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function et(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&g(t,r)}function g(t,r){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},g(t,r)}function nt(t){var r=ut();return function(){var n=b(t),e;if(r){var o=b(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ot(this,e)}}function ot(t,r){if(r&&(v(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function y(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ut(){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 b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b(t)}function h(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}var B=function(t){et(n,t);var r=nt(n);function n(){var e;Z(this,n);for(var o=arguments.length,u=new Array(o),a=0;a<o;a++)u[a]=arguments[a];return e=r.call.apply(r,[this].concat(u)),h(y(e),"state",{isFocused:e.props.autoFocus||!1}),h(y(e),"onFocus",function(c){e.setState({isFocused:!0}),e.props.onFocus(c)}),h(y(e),"onBlur",function(c){e.setState({isFocused:!1}),e.props.onBlur(c)}),e}return rt(n,[{key:"render",value:function(){var e=this.props,o=e.startEnhancer,u=e.endEnhancer,a=e.overrides,c=a.Root,d=a.StartEnhancer,x=a.EndEnhancer,A=R(a,L),I=R(e,N),T=m(c,G),j=O(T,2),$=j[0],C=j[1],k=m(d,P),w=O(k,2),M=w[0],q=w[1],z=m(x,P),E=O(z,2),D=E[0],J=E[1],s=H(this.props,this.state);return f.createElement($,i({"data-baseweb":"input"},s,C,{$adjoined:_(o,u),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),l(o)&&f.createElement(M,i({},s,q,{$position:S.start}),typeof o=="function"?o(s):o),f.createElement(K,i({},I,{overrides:A,adjoined:_(o,u),onFocus:this.onFocus,onBlur:this.onBlur})),l(u)&&f.createElement(D,i({},s,J,{$position:S.end}),typeof u=="function"?u(s):u))}}]),n}(f.Component);h(B,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:U.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function _(t,r){return l(t)&&l(r)?p.both:l(t)?p.left:l(r)?p.right:p.none}function l(t){return!!(t||t===0)}export{B as I};
@@ -1 +1 @@
1
- import{c as p,e as y}from"./es6-GdMCiz1N.js";import"./index-Bx_n8HNg.js";const{File:r,Blob:_,DOMException:s}=p,{INVALID:z,GONE:n,MISMATCH:f,MOD_ERR:m,SYNTAX:w,SECURITY:A,DISALLOWED:b}=y;class c{constructor(i,e){this.fileHandle=i,this.file=e,this.size=e.size,this.position=0}write(i){let e=this.file;if(typeof i=="object"){if(i.type==="write"){if(Number.isInteger(i.position)&&i.position>=0&&(this.position=i.position,this.size<i.position&&(this.file=new r([this.file,new ArrayBuffer(i.position-this.size)],this.file.name,this.file))),!("data"in i))throw new s(...w("write requires a data argument"));i=i.data}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(this.size<i.position)throw new s(...z);this.position=i.position;return}else throw new s(...w("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0){e=i.size<this.size?new r([e.slice(0,i.size)],e.name,e):new r([e,new Uint8Array(i.size-this.size)],e.name),this.size=e.size,this.position>e.size&&(this.position=e.size),this.file=e;return}else throw new s(...w("truncate requires a size argument"))}i=new _([i]);let t=this.file;const o=t.slice(0,this.position),u=t.slice(this.position+i.size);let a=this.position-o.size;a<0&&(a=0),t=new r([o,new Uint8Array(a),i,u],t.name),this.size=t.size,this.position+=i.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...n);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class h{constructor(i="",e=new r([],i),t=!0){this._file=e,this.name=i,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...n);return this._file}async createWritable(i){if(!this.writable)throw new s(...b);if(this._deleted)throw new s(...n);const e=i.keepExistingData?await this.getFile():new r([],this.name);return new c(this,e)}async isSameEntry(i){return this===i}async _destroy(){this._deleted=!0,this._file=null}}class l{constructor(i,e=!0){this.name=i,this.kind="directory",this._deleted=!1,this._entries={},this.writable=e,this.readable=!0}async*entries(){if(this._deleted)throw new s(...n);yield*Object.entries(this._entries)}async isSameEntry(i){return this===i}async getDirectoryHandle(i,e){if(this._deleted)throw new s(...n);const t=this._entries[i];if(t){if(t instanceof h)throw new s(...f);return t}else{if(e.create)return this._entries[i]=new l(i);throw new s(...n)}}async getFileHandle(i,e){const t=this._entries[i],o=t instanceof h;if(t&&o)return t;if(t&&!o)throw new s(...f);if(!t&&!e.create)throw new s(...n);if(!t&&e.create)return this._entries[i]=new h(i)}async removeEntry(i,e){const t=this._entries[i];if(!t)throw new s(...n);await t._destroy(e.recursive),delete this._entries[i]}async _destroy(i){for(let e of Object.values(this._entries)){if(!i)throw new s(...m);await e._destroy(i)}this._entries={},this._deleted=!0}}const g=new l(""),H=()=>g;export{h as FileHandle,l as FolderHandle,c as Sink,H as default};
1
+ import{c as p,e as y}from"./es6-Cj19I0qh.js";import"./index-hH8Sut1X.js";const{File:r,Blob:_,DOMException:s}=p,{INVALID:z,GONE:n,MISMATCH:f,MOD_ERR:m,SYNTAX:w,SECURITY:A,DISALLOWED:b}=y;class c{constructor(i,e){this.fileHandle=i,this.file=e,this.size=e.size,this.position=0}write(i){let e=this.file;if(typeof i=="object"){if(i.type==="write"){if(Number.isInteger(i.position)&&i.position>=0&&(this.position=i.position,this.size<i.position&&(this.file=new r([this.file,new ArrayBuffer(i.position-this.size)],this.file.name,this.file))),!("data"in i))throw new s(...w("write requires a data argument"));i=i.data}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(this.size<i.position)throw new s(...z);this.position=i.position;return}else throw new s(...w("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0){e=i.size<this.size?new r([e.slice(0,i.size)],e.name,e):new r([e,new Uint8Array(i.size-this.size)],e.name),this.size=e.size,this.position>e.size&&(this.position=e.size),this.file=e;return}else throw new s(...w("truncate requires a size argument"))}i=new _([i]);let t=this.file;const o=t.slice(0,this.position),u=t.slice(this.position+i.size);let a=this.position-o.size;a<0&&(a=0),t=new r([o,new Uint8Array(a),i,u],t.name),this.size=t.size,this.position+=i.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...n);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class h{constructor(i="",e=new r([],i),t=!0){this._file=e,this.name=i,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...n);return this._file}async createWritable(i){if(!this.writable)throw new s(...b);if(this._deleted)throw new s(...n);const e=i.keepExistingData?await this.getFile():new r([],this.name);return new c(this,e)}async isSameEntry(i){return this===i}async _destroy(){this._deleted=!0,this._file=null}}class l{constructor(i,e=!0){this.name=i,this.kind="directory",this._deleted=!1,this._entries={},this.writable=e,this.readable=!0}async*entries(){if(this._deleted)throw new s(...n);yield*Object.entries(this._entries)}async isSameEntry(i){return this===i}async getDirectoryHandle(i,e){if(this._deleted)throw new s(...n);const t=this._entries[i];if(t){if(t instanceof h)throw new s(...f);return t}else{if(e.create)return this._entries[i]=new l(i);throw new s(...n)}}async getFileHandle(i,e){const t=this._entries[i],o=t instanceof h;if(t&&o)return t;if(t&&!o)throw new s(...f);if(!t&&!e.create)throw new s(...n);if(!t&&e.create)return this._entries[i]=new h(i)}async removeEntry(i,e){const t=this._entries[i];if(!t)throw new s(...n);await t._destroy(e.recursive),delete this._entries[i]}async _destroy(i){for(let e of Object.values(this._entries)){if(!i)throw new s(...m);await e._destroy(i)}this._entries={},this._deleted=!0}}const g=new l(""),H=()=>g;export{h as FileHandle,l as FolderHandle,c as Sink,H as default};
@@ -1,4 +1,4 @@
1
- import{R as Q,r as T}from"./index-Bx_n8HNg.js";import{s as Ie}from"./index-DS7pLXMF.js";import"./FormClearHelper-EZKsnYaC.js";import"./withFullScreenWrapper-i_wAtCLZ.js";import"./Toolbar-BeKg-rY_.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-DvZOPupn.js";import"./getPrototypeOf-Dklemi9S.js";import"./createSuper-Bqo77rD3.js";import"./FileDownload.esm-Cz2LbMhY.js";const Re=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var X;(function(e){e.event="event",e.props="prop"})(X||(X={}));function G(){}function Ae(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(o,l){return o===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ee(e){return!!(e||"").match(/\d/)}function Z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function ce(e){return Z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function fe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Te(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Fe(e,t,r){var n=Te(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Be(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function ue(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),o=a[0],l=a[1]||"";return{beforeDecimal:o,afterDecimal:l,hasNegation:r,addNegation:n}}function Me(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ve(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function de(e,t){return Array(t+1).join(e)}function me(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],o=n[1];if(o=Number(o),!o)return r+a;a=a.replace(".","");var l=1+o,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=ue(e),o=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,S=parseFloat("0."+(l||"0")),y=l.length<=t?"0."+l:S.toFixed(t),p=y.split("."),d=o.split("").reverse().reduce(function(w,N,m){return w.length>m?(Number(w[0])+Number(N)).toString()+w.substring(1,w.length):N+w},p[0]),h=ve(p[1]||"",t,r),b=g?"-":"",v=n?".":"";return""+b+d+v+h}function z(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var pe=Ae(function(e,t){for(var r=0,n=0,a=e.length,o=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[o-1-n]&&o-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:o-n}}});function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ie(e){return Math.max(e.selectionStart,e.selectionEnd)}function ke(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Le(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function We(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ke(e,t,r,n,a,o,l){l===void 0&&(l=We);var g=a.findIndex(function(W){return W}),S=e.slice(0,g);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var y=r.length,p=e.length,d={},h=new Array(y),b=0;b<y;b++){h[b]=-1;for(var v=0,w=p;v<w;v++){var N=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:v});if(N&&d[v]!==!0){h[b]=v,d[v]=!0;break}}}for(var m=n;m<y&&(h[m]===-1||!o(r[m]));)m++;var F=m===y||h[m]===-1?p:h[m];for(m=n-1;m>0&&h[m]===-1;)m--;var M=m===-1||h[m]===-1?0:h[m]+1;return M>F?F:n-M<F-n?M:F}function he(e,t,r,n){var a=e.length;if(t=Pe(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ue(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ee(e[r])||ee(e[r-1]));return t}function Se(e,t,r,n,a,o){o===void 0&&(o=G);var l=Be(function(v,w){var N,m;return ce(v)?(m="",N=""):typeof v=="number"||w?(m=typeof v=="number"?me(v):v,N=n(m)):(m=a(v,void 0),N=n(m)),{formattedValue:N,numAsString:m}}),g=T.useState(function(){return l(Z(e)?t:e,r)}),S=g[0],y=g[1],p=function(v,w){v.formattedValue!==S.formattedValue&&y({formattedValue:v.formattedValue,numAsString:v.value}),o(v,w)},d=e,h=r;Z(e)&&(d=S.numAsString,h=!0);var b=l(d,h);return T.useMemo(function(){y(b)},[b.formattedValue]),[S,p]}function Ge(e){return e.replace(/[^0-9]/g,"")}function _e(e){return e}function $e(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,o=e.getInputRef,l=e.format;l===void 0&&(l=_e);var g=e.removeFormatting;g===void 0&&(g=Ge);var S=e.defaultValue,y=e.valueIsNumericString,p=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=G);var b=e.onKeyDown;b===void 0&&(b=G);var v=e.onMouseUp;v===void 0&&(v=G);var w=e.onFocus;w===void 0&&(w=G);var N=e.onBlur;N===void 0&&(N=G);var m=e.value,F=e.getCaretBoundary;F===void 0&&(F=Ue);var M=e.isValidInputCharacter;M===void 0&&(M=ee);var W=e.isCharacterSame,P=se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),_=Se(m,S,!!y,l,g,p),K=_[0],V=K.formattedValue,k=K.numAsString,$=_[1],L=T.useRef({formattedValue:V,numAsString:k}),J=function(u,i){L.current={formattedValue:u.formattedValue,numAsString:u.value},$(u,i)},U=T.useState(!1),q=U[0],H=U[1],s=T.useRef(null),c=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return H(!0),function(){clearTimeout(c.current.setCaretTimeout),clearTimeout(c.current.focusTimeout)}},[]);var A=l,D=function(u,i){var f=parseFloat(i);return{formattedValue:u,value:i,floatValue:isNaN(f)?void 0:f}},C=function(u,i,f){u.selectionStart===0&&u.selectionEnd===u.value.length||(z(u,i),c.current.setCaretTimeout=setTimeout(function(){u.value===f&&u.selectionStart!==u.selectionEnd&&z(u,i)},0))},I=function(u,i,f){return he(u,i,F(u),f)},B=function(u,i,f){var E=F(i),O=Ke(i,V,u,f,E,M,W);return O=he(i,O,E),O},te=function(u){var i=u.formattedValue;i===void 0&&(i="");var f=u.input,E=u.setCaretPosition;E===void 0&&(E=!0);var O=u.source,x=u.event,R=u.numAsString,j=u.caretPos;if(f){if(j===void 0&&E){var Y=u.inputValue||f.value,oe=ie(f);f.value=i,j=B(Y,i,oe)}f.value=i,E&&j!==void 0&&C(f,j,i)}i!==V&&J(D(i,R),{event:x,source:O})};T.useEffect(function(){var u=L.current,i=u.formattedValue,f=u.numAsString;V!==i&&(V!==k||i!==f)&&J(D(V,k),{event:void 0,source:X.props})},[V,k]);var ne=s.current?ie(s.current):void 0,re=typeof window<"u"?T.useLayoutEffect:T.useEffect;re(function(){var u=s.current;if(V!==L.current.formattedValue&&u){var i=B(L.current.formattedValue,V,ne);u.value=V,C(u,i,V)}},[V]);var Ve=function(u,i,f){var E=pe(V,u),O=Object.assign(Object.assign({},E),{lastValue:V}),x=g(u,O),R=A(x);if(x=g(R,void 0),d&&!d(D(R,x))){var j=i.target,Y=ie(j),oe=B(u,V,Y);return j.value=V,C(j,oe,V),!1}return te({formattedValue:R,numAsString:x,inputValue:u,event:i,source:f,setCaretPosition:!0,input:i.target}),!0},xe=function(u){var i=u.target,f=i.value,E=Ve(f,u,X.event);E&&h(u)},we=function(u){var i=u.target,f=u.key,E=i.selectionStart,O=i.selectionEnd,x=i.value;x===void 0&&(x="");var R;if(f==="ArrowLeft"||f==="Backspace"?R=Math.max(E-1,0):f==="ArrowRight"?R=Math.min(E+1,x.length):f==="Delete"&&(R=E),R===void 0||E!==O){b(u);return}var j=R;if(f==="ArrowLeft"||f==="ArrowRight"){var Y=f==="ArrowLeft"?"left":"right";j=I(x,R,Y),j!==R&&u.preventDefault()}else f==="Delete"&&!M(x[R])?j=I(x,R,"right"):f==="Backspace"&&!M(x[R])&&(j=I(x,R,"left"));j!==R&&C(i,j,x),u.isUnitTestRun&&C(i,j,x),b(u)},Ne=function(u){var i=u.target,f=i.selectionStart,E=i.selectionEnd,O=i.value;if(O===void 0&&(O=""),f===E){var x=I(O,f);x!==f&&C(i,x,O)}v(u)},De=function(u){u.persist&&u.persist();var i=u.target;s.current=i,c.current.focusTimeout=setTimeout(function(){var f=i.selectionStart,E=i.selectionEnd,O=i.value;O===void 0&&(O="");var x=I(O,f);x!==f&&!(f===0&&E===O.length)&&C(i,x,O),w(u)},0)},Ce=function(u){s.current=null,clearTimeout(c.current.focusTimeout),clearTimeout(c.current.setCaretTimeout),N(u)},Ee=q&&ke()?"numeric":void 0,le=Object.assign({inputMode:Ee},P,{type:t,value:V,onChange:xe,onKeyDown:we,onMouseUp:Ne,onFocus:De,onBlur:Ce});if(r==="text")return a?Q.createElement(Q.Fragment,null,a(V,P)||null):Q.createElement("span",Object.assign({},P,{ref:o}),V);if(n){var Oe=n;return Q.createElement(Oe,Object.assign({},le,{ref:o}))}return Q.createElement("input",Object.assign({},le,{ref:o}))}function be(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var o=t.suffix;o===void 0&&(o="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var S=ae(t),y=S.thousandSeparator,p=S.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,h=ue(e,l),b=h.beforeDecimal,v=h.afterDecimal,w=h.addNegation;return r!==void 0&&(v=ve(v,r,!!n)),y&&(b=Fe(b,y,g)),a&&(b=a+b),o&&(v=v+o),w&&(b="-"+b),e=b+(d&&p||"")+v,e}function ae(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}function Je(e,t){return new RegExp("(^-)|[0-9]|"+fe(e),"g")}function Qe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ze(e,t,r){var n;t===void 0&&(t=Le(e));var a=r.allowNegative,o=r.prefix;o===void 0&&(o="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,S=t.from,y=t.to,p=y.start,d=y.end,h=ae(r),b=h.allowedDecimalSeparators,v=h.decimalSeparator,w=e[d]===v;if(ee(e)&&(e===o||e===l)&&t.lastValue==="")return e;if(d-p===1&&b.indexOf(e[p])!==-1){var N=g===0?"":v;e=e.substring(0,p)+N+e.substring(p+1,e.length)}var m=function(c,A,D){var C=!1,I=!1;o.startsWith("-")?C=!1:c.startsWith("--")?(C=!1,I=!0):l.startsWith("-")&&c.length===l.length?C=!1:c[0]==="-"&&(C=!0);var B=C?1:0;return I&&(B=2),B&&(c=c.substring(B),A-=B,D-=B),{value:c,start:A,end:D,hasNegation:C}},F=m(e,p,d),M=F.hasNegation;n=F,e=n.value,p=n.start,d=n.end;var W=m(t.lastValue,S.start,S.end),P=W.start,_=W.end,K=W.value,V=e.substring(p,d);e.length&&K.length&&(P>K.length-l.length||_<o.length)&&!(V&&l.startsWith(V))&&(e=K);var k=0;e.startsWith(o)?k+=o.length:p<o.length&&(k=p),e=e.substring(k),d-=k;var $=e.length,L=e.length-l.length;e.endsWith(l)?$=L:(d>L||d>e.length-l.length)&&($=d),e=e.substring(0,$),e=ze(M?"-"+e:e,a),e=(e.match(Je(v))||[]).join("");var J=e.indexOf(v);e=e.replace(new RegExp(fe(v),"g"),function(c,A){return A===J?".":""});var U=ue(e,a),q=U.beforeDecimal,H=U.afterDecimal,s=U.addNegation;return y.end-y.start<S.end-S.start&&q===""&&w&&!parseFloat(H)&&(e=s?"-":""),e}function qe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";a.fill(!1,0,r.length+(o?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function He(e){var t=ae(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var o=e.allowNegative;if(o===void 0&&(o=!0),r===n)throw new Error(`
1
+ import{R as Q,r as T}from"./index-hH8Sut1X.js";import{s as Ie}from"./index-CQ2DGykN.js";import"./FormClearHelper-BG2GkAQw.js";import"./withFullScreenWrapper-B4K8Mx23.js";import"./Toolbar-BE-lNYTp.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-C2pdyuaM.js";import"./getPrototypeOf-BmWw5w7W.js";import"./createSuper-PQLITmDX.js";import"./FileDownload.esm-DwbGKHOa.js";const Re=Ie("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var X;(function(e){e.event="event",e.props="prop"})(X||(X={}));function G(){}function Ae(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(o,l){return o===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ee(e){return!!(e||"").match(/\d/)}function Z(e){return e==null}function je(e){return typeof e=="number"&&isNaN(e)}function ce(e){return Z(e)||je(e)||typeof e=="number"&&!isFinite(e)}function fe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Te(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Fe(e,t,r){var n=Te(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Be(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function ue(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),o=a[0],l=a[1]||"";return{beforeDecimal:o,afterDecimal:l,hasNegation:r,addNegation:n}}function Me(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ve(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function de(e,t){return Array(t+1).join(e)}function me(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],o=n[1];if(o=Number(o),!o)return r+a;a=a.replace(".","");var l=1+o,g=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=g?a=a+de("0",l-g):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=ue(e),o=a.beforeDecimal,l=a.afterDecimal,g=a.hasNegation,S=parseFloat("0."+(l||"0")),y=l.length<=t?"0."+l:S.toFixed(t),p=y.split("."),d=o.split("").reverse().reduce(function(w,N,m){return w.length>m?(Number(w[0])+Number(N)).toString()+w.substring(1,w.length):N+w},p[0]),h=ve(p[1]||"",t,r),b=g?"-":"",v=n?".":"";return""+b+d+v+h}function z(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var pe=Ae(function(e,t){for(var r=0,n=0,a=e.length,o=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[o-1-n]&&o-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:o-n}}});function Pe(e,t,r){return Math.min(Math.max(e,t),r)}function ie(e){return Math.max(e.selectionStart,e.selectionEnd)}function ke(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Le(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function We(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ke(e,t,r,n,a,o,l){l===void 0&&(l=We);var g=a.findIndex(function(W){return W}),S=e.slice(0,g);!t&&!r.startsWith(S)&&(t=S,r=S+r,n=n+S.length);for(var y=r.length,p=e.length,d={},h=new Array(y),b=0;b<y;b++){h[b]=-1;for(var v=0,w=p;v<w;v++){var N=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:b,formattedValueIndex:v});if(N&&d[v]!==!0){h[b]=v,d[v]=!0;break}}}for(var m=n;m<y&&(h[m]===-1||!o(r[m]));)m++;var F=m===y||h[m]===-1?p:h[m];for(m=n-1;m>0&&h[m]===-1;)m--;var M=m===-1||h[m]===-1?0:h[m]+1;return M>F?F:n-M<F-n?M:F}function he(e,t,r,n){var a=e.length;if(t=Pe(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ue(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ee(e[r])||ee(e[r-1]));return t}function Se(e,t,r,n,a,o){o===void 0&&(o=G);var l=Be(function(v,w){var N,m;return ce(v)?(m="",N=""):typeof v=="number"||w?(m=typeof v=="number"?me(v):v,N=n(m)):(m=a(v,void 0),N=n(m)),{formattedValue:N,numAsString:m}}),g=T.useState(function(){return l(Z(e)?t:e,r)}),S=g[0],y=g[1],p=function(v,w){v.formattedValue!==S.formattedValue&&y({formattedValue:v.formattedValue,numAsString:v.value}),o(v,w)},d=e,h=r;Z(e)&&(d=S.numAsString,h=!0);var b=l(d,h);return T.useMemo(function(){y(b)},[b.formattedValue]),[S,p]}function Ge(e){return e.replace(/[^0-9]/g,"")}function _e(e){return e}function $e(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,o=e.getInputRef,l=e.format;l===void 0&&(l=_e);var g=e.removeFormatting;g===void 0&&(g=Ge);var S=e.defaultValue,y=e.valueIsNumericString,p=e.onValueChange,d=e.isAllowed,h=e.onChange;h===void 0&&(h=G);var b=e.onKeyDown;b===void 0&&(b=G);var v=e.onMouseUp;v===void 0&&(v=G);var w=e.onFocus;w===void 0&&(w=G);var N=e.onBlur;N===void 0&&(N=G);var m=e.value,F=e.getCaretBoundary;F===void 0&&(F=Ue);var M=e.isValidInputCharacter;M===void 0&&(M=ee);var W=e.isCharacterSame,P=se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),_=Se(m,S,!!y,l,g,p),K=_[0],V=K.formattedValue,k=K.numAsString,$=_[1],L=T.useRef({formattedValue:V,numAsString:k}),J=function(u,i){L.current={formattedValue:u.formattedValue,numAsString:u.value},$(u,i)},U=T.useState(!1),q=U[0],H=U[1],s=T.useRef(null),c=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return H(!0),function(){clearTimeout(c.current.setCaretTimeout),clearTimeout(c.current.focusTimeout)}},[]);var A=l,D=function(u,i){var f=parseFloat(i);return{formattedValue:u,value:i,floatValue:isNaN(f)?void 0:f}},C=function(u,i,f){u.selectionStart===0&&u.selectionEnd===u.value.length||(z(u,i),c.current.setCaretTimeout=setTimeout(function(){u.value===f&&u.selectionStart!==u.selectionEnd&&z(u,i)},0))},I=function(u,i,f){return he(u,i,F(u),f)},B=function(u,i,f){var E=F(i),O=Ke(i,V,u,f,E,M,W);return O=he(i,O,E),O},te=function(u){var i=u.formattedValue;i===void 0&&(i="");var f=u.input,E=u.setCaretPosition;E===void 0&&(E=!0);var O=u.source,x=u.event,R=u.numAsString,j=u.caretPos;if(f){if(j===void 0&&E){var Y=u.inputValue||f.value,oe=ie(f);f.value=i,j=B(Y,i,oe)}f.value=i,E&&j!==void 0&&C(f,j,i)}i!==V&&J(D(i,R),{event:x,source:O})};T.useEffect(function(){var u=L.current,i=u.formattedValue,f=u.numAsString;V!==i&&(V!==k||i!==f)&&J(D(V,k),{event:void 0,source:X.props})},[V,k]);var ne=s.current?ie(s.current):void 0,re=typeof window<"u"?T.useLayoutEffect:T.useEffect;re(function(){var u=s.current;if(V!==L.current.formattedValue&&u){var i=B(L.current.formattedValue,V,ne);u.value=V,C(u,i,V)}},[V]);var Ve=function(u,i,f){var E=pe(V,u),O=Object.assign(Object.assign({},E),{lastValue:V}),x=g(u,O),R=A(x);if(x=g(R,void 0),d&&!d(D(R,x))){var j=i.target,Y=ie(j),oe=B(u,V,Y);return j.value=V,C(j,oe,V),!1}return te({formattedValue:R,numAsString:x,inputValue:u,event:i,source:f,setCaretPosition:!0,input:i.target}),!0},xe=function(u){var i=u.target,f=i.value,E=Ve(f,u,X.event);E&&h(u)},we=function(u){var i=u.target,f=u.key,E=i.selectionStart,O=i.selectionEnd,x=i.value;x===void 0&&(x="");var R;if(f==="ArrowLeft"||f==="Backspace"?R=Math.max(E-1,0):f==="ArrowRight"?R=Math.min(E+1,x.length):f==="Delete"&&(R=E),R===void 0||E!==O){b(u);return}var j=R;if(f==="ArrowLeft"||f==="ArrowRight"){var Y=f==="ArrowLeft"?"left":"right";j=I(x,R,Y),j!==R&&u.preventDefault()}else f==="Delete"&&!M(x[R])?j=I(x,R,"right"):f==="Backspace"&&!M(x[R])&&(j=I(x,R,"left"));j!==R&&C(i,j,x),u.isUnitTestRun&&C(i,j,x),b(u)},Ne=function(u){var i=u.target,f=i.selectionStart,E=i.selectionEnd,O=i.value;if(O===void 0&&(O=""),f===E){var x=I(O,f);x!==f&&C(i,x,O)}v(u)},De=function(u){u.persist&&u.persist();var i=u.target;s.current=i,c.current.focusTimeout=setTimeout(function(){var f=i.selectionStart,E=i.selectionEnd,O=i.value;O===void 0&&(O="");var x=I(O,f);x!==f&&!(f===0&&E===O.length)&&C(i,x,O),w(u)},0)},Ce=function(u){s.current=null,clearTimeout(c.current.focusTimeout),clearTimeout(c.current.setCaretTimeout),N(u)},Ee=q&&ke()?"numeric":void 0,le=Object.assign({inputMode:Ee},P,{type:t,value:V,onChange:xe,onKeyDown:we,onMouseUp:Ne,onFocus:De,onBlur:Ce});if(r==="text")return a?Q.createElement(Q.Fragment,null,a(V,P)||null):Q.createElement("span",Object.assign({},P,{ref:o}),V);if(n){var Oe=n;return Q.createElement(Oe,Object.assign({},le,{ref:o}))}return Q.createElement("input",Object.assign({},le,{ref:o}))}function be(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var o=t.suffix;o===void 0&&(o="");var l=t.allowNegative,g=t.thousandsGroupStyle;if(g===void 0&&(g="thousand"),e===""||e==="-")return e;var S=ae(t),y=S.thousandSeparator,p=S.decimalSeparator,d=r!==0&&e.indexOf(".")!==-1||r&&n,h=ue(e,l),b=h.beforeDecimal,v=h.afterDecimal,w=h.addNegation;return r!==void 0&&(v=ve(v,r,!!n)),y&&(b=Fe(b,y,g)),a&&(b=a+b),o&&(v=v+o),w&&(b="-"+b),e=b+(d&&p||"")+v,e}function ae(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function ze(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}function Je(e,t){return new RegExp("(^-)|[0-9]|"+fe(e),"g")}function Qe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ze(e,t,r){var n;t===void 0&&(t=Le(e));var a=r.allowNegative,o=r.prefix;o===void 0&&(o="");var l=r.suffix;l===void 0&&(l="");var g=r.decimalScale,S=t.from,y=t.to,p=y.start,d=y.end,h=ae(r),b=h.allowedDecimalSeparators,v=h.decimalSeparator,w=e[d]===v;if(ee(e)&&(e===o||e===l)&&t.lastValue==="")return e;if(d-p===1&&b.indexOf(e[p])!==-1){var N=g===0?"":v;e=e.substring(0,p)+N+e.substring(p+1,e.length)}var m=function(c,A,D){var C=!1,I=!1;o.startsWith("-")?C=!1:c.startsWith("--")?(C=!1,I=!0):l.startsWith("-")&&c.length===l.length?C=!1:c[0]==="-"&&(C=!0);var B=C?1:0;return I&&(B=2),B&&(c=c.substring(B),A-=B,D-=B),{value:c,start:A,end:D,hasNegation:C}},F=m(e,p,d),M=F.hasNegation;n=F,e=n.value,p=n.start,d=n.end;var W=m(t.lastValue,S.start,S.end),P=W.start,_=W.end,K=W.value,V=e.substring(p,d);e.length&&K.length&&(P>K.length-l.length||_<o.length)&&!(V&&l.startsWith(V))&&(e=K);var k=0;e.startsWith(o)?k+=o.length:p<o.length&&(k=p),e=e.substring(k),d-=k;var $=e.length,L=e.length-l.length;e.endsWith(l)?$=L:(d>L||d>e.length-l.length)&&($=d),e=e.substring(0,$),e=ze(M?"-"+e:e,a),e=(e.match(Je(v))||[]).join("");var J=e.indexOf(v);e=e.replace(new RegExp(fe(v),"g"),function(c,A){return A===J?".":""});var U=ue(e,a),q=U.beforeDecimal,H=U.afterDecimal,s=U.addNegation;return y.end-y.start<S.end-S.start&&q===""&&w&&!parseFloat(H)&&(e=s?"-":""),e}function qe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";a.fill(!1,0,r.length+(o?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function He(e){var t=ae(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var o=e.allowNegative;if(o===void 0&&(o=!0),r===n)throw new Error(`
2
2
  Decimal separator can't be same as thousand separator.
3
3
  thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
4
  decimalSeparator: `+n+` (default value for decimalSeparator is .)
@@ -1 +1 @@
1
- import{e as l}from"./es6-GdMCiz1N.js";import"./index-Bx_n8HNg.js";const{DISALLOWED:h}=l;class w{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class a{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...h);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=n=>t(new w(r,this.file)),r.truncate(0)):t(new w(r,this.file))},i))}}class s{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new a(i,this.writable):new s(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,n=>{i(new s(n))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,n=>i(new a(n)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,n)=>{i instanceof s?t.recursive?i.dir.removeRecursively(()=>r(),n):i.dir.remove(()=>r(),n):i.file&&i.file.remove(()=>r(),n)})}}const d=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new s(i.root)),t));export{a as FileHandle,s as FolderHandle,d as default};
1
+ import{e as l}from"./es6-Cj19I0qh.js";import"./index-hH8Sut1X.js";const{DISALLOWED:h}=l;class w{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class a{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...h);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=n=>t(new w(r,this.file)),r.truncate(0)):t(new w(r,this.file))},i))}}class s{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new a(i,this.writable):new s(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,n=>{i(new s(n))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,n=>i(new a(n)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,n)=>{i instanceof s?t.recursive?i.dir.removeRecursively(()=>r(),n):i.dir.remove(()=>r(),n):i.file&&i.file.remove(()=>r(),n)})}}const d=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new s(i.root)),t));export{a as FileHandle,s as FolderHandle,d as default};
@@ -1,2 +1,2 @@
1
- import{r as a,E as y,_ as d,az as h}from"./index-Bx_n8HNg.js";var s=a.forwardRef(function(r,e){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});s.displayName="Close";function p(r){if(Array.isArray(r))return r}function b(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,u,f,l,o=[],n=!0,c=!1;try{if(f=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;n=!1}else for(;!(n=(i=f.call(t)).done)&&(o.push(i.value),o.length!==e);n=!0);}catch(m){c=!0,u=m}finally{try{if(!n&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw u}}return o}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,E as y,_ as d,az as h}from"./index-hH8Sut1X.js";var s=a.forwardRef(function(r,e){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},r,{ref:e}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});s.displayName="Close";function p(r){if(Array.isArray(r))return r}function b(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,u,f,l,o=[],n=!0,c=!1;try{if(f=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;n=!1}else for(;!(n=(i=f.call(t)).done)&&(o.push(i.value),o.length!==e);n=!0);}catch(m){c=!0,u=m}finally{try{if(!n&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(c)throw u}}return o}}function v(){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 w(r,e){return p(r)||b(r,e)||h(r,e)||v()}export{s as C,w as _};
@@ -1,2 +1,2 @@
1
- import{b2 as b,r as d,bJ as x,b3 as $,bq as F,bK as T}from"./index-Bx_n8HNg.js";import{g as R,a as A,b as E,B as z}from"./base-input-7pZdCg4C.js";function j(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 s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(n){B(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=b("div",function(e){return s(s({},R(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});m.displayName="StyledTextAreaRoot",m.displayName="StyledTextAreaRoot";var h=b("div",function(e){return A(s({$positive:!1},e))});h.displayName="StyledTextareaContainer",h.displayName="StyledTextareaContainer";var v=b("textarea",function(e){return s(s({},E(e)),{},{resize:e.$resize||"none"})});v.displayName="StyledTextarea",v.displayName="StyledTextarea";function O(e){"@babel/helpers - typeof";return O=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},O(e)}function c(){return c=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},c.apply(this,arguments)}function _(e,t){return N(e)||I(e,t)||D(e,t)||C()}function C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{b2 as b,r as d,bJ as x,b3 as $,bq as F,bK as T}from"./index-hH8Sut1X.js";import{g as R,a as A,b as E,B as z}from"./base-input-Dd63Ml1u.js";function j(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 s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(n){B(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=b("div",function(e){return s(s({},R(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});m.displayName="StyledTextAreaRoot",m.displayName="StyledTextAreaRoot";var h=b("div",function(e){return A(s({$positive:!1},e))});h.displayName="StyledTextareaContainer",h.displayName="StyledTextareaContainer";var v=b("textarea",function(e){return s(s({},E(e)),{},{resize:e.$resize||"none"})});v.displayName="StyledTextarea",v.displayName="StyledTextarea";function O(e){"@babel/helpers - typeof";return O=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},O(e)}function c(){return c=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},c.apply(this,arguments)}function _(e,t){return N(e)||I(e,t)||D(e,t)||C()}function C(){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 D(e,t){if(e){if(typeof e=="string")return w(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 w(e,t)}}function w(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 I(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,u=!1,i,a;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(y){u=!0,a=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(u)throw a}}return n}}function N(e){if(Array.isArray(e))return e}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(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 k(e,t,r){return K(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function U(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&&g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},g(e,t)}function J(e){var t=H();return function(){var r=f(e),n;if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&(O(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H(){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 f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(e)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P=function(e){U(r,e);var t=J(r);function r(){var n;q(this,r);for(var o=arguments.length,u=new Array(o),i=0;i<o;i++)u[i]=arguments[i];return n=t.call.apply(t,[this].concat(u)),p(l(n),"state",{isFocused:n.props.autoFocus||!1}),p(l(n),"onFocus",function(a){n.setState({isFocused:!0}),n.props.onFocus(a)}),p(l(n),"onBlur",function(a){n.setState({isFocused:!1}),n.props.onBlur(a)}),n}return k(r,[{key:"render",value:function(){var n=this.props.overrides,o=n===void 0?{}:n,u=$(o.Root,m),i=_(u,2),a=i[0],y=i[1],S=F({Input:{component:v},InputContainer:{component:h}},o);return d.createElement(a,c({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},y),d.createElement(z,c({},this.props,{type:T.textarea,overrides:S,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);p(P,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:x.default});export{P as T};