@cc-openmrs/cc-esm-active-prescriptions 1.0.62 → 1.0.63

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/main.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see main.js.LICENSE.txt */
2
- (()=>{var e,t,n,r,o={428(e,t,n){"use strict";function r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>p});var l=["width","height","viewBox"],s=["tabindex"],c={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var u=n(5556),d=n.n(u),f=n(6072);const p=(0,f.forwardRef)(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:o="xMidYMid meet",...u},d){const{tabindex:p,...m}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,o=void 0===r?"0 0 ".concat(t," ").concat(n):r,u=a(e,l),d=u.tabindex,f=a(u,s),p=i(i(i({},c),f),{},{width:t,height:n,viewBox:o});return p["aria-label"]||p["aria-labelledby"]?(p.role="img",null!=d&&(p.focusable="true",p.tabindex=d)):p["aria-hidden"]=!0,p}({...u,tabindex:n}),h=m;return e&&(h.className=e),null!=p&&(h.tabIndex="number"==typeof p?p:Number(n)),d&&(h.ref=d),r&&(h.xmlns=r),o&&(h.preserveAspectRatio=o),f.createElement("svg",h,t)});p.displayName="Icon",p.propTypes={"aria-hidden":d().oneOfType([d().bool,d().oneOf(["true","false"])]),"aria-label":d().string,"aria-labelledby":d().string,children:d().node,className:d().string,height:d().oneOfType([d().number,d().string]),preserveAspectRatio:d().string,tabIndex:d().oneOfType([d().number,d().string]),viewBox:d().string,width:d().oneOfType([d().number,d().string]),xmlns:d().string}},810(e,t,n){"use strict";n.d(t,{W1:()=>I,Xj:()=>A,hz:()=>$});var r,o,i,a,l,s,c,u,d,f,p,m,h,g,b,v,y,w,E,x,_,C,O,N,T=n(6072),S=n(428);const $=T.forwardRef(function({children:e,size:t=16,...n},l){return 16===t||"16"===t||"16px"===t?T.createElement(S.A,{width:t,height:t,ref:l,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},r||(r=T.createElement("path",{d:"M6 15 6 14 2.7 14 7 9.7 6.3 9 2 13.3 2 10 1 10 1 15z"})),o||(o=T.createElement("path",{d:"M10 1 10 2 13.3 2 9 6.3 9.7 7 14 2.7 14 6 15 6 15 1z"})),e):T.createElement(S.A,{width:t,height:t,ref:l,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=T.createElement("path",{d:"M20 2 20 4 26.586 4 18 12.582 19.414 14 28 5.414 28 12 30 12 30 2 20 2z"})),a||(a=T.createElement("path",{d:"M14 19.416 12.592 18 4 26.586 4 20 2 20 2 30 12 30 12 28 5.414 28 14 19.416z"})),e)}),I=T.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?T.createElement(S.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},l||(l=T.createElement("path",{d:"M2 12H14V13H2z"})),s||(s=T.createElement("path",{d:"M2 9H14V10H2z"})),c||(c=T.createElement("path",{d:"M2 6H14V7H2z"})),u||(u=T.createElement("path",{d:"M2 3H14V4H2z"})),e):20===t||"20"===t||"20px"===t?T.createElement(S.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},d||(d=T.createElement("path",{d:"M2 14.8H18V16H2z"})),f||(f=T.createElement("path",{d:"M2 11.2H18V12.399999999999999H2z"})),p||(p=T.createElement("path",{d:"M2 7.6H18V8.799999999999999H2z"})),m||(m=T.createElement("path",{d:"M2 4H18V5.2H2z"})),e):24===t||"24"===t||"24px"===t?T.createElement(S.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},h||(h=T.createElement("path",{d:"M3 18H21V19.5H3z"})),g||(g=T.createElement("path",{d:"M3 13.5H21V15H3z"})),b||(b=T.createElement("path",{d:"M3 9H21V10.5H3z"})),v||(v=T.createElement("path",{d:"M3 4.5H21V6H3z"})),e):T.createElement(S.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},y||(y=T.createElement("path",{d:"M4 6H28V8H4z"})),w||(w=T.createElement("path",{d:"M4 24H28V26H4z"})),E||(E=T.createElement("path",{d:"M4 12H28V14H4z"})),x||(x=T.createElement("path",{d:"M4 18H28V20H4z"})),e)}),A=T.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?T.createElement(S.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},_||(_=T.createElement("path",{d:"M2 9 2 10 5.3 10 1 14.3 1.7 15 6 10.7 6 14 7 14 7 9z"})),C||(C=T.createElement("path",{d:"M14 7 14 6 10.7 6 15 1.7 14.3 1 10 5.3 10 2 9 2 9 7z"})),e):T.createElement(S.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},O||(O=T.createElement("path",{d:"M4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18z"})),N||(N=T.createElement("path",{d:"M30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z"})),e)})},771(e,t,n){"use strict";n.d(t,{$D:()=>_,d3:()=>x,sV:()=>O,x:()=>C});var r,o,i,a,l,s,c,u,d,f,p,m,h,g,b,v,y,w=n(6072),E=n(428);const x=w.forwardRef(function({children:e,size:t=16,...n},i){return w.createElement(E.A,{width:t,height:t,ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},r||(r=w.createElement("path",{d:"M16 18 6 8 7.4 6.6 16 15.2 24.6 6.6 26 8z"})),o||(o=w.createElement("path",{d:"M4 22H28V24H4z"})),e)}),_=w.forwardRef(function({children:e,size:t=16,...n},r){return w.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=w.createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),e)}),C=w.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?w.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},a||(a=w.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),l||(l=w.createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?w.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},s||(s=w.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),c||(c=w.createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?w.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},u||(u=w.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),d||(d=w.createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),e):w.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f||(f=w.createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),p||(p=w.createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),e)}),O=w.forwardRef(function({children:e,size:t=16,...n},r){return w.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},m||(m=w.createElement("path",{d:"M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z"})),h||(h=w.createElement("path",{d:"M24,4a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,24,2Z"})),g||(g=w.createElement("path",{d:"M23,30H21V28a3.0033,3.0033,0,0,0-3-3H14a3.0033,3.0033,0,0,0-3,3v2H9V28a5.0059,5.0059,0,0,1,5-5h4a5.0059,5.0059,0,0,1,5,5Z"})),b||(b=w.createElement("path",{d:"M16,13a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,16,11Z"})),v||(v=w.createElement("path",{d:"M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z"})),y||(y=w.createElement("path",{d:"M8,4A3,3,0,1,1,5,7,3,3,0,0,1,8,4M8,2a5,5,0,1,0,5,5A5,5,0,0,0,8,2Z"})),e)})},4520(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function l(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{kZS:()=>ya,$nd:()=>Zt,Sc0:()=>In,a32:()=>ii,KXP:()=>ia,lRv:()=>la,Y9Y:()=>kl,V8d:()=>Ll,wdv:()=>Ml,dJ2:()=>Vl,bCw:()=>Hl,K0:()=>Kt,OuH:()=>vi,jeF:()=>va,Wdr:()=>di,cwr:()=>ra,jlY:()=>wi,rQ0:()=>fi,aaP:()=>Ea,zWQ:()=>Ca,Psq:()=>xa,vji:()=>Ia,f8J:()=>ql,ryE:()=>Ra,ozo:()=>el,wbY:()=>Xa,KpK:()=>nl,T2N:()=>rl,tUM:()=>Ya,vwO:()=>sl,ksK:()=>fl,FAs:()=>Sl});var s={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?s.enableCssCustomProperties=!0:s.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?s.enableCssGrid=!0:s.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?s.enableV11Release=!0:s.enableV11Release=!1:s.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?s.enableExperimentalTileContrast=!0:s.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_TILE_CONTRAST?s.enableTileContrast=!0:s.enableTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?s.enableV12TileDefaultIcons=!0:s.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?s.enableV12TileRadioIcons=!0:s.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?s.enableV12Overflowmenu=!0:s.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?s.enableTreeviewControllable=!0:s.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?s.enableV12StructuredListVisibleIcons=!0:s.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?s.enableExperimentalFocusWrapWithoutSentinels=!0:s.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS?s.enableFocusWrapWithoutSentinels=!0:s.enableFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?s.enableDialogElement=!0:s.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?s.enableV12DynamicFloatingStyles=!0:s.enableV12DynamicFloatingStyles=!1,process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING&&"true"===process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING?s.enableV12ToggleReducedLabelSpacing=!0:s.enableV12ToggleReducedLabelSpacing=!1,process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER&&"true"===process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER?s.enableEnhancedFileUploader=!0:s.enableEnhancedFileUploader=!1,process.env.CARBON_ENABLE_PRESENCE&&"true"===process.env.CARBON_ENABLE_PRESENCE?s.enablePresence=!0:s.enablePresence=!1}catch(e){s.enableCssCustomProperties=!1,s.enableCssGrid=!1,s.enableV11Release=!0,s.enableExperimentalTileContrast=!1,s.enableTileContrast=!1,s.enableV12TileDefaultIcons=!1,s.enableV12TileRadioIcons=!1,s.enableV12Overflowmenu=!1,s.enableTreeviewControllable=!1,s.enableV12StructuredListVisibleIcons=!1,s.enableExperimentalFocusWrapWithoutSentinels=!1,s.enableFocusWrapWithoutSentinels=!1,s.enableDialogElement=!1,s.enableV12DynamicFloatingStyles=!1,s.enableV12ToggleReducedLabelSpacing=!1,s.enableEnhancedFileUploader=!1,s.enablePresence=!1}var c=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:s.enableCssCustomProperties},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:s.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:s.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Deprecated, use enable-tile-contrast instead\n",enabled:s.enableExperimentalTileContrast},{name:"enable-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:s.enableTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:s.enableV12TileDefaultIcons},{name:"enable-v12-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:s.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:s.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:s.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:s.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Deprecated, use enable-focus-wrap-without-sentinels instead\n",enabled:s.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:s.enableFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:s.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:s.enableV12DynamicFloatingStyles},{name:"enable-v12-toggle-reduced-label-spacing",description:"Enable a reduced spacing between the toggle control and its label\n",enabled:s.enableV12ToggleReducedLabelSpacing},{name:"enable-enhanced-file-uploader",description:"Enable enhanced functionality for the FileUploader component, including richer callback data and expanded trigger events for onChange and onDelete.\n",enabled:s.enableEnhancedFileUploader},{name:"enable-presence",description:"Enable components to remain unmounted in closed state and mount in open state.\n",enabled:s.enablePresence}],u=function(){return function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach(function(e){n.flags.set(e,t[e])})},[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.flags.set(n,e[n])})}},{key:"mergeWithScope",value:function(e){var t,n=o(e.flags);try{for(n.s();!(t=n.n()).done;){var r=i(t.value,2),a=r[0],l=r[1];this.flags.has(a)||this.flags.set(a,l)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){var t;return this.checkForFlag(e),null!==(t=this.flags.get(e))&&void 0!==t&&t}}])}(),d=function(){var e,t,n=new u(t),r=o(c);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.add(i.name,i.enabled)}}catch(e){r.e(e)}finally{r.f()}return n}();function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}d.add.bind(d),d.enable.bind(d),d.disable.bind(d),d.enabled.bind(d),d.merge.bind(d)({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1,"enable-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1});var p=n(5556),m=n.n(p),h=n(6072),g=n.t(h,2),b=n(6942),v=n.n(b);const y={},w=(e,t,n)=>(r,o,i,...a)=>{if(void 0===r[o])return null;if(!y[i]||!y[i][o]){y[i]={...y[i],[o]:!0};const e=r[o];n&&n(e);t&&!t.includes(e)&&(n||t.join(", "))}return e(r,o,i,...a)},E="undefined"!=typeof window?h.useLayoutEffect:h.useEffect,x=e=>{const t=(0,h.useMemo)(()=>e,e);return(0,h.useCallback)(e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},[t])},_=h.createContext("cds");function C(){return h.useContext(_)}const O=(e,t,n)=>{const r=(0,h.useRef)(null);(0,h.useEffect)(()=>{r.current=n},[n]),(0,h.useEffect)(()=>{const n="current"in e?e.current:e;if(!n)return;const o=e=>{r.current&&r.current(e)};return n.addEventListener(t,o),()=>{n.removeEventListener(t,o)}},[e,t])},N=(e,t)=>{const n=(0,h.useRef)(null);(0,h.useEffect)(()=>{n.current=t},[t]),(0,h.useEffect)(()=>{const t=e=>{n.current&&n.current(e)};return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[e])},T={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"},S=e=>T[e]??e;var $="undefined"!=typeof document?h.useLayoutEffect:function(){};const I={...g}.useInsertionEffect||(e=>e());function A(){return"undefined"!=typeof window}function R(e){return L(e)?(e.nodeName||"").toLowerCase():"#document"}function k(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(L(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function L(e){return!!A()&&(e instanceof Node||e instanceof k(e).Node)}function M(e){return!!A()&&(e instanceof Element||e instanceof k(e).Element)}function D(e){return!!A()&&(e instanceof HTMLElement||e instanceof k(e).HTMLElement)}function B(e){return!(!A()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof k(e).ShadowRoot)}function j(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function V(e){return/^(table|td|th)$/.test(R(e))}function F(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}n(4848);const z=/transform|translate|scale|rotate|perspective|filter/,H=/paint|layout|strict|content/,U=e=>!!e&&"none"!==e;let W;function q(e){const t=M(e)?Z(e):e;return U(t.transform)||U(t.translate)||U(t.scale)||U(t.rotate)||U(t.perspective)||!K()&&(U(t.backdropFilter)||U(t.filter))||z.test(t.willChange||"")||H.test(t.contain||"")}function K(){return null==W&&(W="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),W}function G(e){return/^(html|body|#document)$/.test(R(e))}function Z(e){return k(e).getComputedStyle(e)}function J(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if("html"===R(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||P(e);return B(t)?t.host:t}function X(e){const t=Y(e);return G(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&j(t)?t:X(t)}function Q(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=X(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=k(o);if(i){const e=ee(a);return t.concat(a,a.visualViewport||[],j(o)?o:[],e&&n?Q(e):[])}return t.concat(o,Q(o,[],n))}function ee(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var te=n(2646);const ne=["top","right","bottom","left"],re=Math.min,oe=Math.max,ie=Math.round,ae=Math.floor,le=e=>({x:e,y:e}),se={left:"right",right:"left",bottom:"top",top:"bottom"};function ce(e,t,n){return oe(e,re(t,n))}function ue(e,t){return"function"==typeof e?e(t):e}function de(e){return e.split("-")[0]}function fe(e){return e.split("-")[1]}function pe(e){return"y"===e?"height":"width"}function me(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function he(e){return"x"===me(e)?"y":"x"}function ge(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const be=["left","right"],ve=["right","left"],ye=["top","bottom"],we=["bottom","top"];function Ee(e){const t=de(e);return se[t]+e.slice(t.length)}function xe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _e(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ce(e,t,n){let{reference:r,floating:o}=e;const i=me(t),a=he(t),l=pe(a),s=de(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(fe(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Oe(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ue(t,e),m=xe(p),h=l[f?"floating"===d?"reference":"floating":d],g=_e(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),b="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=_e(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:s}):b);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Te(e){return ne.some(t=>e[t]>=0)}const Se=new Set(["left","top"]);function $e(e){const t=Z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=D(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=ie(n)!==i||ie(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Ie(e){return M(e)?e:e.contextElement}function Ae(e){const t=Ie(e);if(!D(t))return le(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$e(t);let a=(i?ie(n.width):n.width)/r,l=(i?ie(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Re=le(0);function ke(e){const t=k(e);return K()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Re}function Pe(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ie(e);let a=le(1);t&&(r?M(r)&&(a=Ae(r)):a=Ae(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==k(e))&&t}(i,n,r)?ke(i):le(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=k(i),t=r&&M(r)?k(r):r;let n=e,o=ee(n);for(;o&&r&&t!==n;){const e=Ae(o),t=o.getBoundingClientRect(),r=Z(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=a,n=k(o),o=ee(n)}}return _e({width:u,height:d,x:s,y:c})}function Le(e,t){const n=J(e).scrollLeft;return t?t.left+n:Pe(P(e)).left+n}function Me(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Le(e,n),y:n.top+t.scrollTop}}function De(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=k(e),r=P(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=K();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=Le(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=P(e),n=J(e),r=e.ownerDocument.body,o=oe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=oe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Le(e);const l=-n.scrollTop;return"rtl"===Z(r).direction&&(a+=oe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(P(e));else if(M(t))r=function(e,t){const n=Pe(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=D(e)?Ae(e):le(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ke(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _e(r)}function Be(e,t){const n=Y(e);return!(n===t||!M(n)||G(n))&&("fixed"===Z(n).position||Be(n,t))}function je(e,t,n){const r=D(t),o=P(t),i="fixed"===n,a=Pe(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=le(0);function c(){s.x=Le(o)}if(r||!r&&!i)if(("body"!==R(t)||j(o))&&(l=J(t)),r){const e=Pe(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?le(0):Me(o,l);return{x:a.left+l.scrollLeft-s.x-u.x,y:a.top+l.scrollTop-s.y-u.y,width:a.width,height:a.height}}function Ve(e){return"static"===Z(e).position}function Fe(e,t){if(!D(e)||"fixed"===Z(e).position)return null;if(t)return t(e);let n=e.offsetParent;return P(e)===n&&(n=n.ownerDocument.body),n}function ze(e,t){const n=k(e);if(F(e))return n;if(!D(e)){let t=Y(e);for(;t&&!G(t);){if(M(t)&&!Ve(t))return t;t=Y(t)}return n}let r=Fe(e,t);for(;r&&V(r)&&Ve(r);)r=Fe(r,t);return r&&G(r)&&Ve(r)&&!q(r)?n:r||function(e){let t=Y(e);for(;D(t)&&!G(t);){if(q(t))return t;if(F(t))return null;t=Y(t)}return null}(e)||n}const He={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=P(r),l=!!t&&F(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=le(1);const u=le(0),d=D(r);if((d||!d&&!i)&&(("body"!==R(r)||j(a))&&(s=J(r)),d)){const e=Pe(r);c=Ae(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?le(0):Me(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?F(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Q(e,[],!1).filter(e=>M(e)&&"body"!==R(e)),o=null;const i="fixed"===Z(e).position;let a=i?Y(e):e;for(;M(a)&&!G(a);){const t=Z(a),n=q(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||j(a)&&!n&&Be(e,a))?r=r.filter(e=>e!==a):o=t,a=Y(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=De(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,u=a.left;for(let e=1;e<i.length;e++){const n=De(t,i[e],o);l=oe(n.top,l),s=re(n.right,s),c=re(n.bottom,c),u=oe(n.left,u)}return{width:s-u,height:c-l,x:u,y:l}},getOffsetParent:ze,getElementRects:async function(e){const t=this.getOffsetParent||ze,n=this.getDimensions,r=await n(e.floating);return{reference:je(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=$e(e);return{width:t,height:n}},getScale:Ae,isElement:M,isRTL:function(e){return"rtl"===Z(e).direction}};function Ue(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function We(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Ie(e),u=o||i?[...c?Q(c):[],...t?Q(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&l?function(e,t){let n,r=null;const o=P(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-ae(d)+"px "+-ae(o.clientWidth-(u+f))+"px "+-ae(o.clientHeight-(d+p))+"px "+-ae(u)+"px",threshold:oe(0,re(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Ue(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let h=s?Pe(e):null;return s&&function t(){const r=Pe(e);h&&!Ue(h,r)&&n(),h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const qe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=ue(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=de(o),v=me(l),y=de(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),E=f||(y||!h?[Ee(l)]:function(e){const t=Ee(e);return[ge(e),t,ge(t)]}(l)),x="none"!==m;!f&&x&&E.push(...function(e,t,n,r){const o=fe(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ve:be:t?be:ve;case"left":case"right":return t?ye:we;default:return[]}}(de(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ge)))),i}(l,h,m,w));const _=[l,...E],C=await s.detectOverflow(t,g),O=[];let N=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&O.push(C[b]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=fe(e),o=he(e),i=pe(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ee(a)),[a,Ee(a)]}(o,a,w);O.push(C[e[0]],C[e[1]])}if(N=[...N,{placement:o,overflows:O}],!O.every(e=>e<=0)){var T,S;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=_[e];if(t&&("alignment"!==d||v===me(t)||N.every(e=>me(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(S=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:S.placement;if(!n)switch(p){case"bestFit":{var $;const e=null==($=N.filter(e=>{if(x){const t=me(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:$[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Ke=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=ue(e,t)||{};if(null==c)return{};const d=xe(u),f={x:n,y:r},p=he(o),m=pe(p),h=await a.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],E=f[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let _=x?x[y]:0;_&&await(null==a.isElement?void 0:a.isElement(x))||(_=l.floating[y]||i.floating[m]);const C=w/2-E/2,O=_/2-h[m]/2-1,N=re(d[b],O),T=re(d[v],O),S=N,$=_-h[m]-T,I=_/2-h[m]/2+C,A=ce(S,I,$),R=!s.arrow&&null!=fe(o)&&I!==A&&i.reference[m]/2-(I<S?N:T)-h[m]/2<0,k=R?I<S?I-S:I-$:0;return{[p]:f[p]+k,data:{[p]:A,centerOffset:I-A-k,...R&&{alignmentOffset:k}},reset:R}}}),Ge=(e,t,n)=>{const r=new Map,o={platform:He,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:Oe},s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ce(c,r,s),f=r,p=0;const m={};for(let n=0;n<i.length;n++){const h=i[n];if(!h)continue;const{name:g,fn:b}=h,{x:v,y,data:w,reset:E}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,m[g]={...m[g],...w},E&&p<50&&(p++,"object"==typeof E&&(E.placement&&(f=E.placement),E.rects&&(c=!0===E.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):E.rects),({x:u,y:d}=Ce(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var Ze="undefined"!=typeof document?h.useLayoutEffect:function(){};function Je(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Je(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Je(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Ye(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xe(e,t){const n=Ye(e);return Math.round(t*n)/n}function Qe(e){const t=h.useRef(e);return Ze(()=>{t.current=e}),t}const et=(e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=de(n),l=fe(n),s="y"===me(n),c=Se.has(a)?-1:1,u=i&&s?-1:1,d=ue(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},tt=(e,t)=>{const n=qe(e);return{name:n.name,fn:n.fn,options:[e,t]}},nt=(e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ue(e,t);switch(o){case"referenceHidden":{const e=Ne(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Te(e)}}}case"escaped":{const e=Ne(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Te(e)}}}default:return{}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},rt=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ke({element:n.current,padding:r}).fn(t):{}:n?Ke({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};const ot={...g};let it=!1,at=0;const lt=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+at++,st=ot.useId||function(){const[e,t]=h.useState(()=>it?lt():void 0);return $(()=>{null==e&&t(lt())},[]),h.useEffect(()=>{it=!0},[]),e};const ct=h.createContext(null),ut=h.createContext(null);function dt(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=st(),i=h.useRef({}),[a]=h.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}()),l=null!=((null==(s=h.useContext(ct))?void 0:s.id)||null);var s;const[c,u]=h.useState(r.reference),d=function(e){const t=h.useRef(()=>{});return I(()=>{t.current=e}),h.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),f=h.useMemo(()=>({setPositionReference:u}),[]),p=h.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return h.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:a,floatingId:o,refs:f}),[t,d,p,a,o,f])}function ft(e){void 0===e&&(e={});const{nodeId:t}=e,n=dt({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=h.useState(null),[l,s]=h.useState(null),c=(null==o?void 0:o.domReference)||i,u=h.useRef(null),d=h.useContext(ut);$(()=>{c&&(u.current=c)},[c]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[u,d]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=h.useState(r);Je(f,r)||p(r);const[m,g]=h.useState(null),[b,v]=h.useState(null),y=h.useCallback(e=>{e!==_.current&&(_.current=e,g(e))},[]),w=h.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),E=i||m,x=a||b,_=h.useRef(null),C=h.useRef(null),O=h.useRef(u),N=null!=s,T=Qe(s),S=Qe(o),$=Qe(c),I=h.useCallback(()=>{if(!_.current||!C.current)return;const e={placement:t,strategy:n,middleware:f};S.current&&(e.platform=S.current),Ge(_.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==$.current};A.current&&!Je(O.current,t)&&(O.current=t,te.flushSync(()=>{d(t)}))})},[f,t,n,S,$]);Ze(()=>{!1===c&&O.current.isPositioned&&(O.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const A=h.useRef(!1);Ze(()=>(A.current=!0,()=>{A.current=!1}),[]),Ze(()=>{if(E&&(_.current=E),x&&(C.current=x),E&&x){if(T.current)return T.current(E,x,I);I()}},[E,x,I,T,N]);const R=h.useMemo(()=>({reference:_,floating:C,setReference:y,setFloating:w}),[y,w]),k=h.useMemo(()=>({reference:E,floating:x}),[E,x]),P=h.useMemo(()=>{const e={position:n,left:0,top:0};if(!k.floating)return e;const t=Xe(k.floating,u.x),r=Xe(k.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Ye(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,k.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:I,refs:R,elements:k,floatingStyles:P}),[u,I,R,k,P])}({...e,elements:{...o,...l&&{reference:l}}}),p=h.useCallback(e=>{const t=M(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),f.refs.setReference(t)},[f.refs]),m=h.useCallback(e=>{(M(e)||null===e)&&(u.current=e,a(e)),(M(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!M(e))&&f.refs.setReference(e)},[f.refs]),g=h.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),b=h.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),v=h.useMemo(()=>({...f,...r,refs:g,elements:b,nodeId:t}),[f,g,b,t,r]);return $(()=>{r.dataRef.current.floatingContext=v;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),h.useMemo(()=>({...f,context:v,refs:g,elements:b}),[f,g,b,v])}const pt=new Map,mt=(e,t)=>(t,n,r,...o)=>{if(void 0===t[n])return;pt.has(r)||pt.set(r,new Set);const i=pt.get(r);return i&&!i.has(n)&&i.add(n),e(t,n,r,...o)},ht=(0,h.createContext)(d);m().node,mt(m().objectOf(m().bool)),m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool;const gt=e=>(0,h.useContext)(ht).enabled(e),bt=h.createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),vt=h.forwardRef(function({isTabTip:e,align:t=(e?"bottom-start":"bottom"),as:n="span",autoAlign:r=!1,autoAlignBoundary:o,backgroundToken:i="layer",caret:a=!e,className:l,children:s,border:c=!1,dropShadow:u=!0,highContrast:d=!1,onRequestClose:p,open:m,alignmentAxisOffset:g,...b},y){const w=C(),_=(0,h.useRef)(null),T=(0,h.useRef)(null),$=(0,h.useRef)(null),I=gt("enable-v12-dynamic-floating-styles")||r,A=(0,h.useRef)(!1);let R=S(t);O($,"mousedown",e=>{const t=e.target;A.current=L.floating.current?.contains(t)||!1,A.current&&setTimeout(()=>{A.current=!1},0)}),O($,"focusout",e=>{const t=e.relatedTarget;if(t){if(t&&!$.current?.contains(t)){const e=!I||!L.floating.current||!L.floating.current.contains(t),n=t&&$.current&&t.contains($.current);e&&!n&&p?.()}}else{if(A.current)return void(A.current=!1);p?.()}}),N("click",({target:e})=>{m&&e instanceof Node&&!$.current?.contains(e)&&p?.()});const k=h.Children.toArray(s).some(e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label"))?7:6,P=(0,h.useRef)({offset:10,caretHeight:k});E(()=>{if(a&&$.current){const e=window.getComputedStyle($.current,null),t=e.getPropertyValue(`--${w}-popover-offset`),n=e.getPropertyValue(`--${w}-popover-caret-height`);t&&(P.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&(P.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}});const{refs:L,floatingStyles:M,placement:D,middlewareData:B,elements:j,update:V}=ft(I?{placement:R,strategy:"fixed",middleware:[et(e?0:{alignmentAxis:g,mainAxis:a?P?.current?.offset:4}),r&&tt({fallbackPlacements:e?R.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]:R.includes("bottom")?["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"]:["top","top-start","top-end","left","left-start","left-end","right","right-start","right-end","bottom","bottom-start","bottom-end"],fallbackStrategy:"initialPlacement",fallbackAxisSideDirection:"start",boundary:o}),rt({element:T,padding:16}),r&&nt()]}:{});(0,h.useEffect)(()=>{if(I&&m&&j.reference&&j.floating)return We(j.reference,j.floating,V)},[I,m,j,V]);const F=(0,h.useMemo)(()=>({floating:_,setFloating:L.setFloating,caretRef:T,autoAlign:r}),[L.setFloating,r]);e&&(["bottom-start","bottom-end"].includes(R)||(R="bottom-start")),(0,h.useEffect)(()=>{if(I){const e={...M,visibility:B.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach(t=>{L.floating.current&&(L.floating.current.style[t]=e[t])}),a&&B&&B.arrow&&T?.current){const{x:e,y:t}=B.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[D.split("-")[0]];T.current.style.left=null!=e?`${e}px`:"",T.current.style.top=null!=t?`${t}px`:"",T.current.style.right="",T.current.style.bottom="",n&&(T.current.style[n]=-P?.current?.caretHeight+"px")}}},[M,L.floating,I,B,D,a]);const z=x([y,$]),H=r&&D!==R?D:R,U=v()({[`${w}--popover-container`]:!0,[`${w}--popover--caret`]:a,[`${w}--popover--drop-shadow`]:u,[`${w}--popover--border`]:c,[`${w}--popover--high-contrast`]:d,[`${w}--popover--open`]:m,[`${w}--popover--auto-align ${w}--autoalign`]:I,[`${w}--popover--${H}`]:!0,[`${w}--popover--tab-tip`]:e,[`${w}--popover--background-token__background`]:"background"===i&&!d},l),W=h.Children.map(s,t=>{const n=t,r=n?.type?.displayName,o="button"===n?.type,i=I&&r&&["ToggletipButton"].includes(r),a=I&&!["ToggletipContent","PopoverContent"].includes(r);if(h.isValidElement(n)&&(o||i||a)){const t=n?.props?.className,r=(n?.props).ref,o=v()(`${w}--popover--tab-tip__button`,t);return h.cloneElement(n,{className:e&&"button"===n?.type?o:t||"",ref:e=>{(I&&n?.type!==yt||I&&"ToggletipButton"===n?.type.displayName)&&L.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return n});return h.createElement(bt.Provider,{value:F},h.createElement(n,f({},b,{className:U,ref:z}),I||e?W:s))});vt.propTypes={align:w(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],S),alignmentAxisOffset:m().number,as:m().oneOfType([m().string,m().elementType]),autoAlign:m().bool,backgroundToken:m().oneOf(["layer","background"]),autoAlignBoundary:m().oneOfType([m().oneOf(["clippingAncestors"]),m().elementType,m().arrayOf(m().elementType),m().exact({x:m().number.isRequired,y:m().number.isRequired,width:m().number.isRequired,height:m().number.isRequired})]),caret:m().bool,border:m().bool,children:m().node,className:m().string,dropShadow:m().bool,highContrast:m().bool,isTabTip:m().bool,onRequestClose:m().func,open:m().bool.isRequired};const yt=(0,h.forwardRef)((e,t)=>{const{className:n,children:r,...o}=e,i=C(),{setFloating:a,caretRef:l,autoAlign:s}=h.useContext(bt),c=x([a,t]),u=gt("enable-v12-dynamic-floating-styles")||s;return h.createElement("span",f({},o,{className:`${i}--popover`}),h.createElement("span",{className:v()(`${i}--popover-content`,n),ref:c},r,u&&h.createElement("span",{className:v()({[`${i}--popover-caret`]:!0,[`${i}--popover--auto-align`]:!0}),ref:l})),!u&&h.createElement("span",{className:v()({[`${i}--popover-caret`]:!0}),ref:l}))});yt.displayName="PopoverContent",yt.propTypes={children:m().node,className:m().string};const wt={key:"Tab",which:9,keyCode:9,code:"Tab"},Et={key:"Enter",which:13,keyCode:13,code:"Enter"},xt={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},_t={key:" ",which:32,keyCode:32,code:"Space"},Ct={key:"End",which:35,keyCode:35,code:"Numpad1"},Ot={key:"Home",which:36,keyCode:36,code:"Numpad7"},Nt={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},Tt={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},St={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},$t=(e,t)=>{for(let n=0;n<t.length;n++)if(It(e,t[n]))return!0;return!1},It=(e,{key:t,which:n,keyCode:r,code:o})=>"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?t.includes(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===o;function At(e){const[t,n]=(0,h.useState)(e),r=(0,h.useRef)(null),o=(0,h.useCallback)((e,t=0)=>{window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout(()=>{n(e),r.current=null},t):n(e)},[]);return(0,h.useEffect)(()=>()=>{window.clearTimeout(r.current??void 0)},[]),[t,o]}const Rt=h.createContext(null);function kt(){return h.useContext(Rt)}const Pt={...h},Lt=(()=>{let e=0;return()=>++e})();let Mt=!1;const Dt=Pt.useId?function(e="id"){const t=kt();return`${t?`${t}-`:""}${e}-${Pt.useId()}`}:function(e="id"){const t=kt(),[n,r]=(0,h.useState)(()=>Mt?`${t?`${t}-`:""}${e}-${Lt()}`:null);return E(()=>{null===n&&r(`${t?`${t}-`:""}${e}-${Lt()}`)},[Lt]),(0,h.useEffect)(()=>{!1===Mt&&(Mt=!0)},[]),n},Bt=(e,t="component should have no interactive child nodes")=>{(0,h.useEffect)(()=>{},[t,e])},jt=e=>{if(!e||!e.childNodes)return null;if(Ft(e))return e;for(const t of e.childNodes)if(t instanceof HTMLElement){const e=jt(t);if(e)return e}return null},Vt=e=>{if(!e||!e.childNodes)return null;if(e.getAttribute("role")&&""!==e.getAttribute("role"))return e;for(const t of e.childNodes)if(t instanceof HTMLElement){const e=Vt(t);if(e)return e}return null},Ft=e=>{if(void 0===e.tabIndex||e.tabIndex<0)return!1;if((e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)&&e.disabled)return!1;switch(e.nodeName){case"A":return e instanceof HTMLAnchorElement&&!!e.href&&"ignore"!==e.rel;case"INPUT":return e instanceof HTMLInputElement&&"hidden"!==e.type;default:return!0}},zt=new Set(["mouseup","touchend","touchcancel"]),Ht=h.forwardRef(({as:e,align:t="top",className:n,children:r,label:o,description:i,enterDelayMs:a=100,leaveDelayMs:l=300,defaultOpen:s=!1,closeOnActivation:c=!1,dropShadow:u=!1,highContrast:d=!0,...p},m)=>{const g=(0,h.useRef)(null),[b,y]=At(s),[w,x]=(0,h.useState)(!1),[_,O]=(0,h.useState)(!1),[N,T]=(0,h.useState)(!1),S=Dt("tooltip"),$=C(),I=h.Children.only(r),{"aria-labelledby":A,"aria-describedby":R}=I?.props??{},k=!!o,P={onFocus:()=>!_&&y(!0),onBlur:()=>{y(!1),O(!1)},onClick:()=>c&&y(!1),onMouseEnter:M,onMouseLeave:D,onMouseDown:function(){O(!0),B()},onMouseMove:function(e){1===e.buttons?x(!0):x(!1)},onTouchStart:B,"aria-labelledby":A??(k?S:void 0),"aria-describedby":R??(k?void 0:S)},L=(0,h.useCallback)(e=>{b&&It(e,xt)&&(e.stopPropagation(),y(!1)),b&&c&&(It(e,Et)||It(e,_t))&&y(!1)},[c,b,y]);function M(){p?.onMouseEnter||(T(!0),y(!0,a))}function D(){T(!1),w||y(!1,l)}function B(){x(!0)}E(()=>{if(b)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){It(e,xt)&&L(e)}},[b,L]);const j=(0,h.useCallback)(()=>{x(!1),N||y(!1,l)},[N,l,y]);return Bt(g,"The Tooltip component must have no interactive content rendered by the`label` or `description` prop"),(0,h.useEffect)(()=>(w&&zt.forEach(e=>{document.addEventListener(e,j)}),()=>{zt.forEach(e=>{document.removeEventListener(e,j)})}),[w,j]),h.createElement(vt,f({as:e,ref:m},p,{align:t,className:v()(`${$}--tooltip`,n),dropShadow:u,highContrast:d,onKeyDown:L,onMouseLeave:D,open:b}),h.createElement("div",{className:`${$}--tooltip-trigger__wrapper`},void 0!==I?h.cloneElement(I,{...P,...function(e){const t=Object.keys(P).filter(e=>e.startsWith("on")),n={};return t.forEach(t=>{n[t]=n=>{P[t](n),e?.[t]&&e?.[t](n)}}),n}(I.props)}):null),h.createElement(yt,{"aria-hidden":b?"false":"true",className:`${$}--tooltip-content`,id:S,onMouseEnter:M,role:"tooltip"},o||i))});Ht.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,description:m().node,dropShadow:m().bool,enterDelayMs:m().number,highContrast:m().bool,label:m().node,leaveDelayMs:m().number};const Ut=h.forwardRef(function({as:e,children:t,className:n,dangerDescription:r="danger",disabled:o=!1,hasIconOnly:i=!1,href:a,iconDescription:l,isExpressive:s=!1,isSelected:c,kind:u="primary",onBlur:d,onClick:f,onFocus:p,onMouseEnter:m,onMouseLeave:g,renderIcon:b,size:y,tabIndex:w,type:E="button",...x},_){const O=C(),N={tabIndex:w,className:v()(n,{[`${O}--btn`]:!0,[`${O}--btn--xs`]:"xs"===y&&!s,[`${O}--btn--sm`]:"sm"===y&&!s,[`${O}--btn--md`]:"md"===y&&!s,[`${O}--btn--lg`]:"lg"===y&&!s,[`${O}--btn--xl`]:"xl"===y,[`${O}--btn--2xl`]:"2xl"===y,[`${O}--layout--size-${y}`]:y,[`${O}--btn--${u}`]:u,[`${O}--btn--disabled`]:o,[`${O}--btn--expressive`]:s,[`${O}--btn--icon-only`]:i,[`${O}--btn--selected`]:i&&c&&"ghost"===u}),ref:_},T=b?h.createElement(b,{"aria-label":l,className:`${O}--btn__icon`,"aria-hidden":"true"}):null,S=["danger","danger--tertiary","danger--ghost"];let $="button";const I=Dt("danger-description"),{"aria-pressed":A,"aria-describedby":R}=x;let k={disabled:o,type:E,"aria-describedby":S.includes(u)?I:R||void 0,"aria-pressed":A??(i&&"ghost"===u?c:void 0)};const P={href:a};let L=null;return S.includes(u)&&(L=h.createElement("span",{id:I,className:`${O}--visually-hidden`},r)),e?($=e,k={...k,...P}):a&&!o&&($="a",k=P),h.createElement($,{onMouseEnter:m,onMouseLeave:g,onFocus:p,onBlur:d,onClick:f,...x,...N,...k},L,t,T)}),Wt=(0,h.forwardRef)((e,t)=>{const{className:n,count:r,...o}=e,i=C(),a=v()(`${i}--badge-indicator`,n,{[`${i}--badge-indicator--count`]:r}),l=r&&r>999?"999+":r;return h.createElement("div",f({className:a,ref:t},o),l)});Wt.propTypes={className:m().string,count:m().number,id:m().string};const qt=["primary","secondary","ghost","tertiary"],Kt=(0,h.forwardRef)(({align:e,autoAlign:t=!1,badgeCount:n,children:r,className:o,closeOnActivation:i=!0,defaultOpen:a=!1,disabled:l,dropShadow:s=!1,enterDelayMs:c=100,highContrast:u=!0,kind:d,label:p,leaveDelayMs:m=100,wrapperClasses:g,size:b,isSelected:y,...w},E)=>{const x=C(),_=v()(g,`${x}--icon-tooltip`,{[`${x}--icon-tooltip--disabled`]:l});!n||"ghost"===d&&"lg"===b||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const O=Dt("badge-indicator");return h.createElement(Ht,{align:e,autoAlign:t,closeOnActivation:i,className:_,defaultOpen:a,dropShadow:s,enterDelayMs:c,highContrast:u,label:p,leaveDelayMs:m},h.createElement(Ut,f({},w,{disabled:l,kind:d,ref:E,size:b,isSelected:y,hasIconOnly:!0,className:o,"aria-describedby":w["aria-describedby"]||n&&O}),r,!l&&void 0!==n&&h.createElement(Wt,{id:O,count:n>0?n:void 0})))});Kt.propTypes={align:w(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],S),autoAlign:m().bool,badgeCount:m().number,href:m().string,children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,dropShadow:m().bool,disabled:m().bool,enterDelayMs:m().number,isSelected:m().bool,highContrast:m().bool,kind:m().oneOf(qt),label:m().node.isRequired,leaveDelayMs:m().number,rel:m().string,size:m().oneOf(["sm","md","lg"]),target:m().string,wrapperClasses:m().string};const Gt=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],Zt=h.forwardRef((e,t)=>{const{as:n,autoAlign:r=!1,children:o,hasIconOnly:i=!1,tooltipHighContrast:a=!0,tooltipDropShadow:l=!1,iconDescription:s,kind:c="primary",onBlur:u,onClick:d,onFocus:p,onMouseEnter:m,onMouseLeave:g,renderIcon:b,size:v,tooltipAlignment:y="center",tooltipPosition:w="top",...E}=e;!b||o||s||console.error("Button: renderIcon property specified without also providing an iconDescription property. This may impact accessibility for screen reader users.");const x=b?h.createElement(b,null):null;if(function(e){return!0===e}(i)){let e;return"top"!==w&&"bottom"!==w||("center"===y&&(e=w),"end"===y&&(e=`${w}-end`),"start"===y&&(e=`${w}-start`)),"right"!==w&&"left"!==w||(e=w),h.createElement(Kt,f({},E,{ref:t,as:n,align:e,label:s,kind:c,size:v,highContrast:a,dropShadow:l,onMouseEnter:m,onMouseLeave:g,onFocus:p,onBlur:u,autoAlign:r,onClick:d,renderIcon:x?null:b}),x??o)}{const{tooltipAlignment:n,...r}=e;return h.createElement(Ut,f({ref:t},r))}});Zt.displayName="Button",Zt.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),autoAlign:m().bool,children:m().node,className:m().string,dangerDescription:m().string,disabled:m().bool,hasIconOnly:m().bool,href:m().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:m().bool,isSelected:m().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,o=r?qt:Gt;return void 0===e[t]||o.includes(e[t])?null:new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Expected one of ${o.join(", ")}.`)},onBlur:m().func,onClick:m().func,onFocus:m().func,onMouseEnter:m().func,onMouseLeave:m().func,rel:m().string,renderIcon:m().oneOfType([m().func,m().object]),role:m().string,size:m().oneOf(["xs","sm","md","lg","xl","2xl"]),tabIndex:m().number,target:m().string,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipDropShadow:m().bool,tooltipHighContrast:m().bool,tooltipPosition:m().oneOf(["top","right","bottom","left"]),type:m().oneOf(["button","reset","submit"])};const Jt=(0,h.createContext)({direction:"auto",getTextDirection:{current:void 0}}),Yt=(0,h.forwardRef)(({as:e,children:t,dir:n="auto",...r},o)=>{const i=(0,h.useContext)(Jt),a={},l=e??"span",s={...i};if(i){const{direction:e,getTextDirection:r}=i;if(r&&r.current){const n=Xt(t),o=r.current(n);e!==o?(a.dir=o,s.direction=o):"auto"===e&&(a.dir=o)}else e!==n?(a.dir=n,s.direction=n):"auto"===e&&(a.dir=n)}else a.dir=n,s.direction=n;return h.createElement(Jt.Provider,{value:s},h.createElement(l,f({ref:o},r,a),t))});Yt.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,dir:m().oneOf(["ltr","rtl","auto"])};const Xt=e=>{if("string"==typeof e)return e;const t=h.Children.map(e,e=>"string"==typeof e?e:null)?.filter(e=>null!==e);return 1===t?.length?t[0]:t};var Qt,en,tn,nn,rn,on,an,ln,sn,cn,un,dn=n(428);const fn=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Qt||(Qt=h.createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),en||(en=h.createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),tn||(tn=h.createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),e)}),pn=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},nn||(nn=h.createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),rn||(rn=h.createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},on||(on=h.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),an||(an=h.createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},ln||(ln=h.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),sn||(sn=h.createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},cn||(cn=h.createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),un||(un=h.createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),e)}),mn=()=>{};m().elementType,m().node,m().string;const hn=h.createContext(void 0);function gn(){return(0,h.useContext)(hn)}function bn({align:e,as:t,autoAlign:n,className:r,children:o,defaultOpen:i=!1,...a}){const l=(0,h.useRef)(null),[s,c]=(0,h.useState)(i),u=C(),d=Dt(),p=v()(`${u}--toggletip`,r,{[`${u}--toggletip--open`]:s,[`${u}--autoalign`]:n}),m={toggle:()=>{c(!s)},close:()=>{c(!1)}},g={buttonProps:{"aria-expanded":s,"aria-controls":d,"aria-describedby":s?d:void 0,onClick:m.toggle},contentProps:{id:d},onClick:{onClick:m.toggle}};return N("blur",()=>{s&&m.close()}),(0,h.useEffect)(()=>{if(!l.current)return;const e=l.current.ownerDocument||document,t="PointerEvent"in window?"pointerdown":"mousedown",n=e=>{const t=e.target;s&&t&&!l.current?.contains(t)&&c(!1)},r={capture:!0};return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}},[s]),h.createElement(hn.Provider,{value:g},h.createElement(vt,f({align:e,as:t,caret:!0,className:p,dropShadow:!1,highContrast:!0,open:s,onKeyDown:e=>{if(s&&It(e,xt)){e.stopPropagation(),m.close();const t=l.current?.children[0];t instanceof HTMLButtonElement&&t.focus()}},onBlur:e=>{s&&null===e.relatedTarget||e.currentTarget.contains(e.relatedTarget)||m.close()},ref:l,autoAlign:n},a),o))}const{open:vn,...yn}=vt.propTypes??{};bn.propTypes={...yn,defaultOpen:m().bool};const wn=(0,h.forwardRef)(function({children:e,className:t,label:n="Show information",as:r,...o},i){const a=gn(),l=C(),s=v()(`${l}--toggletip-button`,t),c=r??"button";return"button"!==c?h.createElement(c,f({},a?.onClick,{className:s},o),e):h.createElement("button",f({},a?.buttonProps,{"aria-label":n,type:"button",className:s,ref:i},o),e)});wn.propTypes={children:m().node,className:m().string,label:m().string},wn.displayName="ToggletipButton";const En=(0,h.forwardRef)((e,t)=>{const{children:n,className:r}=e,o=gn(),i=C();return h.createElement(yt,f({className:r},o?.contentProps,{ref:t}),h.createElement("div",{className:`${i}--toggletip-content`},n))});function xn({children:e,className:t}){const n=C(),r=v()(`${n}--toggletip-actions`,t);return h.createElement("div",{className:r},e)}var _n;En.propTypes={children:m().node,className:m().string},En.displayName="ToggletipContent",xn.propTypes={children:m().node,className:m().string};const Cn=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},_n||(_n=h.createElement("path",{d:"M20,10H7.8149l3.5874-3.5859L10,5,4,11,10,17l1.4023-1.4146L7.8179,12H20a6,6,0,0,1,0,12H12v2h8a8,8,0,0,0,0-16Z"})),e)});var On;const Nn=h.forwardRef(function({className:e,children:t},n){const r=C(),o=v()(e,{[`${r}--ai-label-content`]:!0,[`${r}--ai-label-content--with-actions`]:!1});return h.createElement(En,{className:o},t)});Nn.displayName="AILabelContent",Nn.propTypes={children:m().node,className:m().string};const Tn=h.forwardRef(function({className:e,children:t},n){const r=C(),o=v()(e,{[`${r}--ai-label-actions`]:!0});return h.createElement(xn,{className:o},t)});Tn.displayName="AILabelActions",Tn.propTypes={children:m().node,className:m().string};const Sn=h.forwardRef(function({aiText:e="AI",aiTextLabel:t,textLabel:n,align:r,autoAlign:o=!0,children:i,className:a,kind:l="default",onRevertClick:s,revertActive:c,revertLabel:u="Revert to AI input",slugLabel:d="Show information","aria-label":p="Show information",size:m="xs",...g},b){const y=C(),w=Dt("AILabel"),E=v()(a,{[`${y}--ai-label`]:!0,[`${y}--ai-label--revert`]:c}),x=v()({[`${y}--ai-label__button`]:!0,[`${y}--ai-label__button--${m}`]:m,[`${y}--ai-label__button--${l}`]:l,[`${y}--ai-label__button--inline-with-content`]:"inline"===l&&(t||n)}),_=t||n?`${e} ${t||n}`:`${e} ${d||p}`,O=["xs","2xs","mini"].includes(m);return h.createElement("div",{className:E,ref:b,id:w},c?h.createElement(Kt,f({onClick:e=>{s&&s(e)},kind:"ghost",size:"sm",label:u},g),On||(On=h.createElement(Cn,null))):h.createElement(bn,f({align:r,autoAlign:o,alignmentAxisOffset:O?-24:0},g),h.createElement(wn,{className:x,label:"inline"===l?"":_},h.createElement("span",{className:`${y}--ai-label__text`},e),"inline"===l&&(t||n)&&h.createElement("span",{className:`${y}--ai-label__additional-text`},t||n)),i))});Sn.displayName="AILabel",Sn.propTypes={...bn.propTypes,AILabelContent:m().node,aiText:m().string,aiTextLabel:mt(m().string),"aria-label":m().string,kind:m().oneOf(["default","inline"]),onRevertClick:m().func,revertActive:m().bool,revertLabel:m().string,size:m().oneOf(["mini","2xs","xs","sm","md","lg","xl"]),slugLabel:mt(m().string),textLabel:m().string};const $n=(e,t)=>(0,h.isValidElement)(e)&&e.type===t,In=h.forwardRef(({className:e,decorator:t,helperText:n,id:r,labelText:o,onChange:i=mn,onClick:a,indeterminate:l=!1,invalid:s,invalidText:c,hideLabel:u,readOnly:d,title:p="",warn:m,warnText:g,slug:b,...y},w)=>{const E=C(),x=!d&&!s&&m,_=!s&&!m,O=Dt(),N=null!=n,T=N?`checkbox-helper-text-${O}`:void 0,S=N&&h.createElement("div",{id:T,className:`${E}--form__helper-text`},n),$=v()(`${E}--form-item`,`${E}--checkbox-wrapper`,e,{[`${E}--checkbox-wrapper--readonly`]:d,[`${E}--checkbox-wrapper--invalid`]:!d&&s,[`${E}--checkbox-wrapper--warning`]:x,[`${E}--checkbox-wrapper--slug`]:b,[`${E}--checkbox-wrapper--decorator`]:t}),I=v()(`${E}--checkbox-label-text`,{[`${E}--visually-hidden`]:u}),A=b??t,R=$n(A,Sn)?(0,h.cloneElement)(A,{size:"inline"===A.props.kind?"md":"mini"}):A;return h.createElement("div",{className:$},h.createElement("input",f({},y,{type:"checkbox","data-invalid":!!s||void 0,onChange:e=>{!d&&i&&i(e,{checked:e.target.checked,id:r})},className:`${E}--checkbox`,id:r,ref:e=>{e&&(e.indeterminate=l??!1),"function"==typeof w?w(e):w&&"current"in w&&(w.current=e)},"aria-readonly":d,onClick:e=>{d&&e.preventDefault(),a&&a(e)}})),h.createElement("label",{htmlFor:r,className:`${E}--checkbox-label`,title:p},h.createElement(Yt,{as:"div",className:I},o,b?R:t?h.createElement("div",{className:`${E}--checkbox-wrapper-inner--decorator`},R):"")),h.createElement("div",{className:`${E}--checkbox__validation-msg`},!d&&s&&h.createElement(h.Fragment,null,h.createElement(pn,{className:`${E}--checkbox__invalid-icon`}),h.createElement("div",{className:`${E}--form-requirement`},c)),x&&h.createElement(h.Fragment,null,h.createElement(fn,{className:`${E}--checkbox__invalid-icon ${E}--checkbox__invalid-icon--warning`}),h.createElement("div",{className:`${E}--form-requirement`},g))),_&&S)});function An(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}In.propTypes={checked:m().bool,className:m().string,decorator:m().node,defaultChecked:m().bool,disabled:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,indeterminate:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,onChange:m().func,readOnly:m().bool,slug:mt(m().node),title:m().string,warn:m().bool,warnText:m().node},In.displayName="Checkbox";var Rn=n(8168);n(4353);const kn=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Pn=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Ln=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Pn(n.overflowY,t)||Pn(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Mn=(e,t,n,r,o,i,a,l)=>i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0,Dn=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t};var Bn=n(1635),jn=0;function Vn(){}function Fn(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function zn(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout(function(){n=null,e.apply(void 0,i)},t)}return o.cancel=r,o}function Hn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault})}}function Un(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}function Wn(e,t){return e&&t?Object.keys(e).reduce(function(n,r){return n[r]=qn(t,r)?t[r]:e[r],n},{}):e}function qn(e,t){return void 0!==e[t]}function Kn(e,t,n,r,o){void 0===o&&(o=!1);var i=n.length;if(0===i)return-1;var a=i-1;("number"!=typeof e||e<0||e>a)&&(e=t>0?-1:a+1);var l=e+t;l<0?l=o?a:0:l>a&&(l=o?0:a);var s=Gn(l,t<0,n,r,o);return-1===s?e>=i?-1:e:s}function Gn(e,t,n,r,o){void 0===o&&(o=!1);var i=n.length;if(t){for(var a=e;a>=0;a--)if(!r(n[a],a))return a}else for(var l=e;l<i;l++)if(!r(n[l],l))return l;return o?Gn(t?i-1:0,t,n,r):-1}function Zn(e,t,n,r){return void 0===r&&(r=!0),n&&t.some(function(t){return t&&(Fn(t,e,n)||r&&Fn(t,n.document.activeElement,n))})}var Jn=zn(function(e){Yn(e).textContent=""},500);function Yn(e){var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var Xn={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var Qn=zn(function(e,t){!function(e,t){e&&t&&(Yn(t).textContent=e,Jn(t))}(e,t)},200),er="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?h.useLayoutEffect:h.useEffect,tr="useId"in h?function(e){var t=e.id,n=e.labelId,r=e.menuId,o=e.getItemId,i=e.toggleButtonId,a=e.inputId,l="downshift-"+h.useId();t||(t=l);var s=(0,h.useRef)({labelId:n||t+"-label",menuId:r||t+"-menu",getItemId:o||function(e){return t+"-item-"+e},toggleButtonId:i||t+"-toggle-button",inputId:a||t+"-input"});return s.current}:function(e){var t=e.id,n=void 0===t?"downshift-"+String(jn++):t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,l=e.inputId,s=(0,h.useRef)({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(e){return n+"-item-"+e},toggleButtonId:a||n+"-toggle-button",inputId:l||n+"-input"});return s.current};function nr(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function rr(e){var t=(0,h.useRef)(e);return t.current=e,t}function or(e,t,n,r){var o=(0,h.useRef)(),i=(0,h.useRef)(),a=(0,h.useCallback)(function(t,n){i.current=n,t=Wn(t,n.props);var r=e(t,n);return n.props.stateReducer(t,(0,Rn.A)({},n,{changes:r}))},[e]),l=(0,h.useReducer)(a,t,n),s=l[0],c=l[1],u=rr(t),d=(0,h.useCallback)(function(e){return c((0,Rn.A)({props:u.current},e))},[u]),f=i.current;return(0,h.useEffect)(function(){var e=Wn(o.current,null==f?void 0:f.props);f&&o.current&&!r(e,s)&&function(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(r){!function(e,t,n,r){var o=t.props,i=t.type,a="on"+nr(e)+"Change";o[a]&&void 0!==r[e]&&r[e]!==n[e]&&o[a]((0,Rn.A)({type:i},r))}(r,e,t,n),n[r]!==t[r]&&(i[r]=n[r])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange((0,Rn.A)({type:o},i))}(f,e,s),o.current=s},[s,f,r]),[s,d]}var ir={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:function(e,t){return t.changes},scrollIntoView:function(e,t){if(e){var n=((e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:l,inline:s,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!kn(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let m=e;for(;kn(m)&&d(m);){if(m=Dn(m),m===f){p.push(m);break}null!=m&&m===document.body&&Ln(m)&&!Ln(document.documentElement)||null!=m&&Ln(m,u)&&p.push(m)}const h=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:b,scrollY:v}=window,{height:y,width:w,top:E,right:x,bottom:_,left:C}=e.getBoundingClientRect(),{top:O,right:N,bottom:T,left:S}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let $="start"===l||"nearest"===l?E-O:"end"===l?_+T:E+y/2-O+T,I="center"===s?C+w/2-S+N:"end"===s?x+N:C-S;const A=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:c,left:u}=t.getBoundingClientRect();if("if-needed"===a&&E>=0&&C>=0&&_<=g&&x<=h&&(t===f&&!Ln(t)||E>=o&&_<=c&&C>=u&&x<=i))return A;const d=getComputedStyle(t),m=parseInt(d.borderLeftWidth,10),O=parseInt(d.borderTopWidth,10),N=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10);let S=0,R=0;const k="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-N:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-O-T:0,L="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,M="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)S="start"===l?$:"end"===l?$-g:"nearest"===l?Mn(v,v+g,g,O,T,v+$,v+$+y,y):$-g/2,R="start"===s?I:"center"===s?I-h/2:"end"===s?I-h:Mn(b,b+h,h,m,N,b+I,b+I+w,w),S=Math.max(0,S+v),R=Math.max(0,R+b);else{S="start"===l?$-o-O:"end"===l?$-c+T+P:"nearest"===l?Mn(o,c,n,O,T+P,$,$+y,y):$-(o+n/2)+P/2,R="start"===s?I-u-m:"center"===s?I-(u+r/2)+k/2:"end"===s?I-i+N+k:Mn(u,i,r,m,N+k,I,I+w,w);const{scrollLeft:e,scrollTop:a}=t;S=0===M?0:Math.max(0,Math.min(a+S/M,t.scrollHeight-n/M+P)),R=0===L?0:Math.max(0,Math.min(e+R/L,t.scrollWidth-r/L+k)),$+=a-S,I+=e-R}A.push({el:t,top:S,left:R})}return A})(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r})}},environment:"undefined"==typeof window?void 0:window};function ar(e,t,n){void 0===n&&(n=Xn);var r=e["default"+nr(t)];return void 0!==r?r:n[t]}function lr(e,t,n){void 0===n&&(n=Xn);var r=e[t];if(void 0!==r)return r;var o=e["initial"+nr(t)];return void 0!==o?o:ar(e,t,n)}function sr(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=e.isItemDisabled,l=e.itemToKey,s=t.selectedItem,c=t.highlightedIndex;return 0===r.length?-1:void 0===o||c!==o||a(r[o],o)?void 0===i||a(r[i],i)?s?r.findIndex(function(e){return l(s)===l(e)}):n<0&&!a(r[r.length-1],r.length-1)?r.length-1:n>0&&!a(r[0],0)?0:-1:i:o}var cr=Vn;function ur(e,t,n){var r;void 0===n&&(n=!0);var o=(null==(r=e.items)?void 0:r.length)&&t>=0;return(0,Rn.A)({isOpen:!1,highlightedIndex:-1},o&&(0,Rn.A)({selectedItem:e.items[t],isOpen:ar(e,"isOpen"),highlightedIndex:ar(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function dr(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function fr(){var e=h.useRef(!0);return h.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function pr(e){var t=ar(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var mr={environment:m().shape({addEventListener:m().func.isRequired,removeEventListener:m().func.isRequired,document:m().shape({createElement:m().func.isRequired,getElementById:m().func.isRequired,activeElement:m().any.isRequired,body:m().any.isRequired}).isRequired,Node:m().func.isRequired}),itemToString:m().func,itemToKey:m().func,stateReducer:m().func},hr=(0,Rn.A)({},mr,{getA11yStatusMessage:m().func,highlightedIndex:m().number,defaultHighlightedIndex:m().number,initialHighlightedIndex:m().number,isOpen:m().bool,defaultIsOpen:m().bool,initialIsOpen:m().bool,selectedItem:m().any,initialSelectedItem:m().any,defaultSelectedItem:m().any,id:m().string,labelId:m().string,menuId:m().string,getItemId:m().func,toggleButtonId:m().string,onSelectedItemChange:m().func,onHighlightedIndexChange:m().func,onStateChange:m().func,onIsOpenChange:m().func,scrollIntoView:m().func});(0,Bn.__assign)((0,Bn.__assign)({},hr),{items:m().array.isRequired,isItemDisabled:m().func}),(0,Bn.__assign)((0,Bn.__assign)({},ir),{isItemDisabled:function(){return!1}});var gr=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:22,FunctionCloseMenu:17,FunctionOpenMenu:16,FunctionReset:21,FunctionSelectItem:19,FunctionSetHighlightedIndex:18,FunctionSetInputValue:20,FunctionToggleMenu:15,InputBlur:9,InputChange:8,InputClick:10,InputKeyDownArrowDown:0,InputKeyDownArrowUp:1,InputKeyDownEnd:4,InputKeyDownEnter:7,InputKeyDownEscape:2,InputKeyDownHome:3,InputKeyDownPageDown:6,InputKeyDownPageUp:5,ItemClick:13,ItemMouseMove:12,MenuMouseLeave:11,ToggleButtonClick:14});function br(e){var t=function(e){var t=lr(e,"selectedItem"),n=lr(e,"isOpen"),r=function(e){var t=lr(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}(e),o=lr(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):r,isOpen:n,selectedItem:t,inputValue:o}}(e),n=t.selectedItem,r=t.inputValue;return""===r&&n&&void 0===e.defaultInputValue&&void 0===e.initialInputValue&&void 0===e.inputValue&&(r=e.itemToString(n)),(0,Rn.A)({},t,{inputValue:r})}(0,Rn.A)({},hr,{items:m().array.isRequired,isItemDisabled:m().func,inputValue:m().string,defaultInputValue:m().string,initialInputValue:m().string,inputId:m().string,onInputValueChange:m().func});var vr=Vn,yr=(0,Rn.A)({},ir,{isItemDisabled:function(){return!1}});function wr(e,t){var n,r,o=t.type,i=t.props,a=t.altKey;switch(o){case 13:r={isOpen:ar(i,"isOpen"),highlightedIndex:pr(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case 0:r=e.isOpen?{highlightedIndex:Kn(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:{highlightedIndex:a&&null==e.selectedItem?-1:sr(i,e,1),isOpen:i.items.length>=0};break;case 1:r=e.isOpen?a?ur(i,e.highlightedIndex):{highlightedIndex:Kn(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:{highlightedIndex:sr(i,e,-1),isOpen:i.items.length>=0};break;case 7:r=ur(i,e.highlightedIndex);break;case 2:r=(0,Rn.A)({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case 5:r={highlightedIndex:Kn(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case 6:r={highlightedIndex:Kn(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case 3:r={highlightedIndex:Gn(0,!1,i.items,i.isItemDisabled)};break;case 4:r={highlightedIndex:Gn(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case 9:r=(0,Rn.A)({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&(null==(n=i.items)?void 0:n.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case 8:r={isOpen:!0,highlightedIndex:pr(i),inputValue:t.inputValue};break;case 10:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:sr(i,e,0)};break;case 19:r={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case 22:r={inputValue:t.inputValue};break;default:return function(e,t,n){var r,o=t.type,i=t.props;switch(o){case n.ItemMouseMove:r={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:r={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:sr(i,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:sr(i,e,0)};break;case n.FunctionCloseMenu:r={isOpen:!1};break;case n.FunctionSetHighlightedIndex:r={highlightedIndex:i.isItemDisabled(i.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case n.FunctionSetInputValue:r={inputValue:t.inputValue};break;case n.FunctionReset:r={highlightedIndex:pr(i),isOpen:ar(i,"isOpen"),selectedItem:ar(i,"selectedItem"),inputValue:ar(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return(0,Rn.A)({},e,r)}(e,t,gr)}return(0,Rn.A)({},e,r)}var Er,xr,_r,Cr,Or,Nr,Tr,Sr,$r,Ir,Ar,Rr,kr,Pr,Lr,Mr,Dr,Br,jr,Vr,Fr,zr,Hr,Ur,Wr,qr=["onMouseLeave","refKey","ref"],Kr=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Gr=["onClick","onPress","refKey","ref"],Zr=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];function Jr(e){void 0===e&&(e={}),vr(e,Jr);var t=(0,Rn.A)({},yr,e),n=t.items,r=t.scrollIntoView,o=t.environment,i=t.getA11yStatusMessage,a=function(e,t,n,r){var o=(0,h.useRef)(),i=or(e,t,n,r),a=i[0],l=i[1],s=fr();return(0,h.useEffect)(function(){qn(t,"selectedItem")&&(s||t.itemToKey(t.selectedItem)!==t.itemToKey(o.current)&&l({type:22,inputValue:t.itemToString(t.selectedItem)}),o.current=a.selectedItem===o.current?t.selectedItem:a.selectedItem)},[a.selectedItem,t.selectedItem]),[Wn(a,t),l]}(wr,t,br,dr),l=a[0],s=a[1],c=l.isOpen,u=l.highlightedIndex,d=l.selectedItem,f=l.inputValue,p=(0,h.useRef)(null),m=(0,h.useRef)({}),g=(0,h.useRef)(null),b=(0,h.useRef)(null),v=fr(),y=tr(t),w=(0,h.useRef)(),E=rr({state:l,props:t}),x=(0,h.useCallback)(function(e){return m.current[y.getItemId(e)]},[y]);!function(e,t,n,r){void 0===r&&(r={});var o=r.document,i=fr();(0,h.useEffect)(function(){if(e&&!i&&o){var n=e(t);Qn(n,o)}},n),(0,h.useEffect)(function(){return function(){var e,t;Qn.cancel(),(t=null==(e=o)?void 0:e.getElementById("a11y-status-message"))&&t.remove()}},[o])}(i,l,[c,u,d,f],o);var _=function(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,l=(0,h.useRef)(!0);return er(function(){t<0||!n||!Object.keys(r.current).length||(!1===l.current?l.current=!0:a(o(t),i))},[t]),l}({menuElement:p.current,highlightedIndex:u,isOpen:c,itemRefs:m,scrollIntoView:r,getItemNodeFromIndex:x});cr({props:t,state:l}),(0,h.useEffect)(function(){lr(t,"isOpen")&&g.current&&g.current.focus()},[]),(0,h.useEffect)(function(){v||(w.current=n.length)});var C=function(e,t,n){var r=(0,h.useRef)({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1});return(0,h.useEffect)(function(){if(!e)return Vn;var o=n.map(function(e){return e.current});function i(){r.current.isTouchEnd=!1,r.current.isMouseDown=!0}function a(n){r.current.isMouseDown=!1,Zn(n.target,o,e)||t()}function l(){r.current.isTouchEnd=!1,r.current.isTouchMove=!1}function s(){r.current.isTouchMove=!0}function c(n){r.current.isTouchEnd=!0,r.current.isTouchMove||Zn(n.target,o,e,!1)||t()}return e.addEventListener("mousedown",i),e.addEventListener("mouseup",a),e.addEventListener("touchstart",l),e.addEventListener("touchmove",s),e.addEventListener("touchend",c),function(){e.removeEventListener("mousedown",i),e.removeEventListener("mouseup",a),e.removeEventListener("touchstart",l),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",c)}},[n,e,t]),r.current}(o,(0,h.useCallback)(function(){E.current.state.isOpen&&s({type:9,selectItem:!1})},[s,E]),(0,h.useMemo)(function(){return[p,b,g]},[p.current,b.current,g.current])),O=Vn;(0,h.useEffect)(function(){c||(m.current={})},[c]),(0,h.useEffect)(function(){var e;c&&null!=o&&o.document&&null!=g&&null!=(e=g.current)&&e.focus&&o.document.activeElement!==g.current&&g.current.focus()},[c,o]);var N=(0,h.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),s({type:0,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),s({type:1,altKey:e.altKey})},Home:function(e){E.current.state.isOpen&&(e.preventDefault(),s({type:3}))},End:function(e){E.current.state.isOpen&&(e.preventDefault(),s({type:4}))},Escape:function(e){var t=E.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),s({type:2}))},Enter:function(e){E.current.state.isOpen&&229!==e.which&&(e.preventDefault(),s({type:7}))},PageUp:function(e){E.current.state.isOpen&&(e.preventDefault(),s({type:5}))},PageDown:function(e){E.current.state.isOpen&&(e.preventDefault(),s({type:6}))}}},[s,E]),T=(0,h.useCallback)(function(e){return(0,Rn.A)({id:y.labelId,htmlFor:y.inputId},e)},[y]),S=(0,h.useCallback)(function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,i=r.refKey,a=void 0===i?"ref":i,l=r.ref,c=An(r,qr),u=(void 0===t?{}:t).suppressRefError;return O("getMenuProps",void 0!==u&&u,a,p),(0,Rn.A)(((n={})[a]=Un(l,function(e){p.current=e}),n.id=y.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?void 0:""+y.labelId,n.onMouseLeave=Hn(o,function(){s({type:11})}),n),c)},[s,O,y]),$=(0,h.useCallback)(function(e){var t,n,r=void 0===e?{}:e,o=r.item,i=r.index,a=r.refKey,l=void 0===a?"ref":a,c=r.ref,u=r.onMouseMove,d=r.onMouseDown,f=r.onClick;r.onPress;var p=r.disabled,h=An(r,Kr);void 0!==p&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var g=E.current,b=g.props,v=g.state,w=function(e,t,n,r){var o,i;if(void 0===e){if(void 0===t)throw new Error(r);o=n[t],i=t}else i=void 0===t?n.indexOf(e):t,o=e;return[o,i]}(o,i,b.items,"Pass either item or index to getItemProps!"),x=w[0],O=w[1],N=b.isItemDisabled(x,O),T=f;return(0,Rn.A)(((t={})[l]=Un(c,function(e){e&&(m.current[y.getItemId(O)]=e)}),t["aria-disabled"]=N,t["aria-selected"]=O===v.highlightedIndex,t.id=y.getItemId(O),t.role="option",t),!N&&((n={}).onClick=Hn(T,function(){s({type:13,index:O})}),n),{onMouseMove:Hn(u,function(){C.isTouchEnd||O===v.highlightedIndex||(_.current=!1,s({type:12,index:O,disabled:N}))}),onMouseDown:Hn(d,function(e){return e.preventDefault()})},h)},[s,y,E,C,_]),I=(0,h.useCallback)(function(e){var t,n=void 0===e?{}:e,r=n.onClick;n.onPress;var o=n.refKey,i=void 0===o?"ref":o,a=n.ref,l=An(n,Gr),c=E.current.state;return(0,Rn.A)(((t={})[i]=Un(a,function(e){b.current=e}),t["aria-controls"]=y.menuId,t["aria-expanded"]=c.isOpen,t.id=y.toggleButtonId,t.tabIndex=-1,t),!l.disabled&&(0,Rn.A)({},{onClick:Hn(r,function(){s({type:14})})}),l)},[s,E,y]),A=(0,h.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onKeyDown,a=r.onChange,l=r.onInput,c=r.onBlur;r.onChangeText;var u=r.onClick,d=r.refKey,f=void 0===d?"ref":d,p=r.ref,m=An(r,Zr),h=(void 0===t?{}:t).suppressRefError;O("getInputProps",void 0!==h&&h,f,g);var b,v=E.current.state,w={};return m.disabled||((b={}).onChange=Hn(a,l,function(e){s({type:8,inputValue:e.target.value})}),b.onKeyDown=Hn(i,function(e){var t=function(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}(e);t&&N[t]&&N[t](e)}),b.onBlur=Hn(c,function(e){if(null!=o&&o.document&&v.isOpen&&!C.isMouseDown){var t=null===e.relatedTarget&&o.document.activeElement!==o.document.body;s({type:9,selectItem:!t})}}),b.onClick=Hn(u,function(){s({type:10})}),w=b),(0,Rn.A)(((n={})[f]=Un(p,function(e){g.current=e}),n["aria-activedescendant"]=v.isOpen&&v.highlightedIndex>-1?y.getItemId(v.highlightedIndex):"",n["aria-autocomplete"]="list",n["aria-controls"]=y.menuId,n["aria-expanded"]=v.isOpen,n["aria-labelledby"]=m&&m["aria-label"]?void 0:y.labelId,n.autoComplete="off",n.id=y.inputId,n.role="combobox",n.value=v.inputValue,n),w,m)},[s,y,o,N,E,C,O]),R=(0,h.useCallback)(function(){s({type:15})},[s]),k=(0,h.useCallback)(function(){s({type:17})},[s]),P=(0,h.useCallback)(function(){s({type:16})},[s]),L=(0,h.useCallback)(function(e){s({type:18,highlightedIndex:e})},[s]),M=(0,h.useCallback)(function(e){s({type:19,selectedItem:e})},[s]);return{getItemProps:$,getLabelProps:T,getMenuProps:S,getInputProps:A,getToggleButtonProps:I,toggleMenu:R,openMenu:P,closeMenu:k,setHighlightedIndex:L,setInputValue:(0,h.useCallback)(function(e){s({type:20,inputValue:e})},[s]),selectItem:M,reset:(0,h.useCallback)(function(){s({type:21})},[s]),highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:f}}Jr.stateChangeTypes=gr,m().array,m().array,m().array,m().func,m().number,m().number,m().number,m().func,m().func,m().string,m().string;const Yr=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Er||(Er=h.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"})),e)}),Xr=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},xr||(xr=h.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z"})),_r||(_r=h.createElement("path",{fill:"none",d:"M14,21.5,9,16.5427,10.5908,15,14,18.3456,21.4087,11l1.5918,1.5772Z","data-icon-path":"inner-path"})),e)}),Qr=h.forwardRef(function({children:e,size:t=16,...n},r){return 20===t||"20"===t||"20px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Cr||(Cr=h.createElement("path",{d:"M8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"})),Or||(Or=h.createElement("path",{d:"M15.6 5.6 8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"})),e):24===t||"24"===t||"24px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Nr||(Nr=h.createElement("path",{d:"M10 15.9 4.7 10.6 3.6 11.6 8.9 16.9 10 18 20.6 7.4 19.5 6.3z"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Tr||(Tr=h.createElement("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),e)}),eo=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Sr||(Sr=h.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),$r||($r=h.createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Ir||(Ir=h.createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),Ar||(Ar=h.createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Rr||(Rr=h.createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),kr||(kr=h.createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Pr||(Pr=h.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),Lr||(Lr=h.createElement("path",{fill:"none",d:"M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),e)}),to=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},Mr||(Mr=h.createElement("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"})),e):16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Dr||(Dr=h.createElement("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Br||(Br=h.createElement("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),e)}),no=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},jr||(jr=h.createElement("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"})),e):16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Vr||(Vr=h.createElement("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Fr||(Fr=h.createElement("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),e)}),ro=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},zr||(zr=h.createElement("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"})),e):16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Hr||(Hr=h.createElement("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Ur||(Ur=h.createElement("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),e)}),oo=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Wr||(Wr=h.createElement("path",{d:"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),e)});var io=n(115),ao=n.n(io);const lo=m().oneOf(["default","inline"]),so=m().oneOf(["sm","md","lg"]),co=(0,h.createContext)({isFluid:!1}),uo=e=>{27===e.keyCode&&e.stopPropagation()},fo=e=>{e.preventDefault(),e.stopPropagation()},po=(0,h.forwardRef)((e,t)=>{const{children:n,className:r,disabled:o=!1,type:i="default",size:a,invalid:l,invalidText:s,invalidTextId:c,warn:u,warnText:d,warnTextId:p,light:m,isOpen:g,...b}=e,y=C(),{isFluid:w}=(0,h.useContext)(co),E=!l&&u,x=v()({...r&&{[r]:!0},[`${y}--list-box`]:!0,[`${y}--list-box--${a}`]:a,[`${y}--list-box--inline`]:"inline"===i,[`${y}--list-box--disabled`]:o,[`${y}--list-box--light`]:m,[`${y}--list-box--expanded`]:g,[`${y}--list-box--invalid`]:l,[`${y}--list-box--warning`]:E});return h.createElement(h.Fragment,null,h.createElement("div",f({},b,{className:x,ref:t,onKeyDown:uo,onClick:fo,"data-invalid":l||void 0}),n),w&&h.createElement("hr",{className:`${y}--list-box__divider`}),l?h.createElement("div",{className:`${y}--form-requirement`,id:c},s):null,E?h.createElement("div",{className:`${y}--form-requirement`,id:p},d):null)});function mo({children:e,disabled:t,tabIndex:n,...r}){const o=C();return h.createElement("div",f({className:`${o}--list-box__field`,tabIndex:!t&&n||-1},r),e)}po.displayName="ListBox",po.propTypes={children:m().node,className:m().string,disabled:m().bool,invalid:m().bool,invalidText:m().node,invalidTextId:m().string,isOpen:m().bool,light:mt(m().bool),size:so,type:lo,warn:m().bool,warnText:m().string,warnTextId:m().string},mo.propTypes={"aria-haspopup":m().oneOfType([m().string,m().bool]),children:m().node,disabled:m().bool,role:m().string,tabIndex:m().oneOfType([m().number,m().string])};const ho=(0,h.forwardRef)(({children:e,isActive:t=!1,isHighlighted:n=!1,title:r,...o},i)=>{const a=C(),l=i&&"function"!=typeof i?i.menuItemOptionRef:void 0,{isTruncated:s,ref:c}=((e,t=[])=>{const n=(0,h.useRef)(null),r=x([...e?[e]:[],n]),[o,i]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{const e=n.current;if(e){const{offsetWidth:t,scrollWidth:n}=e;i(t<n)}},[n,...t]),{isTruncated:o,ref:r}})(l,[e]),u=v()(`${a}--list-box__menu-item`,{[`${a}--list-box__menu-item--active`]:t,[`${a}--list-box__menu-item--highlighted`]:n});return h.createElement("li",f({},o,{className:u,title:s?r:void 0}),h.createElement("div",{className:`${a}--list-box__menu-item__option`,ref:c},e))});ho.displayName="ListBoxMenuItem",ho.propTypes={children:m().node,disabled:m().bool,isActive:m().bool,isHighlighted:m().bool,title:m().string};const go=(0,h.forwardRef)(({children:e,id:t,...n},r)=>{const o=C();return h.createElement("ul",f({ref:r,id:t,className:`${o}--list-box__menu`,role:"listbox"},n),e)});go.displayName="ListBoxMenu",go.propTypes={children:m().oneOfType([m().node,m().arrayOf(m().oneOf([ho])),m().shape({type:m().oneOf([ho])}),m().bool]),id:m().string.isRequired};const bo="close.menu",vo="open.menu",yo={[bo]:"Close menu",[vo]:"Open menu"},wo=e=>yo[e],Eo=({isOpen:e,translateWithId:t=wo})=>{const n=C(),r=v()(`${n}--list-box__menu-icon`,{[`${n}--list-box__menu-icon--open`]:e}),o=t(e?"close.menu":"open.menu");return h.createElement("div",{className:r},h.createElement(to,{name:"chevron--down","aria-label":o},h.createElement("title",null,o)))};var xo,_o;Eo.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const Co="clear.all",Oo="clear.selection",No={[Co]:"Clear all selected items",[Oo]:"Clear selected item"},To=e=>No[e],So=({clearSelection:e,selectionCount:t,translateWithId:n=To,disabled:r,onClearSelection:o,readOnly:i})=>{const a=C(),l=v()(`${a}--list-box__selection`,{[`${a}--tag--filter`]:t,[`${a}--list-box__selection--multi`]:t}),s=t=>{t.stopPropagation(),r||i||(e(t),o&&o(t))},c=n(t?"clear.all":"clear.selection"),u=v()(`${a}--tag`,`${a}--tag--filter`,`${a}--tag--high-contrast`,{[`${a}--tag--disabled`]:r});return t?h.createElement("div",{className:u},h.createElement("span",{className:`${a}--tag__label`,title:`${t}`},t),h.createElement("div",{role:"button",tabIndex:-1,className:`${a}--tag__close-icon`,onClick:s,"aria-label":n("clear.all"),title:c,"aria-disabled":!!i||void 0},xo||(xo=h.createElement(oo,null)))):h.createElement("div",{role:"button",className:l,tabIndex:-1,onClick:s,"aria-label":c,title:c},t,_o||(_o=h.createElement(oo,null)))};So.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,onClearSelection:m().func,readOnly:m().bool,selectionCount:m().number,translateWithId:m().func};const $o=Object.assign(po,{Field:mo,Menu:go,MenuIcon:Eo,MenuItem:ho,Selection:So});var Io,Ao;const Ro="clear.all",ko="clear.selection",Po={[Ro]:"Clear all selected items",[ko]:"Clear selected item"},Lo=e=>Po[e];function Mo({clearSelection:e,selectionCount:t,translateWithId:n=Lo,disabled:r,readOnly:o,onClearSelection:i,...a}){const l=C(),s=v()(`${l}--list-box__selection`,{[`${l}--tag--filter`]:t,[`${l}--list-box__selection--multi`]:t}),c=n(t?"clear.all":"clear.selection"),u=v()(`${l}--tag`,`${l}--tag--filter`,`${l}--tag--high-contrast`,{[`${l}--tag--disabled`]:r});function d(t){t.stopPropagation(),r||o||(e(t),i&&i(t))}return t?h.createElement("div",{className:u},h.createElement("span",{className:`${l}--tag__label`,title:t?.toString()},t),h.createElement("button",{"aria-label":c,className:`${l}--tag__close-icon`,disabled:r||o,onClick:d,tabIndex:-1,title:c,type:"button","aria-disabled":!!o||void 0},Io||(Io=h.createElement(oo,null)))):h.createElement("button",f({},a,{"aria-label":c,className:s,disabled:r||o,onClick:d,tabIndex:-1,title:c,type:"button","aria-disabled":!!o||void 0}),Ao||(Ao=h.createElement(oo,null)))}var Do;Mo.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,readOnly:m().bool,onClearSelection:m().func,onClick:m().func,onMouseUp:m().func,onKeyDown:m().func,selectionCount:m().number,translateWithId:m().func};const Bo="close.menu",jo="open.menu",Vo={[Bo]:"Close",[jo]:"Open"},Fo=e=>Vo[e],zo=h.forwardRef(({isOpen:e,translateWithId:t=Fo,...n},r)=>{const o=C(),i=v()({[`${o}--list-box__menu-icon`]:!0,[`${o}--list-box__menu-icon--open`]:e}),a=t(e?"close.menu":"open.menu");return h.createElement("button",f({},n,{"aria-label":a,title:a,className:i,type:"button",tabIndex:-1,ref:r}),Do||(Do=h.createElement(to,null)))});zo.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const Ho=(...e)=>t=>{e.forEach(e=>{e&&("function"==typeof e?e(t):"object"==typeof e&&"current"in e&&(e.current=t))})},Uo=({id:e,readOnly:t,disabled:n,invalid:r,invalidText:o,warn:i,warnText:a})=>{const l=C(),s={disabled:!t&&n,invalid:!t&&!n&&r,invalidId:`${e}-error-msg`,warn:!t&&!r&&!n&&i,warnId:`${e}-warn-msg`,validation:null,icon:null,helperId:`${e}-helper-text`};return s.invalid?(s.icon=pn,s.validation=h.createElement(Yt,{as:"div",className:`${l}--form-requirement`,id:s.invalidId},o)):s.warn&&(s.icon=fn,s.validation=h.createElement(Yt,{as:"div",className:`${l}--form-requirement`,id:s.warnId},a)),s},Wo=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:e&&"object"==typeof e&&"label"in e&&"string"==typeof e.label?e.label:"",{InputBlur:qo,InputKeyDownEnter:Ko,FunctionToggleMenu:Go,ToggleButtonClick:Zo,ItemMouseMove:Jo,InputKeyDownArrowUp:Yo,InputKeyDownArrowDown:Xo,MenuMouseLeave:Qo,ItemClick:ei,FunctionSelectItem:ti}=Jr.stateChangeTypes,ni=()=>!0,ri=({item:e,inputValue:t})=>{if(null===t||""===t)return!0;const n=e.toLowerCase(),r=t.toLowerCase();return n.startsWith(r)},oi=({initialSelectedItem:e,itemToString:t,selectedItem:n,prevSelectedItem:r})=>null!=n?t(n):void 0===r&&null!=e?t(e):"",ii=(0,h.forwardRef)((e,t)=>{const n=(0,h.useRef)(0),r=(0,h.useRef)(null),{"aria-label":o="Choose an item",ariaLabel:i,autoAlign:a=!1,className:l,decorator:s,direction:c="bottom",disabled:u=!1,downshiftActions:d,downshiftProps:p,helperText:m,id:g,initialSelectedItem:b,invalid:y,invalidText:w,items:E,itemToElement:x=null,itemToString:_=Wo,light:O,onChange:N,onInputChange:T,onToggleClick:S,placeholder:$,readOnly:I,selectedItem:A,shouldFilterItem:R=ni,size:k,titleText:P,translateWithId:L,typeahead:M=!1,warn:D,warnText:B,allowCustomValue:j=!1,slug:V,inputProps:F,...z}=e,H=gt("enable-v12-dynamic-floating-styles")||a,{refs:U,floatingStyles:W,middlewareData:q}=ft(H?{placement:c,strategy:"fixed",middleware:a?[tt(),nt()]:void 0,whileElementsMounted:We}:{}),K=U?.reference?.current,G=K instanceof HTMLElement?K.clientWidth:void 0;(0,h.useEffect)(()=>{if(H){const e={...W,visibility:q.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{U.floating.current&&(U.floating.current.style[t]=e[t])}),G&&U.floating.current&&(U.floating.current.style.width=G+"px")}},[H,W,U.floating,G]);const[Z,J]=(0,h.useState)(oi({initialSelectedItem:b,itemToString:_,selectedItem:A})),[Y,X]=(0,h.useState)("");(0,h.useEffect)(()=>{if(M){if(Z.length>=n.current)if(Z){const e=E.filter(e=>ri({item:_(e),inputValue:Z}));if(e.length>0){const t=_(e[0]);X(t.slice(Z.length))}else X("")}else X("");else X("");n.current=Z.length}},[M,Z,E,_,ri]);const Q=(0,h.useRef)(!1),ee=(0,h.useRef)(""),[te,ne]=(0,h.useState)(!1),re=C(),{isFluid:oe}=(0,h.useContext)(co),ie=(0,h.useRef)(null),ae=Dt(),[le,se]=(0,h.useState)(!1),ce=(0,h.useRef)(Z),ue=(0,h.useRef)(A);(0,h.useEffect)(()=>{Q.current=te,te&&ne(!1)},[te]),(0,h.useEffect)(()=>{if(ue.current!==A){const e=oi({initialSelectedItem:b,itemToString:_,selectedItem:A,prevSelectedItem:ue.current});Z!==e&&(J(e),N({selectedItem:A,inputValue:e})),ue.current=A}},[A]);const de=(e,t,n)=>e.filter(e=>M?ri({item:t(e),inputValue:n}):R?R({item:e,itemToString:t,inputValue:n}):ni());(0,h.useEffect)(()=>{ce.current!==Z&&(ce.current=Z,T?.(Z))},[Z]);const fe=()=>{ie?.current&&ie.current.focus()},pe=e=>de(E,_,e||null),me=t=>(({items:e,itemToString:t=Wo},n)=>{if(!n)return-1;const r=n.toLowerCase();for(let n=0;n<e.length;n++){const o=t(e[n]).toLowerCase();if(!e[n].disabled&&-1!==o.indexOf(r))return n}return-1})({...e,items:pe(t)},t),he=(0,h.useCallback)((e,t)=>{const{type:n,changes:r}=t,{highlightedIndex:o}=r;switch(n){case qo:if(j&&-1===o){const t=e.inputValue??"",n=void 0===r.selectedItem?e.selectedItem:r.selectedItem;if(null!=n&&_(n)===t&&E.some(e=>ao()(e,n)))return r;const o=""===t?null:E.find(e=>_(e)===t)??t,i="string"==typeof o&&""!==o&&!E.some(e=>ao()(e,o));return!ao()(n,o)&&N&&(N({selectedItem:o,inputValue:t}),ee.current=i?t:""),{...r,selectedItem:o}}if(e.inputValue&&-1===o&&r.selectedItem)return{...r,inputValue:_(r.selectedItem)};if(!j){const t=e.inputValue??"";if(!t||!E.some(e=>_(e)===t)){const t=null!==e.selectedItem?_(e.selectedItem):"";return{...r,inputValue:t}}}return r;case Ko:if(!j)if(-1!==e.highlightedIndex){const t=de(E,_,Z)[e.highlightedIndex];if(t&&!t.disabled)return{...r,selectedItem:t,inputValue:_(t)}}else{const t=me(Z);if(-1!==t){const e=E[t];if(e&&!e.disabled)return{...r,selectedItem:e,inputValue:_(e)}}if(null!==e.selectedItem)return{...r,selectedItem:null,inputValue:Z}}return{...r,isOpen:!0};case Go:case Zo:if(e.isOpen&&!r.isOpen&&!j){const t=e.inputValue??"";if(!t||!E.some(e=>_(e)===t)){const t=null!==e.selectedItem?_(e.selectedItem):"";return{...r,inputValue:t}}}return r;case Qo:return{...r,highlightedIndex:e.highlightedIndex};case Yo:case Xo:return-1===o?{...r,highlightedIndex:0}:r;case Jo:return{...r,highlightedIndex:e.highlightedIndex};default:return r}},[j,Z,_,E,N]),ge=Uo({id:g,readOnly:I,disabled:u||!1,invalid:y||!1,invalidText:w,warn:D||!1,warnText:B}),be=v()(`${re}--combo-box`,{[`${re}--combo-box--invalid--focused`]:y&&le,[`${re}--list-box--up`]:"top"===c,[`${re}--combo-box--warning`]:ge.warn,[`${re}--combo-box--readonly`]:I,[`${re}--autoalign`]:H}),ve=v()(`${re}--label`,{[`${re}--label--disabled`]:u}),ye=`combobox-helper-text-${ae}`,we=`combobox-warn-text-${ae}`,Ee=`combobox-invalid-text-${ae}`,xe=v()(`${re}--form__helper-text`,{[`${re}--form__helper-text--disabled`]:u}),_e=v()(`${re}--list-box__wrapper`,[l,{[`${re}--list-box__wrapper--fluid--invalid`]:oe&&y,[`${re}--list-box__wrapper--slug`]:V,[`${re}--list-box__wrapper--decorator`]:s}]),Ce=v()(`${re}--text-input`,{[`${re}--text-input--empty`]:!Z,[`${re}--combo-box--input--focus`]:le}),Oe=V??s,Ne=$n(Oe,Sn),Te=Ne?(0,h.cloneElement)(Oe,{size:"mini"}):Oe,{getInputProps:Se,getItemProps:$e,getLabelProps:Ie,getMenuProps:Ae,getToggleButtonProps:Re,isOpen:ke,highlightedIndex:Pe,selectedItem:Le,closeMenu:Me,openMenu:De,reset:Be,selectItem:je,setHighlightedIndex:Ve,setInputValue:Fe,toggleMenu:ze}=Jr({items:de(E,_,Z),inputValue:Z,itemToString:e=>_(e),onInputValueChange({inputValue:e}){const t=e||"";J(t),Ve(me(t))},onHighlightedIndexChange:({highlightedIndex:e})=>{if(e>-1){const t=document.querySelectorAll(`li.${re}--list-box__menu-item[role="option"]`)[e];t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})}},initialSelectedItem:b,inputId:g,stateReducer:he,isItemDisabled:(e,t)=>e?.disabled,...p,onStateChange:({type:e,selectedItem:t})=>{p?.onStateChange?.({type:e,selectedItem:t}),Q.current||e!==ei&&e!==ti&&e!==Ko||void 0===t||ao()(A,t)||(E.some(e=>ao()(e,t))&&(ee.current=""),N({selectedItem:t}))}}),He=void 0!==A?A:Le;(0,h.useEffect)(()=>{d&&(d.current={closeMenu:Me,openMenu:De,reset:Be,selectItem:je,setHighlightedIndex:Ve,setInputValue:Fe,toggleMenu:ze})},[Me,De,Be,je,Ve,Fe,ze]);const Ue=Re({disabled:u||I,onClick:(e=>t=>{if(S&&S(t),I)return t.preventDownshiftDefault=!0,void t?.persist?.();t.target===ie.current&&e&&(t.preventDownshiftDefault=!0,t?.persist?.())})(ke),onMouseUp(e){ke&&e.stopPropagation()}}),qe=e=>{se("focus"===e.type),r.current?.value||"blur"!==e.type||je(null)},Ke=I?{onKeyDown:e=>{"Tab"!==e.key&&e.preventDefault()},onClick:e=>{e.preventDefault(),e.currentTarget.focus()}}:{},Ge=ge.invalid&&w&&Ee||ge.warn&&B&&we||m&&!oe&&ye||void 0,Ze=(0,h.useMemo)(()=>Ae({ref:H?U.setFloating:null}),[H,i,o,Ae,U.setFloating]);return(0,h.useEffect)(()=>{if(ie.current&&r.current&&Y){const e=Z.length,t=e+Y.length;r.current.value=Z+Y,r.current.setSelectionRange(e,t)}},[Z,Y]),h.createElement("div",{className:_e},P&&h.createElement(Yt,f({as:"label",className:ve},Ie()),P),h.createElement($o,{onFocus:qe,onBlur:qe,className:be,disabled:u,invalid:ge.invalid,invalidText:w,invalidTextId:Ee,isOpen:ke,light:O,size:k,warn:ge.warn,ref:H?U.setReference:null,warnText:B,warnTextId:we},h.createElement("div",{className:`${re}--list-box__field`},h.createElement("input",f({disabled:u,className:Ce,type:"text",tabIndex:0,"aria-haspopup":"listbox",title:ie?.current?.value},Se({"aria-label":P?void 0:i||o,"aria-controls":Ze.id,placeholder:$,value:Z,...F,onChange:e=>{const t=e.target.value,n=j&&ee.current&&Z===ee.current&&""===t;J(t),Fe(t),n&&(ne(!0),N({selectedItem:null,inputValue:""}),je(null),ee.current="")},ref:Ho(ie,t,r),onKeyDown:e=>{if(It(e,_t)&&e.stopPropagation(),!It(e,Et)||Z&&!j||(ze(),-1!==Pe&&je(de(E,_,Z)[Pe]),j&&ke&&Z&&-1===Pe&&(ee.current=Z,N({selectedItem:null,inputValue:Z})),e.preventDownshiftDefault=!0,e?.persist?.()),It(e,xt)&&Z&&e.target===ie.current&&ke&&(ze(),e.preventDownshiftDefault=!0,e?.persist?.()),It(e,Ot)&&"Numpad7"!==e.code&&e.target.setSelectionRange(0,0),It(e,Ct)&&"Numpad1"!==e.code&&e.target.setSelectionRange(e.target.value.length,e.target.value.length),e.altKey&&"ArrowDown"==e.key&&(e.preventDownshiftDefault=!0,ke||ze()),e.altKey&&"ArrowUp"==e.key&&(e.preventDownshiftDefault=!0,ke&&ze()),Z||-1!=Pe||"Enter"!=e.key||(ke||ze(),je(null),e.preventDownshiftDefault=!0,"false"===e.currentTarget.ariaExpanded&&De()),M&&"Tab"===e.key){const e=E.find(e=>_(e).toLowerCase().startsWith(Z.toLowerCase()));if(e){const t=_(e);Fe(t),je(e)}}}}),z,Ke,{readOnly:I,"aria-describedby":Ge})),ge.invalid&&h.createElement(pn,{className:`${re}--list-box__invalid-icon`}),ge.warn&&h.createElement(fn,{className:`${re}--list-box__invalid-icon ${re}--list-box__invalid-icon--warning`}),Z&&h.createElement(Mo,{clearSelection:()=>{ne(!0),J(""),N({selectedItem:null}),je(null),ee.current="",fe()},translateWithId:L,disabled:u||I,onClearSelection:fe,selectionCount:0}),h.createElement(zo,f({},Ue,{isOpen:ke,translateWithId:L}))),V?Te:s?h.createElement("div",{className:`${re}--list-box__inner-wrapper--decorator`},Ne?Te:h.createElement("span",null,Te)):"",h.createElement($o.Menu,Ze,ke?de(E,_,Z).map((e,t)=>{const n=null!==e&&"object"==typeof e&&"text"in e&&x?e.text?.toString():_(e),r=$e({item:e,index:t}),o=r["aria-disabled"],{"aria-disabled":i,"aria-selected":a,...l}=r,s=ao()(He,e);return h.createElement($o.MenuItem,f({key:r.id,isActive:s,isHighlighted:Pe===t,title:n,disabled:o},l,{"aria-selected":s}),x?x(e):_(e),s&&h.createElement(Qr,{className:`${re}--list-box__menu-item__selected-icon`}))}):null)),m&&!ge.invalid&&!ge.warn&&!oe&&h.createElement(Yt,{as:"div",id:ye,className:xe},m))});ii.displayName="ComboBox",ii.propTypes={allowCustomValue:m().bool,"aria-label":m().string,ariaLabel:mt(m().string),autoAlign:m().bool,className:m().string,decorator:m().node,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().object,downshiftActions:m().exact({current:m().any}),helperText:m().node,id:m().string.isRequired,initialSelectedItem:m().oneOfType([m().object,m().string,m().number]),invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,light:mt(m().bool),onChange:m().func.isRequired,onInputChange:m().func,onToggleClick:m().func,placeholder:m().string,readOnly:m().bool,selectedItem:m().oneOfType([m().object,m().string,m().number]),shouldFilterItem:m().func,size:so,slug:mt(m().node),titleText:m().node,translateWithId:m().func,typeahead:m().bool,warn:m().bool,warnText:m().node,inputProps:m().object};const ai=h.createContext(1),li=["one","two","three"],si=[0,1,2],ci=si[0],ui=si[si.length-1],di=h.forwardRef((e,t)=>{const{as:n,className:r,children:o,level:i,withBackground:a=!1,...l}=e,s=h.useContext(ai),c=i??s,u=C(),d=v()(`${u}--layer-${li[c]}`,{[`${u}--layer__with-background`]:a},r),p=((e,t,n)=>Math.min(n,Math.max(t,e)))(c+1,ci,ui),m=n||"div";return h.createElement(ai.Provider,{value:p},h.createElement(m,f({ref:t},l,{className:d}),o))});di.displayName="Layer",di.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,className:m().string,level:m().oneOf([0,1,2]),withBackground:m().bool};const fi=h.forwardRef(function({buttonOnClick:e,children:t,className:n,closeClassName:r,closeIconClassName:o,closeModal:i,iconDescription:a="Close",label:l,labelClassName:s,title:c,titleClassName:u,...d},p){const m=C(),g=v()(`${m}--modal-header`,n),b=v()(`${m}--modal-header__label ${m}--type-delta`,s),y=v()(`${m}--modal-header__heading ${m}--type-beta`,u),w=v()(`${m}--modal-close`,r),E=v()(`${m}--modal-close__icon`,o);return h.createElement("div",f({className:g},d,{ref:p}),l&&h.createElement("h2",{className:b},l),c&&h.createElement("h2",{className:y},c),t,h.createElement("div",{className:`${m}--modal-close-button`},h.createElement(Kt,{className:w,label:a,onClick:function(t){i?.(t),e?.(t)},"aria-label":a,align:"left"},h.createElement(oo,{size:20,"aria-hidden":"true",tabIndex:"-1",className:E}))))});fi.propTypes={buttonOnClick:m().func,children:m().node,className:m().string,closeClassName:m().string,closeIconClassName:m().string,closeModal:m().func,iconDescription:m().string,label:m().string,labelClassName:m().string,title:m().node,titleClassName:m().string};const pi=e=>({ghost:1,"danger--ghost":2,tertiary:3,danger:5,primary:6}[e]??4),mi=e=>h.isValidElement(e)&&e.props&&"object"==typeof e.props?e.props.kind??"primary":"primary",hi=(0,h.forwardRef)((e,t)=>{const{children:n,className:r,fluid:o,stacked:i,...a}=e,l=C(),s=(0,h.useRef)(null),[c,u]=(0,h.useState)(!1),[d,p]=(0,h.useState)(h.Children.toArray(n));E(()=>{const e=()=>{let e=i||!1;if(s&&s.current){const t=window.getComputedStyle(s.current);e="column"===t?.getPropertyValue?.("--flex-direction")}return e};if(u(e()),!s.current)return;const t=new ResizeObserver(()=>{u(e())});return t.observe(s.current),()=>t.disconnect()},[o,i]),(0,h.useEffect)(()=>{const e=h.Children.toArray(n);e.sort((e,t)=>(pi(mi(e))-pi(mi(t)))*(c?-1:1)),p(e)},[n,c]);const m=v()(r,`${l}--btn-set`,{[`${l}--btn-set--stacked`]:c,[`${l}--btn-set--fluid`]:o});return h.createElement("div",f({},a,{className:m,ref:t}),o?h.createElement("div",{ref:s,className:v()(`${l}--btn-set__fluid-inner`,{[`${l}--btn-set__fluid-inner--auto-stack`]:!0})},d):n)});hi.displayName="ButtonSet",hi.propTypes={children:m().node,className:m().string,fluid:m().bool,stacked:m().bool};var gi=n(771);function bi({active:e=!0,className:t,withOverlay:n=!0,small:r=!1,description:o="loading",...i}){const a=C(),l=v()(t,{[`${a}--loading`]:!0,[`${a}--loading--small`]:r,[`${a}--loading--stop`]:!e}),s=v()({[`${a}--loading-overlay`]:!0,[`${a}--loading-overlay--stop`]:!e}),c=h.createElement("div",f({},i,{"aria-atomic":"true","aria-live":e?"assertive":"off",className:l}),h.createElement("svg",{className:`${a}--loading__svg`,viewBox:"0 0 100 100",role:"img","aria-label":o},h.createElement("title",null,o),r?h.createElement("circle",{className:`${a}--loading__background`,cx:"50%",cy:"50%",r:"42"}):null,h.createElement("circle",{className:`${a}--loading__stroke`,cx:"50%",cy:"50%",r:r?"42":"44"})));return n?h.createElement("div",{className:s},c):c}bi.propTypes={active:m().bool,className:m().string,description:m().string,id:mt(m().string),small:m().bool,withOverlay:m().bool};const vi=({className:e,status:t="active",iconDescription:n,description:r,onSuccess:o,successDelay:i=1500,...a})=>{const l=C(),s=v()(`${l}--inline-loading`,e),c=(0,h.useRef)(null);(0,h.useEffect)(()=>("finished"===t&&(c.current=setTimeout(()=>{o&&o()},i)),()=>{c.current&&(clearTimeout(c.current),c.current=null)}),[t,o,i]);const u=r&&h.createElement("div",{className:`${l}--inline-loading__text`},r),d=(()=>{let e=n||t;if("error"===t)return h.createElement(gi.x,{className:`${l}--inline-loading--error`},h.createElement("title",null,e));if("finished"===t)return h.createElement(eo,{className:`${l}--inline-loading__checkmark-container`},h.createElement("title",null,e));if("inactive"===t||"active"===t){if("inactive"===t)return;return n||(e="loading"),h.createElement(bi,{small:!0,description:e,withOverlay:!1,active:"active"===t})}})(),p=d&&h.createElement("div",{className:`${l}--inline-loading__animation`},d);return h.createElement("div",f({className:s},a,{"aria-live":a["aria-live"]??("inactive"===t?"off":"assertive")}),p,u)};function yi({secondaryButtons:e,secondaryButtonText:t,secondaryClassName:n,closeModal:r,onRequestClose:o,disabled:i}){function a(e){r(e),o(e)}return Array.isArray(e)&&e.length<=2?h.createElement(h.Fragment,null,e.map(({buttonText:e,onClick:t},r)=>h.createElement(Zt,{key:`${e}-${r}`,className:n,kind:"secondary",onClick:t||a},e))):t?h.createElement(Zt,{disabled:i,className:n,onClick:a,kind:"secondary"},t):null}vi.propTypes={className:m().string,description:m().node,iconDescription:m().string,onSuccess:m().func,status:m().oneOf(["inactive","active","finished","error"]),successDelay:m().number},yi.propTypes={closeModal:m().func,disabled:m().bool,onRequestClose:m().func,secondaryButtonText:m().string,secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},secondaryClassName:m().string};const wi=h.forwardRef(function({children:e,className:t,closeModal:n=mn,danger:r,inputref:o,onRequestClose:i=mn,onRequestSubmit:a=mn,primaryButtonDisabled:l,primaryButtonText:s,primaryClassName:c,secondaryButtonText:u,secondaryButtons:d,secondaryClassName:p,loadingStatus:m="inactive",loadingDescription:g,loadingIconDescription:b,onLoadingSuccess:y=mn,...w},E){const x=C(),_=v()(`${x}--modal-footer`,t,Array.isArray(d)&&2===d.length?`${x}--modal-footer--three-button`:null),O=v()(c,"inactive"!==m?`${x}--btn--loading`:null),N="inactive"!==m,T={closeModal:n,secondaryButtons:d,secondaryButtonText:u,secondaryClassName:p,onRequestClose:i,disabled:N};return h.createElement(hi,f({className:_},w,{ref:E,"aria-busy":N}),h.createElement(yi,T),s&&h.createElement(Zt,{onClick:a,className:O,disabled:N||l,kind:r?"danger":"primary",ref:o},"inactive"===m?s:h.createElement(vi,{status:m,description:g,iconDescription:b,className:`${x}--inline-loading--btn`,onSuccess:y})),e)});wi.propTypes={children:m().node,className:m().string,closeModal:m().func,danger:m().bool,inputref:m().oneOfType([m().func,m().shape({current:m().any})]),loadingDescription:m().string,loadingIconDescription:m().string,loadingStatus:m().oneOf(["inactive","active","finished","error"]),onLoadingSuccess:m().func,onRequestClose:m().func,onRequestSubmit:m().func,primaryButtonDisabled:m().bool,primaryButtonText:m().string,primaryClassName:m().string,secondaryButtonText:m().string,secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},secondaryClassName:m().string};const Ei=(e,t,n)=>{e.classList.toggle(t,n)};var xi=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),_i="undefined"==typeof Element,Ci=_i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Oi=!_i&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Ni=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Ni(e.parentNode))},Ti=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Ni(i,!1))if("SLOT"===i.tagName){var a=i.assignedElements(),l=a.length?a:i.children,s=Ti(l,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:i,candidates:s})}else{Ci.call(i,xi)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!Ni(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=Ti(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:i,candidates:d})}else o.unshift.apply(o,i.children)}}return r},Si=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},$i=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Si(e)?0:e.tabIndex},Ii=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ai=function(e){return"INPUT"===e.tagName},Ri=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ki=function(e,t){return!(t.disabled||function(e){return Ai(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ci.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ci.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Ri(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Oi(e);if(a&&!a.shadowRoot&&!0===r(a))return Ri(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Oi(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var s,c,u;l=!(null===(c=a=null===(s=i=Oi(a))||void 0===s?void 0:s.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Ci.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Pi=function(e,t){return!(function(e){return function(e){return Ai(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Oi(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||$i(t)<0||!ki(e,t))},Li=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Mi=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=function(e,t){var n=$i(e);return n<0&&t&&!Si(e)?0:n}(i,o),l=o?Mi(e.candidates):i;0===a?o?t.push.apply(t,l):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:l})}),n.sort(Ii).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)};const Di="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n",Bi="undefined"!=typeof Node?Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS:0,ji="undefined"!=typeof Node?Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY:0,Vi=(e,t=[],n="cds")=>e instanceof Element&&"function"==typeof e.closest&&[`.${n}--overflow-menu-options`,`.${n}--tooltip`,".flatpickr-calendar",...t].some(t=>!!e.closest(t)),Fi=({bodyNode:e,startTrapNode:t,endTrapNode:n,currentActiveNode:r,oldActiveNode:o,selectorsFloatingMenus:i,prefix:a="cds"})=>{if(e&&r&&o&&!e.contains(r)&&!Vi(r,i,a)){const i=o.compareDocumentPosition(r);if(r===t||i&Bi){const t=Array.from(e.querySelectorAll(Di)).reverse().find(({offsetParent:e})=>Boolean(e));t?t.focus():e!==o&&e.focus()}else if(r===n||i&ji){const t=Array.from(e.querySelectorAll(Di)).find(({offsetParent:e})=>Boolean(e));t?t.focus():e!==o&&e.focus()}}},zi=({containerNode:e,currentActiveNode:t,event:n})=>{if(!e)return;["blur","focusout","focusin","focus"].includes(n.type);const r=(a=e,s=(l=l||{}).getShadowRoot?Ti([a],l.includeContainer,{filter:Pi.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:Li}):function(e,t,n){if(Ni(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(xi));return t&&Ci.call(e,xi)&&r.unshift(e),r.filter(n)}(a,l.includeContainer,Pi.bind(null,l)),Mi(s)),o=r[0],i=r[r.length-1];var a,l,s;t!==i||n.shiftKey||(n.preventDefault(),o.focus()),t===o&&n.shiftKey&&(n.preventDefault(),i.focus())},Hi=e=>(t,...n)=>{for(const r of e){if(t.defaultPrevented)break;"function"==typeof r&&r(t,...n)}};function Ui(e,t=0,n={}){"object"!=typeof n&&(n={});const{signal:r,leading:o=!1,trailing:i=!0,maxWait:a}=n,l=Array(2);let s;o&&(l[0]="leading"),i&&(l[1]="trailing");let c=null;const u=function(e,t,{signal:n,edges:r}={}){let o,i=null;const a=null!=r&&r.includes("leading"),l=null==r||r.includes("trailing"),s=()=>{null!==i&&(e.apply(o,i),o=void 0,i=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,l&&s(),f()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null)},f=()=>{d(),o=void 0,i=null},p=function(...e){if(n?.aborted)return;o=this,i=e;const t=null==c;u(),a&&t&&s()};return p.schedule=u,p.cancel=f,p.flush=()=>{d(),s()},n?.addEventListener("abort",f,{once:!0}),p}(function(...t){s=e.apply(this,t),c=null},t,{signal:r,edges:l}),d=function(...t){if(null!=a)if(null===c)c=Date.now();else if(Date.now()-c>=a)return s=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),s;return u.apply(this,t),s};return d.cancel=u.cancel,d.flush=()=>(u.flush(),s),d}const Wi=(0,h.createContext)({}),qi=h.forwardRef(({children:e,className:t,focusAfterCloseRef:n,modal:r,onCancel:o=mn,onClick:i=mn,onClose:a=mn,onRequestClose:l=mn,open:s=!1,role:c,ariaLabel:u,ariaLabelledBy:d,ariaDescribedBy:p,...m},g)=>{const b=C(),y=Dt(),w=`${b}--dialog-header__heading--${y}`,E=`${b}--dialog-header__label--${y}`,x=(0,h.useRef)(null),_=g??x;(0,h.useEffect)(()=>{_.current&&(s?r?_.current.showModal():_.current.show():_.current.close())},[r,s]),(0,h.useEffect)(()=>{if(!s&&n){const e=setTimeout(()=>{n.current?.focus()});return()=>{clearTimeout(e)}}},[s,n]);const O=v()(`${b}--dialog-container`),N={dialogId:y,titleId:w,subtitleId:E,isOpen:s};return(0,h.useEffect)(()=>{if(_.current&&s&&!u&&!d){const e=_.current.querySelector(`.${b}--dialog-header__heading`);e&&e.id&&_.current.setAttribute("aria-labelledby",e.id)}},[s,u,d,b]),h.createElement(Wi.Provider,{value:N},h.createElement("dialog",f({},m,{className:v()(`${b}--dialog`,{[`${b}--dialog--modal`]:r},t),ref:_,onCancel:o,onClick:function(e){!function(e){s&&r&&e.target===_.current&&l(e)}(e),i(e)},onClose:a,role:c,"aria-label":u,"aria-labelledby":u?void 0:d||w,"aria-describedby":p}),h.createElement("div",{className:O},e)))});qi.displayName="Dialog",qi.propTypes={children:m().node,className:m().string,focusAfterCloseRef:m().oneOfType([m().func,m().shape({current:m().any})]),modal:m().bool,onRequestClose:m().func,open:m().bool,role:m().oneOf(["dialog","alertdialog"]),"aria-label":m().string,"aria-labelledby":m().string,ariaDescribedBy:m().string};const Ki=h.forwardRef(({children:e,...t},n)=>{const r=C();return h.createElement("div",f({className:`${r}--dialog__header`,ref:n},t),e)});Ki.displayName="DialogHeader",Ki.propTypes={children:m().node};const Gi=h.forwardRef(({children:e,...t},n)=>{const r=C();return h.createElement("div",f({className:`${r}--dialog__header-controls`,ref:n},t),e)});Gi.displayName="DialogControls",Gi.propTypes={children:m().node};const Zi=h.forwardRef(({onClick:e,...t},n)=>{const r=C();return h.createElement(Kt,f({kind:"ghost",className:`${r}--dialog__close`,label:"Close",title:"Close","aria-label":"Close",align:"left",onClick:e,ref:n},t),h.createElement(oo,{size:20,"aria-hidden":"true",tabIndex:-1,className:`${r}--icon__close`}))});Zi.displayName="DialogCloseButton",Zi.propTypes={onClick:m().func};const Ji=h.forwardRef(({children:e,className:t,id:n,...r},o)=>{const i=C(),{titleId:a}=(0,h.useContext)(Wi),l=n||a;return h.createElement(Yt,f({as:"h2",id:l,className:v()(`${i}--dialog-header__heading`,t),ref:o},r),e)});Ji.displayName="DialogTitle",Ji.propTypes={children:m().node,className:m().string,id:m().string};const Yi=h.forwardRef(({children:e,className:t,id:n,...r},o)=>{const i=C(),{subtitleId:a}=(0,h.useContext)(Wi),l=n||a;return h.createElement(Yt,f({as:"h2",id:l,className:v()(`${i}--dialog-header__label`,t),ref:o},r),e)});Yi.displayName="DialogSubtitle",Yi.propTypes={children:m().node,className:m().string,id:m().string};const Xi=h.forwardRef(({children:e,className:t,hasScrollingContent:n,...r},o)=>{const i=C(),a=(0,h.useRef)(null),[l,s]=(0,h.useState)(!1),c=`${i}--dialog-body--${Dt()}`;E(()=>{a.current&&s(a.current.scrollHeight>a.current.clientHeight);const e=Ui(function(){a.current&&s(a.current.scrollHeight>a.current.clientHeight)},200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[]);const u=v()(`${i}--dialog-content`,{[`${i}--dialog-scroll-content`]:n||l},t),d=n||l?{tabIndex:0,role:"region"}:{};return h.createElement(di,f({ref:e=>{"function"==typeof o?o(e):o&&(o.current=e),a.current=e},id:c,className:u},d,r),e)});Xi.displayName="DialogBody",Xi.propTypes={children:m().node,className:m().string,hasScrollingContent:m().bool};const Qi=h.forwardRef(({children:e,className:t,onRequestClose:n=mn,onSecondarySubmit:r,onRequestSubmit:o=mn,primaryButtonText:i="Save",primaryButtonDisabled:a=!1,secondaryButtonText:l="Cancel",secondaryButtons:s,loadingStatus:c="inactive",loadingDescription:u,loadingIconDescription:d,onLoadingSuccess:p=mn,danger:m=!1,...g},b)=>{const y=C(),w=(0,h.useRef)(null),{isOpen:E}=(0,h.useContext)(Wi),[x,_]=(0,h.useState)(null);(0,h.useEffect)(()=>{if(m&&x){const e=requestAnimationFrame(()=>{x.focus()});return()=>cancelAnimationFrame(e)}},[m,x,E]);const O=v()(`${y}--dialog-footer`,t,{[`${y}--dialog-footer--three-button`]:Array.isArray(s)&&2===s.length}),N="inactive"!==c,T=v()({[`${y}--btn--loading`]:"inactive"!==c}),S=r||n;return e?h.createElement(hi,f({className:O,ref:b},g),e):h.createElement(hi,f({className:O,"aria-busy":N,ref:b},g),Array.isArray(s)&&s.length<=2?s.map(({buttonText:e,onClick:t},n)=>h.createElement(Zt,{key:`${e}-${n}`,autoFocus:m,kind:"secondary",ref:0===n&&m?_:void 0,onClick:t},e)):l&&h.createElement(Zt,{ref:m?_:void 0,disabled:N,kind:"secondary",autoFocus:m,onClick:S},l),h.createElement(Zt,{className:T,kind:m?"danger":"primary",disabled:N||a,onClick:o,ref:w},"inactive"===c?i:h.createElement(vi,{status:c,description:u,iconDescription:d,className:`${y}--inline-loading--btn`,onSuccess:p})))});Qi.displayName="DialogFooter",Qi.propTypes={children:m().node,className:m().string,onRequestClose:m().func,onSecondarySubmit:m().func,onRequestSubmit:m().func,primaryButtonText:m().node,primaryButtonDisabled:m().bool,secondaryButtonText:m().node,secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},danger:m().bool,loadingStatus:m().oneOf(["inactive","active","finished","error"]),loadingDescription:m().string,loadingIconDescription:m().string,onLoadingSuccess:m().func};const ea=e=>{const[t,n]=(0,h.useState)(!!e),[r,o]=(0,h.useState)(!!e);return(0,h.useEffect)(()=>{e!==r&&(n(!!e),o(!!e))},[e,r]),(0,h.useMemo)(()=>[t,n],[t])},ta=({open:e,_presenceId:t,_autoEnablePresence:n=!0,children:r})=>{const o=ea(e),[i]=o,[a,l]=((e,t)=>{const n=(0,h.useRef)(t),r=(0,h.useRef)(null),o=(0,h.useRef)(null);t||!o.current||r.current||(n.current=null),o.current=r.current;const{isPresent:i,isExiting:a}=((e,t)=>{const n=C(),[r,o]=(0,h.useState)(t?"idle":"finished"),i="active"===r;return E(()=>{o(e=>t||"idle"!==e?t&&"idle"!==e?"idle":e:"active")},[t]),E(()=>{if(!e.current||!i)return;if(!("getAnimations"in e.current))return void o("finished");const t=e.current.getAnimations({subtree:!0}).filter(e=>e instanceof CSSAnimation&&e.animationName.startsWith(`${n}--presence`));if(!t.length)return void o("finished");let r=!1;return Promise.all(t.map(e=>e.finished)).finally(()=>{r||o("finished")}),()=>{r=!0}},[e,i,n]),{isPresent:t||"finished"!==r,isExiting:i}})(r,e),l=(0,h.useCallback)(e=>!(!e||n.current&&n.current!==e||(n.current=e,0)),[]);return[i,(0,h.useMemo)(()=>({presenceRef:r,isPresenceExclusive:l,isExiting:a}),[r,l,a])]})(i,t),s=(0,h.useMemo)(()=>({modalState:o,autoEnablePresence:n,...l}),[o,n,l]);return a?h.createElement(na,{value:s},r):null},na=(0,h.createContext)(void 0),ra=h.forwardRef(function({className:e,children:t,hasForm:n,hasScrollingContent:r,...o},i){const a=C(),l=(0,h.useRef)(null),{height:s}=(({ref:e,onResize:t})=>{const[n,r]=(0,h.useState)(-1),[o,i]=(0,h.useState)(-1),a=(0,h.useRef)(null),l=(0,h.useRef)(t);return(0,h.useEffect)(()=>{l.current=t},[t]),(0,h.useEffect)(()=>{!e?.current||n>=0&&o>=0||(()=>{if(e.current){const t=window.getComputedStyle(e.current),n=(e.current?.offsetWidth??0)-("string"==typeof t?.paddingLeft&&t?.paddingLeft.length?parseFloat(t?.paddingLeft):0)-("string"==typeof t?.paddingRight&&t?.paddingRight.length?parseFloat(t?.paddingRight):0),o=(e.current?.offsetHeight??0)-("string"==typeof t?.paddingTop&&t?.paddingTop.length?parseFloat(t?.paddingTop):0)-("string"==typeof t?.paddingBottom&&t?.paddingBottom.length?parseFloat(t?.paddingBottom):0);r(n),i(o)}})()},[n,o]),E(()=>{if(!e?.current)return;const t=new ResizeObserver(t=>{a.current=t,window.requestAnimationFrame(()=>{(()=>{if(!e?.current||!Array.isArray(a?.current))return;const t=a.current[0];r(t.contentRect.width),i(t.contentRect.height),l.current?.(t.contentRect)})()})});return t.observe(e.current),()=>{t.disconnect()}},[]),{width:n,height:o}})({ref:l}),c=!!l.current&&l?.current?.scrollHeight>l?.current?.clientHeight,u=v()({[`${a}--modal-content`]:!0,[`${a}--modal-content--with-form`]:n,[`${a}--modal-scroll-content`]:r||c,[`${a}--modal-scroll-content--no-fade`]:s<=300},e),d=r||c?{tabIndex:0,role:"region"}:{};return h.createElement(di,f({className:u},d,o,{ref:Ho(l,i)}),t)});var oa;ra.propTypes={"aria-label":(oa=m().string,(e,t,n,...r)=>oa(e,t,n,...r)),children:m().node,className:m().string,hasForm:m().bool,hasScrollingContent:m().bool};const ia=h.forwardRef(function({open:e,...t},n){const r=Dt(),o=gt("enable-presence"),i=Boolean((0,h.useContext)(na)),a=o||i,l=(e=>{const t=(0,h.useContext)(na);return t?.isPresenceExclusive(e)?t:void 0})(r);return a&&!l?h.createElement(ta,{open:e??!1,_presenceId:r,_autoEnablePresence:i},h.createElement(aa,f({open:!0,ref:n},t))):h.createElement(aa,f({ref:n,open:e},t))}),aa=h.forwardRef(function({"aria-labelledby":e,"aria-label":t,children:n,className:r,containerClassName:o,danger:i,decorator:a,isFullWidth:l,onClose:s,onKeyDown:c,open:u,preventCloseOnClickOutside:d,selectorPrimaryFocus:p="[data-modal-primary-focus]",selectorsFloatingMenus:m,size:g,launcherButtonRef:b,slug:y,...w},E){const x=C(),_=(0,h.useRef)(null),O=(0,h.useRef)(null),N=(0,h.useRef)(null),T=(0,h.useRef)(null),S=(0,h.useRef)(null),$=(0,h.useContext)(na),I=function(e){const t=h.useRef(void 0),n=h.useCallback(t=>{const n=e.map(e=>{if(null!=e){if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return h.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}([E,$?.presenceRef]),A=gt("enable-presence")||$?.autoEnablePresence,R=u||A,k=ea(R),[P,L]=$?.modalState??k,M=gt("enable-dialog-element"),D=gt("enable-experimental-focus-wrap-without-sentinels"),B=gt("enable-focus-wrap-without-sentinels"),j=D||B;function V(e){s&&!1===s(e)||L(!1)}(0,h.useEffect)(()=>{M||Ei(document.body,`${x}--body--with-modal-open`,!!R)},[R,x]),(0,h.useEffect)(()=>{if(!M)return()=>{Ei(document.body,`${x}--body--with-modal-open`,!1)}},[]);const F=v()(`${x}--modal`,{"is-visible":A||P,[`${x}--modal--enable-presence`]:$?.autoEnablePresence,[`${x}--modal--danger`]:i,[`${x}--modal--slug`]:y,[`${x}--modal--decorator`]:a},r),z=v()(`${x}--modal-container`,g&&`${x}--modal-container--${g}`,l&&`${x}--modal-container--full-width`,o);let H;const U=h.Children.toArray(n).map(e=>$n(e,fi)?(H=e.props.label,(0,h.cloneElement)(e,{closeModal:V})):$n(e,wi)?(0,h.cloneElement)(e,{closeModal:V,inputref:O,danger:i}):e),W=!h.Children.toArray(U).some(e=>$n(e,wi));(0,h.useEffect)(()=>{if(!R)return;const e=e=>{It(e,xt)&&(e.preventDefault(),e.stopPropagation(),V(e))};return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[R]),(0,h.useEffect)(()=>{M||A||R||!b||setTimeout(()=>{b.current?.focus()})},[M,A,R,b]),(0,h.useEffect)(()=>{const e=b?.current;return()=>{A&&e&&setTimeout(()=>{e.focus()})}},[A,b]),(0,h.useEffect)(()=>{if(!M){const e=e=>{const t=e||_.current;return(t?t.querySelector(i?`.${x}--btn--secondary`:p):null)||O&&O.current};R&&P&&(t=>{const n=e(t),r=t.querySelector(`.${x}--modal-close`);n?n.focus():!n&&r&&r?.focus()})(_.current)}},[R,p,P]);const q=y??a,K=$n(q,Sn)?(0,h.cloneElement)(q,{size:"sm"}):q,G=M?h.createElement(qi,{open:R,focusAfterCloseRef:b,modal:!0,className:z,"aria-label":t||H,"aria-labelledby":e,"data-exiting":$?.isExiting||void 0},h.createElement("div",{ref:_,className:`${x}--modal-container-body`},y?K:a?h.createElement("div",{className:`${x}--modal--inner__decorator`},K):"",U)):h.createElement("div",{className:z,role:"dialog","aria-modal":"true","aria-label":t||H,"aria-labelledby":e},!j&&h.createElement("button",{type:"button",ref:N,className:`${x}--visually-hidden`},"Focus sentinel"),h.createElement("div",{ref:_,className:`${x}--modal-container-body`},y?K:a?h.createElement("div",{className:`${x}--modal--inner__decorator`},K):"",U),!j&&h.createElement("button",{type:"button",ref:T,className:`${x}--visually-hidden`},"Focus sentinel"));return h.createElement(di,f({},w,{level:0,role:"presentation",ref:I,"aria-hidden":!R,onBlur:function({target:e,relatedTarget:t}){if(!M&&!j&&R&&t&&e&&_.current){const{current:n}=_,{current:r}=N,{current:o}=T;Fi({bodyNode:n,startTrapNode:r,endTrapNode:o,currentActiveNode:t,oldActiveNode:e,selectorsFloatingMenus:m?.filter(Boolean),prefix:x})}const n=document.querySelector(`.${x}--modal-content`);n&&n.classList.contains(`${x}--modal-scroll-content`)&&t&&n.contains(t)&&t.scrollIntoView({block:"center"})},onClick:Hi([w?.onClick,function(e){const{target:t}=e,n=S.current;(W&&!d||!W&&!1===d)&&t instanceof Node&&!Vi(t,m,x)&&_.current&&!_.current.contains(t)&&!_.current.contains(n)&&V(e)}]),onMouseDown:Hi([w?.onMouseDown,function(e){const t=e.target;S.current=t}]),onKeyDown:function(e){M||j&&R&&It(e,wt)&&_.current&&zi({containerNode:_.current,currentActiveNode:e.target,event:e}),c?.(e)},className:F,"data-exiting":$?.isExiting||void 0}),G)});function la({className:e,children:t,id:n,...r}){const o=C(),i=v()(`${o}--label`,`${o}--label--no-margin`,e);return h.createElement(Yt,f({as:"label",htmlFor:n,className:i},r),t)}var sa,ca,ua,da;ia.propTypes={"aria-label":m().string,"aria-labelledby":m().string,children:m().node,className:m().string,containerClassName:m().string,danger:m().bool,decorator:m().node,isFullWidth:m().bool,launcherButtonRef:m().oneOfType([m().func,m().shape({current:m().any})]),onClose:m().func,onKeyDown:m().func,open:m().bool,preventCloseOnClickOutside:m().bool,selectorPrimaryFocus:m().string,selectorsFloatingMenus:m().arrayOf(m().string.isRequired),size:m().oneOf(["xs","sm","md","lg"]),slug:mt(m().node)},la.propTypes={children:m().node,className:m().string,id:m().string};const fa=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},sa||(sa=h.createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),ca||(ca=h.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),e)}),pa=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},ua||(ua=h.createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),da||(da=h.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),e)});function ma({children:e,className:t,onClick:n,inline:r,...o}){const i=C(),a=v()(t,{[`${i}--actionable-notification__action-button`]:!0});return h.createElement(Zt,f({className:a,kind:r?"ghost":"tertiary",onClick:n,size:"sm"},o),e)}function ha({"aria-label":e="close notification",ariaLabel:t,className:n,type:r="button",renderIcon:o=oo,name:i,notificationType:a="toast",...l}){const s=C(),c=v()(n,{[`${s}--${a}-notification__close-button`]:a}),u=v()({[`${s}--${a}-notification__close-icon`]:a});return h.createElement("button",f({},l,{type:r,"aria-label":t||e,title:t||e,className:c}),o&&h.createElement(o,{className:u,name:i}))}ma.propTypes={children:m().node,className:m().string,inline:m().bool,onClick:m().func},ha.propTypes={"aria-label":m().string,ariaLabel:mt(m().string),className:m().string,name:m().string,notificationType:m().oneOf(["toast","inline","actionable"]),renderIcon:m().oneOfType([m().func,m().object]),type:m().string};const ga={error:gi.x,success:eo,warning:pn,"warning-alt":fn,info:fa,"info-square":pa};function ba({iconDescription:e,kind:t,notificationType:n}){const r=C(),o=ga[t];return o?h.createElement(o,{className:`${r}--${n}-notification__icon`,size:20},h.createElement("title",null,e)):null}function va({"aria-label":e,children:t,title:n,subtitle:r,role:o="status",onClose:i,onCloseButtonClick:a=mn,statusIconDescription:l,className:s,kind:c="error",lowContrast:u,hideCloseButton:d=!1,...p}){const[m,g]=(0,h.useState)(!0),b=C(),y=v()(s,{[`${b}--inline-notification`]:!0,[`${b}--inline-notification--low-contrast`]:u,[`${b}--inline-notification--${c}`]:c,[`${b}--inline-notification--hide-close-button`]:d}),w=(0,h.useRef)(null);Bt(w);const E=(0,h.useRef)(null);return m?h.createElement("div",f({ref:E},p,{role:o,className:y}),h.createElement("div",{className:`${b}--inline-notification__details`},h.createElement(ba,{notificationType:"inline",kind:c,iconDescription:l||`${c} icon`}),h.createElement("div",{ref:w,className:`${b}--inline-notification__text-wrapper`},n&&h.createElement(Yt,{as:"div",className:`${b}--inline-notification__title`},n),r&&h.createElement(Yt,{as:"div",className:`${b}--inline-notification__subtitle`},r),t)),!d&&h.createElement(ha,{notificationType:"inline",onClick:function(e){a(e),i&&!1===i(e)||g(!1)},"aria-label":e})):null}function ya({actionButtonLabel:e,"aria-label":t,ariaLabel:n,caption:r,children:o,role:i="alertdialog",onActionButtonClick:a,onClose:l,onCloseButtonClick:s=mn,statusIconDescription:c,className:u,inline:d=!1,kind:p="error",lowContrast:m,hideCloseButton:g=!1,hasFocus:b=!0,closeOnEscape:y=!0,title:w,subtitle:x,..._}){const[O,N]=(0,h.useState)(!0),T=C(),S=Dt("actionable-notification"),$=Dt("actionable-notification-subtitle"),I=v()(u,{[`${T}--actionable-notification`]:!0,[`${T}--actionable-notification--toast`]:!d,[`${T}--actionable-notification--low-contrast`]:m,[`${T}--actionable-notification--${p}`]:p,[`${T}--actionable-notification--hide-close-button`]:g}),A=(0,h.useRef)(null),R=(0,h.useRef)(null),k=(0,h.useRef)(null),P=(0,h.useRef)(null),L=gt("enable-experimental-focus-wrap-without-sentinels"),M=gt("enable-focus-wrap-without-sentinels")||L;function D(e){s(e),l&&!1===l(e)||N(!1)}return E(()=>{if(b&&"alertdialog"===i){const e=document.querySelector(`button.${T}--actionable-notification__action-button`);e?.focus()}}),function(e,t,n=!0){const r=r=>{const o=e.current&&document.activeElement===e.current||e.current?.contains(document.activeElement);$t(r,[xt])&&n&&o&&t(r)};E(()=>(null!==e.current&&document.addEventListener("keydown",r,!1),()=>document.removeEventListener("keydown",r,!1)))}(P,D,y),O?h.createElement("div",f({},_,{ref:P,role:i,className:I,"aria-labelledby":w?S:$,onBlur:M?()=>{}:function({target:e,relatedTarget:t}){if(O&&t&&e&&"alertdialog"===i){const{current:n}=A,{current:r}=R,{current:o}=k;Fi({bodyNode:n,startTrapNode:r,endTrapNode:o,currentActiveNode:t,oldActiveNode:e,prefix:T})}},onKeyDown:M?function(e){O&&It(e,wt)&&P.current&&"alertdialog"===i&&zi({containerNode:P.current,currentActiveNode:e.target,event:e})}:()=>{}}),!M&&h.createElement("span",{ref:R,tabIndex:0,role:"link",className:`${T}--visually-hidden`},"Focus sentinel"),h.createElement("div",{ref:A,className:`${T}--actionable-notification__focus-wrapper`},h.createElement("div",{className:`${T}--actionable-notification__details`},h.createElement(ba,{notificationType:d?"inline":"toast",kind:p,iconDescription:c||`${p} icon`}),h.createElement("div",{className:`${T}--actionable-notification__text-wrapper`},h.createElement("div",{className:`${T}--actionable-notification__content`},w&&h.createElement(Yt,{as:"div",className:`${T}--actionable-notification__title`,id:S},w),x&&h.createElement(Yt,{as:"div",className:`${T}--actionable-notification__subtitle`,id:$},x),r&&h.createElement(Yt,{as:"div",className:`${T}--actionable-notification__caption`},r),o))),h.createElement("div",{className:`${T}--actionable-notification__button-wrapper`},e&&h.createElement(ma,{onClick:a,inline:d},e),!g&&h.createElement(ha,{"aria-label":n||t,notificationType:"actionable",onClick:D}))),!M&&h.createElement("span",{ref:k,tabIndex:0,role:"link",className:`${T}--visually-hidden`},"Focus sentinel")):null}ba.propTypes={iconDescription:m().string.isRequired,kind:m().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:m().oneOf(["inline","toast"]).isRequired},m().string,mt(m().string),m().string,m().node,m().string,m().bool,m().oneOf(["error","info","info-square","success","warning","warning-alt"]),m().bool,m().func,m().func,m().oneOf(["alert","log","status"]),m().string,m().string,m().number,m().string,va.propTypes={"aria-label":m().string,children:m().node,className:m().string,hideCloseButton:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onClose:m().func,onCloseButtonClick:m().func,role:m().oneOf(["alert","log","status"]),statusIconDescription:m().string,subtitle:m().string,title:m().string},ya.propTypes={actionButtonLabel:m().string,"aria-label":m().string,ariaLabel:mt(m().string),caption:m().string,children:m().node,className:m().string,closeOnEscape:m().bool,hasFocus:mt(m().bool),hideCloseButton:m().bool,inline:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onActionButtonClick:m().func,onClose:m().func,onCloseButtonClick:m().func,role:m().string,statusIconDescription:m().string,subtitle:m().node,title:m().string};const wa={error:"warning",success:"info"};m().string,m().node,m().string,w(m().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],e=>wa[e]),m().bool,m().func,m().string,m().node,m().string,m().string;const Ea=h.forwardRef((e,t)=>{const{className:n,decorator:r,disabled:o=!1,hideLabel:i,id:a,labelPosition:l="right",labelText:s="",name:c,onChange:u=()=>{},value:d="",slug:p,required:m,invalid:g=!1,invalidText:b,warn:y=!1,warnText:w,readOnly:E,...x}=e,_=C(),O=Dt("radio-button"),N=a||O,T=Uo({id:N,readOnly:E,disabled:o,invalid:g,invalidText:b,warn:y,warnText:w}),S=v()(`${_}--radio-button__label-text`,{[`${_}--visually-hidden`]:i}),$=v()(n,`${_}--radio-button-wrapper`,{[`${_}--radio-button-wrapper--label-${l}`]:"right"!==l,[`${_}--radio-button-wrapper--slug`]:p,[`${_}--radio-button-wrapper--decorator`]:r,[`${_}--radio-button-wrapper--invalid`]:T.invalid,[`${_}--radio-button-wrapper--warning`]:T.warn}),I=(0,h.useRef)(null),A=p??r,R=$n(A,Sn)?(0,h.cloneElement)(A,{size:"inline"===A.props?.kind?"md":"mini"}):A;return h.createElement("div",{className:$},h.createElement("input",f({},x,{type:"radio",className:`${_}--radio-button`,onChange:function(e){u(d,c,e)},id:N,ref:Ho(I,t),disabled:T.disabled,value:d,name:c,required:m,readOnly:E})),h.createElement("label",{htmlFor:N,className:`${_}--radio-button__label`},h.createElement("span",{className:`${_}--radio-button__appearance`}),s&&h.createElement(Yt,{className:S},s,p?R:r?h.createElement("div",{className:`${_}--radio-button-wrapper-inner--decorator`},R):"")),T.validation)});function xa(e){const{className:t,...n}=e,r=C();return h.createElement("div",f({className:v()(`${r}--radio-button-wrapper`,t)},n),h.createElement("div",{className:`${r}--radio-button ${r}--skeleton`}),h.createElement("span",{className:`${r}--radio-button__label ${r}--skeleton`}))}Ea.displayName="RadioButton",Ea.propTypes={checked:m().bool,className:m().string,decorator:m().node,defaultChecked:m().bool,disabled:m().bool,hideLabel:m().bool,id:m().string,labelPosition:m().oneOf(["right","left"]),labelText:m().node.isRequired,name:m().string,onChange:m().func,onClick:m().func,required:m().bool,invalid:m().bool,invalidText:m().node,warn:m().bool,warnText:m().node,readOnly:m().bool,slug:mt(m().node),value:m().oneOfType([m().string,m().number])},xa.propTypes={className:m().string};const _a=e=>h.createElement(Yt,f({as:"legend"},e));const Ca=h.forwardRef((e,t)=>{const{children:n,className:r,decorator:o,defaultSelected:i,disabled:a,helperText:l,invalid:s=!1,invalidText:c,labelPosition:u="right",legendText:d,name:p,onChange:m=()=>{},orientation:g="horizontal",readOnly:b,valueSelected:y,warn:w=!1,warnText:E,slug:x,required:_,...O}=e,N=C(),[T,S]=(0,h.useState)(y??i),$=(0,h.useRef)(y),I=Dt();function A(e,t,n){b||e!==T&&(S(e),m(e,p,n))}(0,h.useEffect)(()=>{y!==$.current&&(S(y),$.current=y)},[y]);const R=!b&&!a&&!s&&w,k=!s&&!a&&!w,P=v()(`${N}--form-item`,r),L=v()(`${N}--radio-button-group`,{[`${N}--radio-button-group--${g}`]:"vertical"===g,[`${N}--radio-button-group--label-${u}`]:u,[`${N}--radio-button-group--readonly`]:b,[`${N}--radio-button-group--invalid`]:!b&&!a&&s,[`${N}--radio-button-group--warning`]:R,[`${N}--radio-button-group--slug`]:x,[`${N}--radio-button-group--decorator`]:o}),M=v()(`${N}--form__helper-text`,{[`${N}--form__helper-text--disabled`]:a}),D=null!=l,B=D?`radio-button-group-helper-text-${I}`:void 0,j=D&&h.createElement("div",{id:B,className:M},l),V=(0,h.useRef)(null),F=x??o,z=$n(F,Sn)?(0,h.cloneElement)(F,{size:"mini",kind:"default"}):F;return h.createElement("div",{className:P,ref:Ho(V,t)},h.createElement("fieldset",f({className:L,disabled:a,"data-invalid":!!s||void 0,"aria-describedby":k&&l?B:void 0},O),d&&h.createElement(_a,{className:`${N}--label`},d,x?z:o?h.createElement("div",{className:`${N}--radio-button-group-inner--decorator`},z):""),h.Children.map(n,e=>{if(!e)return;const t={name:p,key:e.props.value,value:e.props.value,onChange:A,checked:e.props.value===T,required:_};return!T&&e.props.checked&&(t.checked=!0),h.cloneElement(e,t)})),h.createElement("div",{className:`${N}--radio-button__validation-msg`},!b&&!a&&s&&h.createElement(h.Fragment,null,h.createElement(pn,{className:`${N}--radio-button__invalid-icon`}),h.createElement("div",{className:`${N}--form-requirement`},c)),R&&h.createElement(h.Fragment,null,h.createElement(fn,{className:`${N}--radio-button__invalid-icon ${N}--radio-button__invalid-icon--warning`}),h.createElement("div",{className:`${N}--form-requirement`},E))),k&&j)});var Oa,Na;Ca.propTypes={children:m().node,className:m().string,decorator:m().node,defaultSelected:m().oneOfType([m().string,m().number]),disabled:m().bool,helperText:m().node,invalid:m().bool,invalidText:m().node,labelPosition:m().oneOf(["left","right"]),legendText:m().node,name:m().string.isRequired,onChange:m().func,orientation:m().oneOf(["horizontal","vertical"]),readOnly:m().bool,required:m().bool,slug:mt(m().node),valueSelected:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node},Ca.displayName="RadioButtonGroup";const Ta=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Oa||(Oa=h.createElement("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Na||(Na=h.createElement("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"})),e)}),Sa=e=>""!==e&&void 0!==e;var $a;const Ia=h.forwardRef(({autoComplete:e="off",className:t,closeButtonLabelText:n="Clear search input",defaultValue:r,disabled:o,isExpanded:i=!0,id:a,labelText:l,light:s,onChange:c=()=>{},onClear:u=()=>{},onKeyDown:d,onExpand:p,placeholder:m="Search",renderIcon:g,role:b,size:y="md",type:w="search",value:E,..._},O)=>{const N=Sa(E)||Sa(r),T=C(),{isFluid:S}=(0,h.useContext)(co),$=(0,h.useRef)(null),I=x([O,$]),A=(0,h.useRef)(null),R=Dt("search-input"),k=a||R,P=`${k}-search`,[L,M]=(0,h.useState)(N||!1),[D,B]=(0,h.useState)(E),j=v()({[`${T}--search`]:!0,[`${T}--search--sm`]:"sm"===y,[`${T}--search--md`]:"md"===y,[`${T}--search--lg`]:"lg"===y,[`${T}--search--light`]:s,[`${T}--search--disabled`]:o,[`${T}--search--fluid`]:S},t),V=v()({[`${T}--search-close`]:!0,[`${T}--search-close--hidden`]:!L||!i});function F(){if(!E&&$.current&&($.current.value=""),$.current){const e=Object.assign({},$.current,{value:""}),t={bubbles:!1,cancelable:!1,currentTarget:$.current,defaultPrevented:!1,eventPhase:0,isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,isTrusted:!1,nativeEvent:new Event("change"),persist:mn,preventDefault:mn,stopPropagation:mn,target:e,timeStamp:0,type:"change"};c(t)}u(),M(!1),$.current?.focus()}E!==D&&(M(Sa(E)),B(E));const z=h.createElement("div",{"aria-labelledby":p?P:void 0,role:p?"button":void 0,className:`${T}--search-magnifier`,onClick:p,onKeyDown:function(e){(It(e,Et)||It(e,_t))&&(e.stopPropagation(),p&&p(e))},tabIndex:p&&!i?0:-1,ref:A,"aria-expanded":!(!p||!i)||!(p&&!i)&&void 0,"aria-controls":p?k:void 0},h.createElement(Aa,{icon:g})),H=p&&!i?h.createElement(Ht,{className:`${T}--search-tooltip ${T}--search-magnifier-tooltip`,align:"top",label:"Search"},z):z;return h.createElement("div",{role:"search","aria-label":m,className:j},H,h.createElement("label",{id:P,htmlFor:k,className:`${T}--label`},l),h.createElement("input",f({autoComplete:e,className:`${T}--search-input`,defaultValue:r,disabled:o,role:b,ref:I,id:k,onChange:Hi([c,function(e){M(""!==e.target.value)}]),onKeyDown:Hi([d,function(e){It(e,xt)&&(e.stopPropagation(),$.current?.value?F():p&&i&&A.current?.focus())}]),placeholder:m,type:w,value:E,tabIndex:p&&!i?-1:void 0},_)),h.createElement("button",{"aria-label":n,className:V,disabled:o,onClick:F,title:n,type:"button"},$a||($a=h.createElement(oo,null))))});function Aa({icon:e}){const t=C();return e?h.createElement(e,{className:`${t}--search-magnifier-icon`}):h.createElement(Ta,{className:`${t}--search-magnifier-icon`})}Ia.displayName="Search",Ia.propTypes={autoComplete:m().string,className:m().string,closeButtonLabelText:m().string,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,id:m().string,isExpanded:m().bool,labelText:m().node.isRequired,light:mt(m().bool),onChange:m().func,onClear:m().func,onExpand:m().func,onKeyDown:m().func,placeholder:m().string,renderIcon:m().oneOfType([m().func,m().object]),role:mt(m().string),size:m().oneOf(["sm","md","lg"]),type:m().string,value:m().oneOfType([m().string,m().number])},Aa.propTypes={icon:m().oneOfType([m().func,m().object])};const Ra=({className:e,...t})=>{const n=C(),r=v()(e,{[`${n}--icon--skeleton`]:!0});return h.createElement("div",f({className:r},t))};function ka(e){return"".concat(e/16,"rem")}Ra.propTypes={className:m().string};ka(320);var Pa={width:ka(672),columns:8,margin:ka(16)},La={width:ka(1056),columns:16,margin:ka(16)};ka(1312),ka(16),ka(1584),ka(24);function Ma(e){return ka(8*e)}Ma(.25),Ma(.5),Ma(1),Ma(1.5),Ma(2),Ma(3),Ma(4),Ma(5),Ma(6),Ma(8),Ma(10),Ma(12),Ma(20),Ma(2),Ma(3),Ma(4),Ma(6),Ma(8),Ma(12),Ma(20),Ma(3),Ma(4),Ma(5),Ma(6),Ma(8),ka(24),ka(32),ka(40),ka(48),ka(64),ka(80);const Da=h.createContext({mode:"flexbox",subgrid:!1}),Ba=({children:e,mode:t,subgrid:n=!1})=>{const r=h.useMemo(()=>({mode:t,subgrid:n}),[t,n]);return h.createElement(Da.Provider,{value:r},e)};Ba.propTypes={children:m().node,mode:m().oneOf(["flexbox","css-grid"]).isRequired,subgrid:m().bool};const ja=h.forwardRef(({align:e,as:t,children:n,className:r,condensed:o=!1,fullWidth:i=!1,narrow:a=!1,...l},s)=>{const c=C(),{subgrid:u}=h.useContext(Da);let d="wide";if(a?d="narrow":o&&(d="condensed"),u)return h.createElement(Ba,{mode:"css-grid",subgrid:!0},h.createElement(Va,f({ref:s,as:t,className:r,mode:d},l),n));const p=v()(r,{[`${c}--css-grid`]:!0,[`${c}--css-grid--condensed`]:"condensed"===d,[`${c}--css-grid--narrow`]:"narrow"===d,[`${c}--css-grid--full-width`]:i,[`${c}--css-grid--start`]:"start"===e,[`${c}--css-grid--end`]:"end"===e}),m=t||"div";return h.createElement(Ba,{mode:"css-grid",subgrid:!0},h.createElement(m,f({className:p,ref:s},l),n))});ja.propTypes={as:m().oneOfType([m().string,m().elementType]),align:m().oneOf(["start","center","end"]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool};const Va=h.forwardRef(({as:e,className:t,children:n,mode:r,...o},i)=>{const a=C(),l=v()(t,{[`${a}--subgrid`]:!0,[`${a}--subgrid--condensed`]:"condensed"===r,[`${a}--subgrid--narrow`]:"narrow"===r,[`${a}--subgrid--wide`]:"wide"===r}),s=e||"div";return h.createElement(s,f({},o,{ref:i,className:l}),n)});Va.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,mode:m().oneOf(["wide","narrow","condensed"])};const Fa=h.forwardRef(({as:e,condensed:t=!1,narrow:n=!1,fullWidth:r=!1,className:o,children:i,...a},l)=>{const s=C(),c=v()(o,{[`${s}--grid`]:!0,[`${s}--grid--condensed`]:t,[`${s}--grid--narrow`]:n,[`${s}--grid--full-width`]:r}),u=e||"div";return h.createElement(Ba,{mode:"flexbox",subgrid:!1},h.createElement(u,f({className:c,ref:l},a),i))});Fa.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool};m().oneOf(["start","center","end"]),m().oneOfType([m().string,m().elementType]),m().node,m().string,m().bool,m().bool,m().bool;const za=(e,{onPress:t,onPressIn:n,onPressOut:r,onLongPress:o,delayLongPressMs:i=500}={})=>{const a=(0,h.useRef)(t),l=(0,h.useRef)(n),s=(0,h.useRef)(r),c=(0,h.useRef)(o),[u,d]=(0,h.useState)(!1),[f,p]=(0,h.useState)(!1),m=(0,h.useRef)({longPress:!1});(0,h.useEffect)(()=>{a.current=t},[t]),(0,h.useEffect)(()=>{l.current=n},[n]),(0,h.useEffect)(()=>{s.current=r},[r]),(0,h.useEffect)(()=>{c.current=o},[o]),(0,h.useEffect)(()=>{const t=e.current;if(!t)return;const n=e=>{d(!0),l.current?.(),e.preventDefault()},r=()=>{d(!1),p(!1),s.current?.(m.current)},o=()=>{d(!1),p(!1),s.current?.(m.current),m.current.longPress=!1},i=()=>{d(!1),p(!1),s.current?.(m.current),m.current.longPress=!1},c=()=>{p(!1),d(!1),a.current?.(m.current),m.current.longPress=!1},u=e=>{e.preventDefault()};return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",o),t.addEventListener("pointerleave",i),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",o),t.removeEventListener("pointerleave",i),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}},[e]),(0,h.useEffect)(()=>{if(u){const e=setTimeout(()=>{d(!1),p(!0)},i);return()=>{clearTimeout(e)}}},[u,i]),(0,h.useEffect)(()=>{if(f)return m.current.longPress=!0,c.current?.()},[f])},Ha=(e,t=!1)=>{const[n,r]=(0,h.useState)(t);return(0,h.useEffect)(()=>{const t=e=>{r(e.matches)},n=window.matchMedia(e);return n.addEventListener("change",t),r(n.matches),()=>{n.removeEventListener("change",t)}},[e]),n};var Ua,Wa,qa;const Ka=h.createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Ga=h.createContext({index:0,hasSecondaryLabel:!1}),Za=`(min-width: ${La.width})`,Ja=(Pa.width,h.createContext(0));function Ya({children:e,defaultSelectedIndex:t=0,onChange:n,selectedIndex:r,dismissable:o,onTabCloseRequest:i}){const a=Dt("ccs");o&&!i&&console.error("dismissable property specified without also providing an onTabCloseRequest property.");const[l,s]=(0,h.useState)(t),[c,u]=(({defaultValue:e,name:t="custom",onChange:n,value:r})=>{const[o,i]=(0,h.useState)(void 0!==r?r:e),a=(0,h.useRef)(null);null===a.current&&(a.current=void 0!==r);const l=e=>{const t="function"==typeof e?e(o):e;!1===a.current&&i(t),n&&n(t)};return(0,h.useEffect)(()=>{a.current,a.current},[t,r]),!0===a.current?[r,l,a.current]:[o,l,a.current]})({value:r,defaultValue:t,onChange:e=>n?.({selectedIndex:e})}),d={baseId:a,activeIndex:l,defaultSelectedIndex:t,dismissable:o,onTabCloseRequest:i,setActiveIndex:s,selectedIndex:c,setSelectedIndex:u};return h.createElement(Ka.Provider,{value:d},e)}function Xa({activation:e="automatic","aria-label":t,children:n,className:r,contained:o=!1,fullWidth:i=!1,iconSize:a,leftOverflowButtonProps:l,light:s,rightOverflowButtonProps:c,scrollDebounceWait:u=200,scrollIntoView:d,...p}){const{activeIndex:m,selectedIndex:g,setSelectedIndex:b,setActiveIndex:y,dismissable:w}=h.useContext(Ka),x=C(),_=(0,h.useRef)(null),O=(0,h.useRef)(null),N=(0,h.useRef)(null),[T,S]=(0,h.useState)(!1),[$,I]=(0,h.useState)(0),A=o&&h.Children.toArray(n).some(e=>$n(e,el)&&void 0!==e.props.secondaryLabel),R=Ha(Za),k=i&&o&&R&&h.Children.toArray(n).length<9,P=v()(`${x}--tabs`,{[`${x}--tabs--contained`]:o,[`${x}--tabs--light`]:s,[`${x}--tabs__icon--default`]:"default"===a,[`${x}--tabs__icon--lg`]:"lg"===a,[`${x}--layout--size-lg`]:"lg"===a,[`${x}--tabs--tall`]:A,[`${x}--tabs--full-width`]:k,[`${x}--tabs--dismissable`]:w},r),L=44,[M,D]=(0,h.useState)(!!_.current&&$+L+_.current.clientWidth<_.current.scrollWidth),B=!!_.current&&T&&$>0,j=v()(`${x}--tab--overflow-nav-button`,`${x}--tab--overflow-nav-button--previous`,{[`${x}--tab--overflow-nav-button--hidden`]:!B}),V=v()(`${x}--tab--overflow-nav-button`,`${x}--tab--overflow-nav-button--next`,{[`${x}--tab--overflow-nav-button--hidden`]:!M}),F=(0,h.useRef)([]),z=(0,h.useCallback)(()=>{Ui(()=>{_.current&&I(_.current.scrollLeft)},u)()},[u]);function H(e){if(T&&_.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,o=_.current.scrollLeft+L,i=_.current.scrollLeft+_.current.clientWidth-L;n<o&&I(n-L),r>i&&I(r+L-_.current.clientWidth)}}return(0,h.useEffect)(()=>{const e=F.current[g];d&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})},[]),(0,h.useEffect)(()=>{D(!!_.current&&$+L+_.current.clientWidth+1<_.current.scrollWidth),w&&_.current&&S(_.current.scrollWidth>_.current.clientWidth+1)},[n,w,$]),(0,h.useEffect)(()=>{if(F.current[g]?.disabled){const e=F.current.filter(e=>!e.disabled);if(e.length>0){const t=e[0];b(F.current.indexOf(t))}}},[]),E(()=>{_.current&&S(_.current.scrollWidth>_.current.clientWidth+1);const e=Ui(function(){_.current&&S(_.current.scrollWidth>_.current.clientWidth+1)},200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[]),E(()=>{null!==$&&_.current&&(_.current.scrollLeft=$)},[$]),E(()=>{H("manual"===e?F.current[m]:F.current[g])},[e,m]),E(()=>{H(F.current[g])},[g,T,n]),za(O,{onPress({longPress:e}){!e&&_.current&&I(Math.max($-_.current.scrollWidth/F.current.length*1.5,0))},onLongPress:()=>Qa(_,"backward",I)}),za(N,{onPress({longPress:e}){!e&&_.current&&I(Math.min($+_.current.scrollWidth/F.current.length*1.5,_.current.scrollWidth-_.current.clientWidth))},onLongPress:()=>Qa(_,"forward",I)}),h.createElement("div",{className:P},h.createElement("button",f({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:O,className:j,type:"button"},l),Ua||(Ua=h.createElement(no,null))),h.createElement("div",f({},p,{"aria-label":t,ref:_,role:"tablist",className:`${x}--tab--list`,onScroll:z,onKeyDown:function(t){if($t(t,[Tt,Nt,Ot,Ct])){t.preventDefault();const n=F.current.filter(e=>null!==e).filter(e=>!e.disabled),r=n.indexOf(F.current["automatic"===e?g:m]),o=F.current.indexOf(n[function(e,t,n){switch(!0){case It(e,Tt):return(n+1)%t;case It(e,Nt):return(t+n-1)%t;case It(e,Ot):return 0;case It(e,Ct):return t-1;default:return n}}(t,n.length,r)]);"automatic"===e?b(o):"manual"===e&&y(o),F.current[o]?.focus()}},onBlur:function({relatedTarget:t}){_.current?.contains(t)||"manual"===e&&y(g)}}),h.Children.map(n,(e,t)=>(0,h.isValidElement)(e)?h.createElement(Ga.Provider,{value:{index:t,hasSecondaryLabel:A,contained:o}},(0,h.cloneElement)(e,{ref:e=>{e&&(F.current[t]=e)}})):null)),h.createElement("button",f({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:N,className:V,type:"button"},c),Wa||(Wa=h.createElement(ro,null))))}function Qa(e,t,n){const r=e.current;if(!r)return()=>{};const o=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const i="forward"===t?5:-5;let a=null;return a=requestAnimationFrame(function e(){r&&(r.scrollLeft=r.scrollLeft+i,a=requestAnimationFrame(e))}),()=>{r.style["scroll-behavior"]=o,n(r.scrollLeft),a&&cancelAnimationFrame(a)}}Ya.propTypes={children:m().node,defaultSelectedIndex:m().number,dismissable:m().bool,onChange:m().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:m().number},m().node,m().number,m().string,m().func,m().number,Xa.propTypes={activation:m().oneOf(["automatic","manual"]),"aria-label":m().string,children:m().node,className:m().string,contained:m().bool,fullWidth:m().bool,iconSize:m().oneOf(["default","lg"]),leftOverflowButtonProps:m().object,light:mt(m().bool),rightOverflowButtonProps:m().object,scrollDebounceWait:m().number,scrollIntoView:m().bool},m().oneOf(["automatic","manual"]),m().string,m().node,m().string;const el=(0,h.forwardRef)(({as:e="button",children:t,className:n,disabled:r,onClick:o,onKeyDown:i,secondaryLabel:a,renderIcon:l,...s},c)=>{const u=C(),{selectedIndex:d,setSelectedIndex:p,baseId:m,dismissable:g,onTabCloseRequest:b}=h.useContext(Ka),{index:y,hasSecondaryLabel:w,contained:_}=h.useContext(Ga),{badgeIndicator:N}=h.useContext(tl)||{},T=(0,h.useRef)(null),S=(0,h.useRef)(null),$=x([c,S]),[I,A]=(0,h.useState)(!1),R=`${m}-tab-${y}`,k=`${m}-tabpanel-${y}`,[P,L]=(0,h.useState)(!1),M=v()(`${u}--tabs__nav-item`,`${u}--tabs__nav-link`,{[`${u}--tabs__nav-item--selected`]:d===y,[`${u}--tabs__nav-item--disabled`]:r,[`${u}--tabs__nav-item--hover-off`]:I},n),D=e;O(T,"mouseover",e=>{_&&S.current&&(e.stopPropagation(),A(!0),S.current.classList.add(`${u}--tabs__nav-item--hover-off`))}),O(T,"mouseleave",()=>{_&&S.current&&(S.current.classList.remove(`${u}--tabs__nav-item--hover-off`),A(!1))}),E(()=>{function e(){const e=document.getElementById(`${R}`)||S.current;if(e?.closest(`.${u}--tabs--vertical`)){const t=e?.getElementsByClassName(`${u}--tabs__nav-item-label`)[0];(e=>{L(e.offsetHeight<e.scrollHeight),e.offsetHeight,e.scrollHeight})(t)}}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[u,R]);const B=e=>{if(e.stopPropagation(),b?.(y),S.current&&S.current.parentElement){const e=Array.from(S.current.parentElement.childNodes).filter(e=>e instanceof HTMLElement&&e.classList.contains(`${u}--tabs__nav-link`)&&!e.classList.contains(`${u}--tabs__nav-item--disabled`)).length;if(S.current&&y+1!==e)S.current.focus();else{const t=2*(e-2),n=S.current.parentElement.childNodes[t];n instanceof HTMLElement&&n.focus()}}},j=e=>{g&&It(e,St)&&B(e),i?.(e)},V=h.createElement("div",{className:v()({[`${u}--tabs__nav-item--close`]:g,[`${u}--tabs__nav-item--close--hidden`]:!g})},h.createElement("button",{type:"button",tabIndex:-1,"aria-disabled":r,"aria-hidden":d===y&&g?"false":"true",disabled:r,className:v()({[`${u}--tabs__nav-item--close-icon`]:g,[`${u}--visually-hidden`]:!g,[`${u}--tabs__nav-item--close-icon--selected`]:d===y,[`${u}--tabs__nav-item--close-icon--disabled`]:r}),onClick:B,title:`Remove ${"string"==typeof t?t:""} tab`,ref:T},h.createElement(oo,{"aria-hidden":d===y&&g?"false":"true","aria-label":`Press delete to remove ${"string"==typeof t?t:""} tab`}))),F=l??g;return P?h.createElement(Ht,{label:t,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0},h.createElement(D,f({},s,{"aria-controls":k,"aria-disabled":r,"aria-selected":d===y,ref:$,id:R,role:"tab",className:M,disabled:r,title:t,onClick:e=>{r||(p(y),o?.(e))},onKeyDown:j,tabIndex:d===y?"0":"-1",type:"button"}),h.createElement("div",{className:`${u}--tabs__nav-item-label-wrapper`},h.createElement(Yt,{className:`${u}--tabs__nav-item-label`},t)),w&&a&&h.createElement(Yt,{as:"div",className:`${u}--tabs__nav-item-secondary-label`,title:a},a))):h.createElement(h.Fragment,null,h.createElement(D,f({},s,{"aria-controls":k,"aria-disabled":r,"aria-selected":d===y,ref:$,id:R,role:"tab",className:M,disabled:r,onClick:e=>{r||(p(y),o?.(e))},onKeyDown:j,tabIndex:d===y?"0":"-1",type:"button"}),h.createElement("div",{className:`${u}--tabs__nav-item-label-wrapper`},g&&l&&h.createElement("div",{className:`${u}--tabs__nav-item--icon-left`},h.createElement(l,{size:16})),h.createElement(Yt,{className:`${u}--tabs__nav-item-label`},t),!g&&l&&h.createElement("div",{className:v()(`${u}--tabs__nav-item--icon`,{[`${u}--visually-hidden`]:!F})},!g&&l&&h.createElement(l,{size:16}))),w&&a&&h.createElement(Yt,{as:"div",className:`${u}--tabs__nav-item-secondary-label`,title:a},a),!r&&N&&(qa||(qa=h.createElement(Wt,null)))),V)});el.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,disabled:m().bool,onClick:m().func,onKeyDown:m().func,renderButton:m().func,renderIcon:m().oneOfType([m().func,m().object]),secondaryLabel:m().string};const tl=(0,h.createContext)(!1);h.forwardRef(({badgeIndicator:e,children:t,className:n,defaultOpen:r=!1,enterDelayMs:o,leaveDelayMs:i,label:a,...l},s)=>{const c=C(),u=(0,h.useMemo)(()=>({badgeIndicator:e}),[e]),d=(0,h.isValidElement)(t)&&(20===t.props.size||"20"===t.props.size),p=v()(`${c}--tabs__nav-item--icon-only`,n,{[`${c}--tabs__nav-item--icon-only__20`]:d});return h.createElement(tl.Provider,{value:u},h.createElement(Ht,{align:"bottom",defaultOpen:r,className:`${c}--icon-tooltip`,enterDelayMs:o,label:a,leaveDelayMs:i},h.createElement(el,f({className:p,ref:s},l),t)))}).propTypes={badgeIndicator:m().bool,children:m().node,className:m().string,defaultOpen:m().bool,enterDelayMs:m().number,label:m().node.isRequired,leaveDelayMs:m().number};const nl=h.forwardRef(({children:e,className:t,...n},r)=>{const o=C(),{selectedIndex:i,baseId:a}=h.useContext(Ka),l=h.useContext(Ja),s=`${a}-tabpanel-${l}`,c=`${a}-tab-${l}`,u=v()(`${o}--tab-content`,t);return h.createElement("div",f({},n,{"aria-labelledby":c,id:s,className:u,ref:r,role:"tabpanel",hidden:i!==l}),e)});function rl({children:e}){const t=C(),n=(0,h.useRef)([]),r=(0,h.useRef)([]);return E(()=>{const e=n.current[0]?.previousElementSibling,o=e?.classList.contains(`${t}--tabs--vertical`),i=e?.parentElement?.style.height;if(o&&!i){r.current=n.current.map(e=>e?.hidden||!1),n.current.forEach(e=>{e&&(e.hidden=!1)});const t=n.current.map(e=>e?.offsetHeight||0),o=Math.max(...t);e instanceof HTMLElement&&(e.style.height=o+"px"),n.current.forEach((e,t)=>{e&&(e.hidden=r.current[t])})}}),h.createElement(h.Fragment,null,h.Children.map(e,(e,t)=>(0,h.isValidElement)(e)?h.createElement(Ja.Provider,{value:t},(0,h.cloneElement)(e,{ref:e=>{n.current[t]=e}})):null))}nl.propTypes={children:m().node,className:m().string},rl.propTypes={children:m().node};const ol=({align:e="bottom",autoAlign:t,className:n,children:r,definition:o,defaultOpen:i=!1,id:a,openOnHover:l,tooltipText:s,triggerClassName:c,...u})=>{const[d,p]=(0,h.useState)(i),m=C(),g=function(e){const t=Dt();return e??t}(a);return h.createElement(vt,{align:e,className:n,autoAlign:t,dropShadow:!1,highContrast:!0,onMouseLeave:()=>{p(!1)},onMouseEnter:()=>{l&&p(!0)},onFocus:()=>{p(!0)},open:d},h.createElement("button",f({},u,{className:v()(`${m}--definition-term`,c),"aria-controls":g,"aria-describedby":g,"aria-expanded":d,onBlur:()=>{p(!1)},onMouseDown:e=>{0===e.button&&p(!d)},onKeyDown:function(e){d&&It(e,xt)&&(e.stopPropagation(),p(!1))},type:"button"}),r),h.createElement(yt,{className:`${m}--definition-tooltip`,id:g},s??o))};var il;ol.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),autoAlign:m().bool,children:m().node.isRequired,className:m().string,defaultOpen:m().bool,definition:m().node.isRequired,id:m().string,openOnHover:m().bool,tooltipText:mt(m().node),triggerClassName:m().string};const al={red:"Red",magenta:"Magenta",purple:"Purple",blue:"Blue",cyan:"Cyan",teal:"Teal",green:"Green",gray:"Gray","cool-gray":"Cool-Gray","warm-gray":"Warm-Gray","high-contrast":"High-Contrast",outline:"Outline"},ll=h.forwardRef(({children:e,className:t,decorator:n,id:r,type:o,filter:i,renderIcon:a,title:l="Clear filter",disabled:s,onClose:c,size:u,as:d,slug:p,...m},g)=>{const b=C(),y=(0,h.useRef)(null);i&&console.warn("The `filter` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead."),c&&console.warn("The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.");const w=x([g,y]),_=Dt(),O=r??`tag-${_}`,[N,T]=(0,h.useState)(!1);E(()=>{const e=y.current?.getElementsByClassName(`${b}--tag__label`)[0];T((e=>!!e&&e?.offsetWidth<e?.scrollWidth)(e))},[b,y]);const S=[`${b}--tag--selectable`,`${b}--tag--filter`,`${b}--tag--operational`].some(e=>t?.includes(e)),$=v()(`${b}--tag`,t,{[`${b}--tag--disabled`]:s,[`${b}--tag--filter`]:i,[`${b}--tag--${u}`]:u,[`${b}--layout--size-${u}`]:u,[`${b}--tag--${o}`]:o,[`${b}--tag--interactive`]:m.onClick&&!S&&N}),I=void 0!==o&&o in Object.keys(al)?al[o]:"",A=e=>{c&&(e.stopPropagation(),c(e))},R=p??n,k=$n(R,Sn)&&!S?(0,h.cloneElement)(R,{size:"sm",kind:"inline"}):null;if(i){const t=d??"div";return h.createElement(t,f({className:$,id:O},m),a&&"sm"!==u?h.createElement("div",{className:`${b}--tag__custom-icon`},h.createElement(a,null)):"",h.createElement(Yt,{title:"string"==typeof e?e:void 0,className:`${b}--tag__label`},null!=e?e:I),k,h.createElement("button",{type:"button",className:`${b}--tag__close-icon`,onClick:A,disabled:s,"aria-label":l,title:l},il||(il=h.createElement(oo,null))))}const P=d??(m.onClick||t?.includes(`${b}--tag--operational`)?"button":"div"),L=v()({[`${b}--tag__label`]:!S});return h.createElement(P,f({ref:w,disabled:s,className:$,id:O,type:"button"===P?"button":void 0},m),a&&"sm"!==u?h.createElement("div",{className:`${b}--tag__custom-icon`},h.createElement(a,null)):"",N&&!S?h.createElement(ol,{openOnHover:!1,definition:null!=e?e:I,className:`${b}--definition--tooltip--tag`},h.createElement(Yt,{title:null!=e&&"string"==typeof e?e:I,className:L},null!=e?e:I)):h.createElement(Yt,{title:null!=e&&"string"==typeof e?e:I,className:L},null!=e?e:I),p?k:n?h.createElement("div",{className:`${b}--tag__decorator`},k):"")}),sl=ll;sl.propTypes={as:m().elementType,children:m().node,className:m().string,decorator:m().node,disabled:m().bool,filter:mt(m().bool),id:m().string,onClose:mt(m().func),renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(Object.keys({sm:"sm",md:"md",lg:"lg"})),slug:mt(m().node),title:mt(m().string),type:m().oneOf(Object.keys(al))};const cl=e=>({"data-invalid":!0,"aria-invalid":!0,"aria-describedby":e}),ul=e=>({"aria-describedby":e}),dl=e=>({"aria-describedby":e}),fl=(0,h.forwardRef)(({className:e,decorator:t,disabled:n=!1,helperText:r,hideLabel:o,id:i,inline:a=!1,invalid:l=!1,invalidText:s,labelText:c,light:u,onChange:d=()=>{},onClick:f=()=>{},placeholder:p,readOnly:m,size:g,type:b="text",warn:y=!1,warnText:w,enableCounter:E=!1,maxCount:_,slug:O,...N},T)=>{const S=C(),{defaultValue:$,value:I}=N,A=(0,h.useRef)(null),R=x([T,A]);function k(){return($||I||A.current?.value||"").toString().length}const[P,L]=(0,h.useState)(k());(0,h.useEffect)(()=>{L(k())},[I,$,E]);const M=Uo({id:i,readOnly:m,disabled:n,invalid:l,invalidText:s,warn:y,warnText:w}),D={id:i,onChange:e=>{M.disabled||(L(e.target.value?.length),d(e))},onClick:e=>{M.disabled||f(e)},placeholder:p,type:b,ref:R,className:v()(`${S}--text-input`,{[`${S}--text-input--light`]:u,[`${S}--text-input--invalid`]:M.invalid,[`${S}--text-input--warning`]:M.warn,[`${S}--text-input--${g}`]:g,[`${S}--layout--size-${g}`]:g}),title:p,disabled:M.disabled,readOnly:m,"aria-describedby":r&&M.helperId,...N};E&&(D.maxLength=_);const B=v()([v()(`${S}--form-item`,e)],`${S}--text-input-wrapper`,{[`${S}--text-input-wrapper--readonly`]:m,[`${S}--text-input-wrapper--light`]:u,[`${S}--text-input-wrapper--inline`]:a,[`${S}--text-input-wrapper--inline--invalid`]:a&&M.invalid}),j=v()(`${S}--label`,{[`${S}--visually-hidden`]:o,[`${S}--label--disabled`]:M.disabled,[`${S}--label--inline`]:a,[`${S}--label--inline--${g}`]:a&&!!g}),V=v()(`${S}--form__helper-text`,{[`${S}--form__helper-text--disabled`]:M.disabled,[`${S}--form__helper-text--inline`]:a}),F=v()(`${S}--text-input__field-outer-wrapper`,{[`${S}--text-input__field-outer-wrapper--inline`]:a}),z=v()(`${S}--text-input__field-wrapper`,{[`${S}--text-input__field-wrapper--warning`]:M.warn,[`${S}--text-input__field-wrapper--slug`]:O,[`${S}--text-input__field-wrapper--decorator`]:t}),H=v()({[`${S}--text-input__invalid-icon`]:M.invalid||M.warn,[`${S}--text-input__invalid-icon--warning`]:M.warn}),U=v()(`${S}--label`,{[`${S}--label--disabled`]:n,[`${S}--text-input__label-counter`]:!0}),W=E&&_?h.createElement(Yt,{as:"div",className:U},`${P}/${_}`):null,q=null!=c&&h.createElement(Yt,{as:"label",htmlFor:i,className:j},c),K=h.createElement("div",{className:`${S}--text-input__label-wrapper`},q,W),G=null!=r&&h.createElement(Yt,{as:"div",id:M.helperId,className:V},r),Z=h.createElement("input",(({sharedTextInputProps:e,invalid:t,invalidId:n,warn:r,warnId:o,hasHelper:i,helperId:a})=>({...e,...t?cl(n):{},...r?ul(o):{},...i?dl(a):{}}))({sharedTextInputProps:D,invalid:M.invalid,invalidId:M.invalidId,warn:M.warn,warnId:M.warnId})),{isFluid:J}=(0,h.useContext)(co),Y=(0,h.useRef)(null),[X,Q]=(0,h.useState)(""),ee=((e,t,n="character",r="characters")=>{if(void 0===t)return null;const o=t-e;return o<=10&&o>0?`${o} ${1===o?n:r} left.`:o<=0?`Maximum ${r} reached.`:null})(P,_);(0,h.useEffect)(()=>{if(ee&&ee!==X){const e=Y.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=ee,Q(ee))},1e3);return()=>{t&&clearTimeout(t)}}}},[ee,X]);const te=M.icon,ne=O??t,re=$n(ne,Sn)?(0,h.cloneElement)(ne,{size:"mini"}):ne;return h.createElement("div",{className:B},a?h.createElement("div",{className:`${S}--text-input__label-helper-wrapper`},K,!J&&(M.validation||G)):K,h.createElement("div",{className:F},h.createElement("div",{className:z,"data-invalid":M.invalid||null},te&&h.createElement(te,{className:H}),Z,O?re:t?h.createElement("div",{className:`${S}--text-input__field-inner-wrapper--decorator`},re):"",h.createElement("span",{className:`${S}--text-input__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:Y},ee),J&&h.createElement("hr",{className:`${S}--text-input__divider`}),J&&!a&&M.validation),!J&&!a&&(M.validation||G)))});var pl,ml,hl,gl;fl.displayName="TextInput",fl.propTypes={className:m().string,decorator:m().node,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,enableCounter:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,inline:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:mt(m().bool),maxCount:m().number,onChange:m().func,onClick:m().func,placeholder:m().string,readOnly:m().bool,size:m().oneOf(["sm","md","lg"]),slug:mt(m().node),type:m().string,value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node};const bl=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},pl||(pl=h.createElement("path",{d:"M9.3 3.7 13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"})),e):20===t||"20"===t||"20px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},ml||(ml=h.createElement("path",{d:"M11.8 2.8 10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"})),e):24===t||"24"===t||"24px"===t?h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},hl||(hl=h.createElement("path",{d:"M14 4 12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"})),e):h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},gl||(gl=h.createElement("path",{d:"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"})),e)});var vl,yl,wl;const El=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(dn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},vl||(vl=h.createElement("path",{d:"M19,21v-2h1v-7h-1v-2h4v2h-1v7h1v2h-4Z"})),yl||(yl=h.createElement("path",{d:"M15.5005,21h2l-3.5005-11h-3l-3.4966,11h1.9988l.6018-2h4.7781l.6184,2ZM10.7058,17l1.6284-5.4111.2559-.0024,1.6736,5.4136h-3.5579Z"})),wl||(wl=h.createElement("path",{d:"M32,32H0V0h32v32ZM2,30h28V2H2v28Z"})),e)}),xl=h.forwardRef(({as:e,children:t,className:n,href:r,disabled:o=!1,inline:i=!1,visited:a=!1,renderIcon:l,size:s,target:c,...u},d)=>{const p=C(),m={className:v()(`${p}--link`,n,{[`${p}--link--disabled`]:o,[`${p}--link--inline`]:i,[`${p}--link--visited`]:a,[`${p}--link--${s}`]:s}),rel:"_blank"===c?"noopener":void 0,target:c};o?(m.role="link",m["aria-disabled"]=!0):m.href=r;const g=e??"a";return h.createElement(g,f({ref:d},m,u,{onClick:e=>{o?(e.preventDefault(),e.stopPropagation()):u.onClick&&u.onClick(e)}}),t,!i&&l&&h.createElement("span",{className:`${p}--link__icon`},h.createElement(l,null)))}),_l=xl;var Cl,Ol,Nl,Tl;_l.displayName="Link",_l.propTypes={as:m().elementType,children:m().node,className:m().string,disabled:m().bool,href:m().string,inline:m().bool,renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(["sm","md","lg"]),visited:m().bool};const Sl=h.forwardRef(({children:e,className:t,decorator:n,light:r=!1,slug:o,hasRoundedCorners:i=!1,...a},l)=>{const s=C(),c=v()(`${s}--tile`,{[`${s}--tile--light`]:r,[`${s}--tile--slug`]:o,[`${s}--tile--slug-rounded`]:o&&i,[`${s}--tile--decorator`]:n,[`${s}--tile--decorator-rounded`]:n&&i},t);return h.createElement("div",f({className:c,ref:l},a),e,o,n&&h.createElement("div",{className:`${s}--tile--inner-decorator`},n))});Sl.displayName="Tile",Sl.propTypes={children:m().node,className:m().string,decorator:m().node,hasRoundedCorners:m().bool,light:mt(m().bool),slug:mt(m().node)};const $l=h.forwardRef(({children:e,className:t,clicked:n=!1,decorator:r,disabled:o,href:i,light:a,onClick:l=()=>{},onKeyDown:s=()=>{},renderIcon:c,hasRoundedCorners:u,slug:d,...p},m)=>{const g=C(),b=v()(`${g}--tile`,`${g}--tile--clickable`,{[`${g}--tile--is-clicked`]:n,[`${g}--tile--light`]:a,[`${g}--tile--slug`]:d,[`${g}--tile--slug-rounded`]:d&&u,[`${g}--tile--decorator`]:r,[`${g}--tile--decorator-rounded`]:r&&u},t),[y,w]=(0,h.useState)(n),E=gt("enable-v12-tile-default-icons");E&&(c||(c=bl),o&&(c=gi.$D));const x=v()({[`${g}--tile--icon`]:!E||E&&!o,[`${g}--tile--disabled-icon`]:E&&o});return h.createElement(_l,f({className:b,href:i,tabIndex:i||o?void 0:0,onClick:o?void 0:function(e){e?.persist?.(),w(!y),l(e)},onKeyDown:function(e){e?.persist?.(),!i&&$t(e,[Et,_t])&&(e.preventDefault(),w(!y),l(e)),s(e)},ref:m,disabled:o},p),d||r?h.createElement("div",{className:`${g}--tile-content`},e):e,(!0===d||!0===r)&&h.createElement(El,{size:"24",className:`${g}--tile--ai-label-icon`}),h.isValidElement(r)&&h.createElement("div",{className:`${g}--tile--inner-decorator`},r),c&&h.createElement(c,{className:x,"aria-hidden":"true"}))});$l.displayName="ClickableTile",$l.propTypes={children:m().node,className:m().string,clicked:m().bool,decorator:m().oneOfType([m().bool,m().node]),disabled:m().bool,hasRoundedCorners:m().bool,href:m().string,light:mt(m().bool),onClick:m().func,onKeyDown:m().func,rel:m().string,renderIcon:m().oneOfType([m().func,m().object])},h.forwardRef(({children:e,className:t,decorator:n,disabled:r,id:o,light:i,onClick:a=()=>{},onChange:l=()=>{},onKeyDown:s=()=>{},selected:c=!1,tabIndex:u=0,title:d="title",slug:p,hasRoundedCorners:m,...g},b)=>{const y=C(),w=a,E=s,[x,_]=(0,h.useState)(c);(0,h.useEffect)(()=>{_(c)},[c]);const O=v()(`${y}--tile`,`${y}--tile--selectable`,{[`${y}--tile--is-selected`]:x,[`${y}--tile--light`]:i,[`${y}--tile--disabled`]:r,[`${y}--tile--slug`]:p,[`${y}--tile--slug-rounded`]:p&&m,[`${y}--tile--decorator`]:n,[`${y}--tile--decorator-rounded`]:n&&m},t),N=(0,h.useCallback)((e,t)=>{_(t),l(e,t,o)},[l,o]),T=(0,h.useRef)(null),S=p??n,$=$n(S,Sn)?(0,h.cloneElement)(S,{size:"xs",ref:T}):S;return h.createElement("div",f({className:O,onClick:r?void 0:function(e){e.preventDefault(),e?.persist?.(),$&&T.current&&e.target instanceof Node&&T.current.contains(e.target)||(N(e,!x),w(e))},role:"checkbox","aria-checked":x,onKeyDown:r?void 0:function(e){e?.persist?.(),$t(e,[Et,_t])&&(e.preventDefault(),N(e,!x)),E(e)},tabIndex:r?void 0:u,ref:b,id:o,title:d},g),h.createElement("span",{className:`${y}--tile__checkmark ${y}--tile__checkmark--persistent`},x?Cl||(Cl=h.createElement(Xr,null)):Ol||(Ol=h.createElement(Yr,null))),h.createElement(Yt,{as:"label",htmlFor:o,className:`${y}--tile-content`},e),p?$:n?h.createElement("div",{className:`${y}--tile--inner-decorator`},$):"")}).propTypes={children:m().node,className:m().string,decorator:m().node,disabled:m().bool,hasRoundedCorners:m().bool,id:m().string,light:mt(m().bool),name:mt(m().string),onChange:m().func,onClick:m().func,onKeyDown:m().func,selected:m().bool,slug:mt(m().node),tabIndex:m().number,title:m().string,value:mt(m().oneOfType([m().string,m().number]))};const Il=(0,h.forwardRef)(({tabIndex:e=0,className:t,children:n,decorator:r,expanded:o=!1,tileMaxHeight:i=0,tilePadding:a=0,onClick:l,onKeyUp:s,tileCollapsedIconText:c="Interact to expand Tile",tileExpandedIconText:u="Interact to collapse Tile",tileCollapsedLabel:d,tileExpandedLabel:p,light:m,slug:g,hasRoundedCorners:b,...y},w)=>{const[_,O]=(0,h.useState)(0),[N,T]=(0,h.useState)(0),[S,$]=(0,h.useState)(o),[I,A]=(0,h.useState)(!0),R=(0,h.useRef)(null),k=(0,h.useRef)(null),P=(0,h.useRef)(null),L=(0,h.useRef)(null),M=(0,h.useRef)(null),D=x([w,M]),B=C();(0,h.useEffect)(()=>{$(o)},[o]);const j=()=>{$(e=>!e)},V=e=>{e.target!==M.current&&e.target!==P.current&&$t(e,[Et,_t])&&e.preventDefault()},F=v()(`${B}--tile`,`${B}--tile--expandable`,{[`${B}--tile--is-expanded`]:S,[`${B}--tile--light`]:m},t),z=v()(F,`${B}--tile--expandable--interactive`,{[`${B}--tile--slug`]:g,[`${B}--tile--slug-rounded`]:g&&b,[`${B}--tile--decorator`]:r,[`${B}--tile--decorator-rounded`]:r&&b}),H=v()(`${B}--tile__chevron`,`${B}--tile__chevron--interactive`),U=h.Children.toArray(n);E(()=>{if(!M.current||!R.current)return;const e=window.getComputedStyle(M.current),t=parseInt(e.getPropertyValue("padding-top"),10)||0,n=parseInt(e.getPropertyValue("padding-bottom"),10)||0;T(t+n),O(R.current.scrollHeight)},[]),E(()=>{if(!R.current||!k.current)return;const e=Boolean(jt(R.current))||Boolean(Vt(R.current))||Boolean(jt(k.current))||Boolean(Vt(k.current))||Boolean(g||r);A(e)},[g,r,n]),E(()=>{if(!M.current)return;if(S)return void(M.current.style.maxHeight="");const e=_||R.current?.scrollHeight||0,t=i>0?i:e,n=a>0?a:N;M.current.style.maxHeight=`${t+n}px`},[S,i,a,_,N]),(0,h.useEffect)(()=>{if(!R.current)return;const e=new ResizeObserver(()=>{R.current&&O(R.current.scrollHeight)});return e.observe(R.current),()=>e.disconnect()},[]);const W=Dt(I?"expandable-tile-interactive":"expandable-tile"),q=g??r,K=$n(q,Sn)?(0,h.cloneElement)(q,{size:"xs"}):q;return I?h.createElement("div",f({ref:D,className:z},y),h.createElement("div",{ref:L},g?K:r?h.createElement("div",{className:`${B}--tile--inner-decorator`},K):"",h.createElement("div",{ref:R,className:`${B}--tile-content`},U[0]),h.createElement("button",{type:"button","aria-expanded":S,"aria-controls":W,onKeyUp:Hi([s,V]),onClick:Hi([l,j]),"aria-label":S?u:c,ref:P,className:H},Nl||(Nl=h.createElement(to,null))),h.createElement("div",{ref:k,className:`${B}--tile-content`,id:W},U[1]))):h.createElement("button",f({type:"button",ref:D,className:F,"aria-controls":W,"aria-expanded":S,title:S?u:c},y,{onKeyUp:Hi([s,V]),onClick:Hi([l,j]),tabIndex:e}),h.createElement("div",{ref:L},h.createElement("div",{ref:R,className:`${B}--tile-content`},U[0]),h.createElement("div",{className:`${B}--tile__chevron`},h.createElement("span",null,S?p:d),Tl||(Tl=h.createElement(to,null))),h.createElement("div",{ref:k,id:W,className:`${B}--tile-content`},U[1])))});Il.propTypes={children:m().node,className:m().string,decorator:m().node,expanded:m().bool,hasRoundedCorners:m().bool,id:m().string,light:mt(m().bool),onClick:m().func,onKeyUp:m().func,slug:mt(m().node),tabIndex:m().number,tileCollapsedIconText:m().string,tileCollapsedLabel:m().string,tileExpandedIconText:m().string,tileExpandedLabel:m().string},Il.displayName="ExpandableTile";const Al=h.forwardRef(({children:e},t)=>{const n=C();return h.createElement("div",{ref:t,className:`${n}--tile-content__above-the-fold`},e)});Al.propTypes={children:m().node},Al.displayName="TileAboveTheFoldContent";const Rl=h.forwardRef(({children:e},t)=>{const n=C();return h.createElement("div",{ref:t,className:`${n}--tile-content__below-the-fold`},e)});Rl.propTypes={children:m().node},Rl.displayName="TileBelowTheFoldContent";const kl=({className:e,children:t,...n})=>{const r=C(),o=v()(`${r}--header`,e);return h.createElement("header",f({},n,{className:o}),t)};kl.propTypes={"aria-label":m().string,"aria-labelledby":m().string,className:m().string};const Pl=(e=>{const t=Object.keys(e),n=e=>(t,n,r,...o)=>e(t,n,r,...o);return t.reduce((t,r)=>({...t,[r]:n(e[r])}),{})})({"aria-label":m().string,"aria-labelledby":m().string}),Ll=h.forwardRef(({"aria-label":e,"aria-labelledby":t,children:n,className:r,onClick:o,tooltipHighContrast:i=!0,tooltipDropShadow:a,isActive:l,tooltipAlignment:s,...c},u)=>{const d=C(),p=v()({[r]:!!r,[`${d}--header__action`]:!0,[`${d}--header__action--active`]:l}),m={"aria-label":e,"aria-labelledby":t};return h.createElement(Zt,f({},c,m,{className:p,onClick:o,type:"button",hasIconOnly:!0,size:"lg",kind:"ghost",iconDescription:e,tooltipPosition:"bottom",tooltipAlignment:s,tooltipDropShadow:a,tooltipHighContrast:i,ref:u}),n)});Ll.propTypes={...Pl,children:m().node.isRequired,className:m().string,isActive:m().bool,onClick:m().func,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipDropShadow:m().bool,tooltipHighContrast:m().bool},Ll.displayName="HeaderGlobalAction";const Ml=(({name:e,className:t,type:n})=>{function r({className:e,...r}){const o=C(),i=v()("function"==typeof t?t(o):t,e);return h.createElement(n,{...r,className:i||void 0})}return r.displayName=e,r.propTypes={className:m().string},r})({name:"HeaderGlobalBar",className:e=>`${e}--header__global`,type:"div"});var Dl,Bl,jl=n(810);function Vl({"aria-label":e,"aria-labelledby":t,className:n,renderMenuIcon:r,renderCloseIcon:o,isActive:i,isCollapsible:a,...l}){const s=C(),c=v()({..."string"==typeof n&&{[n]:!!n},[`${s}--header__action`]:!0,[`${s}--header__menu-trigger`]:!0,[`${s}--header__action--active`]:i,[`${s}--header__menu-toggle`]:!0,[`${s}--header__menu-toggle__hidden`]:!a}),u=r||Dl||(Dl=h.createElement(jl.W1,{size:20})),d=o||Bl||(Bl=h.createElement(oo,{size:20}));return h.createElement("button",f({},l,{"aria-label":e,"aria-labelledby":t,className:c,title:e,type:"button"}),i?d:u)}Vl.propTypes={...Pl,className:m().string,isActive:m().bool,isCollapsible:m().bool,onClick:m().func};const Fl=(0,h.forwardRef)((e,t)=>{const{element:n,as:r,isSideNavExpanded:o,...i}=e,a=r??n??"a";return h.createElement(a,f({ref:t},i))}),zl={as:m().elementType,element:mt(m().elementType),isSideNavExpanded:m().bool};function Hl({children:e,className:t,prefix:n="IBM",...r}){const o=C(),i=v()(`${o}--header__name`,t);return h.createElement(Fl,f({},r,{className:i}),n&&h.createElement(h.Fragment,null,h.createElement("span",{className:`${o}--header__name--prefix`},n)," "),h.createElement("span",null,e))}Fl.displayName="Link",Fl.propTypes=zl,Hl.propTypes={...zl,children:m().node.isRequired,className:m().string,href:m().string,prefix:m().string};const Ul=(0,h.createContext)({}),Wl=({children:e,isRail:t,isSideNavExpanded:n})=>h.createElement(Ul.Provider,{value:{isRail:t,isSideNavExpanded:n}},e),ql=(0,h.forwardRef)((e,t)=>{const{expanded:n,defaultExpanded:r=!1,isChildOfHeader:o=!0,"aria-label":i,"aria-labelledby":a,children:l,onToggle:s,className:c,href:u,isFixedNav:d=!1,isRail:p,isPersistent:m=!0,addFocusListeners:g=!0,addMouseListeners:b=!0,onOverlayClick:y,onSideNavBlur:w,enterDelayMs:E=100,..._}=e,O=C(),{current:T}=(0,h.useRef)(void 0!==n),[S,$]=At(r),[I,A]=At(r),R=T?n:S,k=(0,h.useRef)(null),P=x([k,t]),L=(e,t=!R)=>{T||$(t,E),s&&s(e,t),(T||p)&&A(t,E)},M={"aria-label":i,"aria-labelledby":a},D=v()(c,{[`${O}--side-nav`]:!0,[`${O}--side-nav--expanded`]:R||I,[`${O}--side-nav--collapsed`]:!R&&d,[`${O}--side-nav--rail`]:p,[`${O}--side-nav--ux`]:o,[`${O}--side-nav--hidden`]:!m}),B=v()({[`${O}--side-nav__overlay`]:!0,[`${O}--side-nav__overlay-active`]:R||I}),j=T&&I||R,V={};g&&(V.onFocus=e=>{!e.currentTarget.contains(e.relatedTarget)&&p&&L(e,!0)},V.onBlur=e=>{e.currentTarget.contains(e.relatedTarget)||L(e,!1),e.currentTarget.contains(e.relatedTarget)||!R||d||w&&w()},V.onKeyDown=e=>{It(e,xt)&&(L(e,!1),u&&(window.location.href=u))}),b&&p&&(V.onMouseEnter=()=>{L(!0,!0)},V.onMouseLeave=()=>{$(!1),A(!1),L(!1,!1)},V.onClick=()=>{$(!0),A(!0),L(!0,!0)}),N("keydown",e=>{const t=document.activeElement;It(e,wt)&&R&&!d&&k.current&&t?.classList.contains(`${O}--header__menu-toggle`)&&!t.closest("nav")&&k.current.focus()});const F=`(min-width: ${La.width})`,z=Ha(F),H=!p&&!(R||z);return(0,h.useEffect)(()=>{const e=k.current;e&&(H?e.setAttribute("inert",""):e.removeAttribute("inert"))},[H]),h.createElement(Wl,{isRail:p,isSideNavExpanded:j},d?null:h.createElement("div",{className:B,onClick:y}),h.createElement("nav",f({tabIndex:-1,ref:P,className:`${O}--side-nav__navigation ${D}`},M,V,_),l))});ql.displayName="SideNav",ql.propTypes={...Pl,addFocusListeners:m().bool,addMouseListeners:m().bool,className:m().string,defaultExpanded:m().bool,enterDelayMs:m().number,expanded:m().bool,href:m().string,isChildOfHeader:m().bool,isFixedNav:m().bool,isPersistent:m().bool,isRail:m().bool,onOverlayClick:m().func,onSideNavBlur:m().func,onToggle:m().func}},2499(e,t,n){"use strict";var r=n(6072),o=n(2646),i=n(6920),a=n(8527),l=n(5684),s=(i.Type.Boolean,i.Type.Array,i.Type.String,(0,i.validator)(function(e){return e.length>0},"At least one person must be greeted."),n(4520)),c=n(771),u=n(2076),d=function(){return(0,i.launchWorkspace)("active-prescriptions")};var f={featureName:"active-prescriptions",moduleName:"@cc-openmrs/cc-esm-active-prescriptions"};function p(e,t){return function(){return e().then(function(e){return function(e,t){return(0,l.A)({React:r,ReactDOM:o,renderType:"render",rootComponent:(0,a.F)(t)(e)})}(e.default,t)})}}n(4767),p(function(){return n.e(319).then(n.bind(n,4319))},f),p(function(){return n.e(966).then(n.bind(n,966))},f),p(function(){return n.e(537).then(n.bind(n,1537))},f),p(function(){return n.e(845).then(n.bind(n,6845))},f)},5581(e,t){"use strict";Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference")},4353(e,t,n){"use strict";n(5581)},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115(e){var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var l,s,c,u;if(Array.isArray(e)){if((l=e.length)!=a.length)return!1;for(s=l;0!==s--;)if(!i(e[s],a[s]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!a.has(s.value[0]))return!1;for(u=e.entries();!(s=u.next()).done;)if(!i(s.value[1],a.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!a.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((l=e.length)!=a.length)return!1;for(s=l;0!==s--;)if(e[s]!==a[s])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((l=(c=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(s=l;0!==s--;)if(!Object.prototype.hasOwnProperty.call(a,c[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!==s--;)if(("_owner"!==c[s]&&"__v"!==c[s]&&"__o"!==c[s]||!e.$$typeof)&&!i(e[c[s]],a[c[s]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return i(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},1020(e,t,n){"use strict";var r=n(6072);Symbol.for("react.element"),Symbol.for("react.fragment"),Object.prototype.hasOwnProperty,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner},4848(e,t,n){"use strict";n(1020)},8493(e,t,n){"use strict";var r=n(6072),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,l=r.useLayoutEffect,s=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return l(function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})},[e,n,t]),a(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9888(e,t,n){"use strict";e.exports=n(8493)},4767(e,t,n){var r={"./am.json":[1197,[197]],"./en.json":[4300,[300]],"./es.json":[3099,[99]],"./fr.json":[4055,[55]],"./he.json":[4652,[652]],"./km.json":[6716,[335]],"./pt.json":[6679,[679]]};function o(e){try{if(!n.o(r,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=r[e],o=t[0];return n.e(t[1][0]).then(()=>n(o))}o.keys=()=>Object.keys(r),o.id=4767,e.exports=o},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},8168(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},967(e,t,n){"use strict";n.d(t,{$f:()=>y,QE:()=>P,g$:()=>N,IU:()=>m,HW:()=>x,xC:()=>S,Kx:()=>$,EW:()=>_,L7:()=>k,Gm:()=>g,lo:()=>b,ut:()=>v,yH:()=>O,Jj:()=>p,Ct:()=>h,eA:()=>w,Gp:()=>I,E4:()=>C,Fi:()=>A,Y0:()=>L,st:()=>T});var r=n(44),o=n(5048);const i=function(e){return void 0===e};var a=n(3083),l=n(4963),s=n(6963),c=n(5874);const u="${openmrsSpaBase}/login",d={redirectAuthFailure:{enabled:{_type:s.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:s.ZU.String,_default:u,_validators:[s.y$.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:s.ZU.Array,_default:[401],_elements:{_type:s.ZU.Number,_validators:[s.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:s.ZU.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:s.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p="/ws/rest/v1",m="/ws/fhir2/R4",h=`${p}/session`;function g(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function b(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=g(e);if(t.headers||(t.headers={}),(0,l.A)(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(p)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(m)){const e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}const r=Error();return window.fetch(n,t).then(async e=>{const t=e,{redirectAuthFailure:o,followRedirects:i}=await(0,s.zj)("@openmrs/esm-api");if(t.ok){if(204===t.status){if(i&&t.headers.has("location")){const e=t.headers.get("location");e&&(0,c.oo)({to:e})}return t.data=null,t}return t.clone().text().then(e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t})}if(n===g(h)&&403===t.status||o.enabled&&o.errors.includes(t.status)){(0,c.g4)();const e=o.url||t.headers.get("location")||u;return(0,c.oo)({to:e}),o.resolvePromise?Promise.resolve():new Promise(()=>{})}return t.clone().text().then(e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new y(n,t,o,r)},e=>{throw new y(n,t,null,r)})})}function v(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new a.Observable(r=>{let o=!1;return b(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class y extends Error{constructor(e,t,n,r){super(),f(this,"response",void 0),f(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const w=(0,o.Zd)("session",{loaded:!1,session:null});let E=0;function x(e={includeAuthStatus:!0}){return(E<Date.now()-6e4||!w.getState().loaded)&&O(),new a.Observable(t=>{const n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(w.getState()),w.subscribe(n)})}function _(){return(E<Date.now()-6e4||!w.getState().loaded)&&O(),w}function C(e){let t=e.user?.userProperties?.defaultLocale??e.locale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function O(e,t){E=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),R(b(h,{headers:n}))}function N(){w.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function T(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!i(t.privileges.find(t=>e===t.display)):Array.isArray(e)?e.every(e=>!i(t.privileges.find(t=>e===t.display))):(i(e)||console.error(`Could not understand privileges "${e}"`),!0)}(e,t)||function(e){return!i(e.roles.find(e=>"System Developer"===e.display))}(t)}function S(){let e,t;return new Promise(n=>{const r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(w.getState()),e||(t=w.subscribe(r))})}function $(){return new Promise((e,t)=>{x().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function I(e,t){return R(b(h,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function A(e,t,n){return n||(n=new AbortController),await b(`${p}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),O()}function R(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},w.setState(r),t(r)):(r={loaded:!1,session:null},w.setState(r),n(r))}).catch(e=>{(0,r.N)(`Failed to fetch new session information: ${e}`);const t={loaded:!1,session:null};w.setState(t),n(t)})})}function k(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}w.subscribe(e=>{e.loaded&&e.session&&C(e.session)});const P={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function L(){(0,s.T0)("@openmrs/esm-api",d),O()}},6963(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function o(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}function i(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return r(n)?t:o(function(t){return e(n,t)});default:return r(n)&&r(i)?t:r(n)?o(function(t){return e(t,i)}):r(i)?o(function(t){return e(n,t)}):e(n,i)}}}function a(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function l(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function s(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,{ZU:()=>H,Nh:()=>Ue,hs:()=>te,Rt:()=>Q,T0:()=>he,ks:()=>ye,zj:()=>Ee,IS:()=>ne,UY:()=>le,g$:()=>ce,P0:()=>se,G9:()=>oe,vu:()=>ie,YP:()=>re,GI:()=>ae,td:()=>xe,tN:()=>ue,r4:()=>Ke,gU:()=>Ze,qG:()=>Ge,yL:()=>Je,mq:()=>_e,Gt:()=>we,kl:()=>be,FL:()=>ge,GV:()=>ve,H:()=>ee,Nc:()=>U,y$:()=>Ye});const c="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var u=Object.prototype.toString,d=function(){return"[object Arguments]"===u.call(arguments)?function(e){return"[object Arguments]"===u.call(e)}:function(e){return s("callee",e)}}();const f=d;var p=!{toString:null}.propertyIsEnumerable("toString"),m=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),g=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const b="function"!=typeof Object.keys||h?o(function(e){if(Object(e)!==e)return[];var t,n,r=[],o=h&&f(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(p)for(n=m.length-1;n>=0;)s(t=m[n],e)&&!g(r,t)&&(r[r.length]=t),n-=1;return r}):o(function(e){return Object(e)!==e?[]:Object.keys(e)}),v=o(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function y(e,t,n,r){var o=a(e);function i(e,t){return w(e,t,n.slice(),r.slice())}return!l(function(e,t){return!l(i,t,e)},a(t),o)}function w(e,t,n,r){if(c(e,t))return!0;var o,i,a=v(e);if(a!==v(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!c(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!c(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var l=n.length-1;l>=0;){if(n[l]===e)return r[l]===t;l-=1}switch(a){case"Map":return e.size===t.size&&y(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&y(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=b(e);if(u.length!==b(t).length)return!1;var d=n.concat([e]),f=r.concat([t]);for(l=u.length-1;l>=0;){var p=u[l];if(!s(p,t)||!w(t[p],e[p],d,f))return!1;l-=1}return!0}const E=i(function(e,t){return w(e,t,[],[])});function x(e){return function t(n,a,l){switch(arguments.length){case 0:return t;case 1:return r(n)?t:i(function(t,r){return e(n,t,r)});case 2:return r(n)&&r(a)?t:r(n)?i(function(t,n){return e(t,a,n)}):r(a)?i(function(t,r){return e(n,t,r)}):o(function(t){return e(n,a,t)});default:return r(n)&&r(a)&&r(l)?t:r(n)&&r(a)?i(function(t,n){return e(t,n,l)}):r(n)&&r(l)?i(function(t,n){return e(t,a,n)}):r(a)&&r(l)?i(function(t,r){return e(n,t,r)}):r(n)?o(function(t){return e(t,a,l)}):r(a)?o(function(t){return e(n,t,l)}):r(l)?o(function(t){return e(n,a,t)}):e(n,a,l)}}}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}const C=x(function(e,t,n){var r,o={};for(r in n=n||{},t=t||{})s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o}),O=x(function e(t,n,r){return C(function(n,r,o){return _(r)&&_(o)?e(t,r,o):t(n,r,o)},n,r)}),N=i(function(e,t){return O(function(e,t,n){return n},e,t)}),T=i(function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n});function S(e,t,n){if(n||(n=new $),o=typeof(r=e),null==r||"object"!=o&&"function"!=o)return e;var r,o,i,a=function(r){var o=n.get(e);if(o)return o;for(var i in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t?S(e[i],!0,n):e[i]);return r};switch(v(e)){case"Object":return a(Object.create(Object.getPrototypeOf(e)));case"Array":return a(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var $=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180){for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1)if((i=n[r])[0]===e)return i[1]}else{var o=this.hash(e);if(n=this.map[o])for(r=0;r<n.length;r+=1){var i;if((i=n[r])[0]===e)return i[1]}}},e}();const I=o(function(e){return null!=e&&"function"==typeof e.clone?e.clone():S(e,!0)}),A=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},R=o(function(e){return!!A(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))});var k="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function P(e,t,n){return function(r,o,i){if(R(i))return e(r,o,i);if(null==i)return o;if("function"==typeof i["fantasy-land/reduce"])return t(r,o,i,"fantasy-land/reduce");if(null!=i[k])return n(r,o,i[k]());if("function"==typeof i.next)return n(r,o,i);if("function"==typeof i.reduce)return t(r,o,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function L(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}var M=i(function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,l){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,l,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,l,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,l,s,c,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,function(){return e.apply(t,arguments)})});const D=M;function B(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function j(e,t,n,r){return e["@@transducer/result"](n[r](D(e["@@transducer/step"],e),t))}const V=P(L,j,B);var F=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const z=x(function(e,t,n){return V("function"==typeof e?new F(e):e,t,n)});var H=function(e){return e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",e}({});function U(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}const W=U(e=>Array.isArray(e),"must be an array"),q=U(e=>"boolean"==typeof e,"must be a boolean"),K=U(e=>"number"==typeof e,"must be a number"),G=U(e=>"string"==typeof e,"must be a string"),Z=U(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),J=U(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string");var Y=n(5048),X=n(8101);const Q=(0,Y.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),ee=(0,Y.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});ee.subscribe(e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))});const te=(0,Y.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function ne(e){return(0,Y.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function re(){return(0,Y.jf)("config-extension-slots",{slots:{}})}function oe(e){return ie(re().getState(),e)}function ie(e,t){return e.slots[t]??{loaded:!1,config:{}}}function ae(){return(0,Y.jf)("config-extensions",{configs:{}})}function le(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");const n=ae(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},setState(r,o=!1){n.setState(n=>{n.configs[e]||(n.configs[e]={});const i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n})},subscribe:e=>n.subscribe((t,n)=>{const o=r(t),i=r(n);(0,X.b)(o,i)||e(o,i)}),destroy(){}}}function se(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}function ce(e,t,n){const r=e.configure?.[n];return r??null}const ue=(0,Y.Zd)("config-implementer-tools",{config:{}});function de(e,t){for(let n of Object.keys(e.schemas)){const r=ne(n);if(e.moduleLoaded[n]){const o=Ie(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!0,config:o})}else{const o=Ae(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!1,config:o})}}}function fe(e,t){const n=function(e,t){const n=ke(Se(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});!function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Te(r,t,e)}(r);return Object.keys(r).reduce((e,t)=>({...e,...r[t]}),{})}(e,t),r=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,{loaded:!0,config:t}])),o=re(),i=o.getState(),a={slots:{...i.slots,...r}};E(i,a)||o.setState(a)}function pe(e,t){const n=function(e,t){let n=Oe(I(e.schemas));const r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]];for(let[e,t]of r)n=ke([n,Ne(e,t)]);return n}(e,t);ue.setState({config:n})}function me(e,t,n){const r={};for(let o of t.mountedExtensions){const t=Ce(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}ae().setState({configs:r})}function he(e,t){$e(e,t);const n=N(t,qe);Q.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ge(e){Q.setState(t=>({...t,schemas:{...t.schemas,[e]:qe}}))}function be(e){Q.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ve(e){Q.setState(t=>({...t,schemas:{...t.schemas,[e]:We}}))}function ye(e,t){$e(e,t);const n=N(t,qe);Q.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),Q.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function we(e,t="provided"){Q.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function Ee(e){return new Promise(t=>{const n=ne(e);function r(e){if(e.loaded&&e.config){const n=T(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})}function xe(e,t,n){const r=[new Promise(t=>{const n=ne(e);function r(e){if(e.translationOverridesLoaded&&e.config){const n=e.config["Translation overrides"]??{};t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})];return t&&n&&r.push(new Promise(e=>{const r=le(t,n);function o(t){if(t.loaded&&t.config){const n=t.config["Translation overrides"]??{};e(n),i&&i()}}o(r.getState());const i=r.subscribe(o)})),Promise.all(r)}function _e(e,t,n){Pe(e,t,n);const r=je(e,t);return Me(e,r,n),r}function Ce(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),l=o.schemas[a],s=l?a:t,c=Se(o,i),u=Re(e,c),d=u?.extensionSlots?.[n]?.configure?.[r]??{},f=ke([Re(s,c),d]),p=l??o.schemas[t];Pe(p,f,s);const m=je(p,f);return Me(p,m,s),delete m.extensionSlots,m}function Oe(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:Fe(e)?Object.keys(e).reduce((t,n)=>(t[n]=Oe(e[n]),t),{}):{}}function Ne(e,t){return Fe(e)?Object.keys(e).reduce((n,r)=>(n[r]=Ne(e[r],t),n),{}):{_value:e,_source:t}}function Te(e,t,n){const r=`${t}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&He(r,o+`' contains invalid keys '${i.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||He(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||He(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||He(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Fe(e.configure)||He(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))}function Se(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function $e(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter(e=>!e.startsWith("_"))){const i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!Fe(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||$e(e,a,i);const l=a._elements;if(Ve(l)&&$e(e,l,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const s=a._type;s&&!Object.values(H).includes(s)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(H).join(", ")}. Received '${s}'`),Object.keys(a).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),l&&s&&![H.Array,H.Object].includes(s)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(s)}`)}}function Ie(e,t,n){const r=t.schemas[e],o=Re(e,Se(t,n));Pe(r,o,e);const i=je(r,o);return Me(r,i,e),delete i.extensionSlots,i}function Ae(e,t,n){const r=Re(e,Se(t,n)),o=je(qe,r);return Me(qe,o,e),delete o.extensionSlots,o}function Re(e,t){return ke(t.map(({[e]:t})=>t).filter(e=>!!e))}function ke(e){return z(N)({},e)}function Pe(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?Le(a,o,i):"extensionSlots"===r&&""!==n||He(i,`Unknown config key '${i}' provided. Ignoring.`)}}function Le(e,t,n){De(n,e._type,t),Fe(t)?e._type===H.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Le(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||Pe(e,t,n):e._type===H.Array&&function(e,t,n){if(De(n,H.Array,t)){if(Ve(e._elements))for(let r=0;r<t.length;r++)Le(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)De(`${n}[${r}]`,e._elements?._type,t[r])}}(e,t,n)}function Me(e,t,n=""){if(e)if(t!==e._default&&Be(n,e._validators,t),Fe(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e._type===H.Object&&e._elements?Me(e._elements,o,i):Me(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)Me(e._elements,t[r],`${n}[${r}]`)}function De(e,t,n){return!t||Be(e,[{Array:W,Boolean:q,ConceptUuid:J,Number:K,Object:Z,String:G,UUID:J,PersonAttributeTypeUuid:J,PatientIdentifierTypeUuid:J}[t]],n)}function Be(e,t,n){let r=!0;if(t)try{for(let o of t){const t=o(n);"string"==typeof t&&(He(e,"object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`),r=!1)}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}return r}de(Q.getState(),ee.getState()),Q.subscribe(e=>de(e,ee.getState())),ee.subscribe(e=>de(Q.getState(),e)),pe(Q.getState(),ee.getState()),Q.subscribe(e=>pe(e,ee.getState())),ee.subscribe(e=>pe(Q.getState(),e)),fe(Q.getState(),ee.getState()),Q.subscribe(e=>fe(e,ee.getState())),ee.subscribe(e=>fe(Q.getState(),e)),me(Q.getState(),te.getState(),ee.getState()),Q.subscribe(e=>{me(e,te.getState(),ee.getState())}),te.subscribe(e=>{me(Q.getState(),e,ee.getState())}),ee.subscribe(e=>{me(Q.getState(),te.getState(),e)});const je=(e,t)=>{const n=I(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&Ve(e))if(o._type===H.Array&&Array.isArray(r)){const o=r.map(t=>je(e,t));n[t]=o}else if(o._type===H.Object)for(let t of Object.keys(r))r[t]=je(e,r[t])}else if(Fe(o)){const e=r??{};Fe(e)&&(n[t]=je(o,e))}}return n};function Ve(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function Fe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let ze=new Set;function He(e,t){const n=`${e}:::${t}`;ze||(ze=new Set),ze.has(n)||(console.error(t),ze.add(n))}function Ue(e){e?ze.forEach(t=>{t.startsWith(e)&&ze.delete(t)}):ze.clear()}const We={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:H.Object,_default:{},_validators:[U(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)).join(", ")}.`)]}},qe={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:H.Array,_default:[]}},...We},Ke=(e,t)=>U(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),Ge=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return U(e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},Ze=Ge([]),Je=e=>U(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),Ye={inRange:Ke,isUrl:Ze,isUrlWithTemplateParameters:Ge,oneOf:Je}},44(e,t,n){"use strict";n.d(t,{J:()=>i,N:()=>o});var r=n(8581);function o(e){const t=a(e);setTimeout(()=>{throw t})}function i(){const e=Error();return t=>{a(t).stack+=`\nAsync stacktrace:\n${e.stack}`,o(t)}}function a(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,r.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,r.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},8581(e,t,n){"use strict";n.d(t,{$3:()=>g,FI:()=>m,LQ:()=>h,Vt:()=>b,Yt:()=>o,bJ:()=>v,bK:()=>y,dX:()=>w,ff:()=>c,gj:()=>i,ls:()=>E,pc:()=>s,sT:()=>a});const r="openmrs:connectivity-changed";function o(e){window.dispatchEvent(new CustomEvent(r,{detail:{online:e}}))}function i(e){if(!window.offlineEnabled)return()=>{};const t=t=>e(t.detail);return window.addEventListener(r,t),()=>window.removeEventListener(r,t)}function a(e){return e({online:!window.offlineEnabled||navigator.onLine}),i(e)}const l="openmrs:precache-static-dependencies";function s(e={}){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function c(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}const u="openmrs:notification-shown",d="openmrs:actionable-notification-shown",f="openmrs:toast-shown",p="openmrs:snack-bar-shown";function m(e){window.dispatchEvent(new CustomEvent(u,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function g(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function v(e){const t=t=>e(t.detail);return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}function y(e){const t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function w(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function E(e){const t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}},5874(e,t,n){"use strict";function r(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(e){return e&&e.sensitive?"":"i"}function i(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var i=n.strict,a=void 0!==i&&i,l=n.start,s=void 0===l||l,c=n.end,u=void 0===c||c,d=n.encode,f=void 0===d?function(e){return e}:d,p="["+r(n.endsWith||"")+"]|$",m="["+r(n.delimiter||"/#?")+"]",h=s?"^":"",g=0,b=e;g<b.length;g++){var v=b[g];if("string"==typeof v)h+=r(f(v));else{var y=r(f(v.prefix)),w=r(f(v.suffix));if(v.pattern)if(t&&t.push(v),y||w)if("+"===v.modifier||"*"===v.modifier){var E="*"===v.modifier?"?":"";h+="(?:"+y+"((?:"+v.pattern+")(?:"+w+y+"(?:"+v.pattern+"))*)"+w+")"+E}else h+="(?:"+y+"("+v.pattern+")"+w+")"+v.modifier;else h+="("+v.pattern+")"+v.modifier;else h+="(?:"+y+w+")"+v.modifier}}if(u)a||(h+=m+"?"),h+=n.endsWith?"(?="+p+")":"$";else{var x=e[e.length-1],_="string"==typeof x?m.indexOf(x[x.length-1])>-1:void 0===x;a||(h+="(?:"+m+"(?="+p+"))?"),_||(h+="(?="+m+"|"+p+")")}return new RegExp(h,o(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[l=n+1])throw new TypeError('Pattern cannot start with "?" at '+l);for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0===--o){l++;break}}else if("("===e[l]&&(o++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at "+l);i+=e[l++]}else i+=e[l++]+e[l++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=l}else{for(var a="",l=n+1;l<e.length;){var s=e.charCodeAt(l);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[l++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=l}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=t.prefixes,i=void 0===o?"./":o,a="[^"+r(t.delimiter||"/#?")+"]+?",l=[],s=0,c=0,u="",d=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},f=function(e){var t=d(e);if(void 0!==t)return t;var r=n[c],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var m=d("CHAR"),h=d("NAME"),g=d("PATTERN");if(h||g){var b=m||"";-1===i.indexOf(b)&&(u+=b,b=""),u&&(l.push(u),u=""),l.push({name:h||s++,prefix:b,suffix:"",pattern:g||a,modifier:d("MODIFIER")||""})}else{var v=m||d("ESCAPED_CHAR");if(v)u+=v;else if(u&&(l.push(u),u=""),d("OPEN")){b=p();var y=d("NAME")||"",w=d("PATTERN")||"",E=p();f("CLOSE"),l.push({name:y||(w?s++:""),pattern:y&&!w?a:w,prefix:b,suffix:E,modifier:d("MODIFIER")||""})}else f("END")}}return l}(e,n),t,n)}function a(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map(function(e){return a(e,t,n).source});return new RegExp("(?:"+r.join("|")+")",o(n))}(e,t,n):i(e,t,n)}n.d(t,{g4:()=>C,D_:()=>p,lz:()=>d,qh:()=>m,JK:()=>x,tA:()=>_,zl:()=>b,JG:()=>g,oo:()=>v,vf:()=>c,MY:()=>u,Wh:()=>E});const l=(0,n(5048).Zd)("breadcrumbs",[]);function s(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?a(e.matcher):a(e.path)}function c(e){return u([e])}function u(e){const t=[...d(),...e.map(e=>({matcher:s(e),settings:e}))];l.setState(t,!0)}function d(){return l.getState()}function f(e,t){if(t)return function(e,t){const[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=f(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){const n=f(e,t);if(n){const t=[n];let r=f(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=f(e,r.settings.parent);return t.reverse()}}return[]}function m(e){return p(d(),e)}var h=n(599);function g(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return b(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function b(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function v({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=g(e,t).replace(window.location.origin,"");r.startsWith(n)?(0,h.EH)(r):window.location.assign(r)}const y="openmrs:history";function w(e){let t=JSON.parse(sessionStorage.getItem(y)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(y,JSON.stringify(t))}function E(){0===JSON.parse(sessionStorage.getItem(y)??"[]").length&&document.referrer&&w(document.referrer),window.addEventListener("single-spa:routing-event",e=>{const t=x();"replaceState"==e.detail.originalEvent?.singleSpaTrigger?(t[t.length-1]=window.location.href,sessionStorage.setItem(y,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?_({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&w(window.location.href)})}function x(){return JSON.parse(sessionStorage.getItem(y)??"[]")}function _({toUrl:e}){const t=x(),n=t.lastIndexOf(e);if(-1==n)throw new Error(`URL ${e} not found in history; cannot go back to it.`);{const e=t.slice(0,n+1);v({to:t[n]}),sessionStorage.setItem(y,JSON.stringify(e))}}function C(){sessionStorage.removeItem(y)}},861(e,t,n){"use strict";n.d(t,{z:()=>r});const r=(0,n(6072).createContext)({moduleName:"",featureName:""})},8527(e,t,n){"use strict";n.d(t,{F:()=>d});var r=n(6072),o=n(2076),i=n(9324),a=n(967),l=n(861);const s={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},c=new Map,u={errorRetryCount:3,fetcher:a.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,provider:()=>c};function d(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},s,e),n={...u,...t.swrConfig};return function(e){var a,s,c,u;return s=a=class extends r.Component{componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return r.createElement("div",null,"An error has occurred. Please try reloading the page.");{const a=r.createElement(r.Suspense,{fallback:null},r.createElement(i.BE,{value:n},r.createElement(l.z.Provider,{value:this.state.config},t.disableTranslations?r.createElement(e,this.props):r.createElement(o.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},r.createElement(e,this.props)))));return t.strictMode&&r.StrictMode?r.createElement(r.StrictMode,null,a):a}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},c="displayName",u=`OpenmrsReactComponent(${t.featureName})`,c in s?Object.defineProperty(s,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[c]=u,a}}},5048(e,t,n){"use strict";n.d(t,{Zd:()=>a,jf:()=>s,CE:()=>l,i7:()=>c});var r=n(8101),o=n(7283);const i={};function a(e,t){const n=i[e];if(n)return n.active?console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{const n=(0,o.y)()(()=>t);return i[e]={value:n,active:!0},n}}function l(e,t){const n=i[e];return n?(n.active?console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(i[e]={value:t,active:!0},t)}function s(e,t){const n=i[e];if(!n){const n=(0,o.y)()(()=>t??{});return i[e]={value:n,active:!1},n}return n.value}function c(...e){const[t,n,o]=e,i=void 0===o?n:o,a=void 0===o?e=>e:n;return i(a(t.getState())),t.subscribe((e,t)=>{const n=a(e);(0,r.b)(t,n)||i(n)})}setTimeout(()=>{window&&"development"===window.spaEnv&&(window.stores=i)},1e3)},8101(e,t,n){"use strict";function r(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}n.d(t,{b:()=>r})},241(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1917).A.Symbol},8496(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(241),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r.A?r.A.toStringTag:void 0;var s=Object.prototype.toString;var c=r.A?r.A.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}(e):function(e){return s.call(e)}(e)}},2136(e,t,n){"use strict";n.d(t,{A:()=>r});const r="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis},5647(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(367).A)(Object.getPrototypeOf,Object)},367(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},1917(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(2136),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.A||o||Function("return this")()},3098(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},4963(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(8496),o=n(5647),i=n(3098),a=Function.prototype,l=Object.prototype,s=a.toString,c=l.hasOwnProperty,u=s.call(Object);const d=function(e){if(!(0,i.A)(e)||"[object Object]"!=(0,r.A)(e))return!1;var t=(0,o.A)(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},5684(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(l(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(l(e)));return e}}n.d(t,{A:()=>d,i:()=>c});var c=null;try{c=require("react").createContext()}catch(r){}var u={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function d(e){if("object"!==i(e))throw new Error("single-spa-react requires a configuration object");var t,n=o(o({},u),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(t=n.ReactDOMClient)&&void 0!==t&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!c&&n.React.createContext&&(c=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:f.bind(null,n),mount:p.bind(null,n),unmount:m.bind(null,n)};return n.parcelCanUpdate&&(r.update=h.bind(null,n)),r}function f(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function p(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=v(e,t,function(){n(this)}),i=s(e,t)(),a=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:g(e),renderType:b(e)});e.domElements[t.name]=i,e.renderResults[t.name]=a})}function m(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():g(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function h(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=v(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=s(e,t)();g(e).render(r,i)}})}function g(e){return e.ReactDOMClient||e.ReactDOM}function b(e){return"function"==typeof e.renderType?e.renderType():e.renderType}function v(e,t,n){var r=e.React.createElement(e.rootComponent,t),i=c?e.React.createElement(c.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),i=e.React.createElement(e.errorBoundaryClass,t,i)),e.React.createElement(e.SingleSpaRoot,o(o({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),i)}},599(e,t,n){"use strict";n.d(t,{AG:()=>Oe,EH:()=>re,fz:()=>Ae,xL:()=>z});var r=Object.freeze({__proto__:null,get start(){return je},get ensureJQuerySupport(){return pe},get setBootstrapMaxTime(){return K},get setMountMaxTime(){return G},get setUnmountMaxTime(){return Z},get setUnloadMaxTime(){return J},get registerApplication(){return Oe},get unregisterApplication(){return Te},get getMountedApps(){return Ee},get getAppStatus(){return _e},get unloadApplication(){return Se},get checkActivityFunctions(){return Ne},get getAppNames(){return xe},get pathToActiveWhen(){return Ae},get navigateToUrl(){return re},get patchHistoryApi(){return ue},get triggerAppChange(){return Le},get addErrorHandler(){return s},get removeErrorHandler(){return c},get mountRootParcel(){return z},get NOT_LOADED(){return f},get LOADING_SOURCE_CODE(){return p},get NOT_BOOTSTRAPPED(){return m},get BOOTSTRAPPING(){return h},get NOT_MOUNTED(){return g},get MOUNTING(){return b},get UPDATING(){return y},get LOAD_ERROR(){return x},get MOUNTED(){return v},get UNLOADING(){return E},get UNMOUNTING(){return w},get SKIP_BECAUSE_BROKEN(){return _}}),o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var e=new o("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?o:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n};let a=[];function l(e,t,n){const r=d(e,t,n);a.length?a.forEach(e=>e(r)):setTimeout(()=>{throw r})}function s(e){if("function"!=typeof e)throw Error(u(28,!1));a.push(e)}function c(e){if("function"!=typeof e)throw Error(u(29,!1));let t=!1;return a=a.filter(n=>{const r=n===e;return t=t||r,!r}),t}function u(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function d(e,t,n){const r=`${S(t)} '${N(t)}' died in status ${t.status}: `;let o;if(e instanceof Error){try{e.message=r+e.message}catch(e){}o=e}else{console.warn(u(30,!1,t.status,N(t)));try{o=Error(r+JSON.stringify(e))}catch(t){o=e}}return o.appOrParcelName=N(t),t.status=n,o}const f="NOT_LOADED",p="LOADING_SOURCE_CODE",m="NOT_BOOTSTRAPPED",h="BOOTSTRAPPING",g="NOT_MOUNTED",b="MOUNTING",v="MOUNTED",y="UPDATING",w="UNMOUNTING",E="UNLOADING",x="LOAD_ERROR",_="SKIP_BECAUSE_BROKEN";function C(e){return e.status===v}function O(e){try{return e.activeWhen(window.location)}catch(t){return l(t,e,_),!1}}function N(e){return e.name}function T(e){return Boolean(e.unmountThisParcel)}function S(e){return T(e)?"parcel":"application"}function $(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function I(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function A(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!I(t,e=>"function"!=typeof e)));var t}function R(e,t){let n=e[t]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=S(e),o=N(e);return function(e){return n.reduce((n,i,a)=>n.then(()=>{const n=i(e);return k(n)?n:Promise.reject(u(15,!1,r,o,t,a))}),Promise.resolve())}}function k(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let P=[];function L(e,t){return Promise.resolve().then(()=>e.status!==m?e:(e.status=h,e.bootstrap?Y(e,"bootstrap").then(n).catch(n=>{if(t)throw d(n,e,_);return l(n,e,_),e}):Promise.resolve().then(n)));function n(){return e.status=g,e}}function M(e,t){return Promise.resolve().then(()=>{if(e.status!==v)return e;e.status=w;const n=Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel());return Promise.all(n).then(r,n=>r().then(()=>{const r=Error(n.message);if(t)throw d(r,e,_);l(r,e,_)})).then(()=>e);function r(){return Y(e,"unmount").then(()=>{e.status=g},n=>{if(t)throw d(n,e,_);l(n,e,_)})}})}let D=!1,B=!1;function j(e,t){return Promise.resolve().then(()=>e.status!==g?e:(D||(window.dispatchEvent(new i("single-spa:before-first-mount")),D=!0),e.status=b,Y(e,"mount").then(()=>(e.status=v,B||(window.dispatchEvent(new i("single-spa:first-mount")),B=!0),e)).catch(n=>{return e.status=v,M(e,!0).then(r,r);function r(){if(t)throw d(n,e,_);return l(n,e,_),e}})))}let V=0;const F={parcels:{}};function z(){return H.apply(F,arguments)}function H(e,t){const n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(u(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(u(3,!1,typeof e.name));const r=V++;let o=e.name||`parcel-${r}`;if("object"!=typeof t)throw Error(u(4,!1,o,typeof t));if(!t.domElement)throw Error(u(5,!1,o));const i="function"==typeof e,a=i?e:()=>Promise.resolve(e),l={id:r,parcels:{},status:i?p:m,customProps:t,parentName:N(n),unmountThisParcel:()=>h.then(()=>{if(l.status!==v)throw Error(u(6,!1,o,l.status));return M(l,!0)}).then(e=>(l.parentName&&delete n.parcels[l.id],e)).then(e=>(b(e),e)).catch(e=>{throw l.status=_,w(e),e})};let s;n.parcels[r]=l;let c=a();if(!c||"function"!=typeof c.then)throw Error(u(7,!1));c=c.then(e=>{if(!e)throw Error(u(8,!1));if(o=e.name||`parcel-${r}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap))throw Error(u(9,!1,o));if(!A(e.mount))throw Error(u(10,!1,o));if(!A(e.unmount))throw Error(u(11,!1,o));if(e.update&&!A(e.update))throw Error(u(12,!1,o));const t=R(e,"bootstrap"),n=R(e,"mount"),i=R(e,"unmount");l.status=m,l.name=o,l.bootstrap=t,l.mount=n,l.unmount=i,l.timeouts=X(e.timeouts),e.update&&(l.update=R(e,"update"),s.update=function(e){return l.customProps=e,U((t=l,Promise.resolve().then(()=>{if(t.status!==v)throw Error(u(32,!1,N(t)));return t.status=y,Y(t,"update").then(()=>(t.status=v,t)).catch(e=>{throw d(e,t,_)})})));var t})});const f=c.then(()=>L(l,!0)),h=f.then(()=>j(l,!0));let b,w;const E=new Promise((e,t)=>{b=e,w=t});return s={mount:()=>U(Promise.resolve().then(()=>{if(l.status!==g)throw Error(u(13,!1,o,l.status));return n.parcels[r]=l,j(l)})),unmount:()=>U(l.unmountThisParcel()),getStatus:()=>l.status,loadPromise:U(c),bootstrapPromise:U(f),mountPromise:U(h),unmountPromise:U(E)},s}function U(e){return e.then(()=>null)}function W(e){const t=N(e);let n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(u(40,!1),t,n));const o=$({},n,{name:t,mountParcel:H.bind(e),singleSpa:r});return T(e)&&(o.unmountSelf=e.unmountThisParcel),o}const q={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function K(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(16,!1));q.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function G(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(17,!1));q.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(18,!1));q.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function J(e,t,n){if("number"!=typeof e||e<=0)throw Error(u(19,!1));q.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t){const n=e.timeouts[t],r=n.warningMillis,o=S(e);return new Promise((i,a)=>{let l=!1,s=!1;e[t](W(e)).then(e=>{l=!0,i(e)}).catch(e=>{l=!0,a(e)}),setTimeout(()=>d(1),r),setTimeout(()=>d(!0),n.millis);const c=u(31,!1,t,o,N(e),n.millis);function d(e){if(!l)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){const t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout(()=>d(t+1),r)}}})}function X(e){const t={};for(let n in q)t[n]=$({},q[n],e&&e[n]||{});return t}function Q(e){return Promise.resolve().then(()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==f&&e.status!==x)return e;let t,n;return e.status=p,e.loadPromise=Promise.resolve().then(()=>{const r=e.loadApp(W(e));if(!k(r))throw n=!0,Error(u(33,!1,N(e)));return r.then(n=>{let r;e.loadErrorTime=null,t=n,"object"!=typeof t&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap)&&(r=35),A(t.mount)||(r=36),A(t.unmount)||(r=37);const o=S(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(u(r,!1,o,N(e),n),t),l(void 0,e,_),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=$({},e.devtools.overlays,t.devtools.overlays)),e.status=m,e.bootstrap=R(t,"bootstrap"),e.mount=R(t,"mount"),e.unmount=R(t,"unmount"),e.unload=R(t,"unload"),e.timeouts=X(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=_:(r=x,e.loadErrorTime=(new Date).getTime()),l(t,e,r),e})})}const ee="undefined"!=typeof window,te={hashchange:[],popstate:[]},ne=["hashchange","popstate"];function re(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(u(14,!1));t=e.currentTarget.href,e.preventDefault()}const n=de(window.location.href),r=de(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function oe(e){if(e){const t=e[0].type;ne.indexOf(t)>=0&&te[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}let ie;function ae(){Me([],arguments)}function le(e,t){return function(){const n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ie&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){n=document.createEvent("PopStateEvent"),n.initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let se=null,ce=!1;function ue(e){if(ce)throw Error(u(43,!1));ie=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ce=!0,se=window.history.replaceState,window.addEventListener("hashchange",ae),window.addEventListener("popstate",ae);const t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&ne.indexOf(e)>=0)||I(te[e],e=>e===n))return t.apply(this,arguments);te[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&ne.indexOf(e)>=0&&(te[e]=te[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=le(window.history.pushState,"pushState"),window.history.replaceState=le(se,"replaceState")}function de(e){const t=document.createElement("a");return t.href=e,t}ee&&(window.singleSpaNavigate?console.warn(u(41,!1)):window.singleSpaNavigate=re);let fe=!1;function pe(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!fe){const t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return me.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return me.call(this,n,window.removeEventListener,e,t,arguments)},fe=!0}}function me(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach(e=>{ne.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,o))}const he={};function ge(e){return Promise.resolve().then(()=>{const t=he[N(e)];if(!t)return e;if(e.status===f)return be(e,t),e;if(e.status===E)return t.promise.then(()=>e);if(e.status!==g&&e.status!==x)return e;const n=e.status===x?Promise.resolve():Y(e,"unload");return e.status=E,n.then(()=>(be(e,t),e)).catch(n=>(function(e,t,n){delete he[N(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,l(n,e,_),t.reject(n)}(e,t,n),e))})}function be(e,t){delete he[N(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=f,t.resolve()}function ve(e,t,n,r){he[N(e)]={app:e,resolve:n,reject:r},Object.defineProperty(he[N(e)],"promise",{get:t})}function ye(e){return he[e]}const we=[];function Ee(){return we.filter(C).map(N)}function xe(){return we.map(N)}function _e(e){const t=I(we,t=>N(t)===e);return t?t.status:null}let Ce=!1;function Oe(e,t,n,r){const o=function(e,t,n,r){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(u(39,!1));const t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(u(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(u(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(u(20,!1));const r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(u(24,!1));if(!Ie(e.customProps))throw Error(u(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(u(20,!1));if(!t)throw Error(u(23,!1));if("function"!=typeof n)throw Error(u(24,!1));if(!Ie(r))throw Error(u(22,!1))}(e,t,n,r),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=r),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(e){return e||{}}(o.customProps),o.activeWhen=function(e){let t=Array.isArray(e)?e:[e];return t=t.map(e=>"function"==typeof e?e:Ae(e)),e=>t.some(t=>t(e))}(o.activeWhen),o;var i}(e,t,n,r);if(Ve()||Ce||(Ce=!0,setTimeout(()=>{Ve()||console.warn(u(1,!1))},5e3)),-1!==xe().indexOf(o.name))throw Error(u(21,!1,o.name));we.push($({loadErrorTime:null,status:f,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ee&&(pe(),Me())}function Ne(e=window.location){return we.filter(t=>t.activeWhen(e)).map(N)}function Te(e){if(0===we.filter(t=>N(t)===e).length)throw Error(u(25,!1,e));return(ee?Se(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{const t=we.map(N).indexOf(e);we.splice(t,1)})}function Se(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(u(26,!1));const n=I(we,t=>N(t)===e);if(!n)throw Error(u(27,!1,e));const r=ye(N(n));if(t&&t.waitForUnmount){if(r)return r.promise;{const e=new Promise((t,r)=>{ve(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,$e(n,r.resolve,r.reject)):e=new Promise((t,r)=>{ve(n,()=>e,t,r),$e(n,t,r)}),e}}function $e(e,t,n){Promise.resolve().then(()=>{if(I(Ne(),t=>t===N(e)))return Le()}).then(()=>M(e).then(ge).then(()=>{t(),setTimeout(()=>{Me()})})).catch(n)}function Ie(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ae(e,t){const n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){const n=e[t];(!r&&":"===n||r&&"/"===n)&&i(t)}return i(e.length),new RegExp(o,"i");function i(i){const a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{const e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);const r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let Re=!1,ke=[],Pe=ee&&window.location.href;function Le(){return Me()}function Me(e=[],t,n=!1){if(Re)return new Promise((e,n)=>{ke.push({resolve:e,reject:n,eventArguments:t})});const{appsToUnload:r,appsToUnmount:o,appsToLoad:a,appsToMount:l}=function(){const e=[],t=[],n=[],r=[],o=(new Date).getTime();return we.forEach(i=>{const a=i.status!==_&&O(i);switch(i.status){case x:a&&o-i.loadErrorTime>=200&&n.push(i);break;case f:case p:a&&n.push(i);break;case m:case g:!a&&ye(N(i))?e.push(i):a&&r.push(i);break;case v:a||t.push(i)}}),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}();let s,c=[],d=Pe,h=Pe=window.location.href;return Ve()?(Re=!0,s=r.concat(a,o,l),Promise.resolve().then(()=>(C(0===s.length?"before-no-app-change":"before-app-change",E(!0)),C("before-routing-event",E(!0,{cancelNavigation:b})),Promise.all(c).then(n=>{if(n.some(e=>e))return se.call(window.history,history.state,"",d.substring(location.origin.length)),Pe=location.href,Re=!1,Me(e,t,!0);const i=r.map(ge),s=o.map(M).map(e=>e.then(ge)).concat(i),c=Promise.all(s);c.then(()=>{C("before-mount-routing-event",E(!0))},e=>{throw e});const u=a.map(e=>Q(e).then(e=>De(e,c))),f=l.filter(e=>a.indexOf(e)<0).map(e=>De(e,c));return c.catch(e=>{throw w(),e}).then(()=>(w(),Promise.all(u.concat(f)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(s=a,Promise.resolve().then(()=>{const e=a.map(Q);return Promise.all(e).then(w).then(()=>[]).catch(e=>{throw w(),e}).finally(()=>{})}));function b(e=!0){const t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);c.push(t.catch(e=>(console.warn(Error(u(42,!1))),console.warn(e),!1)))}function y(){const t=Ee();e.forEach(e=>e.resolve(t));try{C(0===s.length?"no-app-change":"app-change",E()),C("routing-event",E())}catch(e){setTimeout(()=>{throw e})}if(Re=!1,ke.length>0){const e=ke;ke=[],Me(e)}return t}function w(){n||(e.forEach(e=>{oe(e.eventArguments)}),oe(t))}function E(e=!1,n){const i={},c={[v]:[],[g]:[],[f]:[],[_]:[]};e?(a.concat(l).forEach((e,t)=>{p(e,v)}),r.forEach(e=>{p(e,f)}),o.forEach(e=>{p(e,g)})):s.forEach(e=>{p(e)});const u={detail:{newAppStatuses:i,appsByNewStatus:c,totalAppChanges:s.length,originalEvent:null==t?void 0:t[0],oldUrl:d,newUrl:h}};return n&&$(u.detail,n),u;function p(e,t){const n=N(e);t=t||_e(n),i[n]=t,(c[t]=c[t]||[]).push(n)}}function C(e,t){n||window.dispatchEvent(new i(`single-spa:${e}`,t))}}function De(e,t){return O(e)?L(e).then(e=>t.then(()=>O(e)?j(e):e)):t.then(()=>e)}let Be=!1;function je(e){Be=!0,ee&&(ue(e),Me())}function Ve(){return Be}var Fe={getRawAppData:function(){return[...we]},reroute:Me,NOT_LOADED:f,toLoadPromise:Q,toBootstrapPromise:L,unregisterApplication:Te,getProfilerData:function(){return P}};ee&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Fe)},9324(e,t,n){"use strict";n.d(t,{Ay:()=>c,BE:()=>s});var r=n(6072),o=n(9888),i=n(8465);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),l={dedupe:!0},s=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),c=(0,i.withArgs)((e,t,n)=>{const{cache:s,compare:c,suspense:u,fallbackData:d,revalidateOnMount:f,revalidateIfStale:p,refreshInterval:m,refreshWhenHidden:h,refreshWhenOffline:g,keepPreviousData:b}=n,[v,y,w,E]=i.SWRGlobalState.get(s),[x,_]=(0,i.serialize)(e),C=(0,r.useRef)(!1),O=(0,r.useRef)(!1),N=(0,r.useRef)(x),T=(0,r.useRef)(t),S=(0,r.useRef)(n),$=()=>S.current,I=()=>$().isVisible()&&$().isOnline(),[A,R,k,P]=(0,i.createCacheHelper)(s,x),L=(0,r.useRef)({}).current,M=(0,i.isUndefined)(d)?n.fallback[x]:d,D=(e,t)=>{for(const n in L){const r=n;if("data"===r){if(!c(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!c(q,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},B=(0,r.useMemo)(()=>{const e=!!x&&!!t&&((0,i.isUndefined)(f)?!$().isPaused()&&!u&&(!!(0,i.isUndefined)(p)||p):f),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=A(),o=P(),a=n(r),l=r===o?a:n(o);let s=a;return[()=>{const e=n(A());return D(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>l]},[s,x]),j=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>k(x,(t,n)=>{D(n,t)||e()}),[s,x]),B[0],B[1]),V=!C.current,F=v[x]&&v[x].length>0,z=j.data,H=(0,i.isUndefined)(z)?M:z,U=j.error,W=(0,r.useRef)(H),q=b?(0,i.isUndefined)(z)?W.current:z:H,K=!(F&&!(0,i.isUndefined)(U))&&(V&&!(0,i.isUndefined)(f)?f:!$().isPaused()&&(u?!(0,i.isUndefined)(H)&&p:(0,i.isUndefined)(H)||p)),G=!!(x&&t&&V&&K),Z=(0,i.isUndefined)(j.isValidating)?G:j.isValidating,J=(0,i.isUndefined)(j.isLoading)?G:j.isLoading,Y=(0,r.useCallback)(async e=>{const t=T.current;if(!x||!t||O.current||$().isPaused())return!1;let r,o,a=!0;const l=e||{},s=!w[x]||!l.dedupe,u=()=>i.IS_REACT_LEGACY?!O.current&&x===N.current&&C.current:x===N.current,d={isValidating:!1,isLoading:!1},f=()=>{R(d)},p=()=>{const e=w[x];e&&e[1]===o&&delete w[x]},m={isValidating:!0};(0,i.isUndefined)(A().data)&&(m.isLoading=!0);try{if(s&&(R(m),n.loadingTimeout&&(0,i.isUndefined)(A().data)&&setTimeout(()=>{a&&u()&&$().onLoadingSlow(x,n)},n.loadingTimeout),w[x]=[t(_),(0,i.getTimestamp)()]),[r,o]=w[x],r=await r,s&&setTimeout(p,n.dedupingInterval),!w[x]||w[x][1]!==o)return s&&u()&&$().onDiscarded(x),!1;d.error=i.UNDEFINED;const e=y[x];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return f(),s&&u()&&$().onDiscarded(x),!1;const l=A().data;d.data=c(l,r)?l:r,s&&u()&&$().onSuccess(r,x,n)}catch(e){p();const t=$(),{shouldRetryOnError:n}=t;t.isPaused()||(d.error=e,s&&u()&&(t.onError(e,x,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&($().revalidateOnFocus&&$().revalidateOnReconnect&&!I()||t.onErrorRetry(e,x,t,e=>{const t=v[x];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0}))))}return a=!1,f(),!0},[x,s]),X=(0,r.useCallback)((...e)=>(0,i.internalMutate)(s,N.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{T.current=t,S.current=n,(0,i.isUndefined)(z)||(W.current=z)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!x)return;const e=Y.bind(i.UNDEFINED,l);let t=0;const n=(0,i.subscribeCallback)(x,v,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();$().revalidateOnFocus&&n>t&&I()&&(t=n+$().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)$().revalidateOnReconnect&&I()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return Y();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return Y(r)}});return O.current=!1,N.current=x,C.current=!0,R({_k:_}),K&&((0,i.isUndefined)(H)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{O.current=!0,n()}},[x]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(m)?m(A().data):m;t&&-1!==e&&(e=setTimeout(n,t))}function n(){A().error||!h&&!$().isVisible()||!g&&!$().isOnline()?t():Y(l).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[m,h,g,x]),(0,r.useDebugValue)(q),u&&(0,i.isUndefined)(H)&&x){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");T.current=t,S.current=n,O.current=!1;const e=E[x];if(!(0,i.isUndefined)(e)){const t=X(e);a(t)}if(!(0,i.isUndefined)(U))throw U;{const e=Y(l);(0,i.isUndefined)(q)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:X,get data(){return L.data=!0,q},get error(){return L.error=!0,U},get isValidating(){return L.isValidating=!0,Z},get isLoading(){return L.isLoading=!0,J}}})},1635(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>L,__assign:()=>i,__asyncDelegator:()=>O,__asyncGenerator:()=>C,__asyncValues:()=>N,__await:()=>_,__awaiter:()=>m,__classPrivateFieldGet:()=>R,__classPrivateFieldIn:()=>P,__classPrivateFieldSet:()=>k,__createBinding:()=>g,__decorate:()=>l,__disposeResources:()=>D,__esDecorate:()=>c,__exportStar:()=>b,__extends:()=>o,__generator:()=>h,__importDefault:()=>A,__importStar:()=>I,__makeTemplateObject:()=>T,__metadata:()=>p,__param:()=>s,__propKey:()=>d,__read:()=>y,__rest:()=>a,__rewriteRelativeImportExtension:()=>B,__runInitializers:()=>u,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>E,__values:()=>v,default:()=>j});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function l(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,c="getter"===s?"get":"setter"===s?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var m={};for(var h in r)m[h]="access"===h?{}:r[h];for(var h in r.access)m.access[h]=r.access[h];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var g=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[c],m);if("accessor"===s){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(l=a(g.get))&&(d.get=l),(l=a(g.set))&&(d.set=l),(l=a(g.init))&&o.unshift(l)}else(l=a(g))&&("field"===s?o.unshift(l):d[c]=l)}u&&Object.defineProperty(u,r.name,d),f=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}s((r=r.apply(e,t||[])).next())})}function h(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function b(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function E(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)r[o]=i[a];return r}function x(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function C(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||l(e,t)})},t&&(r[e]=t(r[e])))}function l(e,t){try{(n=o[e](t)).value instanceof _?Promise.resolve(n.value.v).then(s,c):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function s(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function O(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:_(e[r](t)),done:!1}:o?o(t):t}:o}}function N(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},$=function(e){return $=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},$(e)};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=$(e),r=0;r<n.length;r++)"default"!==n[r]&&g(t,e,n[r]);return S(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function k(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function L(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var M="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function D(e){function t(t){e.error=e.hasError?new M(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function B(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}const j={__extends:o,__assign:i,__rest:a,__decorate:l,__param:s,__esDecorate:c,__runInitializers:u,__propKey:d,__setFunctionName:f,__metadata:p,__awaiter:m,__generator:h,__createBinding:g,__exportStar:b,__values:v,__read:y,__spread:w,__spreadArrays:E,__spreadArray:x,__await:_,__asyncGenerator:C,__asyncDelegator:O,__asyncValues:N,__makeTemplateObject:T,__importStar:I,__importDefault:A,__classPrivateFieldGet:R,__classPrivateFieldSet:k,__classPrivateFieldIn:P,__addDisposableResource:L,__disposeResources:D,__rewriteRelativeImportExtension:B}},7283(e,t,n){"use strict";n.d(t,{y:()=>o});const r=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{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()}},a=t=e(r,o,i);return i},o=e=>e?r(e):r}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.exports}a.m=o,a.c=i,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;("object"==typeof l||"function"==typeof l)&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>e+".js",a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="@cc-openmrs/cc-esm-active-prescriptions:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var l,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+o){l=d;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",a.nc&&l.setAttribute("nonce",a.nc),l.setAttribute("data-webpack",r+o),l.src=e),n[e]=[t];var f=(t,r)=>{l.onerror=l.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach(e=>e(r)),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),s&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{a.S={};var e={},t={};a.I=(n,r)=>{r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];a.o(a.S,n)||(a.S[n]={});var i=a.S[n],l="@cc-openmrs/cc-esm-active-prescriptions",s=(e,t,n,r)=>{var o=i[e]=i[e]||{},a=o[t];(!a||!a.loaded&&(!r!=!a.eager?r:l>a.from))&&(o[t]={get:n,from:l,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework","8.0.0",()=>Promise.all([a.e(635),a.e(279),a.e(795),a.e(72),a.e(465),a.e(995),a.e(561),a.e(920)]).then(()=>()=>a(2279))),s("dayjs","1.11.20",()=>a.e(353).then(()=>()=>a(6734))),s("react-dom","18.3.1",()=>Promise.all([a.e(961),a.e(72)]).then(()=>()=>a(961))),s("react-i18next","16.5.8",()=>Promise.all([a.e(635),a.e(72),a.e(692)]).then(()=>()=>a(3311))),s("react","18.3.1",()=>a.e(540).then(()=>()=>a(6540))),s("rxjs","6.6.7",()=>a.e(184).then(()=>()=>a(3184))),s("swr/_internal","2.2.5",()=>Promise.all([a.e(993),a.e(72)]).then(()=>()=>a(4993))),s("swr/immutable","2.2.5",()=>Promise.all([a.e(72),a.e(465),a.e(606)]).then(()=>()=>a(4225))),s("swr/infinite","2.2.5",()=>Promise.all([a.e(72),a.e(465),a.e(422)]).then(()=>()=>a(3041)))),e[n]=c.length?Promise.all(c).then(()=>e[n]=1):1}}})(),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map(e=>+e==e?+e:e),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<e.length;i++)o--,r+="u"==(typeof(l=e[i]))[0]?"-":(o>0?".":"")+(o=2,l);return r}var a=[];for(i=1;i<e.length;i++){var l=e[i];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():t(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var o=t[0],i=o<0;i&&(o=-o-1);for(var a=0,l=1,s=!0;;l++,a++){var c,u,d=l<t.length?(typeof t[l])[0]:"";if(a>=r.length||"o"==(u=(typeof(c=r[a]))[0]))return!s||("u"==d?l>o&&!i:""==d!=i);if("u"==u){if(!s||"u"!=d)return!1}else if(s)if(d==u)if(l<=o){if(c!=t[l])return!1}else{if(i?c>t[l]:c<t[l])return!1;c!=t[l]&&(s=!1)}else if("s"!=d&&"n"!=d){if(i||l<=o)return!1;s=!1,l--}else{if(l<=o||u<d!=i)return!1;s=!1}else"s"!=d&&"n"!=d&&(s=!1,l--)}}var f=[],p=f.pop.bind(f);for(a=1;a<t.length;a++){var m=t[a];f.push(1==m?p()|p():2==m?p()&p():m?n(m,r):!p())}return!!p()},r=(t,n,r)=>{var o=r?(e=>Object.keys(e).reduce((t,n)=>(e[n].eager&&(t[n]=e[n]),t),{}))(t[n]):t[n];return Object.keys(o).reduce((t,n)=>!t||!o[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=t[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var a=n[r],l=(typeof a)[0];if(i!=l)return"o"==i&&"n"==l||"s"==l||"u"==i;if("o"!=i&&"u"!=i&&o!=a)return o<a;r++}})(t,n)?n:t,0)},o=(e,t,n)=>n?n():((e,t)=>(e=>{throw new Error(e)})("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),i=(e=>function(t,n,r,o,i){var l=a.I(t);return l&&l.then&&!r?l.then(e.bind(e,t,a.S[t],n,!1,o,i)):e(t,a.S[t],n,r,o,i)})((e,i,l,s,c,u)=>{if(!((e,t)=>e&&a.o(e,t))(i,l))return o(e,l,u);var d,f,p=r(i,l,s);return n(c,p)||(f=((e,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(o)+")")(i,l,p,c),"undefined"!=typeof console&&console.warn&&console.warn(f)),(d=i[l][p]).loaded=1,d.get()}),l={},s={6072:()=>i("default","react",!1,[1,18],()=>a.e(540).then(()=>()=>a(6540))),2646:()=>i("default","react-dom",!1,[1,18],()=>a.e(961).then(()=>()=>a(961))),6920:()=>i("default","@openmrs/esm-framework",!1,[1,9],()=>Promise.all([a.e(635),a.e(279),a.e(561)]).then(()=>()=>a(2279))),2076:()=>i("default","react-i18next",!1,[1,16],()=>Promise.all([a.e(635),a.e(311)]).then(()=>()=>a(3311))),8465:()=>i("default","swr/_internal",!1,[1,2],()=>a.e(993).then(()=>()=>a(4993))),3083:()=>i("default","rxjs",!1,[1,6],()=>a.e(184).then(()=>()=>a(3184))),231:()=>i("default","dayjs",!1,[1,1],()=>a.e(353).then(()=>()=>a(6734))),4209:()=>i("default","swr/immutable",!1,[1,2],()=>a.e(225).then(()=>()=>a(4225))),6339:()=>i("default","swr/infinite",!1,[1,2],()=>a.e(41).then(()=>()=>a(3041)))};[6072,2646,6920,2076,8465,3083].forEach(e=>{a.m[e]=t=>{l[e]=0,delete a.c[e];var n=s[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}});var c={72:[6072],465:[8465],561:[231,4209,6339],792:[6072,2646,6920,2076,8465,3083],920:[6920],995:[2076,2646,3083]},u={};a.f.consumes=(e,t)=>{a.o(c,e)&&c[e].forEach(e=>{if(a.o(l,e))return t.push(l[e]);if(!u[e]){var n=t=>{l[e]=0,a.m[e]=n=>{delete a.c[e],n.exports=t()}};u[e]=!0;var r=t=>{delete l[e],a.m[e]=n=>{throw delete a.c[e],t}};try{var o=s[e]();o.then?t.push(l[e]=o.then(n).catch(r)):n(o)}catch(e){r(e)}}})}})(),(()=>{var e={72:0,465:0,499:0,792:0,795:0,920:0,995:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(465|561|72|920|995)$/.test(t))e[t]=0;else{var o=new Promise((n,o)=>r=e[t]=[n,o]);n.push(r[2]=o);var i=a.p+a.u(t),l=new Error;a.l(i,n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,r[1](l)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,l,s]=n,c=0;if(i.some(t=>0!==e[t])){for(r in l)a.o(l,r)&&(a.m[r]=l[r]);s&&s(a)}for(t&&t(n);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0,a(2499)})();
2
+ (()=>{var e,t,n,r,o={428(e,t,n){"use strict";function r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{A:()=>p});var a=["width","height","viewBox"],c=["tabindex"],u={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var l=n(5556),f=n.n(l),d=n(6072);const p=(0,d.forwardRef)(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:o="xMidYMid meet",...l},f){const{tabindex:p,...h}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,o=void 0===r?"0 0 ".concat(t," ").concat(n):r,l=s(e,a),f=l.tabindex,d=s(l,c),p=i(i(i({},u),d),{},{width:t,height:n,viewBox:o});return p["aria-label"]||p["aria-labelledby"]?(p.role="img",null!=f&&(p.focusable="true",p.tabindex=f)):p["aria-hidden"]=!0,p}({...l,tabindex:n}),m=h;return e&&(m.className=e),null!=p&&(m.tabIndex="number"==typeof p?p:Number(n)),f&&(m.ref=f),r&&(m.xmlns=r),o&&(m.preserveAspectRatio=o),d.createElement("svg",m,t)});p.displayName="Icon",p.propTypes={"aria-hidden":f().oneOfType([f().bool,f().oneOf(["true","false"])]),"aria-label":f().string,"aria-labelledby":f().string,children:f().node,className:f().string,height:f().oneOfType([f().number,f().string]),preserveAspectRatio:f().string,tabIndex:f().oneOfType([f().number,f().string]),viewBox:f().string,width:f().oneOfType([f().number,f().string]),xmlns:f().string}},771(e,t,n){"use strict";n.d(t,{$D:()=>S,d3:()=>O,sV:()=>j,x:()=>A});var r,o,i,s,a,c,u,l,f,d,p,h,m,g,y,v,w,b=n(6072),E=n(428);const O=b.forwardRef(function({children:e,size:t=16,...n},i){return b.createElement(E.A,{width:t,height:t,ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},r||(r=b.createElement("path",{d:"M16 18 6 8 7.4 6.6 16 15.2 24.6 6.6 26 8z"})),o||(o=b.createElement("path",{d:"M4 22H28V24H4z"})),e)}),S=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=b.createElement("path",{d:"M2,16H2A14,14,0,1,0,16,2,14,14,0,0,0,2,16Zm23.15,7.75L8.25,6.85a12,12,0,0,1,16.9,16.9ZM8.24,25.16A12,12,0,0,1,6.84,8.27L23.73,25.16a12,12,0,0,1-15.49,0Z"})),e)}),A=b.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},s||(s=b.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),a||(a=b.createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},c||(c=b.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),u||(u=b.createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},l||(l=b.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),f||(f=b.createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),e):b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},d||(d=b.createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),p||(p=b.createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),e)}),j=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(E.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},h||(h=b.createElement("path",{d:"M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z"})),m||(m=b.createElement("path",{d:"M24,4a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,24,2Z"})),g||(g=b.createElement("path",{d:"M23,30H21V28a3.0033,3.0033,0,0,0-3-3H14a3.0033,3.0033,0,0,0-3,3v2H9V28a5.0059,5.0059,0,0,1,5-5h4a5.0059,5.0059,0,0,1,5,5Z"})),y||(y=b.createElement("path",{d:"M16,13a3,3,0,1,1-3,3,3,3,0,0,1,3-3m0-2a5,5,0,1,0,5,5A5,5,0,0,0,16,11Z"})),v||(v=b.createElement("path",{d:"M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z"})),w||(w=b.createElement("path",{d:"M8,4A3,3,0,1,1,5,7,3,3,0,0,1,8,4M8,2a5,5,0,1,0,5,5A5,5,0,0,0,8,2Z"})),e)})},2499(e,t,n){"use strict";var r=n(6072),o=n(2646),i=n(6920),s=n(8527),a=n(5684),c=(i.Type.Boolean,i.Type.Array,i.Type.String,(0,i.validator)(function(e){return e.length>0},"At least one person must be greeted."),n(771)),u=n(2076),l=function(){return(0,i.launchWorkspace)("active-prescriptions")},f=function(e){return r.createElement(c.sV,e)};var d={featureName:"active-prescriptions",moduleName:"@cc-openmrs/cc-esm-active-prescriptions"};function p(e,t){return function(){return e().then(function(e){return function(e,t){return(0,a.A)({React:r,ReactDOM:o,renderType:"render",rootComponent:(0,s.F)(t)(e)})}(e.default,t)})}}n(4767),p(function(){return n.e(319).then(n.bind(n,4319))},d),p(function(){return n.e(966).then(n.bind(n,966))},d),p(function(){return n.e(537).then(n.bind(n,1537))},d),p(function(){return Promise.all([n.e(866),n.e(845)]).then(n.bind(n,6845))},d)},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8493(e,t,n){"use strict";var r=n(6072),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return a(function(){o.value=n,o.getSnapshot=t,u(o)&&l({inst:o})},[e,n,t]),s(function(){return u(o)&&l({inst:o}),e(function(){u(o)&&l({inst:o})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},9888(e,t,n){"use strict";e.exports=n(8493)},4767(e,t,n){var r={"./am.json":[1197,[197]],"./en.json":[4300,[300]],"./es.json":[3099,[99]],"./fr.json":[4055,[55]],"./he.json":[4652,[652]],"./km.json":[6716,[335]],"./pt.json":[6679,[679]]};function o(e){try{if(!n.o(r,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}catch(e){return Promise.reject(e)}var t=r[e],o=t[0];return n.e(t[1][0]).then(()=>n(o))}o.keys=()=>Object.keys(r),o.id=4767,e.exports=o},967(e,t,n){"use strict";n.d(t,{$f:()=>w,QE:()=>k,g$:()=>T,IU:()=>h,HW:()=>O,xC:()=>_,Kx:()=>x,EW:()=>S,L7:()=>$,Gm:()=>g,lo:()=>y,ut:()=>v,yH:()=>j,Jj:()=>p,Ct:()=>m,eA:()=>b,Gp:()=>R,E4:()=>A,Fi:()=>C,Y0:()=>I,st:()=>P});var r=n(44),o=n(5048);const i=function(e){return void 0===e};var s=n(3083),a=n(4963),c=n(6963),u=n(5874);const l="${openmrsSpaBase}/login",f={redirectAuthFailure:{enabled:{_type:c.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:c.ZU.String,_default:l,_validators:[c.y$.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:c.ZU.Array,_default:[401],_elements:{_type:c.ZU.Number,_validators:[c.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:c.ZU.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:c.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p="/ws/rest/v1",h="/ws/fhir2/R4",m=`${p}/session`;function g(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function y(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=g(e);if(t.headers||(t.headers={}),(0,a.A)(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(p)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(h)){const e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}const r=Error();return window.fetch(n,t).then(async e=>{const t=e,{redirectAuthFailure:o,followRedirects:i}=await(0,c.zj)("@openmrs/esm-api");if(t.ok){if(204===t.status){if(i&&t.headers.has("location")){const e=t.headers.get("location");e&&(0,u.oo)({to:e})}return t.data=null,t}return t.clone().text().then(e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t})}if(n===g(m)&&403===t.status||o.enabled&&o.errors.includes(t.status)){(0,u.g4)();const e=o.url||t.headers.get("location")||l;return(0,u.oo)({to:e}),o.resolvePromise?Promise.resolve():new Promise(()=>{})}return t.clone().text().then(e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new w(n,t,o,r)},e=>{throw new w(n,t,null,r)})})}function v(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new s.Observable(r=>{let o=!1;return y(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class w extends Error{constructor(e,t,n,r){super(),d(this,"response",void 0),d(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const b=(0,o.Zd)("session",{loaded:!1,session:null});let E=0;function O(e={includeAuthStatus:!0}){return(E<Date.now()-6e4||!b.getState().loaded)&&j(),new s.Observable(t=>{const n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(b.getState()),b.subscribe(n)})}function S(){return(E<Date.now()-6e4||!b.getState().loaded)&&j(),b}function A(e){let t=e.user?.userProperties?.defaultLocale??e.locale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function j(e,t){E=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),N(y(m,{headers:n}))}function T(){b.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function P(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!i(t.privileges.find(t=>e===t.display)):Array.isArray(e)?e.every(e=>!i(t.privileges.find(t=>e===t.display))):(i(e)||console.error(`Could not understand privileges "${e}"`),!0)}(e,t)||function(e){return!i(e.roles.find(e=>"System Developer"===e.display))}(t)}function _(){let e,t;return new Promise(n=>{const r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(b.getState()),e||(t=b.subscribe(r))})}function x(){return new Promise((e,t)=>{O().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function R(e,t){return N(y(m,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function C(e,t,n){return n||(n=new AbortController),await y(`${p}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),j()}function N(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},b.setState(r),t(r)):(r={loaded:!1,session:null},b.setState(r),n(r))}).catch(e=>{(0,r.N)(`Failed to fetch new session information: ${e}`);const t={loaded:!1,session:null};b.setState(t),n(t)})})}function $(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}b.subscribe(e=>{e.loaded&&e.session&&A(e.session)});const k={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function I(){(0,c.T0)("@openmrs/esm-api",f),j()}},6963(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function o(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}function i(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return r(n)?t:o(function(t){return e(n,t)});default:return r(n)&&r(i)?t:r(n)?o(function(t){return e(t,i)}):r(i)?o(function(t){return e(n,t)}):e(n,i)}}}function s(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function a(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function c(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,{ZU:()=>V,Nh:()=>He,hs:()=>te,Rt:()=>X,T0:()=>me,ks:()=>we,zj:()=>Ee,IS:()=>ne,UY:()=>ae,g$:()=>ue,P0:()=>ce,G9:()=>oe,vu:()=>ie,YP:()=>re,GI:()=>se,td:()=>Oe,tN:()=>le,r4:()=>Ze,gU:()=>Je,qG:()=>qe,yL:()=>Ye,mq:()=>Se,Gt:()=>be,kl:()=>ye,FL:()=>ge,GV:()=>ve,H:()=>ee,Nc:()=>H,y$:()=>Ke});const u="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var l=Object.prototype.toString,f=function(){return"[object Arguments]"===l.call(arguments)?function(e){return"[object Arguments]"===l.call(e)}:function(e){return c("callee",e)}}();const d=f;var p=!{toString:null}.propertyIsEnumerable("toString"),h=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=function(){return arguments.propertyIsEnumerable("length")}(),g=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const y="function"!=typeof Object.keys||m?o(function(e){if(Object(e)!==e)return[];var t,n,r=[],o=m&&d(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(p)for(n=h.length-1;n>=0;)c(t=h[n],e)&&!g(r,t)&&(r[r.length]=t),n-=1;return r}):o(function(e){return Object(e)!==e?[]:Object.keys(e)}),v=o(function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function w(e,t,n,r){var o=s(e);function i(e,t){return b(e,t,n.slice(),r.slice())}return!a(function(e,t){return!a(i,t,e)},s(t),o)}function b(e,t,n,r){if(u(e,t))return!0;var o,i,s=v(e);if(s!==v(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!u(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!u(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var a=n.length-1;a>=0;){if(n[a]===e)return r[a]===t;a-=1}switch(s){case"Map":return e.size===t.size&&w(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&w(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=y(e);if(l.length!==y(t).length)return!1;var f=n.concat([e]),d=r.concat([t]);for(a=l.length-1;a>=0;){var p=l[a];if(!c(p,t)||!b(t[p],e[p],f,d))return!1;a-=1}return!0}const E=i(function(e,t){return b(e,t,[],[])});function O(e){return function t(n,s,a){switch(arguments.length){case 0:return t;case 1:return r(n)?t:i(function(t,r){return e(n,t,r)});case 2:return r(n)&&r(s)?t:r(n)?i(function(t,n){return e(t,s,n)}):r(s)?i(function(t,r){return e(n,t,r)}):o(function(t){return e(n,s,t)});default:return r(n)&&r(s)&&r(a)?t:r(n)&&r(s)?i(function(t,n){return e(t,n,a)}):r(n)&&r(a)?i(function(t,n){return e(t,s,n)}):r(s)&&r(a)?i(function(t,r){return e(n,t,r)}):r(n)?o(function(t){return e(t,s,a)}):r(s)?o(function(t){return e(n,t,a)}):r(a)?o(function(t){return e(n,s,t)}):e(n,s,a)}}}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}const A=O(function(e,t,n){var r,o={};for(r in n=n||{},t=t||{})c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o}),j=O(function e(t,n,r){return A(function(n,r,o){return S(r)&&S(o)?e(t,r,o):t(n,r,o)},n,r)}),T=i(function(e,t){return j(function(e,t,n){return n},e,t)}),P=i(function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var s in t)r.hasOwnProperty(s)||(n[s]=t[s]);return n});function _(e,t,n){if(n||(n=new x),o=typeof(r=e),null==r||"object"!=o&&"function"!=o)return e;var r,o,i,s=function(r){var o=n.get(e);if(o)return o;for(var i in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t?_(e[i],!0,n):e[i]);return r};switch(v(e)){case"Object":return s(Object.create(Object.getPrototypeOf(e)));case"Array":return s(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var x=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180){for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1)if((i=n[r])[0]===e)return i[1]}else{var o=this.hash(e);if(n=this.map[o])for(r=0;r<n.length;r+=1){var i;if((i=n[r])[0]===e)return i[1]}}},e}();const R=o(function(e){return null!=e&&"function"==typeof e.clone?e.clone():_(e,!0)}),C=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},N=o(function(e){return!!C(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))});var $="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function k(e,t,n){return function(r,o,i){if(N(i))return e(r,o,i);if(null==i)return o;if("function"==typeof i["fantasy-land/reduce"])return t(r,o,i,"fantasy-land/reduce");if(null!=i[$])return n(r,o,i[$]());if("function"==typeof i.next)return n(r,o,i);if("function"==typeof i.reduce)return t(r,o,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function I(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}var U=i(function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,s){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,s,a){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,s,a,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,s,a,c,u){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,s,a,c,u,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,function(){return e.apply(t,arguments)})});const D=U;function L(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function M(e,t,n,r){return e["@@transducer/result"](n[r](D(e["@@transducer/step"],e),t))}const B=k(I,M,L);var F=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();const W=O(function(e,t,n){return B("function"==typeof e?new F(e):e,t,n)});var V=function(e){return e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",e}({});function H(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}const G=H(e=>Array.isArray(e),"must be an array"),z=H(e=>"boolean"==typeof e,"must be a boolean"),Z=H(e=>"number"==typeof e,"must be a number"),q=H(e=>"string"==typeof e,"must be a string"),J=H(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),Y=H(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string");var K=n(5048),Q=n(8101);const X=(0,K.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),ee=(0,K.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});ee.subscribe(e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))});const te=(0,K.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function ne(e){return(0,K.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function re(){return(0,K.jf)("config-extension-slots",{slots:{}})}function oe(e){return ie(re().getState(),e)}function ie(e,t){return e.slots[t]??{loaded:!1,config:{}}}function se(){return(0,K.jf)("config-extensions",{configs:{}})}function ae(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw new Error("Attempted to call `getExtensionConfig()` with invalid argument");const n=se(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},setState(r,o=!1){n.setState(n=>{n.configs[e]||(n.configs[e]={});const i="function"==typeof r?r(n.configs.slotName[t]):r;return n.configs[e][t]=o?Object.assign({},i):Object.assign({},n.configs[e][t],i),n})},subscribe:e=>n.subscribe((t,n)=>{const o=r(t),i=r(n);(0,Q.b)(o,i)||e(o,i)}),destroy(){}}}function ce(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}function ue(e,t,n){const r=e.configure?.[n];return r??null}const le=(0,K.Zd)("config-implementer-tools",{config:{}});function fe(e,t){for(let n of Object.keys(e.schemas)){const r=ne(n);if(e.moduleLoaded[n]){const o=Re(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!0,config:o})}else{const o=Ce(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!1,config:o})}}}function de(e,t){const n=function(e,t){const n=$e(_e(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});!function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Pe(r,t,e)}(r);return Object.keys(r).reduce((e,t)=>({...e,...r[t]}),{})}(e,t),r=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,{loaded:!0,config:t}])),o=re(),i=o.getState(),s={slots:{...i.slots,...r}};E(i,s)||o.setState(s)}function pe(e,t){const n=function(e,t){let n=je(R(e.schemas));const r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]];for(let[e,t]of r)n=$e([n,Te(e,t)]);return n}(e,t);le.setState({config:n})}function he(e,t,n){const r={};for(let o of t.mountedExtensions){const t=Ae(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}se().setState({configs:r})}function me(e,t){xe(e,t);const n=T(t,ze);X.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ge(e){X.setState(t=>({...t,schemas:{...t.schemas,[e]:ze}}))}function ye(e){X.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ve(e){X.setState(t=>({...t,schemas:{...t.schemas,[e]:Ge}}))}function we(e,t){xe(e,t);const n=T(t,ze);X.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),X.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function be(e,t="provided"){X.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function Ee(e){return new Promise(t=>{const n=ne(e);function r(e){if(e.loaded&&e.config){const n=P(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})}function Oe(e,t,n){const r=[new Promise(t=>{const n=ne(e);function r(e){if(e.translationOverridesLoaded&&e.config){const n=e.config["Translation overrides"]??{};t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})];return t&&n&&r.push(new Promise(e=>{const r=ae(t,n);function o(t){if(t.loaded&&t.config){const n=t.config["Translation overrides"]??{};e(n),i&&i()}}o(r.getState());const i=r.subscribe(o)})),Promise.all(r)}function Se(e,t,n){ke(e,t,n);const r=Me(e,t);return Ue(e,r,n),r}function Ae(e,t,n,r,o,i){const s=function(e){const[t]=e.split("#");return t}(r),a=o.schemas[s],c=a?s:t,u=_e(o,i),l=Ne(e,u),f=l?.extensionSlots?.[n]?.configure?.[r]??{},d=$e([Ne(c,u),f]),p=a??o.schemas[t];ke(p,d,c);const h=Me(p,d);return Ue(p,h,c),delete h.extensionSlots,h}function je(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:Fe(e)?Object.keys(e).reduce((t,n)=>(t[n]=je(e[n]),t),{}):{}}function Te(e,t){return Fe(e)?Object.keys(e).reduce((n,r)=>(n[r]=Te(e[r],t),n),{}):{_value:e,_source:t}}function Pe(e,t,n){const r=`${t}.extensionSlots.${n}`,o=`Extension slot config '${r}'`,i=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));i.length&&Ve(r,o+`' contains invalid keys '${i.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||Ve(r,o+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||Ve(r,o+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||Ve(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Fe(e.configure)||Ve(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))}function _e(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function xe(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter(e=>!e.startsWith("_"))){const i=n+(n&&".")+o,s=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!Fe(s)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}s.hasOwnProperty("_default")||xe(e,s,i);const a=s._elements;if(Be(a)&&xe(e,a,i+"._elements"),s._validators)for(let t of s._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const c=s._type;c&&!Object.values(V).includes(c)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(V).join(", ")}. Received '${c}'`),Object.keys(s).every(e=>["_description","_validators","_elements","_type"].includes(e))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),a&&c&&![V.Array,V.Object].includes(c)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(c)}`)}}function Re(e,t,n){const r=t.schemas[e],o=Ne(e,_e(t,n));ke(r,o,e);const i=Me(r,o);return Ue(r,i,e),delete i.extensionSlots,i}function Ce(e,t,n){const r=Ne(e,_e(t,n)),o=Me(ze,r);return Ue(ze,o,e),delete o.extensionSlots,o}function Ne(e,t){return $e(t.map(({[e]:t})=>t).filter(e=>!!e))}function $e(e){return W(T)({},e)}function ke(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e.hasOwnProperty(r)?Ie(s,o,i):"extensionSlots"===r&&""!==n||Ve(i,`Unknown config key '${i}' provided. Ignoring.`)}}function Ie(e,t,n){De(n,e._type,t),Fe(t)?e._type===V.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Ie(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||ke(e,t,n):e._type===V.Array&&function(e,t,n){if(De(n,V.Array,t)){if(Be(e._elements))for(let r=0;r<t.length;r++)Ie(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)De(`${n}[${r}]`,e._elements?._type,t[r])}}(e,t,n)}function Ue(e,t,n=""){if(e)if(t!==e._default&&Le(n,e._validators,t),Fe(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e._type===V.Object&&e._elements?Ue(e._elements,o,i):Ue(s,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)Ue(e._elements,t[r],`${n}[${r}]`)}function De(e,t,n){return!t||Le(e,[{Array:G,Boolean:z,ConceptUuid:Y,Number:Z,Object:J,String:q,UUID:Y,PersonAttributeTypeUuid:Y,PatientIdentifierTypeUuid:Y}[t]],n)}function Le(e,t,n){let r=!0;if(t)try{for(let o of t){const t=o(n);"string"==typeof t&&(Ve(e,"object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`),r=!1)}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}return r}fe(X.getState(),ee.getState()),X.subscribe(e=>fe(e,ee.getState())),ee.subscribe(e=>fe(X.getState(),e)),pe(X.getState(),ee.getState()),X.subscribe(e=>pe(e,ee.getState())),ee.subscribe(e=>pe(X.getState(),e)),de(X.getState(),ee.getState()),X.subscribe(e=>de(e,ee.getState())),ee.subscribe(e=>de(X.getState(),e)),he(X.getState(),te.getState(),ee.getState()),X.subscribe(e=>{he(e,te.getState(),ee.getState())}),te.subscribe(e=>{he(X.getState(),e,ee.getState())}),ee.subscribe(e=>{he(X.getState(),te.getState(),e)});const Me=(e,t)=>{const n=R(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&(o.hasOwnProperty("_type")||o.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&Be(e))if(o._type===V.Array&&Array.isArray(r)){const o=r.map(t=>Me(e,t));n[t]=o}else if(o._type===V.Object)for(let t of Object.keys(r))r[t]=Me(e,r[t])}else if(Fe(o)){const e=r??{};Fe(e)&&(n[t]=Me(o,e))}}return n};function Be(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function Fe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let We=new Set;function Ve(e,t){const n=`${e}:::${t}`;We||(We=new Set),We.has(n)||(console.error(t),We.add(n))}function He(e){e?We.forEach(t=>{t.startsWith(e)&&We.delete(t)}):We.clear()}const Ge={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:V.Object,_default:{},_validators:[H(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)).join(", ")}.`)]}},ze={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:V.Array,_default:[]}},...Ge},Ze=(e,t)=>H(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),qe=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return H(e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},Je=qe([]),Ye=e=>H(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),Ke={inRange:Ze,isUrl:Je,isUrlWithTemplateParameters:qe,oneOf:Ye}},44(e,t,n){"use strict";n.d(t,{J:()=>i,N:()=>o});var r=n(8581);function o(e){const t=s(e);setTimeout(()=>{throw t})}function i(){const e=Error();return t=>{s(t).stack+=`\nAsync stacktrace:\n${e.stack}`,o(t)}}function s(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(e){return console.error("Unexpected error: ",e),(0,r.Vt)({description:e??"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),(0,r.Vt)({description:e.reason??"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}},8581(e,t,n){"use strict";n.d(t,{$3:()=>g,FI:()=>h,LQ:()=>m,Vt:()=>y,Yt:()=>o,bJ:()=>v,bK:()=>w,dX:()=>b,ff:()=>u,gj:()=>i,ls:()=>E,pc:()=>c,sT:()=>s});const r="openmrs:connectivity-changed";function o(e){window.dispatchEvent(new CustomEvent(r,{detail:{online:e}}))}function i(e){if(!window.offlineEnabled)return()=>{};const t=t=>e(t.detail);return window.addEventListener(r,t),()=>window.removeEventListener(r,t)}function s(e){return e({online:!window.offlineEnabled||navigator.onLine}),i(e)}const a="openmrs:precache-static-dependencies";function c(e={}){window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const l="openmrs:notification-shown",f="openmrs:actionable-notification-shown",d="openmrs:toast-shown",p="openmrs:snack-bar-shown";function h(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function m(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function g(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(d,{detail:e}))}function v(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function w(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function b(e){const t=t=>e(t.detail);return window.addEventListener(d,t),()=>window.removeEventListener(d,t)}function E(e){const t=t=>e(t.detail);return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}},5874(e,t,n){"use strict";function r(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(e){return e&&e.sensitive?"":"i"}function i(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var i=n.strict,s=void 0!==i&&i,a=n.start,c=void 0===a||a,u=n.end,l=void 0===u||u,f=n.encode,d=void 0===f?function(e){return e}:f,p="["+r(n.endsWith||"")+"]|$",h="["+r(n.delimiter||"/#?")+"]",m=c?"^":"",g=0,y=e;g<y.length;g++){var v=y[g];if("string"==typeof v)m+=r(d(v));else{var w=r(d(v.prefix)),b=r(d(v.suffix));if(v.pattern)if(t&&t.push(v),w||b)if("+"===v.modifier||"*"===v.modifier){var E="*"===v.modifier?"?":"";m+="(?:"+w+"((?:"+v.pattern+")(?:"+b+w+"(?:"+v.pattern+"))*)"+b+")"+E}else m+="(?:"+w+"("+v.pattern+")"+b+")"+v.modifier;else m+="("+v.pattern+")"+v.modifier;else m+="(?:"+w+b+")"+v.modifier}}if(l)s||(m+=h+"?"),m+=n.endsWith?"(?="+p+")":"$";else{var O=e[e.length-1],S="string"==typeof O?h.indexOf(O[O.length-1])>-1:void 0===O;s||(m+="(?:"+h+"(?="+p+"))?"),S||(m+="(?="+h+"|"+p+")")}return new RegExp(m,o(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var s="",a=n+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:s}),n=a}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=t.prefixes,i=void 0===o?"./":o,s="[^"+r(t.delimiter||"/#?")+"]+?",a=[],c=0,u=0,l="",f=function(e){if(u<n.length&&n[u].type===e)return n[u++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var r=n[u],o=r.type,i=r.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};u<n.length;){var h=f("CHAR"),m=f("NAME"),g=f("PATTERN");if(m||g){var y=h||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(a.push(l),l=""),a.push({name:m||c++,prefix:y,suffix:"",pattern:g||s,modifier:f("MODIFIER")||""})}else{var v=h||f("ESCAPED_CHAR");if(v)l+=v;else if(l&&(a.push(l),l=""),f("OPEN")){y=p();var w=f("NAME")||"",b=f("PATTERN")||"",E=p();d("CLOSE"),a.push({name:w||(b?c++:""),pattern:w&&!b?s:b,prefix:y,suffix:E,modifier:f("MODIFIER")||""})}else d("END")}}return a}(e,n),t,n)}function s(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map(function(e){return s(e,t,n).source});return new RegExp("(?:"+r.join("|")+")",o(n))}(e,t,n):i(e,t,n)}n.d(t,{g4:()=>A,D_:()=>p,lz:()=>f,qh:()=>h,JK:()=>O,tA:()=>S,zl:()=>y,JG:()=>g,oo:()=>v,vf:()=>u,MY:()=>l,Wh:()=>E});const a=(0,n(5048).Zd)("breadcrumbs",[]);function c(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?s(e.matcher):s(e.path)}function u(e){return l([e])}function l(e){const t=[...f(),...e.map(e=>({matcher:c(e),settings:e}))];a.setState(t,!0)}function f(){return a.getState()}function d(e,t){if(t)return function(e,t){const[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=d(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){const n=d(e,t);if(n){const t=[n];let r=d(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=d(e,r.settings.parent);return t.reverse()}}return[]}function h(e){return p(f(),e)}var m=n(599);function g(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return y(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function y(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function v({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=g(e,t).replace(window.location.origin,"");r.startsWith(n)?(0,m.EH)(r):window.location.assign(r)}const w="openmrs:history";function b(e){let t=JSON.parse(sessionStorage.getItem(w)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(w,JSON.stringify(t))}function E(){0===JSON.parse(sessionStorage.getItem(w)??"[]").length&&document.referrer&&b(document.referrer),window.addEventListener("single-spa:routing-event",e=>{const t=O();"replaceState"==e.detail.originalEvent?.singleSpaTrigger?(t[t.length-1]=window.location.href,sessionStorage.setItem(w,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?S({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&b(window.location.href)})}function O(){return JSON.parse(sessionStorage.getItem(w)??"[]")}function S({toUrl:e}){const t=O(),n=t.lastIndexOf(e);if(-1==n)throw new Error(`URL ${e} not found in history; cannot go back to it.`);{const e=t.slice(0,n+1);v({to:t[n]}),sessionStorage.setItem(w,JSON.stringify(e))}}function A(){sessionStorage.removeItem(w)}},861(e,t,n){"use strict";n.d(t,{z:()=>r});const r=(0,n(6072).createContext)({moduleName:"",featureName:""})},8527(e,t,n){"use strict";n.d(t,{F:()=>f});var r=n(6072),o=n(2076),i=n(9324),s=n(967),a=n(861);const c={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},u=new Map,l={errorRetryCount:3,fetcher:s.lo,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,provider:()=>u};function f(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},c,e),n={...l,...t.swrConfig};return function(e){var s,c,u,l;return c=s=class extends r.Component{componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return r.createElement("div",null,"An error has occurred. Please try reloading the page.");{const s=r.createElement(r.Suspense,{fallback:null},r.createElement(i.BE,{value:n},r.createElement(a.z.Provider,{value:this.state.config},t.disableTranslations?r.createElement(e,this.props):r.createElement(o.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},r.createElement(e,this.props)))));return t.strictMode&&r.StrictMode?r.createElement(r.StrictMode,null,s):s}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},u="displayName",l=`OpenmrsReactComponent(${t.featureName})`,u in c?Object.defineProperty(c,u,{value:l,enumerable:!0,configurable:!0,writable:!0}):c[u]=l,s}}},5048(e,t,n){"use strict";n.d(t,{Zd:()=>s,jf:()=>c,CE:()=>a,i7:()=>u});var r=n(8101),o=n(7283);const i={};function s(e,t){const n=i[e];if(n)return n.active?console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value.setState(t,!0),n.active=!0,n.value;{const n=(0,o.y)()(()=>t);return i[e]={value:n,active:!0},n}}function a(e,t){const n=i[e];return n?(n.active?console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(i[e]={value:t,active:!0},t)}function c(e,t){const n=i[e];if(!n){const n=(0,o.y)()(()=>t??{});return i[e]={value:n,active:!1},n}return n.value}function u(...e){const[t,n,o]=e,i=void 0===o?n:o,s=void 0===o?e=>e:n;return i(s(t.getState())),t.subscribe((e,t)=>{const n=s(e);(0,r.b)(t,n)||i(n)})}setTimeout(()=>{window&&"development"===window.spaEnv&&(window.stores=i)},1e3)},8101(e,t,n){"use strict";function r(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t))return!1;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}n.d(t,{b:()=>r})},241(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1917).A.Symbol},8496(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(241),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r.A?r.A.toStringTag:void 0;var c=Object.prototype.toString;var u=r.A?r.A.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[a]=n:delete e[a]),o}(e):function(e){return c.call(e)}(e)}},2136(e,t,n){"use strict";n.d(t,{A:()=>r});const r="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis},5647(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(367).A)(Object.getPrototypeOf,Object)},367(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},1917(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(2136),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.A||o||Function("return this")()},3098(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},4963(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8496),o=n(5647),i=n(3098),s=Function.prototype,a=Object.prototype,c=s.toString,u=a.hasOwnProperty,l=c.call(Object);const f=function(e){if(!(0,i.A)(e)||"[object Object]"!=(0,r.A)(e))return!1;var t=(0,o.A)(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},5684(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(a(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(a(e)));return e}}n.d(t,{A:()=>f,i:()=>u});var u=null;try{u=require("react").createContext()}catch(r){}var l={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function f(e){if("object"!==i(e))throw new Error("single-spa-react requires a configuration object");var t,n=o(o({},l),e);if(!n.React)throw new Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw new Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!==(t=n.ReactDOMClient)&&void 0!==t&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!u&&n.React.createContext&&(u=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:d.bind(null,n),mount:p.bind(null,n),unmount:h.bind(null,n)};return n.parcelCanUpdate&&(r.update=m.bind(null,n)),r}function d(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function p(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=v(e,t,function(){n(this)}),i=c(e,t)(),s=function(e){var t=e.renderType,n=e.elementToRender,r=e.domElement,o=e.reactDom[t];if("function"!=typeof o)throw new Error('renderType "'.concat(t,'" did not return a function.'));switch(t){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(r);return i.render(n),i;case"hydrateRoot":return o(r,n);default:return o(n,r),null}}({elementToRender:o,domElement:i,reactDom:g(e),renderType:y(e)});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function h(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():g(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function m(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=v(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=c(e,t)();g(e).render(r,i)}})}function g(e){return e.ReactDOMClient||e.ReactDOM}function y(e){return"function"==typeof e.renderType?e.renderType():e.renderType}function v(e,t,n){var r=e.React.createElement(e.rootComponent,t),i=u?e.React.createElement(u.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),i=e.React.createElement(e.errorBoundaryClass,t,i)),e.React.createElement(e.SingleSpaRoot,o(o({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),i)}},599(e,t,n){"use strict";n.d(t,{AG:()=>je,EH:()=>re,fz:()=>Ce,xL:()=>W});var r=Object.freeze({__proto__:null,get start(){return Me},get ensureJQuerySupport(){return pe},get setBootstrapMaxTime(){return Z},get setMountMaxTime(){return q},get setUnmountMaxTime(){return J},get setUnloadMaxTime(){return Y},get registerApplication(){return je},get unregisterApplication(){return Pe},get getMountedApps(){return Ee},get getAppStatus(){return Se},get unloadApplication(){return _e},get checkActivityFunctions(){return Te},get getAppNames(){return Oe},get pathToActiveWhen(){return Ce},get navigateToUrl(){return re},get patchHistoryApi(){return le},get triggerAppChange(){return Ie},get addErrorHandler(){return c},get removeErrorHandler(){return u},get mountRootParcel(){return W},get NOT_LOADED(){return d},get LOADING_SOURCE_CODE(){return p},get NOT_BOOTSTRAPPED(){return h},get BOOTSTRAPPING(){return m},get NOT_MOUNTED(){return g},get MOUNTING(){return y},get UPDATING(){return w},get LOAD_ERROR(){return O},get MOUNTED(){return v},get UNLOADING(){return E},get UNMOUNTING(){return b},get SKIP_BECAUSE_BROKEN(){return S}}),o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var e=new o("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?o:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n};let s=[];function a(e,t,n){const r=f(e,t,n);s.length?s.forEach(e=>e(r)):setTimeout(()=>{throw r})}function c(e){if("function"!=typeof e)throw Error(l(28,!1));s.push(e)}function u(e){if("function"!=typeof e)throw Error(l(29,!1));let t=!1;return s=s.filter(n=>{const r=n===e;return t=t||r,!r}),t}function l(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function f(e,t,n){const r=`${_(t)} '${T(t)}' died in status ${t.status}: `;let o;if(e instanceof Error){try{e.message=r+e.message}catch(e){}o=e}else{console.warn(l(30,!1,t.status,T(t)));try{o=Error(r+JSON.stringify(e))}catch(t){o=e}}return o.appOrParcelName=T(t),t.status=n,o}const d="NOT_LOADED",p="LOADING_SOURCE_CODE",h="NOT_BOOTSTRAPPED",m="BOOTSTRAPPING",g="NOT_MOUNTED",y="MOUNTING",v="MOUNTED",w="UPDATING",b="UNMOUNTING",E="UNLOADING",O="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function A(e){return e.status===v}function j(e){try{return e.activeWhen(window.location)}catch(t){return a(t,e,S),!1}}function T(e){return e.name}function P(e){return Boolean(e.unmountThisParcel)}function _(e){return P(e)?"parcel":"application"}function x(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function R(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function C(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!R(t,e=>"function"!=typeof e)));var t}function N(e,t){let n=e[t]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=_(e),o=T(e);return function(e){return n.reduce((n,i,s)=>n.then(()=>{const n=i(e);return $(n)?n:Promise.reject(l(15,!1,r,o,t,s))}),Promise.resolve())}}function $(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let k=[];function I(e,t){return Promise.resolve().then(()=>e.status!==h?e:(e.status=m,e.bootstrap?K(e,"bootstrap").then(n).catch(n=>{if(t)throw f(n,e,S);return a(n,e,S),e}):Promise.resolve().then(n)));function n(){return e.status=g,e}}function U(e,t){return Promise.resolve().then(()=>{if(e.status!==v)return e;e.status=b;const n=Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel());return Promise.all(n).then(r,n=>r().then(()=>{const r=Error(n.message);if(t)throw f(r,e,S);a(r,e,S)})).then(()=>e);function r(){return K(e,"unmount").then(()=>{e.status=g},n=>{if(t)throw f(n,e,S);a(n,e,S)})}})}let D=!1,L=!1;function M(e,t){return Promise.resolve().then(()=>e.status!==g?e:(D||(window.dispatchEvent(new i("single-spa:before-first-mount")),D=!0),e.status=y,K(e,"mount").then(()=>(e.status=v,L||(window.dispatchEvent(new i("single-spa:first-mount")),L=!0),e)).catch(n=>{return e.status=v,U(e,!0).then(r,r);function r(){if(t)throw f(n,e,S);return a(n,e,S),e}})))}let B=0;const F={parcels:{}};function W(){return V.apply(F,arguments)}function V(e,t){const n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(l(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(l(3,!1,typeof e.name));const r=B++;let o=e.name||`parcel-${r}`;if("object"!=typeof t)throw Error(l(4,!1,o,typeof t));if(!t.domElement)throw Error(l(5,!1,o));const i="function"==typeof e,s=i?e:()=>Promise.resolve(e),a={id:r,parcels:{},status:i?p:h,customProps:t,parentName:T(n),unmountThisParcel:()=>m.then(()=>{if(a.status!==v)throw Error(l(6,!1,o,a.status));return U(a,!0)}).then(e=>(a.parentName&&delete n.parcels[a.id],e)).then(e=>(y(e),e)).catch(e=>{throw a.status=S,b(e),e})};let c;n.parcels[r]=a;let u=s();if(!u||"function"!=typeof u.then)throw Error(l(7,!1));u=u.then(e=>{if(!e)throw Error(l(8,!1));if(o=e.name||`parcel-${r}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!C(e.bootstrap))throw Error(l(9,!1,o));if(!C(e.mount))throw Error(l(10,!1,o));if(!C(e.unmount))throw Error(l(11,!1,o));if(e.update&&!C(e.update))throw Error(l(12,!1,o));const t=N(e,"bootstrap"),n=N(e,"mount"),i=N(e,"unmount");a.status=h,a.name=o,a.bootstrap=t,a.mount=n,a.unmount=i,a.timeouts=Q(e.timeouts),e.update&&(a.update=N(e,"update"),c.update=function(e){return a.customProps=e,H((t=a,Promise.resolve().then(()=>{if(t.status!==v)throw Error(l(32,!1,T(t)));return t.status=w,K(t,"update").then(()=>(t.status=v,t)).catch(e=>{throw f(e,t,S)})})));var t})});const d=u.then(()=>I(a,!0)),m=d.then(()=>M(a,!0));let y,b;const E=new Promise((e,t)=>{y=e,b=t});return c={mount:()=>H(Promise.resolve().then(()=>{if(a.status!==g)throw Error(l(13,!1,o,a.status));return n.parcels[r]=a,M(a)})),unmount:()=>H(a.unmountThisParcel()),getStatus:()=>a.status,loadPromise:H(u),bootstrapPromise:H(d),mountPromise:H(m),unmountPromise:H(E)},c}function H(e){return e.then(()=>null)}function G(e){const t=T(e);let n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(l(40,!1),t,n));const o=x({},n,{name:t,mountParcel:V.bind(e),singleSpa:r});return P(e)&&(o.unmountSelf=e.unmountThisParcel),o}const z={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(16,!1));z.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function q(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(17,!1));z.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function J(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(18,!1));z.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(19,!1));z.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function K(e,t){const n=e.timeouts[t],r=n.warningMillis,o=_(e);return new Promise((i,s)=>{let a=!1,c=!1;e[t](G(e)).then(e=>{a=!0,i(e)}).catch(e=>{a=!0,s(e)}),setTimeout(()=>f(1),r),setTimeout(()=>f(!0),n.millis);const u=l(31,!1,t,o,T(e),n.millis);function f(e){if(!a)if(!0===e)c=!0,n.dieOnTimeout?s(Error(u)):console.error(u);else if(!c){const t=e,o=t*r;console.warn(u),o+r<n.millis&&setTimeout(()=>f(t+1),r)}}})}function Q(e){const t={};for(let n in z)t[n]=x({},z[n],e&&e[n]||{});return t}function X(e){return Promise.resolve().then(()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==d&&e.status!==O)return e;let t,n;return e.status=p,e.loadPromise=Promise.resolve().then(()=>{const r=e.loadApp(G(e));if(!$(r))throw n=!0,Error(l(33,!1,T(e)));return r.then(n=>{let r;e.loadErrorTime=null,t=n,"object"!=typeof t&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!C(t.bootstrap)&&(r=35),C(t.mount)||(r=36),C(t.unmount)||(r=37);const o=_(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(l(r,!1,o,T(e),n),t),a(void 0,e,S),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=x({},e.devtools.overlays,t.devtools.overlays)),e.status=h,e.bootstrap=N(t,"bootstrap"),e.mount=N(t,"mount"),e.unmount=N(t,"unmount"),e.unload=N(t,"unload"),e.timeouts=Q(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=S:(r=O,e.loadErrorTime=(new Date).getTime()),a(t,e,r),e})})}const ee="undefined"!=typeof window,te={hashchange:[],popstate:[]},ne=["hashchange","popstate"];function re(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(l(14,!1));t=e.currentTarget.href,e.preventDefault()}const n=fe(window.location.href),r=fe(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function oe(e){if(e){const t=e[0].type;ne.indexOf(t)>=0&&te[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}let ie;function se(){Ue([],arguments)}function ae(e,t){return function(){const n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ie&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){n=document.createEvent("PopStateEvent"),n.initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let ce=null,ue=!1;function le(e){if(ue)throw Error(l(43,!1));ie=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,ue=!0,ce=window.history.replaceState,window.addEventListener("hashchange",se),window.addEventListener("popstate",se);const t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&ne.indexOf(e)>=0)||R(te[e],e=>e===n))return t.apply(this,arguments);te[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&ne.indexOf(e)>=0&&(te[e]=te[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=ae(window.history.pushState,"pushState"),window.history.replaceState=ae(ce,"replaceState")}function fe(e){const t=document.createElement("a");return t.href=e,t}ee&&(window.singleSpaNavigate?console.warn(l(41,!1)):window.singleSpaNavigate=re);let de=!1;function pe(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!de){const t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return he.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return he.call(this,n,window.removeEventListener,e,t,arguments)},de=!0}}function he(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach(e=>{ne.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,o))}const me={};function ge(e){return Promise.resolve().then(()=>{const t=me[T(e)];if(!t)return e;if(e.status===d)return ye(e,t),e;if(e.status===E)return t.promise.then(()=>e);if(e.status!==g&&e.status!==O)return e;const n=e.status===O?Promise.resolve():K(e,"unload");return e.status=E,n.then(()=>(ye(e,t),e)).catch(n=>(function(e,t,n){delete me[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,a(n,e,S),t.reject(n)}(e,t,n),e))})}function ye(e,t){delete me[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=d,t.resolve()}function ve(e,t,n,r){me[T(e)]={app:e,resolve:n,reject:r},Object.defineProperty(me[T(e)],"promise",{get:t})}function we(e){return me[e]}const be=[];function Ee(){return be.filter(A).map(T)}function Oe(){return be.map(T)}function Se(e){const t=R(be,t=>T(t)===e);return t?t.status:null}let Ae=!1;function je(e,t,n,r){const o=function(e,t,n,r){const o={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(l(39,!1));const t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(l(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(l(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(l(20,!1));const r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(l(24,!1));if(!Re(e.customProps))throw Error(l(22,!1))}(e),o.name=e.name,o.loadApp=e.app,o.activeWhen=e.activeWhen,o.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(l(20,!1));if(!t)throw Error(l(23,!1));if("function"!=typeof n)throw Error(l(24,!1));if(!Re(r))throw Error(l(22,!1))}(e,t,n,r),o.name=e,o.loadApp=t,o.activeWhen=n,o.customProps=r),o.loadApp="function"!=typeof(i=o.loadApp)?()=>Promise.resolve(i):i,o.customProps=function(e){return e||{}}(o.customProps),o.activeWhen=function(e){let t=Array.isArray(e)?e:[e];return t=t.map(e=>"function"==typeof e?e:Ce(e)),e=>t.some(t=>t(e))}(o.activeWhen),o;var i}(e,t,n,r);if(Be()||Ae||(Ae=!0,setTimeout(()=>{Be()||console.warn(l(1,!1))},5e3)),-1!==Oe().indexOf(o.name))throw Error(l(21,!1,o.name));be.push(x({loadErrorTime:null,status:d,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ee&&(pe(),Ue())}function Te(e=window.location){return be.filter(t=>t.activeWhen(e)).map(T)}function Pe(e){if(0===be.filter(t=>T(t)===e).length)throw Error(l(25,!1,e));return(ee?_e(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{const t=be.map(T).indexOf(e);be.splice(t,1)})}function _e(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(l(26,!1));const n=R(be,t=>T(t)===e);if(!n)throw Error(l(27,!1,e));const r=we(T(n));if(t&&t.waitForUnmount){if(r)return r.promise;{const e=new Promise((t,r)=>{ve(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,xe(n,r.resolve,r.reject)):e=new Promise((t,r)=>{ve(n,()=>e,t,r),xe(n,t,r)}),e}}function xe(e,t,n){Promise.resolve().then(()=>{if(R(Te(),t=>t===T(e)))return Ie()}).then(()=>U(e).then(ge).then(()=>{t(),setTimeout(()=>{Ue()})})).catch(n)}function Re(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ce(e,t){const n=function(e,t){let n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){const n=e[t];(!r&&":"===n||r&&"/"===n)&&i(t)}return i(e.length),new RegExp(o,"i");function i(i){const s=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":s,i===e.length)if(r)t&&(o+="$");else{const e=t?"":".*";o="/"===o.charAt(o.length-1)?`${o}${e}$`:`${o}(/${e})?(#.*)?$`}r=!r,n=i}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);const r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let Ne=!1,$e=[],ke=ee&&window.location.href;function Ie(){return Ue()}function Ue(e=[],t,n=!1){if(Ne)return new Promise((e,n)=>{$e.push({resolve:e,reject:n,eventArguments:t})});const{appsToUnload:r,appsToUnmount:o,appsToLoad:s,appsToMount:a}=function(){const e=[],t=[],n=[],r=[],o=(new Date).getTime();return be.forEach(i=>{const s=i.status!==S&&j(i);switch(i.status){case O:s&&o-i.loadErrorTime>=200&&n.push(i);break;case d:case p:s&&n.push(i);break;case h:case g:!s&&we(T(i))?e.push(i):s&&r.push(i);break;case v:s||t.push(i)}}),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}();let c,u=[],f=ke,m=ke=window.location.href;return Be()?(Ne=!0,c=r.concat(s,o,a),Promise.resolve().then(()=>(A(0===c.length?"before-no-app-change":"before-app-change",E(!0)),A("before-routing-event",E(!0,{cancelNavigation:y})),Promise.all(u).then(n=>{if(n.some(e=>e))return ce.call(window.history,history.state,"",f.substring(location.origin.length)),ke=location.href,Ne=!1,Ue(e,t,!0);const i=r.map(ge),c=o.map(U).map(e=>e.then(ge)).concat(i),u=Promise.all(c);u.then(()=>{A("before-mount-routing-event",E(!0))},e=>{throw e});const l=s.map(e=>X(e).then(e=>De(e,u))),d=a.filter(e=>s.indexOf(e)<0).map(e=>De(e,u));return u.catch(e=>{throw b(),e}).then(()=>(b(),Promise.all(l.concat(d)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(w).then(()=>{},e=>{throw e})))})))):(c=s,Promise.resolve().then(()=>{const e=s.map(X);return Promise.all(e).then(b).then(()=>[]).catch(e=>{throw b(),e}).finally(()=>{})}));function y(e=!0){const t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);u.push(t.catch(e=>(console.warn(Error(l(42,!1))),console.warn(e),!1)))}function w(){const t=Ee();e.forEach(e=>e.resolve(t));try{A(0===c.length?"no-app-change":"app-change",E()),A("routing-event",E())}catch(e){setTimeout(()=>{throw e})}if(Ne=!1,$e.length>0){const e=$e;$e=[],Ue(e)}return t}function b(){n||(e.forEach(e=>{oe(e.eventArguments)}),oe(t))}function E(e=!1,n){const i={},u={[v]:[],[g]:[],[d]:[],[S]:[]};e?(s.concat(a).forEach((e,t)=>{p(e,v)}),r.forEach(e=>{p(e,d)}),o.forEach(e=>{p(e,g)})):c.forEach(e=>{p(e)});const l={detail:{newAppStatuses:i,appsByNewStatus:u,totalAppChanges:c.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:m}};return n&&x(l.detail,n),l;function p(e,t){const n=T(e);t=t||Se(n),i[n]=t,(u[t]=u[t]||[]).push(n)}}function A(e,t){n||window.dispatchEvent(new i(`single-spa:${e}`,t))}}function De(e,t){return j(e)?I(e).then(e=>t.then(()=>j(e)?M(e):e)):t.then(()=>e)}let Le=!1;function Me(e){Le=!0,ee&&(le(e),Ue())}function Be(){return Le}var Fe={getRawAppData:function(){return[...be]},reroute:Ue,NOT_LOADED:d,toLoadPromise:X,toBootstrapPromise:I,unregisterApplication:Pe,getProfilerData:function(){return k}};ee&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Fe)},9324(e,t,n){"use strict";n.d(t,{Ay:()=>u,BE:()=>c});var r=n(6072),o=n(9888),i=n(8465);const s=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),a={dedupe:!0},c=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),u=(0,i.withArgs)((e,t,n)=>{const{cache:c,compare:u,suspense:l,fallbackData:f,revalidateOnMount:d,revalidateIfStale:p,refreshInterval:h,refreshWhenHidden:m,refreshWhenOffline:g,keepPreviousData:y}=n,[v,w,b,E]=i.SWRGlobalState.get(c),[O,S]=(0,i.serialize)(e),A=(0,r.useRef)(!1),j=(0,r.useRef)(!1),T=(0,r.useRef)(O),P=(0,r.useRef)(t),_=(0,r.useRef)(n),x=()=>_.current,R=()=>x().isVisible()&&x().isOnline(),[C,N,$,k]=(0,i.createCacheHelper)(c,O),I=(0,r.useRef)({}).current,U=(0,i.isUndefined)(f)?n.fallback[O]:f,D=(e,t)=>{for(const n in I){const r=n;if("data"===r){if(!u(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!u(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},L=(0,r.useMemo)(()=>{const e=!!O&&!!t&&((0,i.isUndefined)(d)?!x().isPaused()&&!l&&(!!(0,i.isUndefined)(p)||p):d),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=C(),o=k(),s=n(r),a=r===o?s:n(o);let c=s;return[()=>{const e=n(C());return D(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>a]},[c,O]),M=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>$(O,(t,n)=>{D(n,t)||e()}),[c,O]),L[0],L[1]),B=!A.current,F=v[O]&&v[O].length>0,W=M.data,V=(0,i.isUndefined)(W)?U:W,H=M.error,G=(0,r.useRef)(V),z=y?(0,i.isUndefined)(W)?G.current:W:V,Z=!(F&&!(0,i.isUndefined)(H))&&(B&&!(0,i.isUndefined)(d)?d:!x().isPaused()&&(l?!(0,i.isUndefined)(V)&&p:(0,i.isUndefined)(V)||p)),q=!!(O&&t&&B&&Z),J=(0,i.isUndefined)(M.isValidating)?q:M.isValidating,Y=(0,i.isUndefined)(M.isLoading)?q:M.isLoading,K=(0,r.useCallback)(async e=>{const t=P.current;if(!O||!t||j.current||x().isPaused())return!1;let r,o,s=!0;const a=e||{},c=!b[O]||!a.dedupe,l=()=>i.IS_REACT_LEGACY?!j.current&&O===T.current&&A.current:O===T.current,f={isValidating:!1,isLoading:!1},d=()=>{N(f)},p=()=>{const e=b[O];e&&e[1]===o&&delete b[O]},h={isValidating:!0};(0,i.isUndefined)(C().data)&&(h.isLoading=!0);try{if(c&&(N(h),n.loadingTimeout&&(0,i.isUndefined)(C().data)&&setTimeout(()=>{s&&l()&&x().onLoadingSlow(O,n)},n.loadingTimeout),b[O]=[t(S),(0,i.getTimestamp)()]),[r,o]=b[O],r=await r,c&&setTimeout(p,n.dedupingInterval),!b[O]||b[O][1]!==o)return c&&l()&&x().onDiscarded(O),!1;f.error=i.UNDEFINED;const e=w[O];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),c&&l()&&x().onDiscarded(O),!1;const a=C().data;f.data=u(a,r)?a:r,c&&l()&&x().onSuccess(r,O,n)}catch(e){p();const t=x(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,c&&l()&&(t.onError(e,O,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(x().revalidateOnFocus&&x().revalidateOnReconnect&&!R()||t.onErrorRetry(e,O,t,e=>{const t=v[O];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(a.retryCount||0)+1,dedupe:!0}))))}return s=!1,d(),!0},[O,c]),Q=(0,r.useCallback)((...e)=>(0,i.internalMutate)(c,T.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{P.current=t,_.current=n,(0,i.isUndefined)(W)||(G.current=W)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!O)return;const e=K.bind(i.UNDEFINED,a);let t=0;const n=(0,i.subscribeCallback)(O,v,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();x().revalidateOnFocus&&n>t&&R()&&(t=n+x().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)x().revalidateOnReconnect&&R()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return K();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return K(r)}});return j.current=!1,T.current=O,A.current=!0,N({_k:S}),Z&&((0,i.isUndefined)(V)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{j.current=!0,n()}},[O]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(h)?h(C().data):h;t&&-1!==e&&(e=setTimeout(n,t))}function n(){C().error||!m&&!x().isVisible()||!g&&!x().isOnline()?t():K(a).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[h,m,g,O]),(0,r.useDebugValue)(z),l&&(0,i.isUndefined)(V)&&O){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");P.current=t,_.current=n,j.current=!1;const e=E[O];if(!(0,i.isUndefined)(e)){const t=Q(e);s(t)}if(!(0,i.isUndefined)(H))throw H;{const e=K(a);(0,i.isUndefined)(z)||(e.status="fulfilled",e.value=!0),s(e)}}return{mutate:Q,get data(){return I.data=!0,z},get error(){return I.error=!0,H},get isValidating(){return I.isValidating=!0,J},get isLoading(){return I.isLoading=!0,Y}}})},7283(e,t,n){"use strict";n.d(t,{y:()=>o});const r=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{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()}},s=t=e(r,o,i);return i},o=e=>e?r(e):r}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,s),n.exports}s.m=o,s.c=i,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);s.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,s.d(o,i),o},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((t,n)=>(s.f[n](e,t),t),[])),s.u=e=>e+".js",s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="@cc-openmrs/cc-esm-active-prescriptions:",s.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var a,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var f=u[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){a=f;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+o),a.src=e),n[e]=[t];var d=(t,r)=>{a.onerror=a.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(e=>e(r)),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{s.S={};var e={},t={};s.I=(n,r)=>{r||(r=[]);var o=t[n];if(o||(o=t[n]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[n])return e[n];s.o(s.S,n)||(s.S[n]={});var i=s.S[n],a="@cc-openmrs/cc-esm-active-prescriptions",c=(e,t,n,r)=>{var o=i[e]=i[e]||{},s=o[t];(!s||!s.loaded&&(!r!=!s.eager?r:a>s.from))&&(o[t]={get:n,from:a,eager:!!r})},u=[];return"default"===n&&(c("@openmrs/esm-framework","8.0.0",()=>Promise.all([s.e(635),s.e(866),s.e(279),s.e(68),s.e(72),s.e(465),s.e(995),s.e(561),s.e(920)]).then(()=>()=>s(2279))),c("dayjs","1.11.20",()=>s.e(353).then(()=>()=>s(6734))),c("react-dom","18.3.1",()=>Promise.all([s.e(961),s.e(72)]).then(()=>()=>s(961))),c("react-i18next","16.5.8",()=>Promise.all([s.e(635),s.e(72),s.e(692)]).then(()=>()=>s(3311))),c("react","18.3.1",()=>s.e(540).then(()=>()=>s(6540))),c("rxjs","6.6.7",()=>s.e(184).then(()=>()=>s(3184))),c("swr/_internal","2.2.5",()=>Promise.all([s.e(993),s.e(72)]).then(()=>()=>s(4993))),c("swr/immutable","2.2.5",()=>Promise.all([s.e(72),s.e(465),s.e(606)]).then(()=>()=>s(4225))),c("swr/infinite","2.2.5",()=>Promise.all([s.e(72),s.e(465),s.e(422)]).then(()=>()=>s(3041)))),e[n]=u.length?Promise.all(u).then(()=>e[n]=1):1}}})(),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map(e=>+e==e?+e:e),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=n[1]?t(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,t(n[2]))),n[3]&&(r.push([]),r.push.apply(r,t(n[3]))),r},t=e=>{var n=e[0],r="";if(1===e.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<e.length;i++)o--,r+="u"==(typeof(a=e[i]))[0]?"-":(o>0?".":"")+(o=2,a);return r}var s=[];for(i=1;i<e.length;i++){var a=e[i];s.push(0===a?"not("+c()+")":1===a?"("+c()+" || "+c()+")":2===a?s.pop()+" "+s.pop():t(a))}return c();function c(){return s.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var o=t[0],i=o<0;i&&(o=-o-1);for(var s=0,a=1,c=!0;;a++,s++){var u,l,f=a<t.length?(typeof t[a])[0]:"";if(s>=r.length||"o"==(l=(typeof(u=r[s]))[0]))return!c||("u"==f?a>o&&!i:""==f!=i);if("u"==l){if(!c||"u"!=f)return!1}else if(c)if(f==l)if(a<=o){if(u!=t[a])return!1}else{if(i?u>t[a]:u<t[a])return!1;u!=t[a]&&(c=!1)}else if("s"!=f&&"n"!=f){if(i||a<=o)return!1;c=!1,a--}else{if(a<=o||l<f!=i)return!1;c=!1}else"s"!=f&&"n"!=f&&(c=!1,a--)}}var d=[],p=d.pop.bind(d);for(s=1;s<t.length;s++){var h=t[s];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()},r=(t,n,r)=>{var o=r?(e=>Object.keys(e).reduce((t,n)=>(e[n].eager&&(t[n]=e[n]),t),{}))(t[n]):t[n];return Object.keys(o).reduce((t,n)=>!t||!o[t].loaded&&((t,n)=>{t=e(t),n=e(n);for(var r=0;;){if(r>=t.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=t[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var s=n[r],a=(typeof s)[0];if(i!=a)return"o"==i&&"n"==a||"s"==a||"u"==i;if("o"!=i&&"u"!=i&&o!=s)return o<s;r++}})(t,n)?n:t,0)},o=(e,t,n)=>n?n():((e,t)=>(e=>{throw new Error(e)})("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),i=(e=>function(t,n,r,o,i){var a=s.I(t);return a&&a.then&&!r?a.then(e.bind(e,t,s.S[t],n,!1,o,i)):e(t,s.S[t],n,r,o,i)})((e,i,a,c,u,l)=>{if(!((e,t)=>e&&s.o(e,t))(i,a))return o(e,a,l);var f,d,p=r(i,a,c);return n(u,p)||(d=((e,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&e[n][r].from)+" of shared singleton module "+n+" (required "+t(o)+")")(i,a,p,u),"undefined"!=typeof console&&console.warn&&console.warn(d)),(f=i[a][p]).loaded=1,f.get()}),a={},c={6072:()=>i("default","react",!1,[1,18],()=>s.e(540).then(()=>()=>s(6540))),2646:()=>i("default","react-dom",!1,[1,18],()=>s.e(961).then(()=>()=>s(961))),6920:()=>i("default","@openmrs/esm-framework",!1,[1,9],()=>Promise.all([s.e(635),s.e(866),s.e(279),s.e(561)]).then(()=>()=>s(2279))),2076:()=>i("default","react-i18next",!1,[1,16],()=>Promise.all([s.e(635),s.e(311)]).then(()=>()=>s(3311))),8465:()=>i("default","swr/_internal",!1,[1,2],()=>s.e(993).then(()=>()=>s(4993))),3083:()=>i("default","rxjs",!1,[1,6],()=>s.e(184).then(()=>()=>s(3184))),231:()=>i("default","dayjs",!1,[1,1],()=>s.e(353).then(()=>()=>s(6734))),4209:()=>i("default","swr/immutable",!1,[1,2],()=>s.e(225).then(()=>()=>s(4225))),6339:()=>i("default","swr/infinite",!1,[1,2],()=>s.e(41).then(()=>()=>s(3041)))};[6072,2646,6920,2076,8465,3083].forEach(e=>{s.m[e]=t=>{a[e]=0,delete s.c[e];var n=c[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}});var u={72:[6072],465:[8465],561:[231,4209,6339],792:[6072,2646,6920,2076,8465,3083],920:[6920],995:[2076,2646,3083]},l={};s.f.consumes=(e,t)=>{s.o(u,e)&&u[e].forEach(e=>{if(s.o(a,e))return t.push(a[e]);if(!l[e]){var n=t=>{a[e]=0,s.m[e]=n=>{delete s.c[e],n.exports=t()}};l[e]=!0;var r=t=>{delete a[e],s.m[e]=n=>{throw delete s.c[e],t}};try{var o=c[e]();o.then?t.push(a[e]=o.then(n).catch(r)):n(o)}catch(e){r(e)}}})}})(),(()=>{var e={68:0,72:0,465:0,499:0,792:0,920:0,995:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(465|561|72|920|995)$/.test(t))e[t]=0;else{var o=new Promise((n,o)=>r=e[t]=[n,o]);n.push(r[2]=o);var i=s.p+s.u(t),a=new Error;s.l(i,n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",a.name="ChunkLoadError",a.type=o,a.request=i,r[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,a,c]=n,u=0;if(i.some(t=>0!==e[t])){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);c&&c(s)}for(t&&t(n);u<i.length;u++)o=i[u],s.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),s.nc=void 0,s(2499)})();