@linkdlab/funcnodes_react_flow 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -971,10 +971,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
971
971
|
0%, 80%, 100% { opacity: 0; }
|
|
972
972
|
40% { opacity: 1; }
|
|
973
973
|
`]))),hbe=function(t,n){var r=t.isFocused,o=t.size,a=t.theme,s=a.colors,u=a.spacing.baseUnit;return Ot({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:u*2})},DD=function(t){var n=t.delay,r=t.offset;return Et("span",{css:nC({animation:"".concat(pbe," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHN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ICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},mbe=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,a=o===void 0?4:o,s=bp(t,obe);return Et("div",Ct({},po(Ot(Ot({},s),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Et(DD,{delay:0,offset:r}),Et(DD,{delay:160,offset:!0}),Et(DD,{delay:320,offset:!r}))},gbe=function(t,n){var r=t.isDisabled,o=t.isFocused,a=t.theme,s=a.colors,u=a.borderRadius,f=a.spacing;return Ot({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:f.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:o?s.primary:s.neutral20,borderRadius:u,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:o?s.primary:s.neutral30}})},ybe=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,a=t.innerRef,s=t.innerProps,u=t.menuIsOpen;return Et("div",Ct({ref:a},po(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":u}),s,{"aria-disabled":r||void 0}),n)},bbe=ybe,vbe=["data"],Sbe=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},xbe=function(t){var n=t.children,r=t.cx,o=t.getStyles,a=t.getClassNames,s=t.Heading,u=t.headingProps,f=t.innerProps,p=t.label,m=t.theme,g=t.selectProps;return Et("div",Ct({},po(t,"group",{group:!0}),f),Et(s,Ct({},u,{selectProps:g,theme:m,getStyles:o,getClassNames:a,cx:r}),p),Et("div",null,n))},wbe=function(t,n){var r=t.theme,o=r.colors,a=r.spacing;return Ot({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},Ebe=function(t){var n=wW(t);n.data;var r=bp(n,vbe);return Et("div",Ct({},po(t,"groupHeading",{"group-heading":!0}),r))},_be=xbe,Cbe=["innerRef","isDisabled","isHidden","inputClassName"],Tbe=function(t,n){var r=t.isDisabled,o=t.value,a=t.theme,s=a.spacing,u=a.colors;return Ot(Ot({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},Abe),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:u.neutral80})},kW={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Abe={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ot({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},kW)},Obe=function(t){return Ot({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},kW)},Rbe=function(t){var n=t.cx,r=t.value,o=wW(t),a=o.innerRef,s=o.isDisabled,u=o.isHidden,f=o.inputClassName,p=bp(o,Cbe);return Et("div",Ct({},po(t,"input",{"input-container":!0}),{"data-value":r||""}),Et("input",Ct({className:n({input:!0},f),ref:a,style:Obe(u),disabled:s},p)))},Nbe=Rbe,kbe=function(t,n){var r=t.theme,o=r.spacing,a=r.borderRadius,s=r.colors;return Ot({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:a/2,margin:o.baseUnit/2})},Mbe=function(t,n){var r=t.theme,o=r.borderRadius,a=r.colors,s=t.cropWithEllipsis;return Ot({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Ibe=function(t,n){var r=t.theme,o=r.spacing,a=r.borderRadius,s=r.colors,u=t.isFocused;return Ot({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:u?s.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},MW=function(t){var n=t.children,r=t.innerProps;return Et("div",r,n)},Dbe=MW,jbe=MW;function Pbe(e){var t=e.children,n=e.innerProps;return Et("div",Ct({role:"button"},n),t||Et(fP,{size:14}))}var zbe=function(t){var n=t.children,r=t.components,o=t.data,a=t.innerProps,s=t.isDisabled,u=t.removeProps,f=t.selectProps,p=r.Container,m=r.Label,g=r.Remove;return Et(p,{data:o,innerProps:Ot(Ot({},po(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),a),selectProps:f},Et(m,{data:o,innerProps:Ot({},po(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:f},n),Et(g,{data:o,innerProps:Ot(Ot({},po(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},u),selectProps:f}))},$be=zbe,Fbe=function(t,n){var r=t.isDisabled,o=t.isFocused,a=t.isSelected,s=t.theme,u=s.spacing,f=s.colors;return Ot({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?f.primary:o?f.primary25:"transparent",color:r?f.neutral20:a?f.neutral0:"inherit",padding:"".concat(u.baseUnit*2,"px ").concat(u.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?f.primary:f.primary50}})},Lbe=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,a=t.isSelected,s=t.innerRef,u=t.innerProps;return Et("div",Ct({},po(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":a}),{ref:s,"aria-disabled":r},u),n)},Bbe=Lbe,Vbe=function(t,n){var r=t.theme,o=r.spacing,a=r.colors;return Ot({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Ube=function(t){var n=t.children,r=t.innerProps;return Et("div",Ct({},po(t,"placeholder",{placeholder:!0}),r),n)},Hbe=Ube,Gbe=function(t,n){var r=t.isDisabled,o=t.theme,a=o.spacing,s=o.colors;return Ot({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},Ybe=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return Et("div",Ct({},po(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},qbe=Ybe,Xbe={ClearIndicator:cbe,Control:bbe,DropdownIndicator:lbe,DownChevron:RW,CrossIcon:fP,Group:_be,GroupHeading:Ebe,IndicatorsContainer:nbe,IndicatorSeparator:dbe,Input:Nbe,LoadingIndicator:mbe,Menu:V0e,MenuList:H0e,MenuPortal:Z0e,LoadingMessage:X0e,NoOptionsMessage:q0e,MultiValue:$be,MultiValueContainer:Dbe,MultiValueLabel:jbe,MultiValueRemove:Pbe,Option:Bbe,Placeholder:Hbe,SelectContainer:K0e,SingleValue:qbe,ValueContainer:ebe},Wbe=function(t){return Ot(Ot({},Xbe),t.components)},w6=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Zbe(e,t){return!!(e===t||w6(e)&&w6(t))}function Jbe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Zbe(e[n],t[n]))return!1;return!0}function Kbe(e,t){t===void 0&&(t=Jbe);var n=null;function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var s=e.apply(this,o);return n={lastResult:s,lastArgs:o,lastThis:this},s}return r.clear=function(){n=null},r}function Qbe(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var eve=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:Qbe},tve=function(t){return Et("span",Ct({css:eve},t))},E6=tve,nve={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,a=t.context,s=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,a=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return s?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,a=t.label,s=a===void 0?"":a,u=t.selectValue,f=t.isDisabled,p=t.isSelected,m=t.isAppleDevice,g=function(x,E){return x&&x.length?"".concat(x.indexOf(E)+1," of ").concat(x.length):""};if(n==="value"&&u)return"value ".concat(s," focused, ").concat(g(u,r),".");if(n==="menu"&&m){var b=f?" disabled":"",S="".concat(p?" selected":"").concat(b);return"".concat(s).concat(S,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},rve=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.focusableOptions,s=t.isFocused,u=t.selectValue,f=t.selectProps,p=t.id,m=t.isAppleDevice,g=f.ariaLiveMessages,b=f.getOptionLabel,S=f.inputValue,w=f.isMulti,x=f.isOptionDisabled,E=f.isSearchable,C=f.menuIsOpen,N=f.options,O=f.screenReaderStatus,k=f.tabSelectsValue,M=f.isLoading,D=f["aria-label"],P=f["aria-live"],B=oe.useMemo(function(){return Ot(Ot({},nve),g||{})},[g]),V=oe.useMemo(function(){var ee="";if(n&&B.onChange){var H=n.option,ne=n.options,Q=n.removedValue,ae=n.removedValues,q=n.value,W=function(he){return Array.isArray(he)?null:he},ie=Q||H||W(q),Z=ie?b(ie):"",K=ne||ae||void 0,se=K?K.map(b):[],de=Ot({isDisabled:ie&&x(ie,u),label:Z,labels:se},n);ee=B.onChange(de)}return ee},[n,B,x,u,b]),U=oe.useMemo(function(){var ee="",H=r||o,ne=!!(r&&u&&u.includes(r));if(H&&B.onFocus){var Q={focused:H,label:b(H),isDisabled:x(H,u),isSelected:ne,options:a,context:H===r?"menu":"value",selectValue:u,isAppleDevice:m};ee=B.onFocus(Q)}return ee},[r,o,b,x,B,a,u,m]),X=oe.useMemo(function(){var ee="";if(C&&N.length&&!M&&B.onFilter){var H=O({count:a.length});ee=B.onFilter({inputValue:S,resultsMessage:H})}return ee},[a,S,C,B,N,O,M]),L=n?.action==="initial-input-focus",J=oe.useMemo(function(){var ee="";if(B.guidance){var H=o?"value":C?"menu":"input";ee=B.guidance({"aria-label":D,context:H,isDisabled:r&&x(r,u),isMulti:w,isSearchable:E,tabSelectsValue:k,isInitialFocus:L})}return ee},[D,r,o,w,x,E,C,B,u,k,L]),Y=Et(oe.Fragment,null,Et("span",{id:"aria-selection"},V),Et("span",{id:"aria-focused"},U),Et("span",{id:"aria-results"},X),Et("span",{id:"aria-guidance"},J));return Et(oe.Fragment,null,Et(E6,{id:p},L&&Y),Et(E6,{"aria-live":P,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!L&&Y))},ove=rve,G3=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],ive=new RegExp("["+G3.map(function(e){return e.letters}).join("")+"]","g"),IW={};for(var jD=0;jD<G3.length;jD++)for(var PD=G3[jD],zD=0;zD<PD.letters.length;zD++)IW[PD.letters[zD]]=PD.base;var DW=function(t){return t.replace(ive,function(n){return IW[n]})},ave=Kbe(DW),_6=function(t){return t.replace(/^\s+|\s+$/g,"")},sve=function(t){return"".concat(t.label," ").concat(t.value)},lve=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=Ot({ignoreCase:!0,ignoreAccents:!0,stringify:sve,trim:!0,matchFrom:"any"},t),a=o.ignoreCase,s=o.ignoreAccents,u=o.stringify,f=o.trim,p=o.matchFrom,m=f?_6(r):r,g=f?_6(u(n)):u(n);return a&&(m=m.toLowerCase(),g=g.toLowerCase()),s&&(m=ave(m),g=DW(g)),p==="start"?g.substr(0,m.length)===m:g.indexOf(m)>-1}},uve=["innerRef"];function cve(e){var t=e.innerRef,n=bp(e,uve),r=D0e(n,"onExited","in","enter","exit","appear");return Et("input",Ct({ref:t},r,{css:nC({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29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gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var fve=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function dve(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,s=oe.useRef(!1),u=oe.useRef(!1),f=oe.useRef(0),p=oe.useRef(null),m=oe.useCallback(function(E,C){if(p.current!==null){var N=p.current,O=N.scrollTop,k=N.scrollHeight,M=N.clientHeight,D=p.current,P=C>0,B=k-M-O,V=!1;B>C&&s.current&&(r&&r(E),s.current=!1),P&&u.current&&(a&&a(E),u.current=!1),P&&C>B?(n&&!s.current&&n(E),D.scrollTop=k,V=!0,s.current=!0):!P&&-C>O&&(o&&!u.current&&o(E),D.scrollTop=0,V=!0,u.current=!0),V&&fve(E)}},[n,r,o,a]),g=oe.useCallback(function(E){m(E,E.deltaY)},[m]),b=oe.useCallback(function(E){f.current=E.changedTouches[0].clientY},[]),S=oe.useCallback(function(E){var C=f.current-E.changedTouches[0].clientY;m(E,C)},[m]),w=oe.useCallback(function(E){if(E){var C=k0e?{passive:!1}:!1;E.addEventListener("wheel",g,C),E.addEventListener("touchstart",b,C),E.addEventListener("touchmove",S,C)}},[S,b,g]),x=oe.useCallback(function(E){E&&(E.removeEventListener("wheel",g,!1),E.removeEventListener("touchstart",b,!1),E.removeEventListener("touchmove",S,!1))},[S,b,g]);return oe.useEffect(function(){if(t){var E=p.current;return w(E),function(){x(E)}}},[t,w,x]),function(E){p.current=E}}var C6=["boxSizing","height","overflow","paddingRight","position"],T6={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function A6(e){e.cancelable&&e.preventDefault()}function O6(e){e.stopPropagation()}function R6(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function N6(){return"ontouchstart"in window||navigator.maxTouchPoints}var k6=!!(typeof window<"u"&&window.document&&window.document.createElement),uE=0,Yv={capture:!1,passive:!1};function pve(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=oe.useRef({}),a=oe.useRef(null),s=oe.useCallback(function(f){if(k6){var p=document.body,m=p&&p.style;if(r&&C6.forEach(function(w){var x=m&&m[w];o.current[w]=x}),r&&uE<1){var g=parseInt(o.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,S=window.innerWidth-b+g||0;Object.keys(T6).forEach(function(w){var x=T6[w];m&&(m[w]=x)}),m&&(m.paddingRight="".concat(S,"px"))}p&&N6()&&(p.addEventListener("touchmove",A6,Yv),f&&(f.addEventListener("touchstart",R6,Yv),f.addEventListener("touchmove",O6,Yv))),uE+=1}},[r]),u=oe.useCallback(function(f){if(k6){var p=document.body,m=p&&p.style;uE=Math.max(uE-1,0),r&&uE<1&&C6.forEach(function(g){var b=o.current[g];m&&(m[g]=b)}),p&&N6()&&(p.removeEventListener("touchmove",A6,Yv),f&&(f.removeEventListener("touchstart",R6,Yv),f.removeEventListener("touchmove",O6,Yv)))}},[r]);return oe.useEffect(function(){if(t){var f=a.current;return s(f),function(){u(f)}}},[t,s,u]),function(f){a.current=f}}function hve(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var mve=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},gve=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN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csIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:hve};function yve(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,a=e.onBottomArrive,s=e.onBottomLeave,u=e.onTopArrive,f=e.onTopLeave,p=dve({isEnabled:o,onBottomArrive:a,onBottomLeave:s,onTopArrive:u,onTopLeave:f}),m=pve({isEnabled:n}),g=function(S){p(S),m(S)};return Et(oe.Fragment,null,n&&Et("div",{onClick:mve,css:gve}),t(g))}function bve(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var vve=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:bve},Sve=function(t){var n=t.name,r=t.onFocus;return Et("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:vve,value:"",onChange:function(){}})},xve=Sve;function dP(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function wve(){return dP(/^iPhone/i)}function jW(){return dP(/^Mac/i)}function Eve(){return dP(/^iPad/i)||jW()&&navigator.maxTouchPoints>1}function _ve(){return wve()||Eve()}function Cve(){return jW()||_ve()}var Tve=function(t){return t.label},Ave=function(t){return t.label},Ove=function(t){return t.value},Rve=function(t){return!!t.isDisabled},Nve={clearIndicator:ube,container:J0e,control:gbe,dropdownIndicator:sbe,group:Sbe,groupHeading:wbe,indicatorsContainer:tbe,indicatorSeparator:fbe,input:Tbe,loadingIndicator:hbe,loadingMessage:Y0e,menu:F0e,menuList:U0e,menuPortal:W0e,multiValue:kbe,multiValueLabel:Mbe,multiValueRemove:Ibe,noOptionsMessage:G0e,option:Fbe,placeholder:Vbe,singleValue:Gbe,valueContainer:Q0e},kve={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Mve=4,PW=4,Ive=38,Dve=PW*2,jve={baseUnit:PW,controlHeight:Ive,menuGutter:Dve},$D={borderRadius:Mve,colors:kve,spacing:jve},Pve={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:S6(),captureMenuScroll:!S6(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:lve(),formatGroupLabel:Tve,getOptionLabel:Ave,getOptionValue:Ove,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Rve,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!R0e(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function M6(e,t,n,r){var o=FW(e,t,n),a=LW(e,t,n),s=$W(e,t),u=qR(e,t);return{type:"option",data:t,isDisabled:o,isSelected:a,label:s,value:u,index:r}}function aR(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(s,u){return M6(e,s,t,u)}).filter(function(s){return D6(e,s)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=M6(e,n,t,r);return D6(e,a)?a:void 0}).filter(M0e)}function zW(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,cP(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function I6(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,cP(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function zve(e,t){return zW(aR(e,t))}function D6(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,a=t.isSelected,s=t.label,u=t.value;return(!VW(e)||!a)&&BW(e,{label:s,value:u,data:o},r)}function $ve(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var a=t.indexOf(n);if(a>-1)return n;if(o<t.length)return t[o]}return null}function Fve(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var FD=function(t,n){var r,o=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return o||null},$W=function(t,n){return t.getOptionLabel(n)},qR=function(t,n){return t.getOptionValue(n)};function FW(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function LW(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=qR(e,t);return n.some(function(o){return qR(e,o)===r})}function BW(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var VW=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Lve=1,UW=(function(e){m0e(n,e);var t=y0e(n);function n(r){var o;if(p0e(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(f){o.controlRef=f},o.focusedOptionRef=null,o.getFocusedOptionRef=function(f){o.focusedOptionRef=f},o.menuListRef=null,o.getMenuListRef=function(f){o.menuListRef=f},o.inputRef=null,o.getInputRef=function(f){o.inputRef=f},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(f,p){var m=o.props,g=m.onChange,b=m.name;p.name=b,o.ariaOnChange(f,p),g(f,p)},o.setValue=function(f,p,m){var g=o.props,b=g.closeMenuOnSelect,S=g.isMulti,w=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:w}),b&&(o.setState({inputIsHiddenAfterUpdate:!S}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(f,{action:p,option:m})},o.selectOption=function(f){var p=o.props,m=p.blurInputOnSelect,g=p.isMulti,b=p.name,S=o.state.selectValue,w=g&&o.isOptionSelected(f,S),x=o.isOptionDisabled(f,S);if(w){var E=o.getOptionValue(f);o.setValue(S.filter(function(C){return o.getOptionValue(C)!==E}),"deselect-option",f)}else if(!x)g?o.setValue([].concat(cP(S),[f]),"select-option",f):o.setValue(f,"select-option");else{o.ariaOnChange(f,{action:"select-option",option:f,name:b});return}m&&o.blurInput()},o.removeValue=function(f){var p=o.props.isMulti,m=o.state.selectValue,g=o.getOptionValue(f),b=m.filter(function(w){return o.getOptionValue(w)!==g}),S=NA(p,b,b[0]||null);o.onChange(S,{action:"remove-value",removedValue:f}),o.focusInput()},o.clearValue=function(){var f=o.state.selectValue;o.onChange(NA(o.props.isMulti,[],null),{action:"clear",removedValues:f})},o.popValue=function(){var f=o.props.isMulti,p=o.state.selectValue,m=p[p.length-1],g=p.slice(0,p.length-1),b=NA(f,g,g[0]||null);m&&o.onChange(b,{action:"pop-value",removedValue:m})},o.getFocusedOptionId=function(f){return FD(o.state.focusableOptionsWithIds,f)},o.getFocusableOptionsWithIds=function(){return I6(aR(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return _0e.apply(void 0,[o.props.classNamePrefix].concat(p))},o.getOptionLabel=function(f){return $W(o.props,f)},o.getOptionValue=function(f){return qR(o.props,f)},o.getStyles=function(f,p){var m=o.props.unstyled,g=Nve[f](p,m);g.boxSizing="border-box";var b=o.props.styles[f];return b?b(g,p):g},o.getClassNames=function(f,p){var m,g;return(m=(g=o.props.classNames)[f])===null||m===void 0?void 0:m.call(g,p)},o.getElementId=function(f){return"".concat(o.state.instancePrefix,"-").concat(f)},o.getComponents=function(){return Wbe(o.props)},o.buildCategorizedOptions=function(){return aR(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return zW(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(f,p){o.setState({ariaSelection:Ot({value:f},p)})},o.onMenuMouseDown=function(f){f.button===0&&(f.stopPropagation(),f.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(f){o.blockOptionHover=!1},o.onControlMouseDown=function(f){if(!f.defaultPrevented){var p=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&o.onMenuClose():p&&o.openMenu("first"):(p&&(o.openAfterFocus=!0),o.focusInput()),f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&f.preventDefault()}},o.onDropdownIndicatorMouseDown=function(f){if(!(f&&f.type==="mousedown"&&f.button!==0)&&!o.props.isDisabled){var p=o.props,m=p.isMulti,g=p.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!m}),o.onMenuClose()):o.openMenu("first"),f.preventDefault()}},o.onClearIndicatorMouseDown=function(f){f&&f.type==="mousedown"&&f.button!==0||(o.clearValue(),f.preventDefault(),o.openAfterFocus=!1,f.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(f){typeof o.props.closeMenuOnScroll=="boolean"?f.target instanceof HTMLElement&&bk(f.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(f)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(f){var p=f.touches,m=p&&p.item(0);m&&(o.initialTouchX=m.clientX,o.initialTouchY=m.clientY,o.userIsDragging=!1)},o.onTouchMove=function(f){var p=f.touches,m=p&&p.item(0);if(m){var g=Math.abs(m.clientX-o.initialTouchX),b=Math.abs(m.clientY-o.initialTouchY),S=5;o.userIsDragging=g>S||b>S}},o.onTouchEnd=function(f){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(f.target)&&o.menuListRef&&!o.menuListRef.contains(f.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(f){o.userIsDragging||o.onControlMouseDown(f)},o.onClearIndicatorTouchEnd=function(f){o.userIsDragging||o.onClearIndicatorMouseDown(f)},o.onDropdownIndicatorTouchEnd=function(f){o.userIsDragging||o.onDropdownIndicatorMouseDown(f)},o.handleInputChange=function(f){var p=o.props.inputValue,m=f.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(m,{action:"input-change",prevInputValue:p}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(f){o.props.onFocus&&o.props.onFocus(f),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(f){var p=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(f),o.onInputChange("",{action:"input-blur",prevInputValue:p}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(f){if(!(o.blockOptionHover||o.state.focusedOption===f)){var p=o.getFocusableOptions(),m=p.indexOf(f);o.setState({focusedOption:f,focusedOptionId:m>-1?o.getFocusedOptionId(f):null})}},o.shouldHideSelectedOptions=function(){return VW(o.props)},o.onValueInputFocus=function(f){f.preventDefault(),f.stopPropagation(),o.focus()},o.onKeyDown=function(f){var p=o.props,m=p.isMulti,g=p.backspaceRemovesValue,b=p.escapeClearsValue,S=p.inputValue,w=p.isClearable,x=p.isDisabled,E=p.menuIsOpen,C=p.onKeyDown,N=p.tabSelectsValue,O=p.openMenuOnFocus,k=o.state,M=k.focusedOption,D=k.focusedValue,P=k.selectValue;if(!x&&!(typeof C=="function"&&(C(f),f.defaultPrevented))){switch(o.blockOptionHover=!0,f.key){case"ArrowLeft":if(!m||S)return;o.focusValue("previous");break;case"ArrowRight":if(!m||S)return;o.focusValue("next");break;case"Delete":case"Backspace":if(S)return;if(D)o.removeValue(D);else{if(!g)return;m?o.popValue():w&&o.clearValue()}break;case"Tab":if(o.isComposing||f.shiftKey||!E||!N||!M||O&&o.isOptionSelected(M,P))return;o.selectOption(M);break;case"Enter":if(f.keyCode===229)break;if(E){if(!M||o.isComposing)return;o.selectOption(M);break}return;case"Escape":E?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:S}),o.onMenuClose()):w&&b&&o.clearValue();break;case" ":if(S)return;if(!E){o.openMenu("first");break}if(!M)return;o.selectOption(M);break;case"ArrowUp":E?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":E?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!E)return;o.focusOption("pageup");break;case"PageDown":if(!E)return;o.focusOption("pagedown");break;case"Home":if(!E)return;o.focusOption("first");break;case"End":if(!E)return;o.focusOption("last");break;default:return}f.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Lve),o.state.selectValue=b6(r.value),r.menuIsOpen&&o.state.selectValue.length){var a=o.getFocusableOptionsWithIds(),s=o.buildFocusableOptions(),u=s.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=a,o.state.focusedOption=s[u],o.state.focusedOptionId=FD(a,s[u])}return o}return h0e(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&v6(this.menuListRef,this.focusedOptionRef),Cve()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var a=this.props,s=a.isDisabled,u=a.menuIsOpen,f=this.state.isFocused;(f&&!s&&o.isDisabled||f&&u&&!o.menuIsOpen)&&this.focusInput(),f&&s&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!f&&!s&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(v6(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,a){this.props.onInputChange(o,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var a=this,s=this.state,u=s.selectValue,f=s.isFocused,p=this.buildFocusableOptions(),m=o==="first"?0:p.length-1;if(!this.props.isMulti){var g=p.indexOf(u[0]);g>-1&&(m=g)}this.scrollToFocusedOptionOnUpdate=!(f&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:p[m],focusedOptionId:this.getFocusedOptionId(p[m])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(o){var a=this.state,s=a.selectValue,u=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var f=s.indexOf(u);u||(f=-1);var p=s.length-1,m=-1;if(s.length){switch(o){case"previous":f===0?m=0:f===-1?m=p:m=f-1;break;case"next":f>-1&&f<p&&(m=f+1);break}this.setState({inputIsHidden:m!==-1,focusedValue:s[m]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,s=this.state.focusedOption,u=this.getFocusableOptions();if(u.length){var f=0,p=u.indexOf(s);s||(p=-1),o==="up"?f=p>0?p-1:u.length-1:o==="down"?f=(p+1)%u.length:o==="pageup"?(f=p-a,f<0&&(f=0)):o==="pagedown"?(f=p+a,f>u.length-1&&(f=u.length-1)):o==="last"&&(f=u.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:u[f],focusedValue:null,focusedOptionId:this.getFocusedOptionId(u[f])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme($D):Ot(Ot({},$D),this.props.theme):$D}},{key:"getCommonProps",value:function(){var o=this.clearValue,a=this.cx,s=this.getStyles,u=this.getClassNames,f=this.getValue,p=this.selectOption,m=this.setValue,g=this.props,b=g.isMulti,S=g.isRtl,w=g.options,x=this.hasValue();return{clearValue:o,cx:a,getStyles:s,getClassNames:u,getValue:f,hasValue:x,isMulti:b,isRtl:S,options:w,selectOption:p,selectProps:g,setValue:m,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,a=o.isClearable,s=o.isMulti;return a===void 0?s:a}},{key:"isOptionDisabled",value:function(o,a){return FW(this.props,o,a)}},{key:"isOptionSelected",value:function(o,a){return LW(this.props,o,a)}},{key:"filterOption",value:function(o,a){return BW(this.props,o,a)}},{key:"formatOptionLabel",value:function(o,a){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,u=this.state.selectValue;return this.props.formatOptionLabel(o,{context:a,inputValue:s,selectValue:u})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,a=o.isDisabled,s=o.isSearchable,u=o.inputId,f=o.inputValue,p=o.tabIndex,m=o.form,g=o.menuIsOpen,b=o.required,S=this.getComponents(),w=S.Input,x=this.state,E=x.inputIsHidden,C=x.ariaSelection,N=this.commonProps,O=u||this.getElementId("input"),k=Ot(Ot(Ot({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":b,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?C?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?F.createElement(w,Ct({},N,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:O,innerRef:this.getInputRef,isDisabled:a,isHidden:E,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:p,form:m,type:"text",value:f},k)):F.createElement(cve,Ct({id:O,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:GR,onFocus:this.onInputFocus,disabled:a,tabIndex:p,inputMode:"none",form:m,value:""},k))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,a=this.getComponents(),s=a.MultiValue,u=a.MultiValueContainer,f=a.MultiValueLabel,p=a.MultiValueRemove,m=a.SingleValue,g=a.Placeholder,b=this.commonProps,S=this.props,w=S.controlShouldRenderValue,x=S.isDisabled,E=S.isMulti,C=S.inputValue,N=S.placeholder,O=this.state,k=O.selectValue,M=O.focusedValue,D=O.isFocused;if(!this.hasValue()||!w)return C?null:F.createElement(g,Ct({},b,{key:"placeholder",isDisabled:x,isFocused:D,innerProps:{id:this.getElementId("placeholder")}}),N);if(E)return k.map(function(B,V){var U=B===M,X="".concat(o.getOptionLabel(B),"-").concat(o.getOptionValue(B));return F.createElement(s,Ct({},b,{components:{Container:u,Label:f,Remove:p},isFocused:U,isDisabled:x,key:X,index:V,removeProps:{onClick:function(){return o.removeValue(B)},onTouchEnd:function(){return o.removeValue(B)},onMouseDown:function(J){J.preventDefault()}},data:B}),o.formatOptionLabel(B,"value"))});if(C)return null;var P=k[0];return F.createElement(m,Ct({},b,{data:P,isDisabled:x}),this.formatOptionLabel(P,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),a=o.ClearIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,p=u.isLoading,m=this.state.isFocused;if(!this.isClearable()||!a||f||!this.hasValue()||p)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return F.createElement(a,Ct({},s,{innerProps:g,isFocused:m}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),a=o.LoadingIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,p=u.isLoading,m=this.state.isFocused;if(!a||!p)return null;var g={"aria-hidden":"true"};return F.createElement(a,Ct({},s,{innerProps:g,isDisabled:f,isFocused:m}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator,s=o.IndicatorSeparator;if(!a||!s)return null;var u=this.commonProps,f=this.props.isDisabled,p=this.state.isFocused;return F.createElement(s,Ct({},u,{isDisabled:f,isFocused:p}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator;if(!a)return null;var s=this.commonProps,u=this.props.isDisabled,f=this.state.isFocused,p={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return F.createElement(a,Ct({},s,{innerProps:p,isDisabled:u,isFocused:f}))}},{key:"renderMenu",value:function(){var o=this,a=this.getComponents(),s=a.Group,u=a.GroupHeading,f=a.Menu,p=a.MenuList,m=a.MenuPortal,g=a.LoadingMessage,b=a.NoOptionsMessage,S=a.Option,w=this.commonProps,x=this.state.focusedOption,E=this.props,C=E.captureMenuScroll,N=E.inputValue,O=E.isLoading,k=E.loadingMessage,M=E.minMenuHeight,D=E.maxMenuHeight,P=E.menuIsOpen,B=E.menuPlacement,V=E.menuPosition,U=E.menuPortalTarget,X=E.menuShouldBlockScroll,L=E.menuShouldScrollIntoView,J=E.noOptionsMessage,Y=E.onMenuScrollToTop,ee=E.onMenuScrollToBottom;if(!P)return null;var H=function(Z,K){var se=Z.type,de=Z.data,pe=Z.isDisabled,he=Z.isSelected,we=Z.label,_e=Z.value,ue=x===de,fe=pe?void 0:function(){return o.onOptionHover(de)},be=pe?void 0:function(){return o.selectOption(de)},me="".concat(o.getElementId("option"),"-").concat(K),De={id:me,onClick:be,onMouseMove:fe,onMouseOver:fe,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:he};return F.createElement(S,Ct({},w,{innerProps:De,data:de,isDisabled:pe,isSelected:he,key:me,label:we,type:se,value:_e,isFocused:ue,innerRef:ue?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(Z.data,"menu"))},ne;if(this.hasOptions())ne=this.getCategorizedOptions().map(function(ie){if(ie.type==="group"){var Z=ie.data,K=ie.options,se=ie.index,de="".concat(o.getElementId("group"),"-").concat(se),pe="".concat(de,"-heading");return F.createElement(s,Ct({},w,{key:de,data:Z,options:K,Heading:u,headingProps:{id:pe,data:ie.data},label:o.formatGroupLabel(ie.data)}),ie.options.map(function(he){return H(he,"".concat(se,"-").concat(he.index))}))}else if(ie.type==="option")return H(ie,"".concat(ie.index))});else if(O){var Q=k({inputValue:N});if(Q===null)return null;ne=F.createElement(g,w,Q)}else{var ae=J({inputValue:N});if(ae===null)return null;ne=F.createElement(b,w,ae)}var q={minMenuHeight:M,maxMenuHeight:D,menuPlacement:B,menuPosition:V,menuShouldScrollIntoView:L},W=F.createElement(L0e,Ct({},w,q),function(ie){var Z=ie.ref,K=ie.placerProps,se=K.placement,de=K.maxHeight;return F.createElement(f,Ct({},w,q,{innerRef:Z,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:O,placement:se}),F.createElement(yve,{captureEnabled:C,onTopArrive:Y,onBottomArrive:ee,lockEnabled:X},function(pe){return F.createElement(p,Ct({},w,{innerRef:function(we){o.getMenuListRef(we),pe(we)},innerProps:{role:"listbox","aria-multiselectable":w.isMulti,id:o.getElementId("listbox")},isLoading:O,maxHeight:de,focusedOption:x}),ne)}))});return U||V==="fixed"?F.createElement(m,Ct({},w,{appendTo:U,controlElement:this.controlRef,menuPlacement:B,menuPosition:V}),W):W}},{key:"renderFormField",value:function(){var o=this,a=this.props,s=a.delimiter,u=a.isDisabled,f=a.isMulti,p=a.name,m=a.required,g=this.state.selectValue;if(m&&!this.hasValue()&&!u)return F.createElement(xve,{name:p,onFocus:this.onValueInputFocus});if(!(!p||u))if(f)if(s){var b=g.map(function(x){return o.getOptionValue(x)}).join(s);return F.createElement("input",{name:p,type:"hidden",value:b})}else{var S=g.length>0?g.map(function(x,E){return F.createElement("input",{key:"i-".concat(E),name:p,type:"hidden",value:o.getOptionValue(x)})}):F.createElement("input",{name:p,type:"hidden",value:""});return F.createElement("div",null,S)}else{var w=g[0]?this.getOptionValue(g[0]):"";return F.createElement("input",{name:p,type:"hidden",value:w})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,a=this.state,s=a.ariaSelection,u=a.focusedOption,f=a.focusedValue,p=a.isFocused,m=a.selectValue,g=this.getFocusableOptions();return F.createElement(ove,Ct({},o,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:u,focusedValue:f,isFocused:p,selectValue:m,focusableOptions:g,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),a=o.Control,s=o.IndicatorsContainer,u=o.SelectContainer,f=o.ValueContainer,p=this.props,m=p.className,g=p.id,b=p.isDisabled,S=p.menuIsOpen,w=this.state.isFocused,x=this.commonProps=this.getCommonProps();return F.createElement(u,Ct({},x,{className:m,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:w}),this.renderLiveRegion(),F.createElement(a,Ct({},x,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:w,menuIsOpen:S}),F.createElement(f,Ct({},x,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),F.createElement(s,Ct({},x,{isDisabled:b}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,a){var s=a.prevProps,u=a.clearFocusValueOnUpdate,f=a.inputIsHiddenAfterUpdate,p=a.ariaSelection,m=a.isFocused,g=a.prevWasFocused,b=a.instancePrefix,S=o.options,w=o.value,x=o.menuIsOpen,E=o.inputValue,C=o.isMulti,N=b6(w),O={};if(s&&(w!==s.value||S!==s.options||x!==s.menuIsOpen||E!==s.inputValue)){var k=x?zve(o,N):[],M=x?I6(aR(o,N),"".concat(b,"-option")):[],D=u?$ve(a,N):null,P=Fve(a,k),B=FD(M,P);O={selectValue:N,focusedOption:P,focusedOptionId:B,focusableOptionsWithIds:M,focusedValue:D,clearFocusValueOnUpdate:!1}}var V=f!=null&&o!==s?{inputIsHidden:f,inputIsHiddenAfterUpdate:void 0}:{},U=p,X=m&&g;return m&&!X&&(U={value:NA(C,N,N[0]||null),options:N,action:"initial-input-focus"},X=!g),p?.action==="initial-input-focus"&&(U=null),Ot(Ot(Ot({},O),V),{},{prevProps:o,ariaSelection:U,prevWasFocused:X})}}]),n})(oe.Component);UW.defaultProps=Pve;var Bve=oe.forwardRef(function(e,t){var n=d0e(e);return F.createElement(UW,Ct({ref:t},n))}),Vve=Bve;const Uve=({options:e,items_per_page:t,className:n,defaultValue:r,onChange:o})=>{const[a,s]=oe.useState(""),[u,f]=oe.useState(0),p=S=>{s(S.toLowerCase()),f(0)},m=e.filter(S=>S.label.toLowerCase().includes(a)||S.value.toLowerCase().includes(a));var g;t!==void 0?g=m.slice(u*t,(u+1)*t):g=m;const b={control:S=>({...S,minHeight:void 0})};return A.jsx(Vve,{options:g,onInputChange:p,onChange:o,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:n,unstyled:!0,styles:b,classNamePrefix:"styled-select",defaultValue:r,value:r})},Hve=e=>typeof e=="boolean"||e instanceof Boolean,Gve=e=>typeof e=="number"||e instanceof Number,Yve=e=>typeof e=="bigint"||e instanceof BigInt,HW=e=>!!e&&e instanceof Date,qve=e=>typeof e=="string"||e instanceof String,Xve=e=>Array.isArray(e),GW=e=>typeof e=="object"&&e!==null,YW=e=>!!e&&e instanceof Object&&typeof e=="function";function XR(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function Wve(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function qW(e){let{field:t,value:n,data:r,lastElement:o,openBracket:a,closeBracket:s,level:u,style:f,shouldExpandNode:p,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const S=oe.useRef(!1),[w,x]=oe.useState(()=>p(u,n,t)),E=oe.useRef(null);oe.useEffect(()=>{S.current?x(p(u,n,t)):S.current=!0},[p]);const C=oe.useId();if(r.length===0)return Zve({field:t,openBracket:a,closeBracket:s,lastElement:o,style:f});const N=w?f.collapseIcon:f.expandIcon,O=w?f.ariaLables.collapseJson:f.ariaLables.expandJson,k=u+1,M=r.length-1,D=V=>{w!==V&&(!b||b({level:u,value:n,field:t,newExpandValue:V}))&&x(V)},P=V=>{if(V.key==="ArrowRight"||V.key==="ArrowLeft")V.preventDefault(),D(V.key==="ArrowRight");else if(V.key==="ArrowUp"||V.key==="ArrowDown"){V.preventDefault();const U=V.key==="ArrowUp"?-1:1;if(!g.current)return;const X=g.current.querySelectorAll("[role=button]");let L=-1;for(let Y=0;Y<X.length;Y++)if(X[Y].tabIndex===0){L=Y;break}if(L<0)return;const J=(L+U+X.length)%X.length;X[L].tabIndex=-1,X[J].tabIndex=0,X[J].focus()}},B=()=>{var V;D(!w);const U=E.current;if(!U)return;const X=(V=g.current)===null||V===void 0?void 0:V.querySelector('[role=button][tabindex="0"]');X&&(X.tabIndex=-1),U.tabIndex=0,U.focus()};return oe.createElement("div",{className:f.basicChildStyle,role:"treeitem","aria-expanded":w,"aria-selected":void 0},oe.createElement("span",{className:N,onClick:B,onKeyDown:P,role:"button","aria-label":O,"aria-expanded":w,"aria-controls":w?C:void 0,ref:E,tabIndex:u===0?0:-1}),(t||t==="")&&(m?oe.createElement("span",{className:f.clickableLabel,onClick:B,onKeyDown:P},XR(t,f.quotesForFieldNames),":"):oe.createElement("span",{className:f.label},XR(t,f.quotesForFieldNames),":")),oe.createElement("span",{className:f.punctuation},a),w?oe.createElement("ul",{id:C,role:"group",className:f.childFieldsContainer},r.map((V,U)=>oe.createElement(Y3,{key:V[0]||U,field:V[0],value:V[1],style:f,lastElement:U===M,level:k,shouldExpandNode:p,clickToExpandNode:m,beforeExpandChange:b,outerRef:g}))):oe.createElement("span",{className:f.collapsedContent,onClick:B,onKeyDown:P}),oe.createElement("span",{className:f.punctuation},s),!o&&oe.createElement("span",{className:f.punctuation},","))}function Zve(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:a}=e;return oe.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&oe.createElement("span",{className:a.label},XR(t,a.quotesForFieldNames),":"),oe.createElement("span",{className:a.punctuation},n),oe.createElement("span",{className:a.punctuation},r),!o&&oe.createElement("span",{className:a.punctuation},","))}function Jve(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:a,clickToExpandNode:s,level:u,outerRef:f,beforeExpandChange:p}=e;return qW({field:t,value:n,lastElement:o||!1,level:u,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:a,clickToExpandNode:s,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:f,beforeExpandChange:p})}function Kve(e){let{field:t,value:n,style:r,lastElement:o,level:a,shouldExpandNode:s,clickToExpandNode:u,outerRef:f,beforeExpandChange:p}=e;return qW({field:t,value:n,lastElement:o||!1,level:a,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:u,data:n.map(m=>[void 0,m]),outerRef:f,beforeExpandChange:p})}function Qve(e){let{field:t,value:n,style:r,lastElement:o}=e,a,s=r.otherValue;return n===null?(a="null",s=r.nullValue):n===void 0?(a="undefined",s=r.undefinedValue):qve(n)?(a=Wve(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):Hve(n)?(a=n?"true":"false",s=r.booleanValue):Gve(n)?(a=n.toString(),s=r.numberValue):Yve(n)?(a=`${n.toString()}n`,s=r.numberValue):HW(n)?a=n.toISOString():YW(n)?a="function() { }":a=n.toString(),oe.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&oe.createElement("span",{className:r.label},XR(t,r.quotesForFieldNames),":"),oe.createElement("span",{className:s},a),!o&&oe.createElement("span",{className:r.punctuation},","))}function Y3(e){const t=e.value;return Xve(t)?oe.createElement(Kve,Object.assign({},e)):GW(t)&&!HW(t)&&!YW(t)?oe.createElement(Jve,Object.assign({},e)):oe.createElement(Qve,Object.assign({},e))}var ir={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const XW={collapseJson:"collapse JSON",expandJson:"expand JSON"},LD={container:ir["container-light"],basicChildStyle:ir["basic-element-style"],childFieldsContainer:ir["child-fields-container"],label:ir["label-light"],clickableLabel:ir["clickable-label-light"],nullValue:ir["value-null-light"],undefinedValue:ir["value-undefined-light"],stringValue:ir["value-string-light"],booleanValue:ir["value-boolean-light"],numberValue:ir["value-number-light"],otherValue:ir["value-other-light"],punctuation:ir["punctuation-light"],collapseIcon:ir["collapse-icon-light"],expandIcon:ir["expand-icon-light"],collapsedContent:ir["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:XW,stringifyStringValues:!1},e1e={container:ir["container-dark"],basicChildStyle:ir["basic-element-style"],childFieldsContainer:ir["child-fields-container"],label:ir["label-dark"],clickableLabel:ir["clickable-label-dark"],nullValue:ir["value-null-dark"],undefinedValue:ir["value-undefined-dark"],stringValue:ir["value-string-dark"],booleanValue:ir["value-boolean-dark"],numberValue:ir["value-number-dark"],otherValue:ir["value-other-dark"],punctuation:ir["punctuation-dark"],collapseIcon:ir["collapse-icon-dark"],expandIcon:ir["expand-icon-dark"],collapsedContent:ir["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:XW,stringifyStringValues:!1},t1e=()=>!0,n1e=e=>e<1,r1e=e=>{let{data:t,style:n=LD,shouldExpandNode:r=t1e,clickToExpandNode:o=!1,beforeExpandChange:a,compactTopLevel:s,...u}=e;const f=oe.useRef(null);return oe.createElement("div",Object.assign({"aria-label":"JSON view"},u,{className:n.container,ref:f,role:"tree"}),s&&GW(t)?Object.entries(t).map(p=>{let[m,g]=p;return oe.createElement(Y3,{key:m,field:m,value:g,style:{...LD,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:o,beforeExpandChange:a,outerRef:f})}):oe.createElement(Y3,{value:t,style:{...LD,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:f,beforeExpandChange:a}))};function o1e(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}function i1e(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype?!1:o1e(e)}const a1e=({data:e,className:t="json-display"})=>A.jsx("div",{className:t,children:A.jsx(r1e,{data:i1e(e)?"":e,style:e1e,shouldExpandNode:n1e})});function s1e(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:a=.9}=n;if(!e||!t)return;if(a>=1||a<=0)throw new Error("decrementFactor must be between 0 and 1");const s=e.getBoundingClientRect(),u=s.width,f=s.height;let p=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=p+"px";let m=t.getBoundingClientRect();for(;(m.width>u||m.height>f)&&p>o;)p*=a,t.style.fontSize=p+"px",m=t.getBoundingClientRect()}function l1e(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n=0,unit_scale:r=!1,elapsed:o=0,unit:a="it",unit_divisor:s=1e3,prefix:u="",rate:f=void 0,postfix:p=null,initial:m=0}=e;t!==null&&n>=t+.5&&(t=null);let g=n,b=t,S=f;r&&r!==!0&&r!==1&&(t!==null&&(b=t*r),g=n*r,f!==void 0&&(S=f*r));const w=j6(o);S===void 0&&o>0&&(S=(g-m)/o);const x=S?1/S:void 0,[E,C]=S?kA(S,s):[void 0,""],[N,O]=x?kA(x,1e3):[void 0,""],k=(E||"?")+`${C}${a}/s`,M=N?`${N}${O}s/`+a:"?",D=x&&x>1?M:k,P=r?kA(g,s).join(""):g.toString(),B=r&&b!==null?kA(b,s).join(""):b?.toString()??"?",V=S&&b!==null?(b-g)/S:0,U=S?j6(V):"?",X=u?`${u}: `:"";if(t!==null){const L=g/t*100,J=` ${P}/${B} [${w} < ${U}, ${D}${p??""}]`;return`${X}${L.toFixed(0)}%${J}`}return`${X}${P}${a} [${w}, ${D}${p??""}]`}function j6(e){const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function kA(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const u1e=({state:e,className:t="reacttqdm",...n})=>{const r=oe.useRef(null),o=oe.useRef(null);oe.useEffect(()=>{const s=()=>{!r.current||!o.current||s1e(r.current,o.current,{maxFontSize:12,decrementFactor:.9})};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]);const a=e.total?(e.n??0)/e.total*100:0;return A.jsx("div",{ref:r,className:t,...n,children:A.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[A.jsx("div",{className:t+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"},children:A.jsx("div",{className:t+"-progress",style:{width:`${a}%`,height:"100%"}})}),A.jsx("div",{className:t+"-text",ref:o,children:l1e(e)})]})})};var MA={};var P6;function c1e(){if(P6)return MA;P6=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;MA.format=s,MA.parse=u;function s(g){if(!g||typeof g!="object")throw new TypeError("argument obj is required");var b=g.parameters,S=g.type;if(!S||!a.test(S))throw new TypeError("invalid type");var w=S;if(b&&typeof b=="object")for(var x,E=Object.keys(b).sort(),C=0;C<E.length;C++){if(x=E[C],!n.test(x))throw new TypeError("invalid parameter name");w+="; "+x+"="+p(b[x])}return w}function u(g){if(!g)throw new TypeError("argument string is required");var b=typeof g=="object"?f(g):g;if(typeof b!="string")throw new TypeError("argument string is required to be a string");var S=b.indexOf(";"),w=S!==-1?b.slice(0,S).trim():b.trim();if(!a.test(w))throw new TypeError("invalid media type");var x=new m(w.toLowerCase());if(S!==-1){var E,C,N;for(e.lastIndex=S;C=e.exec(b);){if(C.index!==S)throw new TypeError("invalid parameter format");S+=C[0].length,E=C[1].toLowerCase(),N=C[2],N.charCodeAt(0)===34&&(N=N.slice(1,-1),N.indexOf("\\")!==-1&&(N=N.replace(r,"$1"))),x.parameters[E]=N}if(S!==b.length)throw new TypeError("invalid parameter format")}return x}function f(g){var b;if(typeof g.getHeader=="function"?b=g.getHeader("content-type"):typeof g.headers=="object"&&(b=g.headers&&g.headers["content-type"]),typeof b!="string")throw new TypeError("content-type header is missing from object");return b}function p(g){var b=String(g);if(n.test(b))return b;if(b.length>0&&!t.test(b))throw new TypeError("invalid parameter value");return'"'+b.replace(o,"\\$1")+'"'}function m(g){this.parameters=Object.create(null),this.type=g}return MA}var f1e=c1e(),r1=new Map,WW=function(t){return t.cloneNode(!0)},z6=function(){return window.location.protocol==="file:"},ZW=function(t,n,r){var o=new XMLHttpRequest;o.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&o.readyState===2){var a=o.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var s=f1e.parse(a).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(o.readyState===4){if(o.status===404||o.responseXML===null)throw new Error(z6()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(o.status===200||z6()&&o.status===0)r(null,o);else throw new Error("There was a problem injecting the SVG: "+o.status+" "+o.statusText)}}catch(u){if(o.abort(),u instanceof Error)r(u,o);else throw u}},o.open("GET",t),o.withCredentials=n,o.overrideMimeType&&o.overrideMimeType("text/xml"),o.send()},pm={},$6=function(t,n){pm[t]=pm[t]||[],pm[t].push(n)},d1e=function(t){for(var n=function(s,u){setTimeout(function(){if(Array.isArray(pm[t])){var f=r1.get(t),p=pm[t][s];f instanceof SVGSVGElement&&p(null,WW(f)),f instanceof Error&&p(f),s===pm[t].length-1&&delete pm[t]}},0)},r=0,o=pm[t].length;r<o;r++)n(r)},p1e=function(t,n,r){if(r1.has(t)){var o=r1.get(t);if(o===void 0){$6(t,r);return}if(o instanceof SVGSVGElement){r(null,WW(o));return}}r1.set(t,void 0),$6(t,r),ZW(t,n,function(a,s){var u;a?r1.set(t,a):((u=s.responseXML)===null||u===void 0?void 0:u.documentElement)instanceof SVGSVGElement&&r1.set(t,s.responseXML.documentElement),d1e(t)})},h1e=function(t,n,r){ZW(t,n,function(o,a){var s;o?r(o):((s=a.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,a.responseXML.documentElement)})},m1e=0,g1e=function(){return++m1e},Hc=[],F6={},y1e="http://www.w3.org/2000/svg",BD="http://www.w3.org/1999/xlink",L6=function(t,n,r,o,a,s,u){var f=t.getAttribute("data-src")||t.getAttribute("src");if(!f){u(new Error("Invalid data-src or src attribute"));return}if(Hc.indexOf(t)!==-1){Hc.splice(Hc.indexOf(t),1),t=null;return}Hc.push(t),t.setAttribute("src","");var p=o?p1e:h1e;p(f,a,function(m,g){if(!g){Hc.splice(Hc.indexOf(t),1),t=null,u(m);return}var b=t.getAttribute("id");b&&g.setAttribute("id",b);var S=t.getAttribute("title");S&&g.setAttribute("title",S);var w=t.getAttribute("width");w&&g.setAttribute("width",w);var x=t.getAttribute("height");x&&g.setAttribute("height",x);var E=Array.from(new Set(QO(QO(QO([],(g.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();g.setAttribute("class",E);var C=t.getAttribute("style");C&&g.setAttribute("style",C),g.setAttribute("data-src",f);var N=[].filter.call(t.attributes,function(Q){return/^data-\w[\w-]*$/.test(Q.name)});if(Array.prototype.forEach.call(N,function(Q){Q.name&&Q.value&&g.setAttribute(Q.name,Q.value)}),r){var O={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},k,M,D,P,B;Object.keys(O).forEach(function(Q){k=Q,D=O[Q],M=g.querySelectorAll(k+"[id]");for(var ae=function(Z,K){P=M[Z].id,B=P+"-"+g1e();var se;Array.prototype.forEach.call(D,function(be){se=g.querySelectorAll("["+be+'*="'+P+'"]');for(var me=0,De=se.length;me<De;me++){var Fe=se[me].getAttribute(be);Fe&&!Fe.match(new RegExp('url\\("?#'+P+'"?\\)'))||se[me].setAttribute(be,"url(#"+B+")")}});for(var de=g.querySelectorAll("[*|href]"),pe=[],he=0,we=de.length;he<we;he++){var _e=de[he].getAttributeNS(BD,"href");_e&&_e.toString()==="#"+M[Z].id&&pe.push(de[he])}for(var ue=0,fe=pe.length;ue<fe;ue++)pe[ue].setAttributeNS(BD,"href","#"+B);M[Z].id=B},q=0,W=M.length;q<W;q++)ae(q)})}g.removeAttribute("xmlns:a");for(var V=g.querySelectorAll("script"),U=[],X,L,J=0,Y=V.length;J<Y;J++)L=V[J].getAttribute("type"),(!L||L==="application/ecmascript"||L==="application/javascript"||L==="text/javascript")&&(X=V[J].innerText||V[J].textContent,X&&U.push(X),g.removeChild(V[J]));if(U.length>0&&(n==="always"||n==="once"&&!F6[f])){for(var ee=0,H=U.length;ee<H;ee++)new Function(U[ee])(window);F6[f]=!0}var ne=g.querySelectorAll("style");if(Array.prototype.forEach.call(ne,function(Q){Q.textContent+=""}),g.setAttribute("xmlns",y1e),g.setAttribute("xmlns:xlink",BD),s(g),!t.parentNode){Hc.splice(Hc.indexOf(t),1),t=null,u(new Error("Parent node is null"));return}t.parentNode.replaceChild(g,t),Hc.splice(Hc.indexOf(t),1),t=null,u(null,g)})},b1e=function(t,n){var r=n===void 0?{}:n,o=r.afterAll,a=o===void 0?function(){}:o,s=r.afterEach,u=s===void 0?function(){}:s,f=r.beforeEach,p=f===void 0?function(){}:f,m=r.cacheRequests,g=m===void 0?!0:m,b=r.evalScripts,S=b===void 0?"never":b,w=r.httpRequestWithCredentials,x=w===void 0?!1:w,E=r.renumerateIRIElements,C=E===void 0?!0:E;if(t&&"length"in t)for(var N=0,O=0,k=t.length;O<k;O++)L6(t[O],S,C,g,x,p,function(M,D){u(M,D),t&&"length"in t&&t.length===++N&&a(N)});else t?L6(t,S,C,g,x,p,function(M,D){u(M,D),a(1),t=null}):a(0)},v1e=function(t){var n=t?.ownerDocument||document;return n.defaultView||window},S1e=function(t,n){for(var r in t)if(!(r in n))return!0;for(var o in n)if(t[o]!==n[o])return!0;return!1},x1e=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],IA="http://www.w3.org/2000/svg",B6="http://www.w3.org/1999/xlink",pP=(function(e){function t(){for(var r,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(u){r.reactWrapper=u},r}O5(t,e);var n=t.prototype;return n.renderSVG=function(){var o=this;if(this.reactWrapper instanceof v1e(this.reactWrapper).Node){var a=this.props,s=a.desc,u=a.evalScripts,f=a.httpRequestWithCredentials,p=a.renumerateIRIElements,m=a.src,g=a.title,b=a.useRequestCache,S=this.props.onError,w=this.props.beforeInjection,x=this.props.afterInjection,E=this.props.wrapper,C,N;E==="svg"?(C=document.createElementNS(IA,E),C.setAttribute("xmlns",IA),C.setAttribute("xmlns:xlink",B6),N=document.createElementNS(IA,E)):(C=document.createElement(E),N=document.createElement(E)),C.appendChild(N),N.dataset.src=m,this.nonReactWrapper=this.reactWrapper.appendChild(C);var O=function(P){if(o.removeSVG(),!o._isMounted){S(P);return}o.setState(function(){return{hasError:!0,isLoading:!1}},function(){S(P)})},k=function(P,B){if(P){O(P);return}o._isMounted&&o.setState(function(){return{isLoading:!1}},function(){try{x(B)}catch(V){O(V)}})},M=function(P){if(P.setAttribute("role","img"),s){var B=P.querySelector(":scope > desc");B&&P.removeChild(B);var V=document.createElement("desc");V.innerHTML=s,P.prepend(V)}if(g){var U=P.querySelector(":scope > title");U&&P.removeChild(U);var X=document.createElement("title");X.innerHTML=g,P.prepend(X)}try{w(P)}catch(L){O(L)}};b1e(N,{afterEach:k,beforeEach:M,cacheRequests:b,evalScripts:u,httpRequestWithCredentials:f,renumerateIRIElements:p})}},n.removeSVG=function(){var o;(o=this.nonReactWrapper)!=null&&o.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(o){var a=this;S1e(Ct({},o),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var o=this.props;o.afterInjection,o.beforeInjection,o.desc,o.evalScripts;var a=o.fallback;o.httpRequestWithCredentials;var s=o.loading;o.renumerateIRIElements,o.src,o.title,o.useRequestCache;var u=o.wrapper,f=ek(o,x1e),p=u;return F.createElement(p,Ct({},f,{ref:this.refCallback},u==="svg"?{xmlns:IA,xmlnsXlink:B6}:{}),this.state.isLoading&&s&&F.createElement(s,null),this.state.hasError&&a&&F.createElement(a,null))},t})(F.Component);pP.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};pP.propTypes={afterInjection:Vo.func,beforeInjection:Vo.func,desc:Vo.string,evalScripts:Vo.oneOf(["always","once","never"]),fallback:Vo.oneOfType([Vo.func,Vo.object,Vo.string]),httpRequestWithCredentials:Vo.bool,loading:Vo.oneOfType([Vo.func,Vo.object,Vo.string]),onError:Vo.func,renumerateIRIElements:Vo.bool,src:Vo.string.isRequired,title:Vo.string,useRequestCache:Vo.bool,wrapper:Vo.oneOf(["div","span","svg"])};const hP=({text:e="No image data provided"})=>A.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100px",border:"1px dashed #ccc",color:"#666"},children:e}),w1e=F.memo(({value:e,format:t="jpeg",alt:n="Base64 image",onError:r,onLoad:o,...a})=>{const[s,u]=F.useState(!1),[f,p]=F.useState(!0),m=F.useRef(null),g=F.useMemo(()=>{if(typeof e=="string")return e;if(e&&typeof e=="object"&&"data"in e){const x=e.data;if(x instanceof ArrayBuffer){const E=new Uint8Array(x);let C="";for(let N=0;N<E.byteLength;N++)C+=String.fromCharCode(E[N]);return btoa(C)}}return""},[e]),b=F.useMemo(()=>g?`data:image/${t};base64,${g}`:"",[g,t]),S=F.useCallback(x=>{u(!0),p(!1),r?.(x)},[r]),w=F.useCallback(()=>{p(!1),u(!1),o?.()},[o]);return F.useEffect(()=>{const x=m.current;if(x)return x.addEventListener("error",S),x.addEventListener("load",w),()=>{x.removeEventListener("error",S),x.removeEventListener("load",w)}},[S,w,e]),F.useEffect(()=>{u(!1),p(!0)},[e]),g?s?A.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100px",border:"1px dashed #ccc",color:"#666"},children:"Failed to load base64 image"}):A.jsx("img",{ref:m,src:b,alt:n,className:`base64-image-renderer image-renderer ${a.className||""} ${f?" loading":""}`,...a}):A.jsx(hP,{})}),E1e=F.memo(({value:e,alt:t="SVG image",onError:n,onLoad:r,...o})=>{const[a,s]=F.useState(!1),u=F.useMemo(()=>{if(!e)return"";try{return`data:image/svg+xml;base64,${btoa(e)}`}catch(p){return console.error("Failed to encode SVG to base64:",p),""}},[e]);F.useEffect(()=>{s(!1)},[e]);const f=F.useCallback(p=>{s(!0),n?.(p)},[n]);return e?a||!u?A.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100px",border:"1px dashed #ccc",color:"#666"},children:"Failed to load SVG"}):A.jsx(pP,{src:u,className:`svg-renderer ${o.className||""}`,style:{maxWidth:"100%",maxHeight:"100%",...o.style},beforeInjection:p=>{p.classList.add("svg-renderer"),p.setAttribute("style","max-width: 100%; max-height: 100%;"),p.setAttribute("width","100%"),p.setAttribute("height","100%"),p.setAttribute("aria-label",t);const m=()=>{s(!1),r?.()},g=b=>{s(!0),n?.(b)};try{p.addEventListener("load",m),p.addEventListener("error",g)}catch{m()}},onError:f}):A.jsx(hP,{})}),_1e=F.memo(({src:e,alt:t="Streaming image",onError:n,onLoad:r,...o})=>{const a=F.useRef(null),[s,u]=F.useState(!1),[f,p]=F.useState(!0);F.useEffect(()=>{a.current&&e&&(p(!0),u(!1),a.current.src=e)},[e]);const m=F.useCallback(b=>{u(!0),p(!1),n?.(b)},[n]),g=F.useCallback(()=>{p(!1),u(!1),r?.()},[r]);return F.useEffect(()=>{const b=a.current;if(b)return b.addEventListener("error",m),b.addEventListener("load",g),()=>{b.removeEventListener("error",m),b.removeEventListener("load",g)}},[m,g]),s?A.jsx(hP,{text:"Failed to load image"}):A.jsx("img",{ref:a,className:`streaming-image image-renderer ${o.className||""} ${f?" loading":""}`,alt:t,...o})});function vk(e){const t=e+"CollectionProvider",[n,r]=Cf(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:E,children:C}=x,N=oe.useRef(null),O=oe.useRef(new Map).current;return A.jsx(o,{scope:E,itemMap:O,collectionRef:N,children:C})};s.displayName=t;const u=e+"CollectionSlot",f=A1(u),p=oe.forwardRef((x,E)=>{const{scope:C,children:N}=x,O=a(u,C),k=Tr(E,O.collectionRef);return A.jsx(f,{ref:k,children:N})});p.displayName=u;const m=e+"CollectionItemSlot",g="data-radix-collection-item",b=A1(m),S=oe.forwardRef((x,E)=>{const{scope:C,children:N,...O}=x,k=oe.useRef(null),M=Tr(E,k),D=a(m,C);return oe.useEffect(()=>(D.itemMap.set(k,{ref:k,...O}),()=>{D.itemMap.delete(k)})),A.jsx(b,{[g]:"",ref:M,children:N})});S.displayName=m;function w(x){const E=a(e+"CollectionConsumer",x);return oe.useCallback(()=>{const N=E.collectionRef.current;if(!N)return[];const O=Array.from(N.querySelectorAll(`[${g}]`));return Array.from(E.itemMap.values()).sort((D,P)=>O.indexOf(D.ref.current)-O.indexOf(P.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:s,Slot:p,ItemSlot:S},w,r]}var C1e=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),T1e="VisuallyHidden",mP=F.forwardRef((e,t)=>A.jsx(gn.span,{...e,ref:t,style:{...C1e,...e.style}}));mP.displayName=T1e;var gP="ToastProvider",[yP,A1e,O1e]=vk("Toast"),[JW]=Cf("Toast",[O1e]),[R1e,Sk]=JW(gP),KW=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=e,[u,f]=F.useState(null),[p,m]=F.useState(0),g=F.useRef(!1),b=F.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${gP}\`. Expected non-empty \`string\`.`),A.jsx(yP.Provider,{scope:t,children:A.jsx(R1e,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:p,viewport:u,onViewportChange:f,onToastAdd:F.useCallback(()=>m(S=>S+1),[]),onToastRemove:F.useCallback(()=>m(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:b,children:s})})};KW.displayName=gP;var QW="ToastViewport",N1e=["F8"],q3="toast.viewportPause",X3="toast.viewportResume",eZ=F.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=N1e,label:o="Notifications ({hotkey})",...a}=e,s=Sk(QW,n),u=A1e(n),f=F.useRef(null),p=F.useRef(null),m=F.useRef(null),g=F.useRef(null),b=Tr(t,g,s.onViewportChange),S=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;F.useEffect(()=>{const E=C=>{r.length!==0&&r.every(O=>C[O]||C.code===O)&&g.current?.focus()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[r]),F.useEffect(()=>{const E=f.current,C=g.current;if(w&&E&&C){const N=()=>{if(!s.isClosePausedRef.current){const D=new CustomEvent(q3);C.dispatchEvent(D),s.isClosePausedRef.current=!0}},O=()=>{if(s.isClosePausedRef.current){const D=new CustomEvent(X3);C.dispatchEvent(D),s.isClosePausedRef.current=!1}},k=D=>{!E.contains(D.relatedTarget)&&O()},M=()=>{E.contains(document.activeElement)||O()};return E.addEventListener("focusin",N),E.addEventListener("focusout",k),E.addEventListener("pointermove",N),E.addEventListener("pointerleave",M),window.addEventListener("blur",N),window.addEventListener("focus",O),()=>{E.removeEventListener("focusin",N),E.removeEventListener("focusout",k),E.removeEventListener("pointermove",N),E.removeEventListener("pointerleave",M),window.removeEventListener("blur",N),window.removeEventListener("focus",O)}}},[w,s.isClosePausedRef]);const x=F.useCallback(({tabbingDirection:E})=>{const N=u().map(O=>{const k=O.ref.current,M=[k,...U1e(k)];return E==="forwards"?M:M.reverse()});return(E==="forwards"?N.reverse():N).flat()},[u]);return F.useEffect(()=>{const E=g.current;if(E){const C=N=>{const O=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!O){const M=document.activeElement,D=N.shiftKey;if(N.target===E&&D){p.current?.focus();return}const V=x({tabbingDirection:D?"backwards":"forwards"}),U=V.findIndex(X=>X===M);VD(V.slice(U+1))?N.preventDefault():D?p.current?.focus():m.current?.focus()}};return E.addEventListener("keydown",C),()=>E.removeEventListener("keydown",C)}},[u,x]),A.jsxs(nfe,{ref:f,role:"region","aria-label":o.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&A.jsx(W3,{ref:p,onFocusFromOutsideViewport:()=>{const E=x({tabbingDirection:"forwards"});VD(E)}}),A.jsx(yP.Slot,{scope:n,children:A.jsx(gn.ol,{tabIndex:-1,...a,ref:b})}),w&&A.jsx(W3,{ref:m,onFocusFromOutsideViewport:()=>{const E=x({tabbingDirection:"backwards"});VD(E)}})]})});eZ.displayName=QW;var tZ="ToastFocusProxy",W3=F.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,a=Sk(tZ,n);return A.jsx(mP,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{const u=s.relatedTarget;!a.viewport?.contains(u)&&r()}})});W3.displayName=tZ;var dC="Toast",k1e="toast.swipeStart",M1e="toast.swipeMove",I1e="toast.swipeCancel",D1e="toast.swipeEnd",nZ=F.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...s}=e,[u,f]=jm({prop:r,defaultProp:o??!0,onChange:a,caller:dC});return A.jsx(Zu,{present:n||u,children:A.jsx(z1e,{open:u,...s,ref:t,onClose:()=>f(!1),onPause:ts(e.onPause),onResume:ts(e.onResume),onSwipeStart:ht(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ht(e.onSwipeMove,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:ht(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ht(e.onSwipeEnd,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),f(!1)})})})});nZ.displayName=dC;var[j1e,P1e]=JW(dC,{onClose(){}}),z1e=F.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:u,onPause:f,onResume:p,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:b,onSwipeEnd:S,...w}=e,x=Sk(dC,n),[E,C]=F.useState(null),N=Tr(t,Y=>C(Y)),O=F.useRef(null),k=F.useRef(null),M=o||x.duration,D=F.useRef(0),P=F.useRef(M),B=F.useRef(0),{onToastAdd:V,onToastRemove:U}=x,X=ts(()=>{E?.contains(document.activeElement)&&x.viewport?.focus(),s()}),L=F.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(B.current),D.current=new Date().getTime(),B.current=window.setTimeout(X,Y))},[X]);F.useEffect(()=>{const Y=x.viewport;if(Y){const ee=()=>{L(P.current),p?.()},H=()=>{const ne=new Date().getTime()-D.current;P.current=P.current-ne,window.clearTimeout(B.current),f?.()};return Y.addEventListener(q3,H),Y.addEventListener(X3,ee),()=>{Y.removeEventListener(q3,H),Y.removeEventListener(X3,ee)}}},[x.viewport,M,f,p,L]),F.useEffect(()=>{a&&!x.isClosePausedRef.current&&L(M)},[a,M,x.isClosePausedRef,L]),F.useEffect(()=>(V(),()=>U()),[V,U]);const J=F.useMemo(()=>E?uZ(E):null,[E]);return x.viewport?A.jsxs(A.Fragment,{children:[J&&A.jsx($1e,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:J}),A.jsx(j1e,{scope:n,onClose:X,children:W_.createPortal(A.jsx(yP.ItemSlot,{scope:n,children:A.jsx(tfe,{asChild:!0,onEscapeKeyDown:ht(u,()=>{x.isFocusedToastEscapeKeyDownRef.current||X(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:A.jsx(gn.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":x.swipeDirection,...w,ref:N,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ht(e.onKeyDown,Y=>{Y.key==="Escape"&&(u?.(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,X()))}),onPointerDown:ht(e.onPointerDown,Y=>{Y.button===0&&(O.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:ht(e.onPointerMove,Y=>{if(!O.current)return;const ee=Y.clientX-O.current.x,H=Y.clientY-O.current.y,ne=!!k.current,Q=["left","right"].includes(x.swipeDirection),ae=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,q=Q?ae(0,ee):0,W=Q?0:ae(0,H),ie=Y.pointerType==="touch"?10:2,Z={x:q,y:W},K={originalEvent:Y,delta:Z};ne?(k.current=Z,DA(M1e,g,K,{discrete:!1})):V6(Z,x.swipeDirection,ie)?(k.current=Z,DA(k1e,m,K,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(ee)>ie||Math.abs(H)>ie)&&(O.current=null)}),onPointerUp:ht(e.onPointerUp,Y=>{const ee=k.current,H=Y.target;if(H.hasPointerCapture(Y.pointerId)&&H.releasePointerCapture(Y.pointerId),k.current=null,O.current=null,ee){const ne=Y.currentTarget,Q={originalEvent:Y,delta:ee};V6(ee,x.swipeDirection,x.swipeThreshold)?DA(D1e,S,Q,{discrete:!0}):DA(I1e,b,Q,{discrete:!0}),ne.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),$1e=e=>{const{__scopeToast:t,children:n,...r}=e,o=Sk(dC,t),[a,s]=F.useState(!1),[u,f]=F.useState(!1);return B1e(()=>s(!0)),F.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),u?null:A.jsx(rk,{asChild:!0,children:A.jsx(mP,{...r,children:a&&A.jsxs(A.Fragment,{children:[o.label," ",n]})})})},F1e="ToastTitle",rZ=F.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return A.jsx(gn.div,{...r,ref:t})});rZ.displayName=F1e;var L1e="ToastDescription",oZ=F.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return A.jsx(gn.div,{...r,ref:t})});oZ.displayName=L1e;var iZ="ToastAction",aZ=F.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?A.jsx(lZ,{altText:n,asChild:!0,children:A.jsx(bP,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${iZ}\`. Expected non-empty \`string\`.`),null)});aZ.displayName=iZ;var sZ="ToastClose",bP=F.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=P1e(sZ,n);return A.jsx(lZ,{asChild:!0,children:A.jsx(gn.button,{type:"button",...r,ref:t,onClick:ht(e.onClick,o.onClose)})})});bP.displayName=sZ;var lZ=F.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return A.jsx(gn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function uZ(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),V1e(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...uZ(r))}}),t}function DA(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?M5(o,a):o.dispatchEvent(a)}var V6=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return t==="left"||t==="right"?a&&r>n:!a&&o>n};function B1e(e=()=>{}){const t=ts(e);sp(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function V1e(e){return e.nodeType===e.ELEMENT_NODE}function U1e(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VD(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var H1e=KW,G1e=eZ,Y1e=nZ,q1e=rZ,X1e=oZ,W1e=aZ,Z1e=bP;const Di=[];for(let e=0;e<256;++e)Di.push((e+256).toString(16).slice(1));function J1e(e,t=0){return(Di[e[t+0]]+Di[e[t+1]]+Di[e[t+2]]+Di[e[t+3]]+"-"+Di[e[t+4]]+Di[e[t+5]]+"-"+Di[e[t+6]]+Di[e[t+7]]+"-"+Di[e[t+8]]+Di[e[t+9]]+"-"+Di[e[t+10]]+Di[e[t+11]]+Di[e[t+12]]+Di[e[t+13]]+Di[e[t+14]]+Di[e[t+15]]).toLowerCase()}let UD;const K1e=new Uint8Array(16);function Q1e(){if(!UD){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");UD=crypto.getRandomValues.bind(crypto)}return UD(K1e)}const eSe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),U6={randomUUID:eSe};function tSe(e,t,n){e=e||{};const r=e.random??e.rng?.()??Q1e();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,J1e(r)}function vP(e,t,n){return U6.randomUUID&&!e?U6.randomUUID():tSe(e)}const cZ=F.createContext(void 0),fZ=F.createContext(void 0),nSe=350,rSe=({children:e,fixedHeight:t,duration:n=5e3,maxVisible:r=3,...o})=>{const[a,s]=F.useState(new Map),u=F.useRef(new Map),f=F.useRef(null),p=F.useRef(!0),m=F.useCallback(()=>{const C=Array.from(u.current).reverse();if(t){const N=t;C.forEach(([,O],k)=>{if(!O)return;O.setAttribute("data-front",String(k===0)),O.setAttribute("data-hidden",String(k>=r)),O.style.setProperty("--index",String(k)),O.style.setProperty("--height",`${t}px`),O.style.setProperty("--front-height",`${N}px`);const M=t*k;O.style.setProperty("--hover-offset-y",`-${M}px`)})}else{const N=C.map(([,k])=>{if(!k)return 0;const M=k.querySelector(".ToastInner");if(!M)return k.clientHeight;const D=M.style.height;M.style.height="auto";const P=k.clientHeight;return M.style.height=D,P}),O=N[0]||0;C.forEach(([,k],M)=>{if(!k)return;const D=N[M];k.setAttribute("data-front",String(M===0)),k.setAttribute("data-hidden",String(M>=r)),k.style.setProperty("--index",String(M)),k.style.setProperty("--height",`${D}px`),k.style.setProperty("--front-height",`${O}px`);const P=N.slice(0,M).reduce((B,V)=>B+V,0);k.style.setProperty("--hover-offset-y",`-${P}px`)})}},[t,r]),g=F.useCallback(C=>{s(N=>{const O=new Map(N);return O.set(vP(),{...C,duration:C.duration||n,open:!0}),O})},[n]),b=F.useCallback(C=>{p.current&&s(N=>{const O=new Map(N);return O.delete(C),O})},[]),S=F.useCallback(C=>g({...C,status:C.status||"default"}),[g]),w=F.useCallback(C=>g({...C,status:"success"}),[g]),x=F.useCallback(C=>g({...C,status:"error"}),[g]);F.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]),F.useEffect(()=>{const C=f.current;if(C){const N=()=>{u.current.forEach(M=>{M.setAttribute("data-hovering","true")})},O=M=>{(!C.contains(M.target)||C===M.target)&&u.current.forEach(D=>{D.setAttribute("data-hovering","false")})},k=()=>{u.current.forEach(M=>{M.setAttribute("data-hovering","false")})};return C.addEventListener("pointermove",N),C.addEventListener("pointerleave",k),C.addEventListener("focusin",N),C.addEventListener("focusout",O),()=>{C.removeEventListener("pointermove",N),C.removeEventListener("pointerleave",k),C.removeEventListener("focusin",N),C.removeEventListener("focusout",O)}}},[]);const E=F.useMemo(()=>Object.assign(S,{success:w,error:x}),[S,w,x]);return A.jsx(cZ.Provider,{value:E,children:A.jsx(fZ.Provider,{value:F.useMemo(()=>({toastElementsMapRef:u,sortToasts:m}),[m]),children:A.jsxs(H1e,{...o,children:[e,Array.from(a).map(([C,N])=>A.jsx(aSe,{id:C,toast:N,onOpenChange:O=>{O||(u.current.delete(C),m(),s(k=>{const M=new Map(k),D=M.get(C);return D&&M.set(C,{...D,open:!1}),M}),setTimeout(()=>{b(C)},nSe))}},C)),A.jsx(G1e,{ref:f,className:"ToastViewport",style:t?{"--fixed-toast-height":`${t}px`}:void 0})]})})})},oSe=()=>{const e=F.useContext(cZ);if(e)return e;throw new Error("useToast must be used within Toasts")},iSe=()=>{const e=F.useContext(fZ);if(e)return e;throw new Error("useToastContext must be used within Toasts")},aSe=({onOpenChange:e,toast:t,id:n,...r})=>{const o=F.useRef(null),a=iSe(),{sortToasts:s,toastElementsMapRef:u}=a,f=u.current;return F.useLayoutEffect(()=>(o.current&&(f.set(n,o.current),s()),()=>{f.delete(n),s()}),[n,s,f]),A.jsx(Y1e,{...r,ref:o,type:t.type,duration:t.duration,className:"ToastRoot",onOpenChange:e,open:t.open,children:A.jsxs("div",{className:"ToastInner","data-status":t.status,children:[A.jsx(sSe,{status:t.status}),t.title&&A.jsx(q1e,{className:"ToastTitle",children:t.title}),A.jsx(X1e,{className:"ToastDescription",children:t.description}),t.action&&A.jsx(W1e,{className:"ToastAction Button small green",altText:t.action.altText,onClick:t.action.onClick,asChild:!0,children:A.jsx("button",{children:t.action.label})}),A.jsx(Z1e,{"aria-label":"Close",className:"ToastClose",children:A.jsx(dk,{style:{fontSize:"12px"}})})]})})},sSe=({status:e})=>e!=="default"&&e?A.jsxs("div",{style:{gridArea:"icon",alignSelf:"start"},children:[e==="success"&&A.jsx(bge,{style:{color:"#61d345",fontSize:"20px"}}),e==="error"&&A.jsx(vge,{style:{color:"#ff4b4b",fontSize:"20px"}})]}):null,lSe={},H6=e=>{let t;const n=new Set,r=(m,g)=>{const b=typeof m=="function"?m(t):m;if(!Object.is(b,t)){const S=t;t=g??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(w=>w(t,S))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>p,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(lSe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},p=t=e(r,o,f);return f},dZ=e=>e?H6(e):H6;var jA={exports:{}},HD={},PA={exports:{}},GD={};var G6;function uSe(){if(G6)return GD;G6=1;var e=oe;function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(g,b){var S=b(),w=r({inst:{value:S,getSnapshot:b}}),x=w[0].inst,E=w[1];return a(function(){x.value=S,x.getSnapshot=b,f(x)&&E({inst:x})},[g,S,b]),o(function(){return f(x)&&E({inst:x}),g(function(){f(x)&&E({inst:x})})},[g]),s(S),S}function f(g){var b=g.getSnapshot;g=g.value;try{var S=b();return!n(g,S)}catch{return!0}}function p(g,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:u;return GD.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,GD}var YD={};var Y6;function cSe(){return Y6||(Y6=1,process.env.NODE_ENV!=="production"&&(function(){function e(S,w){return S===w&&(S!==0||1/S===1/w)||S!==S&&w!==w}function t(S,w){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=w();if(!g){var E=w();a(x,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!0)}E=s({inst:{value:x,getSnapshot:w}});var C=E[0].inst,N=E[1];return f(function(){C.value=x,C.getSnapshot=w,n(C)&&N({inst:C})},[S,x,w]),u(function(){return n(C)&&N({inst:C}),S(function(){n(C)&&N({inst:C})})},[S]),p(x),x}function n(S){var w=S.getSnapshot;S=S.value;try{var x=w();return!a(S,x)}catch{return!0}}function r(S,w){return w()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=oe,a=typeof Object.is=="function"?Object.is:e,s=o.useState,u=o.useEffect,f=o.useLayoutEffect,p=o.useDebugValue,m=!1,g=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;YD.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),YD}var q6;function pZ(){return q6||(q6=1,process.env.NODE_ENV==="production"?PA.exports=uSe():PA.exports=cSe()),PA.exports}var X6;function fSe(){if(X6)return HD;X6=1;var e=oe,t=pZ();function n(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,u=e.useMemo,f=e.useDebugValue;return HD.useSyncExternalStoreWithSelector=function(p,m,g,b,S){var w=a(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=u(function(){function C(D){if(!N){if(N=!0,O=D,D=b(D),S!==void 0&&x.hasValue){var P=x.value;if(S(P,D))return k=P}return k=D}if(P=k,r(O,D))return P;var B=b(D);return S!==void 0&&S(P,B)?(O=D,P):(O=D,k=B)}var N=!1,O,k,M=g===void 0?null:g;return[function(){return C(m())},M===null?void 0:function(){return C(M())}]},[m,g,b,S]);var E=o(p,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=E},[E]),f(E),E},HD}var qD={};var W6;function dSe(){return W6||(W6=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=oe,n=pZ(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,a=t.useRef,s=t.useEffect,u=t.useMemo,f=t.useDebugValue;qD.useSyncExternalStoreWithSelector=function(p,m,g,b,S){var w=a(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=u(function(){function C(D){if(!N){if(N=!0,O=D,D=b(D),S!==void 0&&x.hasValue){var P=x.value;if(S(P,D))return k=P}return k=D}if(P=k,r(O,D))return P;var B=b(D);return S!==void 0&&S(P,B)?(O=D,P):(O=D,k=B)}var N=!1,O,k,M=g===void 0?null:g;return[function(){return C(m())},M===null?void 0:function(){return C(M())}]},[m,g,b,S]);var E=o(p,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=E},[E]),f(E),E},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),qD}var Z6;function pSe(){return Z6||(Z6=1,process.env.NODE_ENV==="production"?jA.exports=fSe():jA.exports=dSe()),jA.exports}var hSe=pSe();const hZ=gp(hSe),mZ={},{useDebugValue:mSe}=oe,{useSyncExternalStoreWithSelector:gSe}=hZ;let J6=!1;const ySe=e=>e;function bSe(e,t=ySe,n){(mZ?"production":void 0)!=="production"&&n&&!J6&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),J6=!0);const r=gSe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return mSe(r),r}const K6=e=>{(mZ?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?dZ(e):e,n=(r,o)=>bSe(t,r,o);return Object.assign(n,t),n},Vl=e=>e?K6(e):K6;class vp{constructor(t){this.context=t}get communicationManager(){return this.context.worker.getCommunicationManager()}get eventManager(){return this.context.worker.getEventManager()}get hookManager(){return this.context.worker.getHookManager()}get nodeManager(){return this.context.worker.getNodeManager()}get syncManager(){return this.context.worker.getSyncManager()}get connectionHealthManager(){return this.context.worker.getConnectionHealthManager()}get edgeManager(){return this.context.worker.getEdgeManager()}get groupManager(){return this.context.worker.getGroupManager()}get libraryManager(){return this.context.worker.getLibraryManager()}}const zA=2e3;class vSe extends vp{constructor(t){super(t),this._responsive=!1,this._last_pong=0,this._last_pong=Date.now()-zA*100}start(){this.stop(),this.pingInterval=setInterval(()=>{this.context.worker.is_open&&this.context.worker.send({type:"ping"})},zA),this.responsivenessCheckInterval=setInterval(()=>{this._responsive=Date.now()-this._last_pong<=zA*3},zA*2)}stop(){this.pingInterval&&clearInterval(this.pingInterval),this.responsivenessCheckInterval&&clearInterval(this.responsivenessCheckInterval)}receivePong(){this._last_pong=Date.now(),this._responsive=!0}isResponsive(){return this._responsive}}const Q6=(e,t)=>{e.properties=e.properties||{},t.pos&&(e.properties["frontend:pos"]=t.pos),t.size&&(e.properties["frontend:size"]=t.size),t.collapsed!==void 0&&(e.properties["frontend:collapsed"]=!!t.collapsed)},eV=2e3,tV=2e3;class SSe extends vp{constructor(t){super(t),this._local_nodeupdates=new Map,this._local_groupupdates=new Map,this.on_sync_complete=t.on_sync_complete||(async()=>{})}start(){this._nodeupdatetimer=setTimeout(()=>{this.sync_local_node_updates()},eV),this._groupupdatetimer=setTimeout(()=>{this.sync_local_group_updates()},tV)}stop(){this._nodeupdatetimer&&clearTimeout(this._nodeupdatetimer),this._groupupdatetimer&&clearTimeout(this._groupupdatetimer)}async stepwise_fullsync(){this.context.worker._zustand&&this.context.worker.is_open&&(await this.sync_lib(),await this.sync_external_worker(),await this.sync_funcnodes_plugins(),await this.sync_nodespace(),await this.sync_view_state(),await this.on_sync_complete(this.context.worker))}async sync_lib(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.communicationManager._send_cmd({cmd:"get_library",wait_for_response:!0,retries:2,unique:!0});this.context.worker._zustand.lib.libstate.getState().set({lib:t})}async sync_external_worker(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.communicationManager._send_cmd({cmd:"get_worker_dependencies",wait_for_response:!0,unique:!0});this.context.worker._zustand.lib.libstate.getState().set({external_worker:t})}async sync_funcnodes_plugins(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_plugin_keys",wait_for_response:!0,unique:!0,kwargs:{type:"react"}});for(const n of t){const r=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_plugin",wait_for_response:!0,kwargs:{key:n,type:"react"},unique:!0});this.context.worker._zustand.add_packed_plugin(n,r)}}async sync_view_state(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"view_state",wait_for_response:!0,unique:!0});t.renderoptions&&this.context.worker._zustand.update_render_options(t.renderoptions);const n=t.nodes;if(n)for(const r in n){const o={};Q6(o,n[r]),this.context.worker._zustand.on_node_action({type:"update",node:o,id:r,from_remote:!0})}}async sync_nodespace(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_nodes",kwargs:{with_frontend:!0},wait_for_response:!0,unique:!0});for(const o of t)this.eventManager._receive_node_added(o);const n=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_edges",wait_for_response:!0,unique:!0});for(const o of n)this.eventManager._receive_edge_added(...o);const r=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_groups",kwargs:{},wait_for_response:!0,unique:!0});this.eventManager._receive_groups(r)}async fullsync(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;let t;for(;;)try{t=await this.communicationManager._send_cmd({cmd:"full_state",unique:!0});break}catch(o){o instanceof Error?this.context.worker._zustand.logger.error("Error in fullsync",o):this.context.worker._zustand.logger.error("Error in fullsync",new Error(JSON.stringify(o)))}this.context.worker._zustand.logger.debug("Full state",t),this.context.worker._zustand.lib.libstate.getState().set({lib:t.backend.lib,external_worker:t.worker_dependencies}),t.view.renderoptions&&this.context.worker._zustand.update_render_options(t.view.renderoptions);const n=t.view.nodes;for(const o of t.backend.nodes){const a=n[o.id];a!==void 0&&Q6(o,a),this.eventManager._receive_node_added(o)}for(const o of t.backend.edges)this.eventManager._receive_edge_added(...o);const r=t.backend.groups;r&&this.eventManager._receive_groups(r)}sync_local_node_updates(){clearTimeout(this._nodeupdatetimer),this._local_nodeupdates.forEach(async(t,n)=>{const r=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"update_node",kwargs:{nid:n,data:t},wait_for_response:!0});this.context.worker._zustand&&Object.keys(r).length>0&&this.context.worker._zustand.on_node_action({type:"update",node:r,id:n,from_remote:!0})}),this._local_nodeupdates.clear(),this._nodeupdatetimer=setTimeout(()=>{this.sync_local_node_updates()},eV)}sync_local_group_updates(){clearTimeout(this._groupupdatetimer),this._local_groupupdates.forEach(async(t,n)=>{const r=await this.communicationManager._send_cmd({cmd:"update_group",kwargs:{gid:n,data:t},wait_for_response:!0});this.context.worker._zustand&&this.context.worker._zustand.on_group_action({type:"update",group:r,id:n,from_remote:!0})}),this._local_groupupdates.clear(),this._groupupdatetimer=setTimeout(()=>{this.sync_local_group_updates()},tV)}locally_update_node(t){const n=this._local_nodeupdates.get(t.id);if(n){const{new_obj:r,change:o}=Wy(n,t.node);o&&this._local_nodeupdates.set(t.id,r)}else this._local_nodeupdates.set(t.id,t.node);t.immediate&&this.sync_local_node_updates()}locally_update_group(t){const n=this._local_groupupdates.get(t.id);if(n){const{new_obj:r,change:o}=Wy(n,t.group);o&&this._local_groupupdates.set(t.id,r)}else this._local_groupupdates.set(t.id,t.group);t.immediate&&this.sync_local_group_updates()}}class Fu{constructor({data:t,mime:n}){this._data=t,this._mime=n}get data(){return this._data}get value(){return this._data}get mime(){return this._mime}toString(){return this._data instanceof ArrayBuffer?`DataStructure(${this._data.byteLength},${this._mime})`:this._data instanceof Blob?`DataStructure(${this._data.size},${this._mime})`:this._data instanceof String?`DataStructure(${this._data.length},${this._mime})`:this._data instanceof Array?`DataStructure(${this._data.length},${this._mime})`:this._data instanceof Object?`DataStructure(${Object.keys(this._data).length},${this._mime})`:`DataStructure(${this._mime})`}toJSON(){return this.toString()}dispose(){}}class SP extends Fu{constructor({data:t,mime:n}){super({data:xk(t),mime:n})}get objectUrl(){if(this._objectUrl)return this._objectUrl;const t=this.data instanceof Blob?this.data:new Blob([this.data],{type:this.mime});return this._objectUrl=URL.createObjectURL(t),this._objectUrl}dispose(){this._objectUrl&&URL.revokeObjectURL(this._objectUrl),super.dispose()}get value(){return this.objectUrl}}const xk=e=>{if(e instanceof ArrayBuffer)return e;const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e),n=new ArrayBuffer(t.byteLength);return new Uint8Array(n).set(t),n},xSe={x:(e,t)=>null,c:(e,t)=>new DataView(e).getInt8(0),B:(e,t)=>new DataView(e).getUint8(0),"?":(e,t)=>new DataView(e).getInt8(0)===1,h:(e,t)=>new DataView(e).getInt16(0,t),H:(e,t)=>new DataView(e).getUint16(0,t),i:(e,t)=>new DataView(e).getInt32(0,t),I:(e,t)=>new DataView(e).getUint32(0,t),l:(e,t)=>new DataView(e).getInt32(0,t),L:(e,t)=>new DataView(e).getUint32(0,t),q:(e,t)=>Number(new DataView(e).getBigInt64(0,t)),Q:(e,t)=>Number(new DataView(e).getBigUint64(0,t)),n:(e,t)=>Number(new DataView(e).getBigInt64(0,t)),N:(e,t)=>Number(new DataView(e).getBigUint64(0,t)),f:(e,t)=>new DataView(e).getFloat32(0,t),d:(e,t)=>new DataView(e).getFloat64(0,t),s:(e,t)=>new TextDecoder().decode(e),p:(e,t)=>new TextDecoder().decode(e),P:(e,t)=>Number(new DataView(e).getBigUint64(0,t))};class xP extends Fu{constructor({data:t,mime:n}){super({data:xk(t),mime:n}),this._cType=n.split("application/fn.struct.")[1],this._value=null,this.parse_value()}parse_value(){let t=!0,n=this._cType;return n.startsWith("<")&&(t=!0,n=n.slice(1)),n.startsWith(">")&&(t=!1,n=n.slice(1)),n.startsWith("!")&&(t=!1,n=n.slice(1)),n.startsWith("@")&&(t=!1,n=n.slice(1)),n.startsWith("=")&&(t=!1,n=n.slice(1)),this._value=xSe[n](this.data,t),this._value}get value(){return this._value}toString(){return this._value===null?"null":this._value.toString()}}class ep extends Fu{constructor({data:t,mime:n}){const r=xk(t);super({data:r,mime:n}),r.byteLength===0?this._json=void 0:(this._json=JSON.parse(new TextDecoder().decode(r)),this._json==="<NoValue>"&&(this._json=void 0))}get value(){return this._json}static fromObject(t){const n=t==="<NoValue>"?new Uint8Array(0):new TextEncoder().encode(JSON.stringify(t));return new ep({data:n,mime:"application/json"})}toString(){return typeof this._json=="string"?this._json:JSON.stringify(this._json)}}class wP extends Fu{constructor({data:t,mime:n}){const r=xk(t);super({data:r,mime:n}),this._value=new TextDecoder().decode(r)}get value(){return this._value}toString(){return this._value}}const gZ=({data:e,mime:t})=>{const n=typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)||n?t.startsWith("application/fn.struct.")?new xP({data:e,mime:t}):t.startsWith("application/json")?new ep({data:e,mime:t}):t==="text"||t.startsWith("text/")?new wP({data:e,mime:t}):new SP({data:e,mime:t}):new Fu({data:e,mime:t})};class wSe extends vp{constructor(t){super(t),this.CHUNK_TIMEOUT=1e4,this._unique_cmd_outs={},this.blobChunks={},this.cleanupChunks=()=>{const n=Date.now();for(const r in this.blobChunks)n-this.blobChunks[r].timestamp>this.CHUNK_TIMEOUT&&delete this.blobChunks[r]},this.messagePromises=new Map}start(){this._chunk_cleanup_timer=setInterval(this.cleanupChunks.bind(this),this.CHUNK_TIMEOUT/2)}stop(){this._chunk_cleanup_timer&&clearInterval(this._chunk_cleanup_timer)}send(t){this.context.worker.send(t)}async _send_cmd({cmd:t,kwargs:n,as_bytes:r=!1,wait_for_response:o=!0,response_timeout:a=5e3,retries:s=2,unique:u=!1}){const f={type:"cmd",as_bytes:r,cmd:t,kwargs:n||{}};if(await new Promise(async p=>{if(this.context.worker.is_responsive)return p();const m=setInterval(()=>{this.context.worker.is_responsive&&(clearInterval(m),p())},100)}),o){if(u&&this._unique_cmd_outs[f.cmd]!==void 0)return this._unique_cmd_outs[f.cmd];s<0&&(s=0);const m=(async()=>{let g;for(;s>=0;){const b=f.id||vP();f.id=b;const S=new Promise((w,x)=>{const E=setTimeout(()=>{x("Timeout@wait_for_response for "+t)},a);this.messagePromises.set(b,{resolve:C=>{clearTimeout(E),w(C),this.messagePromises.delete(b)},reject:C=>{clearTimeout(E),x(C),this.messagePromises.delete(b)}})});await this.send(f);try{g=await S;break}catch(w){if(s===0)throw delete this._unique_cmd_outs[f.cmd],w;s-=1;continue}}return delete this._unique_cmd_outs[f.cmd],g})();return u&&(this._unique_cmd_outs[f.cmd]=m),m}return this.send(f)}async receive(t){let n;switch(this.connectionHealthManager.receivePong(),t.type){case"pong":return this.connectionHealthManager.receivePong();case"nsevent":return await this.context.worker.getEventManager().receive_nodespace_event(t);case"result":if(n=t.id&&this.messagePromises.get(t.id),n)return n.resolve(t.result);break;case"error":if(this.context.worker.on_error(t.tb+`
|
|
974
|
-
`+t.error),n=t.id&&this.messagePromises.get(t.id),n)return n.reject(t.error);break;case"progress":if(!this.context.worker._zustand)return;this.context.worker._zustand.set_progress(t);break;case"workerevent":return await this.context.worker.getEventManager().receive_workerevent(t);case"large_message":return await this.context.worker.handle_large_message_hint(t);default:console.warn("Unhandled message",t);break}}async
|
|
974
|
+
`+t.error),n=t.id&&this.messagePromises.get(t.id),n)return n.reject(t.error);break;case"progress":if(!this.context.worker._zustand)return;this.context.worker._zustand.set_progress(t);break;case"workerevent":return await this.context.worker.getEventManager().receive_workerevent(t);case"large_message":return await this.context.worker.handle_large_message_hint(t);default:console.warn("Unhandled message",t);break}}async receive_bytes(t,n){const{type:r}=t;if(r==="io_value"){if(!this.context.worker._zustand)return;const{node:o,io:a,preview:s,mime:u}=t,f=s?"value":"fullvalue";(!o||!a)&&console.error("Invalid io_value message",t);const p=gZ({data:n,mime:u||"application/octet-stream"});this.context.worker._zustand.on_node_action({type:"update",node:{id:o,io:{[a]:{[f]:p}}},id:o,from_remote:!0})}else if(r=="result"){const o=t.id&&this.messagePromises.get(t.id);o&&o.resolve({bytes:n,header:t})}else console.warn("Unhandled bytes message",t)}async onbytes(t){try{const n=new TextDecoder("utf-8").decode(t),r=n.indexOf(`\r
|
|
975
975
|
\r
|
|
976
976
|
`);if(r===-1){console.error(`Header terminator not found for:
|
|
977
|
-
`,n);return}const o=n.substring(0,r+4),a=t.slice(r+4),s=o.split(";"),u={};if(s.forEach(g=>{const[b,S]=g.split("=");u[b.trim()]=S.trim()}),!u.chunk||!u.msgid){console.error("Header missing required fields chunk or msgid",u);return}const[f,p]=u.chunk.split("/"),m=u.msgid;if(f==="1"&&p==="1")return this.recieve_bytes(u,a);if(this.blobChunks[m]||(this.blobChunks[m]={chunks:Array.from({length:parseInt(p)},()=>null),timestamp:Date.now()}),this.blobChunks[m].chunks.length!==parseInt(p)){console.error("Total chunks mismatch");return}if(this.blobChunks[m].chunks[parseInt(f)-1]=t,this.blobChunks[m].chunks.every(g=>g!==null)){const g=new Uint8Array(this.blobChunks[m].chunks.reduce((b,S)=>b.concat(Array.from(S)),[]));this.recieve_bytes(u,g),delete this.blobChunks[m]}}catch(n){console.error("Websocketworker: onbytes error",n,t);return}}}class ESe extends vp{constructor(){super(...arguments),this._ns_event_intercepts=new Map}start(){}stop(){}async _receive_edge_added(t,n,r,o){this.context.worker._zustand&&this.context.worker._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o})}async _receive_groups(t){this.context.worker._zustand&&this.context.worker._zustand.on_group_action({type:"set",groups:t})}async _receive_node_added(t){if(this.context.worker._zustand)return this.context.worker._zustand.on_node_action({type:"add",node:t,id:t.id,from_remote:!0})}async receive_workerevent({event:t,data:n}){switch(t){case"worker_error":return this.context.worker._zustand?this.context.worker._zustand.logger.error(n.error):void 0;case"update_worker_dependencies":return this.context.worker._zustand?this.context.worker._zustand.lib.libstate.getState().set({external_worker:n.worker_dependencies}):void 0;case"lib_update":await this.context.worker.getSyncManager().sync_lib();return;case"fullsync":await this.context.worker.getSyncManager().stepwise_fullsync();return;case"external_worker_update":await this.context.worker.getSyncManager().sync_lib(),await this.context.worker.getSyncManager().sync_external_worker();return;case"repos_update":await this.hookManager.call_hooks("repos_update",n.repos??n);return;case"starting":this.hookManager.call_hooks("starting");return;case"stopping":this.hookManager.call_hooks("stopping");return;default:console.warn("Unhandled worker event",t,n);break}}async intercept_ns_event(t){let n=t;for(const r of this._ns_event_intercepts.get(t.event)||[])n=await r(n);return n}async receive_nodespace_event(t){const{event:n,data:r}=await this.intercept_ns_event(t);switch(n){case"after_set_value":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value:r.result}}},id:r.node,from_remote:!0}):void 0;case"after_update_value_options":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value_options:r.result}}},id:r.node,from_remote:!0}):void 0;case"triggerstart":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}):void 0;case"triggerdone":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0}):void 0;case"triggerfast":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}),setTimeout(()=>{this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0})},50);return;case"node_trigger_error":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"error",errortype:"trigger",error:r.error,id:r.node,tb:r.tb,from_remote:!0}):void 0;case"node_removed":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"delete",id:r.node,from_remote:!0}),this.hookManager.call_hooks("node_removed",{node:r.node});return;case"node_added":this._receive_node_added(r.node);return;case"after_disconnect":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_unforward":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_connect":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_forward":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_add_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"after_remove_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"progress":if(!this.context.worker._zustand)return;if(r.node)return this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,progress:r.info},id:r.node,from_remote:!0});console.warn("Unhandled nodepsace event",n,r);break;default:if(["after_set_nodespace"].includes(n))return;console.warn("Unhandled nodepsace event",n,r);break}}add_ns_event_intercept(t,n){const r=this._ns_event_intercepts.get(t)||[];return r.push(n),this._ns_event_intercepts.set(t,r),()=>{const a=this._ns_event_intercepts.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}}class _Se extends vp{constructor(){super(...arguments),this._hooks=new Map}start(){}stop(){}add_hook(t,n){const r=this._hooks.get(t)||[];return r.push(n),this._hooks.set(t,r),()=>{const a=this._hooks.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}async call_hooks(t,n){const r=[];for(const o of this._hooks.get(t)||[]){const a=o({worker:this.context.worker,data:n});a instanceof Promise&&r.push(a)}await Promise.all(r)}}class CSe extends vp{start(){}stop(){}async trigger_node(t){await this.communicationManager._send_cmd({cmd:"trigger_node",kwargs:{nid:t},wait_for_response:!1})}async add_node(t){const n=await this.communicationManager._send_cmd({cmd:"add_node",kwargs:{id:t}});return this.eventManager._receive_node_added(n)}async remove_node(t){await this.communicationManager._send_cmd({cmd:"remove_node",kwargs:{id:t}})}locally_update_node(t){this.syncManager.locally_update_node(t)}set_io_value({nid:t,ioid:n,value:r,set_default:o=!1}){return this.communicationManager._send_cmd({cmd:"set_io_value",kwargs:{nid:t,ioid:n,value:r,set_default:o},wait_for_response:!0})}set_io_value_options({nid:t,ioid:n,values:r,keys:o,nullable:a}){return this.communicationManager._send_cmd({cmd:"update_io_value_options",kwargs:{nid:t,ioid:n,options:{options:{type:"enum",values:r,keys:o,nullable:a}}}})}async get_io_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_value",kwargs:{nid:t,ioid:n},wait_for_response:!0});return this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{value:r}}},id:t,from_remote:!0}),r}async get_ios_values({nid:t}){const n=await this.communicationManager._send_cmd({cmd:"get_ios_values",kwargs:{nid:t},wait_for_response:!0});if(!this.context.worker._zustand)return n;const r={};for(const o in n)r[o]={value:n[o]};return this.context.worker._zustand.on_node_action({type:"update",node:{io:r},id:t,from_remote:!0}),n}async get_io_full_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_full_value",kwargs:{nid:t,ioid:n},wait_for_response:!0,as_bytes:!0}),{header:o,bytes:a}=r,{mime:s}=o,u=gZ({data:a,mime:s||"application/octet-stream"});return this.context.worker._zustand?.on_node_action?.({type:"update",node:{id:t,io:{[n]:{fullvalue:u}}},id:t,from_remote:!0}),u}async update_io_options({nid:t,ioid:n,options:r}){const o=await this.communicationManager._send_cmd({cmd:"update_io_options",kwargs:{nid:t,ioid:n,...r},wait_for_response:!0});if(!this.context.worker._zustand)return o;this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{...r}}},id:t,from_remote:!0})}async get_node_status(t){return await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0})}async get_remote_node_state(t){const n=await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0});this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:n,id:n.id,from_remote:!0})}}class TSe extends vp{start(){}stop(){}add_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a=!1}){return this.communicationManager._send_cmd({cmd:"add_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a}})}remove_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}){return this.communicationManager._send_cmd({cmd:"remove_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}})}}class ASe extends vp{start(){}stop(){}async group_nodes(t,n){const r=await this.communicationManager._send_cmd({cmd:"group_nodes",kwargs:{node_ids:t,group_ids:n},wait_for_response:!0});return this.eventManager._receive_groups(r),r}async remove_group(t){await this.communicationManager._send_cmd({cmd:"remove_group",kwargs:{gid:t},wait_for_response:!0}),await this.syncManager.sync_nodespace()}locally_update_group(t){this.syncManager.locally_update_group(t)}}class OSe extends vp{constructor(){super(...arguments),this._available_modules_cache={installed:[],available:[],active:[]}}start(){}stop(){}async add_external_worker({module:t,cls_module:n,cls_name:r}){return await this.communicationManager._send_cmd({cmd:"add_external_worker",kwargs:{module:t,cls_module:n,cls_name:r}})}async add_lib(t,n){return await this.communicationManager._send_cmd({cmd:"add_package_dependency",kwargs:{name:t,version:n},wait_for_response:!1})}async remove_lib(t){return await this.communicationManager._send_cmd({cmd:"remove_package_dependency",kwargs:{name:t},wait_for_response:!1})}async get_available_modules({wait_for_response:t=!1,on_load:n}){const r=this.communicationManager._send_cmd({cmd:"get_available_modules",wait_for_response:!0,unique:!0}).then(o=>{this._available_modules_cache=o,n&&n(this._available_modules_cache)});return t&&await r,this._available_modules_cache}async remove_external_worker(t,n){return await this.communicationManager._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}async get_external_worker_config(t,n){return await this.communicationManager._send_cmd({cmd:"get_external_worker_config",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}}class EP{getEventManager(){return this._eventManager}getSyncManager(){return this._syncManager}getCommunicationManager(){return this._communicationManager}getConnectionHealthManager(){return this._connectionhealthManager}getHookManager(){return this._hookManager}getNodeManager(){return this._nodeManager}getEdgeManager(){return this._edgeManager}getGroupManager(){return this._groupManager}getLibraryManager(){return this._libraryManager}constructor(t){this.uuid=t.uuid,this.on_error=t.on_error||(r=>{this._zustand?.logger.error(r)}),this.state=Vl((r,o)=>({is_open:!1}));const n={worker:this};this._connectionhealthManager=new vSe(n),this._communicationManager=new wSe(n),this._eventManager=new ESe({...n}),this._syncManager=new SSe({...n,on_sync_complete:t.on_sync_complete}),this._hookManager=new _Se(n),this._nodeManager=new CSe(n),this._edgeManager=new TSe(n),this._groupManager=new ASe(n),this._libraryManager=new OSe(n),this._communicationManager.start(),this._connectionhealthManager.start(),this._syncManager.start(),this._eventManager.start(),this._hookManager.start(),this._nodeManager.start(),this._edgeManager.start(),this._groupManager.start(),this._libraryManager.start(),t.zustand&&this.set_zustand(t.zustand),this.api={node:this._nodeManager,group:this._groupManager,edge:this._edgeManager,hooks:this._hookManager,lib:this._libraryManager}}set_zustand(t){t!==this._zustand&&(t.logger.debug("Setting zustand for worker"),this._zustand=t,t.set_worker(this),this._zustand.auto_progress(),this._syncManager.stepwise_fullsync())}get is_open(){return this.state.getState().is_open}set is_open(t){this.state.setState({is_open:t})}get is_responsive(){return this._connectionhealthManager.isResponsive()}clear(){return this._communicationManager._send_cmd({cmd:"clear",unique:!0})}save(){return this._communicationManager._send_cmd({cmd:"save",wait_for_response:!0,unique:!0})}load(t){return this._communicationManager._send_cmd({cmd:"load_data",kwargs:{data:t},wait_for_response:!0}).then(()=>{this._syncManager.stepwise_fullsync()})}async get_runstate(){return await this._communicationManager._send_cmd({cmd:"get_runstate",wait_for_response:!0,unique:!0})}async send(t){throw new Error("async send(data: any) not implemented")}async upload_file(t){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){window.localStorage.getItem("funcnodes__active_worker")==this.uuid&&window.localStorage.removeItem("funcnodes__active_worker"),await this._communicationManager._send_cmd({cmd:"stop_worker",wait_for_response:!1});const n=this.onclose.bind(this);this.onclose=()=>{n(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=n)}}async update_external_worker(t,n,r){return await this._communicationManager._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:t,class_id:n,...r},wait_for_response:!0})}async export({withFiles:t=!1}){return await this._communicationManager._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:t}})}async update_from_export(t){const n=this._hookManager.add_hook("node_added",async({})=>{this._zustand?.center_all()});try{const r=await this._communicationManager._send_cmd({cmd:"update_from_export",kwargs:{data:t},wait_for_response:!0,response_timeout:6e5,unique:!0});return await new Promise(o=>{setTimeout(()=>{o()},1e3)}),await this._syncManager.stepwise_fullsync(),r}finally{n()}}_send_cmd(t){return this._communicationManager._send_cmd(t)}set_io_value(t){return this._nodeManager.set_io_value(t)}get_io_value(t){return this._nodeManager.get_io_value(t)}}function yZ(e,t){return function(){return e.apply(t,arguments)}}const{toString:RSe}=Object.prototype,{getPrototypeOf:_P}=Object,{iterator:wk,toStringTag:bZ}=Symbol,Ek=(e=>t=>{const n=RSe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ku=e=>(e=e.toLowerCase(),t=>Ek(t)===e),_k=e=>t=>typeof t===e,{isArray:nS}=Array,M1=_k("undefined");function pC(e){return e!==null&&!M1(e)&&e.constructor!==null&&!M1(e.constructor)&&Ka(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vZ=Ku("ArrayBuffer");function NSe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vZ(e.buffer),t}const kSe=_k("string"),Ka=_k("function"),SZ=_k("number"),hC=e=>e!==null&&typeof e=="object",MSe=e=>e===!0||e===!1,sR=e=>{if(Ek(e)!=="object")return!1;const t=_P(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bZ in e)&&!(wk in e)},ISe=e=>{if(!hC(e)||pC(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},DSe=Ku("Date"),jSe=Ku("File"),PSe=Ku("Blob"),zSe=Ku("FileList"),$Se=e=>hC(e)&&Ka(e.pipe),FSe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ka(e.append)&&((t=Ek(e))==="formdata"||t==="object"&&Ka(e.toString)&&e.toString()==="[object FormData]"))},LSe=Ku("URLSearchParams"),[BSe,VSe,USe,HSe]=["ReadableStream","Request","Response","Headers"].map(Ku),GSe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mC(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),nS(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(pC(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function xZ(e,t){if(pC(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Hy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wZ=e=>!M1(e)&&e!==Hy;function Z3(){const{caseless:e,skipUndefined:t}=wZ(this)&&this||{},n={},r=(o,a)=>{const s=e&&xZ(n,a)||a;sR(n[s])&&sR(o)?n[s]=Z3(n[s],o):sR(o)?n[s]=Z3({},o):nS(o)?n[s]=o.slice():(!t||!M1(o))&&(n[s]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&mC(arguments[o],r);return n}const YSe=(e,t,n,{allOwnKeys:r}={})=>(mC(t,(o,a)=>{n&&Ka(o)?e[a]=yZ(o,n):e[a]=o},{allOwnKeys:r}),e),qSe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XSe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},WSe=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&_P(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ZSe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},JSe=e=>{if(!e)return null;if(nS(e))return e;let t=e.length;if(!SZ(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},KSe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_P(Uint8Array)),QSe=(e,t)=>{const r=(e&&e[wk]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},exe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},txe=Ku("HTMLFormElement"),nxe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),nV=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rxe=Ku("RegExp"),EZ=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};mC(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},oxe=e=>{EZ(e,(t,n)=>{if(Ka(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ka(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ixe=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return nS(e)?r(e):r(String(e).split(t)),n},axe=()=>{},sxe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lxe(e){return!!(e&&Ka(e.append)&&e[bZ]==="FormData"&&e[wk])}const uxe=e=>{const t=new Array(10),n=(r,o)=>{if(hC(r)){if(t.indexOf(r)>=0)return;if(pC(r))return r;if(!("toJSON"in r)){t[o]=r;const a=nS(r)?[]:{};return mC(r,(s,u)=>{const f=n(s,o+1);!M1(f)&&(a[u]=f)}),t[o]=void 0,a}}return r};return n(e,0)},cxe=Ku("AsyncFunction"),fxe=e=>e&&(hC(e)||Ka(e))&&Ka(e.then)&&Ka(e.catch),_Z=((e,t)=>e?setImmediate:t?((n,r)=>(Hy.addEventListener("message",({source:o,data:a})=>{o===Hy&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Hy.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ka(Hy.postMessage)),dxe=typeof queueMicrotask<"u"?queueMicrotask.bind(Hy):typeof process<"u"&&process.nextTick||_Z,pxe=e=>e!=null&&Ka(e[wk]),$e={isArray:nS,isArrayBuffer:vZ,isBuffer:pC,isFormData:FSe,isArrayBufferView:NSe,isString:kSe,isNumber:SZ,isBoolean:MSe,isObject:hC,isPlainObject:sR,isEmptyObject:ISe,isReadableStream:BSe,isRequest:VSe,isResponse:USe,isHeaders:HSe,isUndefined:M1,isDate:DSe,isFile:jSe,isBlob:PSe,isRegExp:rxe,isFunction:Ka,isStream:$Se,isURLSearchParams:LSe,isTypedArray:KSe,isFileList:zSe,forEach:mC,merge:Z3,extend:YSe,trim:GSe,stripBOM:qSe,inherits:XSe,toFlatObject:WSe,kindOf:Ek,kindOfTest:Ku,endsWith:ZSe,toArray:JSe,forEachEntry:QSe,matchAll:exe,isHTMLForm:txe,hasOwnProperty:nV,hasOwnProp:nV,reduceDescriptors:EZ,freezeMethods:oxe,toObjectSet:ixe,toCamelCase:nxe,noop:axe,toFiniteNumber:sxe,findKey:xZ,global:Hy,isContextDefined:wZ,isSpecCompliantForm:lxe,toJSONObject:uxe,isAsyncFn:cxe,isThenable:fxe,setImmediate:_Z,asap:dxe,isIterable:pxe};function en(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}$e.inherits(en,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const CZ=en.prototype,TZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{TZ[e]={value:e}});Object.defineProperties(en,TZ);Object.defineProperty(CZ,"isAxiosError",{value:!0});en.from=(e,t,n,r,o,a)=>{const s=Object.create(CZ);$e.toFlatObject(e,s,function(m){return m!==Error.prototype},p=>p!=="isAxiosError");const u=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return en.call(s,u,f,n,r,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};const hxe=null;function J3(e){return $e.isPlainObject(e)||$e.isArray(e)}function AZ(e){return $e.endsWith(e,"[]")?e.slice(0,-2):e}function rV(e,t,n){return e?e.concat(t).map(function(o,a){return o=AZ(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function mxe(e){return $e.isArray(e)&&!e.some(J3)}const gxe=$e.toFlatObject($e,{},null,function(t){return/^is[A-Z]/.test(t)});function Ck(e,t,n){if(!$e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!$e.isUndefined(E[x])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,s=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(t);if(!$e.isFunction(o))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if($e.isDate(w))return w.toISOString();if($e.isBoolean(w))return w.toString();if(!f&&$e.isBlob(w))throw new en("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(w)||$e.isTypedArray(w)?f&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,x,E){let C=w;if(w&&!E&&typeof w=="object"){if($e.endsWith(x,"{}"))x=r?x:x.slice(0,-2),w=JSON.stringify(w);else if($e.isArray(w)&&mxe(w)||($e.isFileList(w)||$e.endsWith(x,"[]"))&&(C=$e.toArray(w)))return x=AZ(x),C.forEach(function(O,k){!($e.isUndefined(O)||O===null)&&t.append(s===!0?rV([x],k,a):s===null?x:x+"[]",p(O))}),!1}return J3(w)?!0:(t.append(rV(E,x,a),p(w)),!1)}const g=[],b=Object.assign(gxe,{defaultVisitor:m,convertValue:p,isVisitable:J3});function S(w,x){if(!$e.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));g.push(w),$e.forEach(w,function(C,N){(!($e.isUndefined(C)||C===null)&&o.call(t,C,$e.isString(N)?N.trim():N,x,b))===!0&&S(C,x?x.concat(N):[N])}),g.pop()}}if(!$e.isObject(e))throw new TypeError("data must be an object");return S(e),t}function oV(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function CP(e,t){this._pairs=[],e&&Ck(e,this,t)}const OZ=CP.prototype;OZ.append=function(t,n){this._pairs.push([t,n])};OZ.toString=function(t){const n=t?function(r){return t.call(this,r,oV)}:oV;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function yxe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function RZ(e,t,n){if(!t)return e;const r=n&&n.encode||yxe;$e.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=$e.isURLSearchParams(t)?t.toString():new CP(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class iV{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const NZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bxe=typeof URLSearchParams<"u"?URLSearchParams:CP,vxe=typeof FormData<"u"?FormData:null,Sxe=typeof Blob<"u"?Blob:null,xxe={isBrowser:!0,classes:{URLSearchParams:bxe,FormData:vxe,Blob:Sxe},protocols:["http","https","file","blob","url","data"]},TP=typeof window<"u"&&typeof document<"u",K3=typeof navigator=="object"&&navigator||void 0,wxe=TP&&(!K3||["ReactNative","NativeScript","NS"].indexOf(K3.product)<0),Exe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_xe=TP&&window.location.href||"http://localhost",Cxe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:TP,hasStandardBrowserEnv:wxe,hasStandardBrowserWebWorkerEnv:Exe,navigator:K3,origin:_xe},Symbol.toStringTag,{value:"Module"})),Wi={...Cxe,...xxe};function Txe(e,t){return Ck(e,new Wi.classes.URLSearchParams,{visitor:function(n,r,o,a){return Wi.isNode&&$e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function Axe(e){return $e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Oxe(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function kZ(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),f=a>=n.length;return s=!s&&$e.isArray(o)?o.length:s,f?($e.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!$e.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&$e.isArray(o[s])&&(o[s]=Oxe(o[s])),!u)}if($e.isFormData(e)&&$e.isFunction(e.entries)){const n={};return $e.forEachEntry(e,(r,o)=>{t(Axe(r),o,n,0)}),n}return null}function Rxe(e,t,n){if($e.isString(e))try{return(t||JSON.parse)(e),$e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const gC={transitional:NZ,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=$e.isObject(t);if(a&&$e.isHTMLForm(t)&&(t=new FormData(t)),$e.isFormData(t))return o?JSON.stringify(kZ(t)):t;if($e.isArrayBuffer(t)||$e.isBuffer(t)||$e.isStream(t)||$e.isFile(t)||$e.isBlob(t)||$e.isReadableStream(t))return t;if($e.isArrayBufferView(t))return t.buffer;if($e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Txe(t,this.formSerializer).toString();if((u=$e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ck(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Rxe(t)):t}],transformResponse:[function(t){const n=this.transitional||gC.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if($e.isResponse(t)||$e.isReadableStream(t))return t;if(t&&$e.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(u){if(s)throw u.name==="SyntaxError"?en.from(u,en.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wi.classes.FormData,Blob:Wi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$e.forEach(["delete","get","head","post","put","patch"],e=>{gC.headers[e]={}});const Nxe=$e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kxe=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
977
|
+
`,n);return}const o=n.substring(0,r+4),a=t.slice(r+4),s=o.split(";"),u={};if(s.forEach(g=>{const[b,S]=g.split("=");u[b.trim()]=S.trim()}),!u.chunk||!u.msgid){console.error("Header missing required fields chunk or msgid",u);return}const[f,p]=u.chunk.split("/"),m=u.msgid;if(f==="1"&&p==="1")return this.receive_bytes(u,a);if(this.blobChunks[m]||(this.blobChunks[m]={chunks:Array.from({length:parseInt(p)},()=>null),timestamp:Date.now()}),this.blobChunks[m].chunks.length!==parseInt(p)){console.error("Total chunks mismatch");return}if(this.blobChunks[m].chunks[parseInt(f)-1]=t,this.blobChunks[m].chunks.every(g=>g!==null)){const g=new Uint8Array(this.blobChunks[m].chunks.reduce((b,S)=>b.concat(Array.from(S)),[]));this.receive_bytes(u,g),delete this.blobChunks[m]}}catch(n){console.error("Websocketworker: onbytes error",n,t);return}}}class ESe extends vp{constructor(){super(...arguments),this._ns_event_intercepts=new Map}start(){}stop(){}async _receive_edge_added(t,n,r,o){this.context.worker._zustand&&this.context.worker._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o})}async _receive_groups(t){this.context.worker._zustand&&this.context.worker._zustand.on_group_action({type:"set",groups:t})}async _receive_node_added(t){if(this.context.worker._zustand)return this.context.worker._zustand.on_node_action({type:"add",node:t,id:t.id,from_remote:!0})}async receive_workerevent({event:t,data:n}){switch(t){case"worker_error":return this.context.worker._zustand?this.context.worker._zustand.logger.error(n.error):void 0;case"update_worker_dependencies":return this.context.worker._zustand?this.context.worker._zustand.lib.libstate.getState().set({external_worker:n.worker_dependencies}):void 0;case"lib_update":await this.context.worker.getSyncManager().sync_lib();return;case"fullsync":await this.context.worker.getSyncManager().stepwise_fullsync();return;case"external_worker_update":await this.context.worker.getSyncManager().sync_lib(),await this.context.worker.getSyncManager().sync_external_worker();return;case"repos_update":await this.hookManager.call_hooks("repos_update",n.repos??n);return;case"starting":this.hookManager.call_hooks("starting");return;case"stopping":this.hookManager.call_hooks("stopping");return;default:console.warn("Unhandled worker event",t,n);break}}async intercept_ns_event(t){let n=t;for(const r of this._ns_event_intercepts.get(t.event)||[])n=await r(n);return n}async receive_nodespace_event(t){const{event:n,data:r}=await this.intercept_ns_event(t);switch(n){case"after_set_value":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value:r.result}}},id:r.node,from_remote:!0}):void 0;case"after_update_value_options":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value_options:r.result}}},id:r.node,from_remote:!0}):void 0;case"triggerstart":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}):void 0;case"triggerdone":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0}):void 0;case"triggerfast":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}),setTimeout(()=>{this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0})},50);return;case"node_trigger_error":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"error",errortype:"trigger",error:r.error,id:r.node,tb:r.tb,from_remote:!0}):void 0;case"node_removed":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"delete",id:r.node,from_remote:!0}),this.hookManager.call_hooks("node_removed",{node:r.node});return;case"node_added":this._receive_node_added(r.node);return;case"after_disconnect":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_unforward":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_connect":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_forward":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_add_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"after_remove_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"progress":if(!this.context.worker._zustand)return;if(r.node)return this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,progress:r.info},id:r.node,from_remote:!0});console.warn("Unhandled nodepsace event",n,r);break;default:if(["after_set_nodespace"].includes(n))return;console.warn("Unhandled nodepsace event",n,r);break}}add_ns_event_intercept(t,n){const r=this._ns_event_intercepts.get(t)||[];return r.push(n),this._ns_event_intercepts.set(t,r),()=>{const a=this._ns_event_intercepts.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}}class _Se extends vp{constructor(){super(...arguments),this._hooks=new Map}start(){}stop(){}add_hook(t,n){const r=this._hooks.get(t)||[];return r.push(n),this._hooks.set(t,r),()=>{const a=this._hooks.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}async call_hooks(t,n){const r=[];for(const o of this._hooks.get(t)||[]){const a=o({worker:this.context.worker,data:n});a instanceof Promise&&r.push(a)}await Promise.all(r)}}class CSe extends vp{start(){}stop(){}async trigger_node(t){await this.communicationManager._send_cmd({cmd:"trigger_node",kwargs:{nid:t},wait_for_response:!1})}async add_node(t){const n=await this.communicationManager._send_cmd({cmd:"add_node",kwargs:{id:t}});return this.eventManager._receive_node_added(n)}async remove_node(t){await this.communicationManager._send_cmd({cmd:"remove_node",kwargs:{id:t}})}locally_update_node(t){this.syncManager.locally_update_node(t)}set_io_value({nid:t,ioid:n,value:r,set_default:o=!1}){return this.communicationManager._send_cmd({cmd:"set_io_value",kwargs:{nid:t,ioid:n,value:r,set_default:o},wait_for_response:!0})}set_io_value_options({nid:t,ioid:n,values:r,keys:o,nullable:a}){return this.communicationManager._send_cmd({cmd:"update_io_value_options",kwargs:{nid:t,ioid:n,options:{options:{type:"enum",values:r,keys:o,nullable:a}}}})}async get_io_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_value",kwargs:{nid:t,ioid:n},wait_for_response:!0});return this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{value:r}}},id:t,from_remote:!0}),r}async get_ios_values({nid:t}){const n=await this.communicationManager._send_cmd({cmd:"get_ios_values",kwargs:{nid:t},wait_for_response:!0});if(!this.context.worker._zustand)return n;const r={};for(const o in n)r[o]={value:n[o]};return this.context.worker._zustand.on_node_action({type:"update",node:{io:r},id:t,from_remote:!0}),n}async get_io_full_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_full_value",kwargs:{nid:t,ioid:n},wait_for_response:!0,as_bytes:!0}),{header:o,bytes:a}=r,{mime:s}=o,u=gZ({data:a,mime:s||"application/octet-stream"});return this.context.worker._zustand?.on_node_action?.({type:"update",node:{id:t,io:{[n]:{fullvalue:u}}},id:t,from_remote:!0}),u}async update_io_options({nid:t,ioid:n,options:r}){const o=await this.communicationManager._send_cmd({cmd:"update_io_options",kwargs:{nid:t,ioid:n,...r},wait_for_response:!0});if(!this.context.worker._zustand)return o;this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{...r}}},id:t,from_remote:!0})}async get_node_status(t){return await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0})}async get_remote_node_state(t){const n=await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0});this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:n,id:n.id,from_remote:!0})}}class TSe extends vp{start(){}stop(){}add_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a=!1}){return this.communicationManager._send_cmd({cmd:"add_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a}})}remove_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}){return this.communicationManager._send_cmd({cmd:"remove_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}})}}class ASe extends vp{start(){}stop(){}async group_nodes(t,n){const r=await this.communicationManager._send_cmd({cmd:"group_nodes",kwargs:{node_ids:t,group_ids:n},wait_for_response:!0});return this.eventManager._receive_groups(r),r}async remove_group(t){await this.communicationManager._send_cmd({cmd:"remove_group",kwargs:{gid:t},wait_for_response:!0}),await this.syncManager.sync_nodespace()}locally_update_group(t){this.syncManager.locally_update_group(t)}}class OSe extends vp{constructor(){super(...arguments),this._available_modules_cache={installed:[],available:[],active:[]}}start(){}stop(){}async add_external_worker({module:t,cls_module:n,cls_name:r}){return await this.communicationManager._send_cmd({cmd:"add_external_worker",kwargs:{module:t,cls_module:n,cls_name:r}})}async add_lib(t,n){return await this.communicationManager._send_cmd({cmd:"add_package_dependency",kwargs:{name:t,version:n},wait_for_response:!1})}async remove_lib(t){return await this.communicationManager._send_cmd({cmd:"remove_package_dependency",kwargs:{name:t},wait_for_response:!1})}async get_available_modules({wait_for_response:t=!1,on_load:n}){const r=this.communicationManager._send_cmd({cmd:"get_available_modules",wait_for_response:!0,unique:!0}).then(o=>{this._available_modules_cache=o,n&&n(this._available_modules_cache)});return t&&await r,this._available_modules_cache}async remove_external_worker(t,n){return await this.communicationManager._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}async get_external_worker_config(t,n){return await this.communicationManager._send_cmd({cmd:"get_external_worker_config",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}}class EP{getEventManager(){return this._eventManager}getSyncManager(){return this._syncManager}getCommunicationManager(){return this._communicationManager}getConnectionHealthManager(){return this._connectionhealthManager}getHookManager(){return this._hookManager}getNodeManager(){return this._nodeManager}getEdgeManager(){return this._edgeManager}getGroupManager(){return this._groupManager}getLibraryManager(){return this._libraryManager}constructor(t){this.uuid=t.uuid,this.on_error=t.on_error||(r=>{this._zustand?.logger.error(r)}),this.state=Vl((r,o)=>({is_open:!1}));const n={worker:this};this._connectionhealthManager=new vSe(n),this._communicationManager=new wSe(n),this._eventManager=new ESe({...n}),this._syncManager=new SSe({...n,on_sync_complete:t.on_sync_complete}),this._hookManager=new _Se(n),this._nodeManager=new CSe(n),this._edgeManager=new TSe(n),this._groupManager=new ASe(n),this._libraryManager=new OSe(n),this._communicationManager.start(),this._connectionhealthManager.start(),this._syncManager.start(),this._eventManager.start(),this._hookManager.start(),this._nodeManager.start(),this._edgeManager.start(),this._groupManager.start(),this._libraryManager.start(),t.zustand&&this.set_zustand(t.zustand),this.api={node:this._nodeManager,group:this._groupManager,edge:this._edgeManager,hooks:this._hookManager,lib:this._libraryManager}}set_zustand(t){t!==this._zustand&&(t.logger.debug("Setting zustand for worker"),this._zustand=t,t.set_worker(this),this._zustand.auto_progress(),this._syncManager.stepwise_fullsync())}get is_open(){return this.state.getState().is_open}set is_open(t){this.state.setState({is_open:t})}get is_responsive(){return this._connectionhealthManager.isResponsive()}clear(){return this._communicationManager._send_cmd({cmd:"clear",unique:!0})}save(){return this._communicationManager._send_cmd({cmd:"save",wait_for_response:!0,unique:!0})}load(t){return this._communicationManager._send_cmd({cmd:"load_data",kwargs:{data:t},wait_for_response:!0}).then(()=>{this._syncManager.stepwise_fullsync()})}async get_runstate(){return await this._communicationManager._send_cmd({cmd:"get_runstate",wait_for_response:!0,unique:!0})}async send(t){throw new Error("async send(data: any) not implemented")}async upload_file(t){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){window.localStorage.getItem("funcnodes__active_worker")==this.uuid&&window.localStorage.removeItem("funcnodes__active_worker"),await this._communicationManager._send_cmd({cmd:"stop_worker",wait_for_response:!1});const n=this.onclose.bind(this);this.onclose=()=>{n(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=n)}}async update_external_worker(t,n,r){return await this._communicationManager._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:t,class_id:n,...r},wait_for_response:!0})}async export({withFiles:t=!1}){return await this._communicationManager._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:t}})}async update_from_export(t){const n=this._hookManager.add_hook("node_added",async({})=>{this._zustand?.center_all()});try{const r=await this._communicationManager._send_cmd({cmd:"update_from_export",kwargs:{data:t},wait_for_response:!0,response_timeout:6e5,unique:!0});return await new Promise(o=>{setTimeout(()=>{o()},1e3)}),await this._syncManager.stepwise_fullsync(),r}finally{n()}}_send_cmd(t){return this._communicationManager._send_cmd(t)}set_io_value(t){return this._nodeManager.set_io_value(t)}get_io_value(t){return this._nodeManager.get_io_value(t)}}function yZ(e,t){return function(){return e.apply(t,arguments)}}const{toString:RSe}=Object.prototype,{getPrototypeOf:_P}=Object,{iterator:wk,toStringTag:bZ}=Symbol,Ek=(e=>t=>{const n=RSe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ku=e=>(e=e.toLowerCase(),t=>Ek(t)===e),_k=e=>t=>typeof t===e,{isArray:nS}=Array,M1=_k("undefined");function pC(e){return e!==null&&!M1(e)&&e.constructor!==null&&!M1(e.constructor)&&Ka(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vZ=Ku("ArrayBuffer");function NSe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vZ(e.buffer),t}const kSe=_k("string"),Ka=_k("function"),SZ=_k("number"),hC=e=>e!==null&&typeof e=="object",MSe=e=>e===!0||e===!1,sR=e=>{if(Ek(e)!=="object")return!1;const t=_P(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bZ in e)&&!(wk in e)},ISe=e=>{if(!hC(e)||pC(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},DSe=Ku("Date"),jSe=Ku("File"),PSe=Ku("Blob"),zSe=Ku("FileList"),$Se=e=>hC(e)&&Ka(e.pipe),FSe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ka(e.append)&&((t=Ek(e))==="formdata"||t==="object"&&Ka(e.toString)&&e.toString()==="[object FormData]"))},LSe=Ku("URLSearchParams"),[BSe,VSe,USe,HSe]=["ReadableStream","Request","Response","Headers"].map(Ku),GSe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mC(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),nS(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(pC(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function xZ(e,t){if(pC(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Hy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wZ=e=>!M1(e)&&e!==Hy;function Z3(){const{caseless:e,skipUndefined:t}=wZ(this)&&this||{},n={},r=(o,a)=>{const s=e&&xZ(n,a)||a;sR(n[s])&&sR(o)?n[s]=Z3(n[s],o):sR(o)?n[s]=Z3({},o):nS(o)?n[s]=o.slice():(!t||!M1(o))&&(n[s]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&mC(arguments[o],r);return n}const YSe=(e,t,n,{allOwnKeys:r}={})=>(mC(t,(o,a)=>{n&&Ka(o)?e[a]=yZ(o,n):e[a]=o},{allOwnKeys:r}),e),qSe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XSe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},WSe=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&_P(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ZSe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},JSe=e=>{if(!e)return null;if(nS(e))return e;let t=e.length;if(!SZ(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},KSe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_P(Uint8Array)),QSe=(e,t)=>{const r=(e&&e[wk]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},exe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},txe=Ku("HTMLFormElement"),nxe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),nV=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rxe=Ku("RegExp"),EZ=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};mC(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},oxe=e=>{EZ(e,(t,n)=>{if(Ka(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ka(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ixe=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return nS(e)?r(e):r(String(e).split(t)),n},axe=()=>{},sxe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lxe(e){return!!(e&&Ka(e.append)&&e[bZ]==="FormData"&&e[wk])}const uxe=e=>{const t=new Array(10),n=(r,o)=>{if(hC(r)){if(t.indexOf(r)>=0)return;if(pC(r))return r;if(!("toJSON"in r)){t[o]=r;const a=nS(r)?[]:{};return mC(r,(s,u)=>{const f=n(s,o+1);!M1(f)&&(a[u]=f)}),t[o]=void 0,a}}return r};return n(e,0)},cxe=Ku("AsyncFunction"),fxe=e=>e&&(hC(e)||Ka(e))&&Ka(e.then)&&Ka(e.catch),_Z=((e,t)=>e?setImmediate:t?((n,r)=>(Hy.addEventListener("message",({source:o,data:a})=>{o===Hy&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Hy.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ka(Hy.postMessage)),dxe=typeof queueMicrotask<"u"?queueMicrotask.bind(Hy):typeof process<"u"&&process.nextTick||_Z,pxe=e=>e!=null&&Ka(e[wk]),$e={isArray:nS,isArrayBuffer:vZ,isBuffer:pC,isFormData:FSe,isArrayBufferView:NSe,isString:kSe,isNumber:SZ,isBoolean:MSe,isObject:hC,isPlainObject:sR,isEmptyObject:ISe,isReadableStream:BSe,isRequest:VSe,isResponse:USe,isHeaders:HSe,isUndefined:M1,isDate:DSe,isFile:jSe,isBlob:PSe,isRegExp:rxe,isFunction:Ka,isStream:$Se,isURLSearchParams:LSe,isTypedArray:KSe,isFileList:zSe,forEach:mC,merge:Z3,extend:YSe,trim:GSe,stripBOM:qSe,inherits:XSe,toFlatObject:WSe,kindOf:Ek,kindOfTest:Ku,endsWith:ZSe,toArray:JSe,forEachEntry:QSe,matchAll:exe,isHTMLForm:txe,hasOwnProperty:nV,hasOwnProp:nV,reduceDescriptors:EZ,freezeMethods:oxe,toObjectSet:ixe,toCamelCase:nxe,noop:axe,toFiniteNumber:sxe,findKey:xZ,global:Hy,isContextDefined:wZ,isSpecCompliantForm:lxe,toJSONObject:uxe,isAsyncFn:cxe,isThenable:fxe,setImmediate:_Z,asap:dxe,isIterable:pxe};function en(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}$e.inherits(en,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const CZ=en.prototype,TZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{TZ[e]={value:e}});Object.defineProperties(en,TZ);Object.defineProperty(CZ,"isAxiosError",{value:!0});en.from=(e,t,n,r,o,a)=>{const s=Object.create(CZ);$e.toFlatObject(e,s,function(m){return m!==Error.prototype},p=>p!=="isAxiosError");const u=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return en.call(s,u,f,n,r,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};const hxe=null;function J3(e){return $e.isPlainObject(e)||$e.isArray(e)}function AZ(e){return $e.endsWith(e,"[]")?e.slice(0,-2):e}function rV(e,t,n){return e?e.concat(t).map(function(o,a){return o=AZ(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function mxe(e){return $e.isArray(e)&&!e.some(J3)}const gxe=$e.toFlatObject($e,{},null,function(t){return/^is[A-Z]/.test(t)});function Ck(e,t,n){if(!$e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!$e.isUndefined(E[x])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,s=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(t);if(!$e.isFunction(o))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if($e.isDate(w))return w.toISOString();if($e.isBoolean(w))return w.toString();if(!f&&$e.isBlob(w))throw new en("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(w)||$e.isTypedArray(w)?f&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,x,E){let C=w;if(w&&!E&&typeof w=="object"){if($e.endsWith(x,"{}"))x=r?x:x.slice(0,-2),w=JSON.stringify(w);else if($e.isArray(w)&&mxe(w)||($e.isFileList(w)||$e.endsWith(x,"[]"))&&(C=$e.toArray(w)))return x=AZ(x),C.forEach(function(O,k){!($e.isUndefined(O)||O===null)&&t.append(s===!0?rV([x],k,a):s===null?x:x+"[]",p(O))}),!1}return J3(w)?!0:(t.append(rV(E,x,a),p(w)),!1)}const g=[],b=Object.assign(gxe,{defaultVisitor:m,convertValue:p,isVisitable:J3});function S(w,x){if(!$e.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));g.push(w),$e.forEach(w,function(C,N){(!($e.isUndefined(C)||C===null)&&o.call(t,C,$e.isString(N)?N.trim():N,x,b))===!0&&S(C,x?x.concat(N):[N])}),g.pop()}}if(!$e.isObject(e))throw new TypeError("data must be an object");return S(e),t}function oV(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function CP(e,t){this._pairs=[],e&&Ck(e,this,t)}const OZ=CP.prototype;OZ.append=function(t,n){this._pairs.push([t,n])};OZ.toString=function(t){const n=t?function(r){return t.call(this,r,oV)}:oV;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function yxe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function RZ(e,t,n){if(!t)return e;const r=n&&n.encode||yxe;$e.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=$e.isURLSearchParams(t)?t.toString():new CP(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class iV{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const NZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bxe=typeof URLSearchParams<"u"?URLSearchParams:CP,vxe=typeof FormData<"u"?FormData:null,Sxe=typeof Blob<"u"?Blob:null,xxe={isBrowser:!0,classes:{URLSearchParams:bxe,FormData:vxe,Blob:Sxe},protocols:["http","https","file","blob","url","data"]},TP=typeof window<"u"&&typeof document<"u",K3=typeof navigator=="object"&&navigator||void 0,wxe=TP&&(!K3||["ReactNative","NativeScript","NS"].indexOf(K3.product)<0),Exe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_xe=TP&&window.location.href||"http://localhost",Cxe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:TP,hasStandardBrowserEnv:wxe,hasStandardBrowserWebWorkerEnv:Exe,navigator:K3,origin:_xe},Symbol.toStringTag,{value:"Module"})),Wi={...Cxe,...xxe};function Txe(e,t){return Ck(e,new Wi.classes.URLSearchParams,{visitor:function(n,r,o,a){return Wi.isNode&&$e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function Axe(e){return $e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Oxe(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function kZ(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),f=a>=n.length;return s=!s&&$e.isArray(o)?o.length:s,f?($e.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!$e.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&$e.isArray(o[s])&&(o[s]=Oxe(o[s])),!u)}if($e.isFormData(e)&&$e.isFunction(e.entries)){const n={};return $e.forEachEntry(e,(r,o)=>{t(Axe(r),o,n,0)}),n}return null}function Rxe(e,t,n){if($e.isString(e))try{return(t||JSON.parse)(e),$e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const gC={transitional:NZ,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=$e.isObject(t);if(a&&$e.isHTMLForm(t)&&(t=new FormData(t)),$e.isFormData(t))return o?JSON.stringify(kZ(t)):t;if($e.isArrayBuffer(t)||$e.isBuffer(t)||$e.isStream(t)||$e.isFile(t)||$e.isBlob(t)||$e.isReadableStream(t))return t;if($e.isArrayBufferView(t))return t.buffer;if($e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Txe(t,this.formSerializer).toString();if((u=$e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ck(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Rxe(t)):t}],transformResponse:[function(t){const n=this.transitional||gC.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if($e.isResponse(t)||$e.isReadableStream(t))return t;if(t&&$e.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(u){if(s)throw u.name==="SyntaxError"?en.from(u,en.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wi.classes.FormData,Blob:Wi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$e.forEach(["delete","get","head","post","put","patch"],e=>{gC.headers[e]={}});const Nxe=$e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kxe=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
978
978
|
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Nxe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},aV=Symbol("internals");function cE(e){return e&&String(e).trim().toLowerCase()}function lR(e){return e===!1||e==null?e:$e.isArray(e)?e.map(lR):String(e)}function Mxe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ixe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function XD(e,t,n,r,o){if($e.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!$e.isString(t)){if($e.isString(r))return t.indexOf(r)!==-1;if($e.isRegExp(r))return r.test(t)}}function Dxe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function jxe(e,t){const n=$e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}let Qa=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(u,f,p){const m=cE(f);if(!m)throw new Error("header name must be a non-empty string");const g=$e.findKey(o,m);(!g||o[g]===void 0||p===!0||p===void 0&&o[g]!==!1)&&(o[g||f]=lR(u))}const s=(u,f)=>$e.forEach(u,(p,m)=>a(p,m,f));if($e.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if($e.isString(t)&&(t=t.trim())&&!Ixe(t))s(kxe(t),n);else if($e.isObject(t)&&$e.isIterable(t)){let u={},f,p;for(const m of t){if(!$e.isArray(m))throw TypeError("Object iterator must return a key-value pair");u[p=m[0]]=(f=u[p])?$e.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}s(u,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=cE(t),t){const r=$e.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Mxe(o);if($e.isFunction(n))return n.call(this,o,r);if($e.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cE(t),t){const r=$e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||XD(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=cE(s),s){const u=$e.findKey(r,s);u&&(!n||XD(r,r[u],u,n))&&(delete r[u],o=!0)}}return $e.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||XD(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return $e.forEach(this,(o,a)=>{const s=$e.findKey(r,a);if(s){n[s]=lR(o),delete n[a];return}const u=t?Dxe(a):String(a).trim();u!==a&&delete n[a],n[u]=lR(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $e.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&$e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
979
979
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[aV]=this[aV]={accessors:{}}).accessors,o=this.prototype;function a(s){const u=cE(s);r[u]||(jxe(o,s),r[u]=!0)}return $e.isArray(t)?t.forEach(a):a(t),this}};Qa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$e.reduceDescriptors(Qa.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});$e.freezeMethods(Qa);function WD(e,t){const n=this||gC,r=t||n,o=Qa.from(r.headers);let a=r.data;return $e.forEach(e,function(u){a=u.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function MZ(e){return!!(e&&e.__CANCEL__)}function rS(e,t,n){en.call(this,e??"canceled",en.ERR_CANCELED,t,n),this.name="CanceledError"}$e.inherits(rS,en,{__CANCEL__:!0});function IZ(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new en("Request failed with status code "+n.status,[en.ERR_BAD_REQUEST,en.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Pxe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zxe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),m=r[a];s||(s=p),n[o]=f,r[o]=p;let g=a,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),p-s<t)return;const S=m&&p-m;return S?Math.round(b*1e3/S):void 0}}function $xe(e,t){let n=0,r=1e3/t,o,a;const s=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),g=m-n;g>=r?s(p,m):(o=p,a||(a=setTimeout(()=>{a=null,s(o)},r-g)))},()=>o&&s(o)]}const WR=(e,t,n=3)=>{let r=0;const o=zxe(50,250);return $xe(a=>{const s=a.loaded,u=a.lengthComputable?a.total:void 0,f=s-r,p=o(f),m=s<=u;r=s;const g={loaded:s,total:u,progress:u?s/u:void 0,bytes:f,rate:p||void 0,estimated:p&&u&&m?(u-s)/p:void 0,event:a,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(g)},n)},sV=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},lV=e=>(...t)=>$e.asap(()=>e(...t)),Fxe=Wi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wi.origin),Wi.navigator&&/(msie|trident)/i.test(Wi.navigator.userAgent)):()=>!0,Lxe=Wi.hasStandardBrowserEnv?{write(e,t,n,r,o,a,s){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];$e.isNumber(n)&&u.push(`expires=${new Date(n).toUTCString()}`),$e.isString(r)&&u.push(`path=${r}`),$e.isString(o)&&u.push(`domain=${o}`),a===!0&&u.push("secure"),$e.isString(s)&&u.push(`SameSite=${s}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Bxe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vxe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function DZ(e,t,n){let r=!Bxe(t);return e&&(r||n==!1)?Vxe(e,t):t}const uV=e=>e instanceof Qa?{...e}:e;function t0(e,t){t=t||{};const n={};function r(p,m,g,b){return $e.isPlainObject(p)&&$e.isPlainObject(m)?$e.merge.call({caseless:b},p,m):$e.isPlainObject(m)?$e.merge({},m):$e.isArray(m)?m.slice():m}function o(p,m,g,b){if($e.isUndefined(m)){if(!$e.isUndefined(p))return r(void 0,p,g,b)}else return r(p,m,g,b)}function a(p,m){if(!$e.isUndefined(m))return r(void 0,m)}function s(p,m){if($e.isUndefined(m)){if(!$e.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function u(p,m,g){if(g in t)return r(p,m);if(g in e)return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(p,m,g)=>o(uV(p),uV(m),g,!0)};return $e.forEach(Object.keys({...e,...t}),function(m){const g=f[m]||o,b=g(e[m],t[m],m);$e.isUndefined(b)&&g!==u||(n[m]=b)}),n}const jZ=e=>{const t=t0({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:u}=t;if(t.headers=s=Qa.from(s),t.url=RZ(DZ(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),$e.isFormData(n)){if(Wi.hasStandardBrowserEnv||Wi.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if($e.isFunction(n.getHeaders)){const f=n.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([m,g])=>{p.includes(m.toLowerCase())&&s.set(m,g)})}}if(Wi.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(t)),r||r!==!1&&Fxe(t.url))){const f=o&&a&&Lxe.read(a);f&&s.set(o,f)}return t},Uxe=typeof XMLHttpRequest<"u",Hxe=Uxe&&function(e){return new Promise(function(n,r){const o=jZ(e);let a=o.data;const s=Qa.from(o.headers).normalize();let{responseType:u,onUploadProgress:f,onDownloadProgress:p}=o,m,g,b,S,w;function x(){S&&S(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function C(){if(!E)return;const O=Qa.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),M={data:!u||u==="text"||u==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:O,config:e,request:E};IZ(function(P){n(P),x()},function(P){r(P),x()},M),E=null}"onloadend"in E?E.onloadend=C:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(C)},E.onabort=function(){E&&(r(new en("Request aborted",en.ECONNABORTED,e,E)),E=null)},E.onerror=function(k){const M=k&&k.message?k.message:"Network Error",D=new en(M,en.ERR_NETWORK,e,E);D.event=k||null,r(D),E=null},E.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||NZ;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new en(k,M.clarifyTimeoutError?en.ETIMEDOUT:en.ECONNABORTED,e,E)),E=null},a===void 0&&s.setContentType(null),"setRequestHeader"in E&&$e.forEach(s.toJSON(),function(k,M){E.setRequestHeader(M,k)}),$e.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),u&&u!=="json"&&(E.responseType=o.responseType),p&&([b,w]=WR(p,!0),E.addEventListener("progress",b)),f&&E.upload&&([g,S]=WR(f),E.upload.addEventListener("progress",g),E.upload.addEventListener("loadend",S)),(o.cancelToken||o.signal)&&(m=O=>{E&&(r(!O||O.type?new rS(null,e,E):O),E.abort(),E=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const N=Pxe(o.url);if(N&&Wi.protocols.indexOf(N)===-1){r(new en("Unsupported protocol "+N+":",en.ERR_BAD_REQUEST,e));return}E.send(a||null)})},Gxe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(p){if(!o){o=!0,u();const m=p instanceof Error?p:this.reason;r.abort(m instanceof en?m:new rS(m instanceof Error?m.message:m))}};let s=t&&setTimeout(()=>{s=null,a(new en(`timeout ${t} of ms exceeded`,en.ETIMEDOUT))},t);const u=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),e=null)};e.forEach(p=>p.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>$e.asap(u),f}},Yxe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},qxe=async function*(e,t){for await(const n of Xxe(e))yield*Yxe(n,t)},Xxe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},cV=(e,t,n,r)=>{const o=qxe(e,t);let a=0,s,u=f=>{s||(s=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:p,value:m}=await o.next();if(p){u(),f.close();return}let g=m.byteLength;if(n){let b=a+=g;n(b)}f.enqueue(new Uint8Array(m))}catch(p){throw u(p),p}},cancel(f){return u(f),o.return()}},{highWaterMark:2})},fV=64*1024,{isFunction:$A}=$e,Wxe=(({Request:e,Response:t})=>({Request:e,Response:t}))($e.global),{ReadableStream:dV,TextEncoder:pV}=$e.global,hV=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Zxe=e=>{e=$e.merge.call({skipUndefined:!0},Wxe,e);const{fetch:t,Request:n,Response:r}=e,o=t?$A(t):typeof fetch=="function",a=$A(n),s=$A(r);if(!o)return!1;const u=o&&$A(dV),f=o&&(typeof pV=="function"?(w=>x=>w.encode(x))(new pV):async w=>new Uint8Array(await new n(w).arrayBuffer())),p=a&&u&&hV(()=>{let w=!1;const x=new n(Wi.origin,{body:new dV,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!x}),m=s&&u&&hV(()=>$e.isReadableStream(new r("").body)),g={stream:m&&(w=>w.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!g[w]&&(g[w]=(x,E)=>{let C=x&&x[w];if(C)return C.call(x);throw new en(`Response type '${w}' is not supported`,en.ERR_NOT_SUPPORT,E)})});const b=async w=>{if(w==null)return 0;if($e.isBlob(w))return w.size;if($e.isSpecCompliantForm(w))return(await new n(Wi.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if($e.isArrayBufferView(w)||$e.isArrayBuffer(w))return w.byteLength;if($e.isURLSearchParams(w)&&(w=w+""),$e.isString(w))return(await f(w)).byteLength},S=async(w,x)=>{const E=$e.toFiniteNumber(w.getContentLength());return E??b(x)};return async w=>{let{url:x,method:E,data:C,signal:N,cancelToken:O,timeout:k,onDownloadProgress:M,onUploadProgress:D,responseType:P,headers:B,withCredentials:V="same-origin",fetchOptions:U}=jZ(w),X=t||fetch;P=P?(P+"").toLowerCase():"text";let L=Gxe([N,O&&O.toAbortSignal()],k),J=null;const Y=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let ee;try{if(D&&p&&E!=="get"&&E!=="head"&&(ee=await S(B,C))!==0){let W=new n(x,{method:"POST",body:C,duplex:"half"}),ie;if($e.isFormData(C)&&(ie=W.headers.get("content-type"))&&B.setContentType(ie),W.body){const[Z,K]=sV(ee,WR(lV(D)));C=cV(W.body,fV,Z,K)}}$e.isString(V)||(V=V?"include":"omit");const H=a&&"credentials"in n.prototype,ne={...U,signal:L,method:E.toUpperCase(),headers:B.normalize().toJSON(),body:C,duplex:"half",credentials:H?V:void 0};J=a&&new n(x,ne);let Q=await(a?X(J,U):X(x,ne));const ae=m&&(P==="stream"||P==="response");if(m&&(M||ae&&Y)){const W={};["status","statusText","headers"].forEach(se=>{W[se]=Q[se]});const ie=$e.toFiniteNumber(Q.headers.get("content-length")),[Z,K]=M&&sV(ie,WR(lV(M),!0))||[];Q=new r(cV(Q.body,fV,Z,()=>{K&&K(),Y&&Y()}),W)}P=P||"text";let q=await g[$e.findKey(g,P)||"text"](Q,w);return!ae&&Y&&Y(),await new Promise((W,ie)=>{IZ(W,ie,{data:q,headers:Qa.from(Q.headers),status:Q.status,statusText:Q.statusText,config:w,request:J})})}catch(H){throw Y&&Y(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new en("Network Error",en.ERR_NETWORK,w,J),{cause:H.cause||H}):en.from(H,H&&H.code,w,J)}}},Jxe=new Map,PZ=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let s=a.length,u=s,f,p,m=Jxe;for(;u--;)f=a[u],p=m.get(f),p===void 0&&m.set(f,p=u?new Map:Zxe(t)),m=p;return p};PZ();const AP={http:hxe,xhr:Hxe,fetch:{get:PZ}};$e.forEach(AP,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mV=e=>`- ${e}`,Kxe=e=>$e.isFunction(e)||e===null||e===!1;function Qxe(e,t){e=$e.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let s=0;s<n;s++){r=e[s];let u;if(o=r,!Kxe(r)&&(o=AP[(u=String(r)).toLowerCase()],o===void 0))throw new en(`Unknown adapter '${u}'`);if(o&&($e.isFunction(o)||(o=o.get(t))))break;a[u||"#"+s]=o}if(!o){const s=Object.entries(a).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let u=n?s.length>1?`since :
|
|
980
980
|
`+s.map(mV).join(`
|
package/dist/index.d.ts
CHANGED
|
@@ -1528,7 +1528,7 @@ declare class WorkerCommunicationManager extends AbstractWorkerHandler {
|
|
|
1528
1528
|
unique?: boolean;
|
|
1529
1529
|
}): Promise<any>;
|
|
1530
1530
|
receive(data: JSONMessage): Promise<any>;
|
|
1531
|
-
|
|
1531
|
+
receive_bytes(headerObj: {
|
|
1532
1532
|
[key: string]: string | undefined;
|
|
1533
1533
|
}, bytes: Uint8Array): Promise<void>;
|
|
1534
1534
|
onbytes(data: Uint8Array): Promise<void>;
|
package/dist/index.es.js
CHANGED
|
@@ -49480,7 +49480,7 @@ class LSe extends Cp {
|
|
|
49480
49480
|
break;
|
|
49481
49481
|
}
|
|
49482
49482
|
}
|
|
49483
|
-
async
|
|
49483
|
+
async receive_bytes(t, n) {
|
|
49484
49484
|
const { type: r } = t;
|
|
49485
49485
|
if (r === "io_value") {
|
|
49486
49486
|
if (!this.context.worker._zustand) return;
|
|
@@ -49532,7 +49532,7 @@ class LSe extends Cp {
|
|
|
49532
49532
|
}
|
|
49533
49533
|
const [f, p] = u.chunk.split("/"), m = u.msgid;
|
|
49534
49534
|
if (f === "1" && p === "1")
|
|
49535
|
-
return this.
|
|
49535
|
+
return this.receive_bytes(u, a);
|
|
49536
49536
|
if (this.blobChunks[m] || (this.blobChunks[m] = {
|
|
49537
49537
|
chunks: Array.from({ length: parseInt(p) }, () => null),
|
|
49538
49538
|
timestamp: Date.now()
|
|
@@ -49544,7 +49544,7 @@ class LSe extends Cp {
|
|
|
49544
49544
|
const g = new Uint8Array(
|
|
49545
49545
|
this.blobChunks[m].chunks.reduce((v, S) => v.concat(Array.from(S)), [])
|
|
49546
49546
|
);
|
|
49547
|
-
this.
|
|
49547
|
+
this.receive_bytes(u, g), delete this.blobChunks[m];
|
|
49548
49548
|
}
|
|
49549
49549
|
} catch (n) {
|
|
49550
49550
|
console.error("Websocketworker: onbytes error", n, t);
|
package/dist/index.umd.js
CHANGED
|
@@ -971,10 +971,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
971
971
|
0%, 80%, 100% { opacity: 0; }
|
|
972
972
|
40% { opacity: 1; }
|
|
973
973
|
`]))),Hye=function(t,n){var r=t.isFocused,o=t.size,a=t.theme,s=a.colors,u=a.spacing.baseUnit;return At({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:u*2})},tj=function(t){var n=t.delay,r=t.offset;return Et("span",{css:NS({animation:"".concat(Uye," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAq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GF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},Gye=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,a=o===void 0?4:o,s=Wf(t,Dye);return Et("div",Ct({},uo(At(At({},s),{},{innerProps:n,isRtl:r,size:a}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Et(tj,{delay:0,offset:r}),Et(tj,{delay:160,offset:!0}),Et(tj,{delay:320,offset:!r}))},Yye=function(t,n){var r=t.isDisabled,o=t.isFocused,a=t.theme,s=a.colors,u=a.borderRadius,f=a.spacing;return At({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:f.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:o?s.primary:s.neutral20,borderRadius:u,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:o?s.primary:s.neutral30}})},qye=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,a=t.innerRef,s=t.innerProps,u=t.menuIsOpen;return Et("div",Ct({ref:a},uo(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":u}),s,{"aria-disabled":r||void 0}),n)},Xye=qye,Wye=["data"],Zye=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},Jye=function(t){var n=t.children,r=t.cx,o=t.getStyles,a=t.getClassNames,s=t.Heading,u=t.headingProps,f=t.innerProps,p=t.label,m=t.theme,g=t.selectProps;return Et("div",Ct({},uo(t,"group",{group:!0}),f),Et(s,Ct({},u,{selectProps:g,theme:m,getStyles:o,getClassNames:a,cx:r}),p),Et("div",null,n))},Kye=function(t,n){var r=t.theme,o=r.colors,a=r.spacing;return At({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:a.baseUnit*3,paddingRight:a.baseUnit*3,textTransform:"uppercase"})},Qye=function(t){var n=qV(t);n.data;var r=Wf(n,Wye);return Et("div",Ct({},uo(t,"groupHeading",{"group-heading":!0}),r))},e0e=Jye,t0e=["innerRef","isDisabled","isHidden","inputClassName"],n0e=function(t,n){var r=t.isDisabled,o=t.value,a=t.theme,s=a.spacing,u=a.colors;return At(At({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},r0e),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:u.neutral80})},iU={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},r0e={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":At({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},iU)},o0e=function(t){return At({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},iU)},i0e=function(t){var n=t.cx,r=t.value,o=qV(t),a=o.innerRef,s=o.isDisabled,u=o.isHidden,f=o.inputClassName,p=Wf(o,t0e);return Et("div",Ct({},uo(t,"input",{"input-container":!0}),{"data-value":r||""}),Et("input",Ct({className:n({input:!0},f),ref:a,style:o0e(u),disabled:s},p)))},a0e=i0e,s0e=function(t,n){var r=t.theme,o=r.spacing,a=r.borderRadius,s=r.colors;return At({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:a/2,margin:o.baseUnit/2})},l0e=function(t,n){var r=t.theme,o=r.borderRadius,a=r.colors,s=t.cropWithEllipsis;return At({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:a.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},u0e=function(t,n){var r=t.theme,o=r.spacing,a=r.borderRadius,s=r.colors,u=t.isFocused;return At({alignItems:"center",display:"flex"},n?{}:{borderRadius:a/2,backgroundColor:u?s.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},aU=function(t){var n=t.children,r=t.innerProps;return Et("div",r,n)},c0e=aU,f0e=aU;function d0e(e){var t=e.children,n=e.innerProps;return Et("div",Ct({role:"button"},n),t||Et(ej,{size:14}))}var p0e=function(t){var n=t.children,r=t.components,o=t.data,a=t.innerProps,s=t.isDisabled,u=t.removeProps,f=t.selectProps,p=r.Container,m=r.Label,g=r.Remove;return Et(p,{data:o,innerProps:At(At({},uo(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),a),selectProps:f},Et(m,{data:o,innerProps:At({},uo(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:f},n),Et(g,{data:o,innerProps:At(At({},uo(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},u),selectProps:f}))},h0e=p0e,m0e=function(t,n){var r=t.isDisabled,o=t.isFocused,a=t.isSelected,s=t.theme,u=s.spacing,f=s.colors;return At({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:a?f.primary:o?f.primary25:"transparent",color:r?f.neutral20:a?f.neutral0:"inherit",padding:"".concat(u.baseUnit*2,"px ").concat(u.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:a?f.primary:f.primary50}})},g0e=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,a=t.isSelected,s=t.innerRef,u=t.innerProps;return Et("div",Ct({},uo(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":a}),{ref:s,"aria-disabled":r},u),n)},y0e=g0e,b0e=function(t,n){var r=t.theme,o=r.spacing,a=r.colors;return At({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:a.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},v0e=function(t){var n=t.children,r=t.innerProps;return Et("div",Ct({},uo(t,"placeholder",{placeholder:!0}),r),n)},S0e=v0e,x0e=function(t,n){var r=t.isDisabled,o=t.theme,a=o.spacing,s=o.colors;return At({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},w0e=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return Et("div",Ct({},uo(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},E0e=w0e,_0e={ClearIndicator:Lye,Control:Xye,DropdownIndicator:$ye,DownChevron:rU,CrossIcon:ej,Group:e0e,GroupHeading:Qye,IndicatorsContainer:Mye,IndicatorSeparator:Vye,Input:a0e,LoadingIndicator:Gye,Menu:bye,MenuList:Sye,MenuPortal:Tye,LoadingMessage:_ye,NoOptionsMessage:Eye,MultiValue:h0e,MultiValueContainer:c0e,MultiValueLabel:f0e,MultiValueRemove:d0e,Option:y0e,Placeholder:S0e,SelectContainer:Oye,SingleValue:E0e,ValueContainer:Nye},C0e=function(t){return At(At({},_0e),t.components)},sU=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function T0e(e,t){return!!(e===t||sU(e)&&sU(t))}function A0e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!T0e(e[n],t[n]))return!1;return!0}function O0e(e,t){t===void 0&&(t=A0e);var n=null;function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var s=e.apply(this,o);return n={lastResult:s,lastArgs:o,lastThis:this},s}return r.clear=function(){n=null},r}function R0e(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var N0e=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:R0e},k0e=function(t){return Et("span",Ct({css:N0e},t))},lU=k0e,M0e={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,a=t.context,s=t.isInitialFocus;switch(a){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,a=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(a.length>1?"s":""," ").concat(a.join(","),", selected.");case"select-option":return s?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,a=t.label,s=a===void 0?"":a,u=t.selectValue,f=t.isDisabled,p=t.isSelected,m=t.isAppleDevice,g=function(x,E){return x&&x.length?"".concat(x.indexOf(E)+1," of ").concat(x.length):""};if(n==="value"&&u)return"value ".concat(s," focused, ").concat(g(u,r),".");if(n==="menu"&&m){var b=f?" disabled":"",S="".concat(p?" selected":"").concat(b);return"".concat(s).concat(S,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},I0e=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.focusableOptions,s=t.isFocused,u=t.selectValue,f=t.selectProps,p=t.id,m=t.isAppleDevice,g=f.ariaLiveMessages,b=f.getOptionLabel,S=f.inputValue,w=f.isMulti,x=f.isOptionDisabled,E=f.isSearchable,C=f.menuIsOpen,N=f.options,O=f.screenReaderStatus,k=f.tabSelectsValue,M=f.isLoading,D=f["aria-label"],P=f["aria-live"],B=oe.useMemo(function(){return At(At({},M0e),g||{})},[g]),V=oe.useMemo(function(){var ee="";if(n&&B.onChange){var H=n.option,ne=n.options,Q=n.removedValue,ae=n.removedValues,q=n.value,W=function(he){return Array.isArray(he)?null:he},ie=Q||H||W(q),Z=ie?b(ie):"",K=ne||ae||void 0,se=K?K.map(b):[],de=At({isDisabled:ie&&x(ie,u),label:Z,labels:se},n);ee=B.onChange(de)}return ee},[n,B,x,u,b]),U=oe.useMemo(function(){var ee="",H=r||o,ne=!!(r&&u&&u.includes(r));if(H&&B.onFocus){var Q={focused:H,label:b(H),isDisabled:x(H,u),isSelected:ne,options:a,context:H===r?"menu":"value",selectValue:u,isAppleDevice:m};ee=B.onFocus(Q)}return ee},[r,o,b,x,B,a,u,m]),X=oe.useMemo(function(){var ee="";if(C&&N.length&&!M&&B.onFilter){var H=O({count:a.length});ee=B.onFilter({inputValue:S,resultsMessage:H})}return ee},[a,S,C,B,N,O,M]),L=n?.action==="initial-input-focus",J=oe.useMemo(function(){var ee="";if(B.guidance){var H=o?"value":C?"menu":"input";ee=B.guidance({"aria-label":D,context:H,isDisabled:r&&x(r,u),isMulti:w,isSearchable:E,tabSelectsValue:k,isInitialFocus:L})}return ee},[D,r,o,w,x,E,C,B,u,k,L]),Y=Et(oe.Fragment,null,Et("span",{id:"aria-selection"},V),Et("span",{id:"aria-focused"},U),Et("span",{id:"aria-results"},X),Et("span",{id:"aria-guidance"},J));return Et(oe.Fragment,null,Et(lU,{id:p},L&&Y),Et(lU,{"aria-live":P,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!L&&Y))},D0e=I0e,nj=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],j0e=new RegExp("["+nj.map(function(e){return e.letters}).join("")+"]","g"),uU={},rj=0;rj<nj.length;rj++)for(var oj=nj[rj],ij=0;ij<oj.letters.length;ij++)uU[oj.letters[ij]]=oj.base;var cU=function(t){return t.replace(j0e,function(n){return uU[n]})},P0e=O0e(cU),fU=function(t){return t.replace(/^\s+|\s+$/g,"")},z0e=function(t){return"".concat(t.label," ").concat(t.value)},$0e=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=At({ignoreCase:!0,ignoreAccents:!0,stringify:z0e,trim:!0,matchFrom:"any"},t),a=o.ignoreCase,s=o.ignoreAccents,u=o.stringify,f=o.trim,p=o.matchFrom,m=f?fU(r):r,g=f?fU(u(n)):u(n);return a&&(m=m.toLowerCase(),g=g.toLowerCase()),s&&(m=P0e(m),g=cU(g)),p==="start"?g.substr(0,m.length)===m:g.indexOf(m)>-1}},F0e=["innerRef"];function L0e(e){var t=e.innerRef,n=Wf(e,F0e),r=cye(n,"onExited","in","enter","exit","appear");return Et("input",Ct({ref:t},r,{css:NS({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZW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6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var B0e=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function V0e(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,s=oe.useRef(!1),u=oe.useRef(!1),f=oe.useRef(0),p=oe.useRef(null),m=oe.useCallback(function(E,C){if(p.current!==null){var N=p.current,O=N.scrollTop,k=N.scrollHeight,M=N.clientHeight,D=p.current,P=C>0,B=k-M-O,V=!1;B>C&&s.current&&(r&&r(E),s.current=!1),P&&u.current&&(a&&a(E),u.current=!1),P&&C>B?(n&&!s.current&&n(E),D.scrollTop=k,V=!0,s.current=!0):!P&&-C>O&&(o&&!u.current&&o(E),D.scrollTop=0,V=!0,u.current=!0),V&&B0e(E)}},[n,r,o,a]),g=oe.useCallback(function(E){m(E,E.deltaY)},[m]),b=oe.useCallback(function(E){f.current=E.changedTouches[0].clientY},[]),S=oe.useCallback(function(E){var C=f.current-E.changedTouches[0].clientY;m(E,C)},[m]),w=oe.useCallback(function(E){if(E){var C=sye?{passive:!1}:!1;E.addEventListener("wheel",g,C),E.addEventListener("touchstart",b,C),E.addEventListener("touchmove",S,C)}},[S,b,g]),x=oe.useCallback(function(E){E&&(E.removeEventListener("wheel",g,!1),E.removeEventListener("touchstart",b,!1),E.removeEventListener("touchmove",S,!1))},[S,b,g]);return oe.useEffect(function(){if(t){var E=p.current;return w(E),function(){x(E)}}},[t,w,x]),function(E){p.current=E}}var dU=["boxSizing","height","overflow","paddingRight","position"],pU={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function hU(e){e.cancelable&&e.preventDefault()}function mU(e){e.stopPropagation()}function gU(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function yU(){return"ontouchstart"in window||navigator.maxTouchPoints}var bU=!!(typeof window<"u"&&window.document&&window.document.createElement),sx=0,ub={capture:!1,passive:!1};function U0e(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=oe.useRef({}),a=oe.useRef(null),s=oe.useCallback(function(f){if(bU){var p=document.body,m=p&&p.style;if(r&&dU.forEach(function(w){var x=m&&m[w];o.current[w]=x}),r&&sx<1){var g=parseInt(o.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,S=window.innerWidth-b+g||0;Object.keys(pU).forEach(function(w){var x=pU[w];m&&(m[w]=x)}),m&&(m.paddingRight="".concat(S,"px"))}p&&yU()&&(p.addEventListener("touchmove",hU,ub),f&&(f.addEventListener("touchstart",gU,ub),f.addEventListener("touchmove",mU,ub))),sx+=1}},[r]),u=oe.useCallback(function(f){if(bU){var p=document.body,m=p&&p.style;sx=Math.max(sx-1,0),r&&sx<1&&dU.forEach(function(g){var b=o.current[g];m&&(m[g]=b)}),p&&yU()&&(p.removeEventListener("touchmove",hU,ub),f&&(f.removeEventListener("touchstart",gU,ub),f.removeEventListener("touchmove",mU,ub)))}},[r]);return oe.useEffect(function(){if(t){var f=a.current;return s(f),function(){u(f)}}},[t,s,u]),function(f){a.current=f}}function H0e(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var G0e=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Y0e=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWV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gICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:H0e};function q0e(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,a=e.onBottomArrive,s=e.onBottomLeave,u=e.onTopArrive,f=e.onTopLeave,p=V0e({isEnabled:o,onBottomArrive:a,onBottomLeave:s,onTopArrive:u,onTopLeave:f}),m=U0e({isEnabled:n}),g=function(S){p(S),m(S)};return Et(oe.Fragment,null,n&&Et("div",{onClick:G0e,css:Y0e}),t(g))}function X0e(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var W0e=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:X0e},Z0e=function(t){var n=t.name,r=t.onFocus;return Et("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:W0e,value:"",onChange:function(){}})},J0e=Z0e;function aj(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function K0e(){return aj(/^iPhone/i)}function vU(){return aj(/^Mac/i)}function Q0e(){return aj(/^iPad/i)||vU()&&navigator.maxTouchPoints>1}function ebe(){return K0e()||Q0e()}function tbe(){return vU()||ebe()}var nbe=function(t){return t.label},rbe=function(t){return t.label},obe=function(t){return t.value},ibe=function(t){return!!t.isDisabled},abe={clearIndicator:Fye,container:Aye,control:Yye,dropdownIndicator:zye,group:Zye,groupHeading:Kye,indicatorsContainer:kye,indicatorSeparator:Bye,input:n0e,loadingIndicator:Hye,loadingMessage:wye,menu:mye,menuList:vye,menuPortal:Cye,multiValue:s0e,multiValueLabel:l0e,multiValueRemove:u0e,noOptionsMessage:xye,option:m0e,placeholder:b0e,singleValue:x0e,valueContainer:Rye},sbe={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},lbe=4,SU=4,ube=38,cbe=SU*2,fbe={baseUnit:SU,controlHeight:ube,menuGutter:cbe},sj={borderRadius:lbe,colors:sbe,spacing:fbe},dbe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ZV(),captureMenuScroll:!ZV(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:$0e(),formatGroupLabel:nbe,getOptionLabel:rbe,getOptionValue:obe,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ibe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!iye(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function xU(e,t,n,r){var o=TU(e,t,n),a=AU(e,t,n),s=CU(e,t),u=zT(e,t);return{type:"option",data:t,isDisabled:o,isSelected:a,label:s,value:u,index:r}}function PT(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(s,u){return xU(e,s,t,u)}).filter(function(s){return _U(e,s)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=xU(e,n,t,r);return _U(e,a)?a:void 0}).filter(lye)}function wU(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,KD(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function EU(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,KD(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function pbe(e,t){return wU(PT(e,t))}function _U(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,a=t.isSelected,s=t.label,u=t.value;return(!RU(e)||!a)&&OU(e,{label:s,value:u,data:o},r)}function hbe(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var a=t.indexOf(n);if(a>-1)return n;if(o<t.length)return t[o]}return null}function mbe(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var lj=function(t,n){var r,o=(r=t.find(function(a){return a.data===n}))===null||r===void 0?void 0:r.id;return o||null},CU=function(t,n){return t.getOptionLabel(n)},zT=function(t,n){return t.getOptionValue(n)};function TU(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function AU(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=zT(e,t);return n.some(function(o){return zT(e,o)===r})}function OU(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var RU=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},gbe=1,NU=(function(e){Gge(n,e);var t=qge(n);function n(r){var o;if(Uge(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(f){o.controlRef=f},o.focusedOptionRef=null,o.getFocusedOptionRef=function(f){o.focusedOptionRef=f},o.menuListRef=null,o.getMenuListRef=function(f){o.menuListRef=f},o.inputRef=null,o.getInputRef=function(f){o.inputRef=f},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(f,p){var m=o.props,g=m.onChange,b=m.name;p.name=b,o.ariaOnChange(f,p),g(f,p)},o.setValue=function(f,p,m){var g=o.props,b=g.closeMenuOnSelect,S=g.isMulti,w=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:w}),b&&(o.setState({inputIsHiddenAfterUpdate:!S}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(f,{action:p,option:m})},o.selectOption=function(f){var p=o.props,m=p.blurInputOnSelect,g=p.isMulti,b=p.name,S=o.state.selectValue,w=g&&o.isOptionSelected(f,S),x=o.isOptionDisabled(f,S);if(w){var E=o.getOptionValue(f);o.setValue(S.filter(function(C){return o.getOptionValue(C)!==E}),"deselect-option",f)}else if(!x)g?o.setValue([].concat(KD(S),[f]),"select-option",f):o.setValue(f,"select-option");else{o.ariaOnChange(f,{action:"select-option",option:f,name:b});return}m&&o.blurInput()},o.removeValue=function(f){var p=o.props.isMulti,m=o.state.selectValue,g=o.getOptionValue(f),b=m.filter(function(w){return o.getOptionValue(w)!==g}),S=jT(p,b,b[0]||null);o.onChange(S,{action:"remove-value",removedValue:f}),o.focusInput()},o.clearValue=function(){var f=o.state.selectValue;o.onChange(jT(o.props.isMulti,[],null),{action:"clear",removedValues:f})},o.popValue=function(){var f=o.props.isMulti,p=o.state.selectValue,m=p[p.length-1],g=p.slice(0,p.length-1),b=jT(f,g,g[0]||null);m&&o.onChange(b,{action:"pop-value",removedValue:m})},o.getFocusedOptionId=function(f){return lj(o.state.focusableOptionsWithIds,f)},o.getFocusableOptionsWithIds=function(){return EU(PT(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return eye.apply(void 0,[o.props.classNamePrefix].concat(p))},o.getOptionLabel=function(f){return CU(o.props,f)},o.getOptionValue=function(f){return zT(o.props,f)},o.getStyles=function(f,p){var m=o.props.unstyled,g=abe[f](p,m);g.boxSizing="border-box";var b=o.props.styles[f];return b?b(g,p):g},o.getClassNames=function(f,p){var m,g;return(m=(g=o.props.classNames)[f])===null||m===void 0?void 0:m.call(g,p)},o.getElementId=function(f){return"".concat(o.state.instancePrefix,"-").concat(f)},o.getComponents=function(){return C0e(o.props)},o.buildCategorizedOptions=function(){return PT(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return wU(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(f,p){o.setState({ariaSelection:At({value:f},p)})},o.onMenuMouseDown=function(f){f.button===0&&(f.stopPropagation(),f.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(f){o.blockOptionHover=!1},o.onControlMouseDown=function(f){if(!f.defaultPrevented){var p=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&o.onMenuClose():p&&o.openMenu("first"):(p&&(o.openAfterFocus=!0),o.focusInput()),f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&f.preventDefault()}},o.onDropdownIndicatorMouseDown=function(f){if(!(f&&f.type==="mousedown"&&f.button!==0)&&!o.props.isDisabled){var p=o.props,m=p.isMulti,g=p.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!m}),o.onMenuClose()):o.openMenu("first"),f.preventDefault()}},o.onClearIndicatorMouseDown=function(f){f&&f.type==="mousedown"&&f.button!==0||(o.clearValue(),f.preventDefault(),o.openAfterFocus=!1,f.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(f){typeof o.props.closeMenuOnScroll=="boolean"?f.target instanceof HTMLElement&&kT(f.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(f)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(f){var p=f.touches,m=p&&p.item(0);m&&(o.initialTouchX=m.clientX,o.initialTouchY=m.clientY,o.userIsDragging=!1)},o.onTouchMove=function(f){var p=f.touches,m=p&&p.item(0);if(m){var g=Math.abs(m.clientX-o.initialTouchX),b=Math.abs(m.clientY-o.initialTouchY),S=5;o.userIsDragging=g>S||b>S}},o.onTouchEnd=function(f){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(f.target)&&o.menuListRef&&!o.menuListRef.contains(f.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(f){o.userIsDragging||o.onControlMouseDown(f)},o.onClearIndicatorTouchEnd=function(f){o.userIsDragging||o.onClearIndicatorMouseDown(f)},o.onDropdownIndicatorTouchEnd=function(f){o.userIsDragging||o.onDropdownIndicatorMouseDown(f)},o.handleInputChange=function(f){var p=o.props.inputValue,m=f.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(m,{action:"input-change",prevInputValue:p}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(f){o.props.onFocus&&o.props.onFocus(f),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(f){var p=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(f),o.onInputChange("",{action:"input-blur",prevInputValue:p}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(f){if(!(o.blockOptionHover||o.state.focusedOption===f)){var p=o.getFocusableOptions(),m=p.indexOf(f);o.setState({focusedOption:f,focusedOptionId:m>-1?o.getFocusedOptionId(f):null})}},o.shouldHideSelectedOptions=function(){return RU(o.props)},o.onValueInputFocus=function(f){f.preventDefault(),f.stopPropagation(),o.focus()},o.onKeyDown=function(f){var p=o.props,m=p.isMulti,g=p.backspaceRemovesValue,b=p.escapeClearsValue,S=p.inputValue,w=p.isClearable,x=p.isDisabled,E=p.menuIsOpen,C=p.onKeyDown,N=p.tabSelectsValue,O=p.openMenuOnFocus,k=o.state,M=k.focusedOption,D=k.focusedValue,P=k.selectValue;if(!x&&!(typeof C=="function"&&(C(f),f.defaultPrevented))){switch(o.blockOptionHover=!0,f.key){case"ArrowLeft":if(!m||S)return;o.focusValue("previous");break;case"ArrowRight":if(!m||S)return;o.focusValue("next");break;case"Delete":case"Backspace":if(S)return;if(D)o.removeValue(D);else{if(!g)return;m?o.popValue():w&&o.clearValue()}break;case"Tab":if(o.isComposing||f.shiftKey||!E||!N||!M||O&&o.isOptionSelected(M,P))return;o.selectOption(M);break;case"Enter":if(f.keyCode===229)break;if(E){if(!M||o.isComposing)return;o.selectOption(M);break}return;case"Escape":E?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:S}),o.onMenuClose()):w&&b&&o.clearValue();break;case" ":if(S)return;if(!E){o.openMenu("first");break}if(!M)return;o.selectOption(M);break;case"ArrowUp":E?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":E?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!E)return;o.focusOption("pageup");break;case"PageDown":if(!E)return;o.focusOption("pagedown");break;case"Home":if(!E)return;o.focusOption("first");break;case"End":if(!E)return;o.focusOption("last");break;default:return}f.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++gbe),o.state.selectValue=YV(r.value),r.menuIsOpen&&o.state.selectValue.length){var a=o.getFocusableOptionsWithIds(),s=o.buildFocusableOptions(),u=s.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=a,o.state.focusedOption=s[u],o.state.focusedOptionId=lj(a,s[u])}return o}return Hge(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&WV(this.menuListRef,this.focusedOptionRef),tbe()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var a=this.props,s=a.isDisabled,u=a.menuIsOpen,f=this.state.isFocused;(f&&!s&&o.isDisabled||f&&u&&!o.menuIsOpen)&&this.focusInput(),f&&s&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!f&&!s&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(WV(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,a){this.props.onInputChange(o,a)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var a=this,s=this.state,u=s.selectValue,f=s.isFocused,p=this.buildFocusableOptions(),m=o==="first"?0:p.length-1;if(!this.props.isMulti){var g=p.indexOf(u[0]);g>-1&&(m=g)}this.scrollToFocusedOptionOnUpdate=!(f&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:p[m],focusedOptionId:this.getFocusedOptionId(p[m])},function(){return a.onMenuOpen()})}},{key:"focusValue",value:function(o){var a=this.state,s=a.selectValue,u=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var f=s.indexOf(u);u||(f=-1);var p=s.length-1,m=-1;if(s.length){switch(o){case"previous":f===0?m=0:f===-1?m=p:m=f-1;break;case"next":f>-1&&f<p&&(m=f+1);break}this.setState({inputIsHidden:m!==-1,focusedValue:s[m]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",a=this.props.pageSize,s=this.state.focusedOption,u=this.getFocusableOptions();if(u.length){var f=0,p=u.indexOf(s);s||(p=-1),o==="up"?f=p>0?p-1:u.length-1:o==="down"?f=(p+1)%u.length:o==="pageup"?(f=p-a,f<0&&(f=0)):o==="pagedown"?(f=p+a,f>u.length-1&&(f=u.length-1)):o==="last"&&(f=u.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:u[f],focusedValue:null,focusedOptionId:this.getFocusedOptionId(u[f])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(sj):At(At({},sj),this.props.theme):sj}},{key:"getCommonProps",value:function(){var o=this.clearValue,a=this.cx,s=this.getStyles,u=this.getClassNames,f=this.getValue,p=this.selectOption,m=this.setValue,g=this.props,b=g.isMulti,S=g.isRtl,w=g.options,x=this.hasValue();return{clearValue:o,cx:a,getStyles:s,getClassNames:u,getValue:f,hasValue:x,isMulti:b,isRtl:S,options:w,selectOption:p,selectProps:g,setValue:m,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,a=o.isClearable,s=o.isMulti;return a===void 0?s:a}},{key:"isOptionDisabled",value:function(o,a){return TU(this.props,o,a)}},{key:"isOptionSelected",value:function(o,a){return AU(this.props,o,a)}},{key:"filterOption",value:function(o,a){return OU(this.props,o,a)}},{key:"formatOptionLabel",value:function(o,a){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,u=this.state.selectValue;return this.props.formatOptionLabel(o,{context:a,inputValue:s,selectValue:u})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,a=o.isDisabled,s=o.isSearchable,u=o.inputId,f=o.inputValue,p=o.tabIndex,m=o.form,g=o.menuIsOpen,b=o.required,S=this.getComponents(),w=S.Input,x=this.state,E=x.inputIsHidden,C=x.ariaSelection,N=this.commonProps,O=u||this.getElementId("input"),k=At(At(At({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":b,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?C?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?F.createElement(w,Ct({},N,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:O,innerRef:this.getInputRef,isDisabled:a,isHidden:E,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:p,form:m,type:"text",value:f},k)):F.createElement(L0e,Ct({id:O,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:NT,onFocus:this.onInputFocus,disabled:a,tabIndex:p,inputMode:"none",form:m,value:""},k))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,a=this.getComponents(),s=a.MultiValue,u=a.MultiValueContainer,f=a.MultiValueLabel,p=a.MultiValueRemove,m=a.SingleValue,g=a.Placeholder,b=this.commonProps,S=this.props,w=S.controlShouldRenderValue,x=S.isDisabled,E=S.isMulti,C=S.inputValue,N=S.placeholder,O=this.state,k=O.selectValue,M=O.focusedValue,D=O.isFocused;if(!this.hasValue()||!w)return C?null:F.createElement(g,Ct({},b,{key:"placeholder",isDisabled:x,isFocused:D,innerProps:{id:this.getElementId("placeholder")}}),N);if(E)return k.map(function(B,V){var U=B===M,X="".concat(o.getOptionLabel(B),"-").concat(o.getOptionValue(B));return F.createElement(s,Ct({},b,{components:{Container:u,Label:f,Remove:p},isFocused:U,isDisabled:x,key:X,index:V,removeProps:{onClick:function(){return o.removeValue(B)},onTouchEnd:function(){return o.removeValue(B)},onMouseDown:function(J){J.preventDefault()}},data:B}),o.formatOptionLabel(B,"value"))});if(C)return null;var P=k[0];return F.createElement(m,Ct({},b,{data:P,isDisabled:x}),this.formatOptionLabel(P,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),a=o.ClearIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,p=u.isLoading,m=this.state.isFocused;if(!this.isClearable()||!a||f||!this.hasValue()||p)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return F.createElement(a,Ct({},s,{innerProps:g,isFocused:m}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),a=o.LoadingIndicator,s=this.commonProps,u=this.props,f=u.isDisabled,p=u.isLoading,m=this.state.isFocused;if(!a||!p)return null;var g={"aria-hidden":"true"};return F.createElement(a,Ct({},s,{innerProps:g,isDisabled:f,isFocused:m}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator,s=o.IndicatorSeparator;if(!a||!s)return null;var u=this.commonProps,f=this.props.isDisabled,p=this.state.isFocused;return F.createElement(s,Ct({},u,{isDisabled:f,isFocused:p}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),a=o.DropdownIndicator;if(!a)return null;var s=this.commonProps,u=this.props.isDisabled,f=this.state.isFocused,p={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return F.createElement(a,Ct({},s,{innerProps:p,isDisabled:u,isFocused:f}))}},{key:"renderMenu",value:function(){var o=this,a=this.getComponents(),s=a.Group,u=a.GroupHeading,f=a.Menu,p=a.MenuList,m=a.MenuPortal,g=a.LoadingMessage,b=a.NoOptionsMessage,S=a.Option,w=this.commonProps,x=this.state.focusedOption,E=this.props,C=E.captureMenuScroll,N=E.inputValue,O=E.isLoading,k=E.loadingMessage,M=E.minMenuHeight,D=E.maxMenuHeight,P=E.menuIsOpen,B=E.menuPlacement,V=E.menuPosition,U=E.menuPortalTarget,X=E.menuShouldBlockScroll,L=E.menuShouldScrollIntoView,J=E.noOptionsMessage,Y=E.onMenuScrollToTop,ee=E.onMenuScrollToBottom;if(!P)return null;var H=function(Z,K){var se=Z.type,de=Z.data,pe=Z.isDisabled,he=Z.isSelected,we=Z.label,_e=Z.value,ue=x===de,fe=pe?void 0:function(){return o.onOptionHover(de)},be=pe?void 0:function(){return o.selectOption(de)},me="".concat(o.getElementId("option"),"-").concat(K),De={id:me,onClick:be,onMouseMove:fe,onMouseOver:fe,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:he};return F.createElement(S,Ct({},w,{innerProps:De,data:de,isDisabled:pe,isSelected:he,key:me,label:we,type:se,value:_e,isFocused:ue,innerRef:ue?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(Z.data,"menu"))},ne;if(this.hasOptions())ne=this.getCategorizedOptions().map(function(ie){if(ie.type==="group"){var Z=ie.data,K=ie.options,se=ie.index,de="".concat(o.getElementId("group"),"-").concat(se),pe="".concat(de,"-heading");return F.createElement(s,Ct({},w,{key:de,data:Z,options:K,Heading:u,headingProps:{id:pe,data:ie.data},label:o.formatGroupLabel(ie.data)}),ie.options.map(function(he){return H(he,"".concat(se,"-").concat(he.index))}))}else if(ie.type==="option")return H(ie,"".concat(ie.index))});else if(O){var Q=k({inputValue:N});if(Q===null)return null;ne=F.createElement(g,w,Q)}else{var ae=J({inputValue:N});if(ae===null)return null;ne=F.createElement(b,w,ae)}var q={minMenuHeight:M,maxMenuHeight:D,menuPlacement:B,menuPosition:V,menuShouldScrollIntoView:L},W=F.createElement(gye,Ct({},w,q),function(ie){var Z=ie.ref,K=ie.placerProps,se=K.placement,de=K.maxHeight;return F.createElement(f,Ct({},w,q,{innerRef:Z,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:O,placement:se}),F.createElement(q0e,{captureEnabled:C,onTopArrive:Y,onBottomArrive:ee,lockEnabled:X},function(pe){return F.createElement(p,Ct({},w,{innerRef:function(we){o.getMenuListRef(we),pe(we)},innerProps:{role:"listbox","aria-multiselectable":w.isMulti,id:o.getElementId("listbox")},isLoading:O,maxHeight:de,focusedOption:x}),ne)}))});return U||V==="fixed"?F.createElement(m,Ct({},w,{appendTo:U,controlElement:this.controlRef,menuPlacement:B,menuPosition:V}),W):W}},{key:"renderFormField",value:function(){var o=this,a=this.props,s=a.delimiter,u=a.isDisabled,f=a.isMulti,p=a.name,m=a.required,g=this.state.selectValue;if(m&&!this.hasValue()&&!u)return F.createElement(J0e,{name:p,onFocus:this.onValueInputFocus});if(!(!p||u))if(f)if(s){var b=g.map(function(x){return o.getOptionValue(x)}).join(s);return F.createElement("input",{name:p,type:"hidden",value:b})}else{var S=g.length>0?g.map(function(x,E){return F.createElement("input",{key:"i-".concat(E),name:p,type:"hidden",value:o.getOptionValue(x)})}):F.createElement("input",{name:p,type:"hidden",value:""});return F.createElement("div",null,S)}else{var w=g[0]?this.getOptionValue(g[0]):"";return F.createElement("input",{name:p,type:"hidden",value:w})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,a=this.state,s=a.ariaSelection,u=a.focusedOption,f=a.focusedValue,p=a.isFocused,m=a.selectValue,g=this.getFocusableOptions();return F.createElement(D0e,Ct({},o,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:u,focusedValue:f,isFocused:p,selectValue:m,focusableOptions:g,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),a=o.Control,s=o.IndicatorsContainer,u=o.SelectContainer,f=o.ValueContainer,p=this.props,m=p.className,g=p.id,b=p.isDisabled,S=p.menuIsOpen,w=this.state.isFocused,x=this.commonProps=this.getCommonProps();return F.createElement(u,Ct({},x,{className:m,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:w}),this.renderLiveRegion(),F.createElement(a,Ct({},x,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:w,menuIsOpen:S}),F.createElement(f,Ct({},x,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),F.createElement(s,Ct({},x,{isDisabled:b}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,a){var s=a.prevProps,u=a.clearFocusValueOnUpdate,f=a.inputIsHiddenAfterUpdate,p=a.ariaSelection,m=a.isFocused,g=a.prevWasFocused,b=a.instancePrefix,S=o.options,w=o.value,x=o.menuIsOpen,E=o.inputValue,C=o.isMulti,N=YV(w),O={};if(s&&(w!==s.value||S!==s.options||x!==s.menuIsOpen||E!==s.inputValue)){var k=x?pbe(o,N):[],M=x?EU(PT(o,N),"".concat(b,"-option")):[],D=u?hbe(a,N):null,P=mbe(a,k),B=lj(M,P);O={selectValue:N,focusedOption:P,focusedOptionId:B,focusableOptionsWithIds:M,focusedValue:D,clearFocusValueOnUpdate:!1}}var V=f!=null&&o!==s?{inputIsHidden:f,inputIsHiddenAfterUpdate:void 0}:{},U=p,X=m&&g;return m&&!X&&(U={value:jT(C,N,N[0]||null),options:N,action:"initial-input-focus"},X=!g),p?.action==="initial-input-focus"&&(U=null),At(At(At({},O),V),{},{prevProps:o,ariaSelection:U,prevWasFocused:X})}}]),n})(oe.Component);NU.defaultProps=dbe;var ybe=oe.forwardRef(function(e,t){var n=Vge(e);return F.createElement(NU,Ct({ref:t},n))}),bbe=ybe;const vbe=({options:e,items_per_page:t,className:n,defaultValue:r,onChange:o})=>{const[a,s]=oe.useState(""),[u,f]=oe.useState(0),p=S=>{s(S.toLowerCase()),f(0)},m=e.filter(S=>S.label.toLowerCase().includes(a)||S.value.toLowerCase().includes(a));var g;t!==void 0?g=m.slice(u*t,(u+1)*t):g=m;const b={control:S=>({...S,minHeight:void 0})};return A.jsx(bbe,{options:g,onInputChange:p,onChange:o,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:n,unstyled:!0,styles:b,classNamePrefix:"styled-select",defaultValue:r,value:r})},Sbe=e=>typeof e=="boolean"||e instanceof Boolean,xbe=e=>typeof e=="number"||e instanceof Number,wbe=e=>typeof e=="bigint"||e instanceof BigInt,kU=e=>!!e&&e instanceof Date,Ebe=e=>typeof e=="string"||e instanceof String,_be=e=>Array.isArray(e),MU=e=>typeof e=="object"&&e!==null,IU=e=>!!e&&e instanceof Object&&typeof e=="function";function $T(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function Cbe(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function DU(e){let{field:t,value:n,data:r,lastElement:o,openBracket:a,closeBracket:s,level:u,style:f,shouldExpandNode:p,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const S=oe.useRef(!1),[w,x]=oe.useState(()=>p(u,n,t)),E=oe.useRef(null);oe.useEffect(()=>{S.current?x(p(u,n,t)):S.current=!0},[p]);const C=oe.useId();if(r.length===0)return Tbe({field:t,openBracket:a,closeBracket:s,lastElement:o,style:f});const N=w?f.collapseIcon:f.expandIcon,O=w?f.ariaLables.collapseJson:f.ariaLables.expandJson,k=u+1,M=r.length-1,D=V=>{w!==V&&(!b||b({level:u,value:n,field:t,newExpandValue:V}))&&x(V)},P=V=>{if(V.key==="ArrowRight"||V.key==="ArrowLeft")V.preventDefault(),D(V.key==="ArrowRight");else if(V.key==="ArrowUp"||V.key==="ArrowDown"){V.preventDefault();const U=V.key==="ArrowUp"?-1:1;if(!g.current)return;const X=g.current.querySelectorAll("[role=button]");let L=-1;for(let Y=0;Y<X.length;Y++)if(X[Y].tabIndex===0){L=Y;break}if(L<0)return;const J=(L+U+X.length)%X.length;X[L].tabIndex=-1,X[J].tabIndex=0,X[J].focus()}},B=()=>{var V;D(!w);const U=E.current;if(!U)return;const X=(V=g.current)===null||V===void 0?void 0:V.querySelector('[role=button][tabindex="0"]');X&&(X.tabIndex=-1),U.tabIndex=0,U.focus()};return oe.createElement("div",{className:f.basicChildStyle,role:"treeitem","aria-expanded":w,"aria-selected":void 0},oe.createElement("span",{className:N,onClick:B,onKeyDown:P,role:"button","aria-label":O,"aria-expanded":w,"aria-controls":w?C:void 0,ref:E,tabIndex:u===0?0:-1}),(t||t==="")&&(m?oe.createElement("span",{className:f.clickableLabel,onClick:B,onKeyDown:P},$T(t,f.quotesForFieldNames),":"):oe.createElement("span",{className:f.label},$T(t,f.quotesForFieldNames),":")),oe.createElement("span",{className:f.punctuation},a),w?oe.createElement("ul",{id:C,role:"group",className:f.childFieldsContainer},r.map((V,U)=>oe.createElement(uj,{key:V[0]||U,field:V[0],value:V[1],style:f,lastElement:U===M,level:k,shouldExpandNode:p,clickToExpandNode:m,beforeExpandChange:b,outerRef:g}))):oe.createElement("span",{className:f.collapsedContent,onClick:B,onKeyDown:P}),oe.createElement("span",{className:f.punctuation},s),!o&&oe.createElement("span",{className:f.punctuation},","))}function Tbe(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:a}=e;return oe.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&oe.createElement("span",{className:a.label},$T(t,a.quotesForFieldNames),":"),oe.createElement("span",{className:a.punctuation},n),oe.createElement("span",{className:a.punctuation},r),!o&&oe.createElement("span",{className:a.punctuation},","))}function Abe(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:a,clickToExpandNode:s,level:u,outerRef:f,beforeExpandChange:p}=e;return DU({field:t,value:n,lastElement:o||!1,level:u,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:a,clickToExpandNode:s,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:f,beforeExpandChange:p})}function Obe(e){let{field:t,value:n,style:r,lastElement:o,level:a,shouldExpandNode:s,clickToExpandNode:u,outerRef:f,beforeExpandChange:p}=e;return DU({field:t,value:n,lastElement:o||!1,level:a,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:u,data:n.map(m=>[void 0,m]),outerRef:f,beforeExpandChange:p})}function Rbe(e){let{field:t,value:n,style:r,lastElement:o}=e,a,s=r.otherValue;return n===null?(a="null",s=r.nullValue):n===void 0?(a="undefined",s=r.undefinedValue):Ebe(n)?(a=Cbe(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):Sbe(n)?(a=n?"true":"false",s=r.booleanValue):xbe(n)?(a=n.toString(),s=r.numberValue):wbe(n)?(a=`${n.toString()}n`,s=r.numberValue):kU(n)?a=n.toISOString():IU(n)?a="function() { }":a=n.toString(),oe.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&oe.createElement("span",{className:r.label},$T(t,r.quotesForFieldNames),":"),oe.createElement("span",{className:s},a),!o&&oe.createElement("span",{className:r.punctuation},","))}function uj(e){const t=e.value;return _be(t)?oe.createElement(Obe,Object.assign({},e)):MU(t)&&!kU(t)&&!IU(t)?oe.createElement(Abe,Object.assign({},e)):oe.createElement(Rbe,Object.assign({},e))}var Qn={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const jU={collapseJson:"collapse JSON",expandJson:"expand JSON"},cj={container:Qn["container-light"],basicChildStyle:Qn["basic-element-style"],childFieldsContainer:Qn["child-fields-container"],label:Qn["label-light"],clickableLabel:Qn["clickable-label-light"],nullValue:Qn["value-null-light"],undefinedValue:Qn["value-undefined-light"],stringValue:Qn["value-string-light"],booleanValue:Qn["value-boolean-light"],numberValue:Qn["value-number-light"],otherValue:Qn["value-other-light"],punctuation:Qn["punctuation-light"],collapseIcon:Qn["collapse-icon-light"],expandIcon:Qn["expand-icon-light"],collapsedContent:Qn["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:jU,stringifyStringValues:!1},Nbe={container:Qn["container-dark"],basicChildStyle:Qn["basic-element-style"],childFieldsContainer:Qn["child-fields-container"],label:Qn["label-dark"],clickableLabel:Qn["clickable-label-dark"],nullValue:Qn["value-null-dark"],undefinedValue:Qn["value-undefined-dark"],stringValue:Qn["value-string-dark"],booleanValue:Qn["value-boolean-dark"],numberValue:Qn["value-number-dark"],otherValue:Qn["value-other-dark"],punctuation:Qn["punctuation-dark"],collapseIcon:Qn["collapse-icon-dark"],expandIcon:Qn["expand-icon-dark"],collapsedContent:Qn["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:jU,stringifyStringValues:!1},kbe=()=>!0,Mbe=e=>e<1,Ibe=e=>{let{data:t,style:n=cj,shouldExpandNode:r=kbe,clickToExpandNode:o=!1,beforeExpandChange:a,compactTopLevel:s,...u}=e;const f=oe.useRef(null);return oe.createElement("div",Object.assign({"aria-label":"JSON view"},u,{className:n.container,ref:f,role:"tree"}),s&&MU(t)?Object.entries(t).map(p=>{let[m,g]=p;return oe.createElement(uj,{key:m,field:m,value:g,style:{...cj,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:o,beforeExpandChange:a,outerRef:f})}):oe.createElement(uj,{value:t,style:{...cj,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:f,beforeExpandChange:a}))};function Dbe(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}function jbe(e){if(e==null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype?!1:Dbe(e)}const Pbe=({data:e,className:t="json-display"})=>A.jsx("div",{className:t,children:A.jsx(Ibe,{data:jbe(e)?"":e,style:Nbe,shouldExpandNode:Mbe})});function zbe(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:a=.9}=n;if(!e||!t)return;if(a>=1||a<=0)throw new Error("decrementFactor must be between 0 and 1");const s=e.getBoundingClientRect(),u=s.width,f=s.height;let p=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=p+"px";let m=t.getBoundingClientRect();for(;(m.width>u||m.height>f)&&p>o;)p*=a,t.style.fontSize=p+"px",m=t.getBoundingClientRect()}function $be(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n=0,unit_scale:r=!1,elapsed:o=0,unit:a="it",unit_divisor:s=1e3,prefix:u="",rate:f=void 0,postfix:p=null,initial:m=0}=e;t!==null&&n>=t+.5&&(t=null);let g=n,b=t,S=f;r&&r!==!0&&r!==1&&(t!==null&&(b=t*r),g=n*r,f!==void 0&&(S=f*r));const w=PU(o);S===void 0&&o>0&&(S=(g-m)/o);const x=S?1/S:void 0,[E,C]=S?FT(S,s):[void 0,""],[N,O]=x?FT(x,1e3):[void 0,""],k=(E||"?")+`${C}${a}/s`,M=N?`${N}${O}s/`+a:"?",D=x&&x>1?M:k,P=r?FT(g,s).join(""):g.toString(),B=r&&b!==null?FT(b,s).join(""):b?.toString()??"?",V=S&&b!==null?(b-g)/S:0,U=S?PU(V):"?",X=u?`${u}: `:"";if(t!==null){const L=g/t*100,J=` ${P}/${B} [${w} < ${U}, ${D}${p??""}]`;return`${X}${L.toFixed(0)}%${J}`}return`${X}${P}${a} [${w}, ${D}${p??""}]`}function PU(e){const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function FT(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const Fbe=({state:e,className:t="reacttqdm",...n})=>{const r=oe.useRef(null),o=oe.useRef(null);oe.useEffect(()=>{const s=()=>{!r.current||!o.current||zbe(r.current,o.current,{maxFontSize:12,decrementFactor:.9})};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]);const a=e.total?(e.n??0)/e.total*100:0;return A.jsx("div",{ref:r,className:t,...n,children:A.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[A.jsx("div",{className:t+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"},children:A.jsx("div",{className:t+"-progress",style:{width:`${a}%`,height:"100%"}})}),A.jsx("div",{className:t+"-text",ref:o,children:$be(e)})]})})};var LT={};var zU;function Lbe(){if(zU)return LT;zU=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;LT.format=s,LT.parse=u;function s(g){if(!g||typeof g!="object")throw new TypeError("argument obj is required");var b=g.parameters,S=g.type;if(!S||!a.test(S))throw new TypeError("invalid type");var w=S;if(b&&typeof b=="object")for(var x,E=Object.keys(b).sort(),C=0;C<E.length;C++){if(x=E[C],!n.test(x))throw new TypeError("invalid parameter name");w+="; "+x+"="+p(b[x])}return w}function u(g){if(!g)throw new TypeError("argument string is required");var b=typeof g=="object"?f(g):g;if(typeof b!="string")throw new TypeError("argument string is required to be a string");var S=b.indexOf(";"),w=S!==-1?b.slice(0,S).trim():b.trim();if(!a.test(w))throw new TypeError("invalid media type");var x=new m(w.toLowerCase());if(S!==-1){var E,C,N;for(e.lastIndex=S;C=e.exec(b);){if(C.index!==S)throw new TypeError("invalid parameter format");S+=C[0].length,E=C[1].toLowerCase(),N=C[2],N.charCodeAt(0)===34&&(N=N.slice(1,-1),N.indexOf("\\")!==-1&&(N=N.replace(r,"$1"))),x.parameters[E]=N}if(S!==b.length)throw new TypeError("invalid parameter format")}return x}function f(g){var b;if(typeof g.getHeader=="function"?b=g.getHeader("content-type"):typeof g.headers=="object"&&(b=g.headers&&g.headers["content-type"]),typeof b!="string")throw new TypeError("content-type header is missing from object");return b}function p(g){var b=String(g);if(n.test(b))return b;if(b.length>0&&!t.test(b))throw new TypeError("invalid parameter value");return'"'+b.replace(o,"\\$1")+'"'}function m(g){this.parameters=Object.create(null),this.type=g}return LT}var Bbe=Lbe(),cb=new Map,$U=function(t){return t.cloneNode(!0)},FU=function(){return window.location.protocol==="file:"},LU=function(t,n,r){var o=new XMLHttpRequest;o.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&o.readyState===2){var a=o.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var s=Bbe.parse(a).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(o.readyState===4){if(o.status===404||o.responseXML===null)throw new Error(FU()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(o.status===200||FU()&&o.status===0)r(null,o);else throw new Error("There was a problem injecting the SVG: "+o.status+" "+o.statusText)}}catch(u){if(o.abort(),u instanceof Error)r(u,o);else throw u}},o.open("GET",t),o.withCredentials=n,o.overrideMimeType&&o.overrideMimeType("text/xml"),o.send()},Bp={},BU=function(t,n){Bp[t]=Bp[t]||[],Bp[t].push(n)},Vbe=function(t){for(var n=function(s,u){setTimeout(function(){if(Array.isArray(Bp[t])){var f=cb.get(t),p=Bp[t][s];f instanceof SVGSVGElement&&p(null,$U(f)),f instanceof Error&&p(f),s===Bp[t].length-1&&delete Bp[t]}},0)},r=0,o=Bp[t].length;r<o;r++)n(r)},Ube=function(t,n,r){if(cb.has(t)){var o=cb.get(t);if(o===void 0){BU(t,r);return}if(o instanceof SVGSVGElement){r(null,$U(o));return}}cb.set(t,void 0),BU(t,r),LU(t,n,function(a,s){var u;a?cb.set(t,a):((u=s.responseXML)===null||u===void 0?void 0:u.documentElement)instanceof SVGSVGElement&&cb.set(t,s.responseXML.documentElement),Vbe(t)})},Hbe=function(t,n,r){LU(t,n,function(o,a){var s;o?r(o):((s=a.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,a.responseXML.documentElement)})},Gbe=0,Ybe=function(){return++Gbe},wc=[],VU={},qbe="http://www.w3.org/2000/svg",fj="http://www.w3.org/1999/xlink",UU=function(t,n,r,o,a,s,u){var f=t.getAttribute("data-src")||t.getAttribute("src");if(!f){u(new Error("Invalid data-src or src attribute"));return}if(wc.indexOf(t)!==-1){wc.splice(wc.indexOf(t),1),t=null;return}wc.push(t),t.setAttribute("src","");var p=o?Ube:Hbe;p(f,a,function(m,g){if(!g){wc.splice(wc.indexOf(t),1),t=null,u(m);return}var b=t.getAttribute("id");b&&g.setAttribute("id",b);var S=t.getAttribute("title");S&&g.setAttribute("title",S);var w=t.getAttribute("width");w&&g.setAttribute("width",w);var x=t.getAttribute("height");x&&g.setAttribute("height",x);var E=Array.from(new Set(G2(G2(G2([],(g.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();g.setAttribute("class",E);var C=t.getAttribute("style");C&&g.setAttribute("style",C),g.setAttribute("data-src",f);var N=[].filter.call(t.attributes,function(Q){return/^data-\w[\w-]*$/.test(Q.name)});if(Array.prototype.forEach.call(N,function(Q){Q.name&&Q.value&&g.setAttribute(Q.name,Q.value)}),r){var O={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},k,M,D,P,B;Object.keys(O).forEach(function(Q){k=Q,D=O[Q],M=g.querySelectorAll(k+"[id]");for(var ae=function(Z,K){P=M[Z].id,B=P+"-"+Ybe();var se;Array.prototype.forEach.call(D,function(be){se=g.querySelectorAll("["+be+'*="'+P+'"]');for(var me=0,De=se.length;me<De;me++){var Fe=se[me].getAttribute(be);Fe&&!Fe.match(new RegExp('url\\("?#'+P+'"?\\)'))||se[me].setAttribute(be,"url(#"+B+")")}});for(var de=g.querySelectorAll("[*|href]"),pe=[],he=0,we=de.length;he<we;he++){var _e=de[he].getAttributeNS(fj,"href");_e&&_e.toString()==="#"+M[Z].id&&pe.push(de[he])}for(var ue=0,fe=pe.length;ue<fe;ue++)pe[ue].setAttributeNS(fj,"href","#"+B);M[Z].id=B},q=0,W=M.length;q<W;q++)ae(q)})}g.removeAttribute("xmlns:a");for(var V=g.querySelectorAll("script"),U=[],X,L,J=0,Y=V.length;J<Y;J++)L=V[J].getAttribute("type"),(!L||L==="application/ecmascript"||L==="application/javascript"||L==="text/javascript")&&(X=V[J].innerText||V[J].textContent,X&&U.push(X),g.removeChild(V[J]));if(U.length>0&&(n==="always"||n==="once"&&!VU[f])){for(var ee=0,H=U.length;ee<H;ee++)new Function(U[ee])(window);VU[f]=!0}var ne=g.querySelectorAll("style");if(Array.prototype.forEach.call(ne,function(Q){Q.textContent+=""}),g.setAttribute("xmlns",qbe),g.setAttribute("xmlns:xlink",fj),s(g),!t.parentNode){wc.splice(wc.indexOf(t),1),t=null,u(new Error("Parent node is null"));return}t.parentNode.replaceChild(g,t),wc.splice(wc.indexOf(t),1),t=null,u(null,g)})},Xbe=function(t,n){var r=n===void 0?{}:n,o=r.afterAll,a=o===void 0?function(){}:o,s=r.afterEach,u=s===void 0?function(){}:s,f=r.beforeEach,p=f===void 0?function(){}:f,m=r.cacheRequests,g=m===void 0?!0:m,b=r.evalScripts,S=b===void 0?"never":b,w=r.httpRequestWithCredentials,x=w===void 0?!1:w,E=r.renumerateIRIElements,C=E===void 0?!0:E;if(t&&"length"in t)for(var N=0,O=0,k=t.length;O<k;O++)UU(t[O],S,C,g,x,p,function(M,D){u(M,D),t&&"length"in t&&t.length===++N&&a(N)});else t?UU(t,S,C,g,x,p,function(M,D){u(M,D),a(1),t=null}):a(0)},Wbe=function(t){var n=t?.ownerDocument||document;return n.defaultView||window},Zbe=function(t,n){for(var r in t)if(!(r in n))return!0;for(var o in n)if(t[o]!==n[o])return!0;return!1},Jbe=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],BT="http://www.w3.org/2000/svg",HU="http://www.w3.org/1999/xlink",dj=(function(e){function t(){for(var r,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(u){r.reactWrapper=u},r}RI(t,e);var n=t.prototype;return n.renderSVG=function(){var o=this;if(this.reactWrapper instanceof Wbe(this.reactWrapper).Node){var a=this.props,s=a.desc,u=a.evalScripts,f=a.httpRequestWithCredentials,p=a.renumerateIRIElements,m=a.src,g=a.title,b=a.useRequestCache,S=this.props.onError,w=this.props.beforeInjection,x=this.props.afterInjection,E=this.props.wrapper,C,N;E==="svg"?(C=document.createElementNS(BT,E),C.setAttribute("xmlns",BT),C.setAttribute("xmlns:xlink",HU),N=document.createElementNS(BT,E)):(C=document.createElement(E),N=document.createElement(E)),C.appendChild(N),N.dataset.src=m,this.nonReactWrapper=this.reactWrapper.appendChild(C);var O=function(P){if(o.removeSVG(),!o._isMounted){S(P);return}o.setState(function(){return{hasError:!0,isLoading:!1}},function(){S(P)})},k=function(P,B){if(P){O(P);return}o._isMounted&&o.setState(function(){return{isLoading:!1}},function(){try{x(B)}catch(V){O(V)}})},M=function(P){if(P.setAttribute("role","img"),s){var B=P.querySelector(":scope > desc");B&&P.removeChild(B);var V=document.createElement("desc");V.innerHTML=s,P.prepend(V)}if(g){var U=P.querySelector(":scope > title");U&&P.removeChild(U);var X=document.createElement("title");X.innerHTML=g,P.prepend(X)}try{w(P)}catch(L){O(L)}};Xbe(N,{afterEach:k,beforeEach:M,cacheRequests:b,evalScripts:u,httpRequestWithCredentials:f,renumerateIRIElements:p})}},n.removeSVG=function(){var o;(o=this.nonReactWrapper)!=null&&o.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(o){var a=this;Zbe(Ct({},o),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var o=this.props;o.afterInjection,o.beforeInjection,o.desc,o.evalScripts;var a=o.fallback;o.httpRequestWithCredentials;var s=o.loading;o.renumerateIRIElements,o.src,o.title,o.useRequestCache;var u=o.wrapper,f=z2(o,Jbe),p=u;return F.createElement(p,Ct({},f,{ref:this.refCallback},u==="svg"?{xmlns:BT,xmlnsXlink:HU}:{}),this.state.isLoading&&s&&F.createElement(s,null),this.state.hasError&&a&&F.createElement(a,null))},t})(F.Component);dj.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},dj.propTypes={afterInjection:_o.func,beforeInjection:_o.func,desc:_o.string,evalScripts:_o.oneOf(["always","once","never"]),fallback:_o.oneOfType([_o.func,_o.object,_o.string]),httpRequestWithCredentials:_o.bool,loading:_o.oneOfType([_o.func,_o.object,_o.string]),onError:_o.func,renumerateIRIElements:_o.bool,src:_o.string.isRequired,title:_o.string,useRequestCache:_o.bool,wrapper:_o.oneOf(["div","span","svg"])};const pj=({text:e="No image data provided"})=>A.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100px",border:"1px dashed #ccc",color:"#666"},children:e}),Kbe=F.memo(({value:e,format:t="jpeg",alt:n="Base64 image",onError:r,onLoad:o,...a})=>{const[s,u]=F.useState(!1),[f,p]=F.useState(!0),m=F.useRef(null),g=F.useMemo(()=>{if(typeof e=="string")return e;if(e&&typeof e=="object"&&"data"in e){const x=e.data;if(x instanceof ArrayBuffer){const E=new Uint8Array(x);let C="";for(let N=0;N<E.byteLength;N++)C+=String.fromCharCode(E[N]);return btoa(C)}}return""},[e]),b=F.useMemo(()=>g?`data:image/${t};base64,${g}`:"",[g,t]),S=F.useCallback(x=>{u(!0),p(!1),r?.(x)},[r]),w=F.useCallback(()=>{p(!1),u(!1),o?.()},[o]);return F.useEffect(()=>{const x=m.current;if(x)return x.addEventListener("error",S),x.addEventListener("load",w),()=>{x.removeEventListener("error",S),x.removeEventListener("load",w)}},[S,w,e]),F.useEffect(()=>{u(!1),p(!0)},[e]),g?s?A.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100px",border:"1px dashed #ccc",color:"#666"},children:"Failed to load base64 image"}):A.jsx("img",{ref:m,src:b,alt:n,className:`base64-image-renderer image-renderer ${a.className||""} ${f?" loading":""}`,...a}):A.jsx(pj,{})}),Qbe=F.memo(({value:e,alt:t="SVG image",onError:n,onLoad:r,...o})=>{const[a,s]=F.useState(!1),u=F.useMemo(()=>{if(!e)return"";try{return`data:image/svg+xml;base64,${btoa(e)}`}catch(p){return console.error("Failed to encode SVG to base64:",p),""}},[e]);F.useEffect(()=>{s(!1)},[e]);const f=F.useCallback(p=>{s(!0),n?.(p)},[n]);return e?a||!u?A.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100px",border:"1px dashed #ccc",color:"#666"},children:"Failed to load SVG"}):A.jsx(dj,{src:u,className:`svg-renderer ${o.className||""}`,style:{maxWidth:"100%",maxHeight:"100%",...o.style},beforeInjection:p=>{p.classList.add("svg-renderer"),p.setAttribute("style","max-width: 100%; max-height: 100%;"),p.setAttribute("width","100%"),p.setAttribute("height","100%"),p.setAttribute("aria-label",t);const m=()=>{s(!1),r?.()},g=b=>{s(!0),n?.(b)};try{p.addEventListener("load",m),p.addEventListener("error",g)}catch{m()}},onError:f}):A.jsx(pj,{})}),eve=F.memo(({src:e,alt:t="Streaming image",onError:n,onLoad:r,...o})=>{const a=F.useRef(null),[s,u]=F.useState(!1),[f,p]=F.useState(!0);F.useEffect(()=>{a.current&&e&&(p(!0),u(!1),a.current.src=e)},[e]);const m=F.useCallback(b=>{u(!0),p(!1),n?.(b)},[n]),g=F.useCallback(()=>{p(!1),u(!1),r?.()},[r]);return F.useEffect(()=>{const b=a.current;if(b)return b.addEventListener("error",m),b.addEventListener("load",g),()=>{b.removeEventListener("error",m),b.removeEventListener("load",g)}},[m,g]),s?A.jsx(pj,{text:"Failed to load image"}):A.jsx("img",{ref:a,className:`streaming-image image-renderer ${o.className||""} ${f?" loading":""}`,alt:t,...o})});function VT(e){const t=e+"CollectionProvider",[n,r]=pc(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:E,children:C}=x,N=oe.useRef(null),O=oe.useRef(new Map).current;return A.jsx(o,{scope:E,itemMap:O,collectionRef:N,children:C})};s.displayName=t;const u=e+"CollectionSlot",f=H0(u),p=oe.forwardRef((x,E)=>{const{scope:C,children:N}=x,O=a(u,C),k=_r(E,O.collectionRef);return A.jsx(f,{ref:k,children:N})});p.displayName=u;const m=e+"CollectionItemSlot",g="data-radix-collection-item",b=H0(m),S=oe.forwardRef((x,E)=>{const{scope:C,children:N,...O}=x,k=oe.useRef(null),M=_r(E,k),D=a(m,C);return oe.useEffect(()=>(D.itemMap.set(k,{ref:k,...O}),()=>{D.itemMap.delete(k)})),A.jsx(b,{[g]:"",ref:M,children:N})});S.displayName=m;function w(x){const E=a(e+"CollectionConsumer",x);return oe.useCallback(()=>{const N=E.collectionRef.current;if(!N)return[];const O=Array.from(N.querySelectorAll(`[${g}]`));return Array.from(E.itemMap.values()).sort((D,P)=>O.indexOf(D.ref.current)-O.indexOf(P.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:s,Slot:p,ItemSlot:S},w,r]}var tve=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nve="VisuallyHidden",hj=F.forwardRef((e,t)=>A.jsx(mn.span,{...e,ref:t,style:{...tve,...e.style}}));hj.displayName=nve;var mj="ToastProvider",[gj,rve,ove]=VT("Toast"),[GU]=pc("Toast",[ove]),[ive,UT]=GU(mj),YU=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:s}=e,[u,f]=F.useState(null),[p,m]=F.useState(0),g=F.useRef(!1),b=F.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${mj}\`. Expected non-empty \`string\`.`),A.jsx(gj.Provider,{scope:t,children:A.jsx(ive,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:a,toastCount:p,viewport:u,onViewportChange:f,onToastAdd:F.useCallback(()=>m(S=>S+1),[]),onToastRemove:F.useCallback(()=>m(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:g,isClosePausedRef:b,children:s})})};YU.displayName=mj;var qU="ToastViewport",ave=["F8"],yj="toast.viewportPause",bj="toast.viewportResume",XU=F.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=ave,label:o="Notifications ({hotkey})",...a}=e,s=UT(qU,n),u=rve(n),f=F.useRef(null),p=F.useRef(null),m=F.useRef(null),g=F.useRef(null),b=_r(t,g,s.onViewportChange),S=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=s.toastCount>0;F.useEffect(()=>{const E=C=>{r.length!==0&&r.every(O=>C[O]||C.code===O)&&g.current?.focus()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[r]),F.useEffect(()=>{const E=f.current,C=g.current;if(w&&E&&C){const N=()=>{if(!s.isClosePausedRef.current){const D=new CustomEvent(yj);C.dispatchEvent(D),s.isClosePausedRef.current=!0}},O=()=>{if(s.isClosePausedRef.current){const D=new CustomEvent(bj);C.dispatchEvent(D),s.isClosePausedRef.current=!1}},k=D=>{!E.contains(D.relatedTarget)&&O()},M=()=>{E.contains(document.activeElement)||O()};return E.addEventListener("focusin",N),E.addEventListener("focusout",k),E.addEventListener("pointermove",N),E.addEventListener("pointerleave",M),window.addEventListener("blur",N),window.addEventListener("focus",O),()=>{E.removeEventListener("focusin",N),E.removeEventListener("focusout",k),E.removeEventListener("pointermove",N),E.removeEventListener("pointerleave",M),window.removeEventListener("blur",N),window.removeEventListener("focus",O)}}},[w,s.isClosePausedRef]);const x=F.useCallback(({tabbingDirection:E})=>{const N=u().map(O=>{const k=O.ref.current,M=[k,...vve(k)];return E==="forwards"?M:M.reverse()});return(E==="forwards"?N.reverse():N).flat()},[u]);return F.useEffect(()=>{const E=g.current;if(E){const C=N=>{const O=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!O){const M=document.activeElement,D=N.shiftKey;if(N.target===E&&D){p.current?.focus();return}const V=x({tabbingDirection:D?"backwards":"forwards"}),U=V.findIndex(X=>X===M);xj(V.slice(U+1))?N.preventDefault():D?p.current?.focus():m.current?.focus()}};return E.addEventListener("keydown",C),()=>E.removeEventListener("keydown",C)}},[u,x]),A.jsxs(Mue,{ref:f,role:"region","aria-label":o.replace("{hotkey}",S),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&A.jsx(vj,{ref:p,onFocusFromOutsideViewport:()=>{const E=x({tabbingDirection:"forwards"});xj(E)}}),A.jsx(gj.Slot,{scope:n,children:A.jsx(mn.ol,{tabIndex:-1,...a,ref:b})}),w&&A.jsx(vj,{ref:m,onFocusFromOutsideViewport:()=>{const E=x({tabbingDirection:"backwards"});xj(E)}})]})});XU.displayName=qU;var WU="ToastFocusProxy",vj=F.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,a=UT(WU,n);return A.jsx(hj,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{const u=s.relatedTarget;!a.viewport?.contains(u)&&r()}})});vj.displayName=WU;var lx="Toast",sve="toast.swipeStart",lve="toast.swipeMove",uve="toast.swipeCancel",cve="toast.swipeEnd",ZU=F.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:a,...s}=e,[u,f]=Ip({prop:r,defaultProp:o??!0,onChange:a,caller:lx});return A.jsx(Kl,{present:n||u,children:A.jsx(pve,{open:u,...s,ref:t,onClose:()=>f(!1),onPause:Ia(e.onPause),onResume:Ia(e.onResume),onSwipeStart:ht(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ht(e.onSwipeMove,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${g}px`)}),onSwipeCancel:ht(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ht(e.onSwipeEnd,p=>{const{x:m,y:g}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${m}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${g}px`),f(!1)})})})});ZU.displayName=lx;var[fve,dve]=GU(lx,{onClose(){}}),pve=F.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:a,onClose:s,onEscapeKeyDown:u,onPause:f,onResume:p,onSwipeStart:m,onSwipeMove:g,onSwipeCancel:b,onSwipeEnd:S,...w}=e,x=UT(lx,n),[E,C]=F.useState(null),N=_r(t,Y=>C(Y)),O=F.useRef(null),k=F.useRef(null),M=o||x.duration,D=F.useRef(0),P=F.useRef(M),B=F.useRef(0),{onToastAdd:V,onToastRemove:U}=x,X=Ia(()=>{E?.contains(document.activeElement)&&x.viewport?.focus(),s()}),L=F.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(B.current),D.current=new Date().getTime(),B.current=window.setTimeout(X,Y))},[X]);F.useEffect(()=>{const Y=x.viewport;if(Y){const ee=()=>{L(P.current),p?.()},H=()=>{const ne=new Date().getTime()-D.current;P.current=P.current-ne,window.clearTimeout(B.current),f?.()};return Y.addEventListener(yj,H),Y.addEventListener(bj,ee),()=>{Y.removeEventListener(yj,H),Y.removeEventListener(bj,ee)}}},[x.viewport,M,f,p,L]),F.useEffect(()=>{a&&!x.isClosePausedRef.current&&L(M)},[a,M,x.isClosePausedRef,L]),F.useEffect(()=>(V(),()=>U()),[V,U]);const J=F.useMemo(()=>E?rH(E):null,[E]);return x.viewport?A.jsxs(A.Fragment,{children:[J&&A.jsx(hve,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:J}),A.jsx(fve,{scope:n,onClose:X,children:hS.createPortal(A.jsx(gj.ItemSlot,{scope:n,children:A.jsx(kue,{asChild:!0,onEscapeKeyDown:ht(u,()=>{x.isFocusedToastEscapeKeyDownRef.current||X(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:A.jsx(mn.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":x.swipeDirection,...w,ref:N,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ht(e.onKeyDown,Y=>{Y.key==="Escape"&&(u?.(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,X()))}),onPointerDown:ht(e.onPointerDown,Y=>{Y.button===0&&(O.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:ht(e.onPointerMove,Y=>{if(!O.current)return;const ee=Y.clientX-O.current.x,H=Y.clientY-O.current.y,ne=!!k.current,Q=["left","right"].includes(x.swipeDirection),ae=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,q=Q?ae(0,ee):0,W=Q?0:ae(0,H),ie=Y.pointerType==="touch"?10:2,Z={x:q,y:W},K={originalEvent:Y,delta:Z};ne?(k.current=Z,HT(lve,g,K,{discrete:!1})):oH(Z,x.swipeDirection,ie)?(k.current=Z,HT(sve,m,K,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(ee)>ie||Math.abs(H)>ie)&&(O.current=null)}),onPointerUp:ht(e.onPointerUp,Y=>{const ee=k.current,H=Y.target;if(H.hasPointerCapture(Y.pointerId)&&H.releasePointerCapture(Y.pointerId),k.current=null,O.current=null,ee){const ne=Y.currentTarget,Q={originalEvent:Y,delta:ee};oH(ee,x.swipeDirection,x.swipeThreshold)?HT(cve,S,Q,{discrete:!0}):HT(uve,b,Q,{discrete:!0}),ne.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),hve=e=>{const{__scopeToast:t,children:n,...r}=e,o=UT(lx,t),[a,s]=F.useState(!1),[u,f]=F.useState(!1);return yve(()=>s(!0)),F.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),u?null:A.jsx(U2,{asChild:!0,children:A.jsx(hj,{...r,children:a&&A.jsxs(A.Fragment,{children:[o.label," ",n]})})})},mve="ToastTitle",JU=F.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return A.jsx(mn.div,{...r,ref:t})});JU.displayName=mve;var gve="ToastDescription",KU=F.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return A.jsx(mn.div,{...r,ref:t})});KU.displayName=gve;var QU="ToastAction",eH=F.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?A.jsx(nH,{altText:n,asChild:!0,children:A.jsx(Sj,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${QU}\`. Expected non-empty \`string\`.`),null)});eH.displayName=QU;var tH="ToastClose",Sj=F.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=dve(tH,n);return A.jsx(nH,{asChild:!0,children:A.jsx(mn.button,{type:"button",...r,ref:t,onClick:ht(e.onClick,o.onClose)})})});Sj.displayName=tH;var nH=F.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return A.jsx(mn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function rH(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),bve(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!o)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...rH(r))}}),t}function HT(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?zI(o,a):o.dispatchEvent(a)}var oH=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),a=r>o;return t==="left"||t==="right"?a&&r>n:!a&&o>n};function yve(e=()=>{}){const t=Ia(e);Ff(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function bve(e){return e.nodeType===e.ELEMENT_NODE}function vve(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xj(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Sve=YU,xve=XU,wve=ZU,Eve=JU,_ve=KU,Cve=eH,Tve=Sj;const yi=[];for(let e=0;e<256;++e)yi.push((e+256).toString(16).slice(1));function Ave(e,t=0){return(yi[e[t+0]]+yi[e[t+1]]+yi[e[t+2]]+yi[e[t+3]]+"-"+yi[e[t+4]]+yi[e[t+5]]+"-"+yi[e[t+6]]+yi[e[t+7]]+"-"+yi[e[t+8]]+yi[e[t+9]]+"-"+yi[e[t+10]]+yi[e[t+11]]+yi[e[t+12]]+yi[e[t+13]]+yi[e[t+14]]+yi[e[t+15]]).toLowerCase()}let wj;const Ove=new Uint8Array(16);function Rve(){if(!wj){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");wj=crypto.getRandomValues.bind(crypto)}return wj(Ove)}const iH={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Nve(e,t,n){e=e||{};const r=e.random??e.rng?.()??Rve();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ave(r)}function Ej(e,t,n){return iH.randomUUID&&!e?iH.randomUUID():Nve(e)}const aH=F.createContext(void 0),sH=F.createContext(void 0),kve=350,Mve=({children:e,fixedHeight:t,duration:n=5e3,maxVisible:r=3,...o})=>{const[a,s]=F.useState(new Map),u=F.useRef(new Map),f=F.useRef(null),p=F.useRef(!0),m=F.useCallback(()=>{const C=Array.from(u.current).reverse();if(t){const N=t;C.forEach(([,O],k)=>{if(!O)return;O.setAttribute("data-front",String(k===0)),O.setAttribute("data-hidden",String(k>=r)),O.style.setProperty("--index",String(k)),O.style.setProperty("--height",`${t}px`),O.style.setProperty("--front-height",`${N}px`);const M=t*k;O.style.setProperty("--hover-offset-y",`-${M}px`)})}else{const N=C.map(([,k])=>{if(!k)return 0;const M=k.querySelector(".ToastInner");if(!M)return k.clientHeight;const D=M.style.height;M.style.height="auto";const P=k.clientHeight;return M.style.height=D,P}),O=N[0]||0;C.forEach(([,k],M)=>{if(!k)return;const D=N[M];k.setAttribute("data-front",String(M===0)),k.setAttribute("data-hidden",String(M>=r)),k.style.setProperty("--index",String(M)),k.style.setProperty("--height",`${D}px`),k.style.setProperty("--front-height",`${O}px`);const P=N.slice(0,M).reduce((B,V)=>B+V,0);k.style.setProperty("--hover-offset-y",`-${P}px`)})}},[t,r]),g=F.useCallback(C=>{s(N=>{const O=new Map(N);return O.set(Ej(),{...C,duration:C.duration||n,open:!0}),O})},[n]),b=F.useCallback(C=>{p.current&&s(N=>{const O=new Map(N);return O.delete(C),O})},[]),S=F.useCallback(C=>g({...C,status:C.status||"default"}),[g]),w=F.useCallback(C=>g({...C,status:"success"}),[g]),x=F.useCallback(C=>g({...C,status:"error"}),[g]);F.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]),F.useEffect(()=>{const C=f.current;if(C){const N=()=>{u.current.forEach(M=>{M.setAttribute("data-hovering","true")})},O=M=>{(!C.contains(M.target)||C===M.target)&&u.current.forEach(D=>{D.setAttribute("data-hovering","false")})},k=()=>{u.current.forEach(M=>{M.setAttribute("data-hovering","false")})};return C.addEventListener("pointermove",N),C.addEventListener("pointerleave",k),C.addEventListener("focusin",N),C.addEventListener("focusout",O),()=>{C.removeEventListener("pointermove",N),C.removeEventListener("pointerleave",k),C.removeEventListener("focusin",N),C.removeEventListener("focusout",O)}}},[]);const E=F.useMemo(()=>Object.assign(S,{success:w,error:x}),[S,w,x]);return A.jsx(aH.Provider,{value:E,children:A.jsx(sH.Provider,{value:F.useMemo(()=>({toastElementsMapRef:u,sortToasts:m}),[m]),children:A.jsxs(Sve,{...o,children:[e,Array.from(a).map(([C,N])=>A.jsx(jve,{id:C,toast:N,onOpenChange:O=>{O||(u.current.delete(C),m(),s(k=>{const M=new Map(k),D=M.get(C);return D&&M.set(C,{...D,open:!1}),M}),setTimeout(()=>{b(C)},kve))}},C)),A.jsx(xve,{ref:f,className:"ToastViewport",style:t?{"--fixed-toast-height":`${t}px`}:void 0})]})})})},Ive=()=>{const e=F.useContext(aH);if(e)return e;throw new Error("useToast must be used within Toasts")},Dve=()=>{const e=F.useContext(sH);if(e)return e;throw new Error("useToastContext must be used within Toasts")},jve=({onOpenChange:e,toast:t,id:n,...r})=>{const o=F.useRef(null),a=Dve(),{sortToasts:s,toastElementsMapRef:u}=a,f=u.current;return F.useLayoutEffect(()=>(o.current&&(f.set(n,o.current),s()),()=>{f.delete(n),s()}),[n,s,f]),A.jsx(wve,{...r,ref:o,type:t.type,duration:t.duration,className:"ToastRoot",onOpenChange:e,open:t.open,children:A.jsxs("div",{className:"ToastInner","data-status":t.status,children:[A.jsx(Pve,{status:t.status}),t.title&&A.jsx(Eve,{className:"ToastTitle",children:t.title}),A.jsx(_ve,{className:"ToastDescription",children:t.description}),t.action&&A.jsx(Cve,{className:"ToastAction Button small green",altText:t.action.altText,onClick:t.action.onClick,asChild:!0,children:A.jsx("button",{children:t.action.label})}),A.jsx(Tve,{"aria-label":"Close",className:"ToastClose",children:A.jsx(yT,{style:{fontSize:"12px"}})})]})})},Pve=({status:e})=>e!=="default"&&e?A.jsxs("div",{style:{gridArea:"icon",alignSelf:"start"},children:[e==="success"&&A.jsx(Xhe,{style:{color:"#61d345",fontSize:"20px"}}),e==="error"&&A.jsx(Whe,{style:{color:"#ff4b4b",fontSize:"20px"}})]}):null,zve={},lH=e=>{let t;const n=new Set,r=(m,g)=>{const b=typeof m=="function"?m(t):m;if(!Object.is(b,t)){const S=t;t=g??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(w=>w(t,S))}},o=()=>t,f={setState:r,getState:o,getInitialState:()=>p,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(zve?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},p=t=e(r,o,f);return f},uH=e=>e?lH(e):lH;var GT={exports:{}},_j={},YT={exports:{}},Cj={};var cH;function $ve(){if(cH)return Cj;cH=1;var e=oe;function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(g,b){var S=b(),w=r({inst:{value:S,getSnapshot:b}}),x=w[0].inst,E=w[1];return a(function(){x.value=S,x.getSnapshot=b,f(x)&&E({inst:x})},[g,S,b]),o(function(){return f(x)&&E({inst:x}),g(function(){f(x)&&E({inst:x})})},[g]),s(S),S}function f(g){var b=g.getSnapshot;g=g.value;try{var S=b();return!n(g,S)}catch{return!0}}function p(g,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:u;return Cj.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Cj}var Tj={};var fH;function Fve(){return fH||(fH=1,process.env.NODE_ENV!=="production"&&(function(){function e(S,w){return S===w&&(S!==0||1/S===1/w)||S!==S&&w!==w}function t(S,w){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=w();if(!g){var E=w();a(x,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!0)}E=s({inst:{value:x,getSnapshot:w}});var C=E[0].inst,N=E[1];return f(function(){C.value=x,C.getSnapshot=w,n(C)&&N({inst:C})},[S,x,w]),u(function(){return n(C)&&N({inst:C}),S(function(){n(C)&&N({inst:C})})},[S]),p(x),x}function n(S){var w=S.getSnapshot;S=S.value;try{var x=w();return!a(S,x)}catch{return!0}}function r(S,w){return w()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=oe,a=typeof Object.is=="function"?Object.is:e,s=o.useState,u=o.useEffect,f=o.useLayoutEffect,p=o.useDebugValue,m=!1,g=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Tj.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Tj}var dH;function pH(){return dH||(dH=1,process.env.NODE_ENV==="production"?YT.exports=$ve():YT.exports=Fve()),YT.exports}var hH;function Lve(){if(hH)return _j;hH=1;var e=oe,t=pH();function n(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,s=e.useEffect,u=e.useMemo,f=e.useDebugValue;return _j.useSyncExternalStoreWithSelector=function(p,m,g,b,S){var w=a(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=u(function(){function C(D){if(!N){if(N=!0,O=D,D=b(D),S!==void 0&&x.hasValue){var P=x.value;if(S(P,D))return k=P}return k=D}if(P=k,r(O,D))return P;var B=b(D);return S!==void 0&&S(P,B)?(O=D,P):(O=D,k=B)}var N=!1,O,k,M=g===void 0?null:g;return[function(){return C(m())},M===null?void 0:function(){return C(M())}]},[m,g,b,S]);var E=o(p,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=E},[E]),f(E),E},_j}var Aj={};var mH;function Bve(){return mH||(mH=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=oe,n=pH(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,a=t.useRef,s=t.useEffect,u=t.useMemo,f=t.useDebugValue;Aj.useSyncExternalStoreWithSelector=function(p,m,g,b,S){var w=a(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=u(function(){function C(D){if(!N){if(N=!0,O=D,D=b(D),S!==void 0&&x.hasValue){var P=x.value;if(S(P,D))return k=P}return k=D}if(P=k,r(O,D))return P;var B=b(D);return S!==void 0&&S(P,B)?(O=D,P):(O=D,k=B)}var N=!1,O,k,M=g===void 0?null:g;return[function(){return C(m())},M===null?void 0:function(){return C(M())}]},[m,g,b,S]);var E=o(p,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=E},[E]),f(E),E},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Aj}var gH;function Vve(){return gH||(gH=1,process.env.NODE_ENV==="production"?GT.exports=Lve():GT.exports=Bve()),GT.exports}var Uve=Vve();const yH=Df(Uve),bH={},{useDebugValue:Hve}=oe,{useSyncExternalStoreWithSelector:Gve}=yH;let vH=!1;const Yve=e=>e;function qve(e,t=Yve,n){(bH?"production":void 0)!=="production"&&n&&!vH&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),vH=!0);const r=Gve(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Hve(r),r}const SH=e=>{(bH?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?uH(e):e,n=(r,o)=>qve(t,r,o);return Object.assign(n,t),n},Qs=e=>e?SH(e):SH;class Zf{constructor(t){this.context=t}get communicationManager(){return this.context.worker.getCommunicationManager()}get eventManager(){return this.context.worker.getEventManager()}get hookManager(){return this.context.worker.getHookManager()}get nodeManager(){return this.context.worker.getNodeManager()}get syncManager(){return this.context.worker.getSyncManager()}get connectionHealthManager(){return this.context.worker.getConnectionHealthManager()}get edgeManager(){return this.context.worker.getEdgeManager()}get groupManager(){return this.context.worker.getGroupManager()}get libraryManager(){return this.context.worker.getLibraryManager()}}const qT=2e3;class Xve extends Zf{constructor(t){super(t),this._responsive=!1,this._last_pong=0,this._last_pong=Date.now()-qT*100}start(){this.stop(),this.pingInterval=setInterval(()=>{this.context.worker.is_open&&this.context.worker.send({type:"ping"})},qT),this.responsivenessCheckInterval=setInterval(()=>{this._responsive=Date.now()-this._last_pong<=qT*3},qT*2)}stop(){this.pingInterval&&clearInterval(this.pingInterval),this.responsivenessCheckInterval&&clearInterval(this.responsivenessCheckInterval)}receivePong(){this._last_pong=Date.now(),this._responsive=!0}isResponsive(){return this._responsive}}const xH=(e,t)=>{e.properties=e.properties||{},t.pos&&(e.properties["frontend:pos"]=t.pos),t.size&&(e.properties["frontend:size"]=t.size),t.collapsed!==void 0&&(e.properties["frontend:collapsed"]=!!t.collapsed)},wH=2e3,EH=2e3;class Wve extends Zf{constructor(t){super(t),this._local_nodeupdates=new Map,this._local_groupupdates=new Map,this.on_sync_complete=t.on_sync_complete||(async()=>{})}start(){this._nodeupdatetimer=setTimeout(()=>{this.sync_local_node_updates()},wH),this._groupupdatetimer=setTimeout(()=>{this.sync_local_group_updates()},EH)}stop(){this._nodeupdatetimer&&clearTimeout(this._nodeupdatetimer),this._groupupdatetimer&&clearTimeout(this._groupupdatetimer)}async stepwise_fullsync(){this.context.worker._zustand&&this.context.worker.is_open&&(await this.sync_lib(),await this.sync_external_worker(),await this.sync_funcnodes_plugins(),await this.sync_nodespace(),await this.sync_view_state(),await this.on_sync_complete(this.context.worker))}async sync_lib(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.communicationManager._send_cmd({cmd:"get_library",wait_for_response:!0,retries:2,unique:!0});this.context.worker._zustand.lib.libstate.getState().set({lib:t})}async sync_external_worker(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.communicationManager._send_cmd({cmd:"get_worker_dependencies",wait_for_response:!0,unique:!0});this.context.worker._zustand.lib.libstate.getState().set({external_worker:t})}async sync_funcnodes_plugins(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_plugin_keys",wait_for_response:!0,unique:!0,kwargs:{type:"react"}});for(const n of t){const r=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_plugin",wait_for_response:!0,kwargs:{key:n,type:"react"},unique:!0});this.context.worker._zustand.add_packed_plugin(n,r)}}async sync_view_state(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"view_state",wait_for_response:!0,unique:!0});t.renderoptions&&this.context.worker._zustand.update_render_options(t.renderoptions);const n=t.nodes;if(n)for(const r in n){const o={};xH(o,n[r]),this.context.worker._zustand.on_node_action({type:"update",node:o,id:r,from_remote:!0})}}async sync_nodespace(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;const t=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_nodes",kwargs:{with_frontend:!0},wait_for_response:!0,unique:!0});for(const o of t)this.eventManager._receive_node_added(o);const n=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_edges",wait_for_response:!0,unique:!0});for(const o of n)this.eventManager._receive_edge_added(...o);const r=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"get_groups",kwargs:{},wait_for_response:!0,unique:!0});this.eventManager._receive_groups(r)}async fullsync(){if(!this.context.worker._zustand||!this.context.worker.is_open)return;let t;for(;;)try{t=await this.communicationManager._send_cmd({cmd:"full_state",unique:!0});break}catch(o){o instanceof Error?this.context.worker._zustand.logger.error("Error in fullsync",o):this.context.worker._zustand.logger.error("Error in fullsync",new Error(JSON.stringify(o)))}this.context.worker._zustand.logger.debug("Full state",t),this.context.worker._zustand.lib.libstate.getState().set({lib:t.backend.lib,external_worker:t.worker_dependencies}),t.view.renderoptions&&this.context.worker._zustand.update_render_options(t.view.renderoptions);const n=t.view.nodes;for(const o of t.backend.nodes){const a=n[o.id];a!==void 0&&xH(o,a),this.eventManager._receive_node_added(o)}for(const o of t.backend.edges)this.eventManager._receive_edge_added(...o);const r=t.backend.groups;r&&this.eventManager._receive_groups(r)}sync_local_node_updates(){clearTimeout(this._nodeupdatetimer),this._local_nodeupdates.forEach(async(t,n)=>{const r=await this.context.worker.getCommunicationManager()._send_cmd({cmd:"update_node",kwargs:{nid:n,data:t},wait_for_response:!0});this.context.worker._zustand&&Object.keys(r).length>0&&this.context.worker._zustand.on_node_action({type:"update",node:r,id:n,from_remote:!0})}),this._local_nodeupdates.clear(),this._nodeupdatetimer=setTimeout(()=>{this.sync_local_node_updates()},wH)}sync_local_group_updates(){clearTimeout(this._groupupdatetimer),this._local_groupupdates.forEach(async(t,n)=>{const r=await this.communicationManager._send_cmd({cmd:"update_group",kwargs:{gid:n,data:t},wait_for_response:!0});this.context.worker._zustand&&this.context.worker._zustand.on_group_action({type:"update",group:r,id:n,from_remote:!0})}),this._local_groupupdates.clear(),this._groupupdatetimer=setTimeout(()=>{this.sync_local_group_updates()},EH)}locally_update_node(t){const n=this._local_nodeupdates.get(t.id);if(n){const{new_obj:r,change:o}=Vm(n,t.node);o&&this._local_nodeupdates.set(t.id,r)}else this._local_nodeupdates.set(t.id,t.node);t.immediate&&this.sync_local_node_updates()}locally_update_group(t){const n=this._local_groupupdates.get(t.id);if(n){const{new_obj:r,change:o}=Vm(n,t.group);o&&this._local_groupupdates.set(t.id,r)}else this._local_groupupdates.set(t.id,t.group);t.immediate&&this.sync_local_group_updates()}}class ou{constructor({data:t,mime:n}){this._data=t,this._mime=n}get data(){return this._data}get value(){return this._data}get mime(){return this._mime}toString(){return this._data instanceof ArrayBuffer?`DataStructure(${this._data.byteLength},${this._mime})`:this._data instanceof Blob?`DataStructure(${this._data.size},${this._mime})`:this._data instanceof String?`DataStructure(${this._data.length},${this._mime})`:this._data instanceof Array?`DataStructure(${this._data.length},${this._mime})`:this._data instanceof Object?`DataStructure(${Object.keys(this._data).length},${this._mime})`:`DataStructure(${this._mime})`}toJSON(){return this.toString()}dispose(){}}class Oj extends ou{constructor({data:t,mime:n}){super({data:XT(t),mime:n})}get objectUrl(){if(this._objectUrl)return this._objectUrl;const t=this.data instanceof Blob?this.data:new Blob([this.data],{type:this.mime});return this._objectUrl=URL.createObjectURL(t),this._objectUrl}dispose(){this._objectUrl&&URL.revokeObjectURL(this._objectUrl),super.dispose()}get value(){return this.objectUrl}}const XT=e=>{if(e instanceof ArrayBuffer)return e;const t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e),n=new ArrayBuffer(t.byteLength);return new Uint8Array(n).set(t),n},Zve={x:(e,t)=>null,c:(e,t)=>new DataView(e).getInt8(0),B:(e,t)=>new DataView(e).getUint8(0),"?":(e,t)=>new DataView(e).getInt8(0)===1,h:(e,t)=>new DataView(e).getInt16(0,t),H:(e,t)=>new DataView(e).getUint16(0,t),i:(e,t)=>new DataView(e).getInt32(0,t),I:(e,t)=>new DataView(e).getUint32(0,t),l:(e,t)=>new DataView(e).getInt32(0,t),L:(e,t)=>new DataView(e).getUint32(0,t),q:(e,t)=>Number(new DataView(e).getBigInt64(0,t)),Q:(e,t)=>Number(new DataView(e).getBigUint64(0,t)),n:(e,t)=>Number(new DataView(e).getBigInt64(0,t)),N:(e,t)=>Number(new DataView(e).getBigUint64(0,t)),f:(e,t)=>new DataView(e).getFloat32(0,t),d:(e,t)=>new DataView(e).getFloat64(0,t),s:(e,t)=>new TextDecoder().decode(e),p:(e,t)=>new TextDecoder().decode(e),P:(e,t)=>Number(new DataView(e).getBigUint64(0,t))};class Rj extends ou{constructor({data:t,mime:n}){super({data:XT(t),mime:n}),this._cType=n.split("application/fn.struct.")[1],this._value=null,this.parse_value()}parse_value(){let t=!0,n=this._cType;return n.startsWith("<")&&(t=!0,n=n.slice(1)),n.startsWith(">")&&(t=!1,n=n.slice(1)),n.startsWith("!")&&(t=!1,n=n.slice(1)),n.startsWith("@")&&(t=!1,n=n.slice(1)),n.startsWith("=")&&(t=!1,n=n.slice(1)),this._value=Zve[n](this.data,t),this._value}get value(){return this._value}toString(){return this._value===null?"null":this._value.toString()}}class Jf extends ou{constructor({data:t,mime:n}){const r=XT(t);super({data:r,mime:n}),r.byteLength===0?this._json=void 0:(this._json=JSON.parse(new TextDecoder().decode(r)),this._json==="<NoValue>"&&(this._json=void 0))}get value(){return this._json}static fromObject(t){const n=t==="<NoValue>"?new Uint8Array(0):new TextEncoder().encode(JSON.stringify(t));return new Jf({data:n,mime:"application/json"})}toString(){return typeof this._json=="string"?this._json:JSON.stringify(this._json)}}class Nj extends ou{constructor({data:t,mime:n}){const r=XT(t);super({data:r,mime:n}),this._value=new TextDecoder().decode(r)}get value(){return this._value}toString(){return this._value}}const _H=({data:e,mime:t})=>{const n=typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)||n?t.startsWith("application/fn.struct.")?new Rj({data:e,mime:t}):t.startsWith("application/json")?new Jf({data:e,mime:t}):t==="text"||t.startsWith("text/")?new Nj({data:e,mime:t}):new Oj({data:e,mime:t}):new ou({data:e,mime:t})};class Jve extends Zf{constructor(t){super(t),this.CHUNK_TIMEOUT=1e4,this._unique_cmd_outs={},this.blobChunks={},this.cleanupChunks=()=>{const n=Date.now();for(const r in this.blobChunks)n-this.blobChunks[r].timestamp>this.CHUNK_TIMEOUT&&delete this.blobChunks[r]},this.messagePromises=new Map}start(){this._chunk_cleanup_timer=setInterval(this.cleanupChunks.bind(this),this.CHUNK_TIMEOUT/2)}stop(){this._chunk_cleanup_timer&&clearInterval(this._chunk_cleanup_timer)}send(t){this.context.worker.send(t)}async _send_cmd({cmd:t,kwargs:n,as_bytes:r=!1,wait_for_response:o=!0,response_timeout:a=5e3,retries:s=2,unique:u=!1}){const f={type:"cmd",as_bytes:r,cmd:t,kwargs:n||{}};if(await new Promise(async p=>{if(this.context.worker.is_responsive)return p();const m=setInterval(()=>{this.context.worker.is_responsive&&(clearInterval(m),p())},100)}),o){if(u&&this._unique_cmd_outs[f.cmd]!==void 0)return this._unique_cmd_outs[f.cmd];s<0&&(s=0);const m=(async()=>{let g;for(;s>=0;){const b=f.id||Ej();f.id=b;const S=new Promise((w,x)=>{const E=setTimeout(()=>{x("Timeout@wait_for_response for "+t)},a);this.messagePromises.set(b,{resolve:C=>{clearTimeout(E),w(C),this.messagePromises.delete(b)},reject:C=>{clearTimeout(E),x(C),this.messagePromises.delete(b)}})});await this.send(f);try{g=await S;break}catch(w){if(s===0)throw delete this._unique_cmd_outs[f.cmd],w;s-=1;continue}}return delete this._unique_cmd_outs[f.cmd],g})();return u&&(this._unique_cmd_outs[f.cmd]=m),m}return this.send(f)}async receive(t){let n;switch(this.connectionHealthManager.receivePong(),t.type){case"pong":return this.connectionHealthManager.receivePong();case"nsevent":return await this.context.worker.getEventManager().receive_nodespace_event(t);case"result":if(n=t.id&&this.messagePromises.get(t.id),n)return n.resolve(t.result);break;case"error":if(this.context.worker.on_error(t.tb+`
|
|
974
|
-
`+t.error),n=t.id&&this.messagePromises.get(t.id),n)return n.reject(t.error);break;case"progress":if(!this.context.worker._zustand)return;this.context.worker._zustand.set_progress(t);break;case"workerevent":return await this.context.worker.getEventManager().receive_workerevent(t);case"large_message":return await this.context.worker.handle_large_message_hint(t);default:console.warn("Unhandled message",t);break}}async
|
|
974
|
+
`+t.error),n=t.id&&this.messagePromises.get(t.id),n)return n.reject(t.error);break;case"progress":if(!this.context.worker._zustand)return;this.context.worker._zustand.set_progress(t);break;case"workerevent":return await this.context.worker.getEventManager().receive_workerevent(t);case"large_message":return await this.context.worker.handle_large_message_hint(t);default:console.warn("Unhandled message",t);break}}async receive_bytes(t,n){const{type:r}=t;if(r==="io_value"){if(!this.context.worker._zustand)return;const{node:o,io:a,preview:s,mime:u}=t,f=s?"value":"fullvalue";(!o||!a)&&console.error("Invalid io_value message",t);const p=_H({data:n,mime:u||"application/octet-stream"});this.context.worker._zustand.on_node_action({type:"update",node:{id:o,io:{[a]:{[f]:p}}},id:o,from_remote:!0})}else if(r=="result"){const o=t.id&&this.messagePromises.get(t.id);o&&o.resolve({bytes:n,header:t})}else console.warn("Unhandled bytes message",t)}async onbytes(t){try{const n=new TextDecoder("utf-8").decode(t),r=n.indexOf(`\r
|
|
975
975
|
\r
|
|
976
976
|
`);if(r===-1){console.error(`Header terminator not found for:
|
|
977
|
-
`,n);return}const o=n.substring(0,r+4),a=t.slice(r+4),s=o.split(";"),u={};if(s.forEach(g=>{const[b,S]=g.split("=");u[b.trim()]=S.trim()}),!u.chunk||!u.msgid){console.error("Header missing required fields chunk or msgid",u);return}const[f,p]=u.chunk.split("/"),m=u.msgid;if(f==="1"&&p==="1")return this.recieve_bytes(u,a);if(this.blobChunks[m]||(this.blobChunks[m]={chunks:Array.from({length:parseInt(p)},()=>null),timestamp:Date.now()}),this.blobChunks[m].chunks.length!==parseInt(p)){console.error("Total chunks mismatch");return}if(this.blobChunks[m].chunks[parseInt(f)-1]=t,this.blobChunks[m].chunks.every(g=>g!==null)){const g=new Uint8Array(this.blobChunks[m].chunks.reduce((b,S)=>b.concat(Array.from(S)),[]));this.recieve_bytes(u,g),delete this.blobChunks[m]}}catch(n){console.error("Websocketworker: onbytes error",n,t);return}}}class Kve extends Zf{constructor(){super(...arguments),this._ns_event_intercepts=new Map}start(){}stop(){}async _receive_edge_added(t,n,r,o){this.context.worker._zustand&&this.context.worker._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o})}async _receive_groups(t){this.context.worker._zustand&&this.context.worker._zustand.on_group_action({type:"set",groups:t})}async _receive_node_added(t){if(this.context.worker._zustand)return this.context.worker._zustand.on_node_action({type:"add",node:t,id:t.id,from_remote:!0})}async receive_workerevent({event:t,data:n}){switch(t){case"worker_error":return this.context.worker._zustand?this.context.worker._zustand.logger.error(n.error):void 0;case"update_worker_dependencies":return this.context.worker._zustand?this.context.worker._zustand.lib.libstate.getState().set({external_worker:n.worker_dependencies}):void 0;case"lib_update":await this.context.worker.getSyncManager().sync_lib();return;case"fullsync":await this.context.worker.getSyncManager().stepwise_fullsync();return;case"external_worker_update":await this.context.worker.getSyncManager().sync_lib(),await this.context.worker.getSyncManager().sync_external_worker();return;case"repos_update":await this.hookManager.call_hooks("repos_update",n.repos??n);return;case"starting":this.hookManager.call_hooks("starting");return;case"stopping":this.hookManager.call_hooks("stopping");return;default:console.warn("Unhandled worker event",t,n);break}}async intercept_ns_event(t){let n=t;for(const r of this._ns_event_intercepts.get(t.event)||[])n=await r(n);return n}async receive_nodespace_event(t){const{event:n,data:r}=await this.intercept_ns_event(t);switch(n){case"after_set_value":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value:r.result}}},id:r.node,from_remote:!0}):void 0;case"after_update_value_options":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value_options:r.result}}},id:r.node,from_remote:!0}):void 0;case"triggerstart":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}):void 0;case"triggerdone":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0}):void 0;case"triggerfast":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}),setTimeout(()=>{this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0})},50);return;case"node_trigger_error":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"error",errortype:"trigger",error:r.error,id:r.node,tb:r.tb,from_remote:!0}):void 0;case"node_removed":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"delete",id:r.node,from_remote:!0}),this.hookManager.call_hooks("node_removed",{node:r.node});return;case"node_added":this._receive_node_added(r.node);return;case"after_disconnect":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_unforward":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_connect":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_forward":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_add_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"after_remove_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"progress":if(!this.context.worker._zustand)return;if(r.node)return this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,progress:r.info},id:r.node,from_remote:!0});console.warn("Unhandled nodepsace event",n,r);break;default:if(["after_set_nodespace"].includes(n))return;console.warn("Unhandled nodepsace event",n,r);break}}add_ns_event_intercept(t,n){const r=this._ns_event_intercepts.get(t)||[];return r.push(n),this._ns_event_intercepts.set(t,r),()=>{const a=this._ns_event_intercepts.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}}class Qve extends Zf{constructor(){super(...arguments),this._hooks=new Map}start(){}stop(){}add_hook(t,n){const r=this._hooks.get(t)||[];return r.push(n),this._hooks.set(t,r),()=>{const a=this._hooks.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}async call_hooks(t,n){const r=[];for(const o of this._hooks.get(t)||[]){const a=o({worker:this.context.worker,data:n});a instanceof Promise&&r.push(a)}await Promise.all(r)}}class e1e extends Zf{start(){}stop(){}async trigger_node(t){await this.communicationManager._send_cmd({cmd:"trigger_node",kwargs:{nid:t},wait_for_response:!1})}async add_node(t){const n=await this.communicationManager._send_cmd({cmd:"add_node",kwargs:{id:t}});return this.eventManager._receive_node_added(n)}async remove_node(t){await this.communicationManager._send_cmd({cmd:"remove_node",kwargs:{id:t}})}locally_update_node(t){this.syncManager.locally_update_node(t)}set_io_value({nid:t,ioid:n,value:r,set_default:o=!1}){return this.communicationManager._send_cmd({cmd:"set_io_value",kwargs:{nid:t,ioid:n,value:r,set_default:o},wait_for_response:!0})}set_io_value_options({nid:t,ioid:n,values:r,keys:o,nullable:a}){return this.communicationManager._send_cmd({cmd:"update_io_value_options",kwargs:{nid:t,ioid:n,options:{options:{type:"enum",values:r,keys:o,nullable:a}}}})}async get_io_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_value",kwargs:{nid:t,ioid:n},wait_for_response:!0});return this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{value:r}}},id:t,from_remote:!0}),r}async get_ios_values({nid:t}){const n=await this.communicationManager._send_cmd({cmd:"get_ios_values",kwargs:{nid:t},wait_for_response:!0});if(!this.context.worker._zustand)return n;const r={};for(const o in n)r[o]={value:n[o]};return this.context.worker._zustand.on_node_action({type:"update",node:{io:r},id:t,from_remote:!0}),n}async get_io_full_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_full_value",kwargs:{nid:t,ioid:n},wait_for_response:!0,as_bytes:!0}),{header:o,bytes:a}=r,{mime:s}=o,u=_H({data:a,mime:s||"application/octet-stream"});return this.context.worker._zustand?.on_node_action?.({type:"update",node:{id:t,io:{[n]:{fullvalue:u}}},id:t,from_remote:!0}),u}async update_io_options({nid:t,ioid:n,options:r}){const o=await this.communicationManager._send_cmd({cmd:"update_io_options",kwargs:{nid:t,ioid:n,...r},wait_for_response:!0});if(!this.context.worker._zustand)return o;this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{...r}}},id:t,from_remote:!0})}async get_node_status(t){return await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0})}async get_remote_node_state(t){const n=await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0});this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:n,id:n.id,from_remote:!0})}}class t1e extends Zf{start(){}stop(){}add_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a=!1}){return this.communicationManager._send_cmd({cmd:"add_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a}})}remove_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}){return this.communicationManager._send_cmd({cmd:"remove_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}})}}class n1e extends Zf{start(){}stop(){}async group_nodes(t,n){const r=await this.communicationManager._send_cmd({cmd:"group_nodes",kwargs:{node_ids:t,group_ids:n},wait_for_response:!0});return this.eventManager._receive_groups(r),r}async remove_group(t){await this.communicationManager._send_cmd({cmd:"remove_group",kwargs:{gid:t},wait_for_response:!0}),await this.syncManager.sync_nodespace()}locally_update_group(t){this.syncManager.locally_update_group(t)}}class r1e extends Zf{constructor(){super(...arguments),this._available_modules_cache={installed:[],available:[],active:[]}}start(){}stop(){}async add_external_worker({module:t,cls_module:n,cls_name:r}){return await this.communicationManager._send_cmd({cmd:"add_external_worker",kwargs:{module:t,cls_module:n,cls_name:r}})}async add_lib(t,n){return await this.communicationManager._send_cmd({cmd:"add_package_dependency",kwargs:{name:t,version:n},wait_for_response:!1})}async remove_lib(t){return await this.communicationManager._send_cmd({cmd:"remove_package_dependency",kwargs:{name:t},wait_for_response:!1})}async get_available_modules({wait_for_response:t=!1,on_load:n}){const r=this.communicationManager._send_cmd({cmd:"get_available_modules",wait_for_response:!0,unique:!0}).then(o=>{this._available_modules_cache=o,n&&n(this._available_modules_cache)});return t&&await r,this._available_modules_cache}async remove_external_worker(t,n){return await this.communicationManager._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}async get_external_worker_config(t,n){return await this.communicationManager._send_cmd({cmd:"get_external_worker_config",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}}class kj{getEventManager(){return this._eventManager}getSyncManager(){return this._syncManager}getCommunicationManager(){return this._communicationManager}getConnectionHealthManager(){return this._connectionhealthManager}getHookManager(){return this._hookManager}getNodeManager(){return this._nodeManager}getEdgeManager(){return this._edgeManager}getGroupManager(){return this._groupManager}getLibraryManager(){return this._libraryManager}constructor(t){this.uuid=t.uuid,this.on_error=t.on_error||(r=>{this._zustand?.logger.error(r)}),this.state=Qs((r,o)=>({is_open:!1}));const n={worker:this};this._connectionhealthManager=new Xve(n),this._communicationManager=new Jve(n),this._eventManager=new Kve({...n}),this._syncManager=new Wve({...n,on_sync_complete:t.on_sync_complete}),this._hookManager=new Qve(n),this._nodeManager=new e1e(n),this._edgeManager=new t1e(n),this._groupManager=new n1e(n),this._libraryManager=new r1e(n),this._communicationManager.start(),this._connectionhealthManager.start(),this._syncManager.start(),this._eventManager.start(),this._hookManager.start(),this._nodeManager.start(),this._edgeManager.start(),this._groupManager.start(),this._libraryManager.start(),t.zustand&&this.set_zustand(t.zustand),this.api={node:this._nodeManager,group:this._groupManager,edge:this._edgeManager,hooks:this._hookManager,lib:this._libraryManager}}set_zustand(t){t!==this._zustand&&(t.logger.debug("Setting zustand for worker"),this._zustand=t,t.set_worker(this),this._zustand.auto_progress(),this._syncManager.stepwise_fullsync())}get is_open(){return this.state.getState().is_open}set is_open(t){this.state.setState({is_open:t})}get is_responsive(){return this._connectionhealthManager.isResponsive()}clear(){return this._communicationManager._send_cmd({cmd:"clear",unique:!0})}save(){return this._communicationManager._send_cmd({cmd:"save",wait_for_response:!0,unique:!0})}load(t){return this._communicationManager._send_cmd({cmd:"load_data",kwargs:{data:t},wait_for_response:!0}).then(()=>{this._syncManager.stepwise_fullsync()})}async get_runstate(){return await this._communicationManager._send_cmd({cmd:"get_runstate",wait_for_response:!0,unique:!0})}async send(t){throw new Error("async send(data: any) not implemented")}async upload_file(t){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){window.localStorage.getItem("funcnodes__active_worker")==this.uuid&&window.localStorage.removeItem("funcnodes__active_worker"),await this._communicationManager._send_cmd({cmd:"stop_worker",wait_for_response:!1});const n=this.onclose.bind(this);this.onclose=()=>{n(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=n)}}async update_external_worker(t,n,r){return await this._communicationManager._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:t,class_id:n,...r},wait_for_response:!0})}async export({withFiles:t=!1}){return await this._communicationManager._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:t}})}async update_from_export(t){const n=this._hookManager.add_hook("node_added",async({})=>{this._zustand?.center_all()});try{const r=await this._communicationManager._send_cmd({cmd:"update_from_export",kwargs:{data:t},wait_for_response:!0,response_timeout:6e5,unique:!0});return await new Promise(o=>{setTimeout(()=>{o()},1e3)}),await this._syncManager.stepwise_fullsync(),r}finally{n()}}_send_cmd(t){return this._communicationManager._send_cmd(t)}set_io_value(t){return this._nodeManager.set_io_value(t)}get_io_value(t){return this._nodeManager.get_io_value(t)}}function CH(e,t){return function(){return e.apply(t,arguments)}}const{toString:o1e}=Object.prototype,{getPrototypeOf:Mj}=Object,{iterator:WT,toStringTag:TH}=Symbol,ZT=(e=>t=>{const n=o1e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),iu=e=>(e=e.toLowerCase(),t=>ZT(t)===e),JT=e=>t=>typeof t===e,{isArray:fb}=Array,db=JT("undefined");function ux(e){return e!==null&&!db(e)&&e.constructor!==null&&!db(e.constructor)&&Da(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const AH=iu("ArrayBuffer");function i1e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&AH(e.buffer),t}const a1e=JT("string"),Da=JT("function"),OH=JT("number"),cx=e=>e!==null&&typeof e=="object",s1e=e=>e===!0||e===!1,KT=e=>{if(ZT(e)!=="object")return!1;const t=Mj(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(TH in e)&&!(WT in e)},l1e=e=>{if(!cx(e)||ux(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},u1e=iu("Date"),c1e=iu("File"),f1e=iu("Blob"),d1e=iu("FileList"),p1e=e=>cx(e)&&Da(e.pipe),h1e=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Da(e.append)&&((t=ZT(e))==="formdata"||t==="object"&&Da(e.toString)&&e.toString()==="[object FormData]"))},m1e=iu("URLSearchParams"),[g1e,y1e,b1e,v1e]=["ReadableStream","Request","Response","Headers"].map(iu),S1e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fx(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),fb(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ux(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function RH(e,t){if(ux(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const tg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,NH=e=>!db(e)&&e!==tg;function Ij(){const{caseless:e,skipUndefined:t}=NH(this)&&this||{},n={},r=(o,a)=>{const s=e&&RH(n,a)||a;KT(n[s])&&KT(o)?n[s]=Ij(n[s],o):KT(o)?n[s]=Ij({},o):fb(o)?n[s]=o.slice():(!t||!db(o))&&(n[s]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&fx(arguments[o],r);return n}const x1e=(e,t,n,{allOwnKeys:r}={})=>(fx(t,(o,a)=>{n&&Da(o)?e[a]=CH(o,n):e[a]=o},{allOwnKeys:r}),e),w1e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),E1e=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},_1e=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&Mj(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},C1e=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},T1e=e=>{if(!e)return null;if(fb(e))return e;let t=e.length;if(!OH(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},A1e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Mj(Uint8Array)),O1e=(e,t)=>{const r=(e&&e[WT]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},R1e=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},N1e=iu("HTMLFormElement"),k1e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),kH=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M1e=iu("RegExp"),MH=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fx(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},I1e=e=>{MH(e,(t,n)=>{if(Da(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Da(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},D1e=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return fb(e)?r(e):r(String(e).split(t)),n},j1e=()=>{},P1e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function z1e(e){return!!(e&&Da(e.append)&&e[TH]==="FormData"&&e[WT])}const $1e=e=>{const t=new Array(10),n=(r,o)=>{if(cx(r)){if(t.indexOf(r)>=0)return;if(ux(r))return r;if(!("toJSON"in r)){t[o]=r;const a=fb(r)?[]:{};return fx(r,(s,u)=>{const f=n(s,o+1);!db(f)&&(a[u]=f)}),t[o]=void 0,a}}return r};return n(e,0)},F1e=iu("AsyncFunction"),L1e=e=>e&&(cx(e)||Da(e))&&Da(e.then)&&Da(e.catch),IH=((e,t)=>e?setImmediate:t?((n,r)=>(tg.addEventListener("message",({source:o,data:a})=>{o===tg&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),tg.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Da(tg.postMessage)),B1e=typeof queueMicrotask<"u"?queueMicrotask.bind(tg):typeof process<"u"&&process.nextTick||IH,Pe={isArray:fb,isArrayBuffer:AH,isBuffer:ux,isFormData:h1e,isArrayBufferView:i1e,isString:a1e,isNumber:OH,isBoolean:s1e,isObject:cx,isPlainObject:KT,isEmptyObject:l1e,isReadableStream:g1e,isRequest:y1e,isResponse:b1e,isHeaders:v1e,isUndefined:db,isDate:u1e,isFile:c1e,isBlob:f1e,isRegExp:M1e,isFunction:Da,isStream:p1e,isURLSearchParams:m1e,isTypedArray:A1e,isFileList:d1e,forEach:fx,merge:Ij,extend:x1e,trim:S1e,stripBOM:w1e,inherits:E1e,toFlatObject:_1e,kindOf:ZT,kindOfTest:iu,endsWith:C1e,toArray:T1e,forEachEntry:O1e,matchAll:R1e,isHTMLForm:N1e,hasOwnProperty:kH,hasOwnProp:kH,reduceDescriptors:MH,freezeMethods:I1e,toObjectSet:D1e,toCamelCase:k1e,noop:j1e,toFiniteNumber:P1e,findKey:RH,global:tg,isContextDefined:NH,isSpecCompliantForm:z1e,toJSONObject:$1e,isAsyncFn:F1e,isThenable:L1e,setImmediate:IH,asap:B1e,isIterable:e=>e!=null&&Da(e[WT])};function Jt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Pe.inherits(Jt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Pe.toJSONObject(this.config),code:this.code,status:this.status}}});const DH=Jt.prototype,jH={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jH[e]={value:e}}),Object.defineProperties(Jt,jH),Object.defineProperty(DH,"isAxiosError",{value:!0}),Jt.from=(e,t,n,r,o,a)=>{const s=Object.create(DH);Pe.toFlatObject(e,s,function(m){return m!==Error.prototype},p=>p!=="isAxiosError");const u=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return Jt.call(s,u,f,n,r,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};const V1e=null;function Dj(e){return Pe.isPlainObject(e)||Pe.isArray(e)}function PH(e){return Pe.endsWith(e,"[]")?e.slice(0,-2):e}function zH(e,t,n){return e?e.concat(t).map(function(o,a){return o=PH(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function U1e(e){return Pe.isArray(e)&&!e.some(Dj)}const H1e=Pe.toFlatObject(Pe,{},null,function(t){return/^is[A-Z]/.test(t)});function QT(e,t,n){if(!Pe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Pe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!Pe.isUndefined(E[x])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,s=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&Pe.isSpecCompliantForm(t);if(!Pe.isFunction(o))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if(Pe.isDate(w))return w.toISOString();if(Pe.isBoolean(w))return w.toString();if(!f&&Pe.isBlob(w))throw new Jt("Blob is not supported. Use a Buffer instead.");return Pe.isArrayBuffer(w)||Pe.isTypedArray(w)?f&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,x,E){let C=w;if(w&&!E&&typeof w=="object"){if(Pe.endsWith(x,"{}"))x=r?x:x.slice(0,-2),w=JSON.stringify(w);else if(Pe.isArray(w)&&U1e(w)||(Pe.isFileList(w)||Pe.endsWith(x,"[]"))&&(C=Pe.toArray(w)))return x=PH(x),C.forEach(function(O,k){!(Pe.isUndefined(O)||O===null)&&t.append(s===!0?zH([x],k,a):s===null?x:x+"[]",p(O))}),!1}return Dj(w)?!0:(t.append(zH(E,x,a),p(w)),!1)}const g=[],b=Object.assign(H1e,{defaultVisitor:m,convertValue:p,isVisitable:Dj});function S(w,x){if(!Pe.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));g.push(w),Pe.forEach(w,function(C,N){(!(Pe.isUndefined(C)||C===null)&&o.call(t,C,Pe.isString(N)?N.trim():N,x,b))===!0&&S(C,x?x.concat(N):[N])}),g.pop()}}if(!Pe.isObject(e))throw new TypeError("data must be an object");return S(e),t}function $H(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function jj(e,t){this._pairs=[],e&&QT(e,this,t)}const FH=jj.prototype;FH.append=function(t,n){this._pairs.push([t,n])},FH.toString=function(t){const n=t?function(r){return t.call(this,r,$H)}:$H;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function G1e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function LH(e,t,n){if(!t)return e;const r=n&&n.encode||G1e;Pe.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=Pe.isURLSearchParams(t)?t.toString():new jj(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class BH{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Pe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const VH={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y1e={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:jj,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pj=typeof window<"u"&&typeof document<"u",zj=typeof navigator=="object"&&navigator||void 0,q1e=Pj&&(!zj||["ReactNative","NativeScript","NS"].indexOf(zj.product)<0),X1e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W1e=Pj&&window.location.href||"http://localhost",Ui={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pj,hasStandardBrowserEnv:q1e,hasStandardBrowserWebWorkerEnv:X1e,navigator:zj,origin:W1e},Symbol.toStringTag,{value:"Module"})),...Y1e};function Z1e(e,t){return QT(e,new Ui.classes.URLSearchParams,{visitor:function(n,r,o,a){return Ui.isNode&&Pe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function J1e(e){return Pe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function K1e(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function UH(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),f=a>=n.length;return s=!s&&Pe.isArray(o)?o.length:s,f?(Pe.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!Pe.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&Pe.isArray(o[s])&&(o[s]=K1e(o[s])),!u)}if(Pe.isFormData(e)&&Pe.isFunction(e.entries)){const n={};return Pe.forEachEntry(e,(r,o)=>{t(J1e(r),o,n,0)}),n}return null}function Q1e(e,t,n){if(Pe.isString(e))try{return(t||JSON.parse)(e),Pe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const dx={transitional:VH,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Pe.isObject(t);if(a&&Pe.isHTMLForm(t)&&(t=new FormData(t)),Pe.isFormData(t))return o?JSON.stringify(UH(t)):t;if(Pe.isArrayBuffer(t)||Pe.isBuffer(t)||Pe.isStream(t)||Pe.isFile(t)||Pe.isBlob(t)||Pe.isReadableStream(t))return t;if(Pe.isArrayBufferView(t))return t.buffer;if(Pe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Z1e(t,this.formSerializer).toString();if((u=Pe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return QT(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Q1e(t)):t}],transformResponse:[function(t){const n=this.transitional||dx.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Pe.isResponse(t)||Pe.isReadableStream(t))return t;if(t&&Pe.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(u){if(s)throw u.name==="SyntaxError"?Jt.from(u,Jt.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ui.classes.FormData,Blob:Ui.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Pe.forEach(["delete","get","head","post","put","patch"],e=>{dx.headers[e]={}});const eSe=Pe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tSe=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
977
|
+
`,n);return}const o=n.substring(0,r+4),a=t.slice(r+4),s=o.split(";"),u={};if(s.forEach(g=>{const[b,S]=g.split("=");u[b.trim()]=S.trim()}),!u.chunk||!u.msgid){console.error("Header missing required fields chunk or msgid",u);return}const[f,p]=u.chunk.split("/"),m=u.msgid;if(f==="1"&&p==="1")return this.receive_bytes(u,a);if(this.blobChunks[m]||(this.blobChunks[m]={chunks:Array.from({length:parseInt(p)},()=>null),timestamp:Date.now()}),this.blobChunks[m].chunks.length!==parseInt(p)){console.error("Total chunks mismatch");return}if(this.blobChunks[m].chunks[parseInt(f)-1]=t,this.blobChunks[m].chunks.every(g=>g!==null)){const g=new Uint8Array(this.blobChunks[m].chunks.reduce((b,S)=>b.concat(Array.from(S)),[]));this.receive_bytes(u,g),delete this.blobChunks[m]}}catch(n){console.error("Websocketworker: onbytes error",n,t);return}}}class Kve extends Zf{constructor(){super(...arguments),this._ns_event_intercepts=new Map}start(){}stop(){}async _receive_edge_added(t,n,r,o){this.context.worker._zustand&&this.context.worker._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o})}async _receive_groups(t){this.context.worker._zustand&&this.context.worker._zustand.on_group_action({type:"set",groups:t})}async _receive_node_added(t){if(this.context.worker._zustand)return this.context.worker._zustand.on_node_action({type:"add",node:t,id:t.id,from_remote:!0})}async receive_workerevent({event:t,data:n}){switch(t){case"worker_error":return this.context.worker._zustand?this.context.worker._zustand.logger.error(n.error):void 0;case"update_worker_dependencies":return this.context.worker._zustand?this.context.worker._zustand.lib.libstate.getState().set({external_worker:n.worker_dependencies}):void 0;case"lib_update":await this.context.worker.getSyncManager().sync_lib();return;case"fullsync":await this.context.worker.getSyncManager().stepwise_fullsync();return;case"external_worker_update":await this.context.worker.getSyncManager().sync_lib(),await this.context.worker.getSyncManager().sync_external_worker();return;case"repos_update":await this.hookManager.call_hooks("repos_update",n.repos??n);return;case"starting":this.hookManager.call_hooks("starting");return;case"stopping":this.hookManager.call_hooks("stopping");return;default:console.warn("Unhandled worker event",t,n);break}}async intercept_ns_event(t){let n=t;for(const r of this._ns_event_intercepts.get(t.event)||[])n=await r(n);return n}async receive_nodespace_event(t){const{event:n,data:r}=await this.intercept_ns_event(t);switch(n){case"after_set_value":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value:r.result}}},id:r.node,from_remote:!0}):void 0;case"after_update_value_options":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,io:{[r.io]:{value_options:r.result}}},id:r.node,from_remote:!0}):void 0;case"triggerstart":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}):void 0;case"triggerdone":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0}):void 0;case"triggerfast":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!0},id:r.node,from_remote:!0}),setTimeout(()=>{this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,in_trigger:!1},id:r.node,from_remote:!0})},50);return;case"node_trigger_error":return this.context.worker._zustand?this.context.worker._zustand.on_node_action({type:"error",errortype:"trigger",error:r.error,id:r.node,tb:r.tb,from_remote:!0}):void 0;case"node_removed":if(!this.context.worker._zustand)return;this.context.worker._zustand.on_node_action({type:"delete",id:r.node,from_remote:!0}),this.hookManager.call_hooks("node_removed",{node:r.node});return;case"node_added":this._receive_node_added(r.node);return;case"after_disconnect":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_unforward":return!r.result||!Array.isArray(r.result)||r.result.length!==4||!this.context.worker._zustand?void 0:this.context.worker._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:r.result[0],src_ioid:r.result[1],trg_nid:r.result[2],trg_ioid:r.result[3]});case"after_connect":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_forward":return!r.result||!Array.isArray(r.result)||r.result.length!==4?void 0:this._receive_edge_added(...r.result);case"after_add_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"after_remove_shelf":return!r.result||!this.context.worker._zustand?void 0:this.context.worker._zustand.lib.libstate.getState().set({lib:r.result});case"progress":if(!this.context.worker._zustand)return;if(r.node)return this.context.worker._zustand.on_node_action({type:"update",node:{id:r.node,progress:r.info},id:r.node,from_remote:!0});console.warn("Unhandled nodepsace event",n,r);break;default:if(["after_set_nodespace"].includes(n))return;console.warn("Unhandled nodepsace event",n,r);break}}add_ns_event_intercept(t,n){const r=this._ns_event_intercepts.get(t)||[];return r.push(n),this._ns_event_intercepts.set(t,r),()=>{const a=this._ns_event_intercepts.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}}class Qve extends Zf{constructor(){super(...arguments),this._hooks=new Map}start(){}stop(){}add_hook(t,n){const r=this._hooks.get(t)||[];return r.push(n),this._hooks.set(t,r),()=>{const a=this._hooks.get(t)||[],s=a.indexOf(n);s>=0&&a.splice(s,1)}}async call_hooks(t,n){const r=[];for(const o of this._hooks.get(t)||[]){const a=o({worker:this.context.worker,data:n});a instanceof Promise&&r.push(a)}await Promise.all(r)}}class e1e extends Zf{start(){}stop(){}async trigger_node(t){await this.communicationManager._send_cmd({cmd:"trigger_node",kwargs:{nid:t},wait_for_response:!1})}async add_node(t){const n=await this.communicationManager._send_cmd({cmd:"add_node",kwargs:{id:t}});return this.eventManager._receive_node_added(n)}async remove_node(t){await this.communicationManager._send_cmd({cmd:"remove_node",kwargs:{id:t}})}locally_update_node(t){this.syncManager.locally_update_node(t)}set_io_value({nid:t,ioid:n,value:r,set_default:o=!1}){return this.communicationManager._send_cmd({cmd:"set_io_value",kwargs:{nid:t,ioid:n,value:r,set_default:o},wait_for_response:!0})}set_io_value_options({nid:t,ioid:n,values:r,keys:o,nullable:a}){return this.communicationManager._send_cmd({cmd:"update_io_value_options",kwargs:{nid:t,ioid:n,options:{options:{type:"enum",values:r,keys:o,nullable:a}}}})}async get_io_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_value",kwargs:{nid:t,ioid:n},wait_for_response:!0});return this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{value:r}}},id:t,from_remote:!0}),r}async get_ios_values({nid:t}){const n=await this.communicationManager._send_cmd({cmd:"get_ios_values",kwargs:{nid:t},wait_for_response:!0});if(!this.context.worker._zustand)return n;const r={};for(const o in n)r[o]={value:n[o]};return this.context.worker._zustand.on_node_action({type:"update",node:{io:r},id:t,from_remote:!0}),n}async get_io_full_value({nid:t,ioid:n}){const r=await this.communicationManager._send_cmd({cmd:"get_io_full_value",kwargs:{nid:t,ioid:n},wait_for_response:!0,as_bytes:!0}),{header:o,bytes:a}=r,{mime:s}=o,u=_H({data:a,mime:s||"application/octet-stream"});return this.context.worker._zustand?.on_node_action?.({type:"update",node:{id:t,io:{[n]:{fullvalue:u}}},id:t,from_remote:!0}),u}async update_io_options({nid:t,ioid:n,options:r}){const o=await this.communicationManager._send_cmd({cmd:"update_io_options",kwargs:{nid:t,ioid:n,...r},wait_for_response:!0});if(!this.context.worker._zustand)return o;this.context.worker._zustand.on_node_action({type:"update",node:{io:{[n]:{...r}}},id:t,from_remote:!0})}async get_node_status(t){return await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0})}async get_remote_node_state(t){const n=await this.communicationManager._send_cmd({cmd:"get_node_state",kwargs:{nid:t},wait_for_response:!0});this.context.worker._zustand&&this.context.worker._zustand.on_node_action({type:"update",node:n,id:n.id,from_remote:!0})}}class t1e extends Zf{start(){}stop(){}add_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a=!1}){return this.communicationManager._send_cmd({cmd:"add_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o,replace:a}})}remove_edge({src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}){return this.communicationManager._send_cmd({cmd:"remove_edge",kwargs:{src_nid:t,src_ioid:n,trg_nid:r,trg_ioid:o}})}}class n1e extends Zf{start(){}stop(){}async group_nodes(t,n){const r=await this.communicationManager._send_cmd({cmd:"group_nodes",kwargs:{node_ids:t,group_ids:n},wait_for_response:!0});return this.eventManager._receive_groups(r),r}async remove_group(t){await this.communicationManager._send_cmd({cmd:"remove_group",kwargs:{gid:t},wait_for_response:!0}),await this.syncManager.sync_nodespace()}locally_update_group(t){this.syncManager.locally_update_group(t)}}class r1e extends Zf{constructor(){super(...arguments),this._available_modules_cache={installed:[],available:[],active:[]}}start(){}stop(){}async add_external_worker({module:t,cls_module:n,cls_name:r}){return await this.communicationManager._send_cmd({cmd:"add_external_worker",kwargs:{module:t,cls_module:n,cls_name:r}})}async add_lib(t,n){return await this.communicationManager._send_cmd({cmd:"add_package_dependency",kwargs:{name:t,version:n},wait_for_response:!1})}async remove_lib(t){return await this.communicationManager._send_cmd({cmd:"remove_package_dependency",kwargs:{name:t},wait_for_response:!1})}async get_available_modules({wait_for_response:t=!1,on_load:n}){const r=this.communicationManager._send_cmd({cmd:"get_available_modules",wait_for_response:!0,unique:!0}).then(o=>{this._available_modules_cache=o,n&&n(this._available_modules_cache)});return t&&await r,this._available_modules_cache}async remove_external_worker(t,n){return await this.communicationManager._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}async get_external_worker_config(t,n){return await this.communicationManager._send_cmd({cmd:"get_external_worker_config",kwargs:{worker_id:t,class_id:n},wait_for_response:!0})}}class kj{getEventManager(){return this._eventManager}getSyncManager(){return this._syncManager}getCommunicationManager(){return this._communicationManager}getConnectionHealthManager(){return this._connectionhealthManager}getHookManager(){return this._hookManager}getNodeManager(){return this._nodeManager}getEdgeManager(){return this._edgeManager}getGroupManager(){return this._groupManager}getLibraryManager(){return this._libraryManager}constructor(t){this.uuid=t.uuid,this.on_error=t.on_error||(r=>{this._zustand?.logger.error(r)}),this.state=Qs((r,o)=>({is_open:!1}));const n={worker:this};this._connectionhealthManager=new Xve(n),this._communicationManager=new Jve(n),this._eventManager=new Kve({...n}),this._syncManager=new Wve({...n,on_sync_complete:t.on_sync_complete}),this._hookManager=new Qve(n),this._nodeManager=new e1e(n),this._edgeManager=new t1e(n),this._groupManager=new n1e(n),this._libraryManager=new r1e(n),this._communicationManager.start(),this._connectionhealthManager.start(),this._syncManager.start(),this._eventManager.start(),this._hookManager.start(),this._nodeManager.start(),this._edgeManager.start(),this._groupManager.start(),this._libraryManager.start(),t.zustand&&this.set_zustand(t.zustand),this.api={node:this._nodeManager,group:this._groupManager,edge:this._edgeManager,hooks:this._hookManager,lib:this._libraryManager}}set_zustand(t){t!==this._zustand&&(t.logger.debug("Setting zustand for worker"),this._zustand=t,t.set_worker(this),this._zustand.auto_progress(),this._syncManager.stepwise_fullsync())}get is_open(){return this.state.getState().is_open}set is_open(t){this.state.setState({is_open:t})}get is_responsive(){return this._connectionhealthManager.isResponsive()}clear(){return this._communicationManager._send_cmd({cmd:"clear",unique:!0})}save(){return this._communicationManager._send_cmd({cmd:"save",wait_for_response:!0,unique:!0})}load(t){return this._communicationManager._send_cmd({cmd:"load_data",kwargs:{data:t},wait_for_response:!0}).then(()=>{this._syncManager.stepwise_fullsync()})}async get_runstate(){return await this._communicationManager._send_cmd({cmd:"get_runstate",wait_for_response:!0,unique:!0})}async send(t){throw new Error("async send(data: any) not implemented")}async upload_file(t){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){window.localStorage.getItem("funcnodes__active_worker")==this.uuid&&window.localStorage.removeItem("funcnodes__active_worker"),await this._communicationManager._send_cmd({cmd:"stop_worker",wait_for_response:!1});const n=this.onclose.bind(this);this.onclose=()=>{n(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=n)}}async update_external_worker(t,n,r){return await this._communicationManager._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:t,class_id:n,...r},wait_for_response:!0})}async export({withFiles:t=!1}){return await this._communicationManager._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:t}})}async update_from_export(t){const n=this._hookManager.add_hook("node_added",async({})=>{this._zustand?.center_all()});try{const r=await this._communicationManager._send_cmd({cmd:"update_from_export",kwargs:{data:t},wait_for_response:!0,response_timeout:6e5,unique:!0});return await new Promise(o=>{setTimeout(()=>{o()},1e3)}),await this._syncManager.stepwise_fullsync(),r}finally{n()}}_send_cmd(t){return this._communicationManager._send_cmd(t)}set_io_value(t){return this._nodeManager.set_io_value(t)}get_io_value(t){return this._nodeManager.get_io_value(t)}}function CH(e,t){return function(){return e.apply(t,arguments)}}const{toString:o1e}=Object.prototype,{getPrototypeOf:Mj}=Object,{iterator:WT,toStringTag:TH}=Symbol,ZT=(e=>t=>{const n=o1e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),iu=e=>(e=e.toLowerCase(),t=>ZT(t)===e),JT=e=>t=>typeof t===e,{isArray:fb}=Array,db=JT("undefined");function ux(e){return e!==null&&!db(e)&&e.constructor!==null&&!db(e.constructor)&&Da(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const AH=iu("ArrayBuffer");function i1e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&AH(e.buffer),t}const a1e=JT("string"),Da=JT("function"),OH=JT("number"),cx=e=>e!==null&&typeof e=="object",s1e=e=>e===!0||e===!1,KT=e=>{if(ZT(e)!=="object")return!1;const t=Mj(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(TH in e)&&!(WT in e)},l1e=e=>{if(!cx(e)||ux(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},u1e=iu("Date"),c1e=iu("File"),f1e=iu("Blob"),d1e=iu("FileList"),p1e=e=>cx(e)&&Da(e.pipe),h1e=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Da(e.append)&&((t=ZT(e))==="formdata"||t==="object"&&Da(e.toString)&&e.toString()==="[object FormData]"))},m1e=iu("URLSearchParams"),[g1e,y1e,b1e,v1e]=["ReadableStream","Request","Response","Headers"].map(iu),S1e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fx(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),fb(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ux(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function RH(e,t){if(ux(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const tg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,NH=e=>!db(e)&&e!==tg;function Ij(){const{caseless:e,skipUndefined:t}=NH(this)&&this||{},n={},r=(o,a)=>{const s=e&&RH(n,a)||a;KT(n[s])&&KT(o)?n[s]=Ij(n[s],o):KT(o)?n[s]=Ij({},o):fb(o)?n[s]=o.slice():(!t||!db(o))&&(n[s]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&fx(arguments[o],r);return n}const x1e=(e,t,n,{allOwnKeys:r}={})=>(fx(t,(o,a)=>{n&&Da(o)?e[a]=CH(o,n):e[a]=o},{allOwnKeys:r}),e),w1e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),E1e=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},_1e=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&Mj(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},C1e=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},T1e=e=>{if(!e)return null;if(fb(e))return e;let t=e.length;if(!OH(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},A1e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Mj(Uint8Array)),O1e=(e,t)=>{const r=(e&&e[WT]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},R1e=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},N1e=iu("HTMLFormElement"),k1e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),kH=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M1e=iu("RegExp"),MH=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fx(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},I1e=e=>{MH(e,(t,n)=>{if(Da(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Da(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},D1e=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return fb(e)?r(e):r(String(e).split(t)),n},j1e=()=>{},P1e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function z1e(e){return!!(e&&Da(e.append)&&e[TH]==="FormData"&&e[WT])}const $1e=e=>{const t=new Array(10),n=(r,o)=>{if(cx(r)){if(t.indexOf(r)>=0)return;if(ux(r))return r;if(!("toJSON"in r)){t[o]=r;const a=fb(r)?[]:{};return fx(r,(s,u)=>{const f=n(s,o+1);!db(f)&&(a[u]=f)}),t[o]=void 0,a}}return r};return n(e,0)},F1e=iu("AsyncFunction"),L1e=e=>e&&(cx(e)||Da(e))&&Da(e.then)&&Da(e.catch),IH=((e,t)=>e?setImmediate:t?((n,r)=>(tg.addEventListener("message",({source:o,data:a})=>{o===tg&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),tg.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Da(tg.postMessage)),B1e=typeof queueMicrotask<"u"?queueMicrotask.bind(tg):typeof process<"u"&&process.nextTick||IH,Pe={isArray:fb,isArrayBuffer:AH,isBuffer:ux,isFormData:h1e,isArrayBufferView:i1e,isString:a1e,isNumber:OH,isBoolean:s1e,isObject:cx,isPlainObject:KT,isEmptyObject:l1e,isReadableStream:g1e,isRequest:y1e,isResponse:b1e,isHeaders:v1e,isUndefined:db,isDate:u1e,isFile:c1e,isBlob:f1e,isRegExp:M1e,isFunction:Da,isStream:p1e,isURLSearchParams:m1e,isTypedArray:A1e,isFileList:d1e,forEach:fx,merge:Ij,extend:x1e,trim:S1e,stripBOM:w1e,inherits:E1e,toFlatObject:_1e,kindOf:ZT,kindOfTest:iu,endsWith:C1e,toArray:T1e,forEachEntry:O1e,matchAll:R1e,isHTMLForm:N1e,hasOwnProperty:kH,hasOwnProp:kH,reduceDescriptors:MH,freezeMethods:I1e,toObjectSet:D1e,toCamelCase:k1e,noop:j1e,toFiniteNumber:P1e,findKey:RH,global:tg,isContextDefined:NH,isSpecCompliantForm:z1e,toJSONObject:$1e,isAsyncFn:F1e,isThenable:L1e,setImmediate:IH,asap:B1e,isIterable:e=>e!=null&&Da(e[WT])};function Jt(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Pe.inherits(Jt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Pe.toJSONObject(this.config),code:this.code,status:this.status}}});const DH=Jt.prototype,jH={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jH[e]={value:e}}),Object.defineProperties(Jt,jH),Object.defineProperty(DH,"isAxiosError",{value:!0}),Jt.from=(e,t,n,r,o,a)=>{const s=Object.create(DH);Pe.toFlatObject(e,s,function(m){return m!==Error.prototype},p=>p!=="isAxiosError");const u=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return Jt.call(s,u,f,n,r,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};const V1e=null;function Dj(e){return Pe.isPlainObject(e)||Pe.isArray(e)}function PH(e){return Pe.endsWith(e,"[]")?e.slice(0,-2):e}function zH(e,t,n){return e?e.concat(t).map(function(o,a){return o=PH(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function U1e(e){return Pe.isArray(e)&&!e.some(Dj)}const H1e=Pe.toFlatObject(Pe,{},null,function(t){return/^is[A-Z]/.test(t)});function QT(e,t,n){if(!Pe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Pe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,E){return!Pe.isUndefined(E[x])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,s=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&Pe.isSpecCompliantForm(t);if(!Pe.isFunction(o))throw new TypeError("visitor must be a function");function p(w){if(w===null)return"";if(Pe.isDate(w))return w.toISOString();if(Pe.isBoolean(w))return w.toString();if(!f&&Pe.isBlob(w))throw new Jt("Blob is not supported. Use a Buffer instead.");return Pe.isArrayBuffer(w)||Pe.isTypedArray(w)?f&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function m(w,x,E){let C=w;if(w&&!E&&typeof w=="object"){if(Pe.endsWith(x,"{}"))x=r?x:x.slice(0,-2),w=JSON.stringify(w);else if(Pe.isArray(w)&&U1e(w)||(Pe.isFileList(w)||Pe.endsWith(x,"[]"))&&(C=Pe.toArray(w)))return x=PH(x),C.forEach(function(O,k){!(Pe.isUndefined(O)||O===null)&&t.append(s===!0?zH([x],k,a):s===null?x:x+"[]",p(O))}),!1}return Dj(w)?!0:(t.append(zH(E,x,a),p(w)),!1)}const g=[],b=Object.assign(H1e,{defaultVisitor:m,convertValue:p,isVisitable:Dj});function S(w,x){if(!Pe.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+x.join("."));g.push(w),Pe.forEach(w,function(C,N){(!(Pe.isUndefined(C)||C===null)&&o.call(t,C,Pe.isString(N)?N.trim():N,x,b))===!0&&S(C,x?x.concat(N):[N])}),g.pop()}}if(!Pe.isObject(e))throw new TypeError("data must be an object");return S(e),t}function $H(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function jj(e,t){this._pairs=[],e&&QT(e,this,t)}const FH=jj.prototype;FH.append=function(t,n){this._pairs.push([t,n])},FH.toString=function(t){const n=t?function(r){return t.call(this,r,$H)}:$H;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function G1e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function LH(e,t,n){if(!t)return e;const r=n&&n.encode||G1e;Pe.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=Pe.isURLSearchParams(t)?t.toString():new jj(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class BH{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Pe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const VH={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y1e={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:jj,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Pj=typeof window<"u"&&typeof document<"u",zj=typeof navigator=="object"&&navigator||void 0,q1e=Pj&&(!zj||["ReactNative","NativeScript","NS"].indexOf(zj.product)<0),X1e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W1e=Pj&&window.location.href||"http://localhost",Ui={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pj,hasStandardBrowserEnv:q1e,hasStandardBrowserWebWorkerEnv:X1e,navigator:zj,origin:W1e},Symbol.toStringTag,{value:"Module"})),...Y1e};function Z1e(e,t){return QT(e,new Ui.classes.URLSearchParams,{visitor:function(n,r,o,a){return Ui.isNode&&Pe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function J1e(e){return Pe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function K1e(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function UH(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),f=a>=n.length;return s=!s&&Pe.isArray(o)?o.length:s,f?(Pe.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!Pe.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&Pe.isArray(o[s])&&(o[s]=K1e(o[s])),!u)}if(Pe.isFormData(e)&&Pe.isFunction(e.entries)){const n={};return Pe.forEachEntry(e,(r,o)=>{t(J1e(r),o,n,0)}),n}return null}function Q1e(e,t,n){if(Pe.isString(e))try{return(t||JSON.parse)(e),Pe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const dx={transitional:VH,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Pe.isObject(t);if(a&&Pe.isHTMLForm(t)&&(t=new FormData(t)),Pe.isFormData(t))return o?JSON.stringify(UH(t)):t;if(Pe.isArrayBuffer(t)||Pe.isBuffer(t)||Pe.isStream(t)||Pe.isFile(t)||Pe.isBlob(t)||Pe.isReadableStream(t))return t;if(Pe.isArrayBufferView(t))return t.buffer;if(Pe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Z1e(t,this.formSerializer).toString();if((u=Pe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return QT(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Q1e(t)):t}],transformResponse:[function(t){const n=this.transitional||dx.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Pe.isResponse(t)||Pe.isReadableStream(t))return t;if(t&&Pe.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(u){if(s)throw u.name==="SyntaxError"?Jt.from(u,Jt.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ui.classes.FormData,Blob:Ui.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Pe.forEach(["delete","get","head","post","put","patch"],e=>{dx.headers[e]={}});const eSe=Pe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tSe=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
978
978
|
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&eSe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},HH=Symbol("internals");function px(e){return e&&String(e).trim().toLowerCase()}function eA(e){return e===!1||e==null?e:Pe.isArray(e)?e.map(eA):String(e)}function nSe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const rSe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $j(e,t,n,r,o){if(Pe.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Pe.isString(t)){if(Pe.isString(r))return t.indexOf(r)!==-1;if(Pe.isRegExp(r))return r.test(t)}}function oSe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function iSe(e,t){const n=Pe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}let ja=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(u,f,p){const m=px(f);if(!m)throw new Error("header name must be a non-empty string");const g=Pe.findKey(o,m);(!g||o[g]===void 0||p===!0||p===void 0&&o[g]!==!1)&&(o[g||f]=eA(u))}const s=(u,f)=>Pe.forEach(u,(p,m)=>a(p,m,f));if(Pe.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(Pe.isString(t)&&(t=t.trim())&&!rSe(t))s(tSe(t),n);else if(Pe.isObject(t)&&Pe.isIterable(t)){let u={},f,p;for(const m of t){if(!Pe.isArray(m))throw TypeError("Object iterator must return a key-value pair");u[p=m[0]]=(f=u[p])?Pe.isArray(f)?[...f,m[1]]:[f,m[1]]:m[1]}s(u,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=px(t),t){const r=Pe.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return nSe(o);if(Pe.isFunction(n))return n.call(this,o,r);if(Pe.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=px(t),t){const r=Pe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||$j(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=px(s),s){const u=Pe.findKey(r,s);u&&(!n||$j(r,r[u],u,n))&&(delete r[u],o=!0)}}return Pe.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||$j(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Pe.forEach(this,(o,a)=>{const s=Pe.findKey(r,a);if(s){n[s]=eA(o),delete n[a];return}const u=t?oSe(a):String(a).trim();u!==a&&delete n[a],n[u]=eA(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Pe.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Pe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
979
979
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[HH]=this[HH]={accessors:{}}).accessors,o=this.prototype;function a(s){const u=px(s);r[u]||(iSe(o,s),r[u]=!0)}return Pe.isArray(t)?t.forEach(a):a(t),this}};ja.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Pe.reduceDescriptors(ja.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Pe.freezeMethods(ja);function Fj(e,t){const n=this||dx,r=t||n,o=ja.from(r.headers);let a=r.data;return Pe.forEach(e,function(u){a=u.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function GH(e){return!!(e&&e.__CANCEL__)}function pb(e,t,n){Jt.call(this,e??"canceled",Jt.ERR_CANCELED,t,n),this.name="CanceledError"}Pe.inherits(pb,Jt,{__CANCEL__:!0});function YH(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Jt("Request failed with status code "+n.status,[Jt.ERR_BAD_REQUEST,Jt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function aSe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function sSe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),m=r[a];s||(s=p),n[o]=f,r[o]=p;let g=a,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),p-s<t)return;const S=m&&p-m;return S?Math.round(b*1e3/S):void 0}}function lSe(e,t){let n=0,r=1e3/t,o,a;const s=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),g=m-n;g>=r?s(p,m):(o=p,a||(a=setTimeout(()=>{a=null,s(o)},r-g)))},()=>o&&s(o)]}const tA=(e,t,n=3)=>{let r=0;const o=sSe(50,250);return lSe(a=>{const s=a.loaded,u=a.lengthComputable?a.total:void 0,f=s-r,p=o(f),m=s<=u;r=s;const g={loaded:s,total:u,progress:u?s/u:void 0,bytes:f,rate:p||void 0,estimated:p&&u&&m?(u-s)/p:void 0,event:a,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(g)},n)},qH=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},XH=e=>(...t)=>Pe.asap(()=>e(...t)),uSe=Ui.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ui.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ui.origin),Ui.navigator&&/(msie|trident)/i.test(Ui.navigator.userAgent)):()=>!0,cSe=Ui.hasStandardBrowserEnv?{write(e,t,n,r,o,a,s){if(typeof document>"u")return;const u=[`${e}=${encodeURIComponent(t)}`];Pe.isNumber(n)&&u.push(`expires=${new Date(n).toUTCString()}`),Pe.isString(r)&&u.push(`path=${r}`),Pe.isString(o)&&u.push(`domain=${o}`),a===!0&&u.push("secure"),Pe.isString(s)&&u.push(`SameSite=${s}`),document.cookie=u.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function fSe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dSe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function WH(e,t,n){let r=!fSe(t);return e&&(r||n==!1)?dSe(e,t):t}const ZH=e=>e instanceof ja?{...e}:e;function ng(e,t){t=t||{};const n={};function r(p,m,g,b){return Pe.isPlainObject(p)&&Pe.isPlainObject(m)?Pe.merge.call({caseless:b},p,m):Pe.isPlainObject(m)?Pe.merge({},m):Pe.isArray(m)?m.slice():m}function o(p,m,g,b){if(Pe.isUndefined(m)){if(!Pe.isUndefined(p))return r(void 0,p,g,b)}else return r(p,m,g,b)}function a(p,m){if(!Pe.isUndefined(m))return r(void 0,m)}function s(p,m){if(Pe.isUndefined(m)){if(!Pe.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function u(p,m,g){if(g in t)return r(p,m);if(g in e)return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(p,m,g)=>o(ZH(p),ZH(m),g,!0)};return Pe.forEach(Object.keys({...e,...t}),function(m){const g=f[m]||o,b=g(e[m],t[m],m);Pe.isUndefined(b)&&g!==u||(n[m]=b)}),n}const JH=e=>{const t=ng({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:u}=t;if(t.headers=s=ja.from(s),t.url=LH(WH(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),Pe.isFormData(n)){if(Ui.hasStandardBrowserEnv||Ui.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Pe.isFunction(n.getHeaders)){const f=n.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([m,g])=>{p.includes(m.toLowerCase())&&s.set(m,g)})}}if(Ui.hasStandardBrowserEnv&&(r&&Pe.isFunction(r)&&(r=r(t)),r||r!==!1&&uSe(t.url))){const f=o&&a&&cSe.read(a);f&&s.set(o,f)}return t},pSe=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=JH(e);let a=o.data;const s=ja.from(o.headers).normalize();let{responseType:u,onUploadProgress:f,onDownloadProgress:p}=o,m,g,b,S,w;function x(){S&&S(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function C(){if(!E)return;const O=ja.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),M={data:!u||u==="text"||u==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:O,config:e,request:E};YH(function(P){n(P),x()},function(P){r(P),x()},M),E=null}"onloadend"in E?E.onloadend=C:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(C)},E.onabort=function(){E&&(r(new Jt("Request aborted",Jt.ECONNABORTED,e,E)),E=null)},E.onerror=function(k){const M=k&&k.message?k.message:"Network Error",D=new Jt(M,Jt.ERR_NETWORK,e,E);D.event=k||null,r(D),E=null},E.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||VH;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new Jt(k,M.clarifyTimeoutError?Jt.ETIMEDOUT:Jt.ECONNABORTED,e,E)),E=null},a===void 0&&s.setContentType(null),"setRequestHeader"in E&&Pe.forEach(s.toJSON(),function(k,M){E.setRequestHeader(M,k)}),Pe.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),u&&u!=="json"&&(E.responseType=o.responseType),p&&([b,w]=tA(p,!0),E.addEventListener("progress",b)),f&&E.upload&&([g,S]=tA(f),E.upload.addEventListener("progress",g),E.upload.addEventListener("loadend",S)),(o.cancelToken||o.signal)&&(m=O=>{E&&(r(!O||O.type?new pb(null,e,E):O),E.abort(),E=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const N=aSe(o.url);if(N&&Ui.protocols.indexOf(N)===-1){r(new Jt("Unsupported protocol "+N+":",Jt.ERR_BAD_REQUEST,e));return}E.send(a||null)})},hSe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(p){if(!o){o=!0,u();const m=p instanceof Error?p:this.reason;r.abort(m instanceof Jt?m:new pb(m instanceof Error?m.message:m))}};let s=t&&setTimeout(()=>{s=null,a(new Jt(`timeout ${t} of ms exceeded`,Jt.ETIMEDOUT))},t);const u=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),e=null)};e.forEach(p=>p.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>Pe.asap(u),f}},mSe=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},gSe=async function*(e,t){for await(const n of ySe(e))yield*mSe(n,t)},ySe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},KH=(e,t,n,r)=>{const o=gSe(e,t);let a=0,s,u=f=>{s||(s=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:p,value:m}=await o.next();if(p){u(),f.close();return}let g=m.byteLength;if(n){let b=a+=g;n(b)}f.enqueue(new Uint8Array(m))}catch(p){throw u(p),p}},cancel(f){return u(f),o.return()}},{highWaterMark:2})},QH=64*1024,{isFunction:nA}=Pe,bSe=(({Request:e,Response:t})=>({Request:e,Response:t}))(Pe.global),{ReadableStream:e8,TextEncoder:t8}=Pe.global,n8=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vSe=e=>{e=Pe.merge.call({skipUndefined:!0},bSe,e);const{fetch:t,Request:n,Response:r}=e,o=t?nA(t):typeof fetch=="function",a=nA(n),s=nA(r);if(!o)return!1;const u=o&&nA(e8),f=o&&(typeof t8=="function"?(w=>x=>w.encode(x))(new t8):async w=>new Uint8Array(await new n(w).arrayBuffer())),p=a&&u&&n8(()=>{let w=!1;const x=new n(Ui.origin,{body:new e8,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!x}),m=s&&u&&n8(()=>Pe.isReadableStream(new r("").body)),g={stream:m&&(w=>w.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!g[w]&&(g[w]=(x,E)=>{let C=x&&x[w];if(C)return C.call(x);throw new Jt(`Response type '${w}' is not supported`,Jt.ERR_NOT_SUPPORT,E)})});const b=async w=>{if(w==null)return 0;if(Pe.isBlob(w))return w.size;if(Pe.isSpecCompliantForm(w))return(await new n(Ui.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(Pe.isArrayBufferView(w)||Pe.isArrayBuffer(w))return w.byteLength;if(Pe.isURLSearchParams(w)&&(w=w+""),Pe.isString(w))return(await f(w)).byteLength},S=async(w,x)=>{const E=Pe.toFiniteNumber(w.getContentLength());return E??b(x)};return async w=>{let{url:x,method:E,data:C,signal:N,cancelToken:O,timeout:k,onDownloadProgress:M,onUploadProgress:D,responseType:P,headers:B,withCredentials:V="same-origin",fetchOptions:U}=JH(w),X=t||fetch;P=P?(P+"").toLowerCase():"text";let L=hSe([N,O&&O.toAbortSignal()],k),J=null;const Y=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let ee;try{if(D&&p&&E!=="get"&&E!=="head"&&(ee=await S(B,C))!==0){let W=new n(x,{method:"POST",body:C,duplex:"half"}),ie;if(Pe.isFormData(C)&&(ie=W.headers.get("content-type"))&&B.setContentType(ie),W.body){const[Z,K]=qH(ee,tA(XH(D)));C=KH(W.body,QH,Z,K)}}Pe.isString(V)||(V=V?"include":"omit");const H=a&&"credentials"in n.prototype,ne={...U,signal:L,method:E.toUpperCase(),headers:B.normalize().toJSON(),body:C,duplex:"half",credentials:H?V:void 0};J=a&&new n(x,ne);let Q=await(a?X(J,U):X(x,ne));const ae=m&&(P==="stream"||P==="response");if(m&&(M||ae&&Y)){const W={};["status","statusText","headers"].forEach(se=>{W[se]=Q[se]});const ie=Pe.toFiniteNumber(Q.headers.get("content-length")),[Z,K]=M&&qH(ie,tA(XH(M),!0))||[];Q=new r(KH(Q.body,QH,Z,()=>{K&&K(),Y&&Y()}),W)}P=P||"text";let q=await g[Pe.findKey(g,P)||"text"](Q,w);return!ae&&Y&&Y(),await new Promise((W,ie)=>{YH(W,ie,{data:q,headers:ja.from(Q.headers),status:Q.status,statusText:Q.statusText,config:w,request:J})})}catch(H){throw Y&&Y(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new Jt("Network Error",Jt.ERR_NETWORK,w,J),{cause:H.cause||H}):Jt.from(H,H&&H.code,w,J)}}},SSe=new Map,r8=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let s=a.length,u=s,f,p,m=SSe;for(;u--;)f=a[u],p=m.get(f),p===void 0&&m.set(f,p=u?new Map:vSe(t)),m=p;return p};r8();const Lj={http:V1e,xhr:pSe,fetch:{get:r8}};Pe.forEach(Lj,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const o8=e=>`- ${e}`,xSe=e=>Pe.isFunction(e)||e===null||e===!1;function wSe(e,t){e=Pe.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let s=0;s<n;s++){r=e[s];let u;if(o=r,!xSe(r)&&(o=Lj[(u=String(r)).toLowerCase()],o===void 0))throw new Jt(`Unknown adapter '${u}'`);if(o&&(Pe.isFunction(o)||(o=o.get(t))))break;a[u||"#"+s]=o}if(!o){const s=Object.entries(a).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let u=n?s.length>1?`since :
|
|
980
980
|
`+s.map(o8).join(`
|