streamlit-nightly 1.53.2.dev20260131__py3-none-any.whl → 1.53.2.dev20260202__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/commands/execution_control.py +2 -2
- streamlit/delta_generator.py +2 -0
- streamlit/elements/lib/column_types.py +6 -2
- streamlit/elements/lib/utils.py +6 -6
- streamlit/elements/markdown.py +0 -1
- streamlit/elements/metric.py +2 -1
- streamlit/elements/widgets/button_group.py +6 -276
- streamlit/elements/widgets/feedback.py +322 -0
- streamlit/elements/widgets/number_input.py +2 -1
- streamlit/elements/widgets/slider.py +2 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/AudioInput_pb2.py +4 -4
- streamlit/proto/AudioInput_pb2.pyi +3 -3
- streamlit/proto/Audio_pb2.py +2 -2
- streamlit/proto/BackMsg_pb2.pyi +2 -10
- streamlit/proto/Balloons_pb2.pyi +0 -2
- streamlit/proto/Block_pb2.py +35 -35
- streamlit/proto/ButtonGroup_pb2.py +10 -12
- streamlit/proto/ButtonGroup_pb2.pyi +6 -41
- streamlit/proto/Button_pb2.py +2 -2
- streamlit/proto/CameraInput_pb2.py +4 -4
- streamlit/proto/CameraInput_pb2.pyi +3 -3
- streamlit/proto/ChatInput_pb2.py +2 -2
- streamlit/proto/Checkbox_pb2.py +6 -6
- streamlit/proto/Checkbox_pb2.pyi +3 -3
- streamlit/proto/Code_pb2.py +2 -2
- streamlit/proto/ColorPicker_pb2.py +4 -4
- streamlit/proto/ColorPicker_pb2.pyi +3 -3
- streamlit/proto/Common_pb2.py +6 -6
- streamlit/proto/DateInput_pb2.py +4 -4
- streamlit/proto/DateInput_pb2.pyi +3 -3
- streamlit/proto/DateTimeInput_pb2.py +4 -4
- streamlit/proto/DateTimeInput_pb2.pyi +3 -3
- streamlit/proto/DeckGlJsonChart_pb2.py +2 -2
- streamlit/proto/Delta_pb2.py +2 -2
- streamlit/proto/DocString_pb2.py +1 -1
- streamlit/proto/Element_pb2.py +4 -4
- streamlit/proto/Element_pb2.pyi +9 -9
- streamlit/proto/Feedback_pb2.py +28 -0
- streamlit/proto/Feedback_pb2.pyi +93 -0
- streamlit/proto/FileUploader_pb2.py +4 -4
- streamlit/proto/FileUploader_pb2.pyi +3 -3
- streamlit/proto/ForwardMsg_pb2.py +8 -8
- streamlit/proto/GraphVizChart_pb2.py +2 -2
- streamlit/proto/IFrame_pb2.py +3 -3
- streamlit/proto/Image_pb2.py +4 -4
- streamlit/proto/Image_pb2.pyi +1 -7
- streamlit/proto/{BokehChart_pb2.py → LabelVisibility_pb2.py} +7 -5
- streamlit/proto/{LabelVisibilityMessage_pb2.pyi → LabelVisibility_pb2.pyi} +14 -14
- streamlit/proto/Markdown_pb2.py +4 -4
- streamlit/proto/Markdown_pb2.pyi +1 -5
- streamlit/proto/Metric_pb2.py +10 -10
- streamlit/proto/Metric_pb2.pyi +3 -3
- streamlit/proto/MultiSelect_pb2.py +4 -4
- streamlit/proto/MultiSelect_pb2.pyi +3 -3
- streamlit/proto/NewSession_pb2.py +38 -26
- streamlit/proto/NewSession_pb2.pyi +42 -8
- streamlit/proto/NumberInput_pb2.py +6 -6
- streamlit/proto/NumberInput_pb2.pyi +3 -3
- streamlit/proto/PlotlyChart_pb2.py +2 -2
- streamlit/proto/Radio_pb2.py +4 -4
- streamlit/proto/Radio_pb2.pyi +3 -3
- streamlit/proto/Selectbox_pb2.py +4 -4
- streamlit/proto/Selectbox_pb2.pyi +3 -6
- streamlit/proto/Slider_pb2.py +8 -8
- streamlit/proto/Slider_pb2.pyi +3 -3
- streamlit/proto/Snow_pb2.pyi +0 -2
- streamlit/proto/TextArea_pb2.py +4 -4
- streamlit/proto/TextArea_pb2.pyi +3 -3
- streamlit/proto/TextInput_pb2.py +6 -6
- streamlit/proto/TextInput_pb2.pyi +3 -3
- streamlit/proto/TimeInput_pb2.py +4 -4
- streamlit/proto/TimeInput_pb2.pyi +3 -3
- streamlit/proto/Video_pb2.py +2 -2
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +324 -309
- streamlit/static/static/css/{index.BUP6fTcR.css → index.C8MrxwGF.css} +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.DC6KVDKK.js → ErrorOutline.esm.CLuz0rSD.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.Z9hRQIHi.js → FileDownload.esm.CO68LcnZ.js} +1 -1
- streamlit/static/static/js/{FileHelper.DqvW90pm.js → FileHelper.DAXgY6Ug.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DTFnX0js.js → FormClearHelper.zxJ53Nym.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CdzsN_Va.js → InputInstructions.CCbg8esE.js} +1 -1
- streamlit/static/static/js/{Particles.12xFSjcn.js → Particles.BJw0A-zv.js} +1 -1
- streamlit/static/static/js/{ProgressBar.Dg-oMbWg.js → ProgressBar.BrrHeAEh.js} +2 -2
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.rbzmcipw.js → StreamlitSyntaxHighlighter.DvPLy3zk.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.CzJtGIR-.js → TableChart.esm.BawvAi5p.js} +1 -1
- streamlit/static/static/js/{Toolbar.COH7NaOE.js → Toolbar.CbpscbNb.js} +1 -1
- streamlit/static/static/js/{WidgetLabelHelpIconInline.Dlc8f0Ji.js → WidgetLabelHelpIconInline.DA4S2HFP.js} +1 -1
- streamlit/static/static/js/{base-input.Q-zJLgRK.js → base-input.BKKl2eBF.js} +1 -1
- streamlit/static/static/js/{checkbox.BKgWNdeI.js → checkbox.CB43AKV4.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.6oO-YlYv.js → createDownloadLinkElement.jVwF96ey.js} +1 -1
- streamlit/static/static/js/data-grid-overlay-editor.CxQizSv7.js +1 -0
- streamlit/static/static/js/{downloader.BBXcXdX1.js → downloader.CKlIgsy5.js} +1 -1
- streamlit/static/static/js/{embed.CJzOXYBF.js → embed.BhRb_2n8.js} +1 -1
- streamlit/static/static/js/{es6.CdxPQzwJ.js → es6.DPyfPmWm.js} +2 -2
- streamlit/static/static/js/formatNumber.DtfMnnPx.js +1 -0
- streamlit/static/static/js/{iconPosition.BVScIr6G.js → iconPosition.DkZAlu_k.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.D_QHVqPM.js → iframeResizer.contentWindow.l5sQWLra.js} +1 -1
- streamlit/static/static/js/{index.CxoREvnF.js → index.465nmxtO.js} +2 -2
- streamlit/static/static/js/{index.BqbKiDp2.js → index.6J1N4is3.js} +1 -1
- streamlit/static/static/js/{index.CrY1BsL3.js → index.AZ9T4EqJ.js} +1 -1
- streamlit/static/static/js/{index.6DFY6LUF.js → index.BAK0CG1Q.js} +1 -1
- streamlit/static/static/js/{index.BxQxTpWl.js → index.BLD3tJ2C.js} +1 -1
- streamlit/static/static/js/{index.BQnLeHnr.js → index.BUlT_mOL.js} +3 -3
- streamlit/static/static/js/{index.Dud7RRHc.js → index.Bc_FQ4Wb.js} +1 -1
- streamlit/static/static/js/{index.DRoJNzFX.js → index.BpCj2-sQ.js} +1 -1
- streamlit/static/static/js/{index.BED2_zc7.js → index.BzO83wKm.js} +1 -1
- streamlit/static/static/js/index.CAoX2tlo.js +2 -0
- streamlit/static/static/js/{index.bQJYmJ2T.js → index.CBbYMKZp.js} +1 -1
- streamlit/static/static/js/{index.DyfvmNCy.js → index.CL7it7tU.js} +1 -1
- streamlit/static/static/js/{index.BDtN2n7T.js → index.CL_icBXS.js} +1 -1
- streamlit/static/static/js/{index.DAnczAW2.js → index.C_19KWNs.js} +1 -1
- streamlit/static/static/js/index.CaU3Uv_L.js +1 -0
- streamlit/static/static/js/{index.B80gSxrS.js → index.Ccye_uLl.js} +1 -1
- streamlit/static/static/js/{index.YULCxEtm.js → index.CiS4giQ2.js} +1 -1
- streamlit/static/static/js/{index.iXh5nbLZ.js → index.Ck64OQhV.js} +1 -1
- streamlit/static/static/js/{index.D9v2Y8Gk.js → index.CmbqbRMZ.js} +1 -1
- streamlit/static/static/js/{index.DAfIQKfP.js → index.CsEZTo6L.js} +2 -2
- streamlit/static/static/js/{index.BtOoVQt7.js → index.CsIENsKH.js} +1 -1
- streamlit/static/static/js/{index.CUYi3FrD.js → index.Cwg8nWw5.js} +1 -1
- streamlit/static/static/js/{index.GieKl4BG.js → index.D83azq2w.js} +1 -1
- streamlit/static/static/js/{index.CvtybR-u.js → index.DDr-BLbJ.js} +1 -1
- streamlit/static/static/js/{index.CBE2cIbj.js → index.DKoJr0Se.js} +1 -1
- streamlit/static/static/js/{index.DyXcT2tD.js → index.DL_ywOgf.js} +2 -2
- streamlit/static/static/js/{index.BiCbrx53.js → index.DR6V0uBJ.js} +1 -1
- streamlit/static/static/js/index.DZOGT9vX.js +1 -0
- streamlit/static/static/js/{index.BSpYHDvk.js → index.Dac9Jib-.js} +1 -1
- streamlit/static/static/js/{index.DCe7fo-m.js → index.DiBeetOH.js} +1 -1
- streamlit/static/static/js/{index.DrcbvB2t.js → index.DjuMEZ6m.js} +1 -1
- streamlit/static/static/js/{index.DU68jVpM.js → index.DmWUXdjc.js} +5 -5
- streamlit/static/static/js/{index._1zqETQ9.js → index.DpSc4e1j.js} +1 -1
- streamlit/static/static/js/{index.Biyf9aUg.js → index.DzdPUxsx.js} +2 -2
- streamlit/static/static/js/{index.C5oqIM3a.js → index.FioS1Y9m.js} +1 -1
- streamlit/static/static/js/{index.DZmBuE3z.js → index.L9pOjBEn.js} +3 -3
- streamlit/static/static/js/{index.DAyGxxdm.js → index.LjqoQCm5.js} +3 -3
- streamlit/static/static/js/{index.mSdC1FV6.js → index.OizPL4jg.js} +1 -1
- streamlit/static/static/js/{index.BSYebegS.js → index.Q2t_iBn0.js} +1 -1
- streamlit/static/static/js/index.WIMtx3m0.js +2 -0
- streamlit/static/static/js/index.Y9wPTZIf.js +1 -0
- streamlit/static/static/js/{index.BqxwnMem.js → index.YutgmD9x.js} +2 -2
- streamlit/static/static/js/{index.nL1fkE1D.js → index.b_f-McZ5.js} +1 -1
- streamlit/static/static/js/{index.y-pa6LIX.js → index.e6Ry6-Ft.js} +1 -1
- streamlit/static/static/js/index.hnu9U-5g.js +1 -0
- streamlit/static/static/js/{index.D6OexhdL.js → index.rvbQETlC.js} +1 -1
- streamlit/static/static/js/index.w7yKy9fh.js +6 -0
- streamlit/static/static/js/{index.BxMkW82k.js → index.y0h42OXL.js} +1 -1
- streamlit/static/static/js/{index.CPc_uZux.js → index.y5HxPwg9.js} +42 -42
- streamlit/static/static/js/{index.DNfyKqhQ.js → index.yHLCvUGh.js} +1 -1
- streamlit/static/static/js/{input.BcC6sPE_.js → input.CAtwSQ27.js} +1 -1
- streamlit/static/static/js/{main.TU5_aabd.js → main.VeMVx6VI.js} +1 -1
- streamlit/static/static/js/{memory.By_OTlI4.js → memory.CxS_lIUn.js} +1 -1
- streamlit/static/static/js/number-overlay-editor.CoqRgZW_.js +9 -0
- streamlit/static/static/js/{pandasStylerUtils.3IiIKU9-.js → pandasStylerUtils.DGWgd5sM.js} +1 -1
- streamlit/static/static/js/{sandbox.DnxTbWzV.js → sandbox.2mSqEau0.js} +1 -1
- streamlit/static/static/js/sprintfjs.CsoVVZ9k.js +1 -0
- streamlit/static/static/js/{styled-components.BeEcZ0vW.js → styled-components.BShfh7J8.js} +1 -1
- streamlit/static/static/js/{throttle.emUyC44c.js → throttle.Fq1DQK4p.js} +1 -1
- streamlit/static/static/js/{timepicker.DZ_ZufYF.js → timepicker.DmyY-qtn.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DDV1bN1-.js → toConsumableArray.Dvd9AIqV.js} +1 -1
- streamlit/static/static/js/uniqueId.CCajdEK8.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.DvpdEDYZ.js → useBasicWidgetState.COLQ5AFB.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.BBDLbTq9.js → useIntlLocale.kdIj0ego.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.BIApLJKn.js → useTextInputAutoExpand.DkuG1C1S.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.DQ4RuJNC.js → useUpdateUiValue.-UI_JsjT.js} +1 -1
- streamlit/static/static/js/{useWaveformController.B0olyXLQ.js → useWaveformController.C5PTwL6I.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.DYeqePuh.js → withCalculatedWidth.BREyS0pJ.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DtkUCO_d.js → withFullScreenWrapper.DYDiEOrW.js} +1 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.CnH1S47a.woff2 +0 -0
- streamlit/testing/v1/app_test.py +21 -5
- streamlit/testing/v1/element_tree.py +65 -2
- {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/RECORD +175 -173
- streamlit/proto/BokehChart_pb2.pyi +0 -56
- streamlit/proto/LabelVisibilityMessage_pb2.py +0 -28
- streamlit/static/static/js/data-grid-overlay-editor.CO0xdNiG.js +0 -1
- streamlit/static/static/js/formatNumber.DB5irY8c.js +0 -1
- streamlit/static/static/js/index.BBTKOM0z.js +0 -6
- streamlit/static/static/js/index.CE2WIFD1.js +0 -2
- streamlit/static/static/js/index.Cpu2p5bH.js +0 -1
- streamlit/static/static/js/index.CtbETWQK.js +0 -2
- streamlit/static/static/js/index.DhRAGiPR.js +0 -1
- streamlit/static/static/js/index.tuFFlbxa.js +0 -1
- streamlit/static/static/js/number-overlay-editor.FSRaRpbU.js +0 -9
- streamlit/static/static/js/sprintf.DpPCfzXw.js +0 -1
- streamlit/static/static/js/uniqueId.DTwvAE-J.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.C7IFxh57.woff2 +0 -0
- {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.53.2.dev20260131.dist-info → streamlit_nightly-1.53.2.dev20260202.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as f,
|
|
1
|
+
import{W as f,a8 as p,B as i,r as l,u as h,j as o,a as S,b as F,c as I,D as R,d as C,a9 as M}from"./index.y5HxPwg9.js";import{aa as D}from"./index.y5HxPwg9.js";import{m as x}from"./iconPosition.DkZAlu_k.js";import{F as E,u as O}from"./FormClearHelper.zxJ53Nym.js";function y(a){const{disabled:d,element:t,widgetMgr:e,fragmentId:u}=a,{formId:s}=t,m=t.shortcut?t.shortcut:void 0,{formsData:B}=f(p),b=B.formsWithUploads.has(s);let n=i.SECONDARY_FORM_SUBMIT;t.type==="primary"?n=i.PRIMARY_FORM_SUBMIT:t.type==="tertiary"&&(n=i.TERTIARY_FORM_SUBMIT);const r=d||b;l.useEffect(()=>(e.addSubmitButton(s,t),()=>e.removeSubmitButton(s,t)),[e,s,t]);const c=l.useCallback(()=>{r||e.submitForm(t.formId,u,t)},[r,e,t,u]);return h({shortcut:m,disabled:r,onActivate:c}),o(C,{className:"stFormSubmitButton","data-testid":"stFormSubmitButton",children:o(S,{help:t.help,containerWidth:!0,children:o(F,{kind:n,size:I.SMALL,containerWidth:!0,disabled:r,onClick:c,children:o(R,{icon:t.icon,iconPosition:x(t.iconPosition),label:t.label,shortcut:m})})})})}function _(a){return o(M,{children:o(y,{...a})})}export{E as FormClearHelper,y as FormSubmitButton,_ as FormSubmitContent,D as default,O as useFormClearHelper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as i,a3 as m,r as c,j as n,
|
|
1
|
+
import{z as i,a3 as m,r as c,j as n,b4 as p}from"./index.y5HxPwg9.js";import{P as d,R as f}from"./Particles.BJw0A-zv.js";const g=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,B=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,h=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,L=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,u=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,x=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,t=300,e=121,s=20,A=80,_=1e3,b=m("from{transform:translateY(calc(100vh + ",t,"px));}to{transform:translateY(0);}"),I=i("img",{target:"e19msdho0"})(({theme:o})=>({position:"fixed",top:`${-t}px`,marginLeft:`${-e/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(A-s)+s}vw`,animationDelay:`${Math.random()*_}ms`,height:`${t}px`,width:`${e}px`,pointerEvents:"none",animationDuration:"750ms",animationName:b,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),M=30,l=[g,B,h,L,u,x],w=l.length,E=({particleType:o,resourceCrossOriginMode:r})=>{const a=l[o];return n(I,{src:a,crossOrigin:p(r,a)})},N=({scriptRunId:o})=>n(f,{children:n(d,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:w,numParticles:M,ParticleComponent:E})}),P=c.memo(N);export{M as NUM_BALLOONS,P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as f,r as s,l as v,o as x,j as i,Y as m,q as L,Z as r,$ as R,m as C,n as k,a0 as z,a1 as B}from"./index.
|
|
1
|
+
import{z as f,r as s,l as v,o as x,j as i,Y as m,q as L,Z as r,$ as R,m as C,n as k,a0 as z,a1 as B}from"./index.y5HxPwg9.js";const E=f("button",{target:"e1a81sb30"})(({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}})),H=f("div",{target:"e1a81sb31"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),D=f("div",{target:"e1a81sb32"})(({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 M(o){const a=C(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:o.colors.bgColor,filter:a?"brightness(0.98)":"brightness(1.2)",color:o.colors.bodyText,boxShadow:o.shadows.popover}},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 I(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function j({element:o}){const{body:a,icon:t,duration:d}=o,n=v(),c=I(a),l=a!==c,[e,T]=s.useState(!l),[b,w]=s.useState(0),y=s.useCallback(()=>{T(!e)},[e]),g=s.useMemo(()=>M(n),[n]),p=s.useMemo(()=>x(H,{expanded:e,children:[t&&i(m,{iconValue:t,size:"xl",testid:"stToastDynamicIcon"}),x(D,{children:[i(L,{source:e?a:c,allowHTML:!1,isToast:!0}),l&&i(E,{"data-testid":"stToastViewButton",onClick:y,children:e?"view less":"view more"})]})]}),[l,e,a,t,c,y]);s.useEffect(()=>{if(n.inSidebar)return;const h=k(d)?d===0?0:d*1e3:4e3,u=r.info(p,{overrides:{...g},autoHideDuration:h});return w(u),()=>{r.update(u,{overrides:{Body:{style:{display:"none"}}}}),r.clear(u)}},[]),s.useEffect(()=>{r.update(b,{children:p,overrides:{...g}})},[b,p,g]);const S=i(B,{kind:z.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."});return i(R,{children:n.inSidebar&&S})}const O=s.memo(j);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aE as A,aF as p,aG as y,aH as d,aI as j,aJ as C}from"./index.y5HxPwg9.js";const m=/[#.]/g;function x(r,e){const n=r||"",t={};let i=0,o,f;for(;i<n.length;){m.lastIndex=i;const a=m.exec(n),s=n.slice(i,a?a.index:n.length);s&&(o?o==="#"?t.id=s:Array.isArray(t.className)?t.className.push(s):t.className=[s]:f=s,i+=s.length),a&&(o=a[0],i++)}return{type:"element",tagName:f||e||"div",properties:t,children:[]}}function u(r,e,n){const t=n?G(n):void 0;function i(o,f,...a){let s;if(o==null){s={type:"root",children:[]};const c=f;a.unshift(c)}else{s=x(o,e);const c=s.tagName.toLowerCase(),g=t?t.get(c):void 0;if(s.tagName=g||c,S(f))a.unshift(f);else for(const[N,b]of Object.entries(f))M(r,s.properties,N,b)}for(const c of a)l(s.children,c);return s.type==="element"&&s.tagName==="template"&&(s.content={type:"root",children:s.children},s.children=[]),s}return i}function S(r){if(r===null||typeof r!="object"||Array.isArray(r))return!0;if(typeof r.type!="string")return!1;const e=r,n=Object.keys(r);for(const t of n){const i=e[t];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const f of o)if(typeof f!="number"&&typeof f!="string")return!0}}return!!("children"in r&&Array.isArray(r.children))}function M(r,e,n,t){const i=A(r,n);let o;if(t!=null){if(typeof t=="number"){if(Number.isNaN(t))return;o=t}else typeof t=="boolean"?o=t:typeof t=="string"?i.spaceSeparated?o=p(t):i.commaSeparated?o=y(t):i.commaOrSpaceSeparated?o=p(y(t).join(" ")):o=h(i,i.property,t):Array.isArray(t)?o=[...t]:o=i.property==="style"?w(t):String(t);if(Array.isArray(o)){const f=[];for(const a of o)f.push(h(i,i.property,a));o=f}i.property==="className"&&Array.isArray(e.className)&&(o=e.className.concat(o)),e[i.property]=o}}function l(r,e){if(e!=null)if(typeof e=="number"||typeof e=="string")r.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const n of e)l(r,n);else if(typeof e=="object"&&"type"in e)e.type==="root"?l(r,e.children):r.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function h(r,e,n){if(typeof n=="string"){if(r.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((r.boolean||r.overloadedBoolean)&&(n===""||d(n)===d(e)))return!0}return n}function w(r){const e=[];for(const[n,t]of Object.entries(r))e.push([n,t].join(": "));return e.join("; ")}function G(r){const e=new Map;for(const n of r)e.set(n.toLowerCase(),n);return e}const L=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],O=u(j,"div"),k=u(C,"g",L);export{O as h,k as s};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(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&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=(function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=O(s.RadioGroupRoot,q),c=Ee(a,2),p=c[0],
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(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 Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(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(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(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 C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=(function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=O(i.Root,X),a=w(s,2),c=a[0],p=a[1],
|
|
1
|
+
import{ao as _,ap as ye,w as O,r as u,l as $e,o as ne,j as M,P as Oe,ae as Re,q as oe,ac as ie,bl as ae,p as _e,e as Se}from"./index.y5HxPwg9.js";import{W as Pe}from"./WidgetLabelHelpIconInline.DA4S2HFP.js";import{u as we}from"./useBasicWidgetState.COLQ5AFB.js";import"./FormClearHelper.zxJ53Nym.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){R(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return R({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},R(t,"margin".concat(p),c?a.scale200:null),R(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),R(t,"margin".concat(s),o?n.sizing.scale200:null),R(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=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},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(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&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=(function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=O(s.RadioGroupRoot,q),c=Ee(a,2),p=c[0],v=c[1];return u.createElement(p,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},v),u.Children.map(this.props.children,function(f,l){if(!u.isValidElement(f))return null;var d=o.props.value===f.props.value;return u.cloneElement(f,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||f.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n})(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function w(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(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 Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(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(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(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 C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=(function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=O(i.Root,X),a=w(s,2),c=a[0],p=a[1],v=O(i.Label,Q),f=w(v,2),l=f[0],d=f[1],h=O(i.Input,Y),g=w(h,2),S=g[0],H=g[1],x=O(i.Description,Z),I=w(x,2),m=I[0],b=I[1],y=O(i.RadioMarkInner,K),ee=w(y,2),de=ee[0],he=ee[1],ge=O(i.RadioMarkOuter,J),te=w(ge,2),be=te[0],ve=te[1],P={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,$({},P,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},P,p),et(this.props.labelPlacement)&&re,u.createElement(be,$({},P,ve),u.createElement(de,$({},P,he))),u.createElement(S,$({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},P,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(m,$({},P,b),this.props.description))}}]),n})(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[p,v]=u.useState(n??null);u.useEffect(()=>{n!==p&&v(n??null)},[n]);const f=u.useCallback(m=>{const b=parseInt(m.target.value,10);v(b),r(b)},[r]),l=$e(),d=i.length>0,h=o.length>0,g=h?o:["No options to select."],S=e||!h,H=m=>m==""&&t&&d?" ":m,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[M(Re,{label:s,disabled:S,labelVisibility:a,children:c&&M(Pe,{content:c,placement:Oe.TOP_RIGHT,label:s})}),M(pe,{onChange:f,value:p!==null?p.toString():void 0,disabled:S,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((m,b)=>ne(fe,{value:b.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?l.colors.primary:l.colors.borderColor})},RadioMarkInner:{style:({$checked:y})=>({height:y?x:I,width:y?x:I})},Label:{style:{color:S?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[M(oe,{source:m,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&M(oe,{source:H(i[b]),allowHTML:!1,isCaption:!0,isLabel:!0})]},b))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),{horizontal:s,options:a,captions:c,label:p,labelVisibility:v,help:f}=t,l=u.useCallback(h=>{const g=a[h]??null;i({value:g,fromUi:!0})},[i,a]),d=u.useMemo(()=>{if(o===null)return null;const h=a.indexOf(o);return h>=0?h:null},[o,a]);return M(it,{label:p,onChange:l,options:a,captions:c,disabled:e,horizontal:s,labelVisibility:_e(v?.value),value:d,help:f})}function st(e,t){return e.getStringValue(t)}function lt(e){return e.options.length===0||Se(e.default)?null:e.options[e.default]}function ut(e){return e.rawValue??null}function ct(e,t,n,r){t.setStringValue(e,n.value,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as T,r as i,R as b,a2 as L,j as p,V as N}from"./index.
|
|
1
|
+
import{z as T,r as i,R as b,a2 as L,j as p,V as N}from"./index.y5HxPwg9.js";const R=T("iframe",{target:"e655cq30"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),U=N.getLogger("Video"),A={width:"100%"};function O({element:r,endpoints:s,elementMgr:f}){const n=i.useRef(null),{type:v,url:c,startTime:a,subtitles:l,endTime:o,loop:d,autoplay:m,muted:E}=r;let y=b(c);const S=i.useMemo(()=>{if(!r.id)return!0;const e=f.getElementState(r.id,"preventAutoplay");return e||f.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,f]),g=i.useMemo(()=>JSON.stringify(l?l.map(e=>s.buildMediaURL(`${e.url}`)):[]),[l,s]);i.useEffect(()=>{const e=JSON.parse(g);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[g,s]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{o>0&&e.currentTime>=o&&(d?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return o>0&&e.addEventListener("timeupdate",u),()=>{e&&o>0&&e.removeEventListener("timeupdate",u)}},[o,d,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{d&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[d,a]);const V=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),o&&!isNaN(o)&&t.searchParams.append("end",o.toString()),d){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(v===L.Type.YOUTUBE_IFRAME)return p(R,{className:"stVideo","data-testid":"stVideo",title:c,src:V(c),allow:"autoplay; encrypted-media",allowFullScreen:!0});const h=e=>{const t=e.currentTarget.src;U.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!S,src:s.buildMediaURL(c),style:A,crossOrigin:y,onError:h,children:l?.map((e,t)=>p("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const $=i.memo(O);export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as D,r as a,k as P,l as U,
|
|
1
|
+
import{z as D,r as a,k as P,l as U,ab as S,ac as j,o as H,j as l,p as q,ad as K,ae as O,af as _,ag as $,Y as w,ah as A}from"./index.y5HxPwg9.js";import{I as N}from"./InputInstructions.CCbg8esE.js";import{u as Y}from"./useBasicWidgetState.COLQ5AFB.js";import{u as G,a as J,b as M}from"./useUpdateUiValue.-UI_JsjT.js";import{u as Q}from"./uniqueId.CCajdEK8.js";import{I as X}from"./input.CAtwSQ27.js";import"./FormClearHelper.zxJ53Nym.js";import"./inputUtils.CptNuJwn.js";import"./base-input.BKKl2eBF.js";const Z=D("div",{target:"eiqkja70"})("position:relative;");function tt({disabled:o,element:t,widgetMgr:s,fragmentId:u}){const[r,p]=a.useState(()=>W(s,t)??null),{width:T,elementRef:x}=P(),[i,m]=a.useState(!1),y=a.useCallback(()=>{p(t.default??null),m(!0)},[t.default]),[C,h]=Y({getStateFromWidgetMgr:W,getDefaultStateFromProto:et,getCurrStateFromProto:ot,updateWidgetMgrState:at,element:t,widgetMgr:s,fragmentId:u,onFormCleared:y});G(C,r,p,i);const[V,f]=a.useState(!1),e=U(),[b]=a.useState(()=>Q("text_input_")),{placeholder:F,formId:n,icon:d,maxChars:I}=t,g=a.useCallback(()=>{m(!1),h({value:r,fromUi:!0})},[r,h]),v=S({formId:n})?s.allowFormEnterToSubmit(n):i,E=V&&T>j(e.breakpoints.hideWidgetDetails),R=a.useCallback(()=>{i&&g(),f(!1)},[i,g]),z=a.useCallback(()=>{f(!0)},[]),L=J({formId:n,maxChars:I,setDirty:m,setUiValue:p,setValueWithSource:h}),k=M(n,g,i,s,u);return H(Z,{className:"stTextInput","data-testid":"stTextInput",ref:x,children:[l(O,{label:t.label,disabled:o,labelVisibility:q(t.labelVisibility?.value),htmlFor:b,children:t.help&&l(K,{content:t.help,label:t.label})}),l(X,{value:r??"",placeholder:F,onBlur:R,onFocus:z,onChange:L,onKeyPress:k,"aria-label":t.label,disabled:o,id:b,type:st(t),autoComplete:t.autocomplete,startEnhancer:d&&l(w,{"data-testid":"stTextInputIcon",iconValue:d,size:"lg"}),overrides:{Input:{style:{fontWeight:e.fontWeights.normal,minWidth:0,lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,"::placeholder":{color:e.colors.fadedText60}}},Root:{props:{"data-testid":"stTextInputRootElement"},style:({$isFocused:B})=>{const c=$(e.colors,B);return{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,borderTopColor:c,borderRightColor:c,borderBottomColor:c,borderLeftColor:c,paddingLeft:d?e.spacing.sm:0}}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:_(d)?e.colors.fadedText60:"inherit"}}}}),E&&l(N,{dirty:i,value:r??"",maxLength:I,inForm:S({formId:n}),allowEnterToSubmit:v})]})}function W(o,t){return o.getStringValue(t)??null}function et(o){return o.default??null}function ot(o){return o.value??null}function at(o,t,s,u){t.setStringValue(o,s.value,{fromUi:s.fromUi},u)}function st(o){return o.type===A.Type.PASSWORD?"password":"text"}const ht=a.memo(tt);export{ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,e as s,j as m,p as V,U as x}from"./index.
|
|
1
|
+
import{r as l,e as s,j as m,p as V,U as x}from"./index.y5HxPwg9.js";import{u as U}from"./useBasicWidgetState.COLQ5AFB.js";import"./FormClearHelper.zxJ53Nym.js";const h=(t,e)=>t.getStringValue(e),v=t=>t.options.length===0||s(t.default)?null:t.options[t.default],w=t=>t.rawValue??null,y=(t,e,o,a)=>{e.setStringValue(t,o.value,{fromUi:o.fromUi},a)},C=({disabled:t,element:e,widgetMgr:o,fragmentId:a})=>{const{options:i,help:u,label:n,labelVisibility:c,placeholder:p,acceptNewOptions:f}=e,[g,r]=U({getStateFromWidgetMgr:h,getDefaultStateFromProto:v,getCurrStateFromProto:w,updateWidgetMgrState:y,element:e,widgetMgr:o,fragmentId:a}),b=l.useCallback(d=>{r({value:d,fromUi:!0})},[r]),S=s(e.default)&&!t;return m(x,{label:n,labelVisibility:V(c?.value),options:i,disabled:t,onChange:b,value:g,help:u,placeholder:p,clearable:S,acceptNewOptions:f??!1})},P=l.memo(C);export{P as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ao as Z,w as q,r as c,b9 as J,l as Q,a6 as Y,ba as v,j as _,o as ee,p as te,P as re,bb as ne,ae as oe,bc as ie,b as ae,B as U,c as ue,D as le}from"./index.y5HxPwg9.js";import{W as ce}from"./WidgetLabelHelpIconInline.DA4S2HFP.js";import{u as se}from"./useBasicWidgetState.COLQ5AFB.js";import"./FormClearHelper.zxJ53Nym.js";var fe={secondary:"secondary"},G={default:"default"},pe={default:"default"},k=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function $(e){"@babel/helpers - typeof";return $=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},$(e)}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 x(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 de(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ye(e,t){return ge(e)||he(e,t)||me(e,t)||be()}function be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function me(e,t){if(e){if(typeof e=="string")return K(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 K(e,t)}}function K(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,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(s){i=!0,p=s}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function ge(e){if(Array.isArray(e))return e}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(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 Oe(e,t,r){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _e(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&&M(e,t)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},M(e,t)}function we(e){var t=Ee();return function(){var n=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Pe(this,o)}}function Pe(e,t){if(t&&($(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ee(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},C(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var H=(function(e){_e(r,e);var t=we(r);function r(){var n;ve(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)),N(F(n),"childRefs",{}),n}return Oe(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,s=i.mode,S=s===void 0?k.checkbox:s,y=i.children,f=i.selected,m=i.disabled,l=i.onClick,j=i.kind,d=i.shape,A=i.size,w=q(p.Root,z),R=ye(w,2),P=R[0],O=R[1],E=this.props["aria-label"]||this.props.ariaLabel,h=S===k.radio,W=c.Children.count(y);return c.createElement(J.Consumer,null,function(X){return c.createElement(P,D({"aria-label":E||X.buttongroup.ariaLabel,"data-baseweb":"button-group",role:h?"radiogroup":"group",$shape:d,$length:y.length},O),c.Children.map(y,function(b,L){if(!c.isValidElement(b))return null;var B=b.props.isSelected?b.props.isSelected:Le(f,L);return h&&(o.childRefs[L]=c.createRef()),c.cloneElement(b,{disabled:m||b.props.disabled,isSelected:B,ref:h?o.childRefs[L]:void 0,tabIndex:!h||B||h&&(!f||f===-1)&&L===0?0:-1,onKeyDown:function(u){if(h){var g=Number(f)?Number(f):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var I=g-1<0?W-1:g-1;l&&l(u,I),o.childRefs[I].current&&o.childRefs[I].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var T=g+1>W-1?0:g+1;l&&l(u,T),o.childRefs[T].current&&o.childRefs[T].current.focus()}}},kind:j,onClick:function(u){m||(b.props.onClick&&b.props.onClick(u),l&&l(u,L))},shape:d,size:A,overrides:de({BaseButton:{style:function(u){var g=u.$theme;return y.length===1?{}:d!==G.default?{marginLeft:g.sizing.scale100,marginRight:g.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":B,role:h?"radio":"checkbox"}}},b.props.overrides)})}))})}}]),r})(c.Component);N(H,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:pe.default,kind:fe.secondary});function Re(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function ke(e,t,r){return e===v.ClickMode.MULTI_SELECT?Re(t,r??[]):r?.includes(t)?[]:[t]}function Ce(e){return e.length===0?-1:e[0]}function je(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ae(e,t,r){const n=r===v.Style.PILLS?U.PILLS:U.SEGMENTED_CONTROL,o=ue.MEDIUM;return{element:_(le,{icon:t,label:e,iconSize:"base",useSmallerFont:!0}),kind:n,size:o}}function Be(e,t){return e&&(t=`${t}Active`),t}function Ie(e,t,r){const n={flexWrap:"wrap",maxWidth:r?"100%":"fit-content",margin:"0 0"},o=r?"100%":"auto";switch(e){case v.Style.PILLS:return{...n,columnGap:t.twoXS,rowGap:t.twoXS,width:o};case v.Style.SEGMENTED_CONTROL:return{...n,columnGap:t.none,rowGap:t.twoXS,width:o};default:return n}}function Te(e,t,r,n,o){const i=r.includes(t);return c.forwardRef(function(p,s){const{element:S,kind:y,size:f}=Ae(e.content??"",e.contentIcon??void 0,n),m=Be(i,y);return _(ae,{...p,size:f,kind:m,containerWidth:o,children:S})})}function $e(e,t){return e.getIntArrayValue(t)}function De(e){return e.default??[]}function Me(e){return e.value??[]}function Ge(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o,widthConfig:i}=e,{clickMode:a,options:p,style:s,label:S,labelVisibility:y,help:f}=r,m=Q(),[l,j]=se({getStateFromWidgetMgr:$e,getDefaultStateFromProto:De,getCurrStateFromProto:Me,updateWidgetMgrState:je,element:r,widgetMgr:o,fragmentId:n}),d=Y(i),A=(P,O)=>{const E=ke(a,O,l);j({value:E,fromUi:!0})};let w;a===v.ClickMode.SINGLE_SELECT?w=k.radio:a===v.ClickMode.MULTI_SELECT&&(w=k.checkbox);const R=c.useMemo(()=>p.map((P,O)=>{const E=Te(P,O,l,s,d);return _(E,{},`${P.content}-${O}`)}),[p,s,l,d]);return ee(ie,{className:"stButtonGroup","data-testid":"stButtonGroup",containerWidth:d,children:[_(oe,{label:S,disabled:t,labelVisibility:te(y?.value??ne.LabelVisibilityOptions.COLLAPSED),children:f&&_(ce,{content:f,placement:re.TOP,label:S})}),_(H,{disabled:t,mode:w,onClick:A,selected:a===v.ClickMode.MULTI_SELECT?l:Ce(l),overrides:{Root:{style:c.useCallback(()=>Ie(s,m.spacing,d),[s,m.spacing,d])}},children:R})]})}const Ue=c.memo(Ge);export{Ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as W,
|
|
1
|
+
import{p as W,aC as O,z as _,r as i,k as $,l as q,ab as S,ac as G,o as M,j as c,ad as N,ae as J,ag as Q}from"./index.y5HxPwg9.js";import{I as X}from"./InputInstructions.CCbg8esE.js";import{u as Y}from"./useBasicWidgetState.COLQ5AFB.js";import{u as Z,a as tt,b as et}from"./useUpdateUiValue.-UI_JsjT.js";import{u as ot,T as at}from"./useTextInputAutoExpand.DkuG1C1S.js";import{u as it}from"./uniqueId.CCajdEK8.js";import"./FormClearHelper.zxJ53Nym.js";import"./inputUtils.CptNuJwn.js";import"./base-input.BKKl2eBF.js";const st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const s=W(t.labelVisibility?.value)===O.Collapsed?2:30,l=e.heightConfig.pixelHeight-s;a=`${Math.max(0,l)}px`}return a},rt=_("div",{target:"e1tmb1p40"})({height:"100%",display:"flex",flexDirection:"column"}),T=(e,t)=>e.getStringValue(t)??t.default??null,lt=e=>e.default??null,nt=e=>e.value??null,dt=(e,t,a,s)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},s)},ut=({disabled:e,element:t,widgetMgr:a,fragmentId:s,outerElement:l})=>{const h=i.useRef(it("text_area_")).current,{width:y,elementRef:V}=$(),[r,g]=i.useState(!1),[I,x]=i.useState(!1),n=l.heightConfig?.useContent??!1,v=l.heightConfig?.useStretch??!1,A=st(l,t),C=i.useRef(null),[d,p]=i.useState(()=>T(a,t)??null),F=i.useCallback(()=>{p(t.default??null),g(!0)},[t]),[R,f]=Y({getStateFromWidgetMgr:T,getDefaultStateFromProto:lt,getCurrStateFromProto:nt,updateWidgetMgrState:dt,element:t,widgetMgr:a,fragmentId:s,onFormCleared:F});Z(R,d,p,r);const o=q(),{height:k,maxHeight:z,updateScrollHeight:H}=ot({textareaRef:C,dependencies:[t.placeholder]}),m=i.useCallback(()=>{g(!1),f({value:d,fromUi:!0})},[d,f]),L=i.useCallback(()=>{r&&m(),x(!1)},[r,m]),B=i.useCallback(()=>{x(!0)},[]),D=i.useCallback(()=>{n&&H()},[n,H]),E=tt({formId:t.formId,maxChars:t.maxChars,setDirty:g,setUiValue:p,setValueWithSource:f,additionalAction:D}),U=et(t.formId,m,r,a,s,!0),{placeholder:P,formId:b}=t,j=S({formId:b})?a.allowFormEnterToSubmit(b):r,w=I&&y>G(o.breakpoints.hideWidgetDetails);return M(rt,{className:"stTextArea","data-testid":"stTextArea",ref:V,children:[c(J,{label:t.label,disabled:e,labelVisibility:W(t.labelVisibility?.value),htmlFor:h,children:t.help&&c(N,{content:t.help,label:t.label})}),c(at,{inputRef:n?C:void 0,value:d??"",placeholder:P,onBlur:L,onFocus:B,onChange:E,onKeyDown:U,"aria-label":t.label,disabled:e,id:h,overrides:{Input:{style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,height:n?k:A,maxHeight:n?z:"",minHeight:o.sizes.largestElementHeight,resize:v?"none":"vertical",paddingRight:o.spacing.md,paddingLeft:o.spacing.md,paddingBottom:o.spacing.md,paddingTop:o.spacing.md,"::placeholder":{color:o.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:K})=>{const u=Q(o.colors,K);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:u,borderRightColor:u,borderBottomColor:u,borderLeftColor:u,flexGrow:1}}}}}),w&&c(X,{dirty:r,value:d??"",maxLength:t.maxChars,type:"multiline",inForm:S({formId:b}),allowEnterToSubmit:j})]})},Ht=i.memo(ut);export{Ht as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as Bt,
|
|
1
|
+
import{r as Bt,c$ as Er,d1 as ef,c_ as tf,d9 as At,ai as uh,da as gs,db as EN,cY as G2,d0 as ku,dc as ap,dd as H2,_ as ZR,j as jf,$ as CN,z as YR,m as QR,W as e4,a6 as SN,bV as IN,e as t4,de as rC,bv as BN,L as PN,l as MN,o as nC,cw as RN,df as iC}from"./index.y5HxPwg9.js";import{_ as ON,C as DN}from"./toConsumableArray.Dvd9AIqV.js";import{E as r4,w as FN}from"./withFullScreenWrapper.DYDiEOrW.js";import{a as LN,T as kN}from"./Toolbar.CbpscbNb.js";import{l as d1}from"./index.8HslT92O.js";import{a as NN}from"./useBasicWidgetState.COLQ5AFB.js";import{u as UN,s as zN}from"./threshold.CUNQbqMA.js";import"./FormClearHelper.zxJ53Nym.js";import"./value.DaKxGC7O.js";function VN(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function sC(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const n4=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),oC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);oC&&parseFloat(oC[1]);const aC=globalThis,lC=globalThis.process||{},jN=globalThis.navigator||{};function i4(r){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function fh(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||i4()}function GN(r){return fh()?i4()?"Electron":(jN.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const s4="4.1.0";function HN(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}class WN{constructor(e,t,n="sessionStorage"){this.storage=HN(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function $N(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function XN(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var Dm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(Dm||(Dm={}));const qN=10;function cC(r){return typeof r!="string"?r:(r=r.toUpperCase(),Dm[r]||Dm.WHITE)}function JN(r,e,t){return!fh&&typeof r=="string"&&(e&&(r=`\x1B[${cC(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${cC(t)+qN}m${r}\x1B[49m`)),r}function KN(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const s of n){const o=i[s];typeof o=="function"&&(e.find(l=>s===l)||(i[s]=o.bind(r)))}}function W2(r,e){if(!r)throw new Error("Assertion failed")}function ld(){let r;if(fh()&&aC.performance)r=aC?.performance?.now?.();else if("hrtime"in lC){const e=lC?.hrtime?.();r=e[0]*1e3+e[1]/1e6}else r=Date.now();return r}const cd={debug:fh()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},ZN={enabled:!0,level:0};function ud(){}const uC={},fC={once:!0};class wp{constructor({id:e}={id:""}){this.VERSION=s4,this._startTs=ld(),this._deltaTs=ld(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new WN(`__probe-${this.id}__`,ZN),this.timeStamp(`${this.id} started`),KN(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((ld()-this._startTs).toPrecision(10))}getDelta(){return Number((ld()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,cd.warn,arguments,fC)}error(e){return this._getLogFunction(0,e,cd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,cd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,cd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,cd.debug||cd.info,arguments,fC)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||ud,n&&[n],{tag:QN(t)}):ud}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||ud)}group(e,t,n={collapsed:!1}){const i=hC({logLevel:e,message:t,opts:n}),{collapsed:s}=n;return i.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||ud)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=o4(e)}_getLogFunction(e,t,n,i,s){if(this._shouldLog(e)){s=hC({logLevel:e,message:t,args:i,opts:s}),n=n||s.method,W2(n),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=ld();const o=s.tag||s.message;if(s.once&&o)if(!uC[o])uC[o]=ld();else return ud;return t=YN(this.id,s.message,s),n.bind(console,t,...s.args)}return ud}}wp.VERSION=s4;function o4(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return W2(Number.isFinite(e)&&e>=0),e}function hC(r){const{logLevel:e,message:t}=r;r.logLevel=o4(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return W2(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function YN(r,e,t){if(typeof e=="string"){const n=t.time?XN($N(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=JN(e,t.color,t.background)}return e}function QN(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}globalThis.probe={};const a4=new wp({id:"@probe.gl/log"}),Qy="4.3.3",e5=Qy[0]>="0"&&Qy[0]<="9"?`v${Qy}`:"";function t5(){const r=new wp({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=r,globalThis.loaders.version=e5,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=r,r}const r5=t5();function n5(r,e){return l4(r||{},e)}function l4(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,s]of Object.entries(e))s&&typeof s=="object"&&!Array.isArray(s)?n[i]=l4(n[i]||{},e[i],t+1):n[i]=e[i];return n}const i5="latest";function s5(){return globalThis._loadersgl_?.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.3"),globalThis._loadersgl_.version}const o5=s5();function qu(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const Kf=typeof process!="object"||String(process)!=="[object process]"||process.browser,a5=typeof window<"u"&&typeof window.orientation<"u",dC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);dC&&parseFloat(dC[1]);class l5{name;workerThread;isRunning=!0;result;_resolve=()=>{};_reject=()=>{};constructor(e,t){this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){qu(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){qu(this.isRunning),this.isRunning=!1,this._reject(e)}}class ev{terminate(){}}const tv=new Map;function c5(r){qu(r.source&&!r.url||!r.source&&r.url);let e=tv.get(r.source||r.url);return e||(r.url&&(e=u5(r.url),tv.set(r.url,e)),r.source&&(e=c4(r.source),tv.set(r.source,e))),qu(e),e}function u5(r){if(!r.startsWith("http"))return r;const e=f5(r);return c4(e)}function c4(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function f5(r){return`try {
|
|
2
2
|
importScripts('${r}');
|
|
3
3
|
} catch (error) {
|
|
4
4
|
console.error(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as s,r as p,X as x,l as b,j as i,a as k,P as v,o as y,Y as g,q as L}from"./index.
|
|
1
|
+
import{z as s,r as p,X as x,l as b,j as i,a as k,P as v,o as y,Y as g,q as L}from"./index.y5HxPwg9.js";import{m as C}from"./iconPosition.DkZAlu_k.js";const S=s("div",{target:"e175gajv0"})({display:"flex",flexDirection:"column",width:"100%"}),P=s("a",{target:"e175gajv1"})(({disabled:e,isCurrentPage:r,theme:o})=>({textDecoration:"none",width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.default,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:r?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:r?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...e?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),T=s("span",{target:"e175gajv2"})(({disabled:e,theme:r})=>({color:r.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...e?{borderColor:r.colors.borderColor,backgroundColor:r.colors.transparent,color:r.colors.fadedText40,cursor:"not-allowed"}:{}}));function h(e){let r=e.page;if(e.queryString)if(e.external)try{const o=new URL(e.page);new URLSearchParams(e.queryString).forEach((t,a)=>o.searchParams.append(a,t)),r=o.toString()}catch{const[o,n]=r.split("#");r=o+(o.includes("?")?"&":"?")+e.queryString+(n?"#"+n:"")}else r+=(r.includes("?")?"&":"?")+e.queryString;return r}function w(e){const{onPageChange:r,currentPageScriptHash:o}=p.useContext(x),{colors:n}=b(),{disabled:t,element:a}=e,l=o===a.pageScriptHash,u=d=>{a.external?t&&d.preventDefault():(d.preventDefault(),t||r(a.pageScriptHash,a.queryString))},c=C(a.iconPosition),f=h(a);return i("div",{className:"stPageLink","data-testid":"stPageLink",children:i(k,{help:a.help,placement:v.TOP_RIGHT,containerWidth:!0,children:i(S,{children:y(P,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:l,href:f,target:a.external?"_blank":"",rel:"noreferrer",onClick:u,children:[a.icon&&c==="left"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon}),i(T,{disabled:t,children:i(L,{source:a.label,allowHTML:!1,isLabel:!0,boldLabel:l,largerLabel:!0,disableLinks:!0})}),a.icon&&c==="right"&&i(g,{size:"lg",color:t?n.fadedText40:n.bodyText,iconValue:a.icon})]})})})})}const j=p.memo(w);export{j as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{z as Kt,r as P,j as ne}from"./index.CPc_uZux.js";const{entries:St,setPrototypeOf:pt,isFrozen:Zt,getPrototypeOf:Jt,getOwnPropertyDescriptor:Qt}=Object;let{freeze:R,seal:b,create:Fe}=Object,{apply:ze,construct:Ge}=typeof Reflect<"u"&&Reflect;R||(R=function(n){return n});b||(b=function(n){return n});ze||(ze=function(n,s){for(var a=arguments.length,c=new Array(a>2?a-2:0),m=2;m<a;m++)c[m-2]=arguments[m];return n.apply(s,c)});Ge||(Ge=function(n){for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];return new n(...a)});const pe=O(Array.prototype.forEach),en=O(Array.prototype.lastIndexOf),Tt=O(Array.prototype.pop),Z=O(Array.prototype.push),tn=O(Array.prototype.splice),de=O(String.prototype.toLowerCase),xe=O(String.prototype.toString),Pe=O(String.prototype.match),J=O(String.prototype.replace),nn=O(String.prototype.indexOf),on=O(String.prototype.trim),y=O(Object.prototype.hasOwnProperty),S=O(RegExp.prototype.test),Q=rn(TypeError);function O(o){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];return ze(o,n,a)}}function rn(o){return function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return Ge(o,s)}}function l(o,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:de;pt&&pt(o,null);let a=n.length;for(;a--;){let c=n[a];if(typeof c=="string"){const m=s(c);m!==c&&(Zt(n)||(n[a]=m),c=m)}o[c]=!0}return o}function an(o){for(let n=0;n<o.length;n++)y(o,n)||(o[n]=null);return o}function C(o){const n=Fe(null);for(const[s,a]of St(o))y(o,s)&&(Array.isArray(a)?n[s]=an(a):a&&typeof a=="object"&&a.constructor===Object?n[s]=C(a):n[s]=a);return n}function ee(o,n){for(;o!==null;){const a=Qt(o,n);if(a){if(a.get)return O(a.get);if(typeof a.value=="function")return O(a.value)}o=Jt(o)}function s(){return null}return s}const dt=R(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=R(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=R(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sn=R(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ue=R(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ln=R(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Et=R(["#text"]),_t=R(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),He=R(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),At=R(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Te=R(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cn=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fn=b(/<%[\w\W]*|[\w\W]*%>/gm),un=b(/\$\{[\w\W]*/gm),mn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),pn=b(/^aria-[\-\w]+$/),Rt=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tn=b(/^(?:\w+script|data):/i),dn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ot=b(/^html$/i),En=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:pn,ATTR_WHITESPACE:dn,CUSTOM_ELEMENT:En,DATA_ATTR:mn,DOCTYPE_NAME:Ot,ERB_EXPR:fn,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:Tn,MUSTACHE_EXPR:cn,TMPLIT_EXPR:un});const te={element:1,text:3,progressingInstruction:7,comment:8,document:9},_n=function(){return typeof window>"u"?null:window},An=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(a=s.getAttribute(c));const m="dompurify"+(a?"#"+a:"");try{return n.createPolicy(m,{createHTML(D){return D},createScriptURL(D){return D}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Lt(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_n();const n=r=>Lt(r);if(n.version="3.3.1",n.removed=[],!o||!o.document||o.document.nodeType!==te.document||!o.Element)return n.isSupported=!1,n;let{document:s}=o;const a=s,c=a.currentScript,{DocumentFragment:m,HTMLTemplateElement:D,Node:Y,Element:oe,NodeFilter:X,NamedNodeMap:Dt=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:It,trustedTypes:ie}=o,j=oe.prototype,Ct=ee(j,"cloneNode"),Mt=ee(j,"remove"),wt=ee(j,"nextSibling"),xt=ee(j,"childNodes"),re=ee(j,"parentNode");if(typeof D=="function"){const r=s.createElement("template");r.content&&r.content.ownerDocument&&(s=r.content.ownerDocument)}let g,V="";const{implementation:_e,createNodeIterator:Pt,createDocumentFragment:kt,getElementsByTagName:vt}=s,{importNode:Ut}=a;let h=ht();n.isSupported=typeof St=="function"&&typeof re=="function"&&_e&&_e.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ae,ERB_EXPR:ge,TMPLIT_EXPR:he,DATA_ATTR:Ht,ARIA_ATTR:Ft,IS_SCRIPT_OR_DATA:zt,ATTR_WHITESPACE:Be,CUSTOM_ELEMENT:Gt}=gt;let{IS_ALLOWED_URI:Ye}=gt,d=null;const Xe=l({},[...dt,...ke,...ve,...Ue,...Et]);let E=null;const je=l({},[..._t,...He,...At,...Te]);let u=Object.seal(Fe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,Se=null;const U=Object.seal(Fe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,Re=!0,$e=!1,qe=!0,H=!1,ae=!0,k=!1,Oe=!1,Le=!1,F=!1,se=!1,le=!1,Ke=!0,Ze=!1;const Wt="user-content-";let be=!0,q=!1,z={},N=null;const ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Je=null;const Qe=l({},["audio","video","img","source","image","track"]);let De=null;const et=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let G=M,Ne=!1,Ie=null;const Bt=l({},[ce,fe,M],xe);let ue=l({},["mi","mo","mn","ms","mtext"]),me=l({},["annotation-xml"]);const Yt=l({},["title","style","font","a","script"]);let K=null;const Xt=["application/xhtml+xml","text/html"],jt="text/html";let T=null,W=null;const Vt=s.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},Ce=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(W&&W===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),K=Xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?jt:e.PARSER_MEDIA_TYPE,T=K==="application/xhtml+xml"?xe:de,d=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,T):Xe,E=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,T):je,Ie=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,xe):Bt,De=y(e,"ADD_URI_SAFE_ATTR")?l(C(et),e.ADD_URI_SAFE_ATTR,T):et,Je=y(e,"ADD_DATA_URI_TAGS")?l(C(Qe),e.ADD_DATA_URI_TAGS,T):Qe,N=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,T):ye,$=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,T):C({}),Se=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,T):C({}),z=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ve=e.ALLOW_ARIA_ATTR!==!1,Re=e.ALLOW_DATA_ATTR!==!1,$e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=e.SAFE_FOR_TEMPLATES||!1,ae=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,F=e.RETURN_DOM||!1,se=e.RETURN_DOM_FRAGMENT||!1,le=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ke=e.SANITIZE_DOM!==!1,Ze=e.SANITIZE_NAMED_PROPS||!1,be=e.KEEP_CONTENT!==!1,q=e.IN_PLACE||!1,Ye=e.ALLOWED_URI_REGEXP||Rt,G=e.NAMESPACE||M,ue=e.MATHML_TEXT_INTEGRATION_POINTS||ue,me=e.HTML_INTEGRATION_POINTS||me,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),H&&(Re=!1),se&&(F=!0),z&&(d=l({},Et),E=[],z.html===!0&&(l(d,dt),l(E,_t)),z.svg===!0&&(l(d,ke),l(E,He),l(E,Te)),z.svgFilters===!0&&(l(d,ve),l(E,He),l(E,Te)),z.mathMl===!0&&(l(d,Ue),l(E,At),l(E,Te))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?U.tagCheck=e.ADD_TAGS:(d===Xe&&(d=C(d)),l(d,e.ADD_TAGS,T))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?U.attributeCheck=e.ADD_ATTR:(E===je&&(E=C(E)),l(E,e.ADD_ATTR,T))),e.ADD_URI_SAFE_ATTR&&l(De,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(N===ye&&(N=C(N)),l(N,e.FORBID_CONTENTS,T)),e.ADD_FORBID_CONTENTS&&(N===ye&&(N=C(N)),l(N,e.ADD_FORBID_CONTENTS,T)),be&&(d["#text"]=!0),k&&l(d,["html","head","body"]),d.table&&(l(d,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,V=g.createHTML("")}else g===void 0&&(g=An(ie,c)),g!==null&&typeof V=="string"&&(V=g.createHTML(""));R&&R(e),W=e}},nt=l({},[...ke,...ve,...sn]),ot=l({},[...Ue,...ln]),$t=function(e){let t=re(e);(!t||!t.tagName)&&(t={namespaceURI:G,tagName:"template"});const i=de(e.tagName),f=de(t.tagName);return Ie[e.namespaceURI]?e.namespaceURI===fe?t.namespaceURI===M?i==="svg":t.namespaceURI===ce?i==="svg"&&(f==="annotation-xml"||ue[f]):!!nt[i]:e.namespaceURI===ce?t.namespaceURI===M?i==="math":t.namespaceURI===fe?i==="math"&&me[f]:!!ot[i]:e.namespaceURI===M?t.namespaceURI===fe&&!me[f]||t.namespaceURI===ce&&!ue[f]?!1:!ot[i]&&(Yt[i]||!nt[i]):!!(K==="application/xhtml+xml"&&Ie[e.namespaceURI]):!1},I=function(e){Z(n.removed,{element:e});try{re(e).removeChild(e)}catch{Mt(e)}},v=function(e,t){try{Z(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Z(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(F||se)try{I(t)}catch{}else try{t.setAttribute(e,"")}catch{}},it=function(e){let t=null,i=null;if(Le)e="<remove></remove>"+e;else{const p=Pe(e,/^[\r\n\t ]+/);i=p&&p[0]}K==="application/xhtml+xml"&&G===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(G===M)try{t=new It().parseFromString(f,K)}catch{}if(!t||!t.documentElement){t=_e.createDocument(G,"template",null);try{t.documentElement.innerHTML=Ne?V:f}catch{}}const A=t.body||t.documentElement;return e&&i&&A.insertBefore(s.createTextNode(i),A.childNodes[0]||null),G===M?vt.call(t,k?"html":"body")[0]:k?t.documentElement:A},rt=function(e){return Pt.call(e.ownerDocument||e,e,X.SHOW_ELEMENT|X.SHOW_COMMENT|X.SHOW_TEXT|X.SHOW_PROCESSING_INSTRUCTION|X.SHOW_CDATA_SECTION,null)},Me=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Dt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof Y=="function"&&e instanceof Y};function w(r,e,t){pe(r,i=>{i.call(n,e,t,W)})}const st=function(e){let t=null;if(w(h.beforeSanitizeElements,e,null),Me(e))return I(e),!0;const i=T(e.nodeName);if(w(h.uponSanitizeElement,e,{tagName:i,allowedTags:d}),ae&&e.hasChildNodes()&&!at(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent)||e.nodeType===te.progressingInstruction||ae&&e.nodeType===te.comment&&S(/<[/\w]/g,e.data))return I(e),!0;if(!(U.tagCheck instanceof Function&&U.tagCheck(i))&&(!d[i]||$[i])){if(!$[i]&&ct(i)&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,i)||u.tagNameCheck instanceof Function&&u.tagNameCheck(i)))return!1;if(be&&!N[i]){const f=re(e)||e.parentNode,A=xt(e)||e.childNodes;if(A&&f){const p=A.length;for(let L=p-1;L>=0;--L){const x=Ct(A[L],!0);x.__removalCount=(e.__removalCount||0)+1,f.insertBefore(x,wt(e))}}}return I(e),!0}return e instanceof oe&&!$t(e)||(i==="noscript"||i==="noembed"||i==="noframes")&&S(/<\/no(script|embed|frames)/i,e.innerHTML)?(I(e),!0):(H&&e.nodeType===te.text&&(t=e.textContent,pe([Ae,ge,he],f=>{t=J(t,f," ")}),e.textContent!==t&&(Z(n.removed,{element:e.cloneNode()}),e.textContent=t)),w(h.afterSanitizeElements,e,null),!1)},lt=function(e,t,i){if(Ke&&(t==="id"||t==="name")&&(i in s||i in Vt))return!1;if(!(Re&&!Se[t]&&S(Ht,t))){if(!(Ve&&S(Ft,t))){if(!(U.attributeCheck instanceof Function&&U.attributeCheck(t,e))){if(!E[t]||Se[t]){if(!(ct(e)&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&S(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,i)||u.tagNameCheck instanceof Function&&u.tagNameCheck(i))))return!1}else if(!De[t]){if(!S(Ye,J(i,Be,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&nn(i,"data:")===0&&Je[e])){if(!($e&&!S(zt,J(i,Be,"")))){if(i)return!1}}}}}}}return!0},ct=function(e){return e!=="annotation-xml"&&Pe(e,Gt)},ft=function(e){w(h.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Me(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0};let f=t.length;for(;f--;){const A=t[f],{name:p,namespaceURI:L,value:x}=A,B=T(p),we=x;let _=p==="value"?we:on(we);if(i.attrName=B,i.attrValue=_,i.keepAttr=!0,i.forceKeepAttr=void 0,w(h.uponSanitizeAttribute,e,i),_=i.attrValue,Ze&&(B==="id"||B==="name")&&(v(p,e),_=Wt+_),ae&&S(/((--!?|])>)|<\/(style|title|textarea)/i,_)){v(p,e);continue}if(B==="attributename"&&Pe(_,"href")){v(p,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){v(p,e);continue}if(!qe&&S(/\/>/i,_)){v(p,e);continue}H&&pe([Ae,ge,he],mt=>{_=J(_,mt," ")});const ut=T(e.nodeName);if(!lt(ut,B,_)){v(p,e);continue}if(g&&typeof ie=="object"&&typeof ie.getAttributeType=="function"&&!L)switch(ie.getAttributeType(ut,B)){case"TrustedHTML":{_=g.createHTML(_);break}case"TrustedScriptURL":{_=g.createScriptURL(_);break}}if(_!==we)try{L?e.setAttributeNS(L,p,_):e.setAttribute(p,_),Me(e)?I(e):Tt(n.removed)}catch{v(p,e)}}w(h.afterSanitizeAttributes,e,null)},qt=function r(e){let t=null;const i=rt(e);for(w(h.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)w(h.uponSanitizeShadowNode,t,null),st(t),ft(t),t.content instanceof m&&r(t.content);w(h.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,i=null,f=null,A=null;if(Ne=!r,Ne&&(r="<!-->"),typeof r!="string"&&!at(r))if(typeof r.toString=="function"){if(r=r.toString(),typeof r!="string")throw Q("dirty is not a string, aborting")}else throw Q("toString is not a function");if(!n.isSupported)return r;if(Oe||Ce(e),n.removed=[],typeof r=="string"&&(q=!1),q){if(r.nodeName){const x=T(r.nodeName);if(!d[x]||$[x])throw Q("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof Y)t=it("<!---->"),i=t.ownerDocument.importNode(r,!0),i.nodeType===te.element&&i.nodeName==="BODY"||i.nodeName==="HTML"?t=i:t.appendChild(i);else{if(!F&&!H&&!k&&r.indexOf("<")===-1)return g&&le?g.createHTML(r):r;if(t=it(r),!t)return F?null:le?V:""}t&&Le&&I(t.firstChild);const p=rt(q?r:t);for(;f=p.nextNode();)st(f),ft(f),f.content instanceof m&&qt(f.content);if(q)return r;if(F){if(se)for(A=kt.call(t.ownerDocument);t.firstChild;)A.appendChild(t.firstChild);else A=t;return(E.shadowroot||E.shadowrootmode)&&(A=Ut.call(a,A,!0)),A}let L=k?t.outerHTML:t.innerHTML;return k&&d["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&S(Ot,t.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
1
|
+
import{z as Kt,r as P,j as ne}from"./index.y5HxPwg9.js";const{entries:St,setPrototypeOf:pt,isFrozen:Zt,getPrototypeOf:Jt,getOwnPropertyDescriptor:Qt}=Object;let{freeze:R,seal:b,create:Fe}=Object,{apply:ze,construct:Ge}=typeof Reflect<"u"&&Reflect;R||(R=function(n){return n});b||(b=function(n){return n});ze||(ze=function(n,s){for(var a=arguments.length,c=new Array(a>2?a-2:0),m=2;m<a;m++)c[m-2]=arguments[m];return n.apply(s,c)});Ge||(Ge=function(n){for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];return new n(...a)});const pe=O(Array.prototype.forEach),en=O(Array.prototype.lastIndexOf),Tt=O(Array.prototype.pop),Z=O(Array.prototype.push),tn=O(Array.prototype.splice),de=O(String.prototype.toLowerCase),xe=O(String.prototype.toString),Pe=O(String.prototype.match),J=O(String.prototype.replace),nn=O(String.prototype.indexOf),on=O(String.prototype.trim),y=O(Object.prototype.hasOwnProperty),S=O(RegExp.prototype.test),Q=rn(TypeError);function O(o){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];return ze(o,n,a)}}function rn(o){return function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return Ge(o,s)}}function l(o,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:de;pt&&pt(o,null);let a=n.length;for(;a--;){let c=n[a];if(typeof c=="string"){const m=s(c);m!==c&&(Zt(n)||(n[a]=m),c=m)}o[c]=!0}return o}function an(o){for(let n=0;n<o.length;n++)y(o,n)||(o[n]=null);return o}function C(o){const n=Fe(null);for(const[s,a]of St(o))y(o,s)&&(Array.isArray(a)?n[s]=an(a):a&&typeof a=="object"&&a.constructor===Object?n[s]=C(a):n[s]=a);return n}function ee(o,n){for(;o!==null;){const a=Qt(o,n);if(a){if(a.get)return O(a.get);if(typeof a.value=="function")return O(a.value)}o=Jt(o)}function s(){return null}return s}const dt=R(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=R(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=R(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),sn=R(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ue=R(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ln=R(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Et=R(["#text"]),_t=R(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),He=R(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),At=R(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Te=R(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cn=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fn=b(/<%[\w\W]*|[\w\W]*%>/gm),un=b(/\$\{[\w\W]*/gm),mn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),pn=b(/^aria-[\-\w]+$/),Rt=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tn=b(/^(?:\w+script|data):/i),dn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ot=b(/^html$/i),En=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:pn,ATTR_WHITESPACE:dn,CUSTOM_ELEMENT:En,DATA_ATTR:mn,DOCTYPE_NAME:Ot,ERB_EXPR:fn,IS_ALLOWED_URI:Rt,IS_SCRIPT_OR_DATA:Tn,MUSTACHE_EXPR:cn,TMPLIT_EXPR:un});const te={element:1,text:3,progressingInstruction:7,comment:8,document:9},_n=function(){return typeof window>"u"?null:window},An=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const c="data-tt-policy-suffix";s&&s.hasAttribute(c)&&(a=s.getAttribute(c));const m="dompurify"+(a?"#"+a:"");try{return n.createPolicy(m,{createHTML(D){return D},createScriptURL(D){return D}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Lt(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_n();const n=r=>Lt(r);if(n.version="3.3.1",n.removed=[],!o||!o.document||o.document.nodeType!==te.document||!o.Element)return n.isSupported=!1,n;let{document:s}=o;const a=s,c=a.currentScript,{DocumentFragment:m,HTMLTemplateElement:D,Node:Y,Element:oe,NodeFilter:X,NamedNodeMap:Dt=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:It,trustedTypes:ie}=o,j=oe.prototype,Ct=ee(j,"cloneNode"),Mt=ee(j,"remove"),wt=ee(j,"nextSibling"),xt=ee(j,"childNodes"),re=ee(j,"parentNode");if(typeof D=="function"){const r=s.createElement("template");r.content&&r.content.ownerDocument&&(s=r.content.ownerDocument)}let g,V="";const{implementation:_e,createNodeIterator:Pt,createDocumentFragment:kt,getElementsByTagName:vt}=s,{importNode:Ut}=a;let h=ht();n.isSupported=typeof St=="function"&&typeof re=="function"&&_e&&_e.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ae,ERB_EXPR:ge,TMPLIT_EXPR:he,DATA_ATTR:Ht,ARIA_ATTR:Ft,IS_SCRIPT_OR_DATA:zt,ATTR_WHITESPACE:Be,CUSTOM_ELEMENT:Gt}=gt;let{IS_ALLOWED_URI:Ye}=gt,d=null;const Xe=l({},[...dt,...ke,...ve,...Ue,...Et]);let E=null;const je=l({},[..._t,...He,...At,...Te]);let u=Object.seal(Fe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,Se=null;const U=Object.seal(Fe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,Re=!0,$e=!1,qe=!0,H=!1,ae=!0,k=!1,Oe=!1,Le=!1,F=!1,se=!1,le=!1,Ke=!0,Ze=!1;const Wt="user-content-";let be=!0,q=!1,z={},N=null;const ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Je=null;const Qe=l({},["audio","video","img","source","image","track"]);let De=null;const et=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",fe="http://www.w3.org/2000/svg",M="http://www.w3.org/1999/xhtml";let G=M,Ne=!1,Ie=null;const Bt=l({},[ce,fe,M],xe);let ue=l({},["mi","mo","mn","ms","mtext"]),me=l({},["annotation-xml"]);const Yt=l({},["title","style","font","a","script"]);let K=null;const Xt=["application/xhtml+xml","text/html"],jt="text/html";let T=null,W=null;const Vt=s.createElement("form"),tt=function(e){return e instanceof RegExp||e instanceof Function},Ce=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(W&&W===e)){if((!e||typeof e!="object")&&(e={}),e=C(e),K=Xt.indexOf(e.PARSER_MEDIA_TYPE)===-1?jt:e.PARSER_MEDIA_TYPE,T=K==="application/xhtml+xml"?xe:de,d=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,T):Xe,E=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,T):je,Ie=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,xe):Bt,De=y(e,"ADD_URI_SAFE_ATTR")?l(C(et),e.ADD_URI_SAFE_ATTR,T):et,Je=y(e,"ADD_DATA_URI_TAGS")?l(C(Qe),e.ADD_DATA_URI_TAGS,T):Qe,N=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,T):ye,$=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,T):C({}),Se=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,T):C({}),z=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,Ve=e.ALLOW_ARIA_ATTR!==!1,Re=e.ALLOW_DATA_ATTR!==!1,$e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=e.SAFE_FOR_TEMPLATES||!1,ae=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,F=e.RETURN_DOM||!1,se=e.RETURN_DOM_FRAGMENT||!1,le=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ke=e.SANITIZE_DOM!==!1,Ze=e.SANITIZE_NAMED_PROPS||!1,be=e.KEEP_CONTENT!==!1,q=e.IN_PLACE||!1,Ye=e.ALLOWED_URI_REGEXP||Rt,G=e.NAMESPACE||M,ue=e.MATHML_TEXT_INTEGRATION_POINTS||ue,me=e.HTML_INTEGRATION_POINTS||me,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&tt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),H&&(Re=!1),se&&(F=!0),z&&(d=l({},Et),E=[],z.html===!0&&(l(d,dt),l(E,_t)),z.svg===!0&&(l(d,ke),l(E,He),l(E,Te)),z.svgFilters===!0&&(l(d,ve),l(E,He),l(E,Te)),z.mathMl===!0&&(l(d,Ue),l(E,At),l(E,Te))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?U.tagCheck=e.ADD_TAGS:(d===Xe&&(d=C(d)),l(d,e.ADD_TAGS,T))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?U.attributeCheck=e.ADD_ATTR:(E===je&&(E=C(E)),l(E,e.ADD_ATTR,T))),e.ADD_URI_SAFE_ATTR&&l(De,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(N===ye&&(N=C(N)),l(N,e.FORBID_CONTENTS,T)),e.ADD_FORBID_CONTENTS&&(N===ye&&(N=C(N)),l(N,e.ADD_FORBID_CONTENTS,T)),be&&(d["#text"]=!0),k&&l(d,["html","head","body"]),d.table&&(l(d,["tbody"]),delete $.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw Q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=e.TRUSTED_TYPES_POLICY,V=g.createHTML("")}else g===void 0&&(g=An(ie,c)),g!==null&&typeof V=="string"&&(V=g.createHTML(""));R&&R(e),W=e}},nt=l({},[...ke,...ve,...sn]),ot=l({},[...Ue,...ln]),$t=function(e){let t=re(e);(!t||!t.tagName)&&(t={namespaceURI:G,tagName:"template"});const i=de(e.tagName),f=de(t.tagName);return Ie[e.namespaceURI]?e.namespaceURI===fe?t.namespaceURI===M?i==="svg":t.namespaceURI===ce?i==="svg"&&(f==="annotation-xml"||ue[f]):!!nt[i]:e.namespaceURI===ce?t.namespaceURI===M?i==="math":t.namespaceURI===fe?i==="math"&&me[f]:!!ot[i]:e.namespaceURI===M?t.namespaceURI===fe&&!me[f]||t.namespaceURI===ce&&!ue[f]?!1:!ot[i]&&(Yt[i]||!nt[i]):!!(K==="application/xhtml+xml"&&Ie[e.namespaceURI]):!1},I=function(e){Z(n.removed,{element:e});try{re(e).removeChild(e)}catch{Mt(e)}},v=function(e,t){try{Z(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{Z(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(F||se)try{I(t)}catch{}else try{t.setAttribute(e,"")}catch{}},it=function(e){let t=null,i=null;if(Le)e="<remove></remove>"+e;else{const p=Pe(e,/^[\r\n\t ]+/);i=p&&p[0]}K==="application/xhtml+xml"&&G===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const f=g?g.createHTML(e):e;if(G===M)try{t=new It().parseFromString(f,K)}catch{}if(!t||!t.documentElement){t=_e.createDocument(G,"template",null);try{t.documentElement.innerHTML=Ne?V:f}catch{}}const A=t.body||t.documentElement;return e&&i&&A.insertBefore(s.createTextNode(i),A.childNodes[0]||null),G===M?vt.call(t,k?"html":"body")[0]:k?t.documentElement:A},rt=function(e){return Pt.call(e.ownerDocument||e,e,X.SHOW_ELEMENT|X.SHOW_COMMENT|X.SHOW_TEXT|X.SHOW_PROCESSING_INSTRUCTION|X.SHOW_CDATA_SECTION,null)},Me=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Dt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},at=function(e){return typeof Y=="function"&&e instanceof Y};function w(r,e,t){pe(r,i=>{i.call(n,e,t,W)})}const st=function(e){let t=null;if(w(h.beforeSanitizeElements,e,null),Me(e))return I(e),!0;const i=T(e.nodeName);if(w(h.uponSanitizeElement,e,{tagName:i,allowedTags:d}),ae&&e.hasChildNodes()&&!at(e.firstElementChild)&&S(/<[/\w!]/g,e.innerHTML)&&S(/<[/\w!]/g,e.textContent)||e.nodeType===te.progressingInstruction||ae&&e.nodeType===te.comment&&S(/<[/\w]/g,e.data))return I(e),!0;if(!(U.tagCheck instanceof Function&&U.tagCheck(i))&&(!d[i]||$[i])){if(!$[i]&&ct(i)&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,i)||u.tagNameCheck instanceof Function&&u.tagNameCheck(i)))return!1;if(be&&!N[i]){const f=re(e)||e.parentNode,A=xt(e)||e.childNodes;if(A&&f){const p=A.length;for(let L=p-1;L>=0;--L){const x=Ct(A[L],!0);x.__removalCount=(e.__removalCount||0)+1,f.insertBefore(x,wt(e))}}}return I(e),!0}return e instanceof oe&&!$t(e)||(i==="noscript"||i==="noembed"||i==="noframes")&&S(/<\/no(script|embed|frames)/i,e.innerHTML)?(I(e),!0):(H&&e.nodeType===te.text&&(t=e.textContent,pe([Ae,ge,he],f=>{t=J(t,f," ")}),e.textContent!==t&&(Z(n.removed,{element:e.cloneNode()}),e.textContent=t)),w(h.afterSanitizeElements,e,null),!1)},lt=function(e,t,i){if(Ke&&(t==="id"||t==="name")&&(i in s||i in Vt))return!1;if(!(Re&&!Se[t]&&S(Ht,t))){if(!(Ve&&S(Ft,t))){if(!(U.attributeCheck instanceof Function&&U.attributeCheck(t,e))){if(!E[t]||Se[t]){if(!(ct(e)&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&S(u.attributeNameCheck,t)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(t,e))||t==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&S(u.tagNameCheck,i)||u.tagNameCheck instanceof Function&&u.tagNameCheck(i))))return!1}else if(!De[t]){if(!S(Ye,J(i,Be,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&nn(i,"data:")===0&&Je[e])){if(!($e&&!S(zt,J(i,Be,"")))){if(i)return!1}}}}}}}return!0},ct=function(e){return e!=="annotation-xml"&&Pe(e,Gt)},ft=function(e){w(h.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Me(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0};let f=t.length;for(;f--;){const A=t[f],{name:p,namespaceURI:L,value:x}=A,B=T(p),we=x;let _=p==="value"?we:on(we);if(i.attrName=B,i.attrValue=_,i.keepAttr=!0,i.forceKeepAttr=void 0,w(h.uponSanitizeAttribute,e,i),_=i.attrValue,Ze&&(B==="id"||B==="name")&&(v(p,e),_=Wt+_),ae&&S(/((--!?|])>)|<\/(style|title|textarea)/i,_)){v(p,e);continue}if(B==="attributename"&&Pe(_,"href")){v(p,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){v(p,e);continue}if(!qe&&S(/\/>/i,_)){v(p,e);continue}H&&pe([Ae,ge,he],mt=>{_=J(_,mt," ")});const ut=T(e.nodeName);if(!lt(ut,B,_)){v(p,e);continue}if(g&&typeof ie=="object"&&typeof ie.getAttributeType=="function"&&!L)switch(ie.getAttributeType(ut,B)){case"TrustedHTML":{_=g.createHTML(_);break}case"TrustedScriptURL":{_=g.createScriptURL(_);break}}if(_!==we)try{L?e.setAttributeNS(L,p,_):e.setAttribute(p,_),Me(e)?I(e):Tt(n.removed)}catch{v(p,e)}}w(h.afterSanitizeAttributes,e,null)},qt=function r(e){let t=null;const i=rt(e);for(w(h.beforeSanitizeShadowDOM,e,null);t=i.nextNode();)w(h.uponSanitizeShadowNode,t,null),st(t),ft(t),t.content instanceof m&&r(t.content);w(h.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,i=null,f=null,A=null;if(Ne=!r,Ne&&(r="<!-->"),typeof r!="string"&&!at(r))if(typeof r.toString=="function"){if(r=r.toString(),typeof r!="string")throw Q("dirty is not a string, aborting")}else throw Q("toString is not a function");if(!n.isSupported)return r;if(Oe||Ce(e),n.removed=[],typeof r=="string"&&(q=!1),q){if(r.nodeName){const x=T(r.nodeName);if(!d[x]||$[x])throw Q("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof Y)t=it("<!---->"),i=t.ownerDocument.importNode(r,!0),i.nodeType===te.element&&i.nodeName==="BODY"||i.nodeName==="HTML"?t=i:t.appendChild(i);else{if(!F&&!H&&!k&&r.indexOf("<")===-1)return g&&le?g.createHTML(r):r;if(t=it(r),!t)return F?null:le?V:""}t&&Le&&I(t.firstChild);const p=rt(q?r:t);for(;f=p.nextNode();)st(f),ft(f),f.content instanceof m&&qt(f.content);if(q)return r;if(F){if(se)for(A=kt.call(t.ownerDocument);t.firstChild;)A.appendChild(t.firstChild);else A=t;return(E.shadowroot||E.shadowrootmode)&&(A=Ut.call(a,A,!0)),A}let L=k?t.outerHTML:t.innerHTML;return k&&d["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&S(Ot,t.ownerDocument.doctype.name)&&(L="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
2
2
|
`+L),H&&pe([Ae,ge,he],x=>{L=J(L,x," ")}),g&&le?g.createHTML(L):L},n.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ce(r),Oe=!0},n.clearConfig=function(){W=null,Oe=!1},n.isValidAttribute=function(r,e,t){W||Ce({});const i=T(r),f=T(e);return lt(i,f,t)},n.addHook=function(r,e){typeof e=="function"&&Z(h[r],e)},n.removeHook=function(r,e){if(e!==void 0){const t=en(h[r],e);return t===-1?void 0:tn(h[r],t,1)[0]}return Tt(h[r])},n.removeHooks=function(r){h[r]=[]},n.removeAllHooks=function(){h=ht()},n}var Ee=Lt();const We="data-temp-href-target";Ee.addHook("beforeSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute("target")&&o.getAttribute("target")==="_blank"&&o.setAttribute(We,"_blank")});Ee.addHook("afterSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute(We)&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"),o.removeAttribute(We))});const bt={USE_PROFILES:{html:!0},FORCE_BODY:!0},gn=Kt("div",{target:"e1o5kn6k0"})(({theme:o})=>({width:"100%","ul, ol, dl":{paddingLeft:o.spacing.threeXL}})),yt=P.forwardRef(function(n,s){return ne(gn,{className:"stHtml","data-testid":"stHtml",ref:s,...n})}),hn={...bt,ADD_TAGS:["script","style"],ADD_ATTR:["src","type","async","defer","nonce","crossorigin","referrerpolicy","integrity"]};function Sn(o){return Ee.sanitize(o,hn)}const Rn=({body:o})=>{const n=P.useRef(null),s=P.useMemo(()=>Sn(o),[o]);return P.useEffect(()=>{const a=n.current;return a?(a.innerHTML=s,Array.from(a.querySelectorAll("script")).forEach(m=>{const D=document.createElement("script");for(const{name:Y,value:oe}of Array.from(m.attributes))try{D.setAttribute(Y,oe)}catch{}m.src||(D.textContent=m.textContent),m.parentNode?.replaceChild(D,m)}),()=>{a.innerHTML=""}):void 0},[s]),ne(yt,{ref:n})},On=P.memo(Rn);function Ln(o){return Ee.sanitize(o,bt)}function bn({body:o}){const n=P.useMemo(()=>Ln(o),[o]);return n?ne(yt,{dangerouslySetInnerHTML:{__html:n}}):null}const yn=P.memo(bn);function Dn({element:o}){const{body:n,unsafeAllowJavascript:s}=o;return s?ne(On,{body:n}):ne(yn,{body:n})}const In=P.memo(Dn);export{In as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,E as Q,_ as K,bp as z,bq as k,l as Y,e as j,Q as Z,O as q,br as M,bs as _,bt as ee,bu as te,n as H,bv as J,V as B,W as ne,k as re,a6 as se,bw as oe,j as x,o as ae,b3 as ie}from"./index.y5HxPwg9.js";import{w as ce,E as le}from"./withFullScreenWrapper.DYDiEOrW.js";import{a as P,S as U,T as ue}from"./Toolbar.CbpscbNb.js";import{R as fe}from"./index.DmWUXdjc.js";import{a as W,c as de,b as me,e as pe,t as he,S as ge,d as ye}from"./embed.BhRb_2n8.js";import{u as Se}from"./FormClearHelper.zxJ53Nym.js";import{T as be}from"./TableChart.esm.BawvAi5p.js";import"./moment.C7qA8nIE.js";import"./pandasStylerUtils.DGWgd5sM.js";import"./numbro.B9_PXfzp.js";import"./_baseIndexOf.BTknn6Gb.js";import"./index.8HslT92O.js";import"./main.VeMVx6VI.js";import"./throttle.Fq1DQK4p.js";import"./toConsumableArray.Dvd9AIqV.js";import"./formatNumber.DtfMnnPx.js";import"./sprintfjs.CsoVVZ9k.js";import"./formatMoment.C6Hwn6X5.js";import"./checkbox.CB43AKV4.js";import"./createDownloadLinkElement.jVwF96ey.js";import"./FileDownload.esm.CO68LcnZ.js";import"./_arrayIncludes.B19Iyn2B.js";import"./threshold.CUNQbqMA.js";import"./value.DaKxGC7O.js";import"./timer.BZio6gjG.js";var $=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(Q,K({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}))});$.displayName="InsertChart";function F(t,e){if(we(t,e),Array.isArray(t.layer))for(const s of t.layer)s&&typeof s=="object"&&F(s,e);for(const s of["vconcat","hconcat","concat"])if(Array.isArray(t[s]))for(const r of t[s])r&&typeof r=="object"&&F(r,e);("facet"in t||"repeat"in t)&&t.spec&&typeof t.spec=="object"&&F(t.spec,e)}function we(t,e){const s=t.encoding;if(!s)return;const r=s.color;if(!r)return;"value"in r&&z(r.value)&&(r.value=k(r.value,e));const c=r.scale;c&&Array.isArray(c.range)&&(c.range=c.range.map(o=>z(o)?k(o,e):o))}const Ce=20;function Ee(t){"params"in t&&"encoding"in t&&t.params.forEach(e=>{"select"in e&&(["interval","point"].includes(e.select)&&(e.select={type:e.select}),"type"in e.select&&e.select.type==="point"&&!("encodings"in e.select)&&j(e.select.encodings)&&(e.select.encodings=Object.keys(t.encoding)))})}const ve=(t,e,s,r,c,o,f,m)=>{const n=JSON.parse(t);if(typeof n.height=="number"&&n.height<=0&&delete n.height,typeof n.width=="number"&&n.width<=0&&delete n.width,r==="streamlit"?n.config=W(n.config,o):n.usermeta?.embedOptions?.theme==="streamlit"?(n.config=W(n.config,o),n.usermeta.embedOptions.theme=void 0):n.config=de(n.config,o),n.title&&(typeof n.title=="string"&&(n.title={text:n.title}),n.title.limit=n.title.limit??Math.max(f-40,0)),s&&m&&m>0&&(n.height=m),e&&f&&f>0&&(n.width=f,"vconcat"in n&&n.vconcat.forEach(a=>{a===null||typeof a!="object"||"hconcat"in a||"vconcat"in a||"concat"in a||"layer"in a||(a.width=f)})),n.padding||(n.padding={}),j(n.padding.bottom)&&(n.padding.bottom=Ce),n.datasets)throw new Error("Datasets should not be passed as part of the spec");return c.length>0&&Ee(n),F(n,o),n},Ne=(t,e,s,r,c)=>{const o=Y(),{id:f,formId:m,spec:n,data:a,datasets:l,vegaLiteTheme:d,selectionMode:u}=t,h=i.useMemo(()=>u,[JSON.stringify(u)]),y=i.useMemo(()=>ve(n,r,c,d,h,o,e,s),[n,r,c,d,h,o,e,s]);return{id:f,formId:m,vegaLiteTheme:d,spec:y,selectionMode:h,data:a,datasets:l,useContainerWidth:r}},Ae={DATAFRAME_INDEX:"(index)"};function Ve(t){return!t||t.dimensions.numDataRows===0?null:I(t)}function De(t){const e=L(t);if(j(e))return null;const s={};for(const[r,c]of Object.entries(e))s[r]=I(c);return s}function L(t){if(t?.length===0)return null;const e={};return t.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;e[r]=s.data}),e}function I(t,e=0){if(t.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:c,numIndexColumns:o}=t.dimensions,f=t.columnTypes[0]??void 0,m=f?.type===Z.INDEX&&(q(f)||M(f)||_(f));for(let n=e;n<r;n++){const a={};if(m){const{content:l}=t.getCell(n,0);a[Ae.DATAFRAME_INDEX]=typeof l=="bigint"?Number(l):l}for(let l=0;l<c;l++){const d=l+o,{content:u,contentType:h}=t.getCell(n,d);if((u instanceof Date||typeof u=="number"&&Number.isFinite(u))&&(M(h)||_(h))&&!ee(h)){const y=new Date(u).getTimezoneOffset()*60*1e3;a[t.columnNames[0][d]]=u.valueOf()+y}else a[t.columnNames[0][d]]=typeof u=="bigint"?Number(u):u}s.push(a)}return s}const Oe=150,Te=B.getLogger("useVegaLiteSelections"),Re=(t,e,s)=>{const{id:r,formId:c,selectionMode:o}=t,f=i.useCallback(n=>{o.forEach(l=>{n.addSignalListener(l,te(Oe,(d,u)=>{const h=n.getState({data:(v,T)=>o.some(g=>`${g}_store`===v),recurse:!1});H(h)&&e.setElementState(r,"viewState",h);let y=u;"vlPoint"in u&&"or"in u.vlPoint&&(y=u.vlPoint.or);const A={id:r,formId:c},E=JSON.parse(e.getStringValue(A)||"{}"),N={selection:{...E?.selection||{},[d]:y||{}}};J(E,N)||e.setStringValue(A,JSON.stringify(N),{fromUi:!0},s)}))});const a=e.getElementState(r,"viewState");if(H(a))try{return n.setState(a)}catch(l){Te.warn("Failed to restore view state",l)}return n},[r,o,e,c,s]),m=i.useCallback(()=>{const n={selection:{}};o.forEach(u=>{n.selection[u]={}});const a={id:r,formId:c},l=e.getStringValue(a),d=l?JSON.parse(l):n;J(d,n)||e.setStringValue(a,JSON.stringify(n),{fromUi:!0},s)},[r,c,s,o,e]);return{maybeConfigureSelections:f,onFormCleared:m}},G="source",xe=B.getLogger("useVegaEmbed");function Fe(t,e,s){const r=i.useRef(null),c=i.useRef(null),o=i.useRef(G),f=i.useRef(null),m=i.useRef([]),n=i.useRef(null),a=i.useRef([]),[l,d]=i.useState(!1),{maybeConfigureSelections:u,onFormCleared:h}=Re(t,e,s);Se({widgetMgr:e,element:t,onFormCleared:h});const{data:y,datasets:A}=t;i.useEffect(()=>{n.current=y,a.current=A,r.current===null&&(f.current=y,m.current=A)},[y,A]);const E=i.useCallback(()=>{c.current&&c.current(),c.current=null,r.current=null},[]),N=i.useCallback(async(g,b)=>{if(g.current===null)throw new Error("Element missing.");d(!0);try{E();const w={ast:!0,expr:me,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:S,view:R,finalize:D}=await pe(g.current,b,w);r.current=u(R),c.current=D;const p=De(a.current),C=p?Object.keys(p):[];if(C.length===1){const[O]=C;o.current=O}else C.length===0&&S.data&&(o.current=G);const V=Ve(n.current);if(V&&r.current.insert(o.current,V),p)for(const[O,X]of Object.entries(p))r.current.insert(O,X);return await r.current.runAsync(),await r.current.resize().runAsync(),f.current=n.current,m.current=a.current,r.current}finally{d(!1)}},[E,u]),v=i.useCallback((g,b,w,S)=>{if(!S||S.dimensions.numDataRows===0){try{g.remove(b,he)}catch{}return}if(!w||w.dimensions.numDataRows===0){g.insert(b,I(S));return}S.hash!==w.hash&&(g.data(b,I(S)),xe.info(`Had to clear the ${b} dataset before inserting data through Vega view.`))},[]),T=i.useCallback(async(g,b)=>{if(r.current===null||l)return null;const w=f.current,S=m.current;(w||g)&&v(r.current,o.current,w,g);const R=L(S)??{},D=L(b)??{};for(const[p,C]of Object.entries(D)){const V=p||o.current,O=R[V];v(r.current,V,O,C)}for(const p of Object.keys(R))!Object.hasOwn(D,p)&&p!==o.current&&v(r.current,p,null,null);return await r.current?.resize().runAsync(),f.current=g,m.current=b,r.current},[v,l]);return{createView:N,updateView:T,finalizeView:E}}function Ie(t){try{const e=typeof t=="string"?JSON.parse(t):t;return!!(e.facet||e.encoding?.row||e.encoding?.column||e.encoding?.facet)}catch{return!1}}function Le(t){try{const e=typeof t=="string"?JSON.parse(t):t;return!("vconcat"in e)||!Array.isArray(e.vconcat)?!1:e.vconcat.some(s=>s!==null&&typeof s=="object"&&("hconcat"in s||"vconcat"in s||"concat"in s||"layer"in s))}catch{return!1}}const je=({disableFullscreenMode:t,element:e,fragmentId:s,widgetMgr:r,widthConfig:c,heightConfig:o})=>{const[f,m]=i.useState(!1),[n,a]=i.useState(!1),{expanded:l,height:d,width:u,expand:h,collapse:y}=ne(le),{width:A,height:E,elementRef:N}=re([f]),v=se(c)||e.useContainerWidth,T=oe(o),g=Ie(e.spec),b=Le(e.spec),w=Ne(e,g?u??0:A,(l?d:E)??0,l&&!b?!0:v,l?!0:T),{createView:S,updateView:R,finalizeView:D}=Fe(w,r,s),{data:p,datasets:C,spec:V}=w;if(i.useLayoutEffect(()=>(N.current!==null&&S(N,V),D),[S,D,V,u,d,f,N]),i.useEffect(()=>{R(p,C)},[p,C]),i.useEffect(()=>{p||C?.[0]?.data?a(!0):a(!1)},[p,C]),f){const O=d??(E>0?E:void 0);return x(fe,{data:p??C[0]?.data,height:O,width:c??void 0,customToolbarActions:[x(P,{label:"Show chart",icon:$,onClick:()=>{m(!1)}},"show-chart")]})}return ae(U,{height:T?l?d:"100%":d,useContainerWidth:l?!0:v,children:[x(ue,{target:U,isFullScreen:l,onExpand:h,onCollapse:y,disableFullscreenMode:t,children:n&&x(P,{label:"Show data",icon:be,onClick:()=>{m(!0)}})}),x(ie,{styles:[ge]}),x(ye,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:v,useContainerHeight:T,ref:N})]})},ze=ce(je),ct=i.memo(ze);export{ge as StyledVegaLiteChartTooltips,W as applyStreamlitTheme,ct as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as a,r as t,n as i,j as d,e}from"./index.
|
|
1
|
+
import{z as a,r as t,n as i,j as d,e}from"./index.y5HxPwg9.js";import{D as c,a as l}from"./IFrameUtil.DefezniK.js";const m=a("iframe",{target:"eu9re3w0"})(({theme:o,disableScrolling:r})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}));function n(o){return e(o)||o===""?void 0:o}function g({element:o}){const r=n(o.src),s=i(r)?void 0:n(o.srcdoc);return d(m,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!o.scrolling,src:r,srcDoc:s,scrolling:o.scrolling?"auto":"no",sandbox:c,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const F=t.memo(g);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,L,H as M,B as w,u as T,o as U,j as u,b as A,c as P,D as j,a as N,I as Y}from"./index.
|
|
1
|
+
import{r as o,L,H as M,B as w,u as T,o as U,j as u,b as A,c as P,D as j,a as N,I as Y}from"./index.y5HxPwg9.js";import{m as z}from"./iconPosition.DkZAlu_k.js";import{c as R}from"./createDownloadLinkElement.jVwF96ey.js";function F(S){const{disabled:i,element:r,widgetMgr:B,endpoints:t,fragmentId:g}=S,{help:v,label:x,icon:I,ignoreRerun:h,type:p,url:k,deferredFileId:n}=r,b=r.shortcut?r.shortcut:void 0,[C,f]=o.useState(!1),[l,s]=o.useState(null),{enforceDownloadInNewTab:d=!1}=o.useContext(L),{requestDeferredFile:D}=o.useContext(M);let m=w.SECONDARY;p==="primary"?m=w.PRIMARY:p==="tertiary"&&(m=w.TERTIARY);const c=o.useMemo(()=>t.buildDownloadUrl(k),[t,k]);o.useEffect(()=>{n?.length||t.checkSourceUrlResponse(c,"Download Button")},[c,t,n]);const E=o.useCallback(async()=>{if(!D||!n){s("Deferred download not properly configured");return}f(!0),s(null);try{const e=await D(n);if(e.errorMsg){s(e.errorMsg),f(!1);return}const a=t.buildDownloadUrl(e.url);t.checkSourceUrlResponse(a,"Download Button"),R({filename:"",url:a,enforceDownloadInNewTab:d}).click()}catch(e){const a=e instanceof Error?e.message:"Download failed";s(a)}finally{f(!1)}},[D,n,t,d]),y=o.useCallback(()=>{if(i)return;h||B.setTriggerValue(r,{fromUi:!0},g),!!n?.length?E():R({filename:"",url:c,enforceDownloadInNewTab:d}).click()},[i,h,B,r,g,n,E,c,d]);return T({shortcut:b,disabled:i,onActivate:y}),o.useEffect(()=>{if(l){const e=setTimeout(()=>s(null),5e3);return()=>clearTimeout(e)}},[l]),U("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:[u(N,{help:v,containerWidth:!0,children:u(A,{kind:m,size:P.SMALL,disabled:i||C,onClick:y,containerWidth:!0,children:u(j,{icon:C?"spinner":I,iconPosition:z(r.iconPosition),label:x,shortcut:b})})}),l&&u(Y,{"data-testid":"stDownloadButtonError",children:l})]})}const O=o.memo(F);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as f,r as o,R as g,j as l,V as v}from"./index.
|
|
1
|
+
import{z as f,r as o,R as g,j as l,V as v}from"./index.y5HxPwg9.js";const T=f("div",{target:"e1z085g90"})(()=>({lineHeight:0})),y=f("audio",{target:"e1z085g91"})(({theme:t})=>({width:"100%",height:t.sizes.minElementHeight,margin:0,padding:0})),h=v.getLogger("Audio");function L({element:t,endpoints:a,elementMgr:s}){const i=o.useRef(null),{startTime:n,endTime:d,loop:u,autoplay:p}=t,E=o.useMemo(()=>{if(!t.id)return!0;const e=s.getElementState(t.id,"preventAutoplay");return e||s.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,s]);o.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),o.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),o.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const c=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):r||(r=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",c),()=>{e&&d>0&&e.removeEventListener("timeupdate",c)}},[d,u,n]),o.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[u,n]);const m=g(t.url),A=a.buildMediaURL(t.url);return l(T,{children:l(y,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!E,src:A,onError:e=>{const r=e.currentTarget.src;h.error(`Client Error: Audio source error - ${r}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",r)},crossOrigin:m})})}const z=o.memo(L);export{z as default};
|