@stlite/desktop 0.80.0 → 0.80.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{FileDownload.esm-CGGZqf24.js → FileDownload.esm-Cz2LbMhY.js} +1 -1
- package/build/assets/{FormClearHelper-CgY1PHFo.js → FormClearHelper-EZKsnYaC.js} +1 -1
- package/build/assets/{Hooks-DSz3TreG.js → Hooks-DqtQqOH-.js} +1 -1
- package/build/assets/{InputInstructions-Da_XbwOd.js → InputInstructions-DjR1o_IC.js} +1 -1
- package/build/assets/{ProgressBar-Dtx4om_-.js → ProgressBar-BaA1RCol.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-CGcG4XZP.js → RenderInPortalIfExists-BahSgp7T.js} +1 -1
- package/build/assets/{Toolbar-FcJw8P3i.js → Toolbar-BeKg-rY_.js} +1 -1
- package/build/assets/{base-input-CmONXDO4.js → base-input-7pZdCg4C.js} +1 -1
- package/build/assets/createSuper-Bqo77rD3.js +1 -0
- package/build/assets/{data-grid-overlay-editor-QBvhT7Gv.js → data-grid-overlay-editor-6ASg9CnD.js} +1 -1
- package/build/assets/{downloader-CMM-05VD.js → downloader-D4L4FTII.js} +1 -1
- package/build/assets/{es6-DhhL9D4J.js → es6-GdMCiz1N.js} +2 -2
- package/build/assets/getPrototypeOf-Dklemi9S.js +1 -0
- package/build/assets/{iframeResizer.contentWindow-YHmj42JB.js → iframeResizer.contentWindow-CRAvgT5G.js} +1 -1
- package/build/assets/{index-DdyJvCFp.js → index-5yVA-bl8.js} +1 -1
- package/build/assets/{index-D26NtueC.js → index-8ikjqTDj.js} +1 -1
- package/build/assets/{index-D4RoBA_O.js → index-B-uPh0v-.js} +1 -1
- package/build/assets/{index-hYugbL4y.js → index-B6GOeWBY.js} +1 -1
- package/build/assets/{index-Bdf8V5aG.js → index-BOejvDqO.js} +1 -1
- package/build/assets/{index-CclTmpN7.js → index-BSA4PqEL.js} +1 -1
- package/build/assets/{index-BjWJFoG-.js → index-BcbEpO1A.js} +1 -1
- package/build/assets/{index-CVlJl5rr.js → index-BdwwnBBF.js} +1 -1
- package/build/assets/{index-DYYkHfIj.js → index-BldW1rGN.js} +1 -1
- package/build/assets/{index-tPM7YhKy.js → index-BrwVL_Zl.js} +1 -1
- package/build/assets/{index-B_Id9-1s.js → index-BuJCpP7X.js} +1 -1
- package/build/assets/{index-BwjoUCNo.js → index-Bx_n8HNg.js} +34 -34
- package/build/assets/{index-Cx5RDj1j.js → index-BxmhUlpg.js} +1 -1
- package/build/assets/{index-zxdZLnOx.js → index-CEDVfch7.js} +1 -1
- package/build/assets/{index-DDdbfcty.js → index-CK59iqlY.js} +1 -1
- package/build/assets/{index-CU_ErDon.js → index-CLUlOndI.js} +1 -1
- package/build/assets/{index-xwpN0M9S.js → index-CbCdgvRj.js} +1 -1
- package/build/assets/{index-DJR_P__y.js → index-CnK5OFBo.js} +1 -1
- package/build/assets/{index-CVDdljau.js → index-Cr6ZktV0.js} +1 -1
- package/build/assets/{index-Z97zCVlB.js → index-CuBoBzf5.js} +1 -1
- package/build/assets/{index-DWYLSf3l.js → index-DAhsgsYC.js} +1 -1
- package/build/assets/{index-BVUe3D3r.js → index-DS7pLXMF.js} +5 -5
- package/build/assets/{index-B4n5HlkF.js → index-D_5yFUtX.js} +1 -1
- package/build/assets/{index-vzzDJjGk.js → index-D_MPEPA-.js} +1 -1
- package/build/assets/{index-B525bGzJ.js → index-DdYwgLCs.js} +1 -1
- package/build/assets/{index-C2H2QMCy.js → index-DdoeZmBn.js} +1 -1
- package/build/assets/{index-RsmuLiMj.js → index-Djk6g3D7.js} +1 -1
- package/build/assets/{index-8APIqgoz.js → index-DlZHr_LT.js} +1 -1
- package/build/assets/{index-CF-qa2K-.js → index-DrSKeLtv.js} +1 -1
- package/build/assets/{index-B-eWDw1Y.js → index-LrDlyKHF.js} +1 -1
- package/build/assets/{index-owAG4lAc.js → index-TDAWCZaF.js} +1 -1
- package/build/assets/{index-Ez6wOCxn.js → index-dy4Fq-_I.js} +1 -1
- package/build/assets/{index-C4T9lB1B.js → index-gQih6j7P.js} +1 -1
- package/build/assets/{index-DVwGEZVS.js → index-lK_Z41d7.js} +1 -1
- package/build/assets/{index-B234xKIE.js → index-ririmK9i.js} +1 -1
- package/build/assets/{index-BZSCrRo-.js → index-se3PiCWO.js} +1 -1
- package/build/assets/{index-D_v8mdkx.js → index-yNPtrbxs.js} +1 -1
- package/build/assets/{input-uWrlyNdh.js → input-D70-L3j9.js} +1 -1
- package/build/assets/{memory-C3YA36Ob.js → memory-CcbiQyNI.js} +1 -1
- package/build/assets/{number-overlay-editor-cdMzdt98.js → number-overlay-editor-DwRDmB7O.js} +1 -1
- package/build/assets/{sandbox-nkebs-Xk.js → sandbox-DNuj5tuK.js} +1 -1
- package/build/assets/{slicedToArray-bge8IXL1.js → slicedToArray-DvZOPupn.js} +1 -1
- package/build/assets/{textarea-BRC6-IPU.js → textarea-CwCvq-TS.js} +1 -1
- package/build/assets/{timepicker-clKKYW7X.js → timepicker-D2Q8PdLE.js} +2 -2
- package/build/assets/{uniqueId-CyfnMhlx.js → uniqueId-CZt8iarg.js} +1 -1
- package/build/assets/{useBasicWidgetState-DYDJWF1h.js → useBasicWidgetState-T4r0nY5O.js} +1 -1
- package/build/assets/{useOnInputChange-Bri4Ggii.js → useOnInputChange-Cs15AJnE.js} +1 -1
- package/build/assets/{withFullScreenWrapper-CkF8UtaI.js → withFullScreenWrapper-i_wAtCLZ.js} +1 -1
- package/build/assets/{worker-DYZLk67q.js → worker-DWdDGetD.js} +6 -6
- package/build/electron/worker.js +6 -6
- package/build/index.html +1 -1
- package/package.json +4 -5
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
- package/build/assets/createSuper-DFd_7HWg.js +0 -1
- package/build/assets/getPrototypeOf-BuqC2LfE.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,u as v,j as T}from"./index-
|
|
1
|
+
import{r as s,u as v,j as T}from"./index-Bx_n8HNg.js";function y({element:t,width:c,endpoints:m,elementMgr:d}){const n=s.useRef(null),{startTime:u,endTime:a,loop:i,autoplay:l}=t,f=s.useMemo(()=>{if(!t.id)return!0;const e=d.getElementState(t.id,"preventAutoplay");return e||d.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,d]);s.useEffect(()=>{n.current&&(n.current.currentTime=u)},[u]),s.useEffect(()=>{const e=n.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),s.useEffect(()=>{const e=n.current;if(!e)return;let r=!1;const o=()=>{a>0&&e.currentTime>=a&&(i?(e.currentTime=u||0,e.play()):r||(r=!0,e.pause()))};return a>0&&e.addEventListener("timeupdate",o),()=>{e&&a>0&&e.removeEventListener("timeupdate",o)}},[a,i,u]),s.useEffect(()=>{const e=n.current;if(!e)return;const r=()=>{i&&(e.currentTime=u||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[i,u]);const p=v(t.url),E=m.buildMediaURL(p);return T.jsx("audio",{className:"stAudio","data-testid":"stAudio",ref:n,controls:!0,autoPlay:l&&!f,src:E,style:{width:c}})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as y,E,_ as R,c as C,Q as G,j as u,b1 as X,aK as k,aX as q,aG as Q,aY as O,b9 as z,e as J,g as K,a7 as Y,M as Z,ba as ee,bb as te,R as re,O as ie,$ as se,B as P,as as _,aU as ne,aT as ae,a_ as oe,a$ as le,bc as de,b0 as ce}from"./index-BwjoUCNo.js";import{F as he}from"./FormClearHelper-CgY1PHFo.js";import{U as V}from"./UploadFileInfo-C-jY39rj.js";import{P as ue,S as pe}from"./ProgressBar-Dtx4om_-.js";var L=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});L.displayName="Video";var D=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var $=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},i,{ref:l}),y.createElement("rect",{width:24,height:24,fill:"none"}),y.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});$.displayName="SwitchCamera";function ge(i,l){switch(i){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const W=C("div",{target:"etz5kuj9"})({name:"b6gpc",styles:"position:relative;overflow:hidden;width:100%;object-fit:contain"}),T=C("div",{target:"etz5kuj8"})(({theme:i,width:l})=>({backgroundColor:i.colors.secondaryBg,borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),""),fe=C("p",{target:"etz5kuj7"})(({theme:i})=>({marginTop:i.spacing.sm,textAlign:"center"}),""),me=C("img",{target:"etz5kuj6"})(({theme:i,opacity:l})=>({borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,objectFit:"contain",opacity:l}),""),ve=C("a",{target:"etz5kuj5"})(({theme:i})=>({color:i.colors.primary,display:"block",textDecoration:"none"}),""),Se=C("span",{target:"etz5kuj4"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),ye=C("div",{target:"etz5kuj3"})(({theme:i})=>({position:"absolute",top:i.spacing.lg,right:i.spacing.lg,zIndex:i.zIndices.priority,color:i.colors.fadedText40,mixBlendMode:"difference",opacity:.6}),""),we=C("div",{target:"etz5kuj1"})({name:"1yoks5w",styles:"height:fit-content;width:100%;position:absolute;bottom:0"}),be=C("button",{target:"etz5kuj0"})(({theme:i})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:i.colors.lightenedBg05,border:`${i.sizes.borderWidth} solid ${i.colors.borderColor}`,borderRadius:`0 0 ${i.radii.default} ${i.radii.default}`,"&:hover":{borderColor:i.colors.primary,color:i.colors.primary},"&:active":{color:i.colors.white,borderColor:i.colors.primary,backgroundColor:i.colors.primary},"&:focus:not(:active)":{borderColor:i.colors.primary,color:i.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText40},fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,margin:i.spacing.none,lineHeight:i.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${G(i.colors.primary,.5)}`},...ge("medium",i)}),"");function H({disabled:i,onClick:l,children:t,progress:s}){return u.jsxs(be,{disabled:i||!1,onClick:l||(()=>{}),progress:s||null,"data-testid":"stCameraInputButton",children:[t,s&&u.jsx(we,{children:u.jsx(ue,{value:s,size:pe.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})})]})}var F=(i=>(i.USER="user",i.ENVIRONMENT="environment",i))(F||{});const Me=({switchFacingMode:i})=>u.jsx(ye,{"data-testid":"stCameraInputSwitchButton",children:u.jsx(X,{content:"Switch camera",placement:k.TOP_RIGHT,children:u.jsx(q,{kind:Q.MINIMAL,onClick:i,children:u.jsx(O,{content:$,size:"twoXL",color:z.white})})})});var A={exports:{}};(function(i,l){(function(t,s){i.exports=s(y)})(J,function(t){return function(s){var n={};function a(o){if(n[o])return n[o].exports;var p=n[o]={i:o,l:!1,exports:{}};return s[o].call(p.exports,p,p.exports,a),p.l=!0,p.exports}return a.m=s,a.c=n,a.d=function(o,p,S){a.o(o,p)||Object.defineProperty(o,p,{enumerable:!0,get:S})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,p){if(p&1&&(o=a(o)),p&8||p&4&&typeof o=="object"&&o&&o.__esModule)return o;var S=Object.create(null);if(a.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:o}),p&2&&typeof o!="string")for(var x in o)a.d(S,x,(function(U){return o[U]}).bind(null,x));return S},a.n=function(o){var p=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(p,"a",p),p},a.o=function(o,p){return Object.prototype.hasOwnProperty.call(o,p)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(s,n,a){a.r(n);var o=a("react"),p=function(){var g=function(h,e){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,d){r.__proto__=d}||function(r,d){for(var c in d)d.hasOwnProperty(c)&&(r[c]=d[c])},g(h,e)};return function(h,e){g(h,e);function r(){this.constructor=h}h.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),S=function(){return S=Object.assign||function(g){for(var h,e=1,r=arguments.length;e<r;e++){h=arguments[e];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(g[d]=h[d])}return g},S.apply(this,arguments)},x=function(g,h){var e={};for(var r in g)Object.prototype.hasOwnProperty.call(g,r)&&h.indexOf(r)<0&&(e[r]=g[r]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(g);d<r.length;d++)h.indexOf(r[d])<0&&Object.prototype.propertyIsEnumerable.call(g,r[d])&&(e[r[d]]=g[r[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(g){var h=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return h?new Promise(function(e,r){h.call(navigator,g,e,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function U(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var j=function(g){p(h,g);function h(e){var r=g.call(this,e)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return h.prototype.componentDidMount=function(){var e=this,r=e.state,d=e.props;if(this.unmounted=!1,!U()){d.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},h.prototype.componentDidUpdate=function(e){var r=this.props;if(!U()){r.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(r.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(r.videoConstraints),w=e.minScreenshotWidth!==r.minScreenshotWidth,v=e.minScreenshotHeight!==r.minScreenshotHeight;(c||w||v)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},h.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},h.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(r){e.removeTrack(r),r.stop()}),e.getAudioTracks().map(function(r){e.removeTrack(r),r.stop()})):e.stop())},h.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(h.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},h.prototype.getScreenshot=function(e){var r=this,d=r.state,c=r.props;if(!d.hasUserMedia)return null;var w=this.getCanvas(e);return w&&w.toDataURL(c.screenshotFormat,c.screenshotQuality)},h.prototype.getCanvas=function(e){var r=this,d=r.state,c=r.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var w=this.video.videoWidth,v=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var f=w/v;w=c.minScreenshotWidth||this.video.clientWidth,v=w/f,c.minScreenshotHeight&&v<c.minScreenshotHeight&&(v=c.minScreenshotHeight,w=v*f)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||w,this.canvas.height=(e==null?void 0:e.height)||v,this.ctx=this.canvas.getContext("2d")}var M=this,b=M.ctx,m=M.canvas;return b&&m&&(m.width=(e==null?void 0:e.width)||m.width,m.height=(e==null?void 0:e.height)||m.height,c.mirrored&&(b.translate(m.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||m.width,(e==null?void 0:e.height)||m.height),c.mirrored&&(b.scale(-1,1),b.translate(-m.width,0))),m},h.prototype.requestUserMedia=function(){var e=this,r=this.props,d=function(v,f){var M={video:typeof f<"u"?f:!0};r.audio&&(M.audio=typeof v<"u"?v:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(M).then(function(m){e.unmounted||b!==e.requestUserMediaId?h.stopMediaStream(m):e.handleUserMedia(null,m)}).catch(function(m){e.handleUserMedia(m)})};if("mediaDevices"in navigator)d(r.audioConstraints,r.videoConstraints);else{var c=function(v){return{optional:[{sourceId:v}]}},w=function(v){var f=v.deviceId;return typeof f=="string"?f:Array.isArray(f)&&f.length>0?f[0]:typeof f=="object"&&f.ideal?f.ideal:null};MediaStreamTrack.getSources(function(v){var f=null,M=null;v.forEach(function(I){I.kind==="audio"?f=I.id:I.kind==="video"&&(M=I.id)});var b=w(r.audioConstraints);b&&(f=b);var m=w(r.videoConstraints);m&&(M=m),d(c(f),c(M))})}},h.prototype.handleUserMedia=function(e,r){var d=this.props;if(e||!r){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}d.onUserMedia(r)},h.prototype.render=function(){var e=this,r=this,d=r.state,c=r.props,w=c.audio;c.forceScreenshotSourceSize,c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,f=c.style,M=f===void 0?{}:f,b=c.children,m=x(c,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),I=v?S(S({},M),{transform:(M.transform||"")+" scaleX(-1)"}):M,N={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",S({autoPlay:!0,src:d.src,muted:!w,playsInline:!0,ref:function(B){e.video=B},style:I},m)),b&&b(N))},h.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},h}(o.Component);n.default=j},react:function(s,n){s.exports=t}}).default})})(A);var Ue=A.exports;const xe=K(Ue),Ce=({width:i})=>u.jsxs(T,{width:i,children:[u.jsx(O,{size:"threeXL",color:z.gray60,content:L}),u.jsxs(fe,{children:["This app would like to use your camera.",u.jsx(ve,{href:te,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),je=({handleCapture:i,width:l,disabled:t,clearPhotoInProgress:s,setClearPhotoInProgress:n,facingMode:a,setFacingMode:o,testOverride:p})=>{const[S,x]=y.useState(p||"pending"),U=y.useRef(null),[j,g]=y.useState(l),h=y.useCallback(Y(1e3,g),[]);y.useEffect(()=>{h(l)},[l,h]);function e(){if(U.current!==null){const d=U.current.getScreenshot();i(d)}}const r=Z();return u.jsxs(W,{"data-testid":"stCameraInputWebcamComponent",children:[S!=="success"&&!t&&!s?u.jsx(Ce,{width:j}):ee&&u.jsx(Me,{switchFacingMode:o}),u.jsx(T,{"data-testid":"stCameraInputWebcamStyledBox",hidden:S!=="success"&&!t&&!s,width:j,children:!t&&u.jsx(xe,{audio:!1,ref:U,screenshotFormat:"image/jpeg",screenshotQuality:1,width:j,height:j*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{x("error")},onUserMedia:()=>{x("success"),n(!1)},videoConstraints:{width:{ideal:j},facingMode:a}})}),u.jsx(H,{onClick:e,disabled:S!=="success"||t||s,children:"Take Photo"})]})},Ie=150;class Pe extends re.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new he,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=t=>{this.setState({clearPhotoInProgress:t})},this.setFacingMode=()=>{this.setState(t=>({facingMode:t.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=t=>{if(t===null)return Promise.resolve();this.setState({imgSrc:t,shutter:!0,minShutterEffectPassed:!1});const s=n=>new Promise(a=>setTimeout(a,n));return Fe(t,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(n=>this.props.uploadClient.fetchFileURLs([n]).then(a=>({file:n,fileUrls:a[0]}))).then(({file:n,fileUrls:a})=>this.uploadFile(a,n)).then(()=>s(Ie)).then(()=>{this.setState((n,a)=>({imgSrc:t,shutter:n.shutter,minShutterEffectPassed:!0}))}).catch(n=>{ie(n)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(t=>this.deleteFile(t.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:n,fragmentId:a}=this.props,o=n.getFileUploaderStateValue(s);se(t,o)||n.setFileUploaderStateValue(s,t,{fromUi:!0},a)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(P(t))return;this.setState({imgSrc:null});const{widgetMgr:s,element:n,fragmentId:a}=this.props;s.setFileUploaderStateValue(n,t,{fromUi:!0},a)})},this.deleteFile=t=>{const s=this.getFile(t);P(s)||(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(s=>({files:[...s.files,t]}))},this.removeFile=t=>{this.setState(s=>({files:s.files.filter(n=>n.id!==t)}))},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{this.setState(n=>({files:n.files.map(a=>a.id===t?s:a)}))},this.onUploadComplete=(t,s)=>{this.setState(()=>({shutter:!1}));const n=this.getFile(t);P(n)||n.status.type!=="uploading"||this.updateFile(n.id,n.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.onUploadProgress=(t,s)=>{const n=this.getFile(s);if(P(n)||n.status.type!=="uploading")return;const a=Math.round(t.loaded*100/t.total);n.status.progress!==a&&this.updateFile(s,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:a}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(t,s)=>{const n=_.CancelToken.source(),a=new V(s.name,s.size,this.nextLocalFileId(),{type:"uploading",cancelToken:n,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,o=>this.onUploadProgress(o,a.id),n.token).then(()=>this.onUploadComplete(a.id,t)).catch(o=>{_.isCancel(o)||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:o?o.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:t,element:s}=this.props,n=t.getFileUploaderStateValue(s);if(P(n))return l;const{uploadedFileInfo:a}=n;return P(a)||a.length===0?l:{files:a.map(o=>{const p=o.name,S=o.size,x=o.fileId,U=o.fileUrls;return new V(p,S,this.nextLocalFileId(),{type:"uploaded",fileId:x,fileUrls:U})}),imgSrc:a.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=t=>t.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:n}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,l,{fromUi:!1},n)}createWidgetValue(){const l=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:n,status:a}=t;return new ne({fileId:a.fileId,fileUrls:a.fileUrls,name:s,size:n})});return new ae({uploadedFileInfo:l})}render(){var a;const{element:l,widgetMgr:t,disabled:s,width:n}=this.props;return this.formClearHelper.manageFormClearListener(t,l.formId,this.onFormCleared),u.jsxs(W,{className:"stCameraInput","data-testid":"stCameraInput",children:[u.jsx(oe,{label:l.label,disabled:s,labelVisibility:le((a=l.labelVisibility)==null?void 0:a.value),children:l.help&&u.jsx(de,{children:u.jsx(ce,{content:l.help,placement:k.TOP_RIGHT})})}),this.state.imgSrc?u.jsxs(u.Fragment,{children:[u.jsx(T,{width:n,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&u.jsx(me,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:n,height:n*9/16})}),u.jsx(H,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||s,children:this.getProgress()?"Uploading...":u.jsxs(Se,{children:[u.jsx(O,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):u.jsx(je,{handleCapture:this.handleCapture,width:n,disabled:s,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Fe(i,l){return fetch(i).then(t=>t.arrayBuffer()).then(t=>new File([t],l,{type:"image/jpeg"}))}export{Pe as default};
|
|
1
|
+
import{r as y,E,_ as R,c as C,Q as G,j as u,b1 as X,aK as k,aX as q,aG as Q,aY as O,b9 as z,e as J,g as K,a7 as Y,M as Z,ba as ee,bb as te,R as re,O as ie,$ as se,B as P,as as _,aU as ne,aT as ae,a_ as oe,a$ as le,bc as de,b0 as ce}from"./index-Bx_n8HNg.js";import{F as he}from"./FormClearHelper-EZKsnYaC.js";import{U as V}from"./UploadFileInfo-C-jY39rj.js";import{P as ue,S as pe}from"./ProgressBar-BaA1RCol.js";var L=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});L.displayName="Video";var D=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},i,{ref:l}),y.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var $=y.forwardRef(function(i,l){var t={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(E,R({iconAttrs:t,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},i,{ref:l}),y.createElement("rect",{width:24,height:24,fill:"none"}),y.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});$.displayName="SwitchCamera";function ge(i,l){switch(i){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const W=C("div",{target:"etz5kuj9"})({name:"b6gpc",styles:"position:relative;overflow:hidden;width:100%;object-fit:contain"}),T=C("div",{target:"etz5kuj8"})(({theme:i,width:l})=>({backgroundColor:i.colors.secondaryBg,borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),""),fe=C("p",{target:"etz5kuj7"})(({theme:i})=>({marginTop:i.spacing.sm,textAlign:"center"}),""),me=C("img",{target:"etz5kuj6"})(({theme:i,opacity:l})=>({borderRadius:`${i.radii.default} ${i.radii.default} 0 0`,objectFit:"contain",opacity:l}),""),ve=C("a",{target:"etz5kuj5"})(({theme:i})=>({color:i.colors.primary,display:"block",textDecoration:"none"}),""),Se=C("span",{target:"etz5kuj4"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),ye=C("div",{target:"etz5kuj3"})(({theme:i})=>({position:"absolute",top:i.spacing.lg,right:i.spacing.lg,zIndex:i.zIndices.priority,color:i.colors.fadedText40,mixBlendMode:"difference",opacity:.6}),""),we=C("div",{target:"etz5kuj1"})({name:"1yoks5w",styles:"height:fit-content;width:100%;position:absolute;bottom:0"}),be=C("button",{target:"etz5kuj0"})(({theme:i})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:i.colors.lightenedBg05,border:`${i.sizes.borderWidth} solid ${i.colors.borderColor}`,borderRadius:`0 0 ${i.radii.default} ${i.radii.default}`,"&:hover":{borderColor:i.colors.primary,color:i.colors.primary},"&:active":{color:i.colors.white,borderColor:i.colors.primary,backgroundColor:i.colors.primary},"&:focus:not(:active)":{borderColor:i.colors.primary,color:i.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:i.colors.fadedText40},fontWeight:i.fontWeights.normal,padding:`${i.spacing.xs} ${i.spacing.md}`,margin:i.spacing.none,lineHeight:i.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${G(i.colors.primary,.5)}`},...ge("medium",i)}),"");function H({disabled:i,onClick:l,children:t,progress:s}){return u.jsxs(be,{disabled:i||!1,onClick:l||(()=>{}),progress:s||null,"data-testid":"stCameraInputButton",children:[t,s&&u.jsx(we,{children:u.jsx(ue,{value:s,size:pe.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})})]})}var F=(i=>(i.USER="user",i.ENVIRONMENT="environment",i))(F||{});const Me=({switchFacingMode:i})=>u.jsx(ye,{"data-testid":"stCameraInputSwitchButton",children:u.jsx(X,{content:"Switch camera",placement:k.TOP_RIGHT,children:u.jsx(q,{kind:Q.MINIMAL,onClick:i,children:u.jsx(O,{content:$,size:"twoXL",color:z.white})})})});var A={exports:{}};(function(i,l){(function(t,s){i.exports=s(y)})(J,function(t){return function(s){var n={};function a(o){if(n[o])return n[o].exports;var p=n[o]={i:o,l:!1,exports:{}};return s[o].call(p.exports,p,p.exports,a),p.l=!0,p.exports}return a.m=s,a.c=n,a.d=function(o,p,S){a.o(o,p)||Object.defineProperty(o,p,{enumerable:!0,get:S})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,p){if(p&1&&(o=a(o)),p&8||p&4&&typeof o=="object"&&o&&o.__esModule)return o;var S=Object.create(null);if(a.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:o}),p&2&&typeof o!="string")for(var x in o)a.d(S,x,(function(U){return o[U]}).bind(null,x));return S},a.n=function(o){var p=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(p,"a",p),p},a.o=function(o,p){return Object.prototype.hasOwnProperty.call(o,p)},a.p="",a(a.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(s,n,a){a.r(n);var o=a("react"),p=function(){var g=function(h,e){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,d){r.__proto__=d}||function(r,d){for(var c in d)d.hasOwnProperty(c)&&(r[c]=d[c])},g(h,e)};return function(h,e){g(h,e);function r(){this.constructor=h}h.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),S=function(){return S=Object.assign||function(g){for(var h,e=1,r=arguments.length;e<r;e++){h=arguments[e];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(g[d]=h[d])}return g},S.apply(this,arguments)},x=function(g,h){var e={};for(var r in g)Object.prototype.hasOwnProperty.call(g,r)&&h.indexOf(r)<0&&(e[r]=g[r]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,r=Object.getOwnPropertySymbols(g);d<r.length;d++)h.indexOf(r[d])<0&&Object.prototype.propertyIsEnumerable.call(g,r[d])&&(e[r[d]]=g[r[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(g){var h=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return h?new Promise(function(e,r){h.call(navigator,g,e,r)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function U(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var j=function(g){p(h,g);function h(e){var r=g.call(this,e)||this;return r.canvas=null,r.ctx=null,r.requestUserMediaId=0,r.unmounted=!1,r.state={hasUserMedia:!1},r}return h.prototype.componentDidMount=function(){var e=this,r=e.state,d=e.props;if(this.unmounted=!1,!U()){d.onUserMediaError("getUserMedia not supported");return}r.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},h.prototype.componentDidUpdate=function(e){var r=this.props;if(!U()){r.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(r.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(r.videoConstraints),w=e.minScreenshotWidth!==r.minScreenshotWidth,v=e.minScreenshotHeight!==r.minScreenshotHeight;(c||w||v)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},h.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},h.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(r){e.removeTrack(r),r.stop()}),e.getAudioTracks().map(function(r){e.removeTrack(r),r.stop()})):e.stop())},h.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(h.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},h.prototype.getScreenshot=function(e){var r=this,d=r.state,c=r.props;if(!d.hasUserMedia)return null;var w=this.getCanvas(e);return w&&w.toDataURL(c.screenshotFormat,c.screenshotQuality)},h.prototype.getCanvas=function(e){var r=this,d=r.state,c=r.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var w=this.video.videoWidth,v=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var f=w/v;w=c.minScreenshotWidth||this.video.clientWidth,v=w/f,c.minScreenshotHeight&&v<c.minScreenshotHeight&&(v=c.minScreenshotHeight,w=v*f)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||w,this.canvas.height=(e==null?void 0:e.height)||v,this.ctx=this.canvas.getContext("2d")}var M=this,b=M.ctx,m=M.canvas;return b&&m&&(m.width=(e==null?void 0:e.width)||m.width,m.height=(e==null?void 0:e.height)||m.height,c.mirrored&&(b.translate(m.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||m.width,(e==null?void 0:e.height)||m.height),c.mirrored&&(b.scale(-1,1),b.translate(-m.width,0))),m},h.prototype.requestUserMedia=function(){var e=this,r=this.props,d=function(v,f){var M={video:typeof f<"u"?f:!0};r.audio&&(M.audio=typeof v<"u"?v:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(M).then(function(m){e.unmounted||b!==e.requestUserMediaId?h.stopMediaStream(m):e.handleUserMedia(null,m)}).catch(function(m){e.handleUserMedia(m)})};if("mediaDevices"in navigator)d(r.audioConstraints,r.videoConstraints);else{var c=function(v){return{optional:[{sourceId:v}]}},w=function(v){var f=v.deviceId;return typeof f=="string"?f:Array.isArray(f)&&f.length>0?f[0]:typeof f=="object"&&f.ideal?f.ideal:null};MediaStreamTrack.getSources(function(v){var f=null,M=null;v.forEach(function(I){I.kind==="audio"?f=I.id:I.kind==="video"&&(M=I.id)});var b=w(r.audioConstraints);b&&(f=b);var m=w(r.videoConstraints);m&&(M=m),d(c(f),c(M))})}},h.prototype.handleUserMedia=function(e,r){var d=this.props;if(e||!r){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=r;try{this.video&&(this.video.srcObject=r),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(r)})}d.onUserMedia(r)},h.prototype.render=function(){var e=this,r=this,d=r.state,c=r.props,w=c.audio;c.forceScreenshotSourceSize,c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,f=c.style,M=f===void 0?{}:f,b=c.children,m=x(c,["audio","forceScreenshotSourceSize","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),I=v?S(S({},M),{transform:(M.transform||"")+" scaleX(-1)"}):M,N={getScreenshot:this.getScreenshot.bind(this)};return o.createElement(o.Fragment,null,o.createElement("video",S({autoPlay:!0,src:d.src,muted:!w,playsInline:!0,ref:function(B){e.video=B},style:I},m)),b&&b(N))},h.defaultProps={audio:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},h}(o.Component);n.default=j},react:function(s,n){s.exports=t}}).default})})(A);var Ue=A.exports;const xe=K(Ue),Ce=({width:i})=>u.jsxs(T,{width:i,children:[u.jsx(O,{size:"threeXL",color:z.gray60,content:L}),u.jsxs(fe,{children:["This app would like to use your camera.",u.jsx(ve,{href:te,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),je=({handleCapture:i,width:l,disabled:t,clearPhotoInProgress:s,setClearPhotoInProgress:n,facingMode:a,setFacingMode:o,testOverride:p})=>{const[S,x]=y.useState(p||"pending"),U=y.useRef(null),[j,g]=y.useState(l),h=y.useCallback(Y(1e3,g),[]);y.useEffect(()=>{h(l)},[l,h]);function e(){if(U.current!==null){const d=U.current.getScreenshot();i(d)}}const r=Z();return u.jsxs(W,{"data-testid":"stCameraInputWebcamComponent",children:[S!=="success"&&!t&&!s?u.jsx(Ce,{width:j}):ee&&u.jsx(Me,{switchFacingMode:o}),u.jsx(T,{"data-testid":"stCameraInputWebcamStyledBox",hidden:S!=="success"&&!t&&!s,width:j,children:!t&&u.jsx(xe,{audio:!1,ref:U,screenshotFormat:"image/jpeg",screenshotQuality:1,width:j,height:j*9/16,style:{borderRadius:`${r.radii.default} ${r.radii.default} 0 0`},onUserMediaError:()=>{x("error")},onUserMedia:()=>{x("success"),n(!1)},videoConstraints:{width:{ideal:j},facingMode:a}})}),u.jsx(H,{onClick:e,disabled:S!=="success"||t||s,children:"Take Photo"})]})},Ie=150;class Pe extends re.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new he,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=t=>{this.setState({clearPhotoInProgress:t})},this.setFacingMode=()=>{this.setState(t=>({facingMode:t.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=t=>{if(t===null)return Promise.resolve();this.setState({imgSrc:t,shutter:!0,minShutterEffectPassed:!1});const s=n=>new Promise(a=>setTimeout(a,n));return Fe(t,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(n=>this.props.uploadClient.fetchFileURLs([n]).then(a=>({file:n,fileUrls:a[0]}))).then(({file:n,fileUrls:a})=>this.uploadFile(a,n)).then(()=>s(Ie)).then(()=>{this.setState((n,a)=>({imgSrc:t,shutter:n.shutter,minShutterEffectPassed:!0}))}).catch(n=>{ie(n)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(t=>this.deleteFile(t.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const t=this.createWidgetValue(),{element:s,widgetMgr:n,fragmentId:a}=this.props,o=n.getFileUploaderStateValue(s);se(t,o)||n.setFileUploaderStateValue(s,t,{fromUi:!0},a)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const t=this.createWidgetValue();if(P(t))return;this.setState({imgSrc:null});const{widgetMgr:s,element:n,fragmentId:a}=this.props;s.setFileUploaderStateValue(n,t,{fromUi:!0},a)})},this.deleteFile=t=>{const s=this.getFile(t);P(s)||(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(s.status.fileUrls.deleteUrl),this.removeFile(t))},this.addFile=t=>{this.setState(s=>({files:[...s.files,t]}))},this.removeFile=t=>{this.setState(s=>({files:s.files.filter(n=>n.id!==t)}))},this.getFile=t=>this.state.files.find(s=>s.id===t),this.updateFile=(t,s)=>{this.setState(n=>({files:n.files.map(a=>a.id===t?s:a)}))},this.onUploadComplete=(t,s)=>{this.setState(()=>({shutter:!1}));const n=this.getFile(t);P(n)||n.status.type!=="uploading"||this.updateFile(n.id,n.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}))},this.onUploadProgress=(t,s)=>{const n=this.getFile(s);if(P(n)||n.status.type!=="uploading")return;const a=Math.round(t.loaded*100/t.total);n.status.progress!==a&&this.updateFile(s,n.setStatus({type:"uploading",cancelToken:n.status.cancelToken,progress:a}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(t,s)=>{const n=_.CancelToken.source(),a=new V(s.name,s.size,this.nextLocalFileId(),{type:"uploading",cancelToken:n,progress:1});this.addFile(a),this.props.uploadClient.uploadFile(this.props.element,t.uploadUrl,s,o=>this.onUploadProgress(o,a.id),n.token).then(()=>this.onUploadComplete(a.id,t)).catch(o=>{_.isCancel(o)||this.updateFile(a.id,a.setStatus({type:"error",errorMessage:o?o.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:t,element:s}=this.props,n=t.getFileUploaderStateValue(s);if(P(n))return l;const{uploadedFileInfo:a}=n;return P(a)||a.length===0?l:{files:a.map(o=>{const p=o.name,S=o.size,x=o.fileId,U=o.fileUrls;return new V(p,S,this.nextLocalFileId(),{type:"uploaded",fileId:x,fileUrls:U})}),imgSrc:a.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=t=>t.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:t,widgetMgr:s,fragmentId:n}=this.props;s.getFileUploaderStateValue(t)===void 0&&s.setFileUploaderStateValue(t,l,{fromUi:!1},n)}createWidgetValue(){const l=this.state.files.filter(t=>t.status.type==="uploaded").map(t=>{const{name:s,size:n,status:a}=t;return new ne({fileId:a.fileId,fileUrls:a.fileUrls,name:s,size:n})});return new ae({uploadedFileInfo:l})}render(){var a;const{element:l,widgetMgr:t,disabled:s,width:n}=this.props;return this.formClearHelper.manageFormClearListener(t,l.formId,this.onFormCleared),u.jsxs(W,{className:"stCameraInput","data-testid":"stCameraInput",children:[u.jsx(oe,{label:l.label,disabled:s,labelVisibility:le((a=l.labelVisibility)==null?void 0:a.value),children:l.help&&u.jsx(de,{children:u.jsx(ce,{content:l.help,placement:k.TOP_RIGHT})})}),this.state.imgSrc?u.jsxs(u.Fragment,{children:[u.jsx(T,{width:n,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&u.jsx(me,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:n,height:n*9/16})}),u.jsx(H,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||s,children:this.getProgress()?"Uploading...":u.jsxs(Se,{children:[u.jsx(O,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):u.jsx(je,{handleCapture:this.handleCapture,width:n,disabled:s,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function Fe(i,l){return fetch(i).then(t=>t.arrayBuffer()).then(t=>new File([t],l,{type:"image/jpeg"}))}export{Pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as W,r,M as C,bw as T,bx as j,j as l,a_ as k,a$ as L,bc as $,b0 as V,aK as A,bv as N,by as B,br as H,ba as O,bz as P}from"./index-
|
|
1
|
+
import{c as W,r,M as C,bw as T,bx as j,j as l,a_ as k,a$ as L,bc as $,b0 as V,aK as A,bv as N,by as B,br as H,ba as O,bz as P}from"./index-Bx_n8HNg.js";import{a as E}from"./useBasicWidgetState-T4r0nY5O.js";import"./FormClearHelper-EZKsnYaC.js";const F=W("div",{target:"e6zijwc0"})(({theme:o})=>({"span[aria-disabled='true']":{background:o.colors.fadedText05}}),""),G=(o,t)=>o.getIntArrayValue(t),K=o=>o.default??null,U=o=>o.value??null,D=(o,t,n,p)=>{t.setIntArrayValue(o,n.value,{fromUi:n.fromUi},p)},_=o=>{var S;const{element:t,widgetMgr:n,width:p,fragmentId:f}=o,e=C(),[s,m]=E({getStateFromWidgetMgr:G,getDefaultStateFromProto:K,getCurrStateFromProto:U,updateWidgetMgrState:D,element:t,widgetMgr:n,fragmentId:f}),u=t.maxSelections>0&&s.length>=t.maxSelections,y=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(s.length===t.maxSelections){const i=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${i}. Remove an option first.`}return"No results"},[t.maxSelections,s.length]),v=r.useMemo(()=>s.map(i=>{const a=t.options[i];return{value:i.toString(),label:a}}),[t.options,s]),h=r.useCallback(i=>{const a=()=>{var c;const g=(c=i.option)==null?void 0:c.value;return parseInt(g,10)};switch(i.type){case"remove":return T(s,a());case"clear":return[];case"select":return s.concat([a()]);default:throw new Error(`State transition is unknown: ${i.type}`)}},[s]),x=r.useCallback(i=>{t.maxSelections&&i.type==="select"&&s.length>=t.maxSelections||m({value:h(i),fromUi:!0})},[t.maxSelections,h,m,s.length]),z=r.useCallback((i,a)=>{if(u)return[];const g=i.filter(c=>!s.includes(Number(c.value)));return j(g,a)},[u,s]),w={width:p},{options:d}=t,b=d.length===0?!0:o.disabled,R=d.length===0?"No options to select.":t.placeholder,I=d.map((i,a)=>({label:i,value:a.toString()})),M=d.length>10;return l.jsxs("div",{className:"stMultiSelect","data-testid":"stMultiSelect",style:w,children:[l.jsx(k,{label:t.label,disabled:b,labelVisibility:L((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l.jsx($,{children:l.jsx(V,{content:t.help,placement:A.TOP_RIGHT})})}),l.jsx(F,{children:l.jsx(N,{options:I,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:R,type:B.select,multi:!0,onChange:x,value:v,disabled:b,size:"compact",noResultsMsg:y,filterOptions:z,closeOnSelect:!1,overrides:{SelectArrow:{component:H,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:O&&M===!1?"readonly":null}},Dropdown:{component:P}}})})]})},q=r.memo(_);export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,B as h,j as v,bP as c,a$ as I}from"./index-
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import{c as r,k as m,r as p,j as n}from"./index-
|
|
1
|
+
import{c as r,k as m,r as p,j as n}from"./index-Bx_n8HNg.js";import{R as l,P as c}from"./RenderInPortalIfExists-BahSgp7T.js";const d="/assets/flake-0.DgWaVvm5.png",f="/assets/flake-1.B2r5AHMK.png",g="/assets/flake-2.BnWSExPC.png",o=150,x=150,u=10,$=90,h=4e3,a=(t,e=0)=>Math.random()*(t-e)+e,k=()=>m`
|
|
2
2
|
from {
|
|
3
3
|
transform:
|
|
4
4
|
translateY(0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,aE as f,Q as g,aF as a,aG as l,j as s,aH as y,aI as v}from"./index-
|
|
1
|
+
import{c as d,aE as f,Q as g,aF as a,aG as l,j as s,aH as y,aI as v}from"./index-Bx_n8HNg.js";function C(r,e){switch(r){case a.XSMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.sm}`,fontSize:e.fontSizes.sm};case a.SMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.md}`};case a.LARGE:return{padding:`${e.spacing.md} ${e.spacing.md}`};default:return{padding:`${e.spacing.xs} ${e.spacing.md}`}}}const h=d("a",{target:"e16zdaao3"})(({fluidWidth:r,size:e,theme:o})=>{const i=typeof r=="number"?`${r}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:o.fontWeights.normal,padding:`${o.spacing.xs} ${o.spacing.md}`,borderRadius:o.radii.default,minHeight:o.sizes.minElementHeight,margin:0,lineHeight:o.lineHeights.base,color:o.colors.primary,textDecoration:"none",width:r?i:"auto",userSelect:"none","&:visited":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${g(o.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...C(e,o)}},""),x=d(h,{target:"e16zdaao2"})(({theme:r})=>({backgroundColor:r.colors.primary,color:r.colors.white,border:`${r.sizes.borderWidth} solid ${r.colors.primary}`,"&:hover":{backgroundColor:f(r.colors.primary,.05),color:r.colors.white},"&:active":{backgroundColor:"transparent",color:r.colors.primary},"&:visited:not(:active)":{color:r.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),""),k=d(h,{target:"e16zdaao1"})(({theme:r})=>({backgroundColor:r.colors.lightenedBg05,color:r.colors.bodyText,border:`${r.sizes.borderWidth} solid ${r.colors.borderColor}`,"&:visited":{color:r.colors.bodyText},"&:hover":{borderColor:r.colors.primary,color:r.colors.primary},"&:active":{color:r.colors.white,borderColor:r.colors.primary,backgroundColor:r.colors.primary},"&:focus:not(:active)":{borderColor:r.colors.primary,color:r.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),""),$=d(h,{target:"e16zdaao0"})(({theme:r})=>({padding:r.spacing.none,backgroundColor:r.colors.transparent,color:r.colors.bodyText,border:"none","&:visited":{color:r.colors.bodyText},"&:hover":{color:r.colors.primary},"&:active":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:r.colors.primary,boxShadow:`0 0 0 0.2rem ${g(r.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}}),"");function w({kind:r,size:e,disabled:o,fluidWidth:i,children:n,autoFocus:t,href:c,rel:b,target:u,onClick:m}){let p=x;return r===l.SECONDARY?p=k:r===l.TERTIARY&&(p=$),s.jsx(p,{kind:r,size:e||a.MEDIUM,fluidWidth:i||!1,disabled:o||!1,autoFocus:t||!1,href:c,target:u,rel:b,onClick:m,tabIndex:o?-1:0,"data-testid":`stBaseLinkButton-${r}`,children:n})}function z(r){const{disabled:e,element:o,width:i}=r,n={width:i};let t=l.SECONDARY;o.type==="primary"?t=l.PRIMARY:o.type==="tertiary"&&(t=l.TERTIARY);const c=o.help?i:!0,b=u=>{r.disabled&&u.preventDefault()};return s.jsx("div",{className:"stLinkButton","data-testid":"stLinkButton",style:n,children:s.jsx(y,{help:o.help,children:s.jsx(w,{kind:t,size:a.SMALL,disabled:e,onClick:b,fluidWidth:o.useContainerWidth?c:!1,href:o.url,target:"_blank",rel:"noreferrer","aria-disabled":e,children:s.jsx(v,{icon:o.icon,label:o.label})})})})}export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,ak as y,r as s,j as i,al as w,a2 as S,am as t,an as T,ao as v,a5 as z}from"./index-
|
|
1
|
+
import{c as p,ak as y,r as s,j as i,al as w,a2 as S,am as t,an as T,ao as v,a5 as z}from"./index-Bx_n8HNg.js";const R=p("button",{target:"elibz2u3"})(({theme:e})=>({fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,color:e.colors.fadedText60,backgroundColor:e.colors.transparent,fontFamily:"inherit",margin:e.spacing.none,border:"none",boxShadow:"none",padding:e.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:e.colors.primary}}),""),j=p("div",{target:"elibz2u2"})(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing.lg,"> span":{marginTop:e.spacing.twoXS}}),""),k=p("div",{target:"elibz2u0"})(({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,div:{display:"inline-flex"}}),"");function B(e){const o=z(e);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:e.spacing.md,width:e.sizes.toastWidth,marginTop:e.spacing.sm,borderTopLeftRadius:e.radii.default,borderTopRightRadius:e.radii.default,borderBottomLeftRadius:e.radii.default,borderBottomRightRadius:e.radii.default,paddingTop:e.spacing.lg,paddingBottom:e.spacing.lg,paddingLeft:e.spacing.twoXL,paddingRight:e.spacing.twoXL,backgroundColor:o?e.colors.gray10:e.colors.gray90,color:e.colors.bodyText,boxShadow:o?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:e.colors.fadedText40,width:e.fontSizes.lg,height:e.fontSizes.lg,marginRight:`calc(-1 * ${e.spacing.lg} / 2)`,":hover":{color:e.colors.bodyText}}}}}function C(e){if(e.length>104){let o=e.replace(/^(.{104}[^\s]*).*/,"$1");return o.length>104&&(o=o.substring(0,104).split(" ").slice(0,-1).join(" ")),o.trim()}return e}function L({theme:e,body:o,icon:n,width:h}){const r=C(o),d=o!==r,[a,m]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{m(!a)},[a]),l=s.useMemo(()=>B(e),[e]),c=s.useMemo(()=>i.jsxs(j,{expanded:a,children:[n&&i.jsx(w,{iconValue:n,size:"xl",testid:"stToastDynamicIcon"}),i.jsxs(k,{children:[i.jsx(S,{source:a?o:r,allowHTML:!1,isToast:!0}),d&&i.jsx(R,{"data-testid":"stToastViewButton",onClick:f,children:a?"view less":"view more"})]})]}),[d,a,o,n,r,f]);s.useEffect(()=>{if(e.inSidebar)return;const g=t.info(c,{overrides:{...l}});return b(g),()=>{t.update(g,{overrides:{Body:{style:{transitionDuration:0}}}}),t.clear(g)}},[]),s.useEffect(()=>{t.update(u,{children:c,overrides:{...l}})},[u,c,l]);const x=i.jsx(T,{kind:v.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`.\n See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:h});return i.jsx(i.Fragment,{children:e.inSidebar&&x})}const D=y(L);export{D as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var rN;import{g as vw,a9 as Zl,B as yg,J as bw,aa as oN,ab as aN,ac as ms,ad as Af,S as na,ae as sN,af as lN,ag as xw,ah as uN,C as cN,Q as fN,c as dN,M as hN,j as tu,r as pN,F as _w,a7 as mN,$ as vg,ai as gN,aj as ww}from"./index-
|
|
1
|
+
var rN;import{g as vw,a9 as Zl,B as yg,J as bw,aa as oN,ab as aN,ac as ms,ad as Af,S as na,ae as sN,af as lN,ag as xw,ah as uN,C as cN,Q as fN,c as dN,M as hN,j as tu,r as pN,F as _w,a7 as mN,$ as vg,ai as gN,aj as ww}from"./index-Bx_n8HNg.js";import{a as eu,n as yN,b as vN,c as Cf,t as ia,f as bN,d as bg,p as xN,e as _N,g as wN,h as kw,i as kN,j as no,k as nu,l as EN,m as $N,o as SN,q as DN,r as Ff,s as Ew,u as gs,v as xg,w as Mf,x as $w,y as io,z as ys,A as AN,B as ro,C as CN,D as FN,E as MN,F as TN}from"./threshold-C19zgWBv.js";import{d as _g,e as wg,R as Tf,C as kg,r as Sw,b as Dw,a as Aw,h as Of,c as Eg,n as Me,f as ON,g as NN,i as zN,j as RN,k as LN,l as PN,m as BN,o as Nf}from"./string-Bl9OLDCw.js";import{i as jN,a as IN,n as UN,T as qN,t as WN}from"./timer-C68DGyYc.js";import{F as HN}from"./FormClearHelper-EZKsnYaC.js";import{S as Cw,T as VN}from"./Toolbar-BeKg-rY_.js";import{w as GN,u as YN,E as XN}from"./withFullScreenWrapper-i_wAtCLZ.js";/*!
|
|
2
2
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
3
3
|
* (c) 2017-2022 Joachim Wester
|
|
4
4
|
* MIT licensed
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as at,j as bt}from"./index-BwjoUCNo.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-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+`>
|
|
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{c as s,R as g,a6 as f,aJ as b,M as k,j as t,aH as m,aK as C,al as j,a2 as v}from"./index-
|
|
1
|
+
import{c as s,R as g,a6 as f,aJ as b,M as k,j as t,aH as m,aK as C,al as j,a2 as v}from"./index-Bx_n8HNg.js";const y=s("div",{target:"e11k5jya2"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),w=s("a",{target:"e11k5jya1"})(({disabled:a,isCurrentPage:r,fluidWidth:n,theme:e})=>({textDecoration:"none",width:typeof n=="number"?`${n}px`:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,borderRadius:e.radii.default,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,marginTop:e.spacing.threeXS,marginBottom:e.spacing.threeXS,lineHeight:e.lineHeights.menuItem,backgroundColor:r?e.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?e.colors.darkenedBgMix25:e.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:e.colors.darkenedBgMix15},"@media print":{paddingLeft:e.spacing.none},...a?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed","&:hover":{color:e.colors.fadedText40,backgroundColor:e.colors.transparent}}:{}}),""),L=s("span",{target:"e11k5jya0"})(({disabled:a,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...a?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}),"");function T(a,r){return a===null&&r?!0:a===null&&!r?!1:a===!0}function P(a){const{onPageChange:r,currentPageScriptHash:n}=g.useContext(f),e=g.useContext(b),{colors:p}=k(),{disabled:l,element:o,width:i}=a,u={width:i},h=T(o.useContainerWidth,e),d=n===o.pageScriptHash,x=c=>{o.external?l&&c.preventDefault():(c.preventDefault(),l||r(o.pageScriptHash))};return t.jsx("div",{className:"stPageLink","data-testid":"stPageLink",style:u,children:t.jsx(m,{help:o.help,placement:C.TOP_RIGHT,children:t.jsx(y,{children:t.jsxs(w,{"data-testid":"stPageLink-NavLink",disabled:l,isCurrentPage:d,fluidWidth:h?i:!1,href:o.page,target:o.external?"_blank":"",rel:"noreferrer",onClick:x,children:[o.icon&&t.jsx(j,{size:"lg",color:p.bodyText,iconValue:o.icon}),t.jsx(L,{disabled:l,children:t.jsx(v,{source:o.label,allowHTML:!1,isLabel:!0,boldLabel:d,largerLabel:!0,disableLinks:!0})})]})})})})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,aD as y,j as i}from"./index-
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import{r as f,bJ as U,b3 as m,bM as p,bO as S}from"./index-
|
|
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.
|
|
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-
|
|
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};
|
package/build/assets/{number-overlay-editor-cdMzdt98.js → number-overlay-editor-DwRDmB7O.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as Q,r as T}from"./index-BwjoUCNo.js";import{s as Ie}from"./index-BVUe3D3r.js";import"./FormClearHelper-CgY1PHFo.js";import"./withFullScreenWrapper-CkF8UtaI.js";import"./Toolbar-FcJw8P3i.js";import"./sprintf-C-r3gIuM.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-bge8IXL1.js";import"./getPrototypeOf-BuqC2LfE.js";import"./createSuper-DFd_7HWg.js";import"./FileDownload.esm-CGGZqf24.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-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(`
|
|
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-
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import{r as a,E as y,_ as d,az as h}from"./index-
|
|
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.
|
|
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-
|
|
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.
|
|
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};
|