streamlit-nightly 1.41.2.dev20250118__py2.py3-none-any.whl → 1.41.2.dev20250120__py2.py3-none-any.whl
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.
- streamlit/config.py +14 -0
- streamlit/runtime/runtime.py +8 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.BUw5ikQY.js → FileDownload.esm.DW9qPsuf.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.Bvmaiutv.js → FormClearHelper.BP4f-wKq.js} +1 -1
- streamlit/static/static/js/{Hooks.DcERo8tB.js → Hooks.DNhdjC_E.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BupGmSrJ.js → InputInstructions.6chqAOMM.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CTBNJVpb.js → ProgressBar.D-DmAAiN.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.BhbPC-G8.js → RenderInPortalIfExists.cTCR1GXI.js} +1 -1
- streamlit/static/static/js/{Toolbar.Dw79Vekz.js → Toolbar.IB7xmaQ3.js} +1 -1
- streamlit/static/static/js/{base-input.BBtHVXa2.js → base-input.DIQMGXMv.js} +1 -1
- streamlit/static/static/js/{createSuper.BBR-BbJr.js → createSuper.Do1oR0VE.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DuZabixr.js → data-grid-overlay-editor.0VbWmjRF.js} +1 -1
- streamlit/static/static/js/{downloader.4xvEoIbd.js → downloader.DFiVHqec.js} +1 -1
- streamlit/static/static/js/{es6.DmlLpYMO.js → es6.zKs-XsJ1.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.M3x98UQ7.js → getPrototypeOf.B4u2uvgs.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.CgYHddZ1.js → iframeResizer.contentWindow.Cfik70yz.js} +1 -1
- streamlit/static/static/js/{index.AoUAN-9W.js → index.3XcxQYzA.js} +1 -1
- streamlit/static/static/js/{index.CC_t9mT8.js → index.5idohwqh.js} +1 -1
- streamlit/static/static/js/{index.27TXU2hu.js → index.9Tcn_7uz.js} +1 -1
- streamlit/static/static/js/{index.DZdyNQo1.js → index.B-nmc5wO.js} +1 -1
- streamlit/static/static/js/{index.C8nPrwl-.js → index.B94PZPeI.js} +1 -1
- streamlit/static/static/js/{index.tjVAqGRi.js → index.BBGa9-EC.js} +1 -1
- streamlit/static/static/js/{index.DvfPGXer.js → index.BCrCxn8x.js} +1 -1
- streamlit/static/static/js/{index.61noqmIB.js → index.BMaqPVq6.js} +1 -1
- streamlit/static/static/js/{index.DysCLUsb.js → index.BST23kXB.js} +1 -1
- streamlit/static/static/js/{index.CsdGlifB.js → index.BTG890If.js} +1 -1
- streamlit/static/static/js/{index.PWzpo-hC.js → index.BVS_Npso.js} +1 -1
- streamlit/static/static/js/{index.CeKudMLQ.js → index.Bht8Ku38.js} +1 -1
- streamlit/static/static/js/{index.DH9CvsgQ.js → index.BsLun9mO.js} +1 -1
- streamlit/static/static/js/{index.BtxHQDnZ.js → index.BuQ40cTc.js} +1 -1
- streamlit/static/static/js/{index.DqjAk5qg.js → index.C2x7lWrn.js} +1 -1
- streamlit/static/static/js/{index.CkCtIbw0.js → index.CAOOu98T.js} +1 -1
- streamlit/static/static/js/{index.C4Hwzvpq.js → index.CBzV6LFM.js} +1 -1
- streamlit/static/static/js/{index.DKi-ElEv.js → index.CEyo-K3a.js} +1 -1
- streamlit/static/static/js/{index.B1KjaM9R.js → index.CLEzQJ1l.js} +1 -1
- streamlit/static/static/js/{index.Bq6R9vFh.js → index.CRt7DW67.js} +1 -1
- streamlit/static/static/js/{index.Bu8uxdTh.js → index.CTVIegXx.js} +1 -1
- streamlit/static/static/js/{index.CrcobIb0.js → index.Ca6320CT.js} +5 -5
- streamlit/static/static/js/{index.g24MGpB6.js → index.Cf3IO5h3.js} +1 -1
- streamlit/static/static/js/{index.Dva5NuFG.js → index.Ci9WPusu.js} +1 -1
- streamlit/static/static/js/{index.WSrEkxsE.js → index.CkJysN98.js} +1 -1
- streamlit/static/static/js/{index.BXejhz8S.js → index.CkgGJqBi.js} +5 -5
- streamlit/static/static/js/{index.DeeIZCGU.js → index.D1gCIQ1C.js} +1 -1
- streamlit/static/static/js/{index.STXqYP7Q.js → index.DOO7x26L.js} +1 -1
- streamlit/static/static/js/{index.DcY4XgAF.js → index.DZ31yuLl.js} +1 -1
- streamlit/static/static/js/{index.C21AcM0r.js → index.DfqbHOMy.js} +1 -1
- streamlit/static/static/js/{index.BYyuymTq.js → index.DkCDzK1i.js} +1 -1
- streamlit/static/static/js/{index.CAZxiea2.js → index.DqoGamDV.js} +1 -1
- streamlit/static/static/js/{index.BaskQ92_.js → index.DrXNN7P-.js} +1 -1
- streamlit/static/static/js/{index.CjxOLcYo.js → index.DuwDNwdn.js} +1 -1
- streamlit/static/static/js/{index.rOJcC1R3.js → index.DwhO3jNA.js} +1 -1
- streamlit/static/static/js/{index.CuzQoPgT.js → index.IHJq2nuU.js} +1 -1
- streamlit/static/static/js/{index.C-0rgxAG.js → index.VSTrmYr_.js} +1 -1
- streamlit/static/static/js/{input.BIth4Mda.js → input.hHglMwJu.js} +1 -1
- streamlit/static/static/js/{memory.C0ticMnk.js → memory.BotKhGox.js} +1 -1
- streamlit/static/static/js/{mergeWith.CnJI40Ol.js → mergeWith.dOmek2Nz.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.B4oKK-_Y.js → number-overlay-editor.DIhHlsX3.js} +1 -1
- streamlit/static/static/js/{sandbox.D1ghBIHY.js → sandbox.BlY_yl1S.js} +1 -1
- streamlit/static/static/js/{slicedToArray.C1s2cVDA.js → slicedToArray.xYln54_I.js} +1 -1
- streamlit/static/static/js/{textarea.C1RJDJe0.js → textarea.B9cq_go8.js} +1 -1
- streamlit/static/static/js/{timepicker.CmttWl-Y.js → timepicker.R8Q_Yl7H.js} +1 -1
- streamlit/static/static/js/{uniqueId.BT1SAZF-.js → uniqueId.CKxaEvFc.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BB9oQkjJ.js → useBasicWidgetState.DY0Kwuur.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DldtvoCQ.js → useOnInputChange.CAEw-Xl5.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CWPfcXAP.js → withFullScreenWrapper.Def4ZoAl.js} +1 -1
- {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/RECORD +72 -72
- {streamlit_nightly-1.41.2.dev20250118.data → streamlit_nightly-1.41.2.dev20250120.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250118.dist-info → streamlit_nightly-1.41.2.dev20250120.dist-info}/top_level.txt +0 -0
streamlit/config.py
CHANGED
@@ -420,6 +420,20 @@ _create_option(
|
|
420
420
|
type_=bool,
|
421
421
|
)
|
422
422
|
|
423
|
+
_create_option(
|
424
|
+
"global.includeFragmentRunsInForwardMessageCacheCount",
|
425
|
+
description="""
|
426
|
+
If True, the server will include fragment runs in the count for the
|
427
|
+
forward message cache. The implication is that apps with fragments may
|
428
|
+
see messages being removed from the cache faster. This aligns the server
|
429
|
+
count with the frontend count. This is a temporary fix while we assess the
|
430
|
+
design of the cache.
|
431
|
+
""",
|
432
|
+
visibility="hidden",
|
433
|
+
default_val=False,
|
434
|
+
type_=bool,
|
435
|
+
)
|
436
|
+
|
423
437
|
|
424
438
|
# Config Section: Logger #
|
425
439
|
_create_section("logger", "Settings to customize Streamlit log messages.")
|
streamlit/runtime/runtime.py
CHANGED
@@ -735,9 +735,14 @@ Please report this bug at https://github.com/streamlit/streamlit/issues.
|
|
735
735
|
|
736
736
|
# If this was a `script_finished` message, we increment the
|
737
737
|
# script_run_count for this session, and update the cache
|
738
|
-
if (
|
739
|
-
msg.
|
740
|
-
|
738
|
+
if msg.WhichOneof("type") == "script_finished" and (
|
739
|
+
msg.script_finished == ForwardMsg.FINISHED_SUCCESSFULLY
|
740
|
+
or (
|
741
|
+
config.get_option(
|
742
|
+
"global.includeFragmentRunsInForwardMessageCacheCount"
|
743
|
+
)
|
744
|
+
and msg.script_finished == ForwardMsg.FINISHED_FRAGMENT_RUN_SUCCESSFULLY
|
745
|
+
)
|
741
746
|
):
|
742
747
|
_LOGGER.debug(
|
743
748
|
"Script run finished successfully; "
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.Ca6320CT.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.BWGEWL3m.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,E as n,_ as a}from"./index.
|
1
|
+
import{r as e,E as n,_ as a}from"./index.Ca6320CT.js";var o=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});o.displayName="Delete";var i=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});i.displayName="FileDownload";export{o as D,i as F};
|
@@ -1 +1 @@
|
|
1
|
-
import{D as a,c2 as i,r as o}from"./index.
|
1
|
+
import{D as a,c2 as i,r as o}from"./index.Ca6320CT.js";class l{manageFormClearListener(r,s,t){a(this.formClearListener)&&this.lastWidgetMgr===r&&this.lastFormId===s||(this.disconnect(),i(s)&&(this.formClearListener=r.addFormClearedListener(s,t),this.lastWidgetMgr=r,this.lastFormId=s))}disconnect(){var r;(r=this.formClearListener)==null||r.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function d({element:e,widgetMgr:r,onFormCleared:s}){o.useEffect(()=>{if(!i(e.formId))return;const t=r.addFormClearedListener(e.formId,s);return()=>{t.disconnect()}},[e,r,s])}export{l as F,d as u};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t}from"./index.
|
1
|
+
import{r as t}from"./index.Ca6320CT.js";const o=r=>{const e=t.useRef();return t.useEffect(()=>{e.current=r},[r]),e.current};export{o as u};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as g,k as d,j as l,c7 as p,c8 as f}from"./index.
|
1
|
+
import{n as g,k as d,j as l,c7 as p,c8 as f}from"./index.Ca6320CT.js";const I=d("50%{color:rgba(0,0,0,0);}"),$=g("span",{target:"eva3uk20"})(({includeDot:n,shouldBlink:s,theme:t})=>({...n?{"&::before":{opacity:1,content:'"•"',animation:"none",color:t.colors.gray,margin:`0 ${t.spacing.twoXS}`}}:{},...s?{color:t.colors.red,animationName:`${I}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),b=({dirty:n,value:s,inForm:t,maxLength:a,className:m,type:i="single",allowEnterToSubmit:u=!0})=>{const o=[],r=(e,c=!1)=>{o.push(l($,{includeDot:o.length>0,shouldBlink:c,children:e},o.length))};if(u){const e=t?"submit form":"apply";if(i==="multiline"){const c=f()?"⌘":"Ctrl";r(`Press ${c}+Enter to ${e}`)}else i==="single"&&r(`Press Enter to ${e}`)}return a&&(i!=="chat"||n)&&r(`${s.length}/${a}`,n&&s.length>=a),l(p,{"data-testid":"InputInstructions",className:m,children:o})};export{b as I};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{bu as g,c5 as Le,c6 as A,R as C,r as d,bv as O,ae as xe,aA as Te,b$ as ke,j as ze,bR as Ee}from"./index.
|
1
|
+
import{bu as g,c5 as Le,c6 as A,R as C,r as d,bv as O,ae as xe,aA as Te,b$ as ke,j as ze,bR as Ee}from"./index.Ca6320CT.js";var y={small:"small",medium:"medium",large:"large"},_;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},L.apply(this,arguments)}function ae(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ae(Object(t),!0).forEach(function(a){b(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}function b(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function se(e){var r;return(r={},b(r,y.small,"2px"),b(r,y.medium,"4px"),b(r,y.large,"8px"),r)[e]}var I=g("div",function(e){return{width:"100%"}});I.displayName="StyledRoot";I.displayName="StyledRoot";var M=g("div",function(e){var r=e.$theme,t=r.sizing;return{display:"flex",marginLeft:t.scale500,marginRight:t.scale500,marginTop:t.scale500,marginBottom:t.scale500}});M.displayName="StyledBarContainer";M.displayName="StyledBarContainer";var D=g("div",function(e){var r=e.$theme,t=e.$size,a=e.$steps,n=r.colors,o=r.sizing,i=r.borders,s=i.useRoundedCorners?o.scale0:0;return P({borderTopLeftRadius:s,borderTopRightRadius:s,borderBottomRightRadius:s,borderBottomLeftRadius:s,backgroundColor:Le(n.progressbarTrackFill,"0.16"),height:se(t),flex:1,overflow:"hidden"},a<2?{}:{marginLeft:o.scale300,":first-child":{marginLeft:"0"}})});D.displayName="StyledBar";D.displayName="StyledBar";var H=g("div",function(e){var r=e.$theme,t=e.$value,a=e.$successValue,n=e.$steps,o=e.$index,i=e.$maxValue,s=e.$minValue,l=s===void 0?0:s,u=i||a,R=r.colors,B=r.sizing,$=r.borders,x="".concat(100-(t-l)*100/(u-l),"%"),m={default:"default",awaits:"awaits",inProgress:"inProgress",completed:"completed"},c=m.default;if(n>1){var T=(u-l)/n,j=(t-l)/(u-l)*100,k=Math.floor(j/T);o<k?c=m.completed:o===k?c=m.inProgress:c=m.awaits}var S=$.useRoundedCorners?B.scale0:0,h={transform:"translateX(-".concat(x,")")},N=c===m.inProgress?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:r.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:c===m.completed?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return P({borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,backgroundColor:R.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},n>1?N:h)});H.displayName="StyledBarProgress";H.displayName="StyledBarProgress";var W=g("div",function(e){var r=e.$theme,t=e.$isLeft,a=t===void 0?!1:t,n=e.$size,o=n===void 0?y.medium:n,i=r.colors,s=r.sizing,l=r.borders,u=l.useRoundedCorners?s.scale0:0,R=se(o),B={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:r.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:a?"-50%":"150%",backgroundImage:"linear-gradient(".concat(a?"90":"270","deg, transparent 0%, ").concat(i.accent," 25%, ").concat(i.accent," 75%, transparent 100%)"),animationName:a?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return P(P({},a?{borderTopLeftRadius:u,borderBottomLeftRadius:u}:{borderTopRightRadius:u,borderBottomRightRadius:u}),{},{height:R},B)});W.displayName="StyledInfiniteBar";W.displayName="StyledInfiniteBar";var F=g("div",function(e){return P(P({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});F.displayName="StyledLabel";F.displayName="StyledLabel";var f=(_={},b(_,y.large,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),b(_,y.medium,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),b(_,y.small,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),_),le=g("div",function(e){var r=e.$size,t=e.$inline;return{width:f[r].width+"px",height:f[r].height+"px",position:"relative",display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}});le.displayName="StyledProgressBarRoundedRoot";le.displayName="StyledProgressBarRoundedRoot";var G=g("svg",function(e){var r=e.$size;return{width:f[r].width+"px",height:f[r].height+"px",position:"absolute",fill:"none"}});G.displayName="_StyledProgressBarRoundedSvg";G.displayName="_StyledProgressBarRoundedSvg";A(G,function(e){return function(t){return C.createElement(e,L({viewBox:"0 0 ".concat(f[t.$size].width," ").concat(f[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}});var U=g("path",function(e){var r=e.$theme,t=e.$size;return{stroke:r.colors.backgroundTertiary,strokeWidth:f[t].strokeWidth+"px"}});U.displayName="_StyledProgressBarRoundedTrackBackground";U.displayName="_StyledProgressBarRoundedTrackBackground";A(U,function(e){return function(t){return C.createElement(e,L({d:f[t.$size].d},t))}});var Z=g("path",function(e){var r=e.$theme,t=e.$size,a=e.$visible,n=e.$pathLength,o=e.$pathProgress;return{visibility:a?"visible":"hidden",stroke:r.colors.borderAccent,strokeWidth:f[t].strokeWidth+"px",strokeDasharray:n,strokeDashoffset:n*(1-o)+""}});Z.displayName="_StyledProgressBarRoundedTrackForeground";Z.displayName="_StyledProgressBarRoundedTrackForeground";A(Z,function(e){return function(t){return C.createElement(e,L({d:f[t.$size].d},t))}});var ue=g("div",function(e){var r=e.$theme,t=e.$size;return P({color:r.colors.contentPrimary},r.typography[f[t].typography])});ue.displayName="StyledProgressBarRoundedText";ue.displayName="StyledProgressBarRoundedText";function X(e){"@babel/helpers - typeof";return X=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},X(e)}var Ce=["overrides","getProgressLabel","value","size","steps","successValue","minValue","maxValue","showLabel","infinite","errorMessage","forwardedRef"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(this,arguments)}function w(e,r){return Ve(e)||Xe(e,r)||Ne(e,r)||je()}function je(){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 Ne(e,r){if(e){if(typeof e=="string")return oe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oe(e,r)}}function oe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function Xe(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a=[],n=!0,o=!1,i,s;try{for(t=t.call(e);!(n=(i=t.next()).done)&&(a.push(i.value),!(r&&a.length===r));n=!0);}catch(l){o=!0,s=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw s}}return a}}function Ve(e){if(Array.isArray(e))return e}function Ae(e,r){if(e==null)return{};var t=Ie(e,r),a,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}function Ie(e,r){if(e==null)return{};var t={},a=Object.keys(e),n,o;for(o=0;o<a.length;o++)n=a[o],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function Me(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function De(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function He(e,r,t){return r&&De(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function We(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&V(e,r)}function V(e,r){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},V(e,r)}function Fe(e){var r=Ze();return function(){var a=E(e),n;if(r){var o=E(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return Ge(this,n)}}function Ge(e,r){if(r&&(X(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ue(e)}function Ue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){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 E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(e)}function Ke(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var de=function(e){We(t,e);var r=Fe(t);function t(){return Me(this,t),r.apply(this,arguments)}return He(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var n=this.props,o=n.overrides,i=o===void 0?{}:o,s=n.getProgressLabel,l=n.value,u=n.size,R=n.steps,B=n.successValue,$=n.minValue,x=n.maxValue,m=n.showLabel,c=n.infinite,T=n.errorMessage,j=n.forwardedRef,k=Ae(n,Ce),S=this.props["aria-label"]||this.props.ariaLabel,h=x!==100?x:B,N=O(i.Root,I),K=w(N,2),fe=K[0],ge=K[1],pe=O(i.BarContainer,M),q=w(pe,2),me=q[0],ye=q[1],he=O(i.Bar,D),J=w(he,2),ve=J[0],be=J[1],Pe=O(i.BarProgress,H),Q=w(Pe,2),Re=Q[0],$e=Q[1],Se=O(i.Label,F),Y=w(Se,2),Oe=Y[0],we=Y[1],Be=O(i.InfiniteBar,W),ee=w(Be,2),re=ee[0],te=ee[1],v={$infinite:c,$size:u,$steps:R,$successValue:h,$minValue:$,$maxValue:h,$value:l};function _e(){for(var ne=[],z=0;z<R;z++)ne.push(d.createElement(ve,p({key:z},v,be),d.createElement(Re,p({$index:z},v,$e))));return ne}return d.createElement(fe,p({ref:j,"data-baseweb":"progress-bar",role:"progressbar","aria-label":S||s(l,h,$),"aria-valuenow":c?null:l,"aria-valuemin":c?null:$,"aria-valuemax":c?null:h,"aria-invalid":T?!0:null,"aria-errormessage":T},k,v,ge),d.createElement(me,p({},v,ye),c?d.createElement(d.Fragment,null,d.createElement(re,p({$isLeft:!0,$size:v.$size},te)),d.createElement(re,p({$size:v.$size},te))):_e()),m&&d.createElement(Oe,p({},v,we),s(l,h,$)))}}]),t}(d.Component);Ke(de,"defaultProps",{getProgressLabel:function(r,t,a){return"".concat(Math.round((r-a)/(t-a)*100),"% Loaded")},infinite:!1,overrides:{},showLabel:!1,size:y.medium,steps:1,successValue:100,minValue:0,maxValue:100,value:0});var ce=d.forwardRef(function(e,r){return d.createElement(de,p({forwardedRef:r},e))});ce.displayName="ProgressBar";var ie;(function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"})(ie||(ie={}));function Je({value:e,width:r,size:t="sm",overrides:a}){const n=xe(),o={xs:n.spacing.twoXS,sm:n.spacing.sm,md:n.spacing.lg,lg:n.spacing.xl,xl:n.spacing.twoXL},{activeTheme:i}=C.useContext(Te),s=!ke(i),l={BarContainer:{style:{marginTop:n.spacing.none,marginBottom:n.spacing.none,marginRight:n.spacing.none,marginLeft:n.spacing.none}},Bar:{style:({$theme:u})=>({width:r?r.toString():void 0,marginTop:n.spacing.none,marginBottom:n.spacing.none,marginRight:n.spacing.none,marginLeft:n.spacing.none,height:o[t],backgroundColor:u.colors.progressbarTrackFill,borderTopLeftRadius:n.spacing.twoXS,borderTopRightRadius:n.spacing.twoXS,borderBottomLeftRadius:n.spacing.twoXS,borderBottomRightRadius:n.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:s?n.colors.primary:n.colors.blue70,borderTopLeftRadius:n.spacing.twoXS,borderTopRightRadius:n.spacing.twoXS,borderBottomLeftRadius:n.spacing.twoXS,borderBottomRightRadius:n.spacing.twoXS})}};return ze(ce,{value:e,overrides:Ee(l,a)})}export{Je as P,ie as S};
|
streamlit/static/static/js/{RenderInPortalIfExists.BhbPC-G8.js → RenderInPortalIfExists.cTCR1GXI.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
import{n as i,r as s,j as r,a as d,P as m,b as p,F as P}from"./index.
|
1
|
+
import{n as i,r as s,j as r,a as d,P as m,b as p,F as P}from"./index.Ca6320CT.js";const x=i("div",{target:"e1swy67l0"})({"@media print":{display:"none"}}),y=({className:t,scriptRunId:a,numParticles:e,numParticleTypes:o,ParticleComponent:n})=>r(x,{className:t,"data-testid":t,children:d(e).map(l=>{const c=Math.floor(Math.random()*o);return r(n,{particleType:c},a+l)})}),E=s.memo(y),f=({children:t})=>{var e;const a=(e=s.useContext(m))==null?void 0:e();return a?p.createPortal(t,a):r(P,{children:t})};export{E as P,f as R};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as a,E as m,_ as p,n as d,ay as b,ae as x,j as n,bt as g,av as y,ba as E,aB as h,b6 as T,bn as w,bo as z}from"./index.
|
1
|
+
import{r as a,E as m,_ as p,n as d,ay as b,ae as x,j as n,bt as g,av as y,ba as E,aB as h,b6 as T,bn as w,bo as z}from"./index.Ca6320CT.js";var f=a.forwardRef(function(t,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:o}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});f.displayName="Fullscreen";var u=a.forwardRef(function(t,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:o}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});u.displayName="FullscreenExit";const c="-2.4rem",B=d("div",{target:"esvuqrb0"})(({theme:t,locked:o,target:e})=>({padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:o?c:"-1rem",right:t.spacing.none,transition:"none",...!o&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:c},...e&&{[`${e}:hover &, ${e}:active &, ${e}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:c}}}})),V=d("div",{target:"esvuqrb1"})(({theme:t})=>({color:b(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1})),H=d("div",{target:"esvuqrb2"})(({width:t,height:o,useContainerWidth:e,topCentered:s})=>({position:"relative",height:e&&o?o:"fit-content",width:e?t:"fit-content",maxWidth:"100%",...s?{display:"flex",justifyContent:"center"}:{}}));function v({label:t,show_label:o,icon:e,onClick:s}){const l=x(),i=o?t:"";return n("div",{"data-testid":"stElementToolbarButton",children:n(g,{content:n(y,{source:t,allowHTML:!1,style:{fontSize:l.fontSizes.sm}}),placement:E.TOP,onMouseEnterDelay:1e3,inline:!0,children:h(z,{onClick:r=>{s&&s(),r.stopPropagation()},kind:T.ELEMENT_TOOLBAR,"aria-label":t,children:[e&&n(w,{content:e,size:"md",testid:"stElementToolbarButtonIcon"}),i&&n("span",{children:i})]})})})}const M=({onExpand:t,onCollapse:o,isFullScreen:e,locked:s,children:l,target:i,disableFullscreenMode:r})=>n(B,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:s||e,target:i,children:h(V,{children:[l,t&&!r&&!e&&n(v,{label:"Fullscreen",icon:f,onClick:()=>t()}),o&&!r&&e&&n(v,{label:"Close fullscreen",icon:u,onClick:()=>o()})]})});export{H as S,M as T,v as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as y,bL as oe,bM as ie,bN as ae,bO as le,bu as F,ca as s,cb as de,cc as w,bE as J,c9 as z,bv as C,bU as Y,bV as G}from"./index.
|
1
|
+
import{r as y,bL as oe,bM as ie,bN as ae,bO as le,bu as F,ca as s,cb as de,cc as w,bE as J,c9 as z,bv as C,bU as Y,bV as G}from"./index.Ca6320CT.js";var pe=["title","size","color","overrides"];function D(){return D=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},D.apply(this,arguments)}function fe(e,t){if(e==null)return{};var r=ye(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ye(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function ge(e,t){return me(e)||ve(e,t)||he(e,t)||be()}function be(){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 he(e,t){if(e){if(typeof e=="string")return Q(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 Q(e,t)}}function Q(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 ve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function me(e){if(Array.isArray(e))return e}function $e(e,t){var r=oe(),n=ge(r,2),o=n[1],i=e.title,a=i===void 0?"Hide":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,g=fe(e,pe),b=ie({component:o.icons&&o.icons.Hide?o.icons.Hide:null},d&&d.Svg?ae(d.Svg):{});return y.createElement(le,D({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},g),y.createElement("path",{d:"M12.81 4.36l-1.77 1.78a4 4 0 00-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0112.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 01-12.62 5.64l1.77-1.78a4 4 0 004.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42L16.36 2.22z"}))}const Oe=y.forwardRef($e);var Ce=["title","size","color","overrides"];function N(){return N=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},N.apply(this,arguments)}function Se(e,t){if(e==null)return{};var r=_e(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _e(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ie(e,t){return Te(e)||Fe(e,t)||we(e,t)||Pe()}function Pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Te(e){if(Array.isArray(e))return e}function ke(e,t){var r=oe(),n=Ie(r,2),o=n[1],i=e.title,a=i===void 0?"Show":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,g=Se(e,Ce),b=ie({component:o.icons&&o.icons.Show?o.icons.Show:null},d&&d.Svg?ae(d.Svg):{});return y.createElement(le,N({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},g),y.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const Ee=y.forwardRef(ke);function ee(e,t){var r=e.disabled,n=e.error,o=e.positive,i=e.adjoined,a=e.size,l=e.required,u=e.resize,c=e.readOnly,d=t.isFocused;return{$isFocused:d,$disabled:r,$error:n,$positive:o,$adjoined:i,$size:a,$required:l,$resize:u,$isReadOnly:c}}function te(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 h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?te(Object(r),!0).forEach(function(n){p(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return 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 K=F("button",function(e){var t,r=e.$theme,n=e.$size,o=e.$isFocusVisible,i=(t={},p(t,s.mini,r.sizing.scale400),p(t,s.compact,r.sizing.scale400),p(t,s.default,r.sizing.scale300),p(t,s.large,r.sizing.scale200),t)[n];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:o?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}});K.displayName="StyledMaskToggleButton";K.displayName="StyledMaskToggleButton";var Z=F("div",function(e){var t,r=e.$alignTop,n=r===void 0?!1:r,o=e.$size,i=e.$theme,a=(t={},p(t,s.mini,i.sizing.scale200),p(t,s.compact,i.sizing.scale200),p(t,s.default,i.sizing.scale100),p(t,s.large,i.sizing.scale0),t)[o];return{display:"flex",alignItems:n?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:n?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});Z.displayName="StyledClearIconContainer";Z.displayName="StyledClearIconContainer";var H=F(de,function(e){var t=e.$theme,r=e.$isFocusVisible;return{cursor:"pointer",outline:r?"solid 3px ".concat(t.colors.accent):"none"}});H.displayName="StyledClearIcon";H.displayName="StyledClearIcon";function Re(e,t){var r;return(r={},p(r,s.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}function xe(e,t,r,n,o){var i=e===w.both||e===w.left&&n!=="rtl"||e===w.right&&n==="rtl"||o&&n==="rtl",a=e===w.both||e===w.right&&n!=="rtl"||e===w.left&&n==="rtl"||o&&n!=="rtl";return{paddingLeft:i?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}function M(e,t){var r;return(r={},p(r,s.mini,t.font100),p(r,s.compact,t.font200),p(r,s.default,t.font300),p(r,s.large,t.font400),r)[e]}function Be(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:o.inputFillDisabled,borderRightColor:o.inputFillDisabled,borderTopColor:o.inputFillDisabled,borderBottomColor:o.inputFillDisabled,backgroundColor:o.inputFillDisabled}:t?{borderLeftColor:o.borderSelected,borderRightColor:o.borderSelected,borderTopColor:o.borderSelected,borderBottomColor:o.borderSelected,backgroundColor:o.inputFillActive}:r?{borderLeftColor:o.inputBorderError,borderRightColor:o.inputBorderError,borderTopColor:o.inputBorderError,borderBottomColor:o.inputBorderError,backgroundColor:o.inputFillError}:n?{borderLeftColor:o.inputBorderPositive,borderRightColor:o.inputBorderPositive,borderTopColor:o.inputBorderPositive,borderBottomColor:o.inputBorderPositive,backgroundColor:o.inputFillPositive}:{borderLeftColor:o.inputBorder,borderRightColor:o.inputBorder,borderTopColor:o.inputBorder,borderBottomColor:o.inputBorder,backgroundColor:o.inputFill}}function je(e,t){var r=t.inputBorderRadius;return e===s.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}var Me=function(t){var r=t.$isFocused,n=t.$adjoined,o=t.$error,i=t.$disabled,a=t.$positive,l=t.$size,u=t.$theme,c=t.$theme,d=c.borders,g=c.colors,b=c.sizing,I=c.typography,$=c.animation,_=t.$hasIconTrailing;return h(h(h(h({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:$.timing200,transitionTimingFunction:$.easeOutCurve},je(l,d)),M(l,I)),Be(i,r,o,a,g)),xe(n,l,b,u.direction,_))},se=F("div",Me);se.displayName="Root";se.displayName="Root";function Ae(e,t){var r;return(r={},p(r,s.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),p(r,s.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),p(r,s.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),p(r,s.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}function Le(e,t,r,n,o){return e?{color:o.inputEnhancerTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var ue=F("div",function(e){var t=e.$size,r=e.$disabled,n=e.$isFocused,o=e.$error,i=e.$positive,a=e.$theme,l=a.colors,u=a.sizing,c=a.typography,d=a.animation;return h(h(h({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},M(t,c)),Ae(t,u)),Le(r,n,o,i,l))});ue.displayName="InputEnhancer";ue.displayName="InputEnhancer";function ze(e,t,r,n,o){return e?{color:o.inputTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var De=function(t){var r=t.$isFocused,n=t.$error,o=t.$disabled,i=t.$positive,a=t.$size,l=t.$theme,u=l.colors,c=l.typography,d=l.animation;return h(h({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},M(a,c)),ze(o,r,n,i,u))},U=F("div",De);U.displayName="InputContainer";U.displayName="InputContainer";function Ne(e,t,r,n){return e?{color:n.inputTextDisabled,"-webkit-text-fill-color":n.inputTextDisabled,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholderDisabled}}:{color:n.contentPrimary,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholder}}}var Ve=function(t){var r=t.$disabled,n=t.$isFocused,o=t.$error,i=t.$size,a=t.$theme,l=a.colors,u=a.sizing,c=a.typography;return h(h(h({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},M(i,c)),Re(i,u)),Ne(r,n,o,l))},q=F("input",Ve);q.displayName="Input";q.displayName="Input";function We(e){var t;return typeof window.Event=="function"?t=new window.Event(e,{bubbles:!0,cancelable:!0}):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}function V(e){"@babel/helpers - typeof";return V=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},V(e)}function m(){return m=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},m.apply(this,arguments)}function S(e,t){return Ue(e)||He(e,t)||Ze(e,t)||Ke()}function Ke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ze(e,t){if(e){if(typeof e=="string")return re(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 re(e,t)}}function re(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 He(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Ue(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Je(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 Ye(e,t,r){return t&&Je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ge(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&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},W(e,t)}function Qe(e){var t=et();return function(){var n=j(e),o;if(t){var i=j(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Xe(this,o)}}function Xe(e,t){if(t&&(V(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function et(){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 j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},j(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ne=function(){return null},tt=function(e){Ge(r,e);var t=Qe(r);function r(){var n;qe(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),f(v(n),"inputRef",n.props.inputRef||y.createRef()),f(v(n),"state",{isFocused:n.props.autoFocus||!1,isMasked:n.props.type==="password",initialType:n.props.type,isFocusVisibleForClear:!1,isFocusVisibleForMaskToggle:!1}),f(v(n),"onInputKeyDown",function(l){n.props.clearOnEscape&&l.key==="Escape"&&n.inputRef.current&&!n.props.readOnly&&(n.clearValue(),l.stopPropagation())}),f(v(n),"onClearIconClick",function(){n.inputRef.current&&n.clearValue(),n.inputRef.current&&n.inputRef.current.focus()}),f(v(n),"onFocus",function(l){n.setState({isFocused:!0}),n.props.onFocus(l)}),f(v(n),"onBlur",function(l){n.setState({isFocused:!1}),n.props.onBlur(l)}),f(v(n),"handleFocusForMaskToggle",function(l){J(l)&&n.setState({isFocusVisibleForMaskToggle:!0})}),f(v(n),"handleBlurForMaskToggle",function(l){n.state.isFocusVisibleForMaskToggle!==!1&&n.setState({isFocusVisibleForMaskToggle:!1})}),f(v(n),"handleFocusForClear",function(l){J(l)&&n.setState({isFocusVisibleForClear:!0})}),f(v(n),"handleBlurForClear",function(l){n.state.isFocusVisibleForClear!==!1&&n.setState({isFocusVisibleForClear:!1})}),n}return Ye(r,[{key:"componentDidMount",value:function(){var o=this.props,i=o.autoFocus,a=o.clearable;this.inputRef.current&&(i&&this.inputRef.current.focus(),a&&this.inputRef.current.addEventListener("keydown",this.onInputKeyDown))}},{key:"componentWillUnmount",value:function(){var o=this.props.clearable;o&&this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.onInputKeyDown)}},{key:"clearValue",value:function(){var o=this.inputRef.current;if(o){var i=Object.getOwnPropertyDescriptor(this.props.type===z.textarea?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value");if(i){var a=i.set;if(a){a.call(o,"");var l=We("input");o.dispatchEvent(l)}}}}},{key:"getInputType",value:function(){return this.props.type==="password"?this.state.isMasked?"password":"text":this.props.type}},{key:"renderMaskToggle",value:function(){var o,i=this;if(this.props.type!=="password")return null;var a=C(this.props.overrides.MaskToggleButton,K),l=S(a,2),u=l[0],c=l[1],d=C(this.props.overrides.MaskToggleShowIcon,Ee),g=S(d,2),b=g[0],I=g[1],$=C(this.props.overrides.MaskToggleHideIcon,Oe),_=S($,2),T=_[0],x=_[1],O=this.state.isMasked?"Show password text":"Hide password text",k=(o={},f(o,s.mini,"12px"),f(o,s.compact,"16px"),f(o,s.default,"20px"),f(o,s.large,"24px"),o)[this.props.size];return y.createElement(u,m({$size:this.props.size,$isFocusVisible:this.state.isFocusVisibleForMaskToggle,"aria-label":O,onClick:function(){return i.setState(function(E){return{isMasked:!E.isMasked}})},title:O,type:"button"},c,{onFocus:Y(c,this.handleFocusForMaskToggle),onBlur:G(c,this.handleBlurForMaskToggle)}),this.state.isMasked?y.createElement(b,m({size:k,title:O},I)):y.createElement(T,m({size:k,title:O},x)))}},{key:"renderClear",value:function(){var o,i=this,a=this.props,l=a.clearable,u=a.value,c=a.disabled,d=a.readOnly,g=a.overrides,b=g===void 0?{}:g;if(c||d||!l||u==null||typeof u=="string"&&u.length===0)return null;var I=C(b.ClearIconContainer,Z),$=S(I,2),_=$[0],T=$[1],x=C(b.ClearIcon,H),O=S(x,2),k=O[0],P=O[1],E="Clear value",B=ee(this.props,this.state),A=(o={},f(o,s.mini,"14px"),f(o,s.compact,"14px"),f(o,s.default,"16px"),f(o,s.large,"22px"),o)[this.props.size];return y.createElement(_,m({$alignTop:this.props.type===z.textarea},B,T),y.createElement(k,m({size:A,tabIndex:0,title:E,"aria-label":E,onClick:this.onClearIconClick,onKeyDown:function(R){R.key&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),i.onClearIconClick())},role:"button",$isFocusVisible:this.state.isFocusVisibleForClear},B,P,{onFocus:Y(P,this.handleFocusForClear),onBlur:G(P,this.handleBlurForClear)})))}},{key:"render",value:function(){var o=this.props.overrides,i=o.InputContainer,a=o.Input,l=o.Before,u=o.After,c=this.state.initialType==="password"&&this.props.autoComplete===r.defaultProps.autoComplete?"new-password":this.props.autoComplete,d=ee(this.props,this.state),g=C(i,U),b=S(g,2),I=b[0],$=b[1],_=C(a,q),T=S(_,2),x=T[0],O=T[1],k=C(l,ne),P=S(k,2),E=P[0],B=P[1],A=C(u,ne),L=S(A,2),R=L[0],ce=L[1];return y.createElement(I,m({"data-baseweb":this.props["data-baseweb"]||"base-input"},d,$),y.createElement(E,m({},d,B)),y.createElement(x,m({ref:this.inputRef,"aria-activedescendant":this.props["aria-activedescendant"],"aria-autocomplete":this.props["aria-autocomplete"],"aria-controls":this.props["aria-controls"],"aria-errormessage":this.props["aria-errormessage"],"aria-haspopup":this.props["aria-haspopup"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props.error,"aria-required":this.props.required,autoComplete:c,disabled:this.props.disabled,readOnly:this.props.readOnly,id:this.props.id,inputMode:this.props.inputMode,maxLength:this.props.maxLength,name:this.props.name,onBlur:this.onBlur,onChange:this.props.onChange,onFocus:this.onFocus,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,pattern:this.props.pattern,placeholder:this.props.placeholder,type:this.getInputType(),required:this.props.required,role:this.props.role,value:this.props.value,min:this.props.min,max:this.props.max,step:this.props.step,rows:this.props.type===z.textarea?this.props.rows:null},d,O)),this.renderClear(),this.renderMaskToggle(),y.createElement(R,m({},d,ce)))}}]),r}(y.Component);f(tt,"defaultProps",{"aria-activedescendant":null,"aria-autocomplete":null,"aria-controls":null,"aria-errormessage":null,"aria-haspopup":null,"aria-label":null,"aria-labelledby":null,"aria-describedby":null,adjoined:w.none,autoComplete:"on",autoFocus:!1,disabled:!1,error:!1,positive:!1,name:"",inputMode:"text",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},onClear:function(){},clearable:!1,clearOnEscape:!0,overrides:{},pattern:null,placeholder:"",required:!1,role:null,size:s.default,type:"text",readOnly:!1});export{tt as B,q as I,se as R,De as a,Ve as b,ue as c,ee as d,Me as g};
|
@@ -1 +1 @@
|
|
1
|
-
import{c as n,d as s}from"./getPrototypeOf.
|
1
|
+
import{c as n,d as s}from"./getPrototypeOf.B4u2uvgs.js";function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c=function(){return!!t})()}function i(t){var r=c();return function(){var e,o=n(t);if(r){var u=n(this).constructor;e=Reflect.construct(o,arguments,u)}else e=o.apply(this,arguments);return s(this,e)}}export{i as _};
|
@@ -1 +1 @@
|
|
1
|
-
import{r,b as $}from"./index.
|
1
|
+
import{r,b as $}from"./index.Ca6320CT.js";import{s as z,i as w,a as J,b as Q,T as U,C as Z,m as ee}from"./index.CkgGJqBi.js";import"./FormClearHelper.BP4f-wKq.js";import"./withFullScreenWrapper.Def4ZoAl.js";import"./Toolbar.IB7xmaQ3.js";import"./mergeWith.dOmek2Nz.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.xYln54_I.js";import"./getPrototypeOf.B4u2uvgs.js";import"./createSuper.Do1oR0VE.js";import"./FileDownload.esm.DW9qPsuf.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ie=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,se=()=>t=>t.targetY+10,ae=()=>t=>Math.max(0,(t.targetHeight-28)/2),oe=z("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ie(),"px"],"d19meir1-3":[ne(),"px"],"d19meir1-4":[se(),"px"],"d19meir1-5":[ae(),"px"]}});function de(){const[t,s]=r.useState();return[t??void 0,s]}function le(){const[t,s]=de(),[n,y]=r.useState(0),[g,x]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&x(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(g||t===void 0)return;let a;const o=()=>{const{right:S}=t.getBoundingClientRect();y(p=>Math.min(p+window.innerWidth-S-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,g]);const O=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:O}}const Oe=t=>{const{target:s,content:n,onFinishEditing:y,forceEditMode:g,initialValue:x,imageEditorOverride:O,markdownDivCreateNode:a,highlight:o,className:S,theme:p,id:H,cell:v,bloom:c,validateCell:d,getCellRenderer:F,provideEditor:h,isOutsideClick:X}=t,[l,A]=r.useState(g?n:void 0),k=r.useRef(l??n);k.current=l??n;const[E,R]=r.useState(()=>d===void 0?!0:!(w(n)&&(d==null?void 0:d(v,n,k.current))===!1)),f=r.useCallback((e,i)=>{y(E?e:void 0,i)},[E,y]),K=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&w(e)){const i=d(v,e,k.current);i===!1?R(!1):(typeof i=="object"&&(e=i),R(!0))}A(e)},[v,d]),C=r.useRef(!1),m=r.useRef(void 0),W=r.useCallback(()=>{f(l,[0,0]),C.current=!0},[l,f]),Y=r.useCallback((e,i)=>{f(e,i??m.current??[0,0]),C.current=!0},[f]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!C.current&&m.current!==void 0&&(f(i?l:void 0,m.current),C.current=!0)},0)},[f,l]),D=l??n,[u,q]=r.useMemo(()=>{var i,G;if(J(n))return[];const e=h==null?void 0:h(n);return e!==void 0?[e,!1]:[(G=(i=F(n))==null?void 0:i.provideEditor)==null?void 0:G.call(i,n),!1]},[n,F,h]),{ref:B,style:L}=le();let P=!0,M,_=!0,b;if(u!==void 0){P=u.disablePadding!==!0,_=u.disableStyling!==!0;const e=Q(u);e&&(b=u.styleOverride);const i=e?u.editor:u;M=r.createElement(i,{isHighlighted:o,onChange:K,value:D,initialValue:x,onFinishedEditing:Y,validatedSelection:w(D)?D.selectionRange:void 0,forceEditMode:g,target:s,imageEditorOverride:O,markdownDivCreateNode:a,isValid:E,theme:p})}b={...b,...L};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let I=_?"gdg-style":"gdg-unstyle";E||(I+=" gdg-invalid"),P&&(I+=" gdg-pad");const T=(c==null?void 0:c[0])??1,V=(c==null?void 0:c[1])??1;return $.createPortal(r.createElement(U.Provider,{value:p},r.createElement(Z,{style:ee(p),className:S,onClickOutside:W,isOutsideClick:X},r.createElement(oe,{ref:B,id:H,className:I,style:b,as:q===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},M)))),N)};export{Oe as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{c as b,e as P}from"./es6.
|
1
|
+
import{c as b,e as P}from"./es6.zKs-XsJ1.js";import"./index.Ca6320CT.js";const{WritableStream:y,TransformStream:_,DOMException:v,Blob:u}=b,{GONE:E}=P,M=/constructor/i.test(window.HTMLElement);class F{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...E)}async isSameEntry(e){return this===e}async createWritable(e={}){var d;const t=await((d=navigator.serviceWorker)==null?void 0:d.getRegistration()),o=document.createElement("a"),n=new _,R=n.writable;if(o.download=this.name,M||!t){let r=[];n.readable.pipeTo(new y({write(s){r.push(new u([s]))},close(){const s=new u(r,{type:"application/octet-stream; charset=utf-8"});r=[],o.href=URL.createObjectURL(s),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:r,readablePort:s}=new j(y),a=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+a,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>t.active.postMessage(0),1e4);n.readable.pipeThrough(new _({transform(c,h){if(c instanceof Uint8Array)return h.enqueue(c);const w=new Response(c).body.getReader(),p=W=>w.read().then(m=>m.done?0:p(h.enqueue(m.value)));return p()}})).pipeTo(r).finally(()=>{clearInterval(g)}),t.active.postMessage({url:t.scope+a,headers:f,readablePort:s},[s]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+a,document.body.appendChild(i)}return R.getWriter()}}const T=0,L=0,O=1,U=1,k=2;class S{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:T,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:k}),this._port.close()}abort(e){this._port.postMessage({type:U,reason:e}),this._port.close()}_onMessage(e){e.type===L&&this._resolveReady(),e.type===O&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class j{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new S(t.port2))}}export{F as FileHandle};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./downloader.
|
2
|
-
var G=Object.defineProperty;var R=a=>{throw TypeError(a)};var Y=(a,t,e)=>t in a?G(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var g=(a,t,e)=>Y(a,typeof t!="symbol"?t+"":t,e),X=(a,t,e)=>t.has(a)||R("Cannot "+e);var j=(a,t,e)=>t.has(a)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),M=(a,t,e,r)=>(X(a,t,"write to private field"),r?r.call(a,e):t.set(a,e),e);import{w as d}from"./index.CrcobIb0.js";const N=globalThis.showDirectoryPicker;async function k(a={}){if(N&&!a._preferPolyfill)return N(a);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const e=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(r=>{t.addEventListener("change",r),t.click()}),e.then(r=>r.getDirHandlesFromInput(t))}const J={accepts:[]},V=globalThis.showOpenFilePicker;async function K(a={}){const t={...J,...a};if(V&&!a._preferPolyfill)return V(t);const e=document.createElement("input");e.type="file",e.multiple=t.multiple,e.accept=(t.accepts||[]).map(n=>[...(n.extensions||[]).map(o=>"."+o),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const r=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),r.then(n=>n.getFileHandlesFromInput(e))}const W=globalThis.showSaveFilePicker;async function Q(a={}){if(W&&!a._preferPolyfill)return W(a);a._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),a.suggestedName=a._name);const{FileSystemFileHandle:t}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url),{FileHandle:e}=await d(async()=>{const{FileHandle:r}=await import("./downloader.4xvEoIbd.js");return{FileHandle:r}},__vite__mapDeps([0,1,2]),import.meta.url);return new t(new e(a.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const a=this.webkitGetAsEntry(),[{FileHandle:t,FolderHandle:e},{FileSystemDirectoryHandle:r},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox.D1ghBIHY.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url),d(()=>Promise.resolve().then(()=>_),void 0,import.meta.url)]);return a.isFile?new n(new t(a,!1)):new r(new e(a,!1))});async function Z(a,t={}){var o,s;if(!a)return((s=(o=globalThis.navigator)==null?void 0:o.storage)==null?void 0:s.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),r=await a,n=await(r.default?r.default(t):r(t));return new e(n)}const ee={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:te}=ee;var H;const L=class L extends te{constructor(e){super(e);j(this,H);M(this,H,e),Object.setPrototypeOf(this,L.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),r=e.close();return e.releaseLock(),r}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const r=this.getWriter(),n=r.write(e);return r.releaseLock(),n}};H=new WeakMap;let p=L;Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(p.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=p);const m=Symbol("adapter");var q;q=m;class P{constructor(t){g(this,q);g(this,"name");g(this,"kind");this.kind=t.kind,this.name=t.name,this[m]=t}async queryPermission(t={}){const{mode:e="read"}=t,r=this[m];if(r.queryPermission)return r.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return r.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:t="read"}={}){const e=this[m];if(e.requestPermission)return e.requestPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async remove(t={}){await this[m].remove(t)}async isSameEntry(t){return this===t?!0:!t||typeof t!="object"||this.kind!==t.kind||!t[m]?!1:this[m].isSameEntry(t[m])}}Object.defineProperty(P.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});var $;globalThis.FileSystemHandle&&(($=globalThis.FileSystemHandle.prototype).queryPermission??($.queryPermission=function(a){return"granted"}));const x={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:a=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${a}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},re={writable:globalThis.WritableStream};async function ae(a){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[t,e,r]=await Promise.all([d(()=>import("./memory.C0ticMnk.js"),__vite__mapDeps([4,1,2]),import.meta.url),d(()=>import("./sandbox.D1ghBIHY.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url)]),n=new t.FolderHandle("",!1);return n._entries=a.map(o=>o.isFile?new e.FileHandle(o,!1):new e.FolderHandle(o,!1)),new r.FileSystemDirectoryHandle(n)}async function ie(a){const{FolderHandle:t,FileHandle:e}=await d(async()=>{const{FolderHandle:y,FileHandle:l}=await import("./memory.C0ticMnk.js");return{FolderHandle:y,FileHandle:l}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemDirectoryHandle:r}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),n=Array.from(a.files),o=n[0].webkitRelativePath.split("/",1)[0],s=new t(o,!1);return n.forEach(y=>{const l=y.webkitRelativePath.split("/");l.shift();const c=l.pop(),f=l.reduce((w,b)=>(w._entries[b]||(w._entries[b]=new t(b,!1)),w._entries[b]),s);f._entries[c]=new e(y.name,y,!1)}),new r(s)}async function ne(a){const{FileHandle:t}=await d(async()=>{const{FileHandle:r}=await import("./memory.C0ticMnk.js");return{FileHandle:r}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);return Array.from(a.files).map(r=>new e(new t(r.name,r,!1)))}const B=Object.freeze(Object.defineProperty({__proto__:null,config:re,errors:x,fromDataTransfer:ae,getDirHandlesFromInput:ie,getFileHandlesFromInput:ne},Symbol.toStringTag,{value:"Module"})),{GONE:oe,MOD_ERR:se}=x,u=Symbol("adapter");var z;let F=class T extends P{constructor(e){super(e);g(this,z);this[u]=e}async getDirectoryHandle(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const n=await this[u].getDirectoryHandle(e,r);return new T(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);for await(const[r,n]of this[u].entries())yield[n.name,n.kind==="file"?new e(n):new T(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);console.warn("deprecated, use .entries() instead");for await(let r of this[u].entries())yield r.kind==="file"?new e(r):new T(r)}async getFileHandle(e,r={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:s}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:s}},void 0,import.meta.url);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const o=await this[u].getFileHandle(e,r);return new n(o)}async removeEntry(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return r.recursive=!!r.recursive,this[u].removeEntry(e,r)}async resolve(e){if(await e.isSameEntry(this))return[];const r=[{handle:this,path:[]}];for(;r.length;){let{handle:n,path:o}=r.pop();for await(const s of n.values()){if(await s.isSameEntry(e))return[...o,s.name];s.kind==="directory"&&r.push({handle:s,path:[...o,s.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,r]of this)yield r}[(z=u,Symbol.asyncIterator)](){return this.entries()}};Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(F.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const a=globalThis.FileSystemDirectoryHandle.prototype;a.resolve=async function(o){if(await o.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:y,path:l}=s.pop();for await(const c of y.values()){if(await c.isSameEntry(o))return[...l,c.name];c.kind==="directory"&&s.push({handle:c,path:[...l,c.name]})}}return null};async function t(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...oe)}const e=a.entries;a.entries=async function*(){await t(this),yield*e.call(this)},a[Symbol.asyncIterator]=async function*(){yield*this.entries()};const r=a.removeEntry;a.removeEntry=async function(n,o={}){return r.call(this,n,o).catch(async s=>{throw s instanceof DOMException&&s.name==="UnknownError"&&!o.recursive&&!(await e.call(this).next()).done?new DOMException(...se):s})}}const D=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),{INVALID:le,SYNTAX:I,GONE:ce}=x,v=Symbol("adapter");var U,C;class S extends(C=P,U=v,C){constructor(e){super(e);g(this,U);this[v]=e}async createWritable(e={}){return new p(await this[v].createWritable(e))}async getFile(){return this[v].getFile()}}Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(S.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const a=new WeakMap;let t;const e=()=>{let n,o;onmessage=async s=>{const y=s.ports[0],l=s.data;switch(l.type){case"open":const c=l.name;let f=await navigator.storage.getDirectory();for(const w of l.path)f=await f.getDirectoryHandle(w);n=await f.getFileHandle(c),o=await n.createSyncAccessHandle();break;case"write":o.write(l.data,{at:l.position}),o.flush();break;case"truncate":o.truncate(l.size);break;case"abort":case"close":o.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!t){const i=`(${e.toString()})()`,E=new Blob([i],{type:"text/javascript"});t=URL.createObjectURL(E)}const o=new Worker(t,{type:"module"});let s=0;const y=new TextEncoder;let l=await this.getFile().then(i=>i.size);const c=i=>new Promise((E,O)=>{const h=new MessageChannel;h.port1.onmessage=A=>{A.data instanceof Error?O(A.data):E(A.data),h.port1.close(),h.port2.close(),h.port1.onmessage=null},o.postMessage(i,[h.port2])}),f=await navigator.storage.getDirectory(),w=await a.get(this),b=await f.resolve(w);if(b===null)throw new DOMException(...ce);return await c({type:"open",path:b,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await c({type:"truncate",size:0}),l=0),new p({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:s},i.type==="write"){if(!("data"in i))throw await c({type:"close"}),new DOMException(...I("write requires a data argument"));if(i.position??(i.position=s),typeof i.data=="string")i.data=y.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const O=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(O)}Number.isInteger(i.position)&&i.position>=0&&(s=i.position),s+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...le);console.log("seeking",i),s=i.position;return}else throw await c({type:"close"}),new DOMException(...I("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,s>l&&(s=l);else throw await c({type:"close"}),new DOMException(...I("truncate requires a size argument"));await c(i)},async close(){await c({type:"close"}),o.terminate()},async abort(i){await c({type:"abort",reason:i}),o.terminate()}})};const r=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const o=await r.call(this,...n);return a.set(o,this),o}}const _=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:S,default:S},Symbol.toStringTag,{value:"Module"})),ue=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,FileSystemFileHandle:S,FileSystemHandle:P,FileSystemWritableFileStream:p,getOriginPrivateDirectory:Z,showDirectoryPicker:k,showOpenFilePicker:K,showSaveFilePicker:Q},Symbol.toStringTag,{value:"Module"}));export{ue as a,ee as c,x as e};
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./downloader.DFiVHqec.js","./index.Ca6320CT.js","../css/index.BWGEWL3m.css","./sandbox.BlY_yl1S.js","./memory.BotKhGox.js"])))=>i.map(i=>d[i]);
|
2
|
+
var G=Object.defineProperty;var R=a=>{throw TypeError(a)};var Y=(a,t,e)=>t in a?G(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var g=(a,t,e)=>Y(a,typeof t!="symbol"?t+"":t,e),X=(a,t,e)=>t.has(a)||R("Cannot "+e);var j=(a,t,e)=>t.has(a)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),M=(a,t,e,r)=>(X(a,t,"write to private field"),r?r.call(a,e):t.set(a,e),e);import{w as d}from"./index.Ca6320CT.js";const N=globalThis.showDirectoryPicker;async function k(a={}){if(N&&!a._preferPolyfill)return N(a);const t=document.createElement("input");t.type="file",t.webkitdirectory=!0,t.multiple=!0,t.style.position="fixed",t.style.top="-100000px",t.style.left="-100000px",document.body.appendChild(t);const e=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(r=>{t.addEventListener("change",r),t.click()}),e.then(r=>r.getDirHandlesFromInput(t))}const J={accepts:[]},V=globalThis.showOpenFilePicker;async function K(a={}){const t={...J,...a};if(V&&!a._preferPolyfill)return V(t);const e=document.createElement("input");e.type="file",e.multiple=t.multiple,e.accept=(t.accepts||[]).map(n=>[...(n.extensions||[]).map(o=>"."+o),...n.mimeTypes||[]]).flat().join(","),Object.assign(e.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(e);const r=d(()=>Promise.resolve().then(()=>B),void 0,import.meta.url);return await new Promise(n=>{e.addEventListener("change",n,{once:!0}),e.click()}),e.remove(),r.then(n=>n.getFileHandlesFromInput(e))}const W=globalThis.showSaveFilePicker;async function Q(a={}){if(W&&!a._preferPolyfill)return W(a);a._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),a.suggestedName=a._name);const{FileSystemFileHandle:t}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url),{FileHandle:e}=await d(async()=>{const{FileHandle:r}=await import("./downloader.DFiVHqec.js");return{FileHandle:r}},__vite__mapDeps([0,1,2]),import.meta.url);return new t(new e(a.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const a=this.webkitGetAsEntry(),[{FileHandle:t,FolderHandle:e},{FileSystemDirectoryHandle:r},{FileSystemFileHandle:n}]=await Promise.all([d(()=>import("./sandbox.BlY_yl1S.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url),d(()=>Promise.resolve().then(()=>_),void 0,import.meta.url)]);return a.isFile?new n(new t(a,!1)):new r(new e(a,!1))});async function Z(a,t={}){var o,s;if(!a)return((s=(o=globalThis.navigator)==null?void 0:o.storage)==null?void 0:s.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:e}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),r=await a,n=await(r.default?r.default(t):r(t));return new e(n)}const ee={ReadableStream:globalThis.ReadableStream,WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:te}=ee;var H;const L=class L extends te{constructor(e){super(e);j(this,H);M(this,H,e),Object.setPrototypeOf(this,L.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),r=e.close();return e.releaseLock(),r}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const r=this.getWriter(),n=r.write(e);return r.releaseLock(),n}};H=new WeakMap;let p=L;Object.defineProperty(p.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(p.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=p);const m=Symbol("adapter");var q;q=m;class P{constructor(t){g(this,q);g(this,"name");g(this,"kind");this.kind=t.kind,this.name=t.name,this[m]=t}async queryPermission(t={}){const{mode:e="read"}=t,r=this[m];if(r.queryPermission)return r.queryPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return r.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async requestPermission({mode:t="read"}={}){const e=this[m];if(e.requestPermission)return e.requestPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return e.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async remove(t={}){await this[m].remove(t)}async isSameEntry(t){return this===t?!0:!t||typeof t!="object"||this.kind!==t.kind||!t[m]?!1:this[m].isSameEntry(t[m])}}Object.defineProperty(P.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});var $;globalThis.FileSystemHandle&&(($=globalThis.FileSystemHandle.prototype).queryPermission??($.queryPermission=function(a){return"granted"}));const x={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:a=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${a}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},re={writable:globalThis.WritableStream};async function ae(a){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[t,e,r]=await Promise.all([d(()=>import("./memory.BotKhGox.js"),__vite__mapDeps([4,1,2]),import.meta.url),d(()=>import("./sandbox.BlY_yl1S.js"),__vite__mapDeps([3,1,2]),import.meta.url),d(()=>Promise.resolve().then(()=>D),void 0,import.meta.url)]),n=new t.FolderHandle("",!1);return n._entries=a.map(o=>o.isFile?new e.FileHandle(o,!1):new e.FolderHandle(o,!1)),new r.FileSystemDirectoryHandle(n)}async function ie(a){const{FolderHandle:t,FileHandle:e}=await d(async()=>{const{FolderHandle:y,FileHandle:l}=await import("./memory.BotKhGox.js");return{FolderHandle:y,FileHandle:l}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemDirectoryHandle:r}=await d(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>D);return{FileSystemDirectoryHandle:y}},void 0,import.meta.url),n=Array.from(a.files),o=n[0].webkitRelativePath.split("/",1)[0],s=new t(o,!1);return n.forEach(y=>{const l=y.webkitRelativePath.split("/");l.shift();const c=l.pop(),f=l.reduce((w,b)=>(w._entries[b]||(w._entries[b]=new t(b,!1)),w._entries[b]),s);f._entries[c]=new e(y.name,y,!1)}),new r(s)}async function ne(a){const{FileHandle:t}=await d(async()=>{const{FileHandle:r}=await import("./memory.BotKhGox.js");return{FileHandle:r}},__vite__mapDeps([4,1,2]),import.meta.url),{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);return Array.from(a.files).map(r=>new e(new t(r.name,r,!1)))}const B=Object.freeze(Object.defineProperty({__proto__:null,config:re,errors:x,fromDataTransfer:ae,getDirHandlesFromInput:ie,getFileHandlesFromInput:ne},Symbol.toStringTag,{value:"Module"})),{GONE:oe,MOD_ERR:se}=x,u=Symbol("adapter");var z;let F=class T extends P{constructor(e){super(e);g(this,z);this[u]=e}async getDirectoryHandle(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const n=await this[u].getDirectoryHandle(e,r);return new T(n)}async*entries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);for await(const[r,n]of this[u].entries())yield[n.name,n.kind==="file"?new e(n):new T(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await d(async()=>{const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:r}},void 0,import.meta.url);console.warn("deprecated, use .entries() instead");for await(let r of this[u].entries())yield r.kind==="file"?new e(r):new T(r)}async getFileHandle(e,r={}){const{FileSystemFileHandle:n}=await d(async()=>{const{FileSystemFileHandle:s}=await Promise.resolve().then(()=>_);return{FileSystemFileHandle:s}},void 0,import.meta.url);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");r.create=!!r.create;const o=await this[u].getFileHandle(e,r);return new n(o)}async removeEntry(e,r={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return r.recursive=!!r.recursive,this[u].removeEntry(e,r)}async resolve(e){if(await e.isSameEntry(this))return[];const r=[{handle:this,path:[]}];for(;r.length;){let{handle:n,path:o}=r.pop();for await(const s of n.values()){if(await s.isSameEntry(e))return[...o,s.name];s.kind==="directory"&&r.push({handle:s,path:[...o,s.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,r]of this)yield r}[(z=u,Symbol.asyncIterator)](){return this.entries()}};Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(F.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const a=globalThis.FileSystemDirectoryHandle.prototype;a.resolve=async function(o){if(await o.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:y,path:l}=s.pop();for await(const c of y.values()){if(await c.isSameEntry(o))return[...l,c.name];c.kind==="directory"&&s.push({handle:c,path:[...l,c.name]})}}return null};async function t(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...oe)}const e=a.entries;a.entries=async function*(){await t(this),yield*e.call(this)},a[Symbol.asyncIterator]=async function*(){yield*this.entries()};const r=a.removeEntry;a.removeEntry=async function(n,o={}){return r.call(this,n,o).catch(async s=>{throw s instanceof DOMException&&s.name==="UnknownError"&&!o.recursive&&!(await e.call(this).next()).done?new DOMException(...se):s})}}const D=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),{INVALID:le,SYNTAX:I,GONE:ce}=x,v=Symbol("adapter");var U,C;class S extends(C=P,U=v,C){constructor(e){super(e);g(this,U);this[v]=e}async createWritable(e={}){return new p(await this[v].createWritable(e))}async getFile(){return this[v].getFile()}}Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(S.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const a=new WeakMap;let t;const e=()=>{let n,o;onmessage=async s=>{const y=s.ports[0],l=s.data;switch(l.type){case"open":const c=l.name;let f=await navigator.storage.getDirectory();for(const w of l.path)f=await f.getDirectoryHandle(w);n=await f.getFileHandle(c),o=await n.createSyncAccessHandle();break;case"write":o.write(l.data,{at:l.position}),o.flush();break;case"truncate":o.truncate(l.size);break;case"abort":case"close":o.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!t){const i=`(${e.toString()})()`,E=new Blob([i],{type:"text/javascript"});t=URL.createObjectURL(E)}const o=new Worker(t,{type:"module"});let s=0;const y=new TextEncoder;let l=await this.getFile().then(i=>i.size);const c=i=>new Promise((E,O)=>{const h=new MessageChannel;h.port1.onmessage=A=>{A.data instanceof Error?O(A.data):E(A.data),h.port1.close(),h.port2.close(),h.port1.onmessage=null},o.postMessage(i,[h.port2])}),f=await navigator.storage.getDirectory(),w=await a.get(this),b=await f.resolve(w);if(b===null)throw new DOMException(...ce);return await c({type:"open",path:b,name:this.name}),(n==null?void 0:n.keepExistingData)===!1&&(await c({type:"truncate",size:0}),l=0),new p({start:i=>{},async write(i){if((i==null?void 0:i.constructor)===Object?i={...i}:i={type:"write",data:i,position:s},i.type==="write"){if(!("data"in i))throw await c({type:"close"}),new DOMException(...I("write requires a data argument"));if(i.position??(i.position=s),typeof i.data=="string")i.data=y.encode(i.data);else if(i.data instanceof ArrayBuffer)i.data=new Uint8Array(i.data);else if(!(i.data instanceof Uint8Array)&&ArrayBuffer.isView(i.data))i.data=new Uint8Array(i.data.buffer,i.data.byteOffset,i.data.byteLength);else if(!(i.data instanceof Uint8Array)){const O=await new Response(i.data).arrayBuffer();i.data=new Uint8Array(O)}Number.isInteger(i.position)&&i.position>=0&&(s=i.position),s+=i.data.byteLength,l+=i.data.byteLength}else if(i.type==="seek")if(Number.isInteger(i.position)&&i.position>=0){if(l<i.position)throw new DOMException(...le);console.log("seeking",i),s=i.position;return}else throw await c({type:"close"}),new DOMException(...I("seek requires a position argument"));else if(i.type==="truncate")if(Number.isInteger(i.size)&&i.size>=0)l=i.size,s>l&&(s=l);else throw await c({type:"close"}),new DOMException(...I("truncate requires a size argument"));await c(i)},async close(){await c({type:"close"}),o.terminate()},async abort(i){await c({type:"abort",reason:i}),o.terminate()}})};const r=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const o=await r.call(this,...n);return a.set(o,this),o}}const _=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:S,default:S},Symbol.toStringTag,{value:"Module"})),ue=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:F,FileSystemFileHandle:S,FileSystemHandle:P,FileSystemWritableFileStream:p,getOriginPrivateDirectory:Z,showDirectoryPicker:k,showOpenFilePicker:K,showSaveFilePicker:Q},Symbol.toStringTag,{value:"Module"}));export{ue as a,ee as c,x as e};
|
@@ -1 +1 @@
|
|
1
|
-
import{c3 as a,c4 as c,ak as f,aS as s}from"./index.
|
1
|
+
import{c3 as a,c4 as c,ak as f,aS as s}from"./index.Ca6320CT.js";function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function l(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}function b(t,e){if(e&&(f(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(t)}export{y as _,u as a,l as b,i as c,b as d};
|
@@ -1 +1 @@
|
|
1
|
-
import{g as it}from"./index.CrcobIb0.js";function ot(k,u){for(var p=0;p<u.length;p++){const O=u[p];if(typeof O!="string"&&!Array.isArray(O)){for(const E in O)if(E!=="default"&&!(E in k)){const S=Object.getOwnPropertyDescriptor(O,E);S&&Object.defineProperty(k,E,S.get?S:{enumerable:!0,get:()=>O[E]})}}}return Object.freeze(Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}))}var Re={exports:{}};(function(k){(function(u){if(typeof window>"u")return;var p=!0,O=10,E="",S=0,D="",_=null,oe="",W=!1,Ne={resize:1,click:1},V=128,re=!0,P=1,U="bodyOffset",h=U,ae=!0,se="",R={},I=32,ce=null,J=!1,X=!1,H="[iFrameSizer]",ue=H.length,B="",le={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",fe=window.parent,A="*",K=0,j=!1,de=null,N=16,x=1,me="scroll",v=me,xe=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function C(e,t,n,i){e.addEventListener(t,n,ge?i||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function We(e){var t,n,i,a=null,f=0,m=function(){f=Date.now(),a=null,i=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();f||(f=d);var s=N-(d-f);return t=this,n=arguments,s<=0||s>N?(a&&(clearTimeout(a),a=null),f=d,i=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,s)),i}}function ye(e){return H+"["+B+"] "+e}function o(e){J&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){Be(),o("Initialising iFrame ("+window.location.href+")"),qe(),Ve(),te("background",E),te("padding",oe),Ye(),Te(),Me(),Ue(),Ge(),Qe(),Ee(),R=Ke(),L("init","Init message from host page"),G()}function Be(){function e(n){return n==="true"}var t=se.slice(ue).split(":");B=t[0],S=u===t[1]?S:Number(t[1]),W=u===t[2]?W:e(t[2]),J=u===t[3]?J:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],E=t[9],oe=t[10],K=u===t[11]?K:Number(t[11]),R.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function je(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function qe(){function e(){var n=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(je,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,A="targetOrigin"in n?n.targetOrigin:A,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,i){return typeof n=="function"&&(o("Setup custom "+i+"CalcMethod"),$[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),o("TargetOrigin for parent set to: "+A)}function _e(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,o("Body "+e+' set to "'+t+'"'))}function Ve(){u===D&&(D=S+"px"),te("margin",_e("margin",D))}function Ue(){document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function i(){L(e.eventName,e.eventType)}ee[n]=i,C(window,n,i,{passive:!0})},remove:function(n){var i=ee[n];delete ee[n],De(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,i){return t!==e&&(e in n||(T(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,U,M,"height")}function Me(){v=be(v,me,F,"width")}function Ee(){p===!0?(we("add"),$e()):o("Auto Resize disabled")}function Je(){_!==null&&_.disconnect()}function Xe(){we("remove"),Je(),clearInterval(ce)}function Ye(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Ke(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(s){var l=s.getBoundingClientRect(),c=e();return{x:parseInt(l.left,10)+parseInt(c.x,10),y:parseInt(l.top,10)+parseInt(c.y,10)}}function n(s){function l(b){var z=t(b);o("Moving to in page link (#"+c+") at x: "+z.x+" y: "+z.y),y(z.y,z.x,"scrollToOffset")}var c=s.split("#")[1]||s,r=decodeURIComponent(c),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(o("In page link (#"+c+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+c)):l(w)}function i(){var s=window.location.hash,l=window.location.href;s!==""&&s!=="#"&&n(l)}function a(){function s(l){function c(r){r.preventDefault(),n(this.getAttribute("href"))}l.getAttribute("href")!=="#"&&C(l,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),s)}function f(){C(window,"hashchange",i)}function m(){setTimeout(i,V)}function d(){Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),a(),f(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return R.enable?d():o("In page linking not enabled"),{findTarget:n}}function Qe(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,i){o("Add event listener: "+i),C(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){o("Enable public methods"),xe.parentIFrame={autoResize:function(t){return t===!0&&p===!1?(p=!0,Ee()):t===!1&&p===!0&&(p=!1,Xe()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return B},getPageInfo:function(t){typeof t=="function"?(Z=t,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(t){R.findTarget(t)},reset:function(){ze("parentIFrame.reset")},scrollTo:function(t,n){y(n,t,"scrollTo")},scrollToOffset:function(t,n){y(n,t,"scrollToOffset")},sendMessage:function(t,n){y(0,0,"message",JSON.stringify(t),n)},setHeightCalculationMethod:function(t){h=t,Te()},setWidthCalculationMethod:function(t){v=t,Me()},setTargetOrigin:function(t){o("Set targetOrigin: "+t),A=t},size:function(t,n){var i=""+(t||"")+(n?","+n:"");L("size","parentIFrame.size("+i+")",t,n)}}}function Oe(){I!==0&&(o("setInterval: "+I+"ms"),ce=setInterval(function(){L("interval","setInterval: "+I)},Math.abs(I)))}function Ze(){function e(r){function w(b){b.complete===!1&&(o("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",f,!1),s.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){s.splice(s.indexOf(r),1)}function n(r){o("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",f,!1),t(r)}function i(r,w,b){n(r.target),L(w,b+": "+r.target.src)}function a(r){i(r,"imageLoad","Image loaded")}function f(r){i(r,"imageLoadFailed","Image load failed")}function m(r){L("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return c=new l(m),o("Create body MutationObserver"),c.observe(r,w),c}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,c=d();return{disconnect:function(){"disconnect"in c&&(o("Disconnect body MutationObserver"),c.disconnect(),s.forEach(n))}}}function $e(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Oe():_=Ze():(o("MutationObserver not supported in this browser!"),Oe())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,O)}function et(e){e>N/2&&(N=2*e,o("Event throttle increased to "+N+"ms"))}function ie(e,t){for(var n=t.length,i=0,a=0,f=ve(e),m=Date.now(),d=0;d<n;d++)i=t[d].getBoundingClientRect()[e]+ne("margin"+f,t[d]),i>a&&(a=i);return m=Date.now()-m,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+m+"ms"),et(m),a}function q(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Se(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return i.length===0&&n(),ie(e,i)}function Ie(){return document.querySelectorAll("body *")}var M={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return M.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,q(M))},min:function(){return Math.min.apply(null,q(M))},grow:function(){return M.max()},lowestElement:function(){return Math.max(M.bodyOffset()||M.documentElementOffset(),ie("bottom",Ie()))},taggedElement:function(){return Se("bottom","data-iframe-height")}},F={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(F.bodyScroll(),F.documentElementScroll())},max:function(){return Math.max.apply(null,q(F))},min:function(){return Math.min.apply(null,q(F))},rightMostElement:function(){return ie("right",Ie())},taggedElement:function(){return Se("right","data-iframe-width")}};function Fe(e,t,n,i){function a(){P=c,x=r,y(P,x,e)}function f(){function w(b,z){var nt=Math.abs(b-z)<=K;return!nt}return c=u===n?M[h]():n,r=u===i?F[v]():i,w(P,c)||W&&w(x,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in le||W&&v in le}function s(){o("No change in size detected")}function l(){m()&&d()?ze(t):e in{interval:1}||s()}var c,r;f()||e==="init"?(Le(),a()):l()}var tt=We(Fe);function L(e,t,n,i){function a(){e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t)}function f(){return j&&e in Ne}f()?o("Trigger event cancelled: "+e):(a(),e==="init"?Fe(e,t,n,i):tt(e,t,n,i))}function Le(){j||(j=!0,o("Trigger event lock on")),clearTimeout(de),de=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},V)}function Ce(e){P=M[h](),x=F[v](),y(P,x,e)}function ze(e){var t=h;h=U,o("Reset trigger event: "+e),Le(),Ce("reset"),h=t}function y(e,t,n,i,a){function f(){u===a?a=A:o("Message targetOrigin: "+a)}function m(){var d=e+":"+t,s=B+":"+d+":"+n+(u===i?"":":"+i);o("Sending message to host page ("+s+")"),fe.postMessage(H+s,a)}f(),m()}function ke(e){var t={init:function(){se=e.data,fe=e.source,He(),re=!1,setTimeout(function(){ae=!1},V)},reset:function(){ae?o("Page reset ignored by init"):(o("Page size reset by host page"),Ce("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){R.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var c=a();o("PageInfoFromParent called from parent: "+c),Z(JSON.parse(c)),o(" --")},message:function(){var c=a();o("onMessage called from parent: "+c),Q(JSON.parse(c)),o(" --")}};function n(){return H===(""+e.data).slice(0,ue)}function i(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function f(){return!k.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function d(){var l=i();l in t?t[l]():!f()&&!m()&&T("Unexpected message ("+e.data+")")}function s(){re===!1?d():m()?t.init():o('Ignored message of type "'+i()+'". Received before initialization.')}n()&&s()}function Pe(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){ke({data:e,sameDomian:!0})},C(window,"message",ke),C(window,"readystatechange",Pe),Pe())})()})(Re);var Ae=Re.exports;const rt=it(Ae),st=ot({__proto__:null,default:rt},[Ae]);export{st as i};
|
1
|
+
import{g as it}from"./index.Ca6320CT.js";function ot(k,u){for(var p=0;p<u.length;p++){const O=u[p];if(typeof O!="string"&&!Array.isArray(O)){for(const E in O)if(E!=="default"&&!(E in k)){const S=Object.getOwnPropertyDescriptor(O,E);S&&Object.defineProperty(k,E,S.get?S:{enumerable:!0,get:()=>O[E]})}}}return Object.freeze(Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}))}var Re={exports:{}};(function(k){(function(u){if(typeof window>"u")return;var p=!0,O=10,E="",S=0,D="",_=null,oe="",W=!1,Ne={resize:1,click:1},V=128,re=!0,P=1,U="bodyOffset",h=U,ae=!0,se="",R={},I=32,ce=null,J=!1,X=!1,H="[iFrameSizer]",ue=H.length,B="",le={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",fe=window.parent,A="*",K=0,j=!1,de=null,N=16,x=1,me="scroll",v=me,xe=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function C(e,t,n,i){e.addEventListener(t,n,ge?i||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function We(e){var t,n,i,a=null,f=0,m=function(){f=Date.now(),a=null,i=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();f||(f=d);var s=N-(d-f);return t=this,n=arguments,s<=0||s>N?(a&&(clearTimeout(a),a=null),f=d,i=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,s)),i}}function ye(e){return H+"["+B+"] "+e}function o(e){J&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){Be(),o("Initialising iFrame ("+window.location.href+")"),qe(),Ve(),te("background",E),te("padding",oe),Ye(),Te(),Me(),Ue(),Ge(),Qe(),Ee(),R=Ke(),L("init","Init message from host page"),G()}function Be(){function e(n){return n==="true"}var t=se.slice(ue).split(":");B=t[0],S=u===t[1]?S:Number(t[1]),W=u===t[2]?W:e(t[2]),J=u===t[3]?J:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),D=t[7],h=u===t[8]?h:t[8],E=t[9],oe=t[10],K=u===t[11]?K:Number(t[11]),R.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function je(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function qe(){function e(){var n=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(je,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,A="targetOrigin"in n?n.targetOrigin:A,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,i){return typeof n=="function"&&(o("Setup custom "+i+"CalcMethod"),$[i]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),o("TargetOrigin for parent set to: "+A)}function _e(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,o("Body "+e+' set to "'+t+'"'))}function Ve(){u===D&&(D=S+"px"),te("margin",_e("margin",D))}function Ue(){document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function i(){L(e.eventName,e.eventType)}ee[n]=i,C(window,n,i,{passive:!0})},remove:function(n){var i=ee[n];delete ee[n],De(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,i){return t!==e&&(e in n||(T(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,U,M,"height")}function Me(){v=be(v,me,F,"width")}function Ee(){p===!0?(we("add"),$e()):o("Auto Resize disabled")}function Je(){_!==null&&_.disconnect()}function Xe(){we("remove"),Je(),clearInterval(ce)}function Ye(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Ke(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(s){var l=s.getBoundingClientRect(),c=e();return{x:parseInt(l.left,10)+parseInt(c.x,10),y:parseInt(l.top,10)+parseInt(c.y,10)}}function n(s){function l(b){var z=t(b);o("Moving to in page link (#"+c+") at x: "+z.x+" y: "+z.y),y(z.y,z.x,"scrollToOffset")}var c=s.split("#")[1]||s,r=decodeURIComponent(c),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(o("In page link (#"+c+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+c)):l(w)}function i(){var s=window.location.hash,l=window.location.href;s!==""&&s!=="#"&&n(l)}function a(){function s(l){function c(r){r.preventDefault(),n(this.getAttribute("href"))}l.getAttribute("href")!=="#"&&C(l,"click",c)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),s)}function f(){C(window,"hashchange",i)}function m(){setTimeout(i,V)}function d(){Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),a(),f(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return R.enable?d():o("In page linking not enabled"),{findTarget:n}}function Qe(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,i){o("Add event listener: "+i),C(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){o("Enable public methods"),xe.parentIFrame={autoResize:function(t){return t===!0&&p===!1?(p=!0,Ee()):t===!1&&p===!0&&(p=!1,Xe()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return B},getPageInfo:function(t){typeof t=="function"?(Z=t,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(t){R.findTarget(t)},reset:function(){ze("parentIFrame.reset")},scrollTo:function(t,n){y(n,t,"scrollTo")},scrollToOffset:function(t,n){y(n,t,"scrollToOffset")},sendMessage:function(t,n){y(0,0,"message",JSON.stringify(t),n)},setHeightCalculationMethod:function(t){h=t,Te()},setWidthCalculationMethod:function(t){v=t,Me()},setTargetOrigin:function(t){o("Set targetOrigin: "+t),A=t},size:function(t,n){var i=""+(t||"")+(n?","+n:"");L("size","parentIFrame.size("+i+")",t,n)}}}function Oe(){I!==0&&(o("setInterval: "+I+"ms"),ce=setInterval(function(){L("interval","setInterval: "+I)},Math.abs(I)))}function Ze(){function e(r){function w(b){b.complete===!1&&(o("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",f,!1),s.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){s.splice(s.indexOf(r),1)}function n(r){o("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",f,!1),t(r)}function i(r,w,b){n(r.target),L(w,b+": "+r.target.src)}function a(r){i(r,"imageLoad","Image loaded")}function f(r){i(r,"imageLoadFailed","Image load failed")}function m(r){L("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return c=new l(m),o("Create body MutationObserver"),c.observe(r,w),c}var s=[],l=window.MutationObserver||window.WebKitMutationObserver,c=d();return{disconnect:function(){"disconnect"in c&&(o("Disconnect body MutationObserver"),c.disconnect(),s.forEach(n))}}}function $e(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Oe():_=Ze():(o("MutationObserver not supported in this browser!"),Oe())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,O)}function et(e){e>N/2&&(N=2*e,o("Event throttle increased to "+N+"ms"))}function ie(e,t){for(var n=t.length,i=0,a=0,f=ve(e),m=Date.now(),d=0;d<n;d++)i=t[d].getBoundingClientRect()[e]+ne("margin"+f,t[d]),i>a&&(a=i);return m=Date.now()-m,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+m+"ms"),et(m),a}function q(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Se(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var i=document.querySelectorAll("["+t+"]");return i.length===0&&n(),ie(e,i)}function Ie(){return document.querySelectorAll("body *")}var M={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return M.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,q(M))},min:function(){return Math.min.apply(null,q(M))},grow:function(){return M.max()},lowestElement:function(){return Math.max(M.bodyOffset()||M.documentElementOffset(),ie("bottom",Ie()))},taggedElement:function(){return Se("bottom","data-iframe-height")}},F={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(F.bodyScroll(),F.documentElementScroll())},max:function(){return Math.max.apply(null,q(F))},min:function(){return Math.min.apply(null,q(F))},rightMostElement:function(){return ie("right",Ie())},taggedElement:function(){return Se("right","data-iframe-width")}};function Fe(e,t,n,i){function a(){P=c,x=r,y(P,x,e)}function f(){function w(b,z){var nt=Math.abs(b-z)<=K;return!nt}return c=u===n?M[h]():n,r=u===i?F[v]():i,w(P,c)||W&&w(x,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in le||W&&v in le}function s(){o("No change in size detected")}function l(){m()&&d()?ze(t):e in{interval:1}||s()}var c,r;f()||e==="init"?(Le(),a()):l()}var tt=We(Fe);function L(e,t,n,i){function a(){e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t)}function f(){return j&&e in Ne}f()?o("Trigger event cancelled: "+e):(a(),e==="init"?Fe(e,t,n,i):tt(e,t,n,i))}function Le(){j||(j=!0,o("Trigger event lock on")),clearTimeout(de),de=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},V)}function Ce(e){P=M[h](),x=F[v](),y(P,x,e)}function ze(e){var t=h;h=U,o("Reset trigger event: "+e),Le(),Ce("reset"),h=t}function y(e,t,n,i,a){function f(){u===a?a=A:o("Message targetOrigin: "+a)}function m(){var d=e+":"+t,s=B+":"+d+":"+n+(u===i?"":":"+i);o("Sending message to host page ("+s+")"),fe.postMessage(H+s,a)}f(),m()}function ke(e){var t={init:function(){se=e.data,fe=e.source,He(),re=!1,setTimeout(function(){ae=!1},V)},reset:function(){ae?o("Page reset ignored by init"):(o("Page size reset by host page"),Ce("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){R.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var c=a();o("PageInfoFromParent called from parent: "+c),Z(JSON.parse(c)),o(" --")},message:function(){var c=a();o("onMessage called from parent: "+c),Q(JSON.parse(c)),o(" --")}};function n(){return H===(""+e.data).slice(0,ue)}function i(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function f(){return!k.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function d(){var l=i();l in t?t[l]():!f()&&!m()&&T("Unexpected message ("+e.data+")")}function s(){re===!1?d():m()?t.init():o('Ignored message of type "'+i()+'". Received before initialization.')}n()&&s()}function Pe(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){ke({data:e,sameDomian:!0})},C(window,"message",ke),C(window,"readystatechange",Pe),Pe())})()})(Re);var Ae=Re.exports;const rt=it(Ae),st=ot({__proto__:null,default:rt},[Ae]);export{st as i};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as a,bl as S,i as x,R as p,aA as f,b$ as g,j as i,c0 as m,aB as $,av as T}from"./index.
|
1
|
+
import{n as a,bl as S,i as x,R as p,aA as f,b$ as g,j as i,c0 as m,aB as $,av as T}from"./index.Ca6320CT.js";const b=a(S,{shouldForwardProp:x,target:"e1ira7tx0"})(({theme:e,usingCustomTheme:s})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:s?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),h=a("div",{target:"e1ira7tx1"})(({theme:e,width:s,cache:t})=>({width:s,...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),C=a("div",{target:"e1ira7tx2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=a("div",{target:"e1ira7tx3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),z=e=>{const s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;if(s===0&&t===0)return`(${n.toFixed(1)} seconds)`;if(s===0){const l=`${t} minute${t===1?"":"s"}`,d=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${l}${d})`}const o=`${s} hour${s===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${o}${r}${c})`};function v({width:e,element:s}){const{activeTheme:t}=p.useContext(f),n=!g(t),{cache:o,showTime:r}=s,[c,l]=p.useState(0);return p.useEffect(()=>{if(!r)return;const d=setInterval(()=>{l(u=>u+.1)},100);return()=>clearInterval(d)},[r]),i(h,{className:m({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:e,cache:o,children:$(y,{children:[i(b,{usingCustomTheme:n}),i(T,{source:s.text,allowHTML:!1}),r&&i(C,{children:z(c)})]})})}export{v as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as L,r as i,ae as V,bX as O,bY as k,ap as H,aB as $,j as l,bq as N,bD as E,br as A,ba as D,bs as F,bW as U,bZ as j,bS as G,bB as K,b_ as Y}from"./index.
|
1
|
+
import{n as L,r as i,ae as V,bX as O,bY as k,ap as H,aB as $,j as l,bq as N,bD as E,br as A,ba as D,bs as F,bW as U,bZ as j,bS as G,bB as K,b_ as Y}from"./index.Ca6320CT.js";import{a as _}from"./useBasicWidgetState.DY0Kwuur.js";import"./FormClearHelper.BP4f-wKq.js";const X=L("div",{target:"euzcfsp0"})(({theme:n})=>({"span[aria-disabled='true']":{background:n.colors.fadedText05}})),q=(n,t)=>n.getIntArrayValue(t),Z=n=>n.default??null,J=n=>n.value??null,Q=(n,t,a,u)=>{t.setIntArrayValue(n,a.value,{fromUi:a.fromUi},u)},ee=n=>{var y;const{element:t,widgetMgr:a,width:u,fragmentId:v}=n,e=V(),[o,g]=_({getStateFromWidgetMgr:q,getDefaultStateFromProto:Z,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:a,fragmentId:v}),m=t.maxSelections>0&&o.length>=t.maxSelections,x=i.useMemo(()=>{if(t.maxSelections===0)return"No results";if(o.length===t.maxSelections){const s=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${s}. Remove an option first.`}return"No results"},[t.maxSelections,o.length]),z=i.useMemo(()=>o.map(s=>{const r=t.options[s];return{value:s.toString(),label:r}}),[t.options,o]),h=i.useCallback(s=>{const r=()=>{var d;const p=(d=s.option)==null?void 0:d.value;return parseInt(p,10)};switch(s.type){case"remove":return O(o,r());case"clear":return[];case"select":return o.concat([r()]);default:throw new Error(`State transition is unknown: ${s.type}`)}},[o]),w=i.useCallback(s=>{t.maxSelections&&s.type==="select"&&o.length>=t.maxSelections||g({value:h(s),fromUi:!0})},[t.maxSelections,h,g,o.length]),I=i.useCallback((s,r)=>{if(m)return[];const p=s.filter(d=>!o.includes(Number(d.value)));return k(p,r)},[m,o]),R={width:u},{options:c}=t,b=c.length===0?!0:n.disabled,M=c.length===0?"No options to select.":t.placeholder,T=c.map((s,r)=>({label:s,value:r.toString()})),W=c.length>10,[S,P]=i.useState(0),[f,C]=i.useState(!1),B=i.useCallback(()=>f?S:!o||o.length===0?0:o[o.length-1]*H(e.sizes.dropdownItemHeight),[o,f,S,e.sizes.dropdownItemHeight]);return $("div",{className:"stMultiSelect","data-testid":"stMultiSelect",style:R,children:[l(F,{label:t.label,disabled:b,labelVisibility:N((y=t.labelVisibility)==null?void 0:y.value),children:t.help&&l(E,{children:l(A,{content:t.help,placement:D.TOP_RIGHT})})}),l(X,{children:l(U,{options:T,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:M,type:j.select,multi:!0,onChange:w,value:z,disabled:b,size:"compact",noResultsMsg:x,filterOptions:I,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:G,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,cursor:"pointer",":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})`,cursor:"default !important"}},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:K&&W===!1?"readonly":null}},Dropdown:{component:Y,props:{$menuListProps:{initialScrollOffset:B(),onScroll:s=>{C(!0),P(s)}}}}}})})]})},ne=i.memo(ee);export{ne as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as t,D as d,j as c,b2 as l,b3 as g,A as e}from"./index.
|
1
|
+
import{n as t,D as d,j as c,b2 as l,b3 as g,A as e}from"./index.Ca6320CT.js";const f=t("iframe",{target:"e1q9bkxk0"})(({theme:o,disableScrolling:n})=>({colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:n?"hidden":void 0}));function F({element:o,width:n}){const i=o.hasWidth?o.width:n,r=s(o.src),a=d(r)?void 0:s(o.srcdoc);return c(f,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:a,width:i,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:g,title:"st.iframe"})}function s(o){return e(o)||o===""?void 0:o}export{F as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as U,r as s,bh as V,j as l}from"./index.
|
1
|
+
import{n as U,r as s,bh as V,j as l}from"./index.Ca6320CT.js";const P=U("iframe",{target:"eymnmwl0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),R=528;function w({element:a,width:f,endpoints:m,elementMgr:c}){const i=s.useRef(null),{type:E,url:p,startTime:n,subtitles:y,endTime:d,loop:u,autoplay:T,muted:h}=a,S=s.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);s.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),s.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),s.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const o=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",o),()=>{e&&d>0&&e.removeEventListener("timeupdate",o)}},[d,u,n]),s.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const g=e=>{const{startTime:t,endTime:o,loop:L,autoplay:N,muted:b}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),o&&!isNaN(o)&&r.searchParams.append("end",o.toString()),L){r.searchParams.append("loop","1");const v=r.pathname.split("/").pop();v&&r.searchParams.append("playlist",v)}return N&&r.searchParams.append("autoplay","1"),b&&r.searchParams.append("mute","1"),r.toString()};return E===V.Type.YOUTUBE_IFRAME?l(P,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?R:void 0},crossOrigin:void 0,children:y&&y.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}export{w as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as s,E as W,_ as $,n as d,ay as L,ae as V,j as a,aB as D,bn as K}from"./index.
|
1
|
+
import{r as s,E as W,_ as $,n as d,ay as L,ae as V,j as a,aB as D,bn as K}from"./index.Ca6320CT.js";import{I as N}from"./InputInstructions.6chqAOMM.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as q}from"./textarea.B9cq_go8.js";import"./base-input.DIQMGXMv.js";var w=s.forwardRef(function(t,e){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(W,$({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("rect",{width:24,height:24,fill:"none"}),s.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});w.displayName="Send";const j=d("div",{target:"e1qzcwc60"})(({theme:t,width:e})=>({borderRadius:t.radii.xxxl,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${e}px`})),A=d("div",{target:"e1qzcwc61"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.xxxl,display:"flex",alignItems:"center"})),M=d("button",{target:"e1qzcwc62"})(({theme:t,disabled:e,extended:l})=>{const u=L(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:l?"0":t.radii.xxxl,borderTopLeftRadius:l?t.radii.default:"0",borderBottomRightRadius:t.radii.xxxl,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),F=d("div",{target:"e1qzcwc63"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),G=d("div",{target:"e1qzcwc64"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),U=6.5,H=1;function Z({width:t,element:e,widgetMgr:l,fragmentId:u}){const o=V(),[g,h]=s.useState(!1),[p,f]=s.useState(e.default),[x,y]=s.useState(0),i=s.useRef(null),b=s.useRef({minHeight:0,maxHeight:0}),R=()=>{let r=0;const{current:n}=i;if(n){const c=n.placeholder;n.placeholder="",n.style.height="auto",r=n.scrollHeight,n.placeholder=c,n.style.height=""}return r},C=()=>{i.current&&i.current.focus(),p&&(l.setStringTriggerValue(e,p,{fromUi:!0},u),h(!1),f(""),y(0))},E=r=>{const{metaKey:n,ctrlKey:c,shiftKey:T}=r;_(r)&&!T&&!c&&!n&&(r.preventDefault(),C())},z=r=>{const{value:n}=r.target,{maxChars:c}=e;c!==0&&n.length>c||(h(n!==""),f(n),y(R()))};s.useEffect(()=>{if(e.setValue){e.setValue=!1;const r=e.value||"";f(r),h(r!=="")}},[e]),s.useEffect(()=>{if(i.current){const{offsetHeight:r}=i.current;b.current.minHeight=r,b.current.maxHeight=r*U}},[i]);const{disabled:I,placeholder:m,maxChars:B}=e,{minHeight:k,maxHeight:S}=b.current,v=x>0&&i.current?Math.abs(x-k)>H:!1;return a(j,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(A,{children:[a(q,{inputRef:i,value:p,placeholder:m,onChange:z,onKeyDown:E,"aria-label":m,disabled:I,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderRadius:o.radii.xxxl,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${x+H}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&a(G,{children:a(N,{dirty:g,value:p,maxLength:B,type:"chat",inForm:!1})}),a(F,{children:a(M,{onClick:C,disabled:!g||I,extended:v,"data-testid":"stChatInputSubmitButton",children:a(K,{content:w,size:"xl",color:"inherit"})})})]})})}export{Z as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as p,aN as T,r as s,aB as x,j as r,aO as v,av as h,aP as e,aQ as k,aR as R,F as z,ay as L}from"./index.
|
1
|
+
import{n as p,aN as T,r as s,aB as x,j as r,aO as v,av as h,aP as e,aQ as k,aR as R,F as z,ay as L}from"./index.Ca6320CT.js";const B=p("button",{target:"e1rpgzpk0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"e1rpgzpk1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),m=p("div",{target:"e1rpgzpk3"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function E(o){const t=L(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:t?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:t?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function D(o){if(o.length>104){let a=o.replace(/^(.{104}[^\s]*).*/,"$1");return a.length>104&&(a=a.substring(0,104).split(" ").slice(0,-1).join(" ")),a.trim()}return o}function H({theme:o,body:t,icon:a,width:y}){const n=D(t),d=t!==n,[i,b]=s.useState(!d),[u,w]=s.useState(0),f=s.useCallback(()=>{b(!i)},[i]),c=s.useMemo(()=>E(o),[o]),l=s.useMemo(()=>x(C,{expanded:i,children:[a&&r(v,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),x(m,{children:[r(h,{source:i?t:n,allowHTML:!1,isToast:!0}),d&&r(B,{"data-testid":"stToastViewButton",onClick:f,children:i?"view less":"view more"})]})]}),[d,i,t,a,n,f]);s.useEffect(()=>{if(o.inSidebar)return;const g=e.info(l,{overrides:{...c}});return w(g),()=>{e.update(g,{overrides:{Body:{style:{transitionDuration:0}}}}),e.clear(g)}},[]),s.useEffect(()=>{e.update(u,{children:l,overrides:{...c}})},[u,l,c]);const S=r(R,{kind:k.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information.",width:y});return r(z,{children:o.inSidebar&&S})}const M=T(H);export{M as default};
|