@cc-openmrs/cc-esm-active-prescriptions 1.0.59 → 1.0.60
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/104.js +1 -1
- package/dist/353.js +1 -1
- package/dist/499.js +1 -1
- package/dist/617.js +2 -0
- package/dist/652.js +1 -1
- package/dist/723.js +1 -0
- package/dist/{375.js → 805.js} +2 -2
- package/dist/{756.js → 845.js} +1 -2
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +10 -0
- package/dist/openmrs-esm-template-app.js +1 -1
- package/dist/openmrs-esm-template-app.js.buildmanifest.json +160 -113
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +30 -6
- package/dist/520.js +0 -2
- package/dist/756.js.LICENSE.txt +0 -9
- /package/dist/{520.js.LICENSE.txt → 617.js.LICENSE.txt} +0 -0
- /package/dist/{375.js.LICENSE.txt → 805.js.LICENSE.txt} +0 -0
package/dist/617.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 617.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[617],{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}),b=h;return e&&(b.className=e),null!=p&&(b.tabIndex="number"==typeof p?p:Number(n)),f&&(b.ref=f),r&&(b.xmlns=r),o&&(b.preserveAspectRatio=o),d.createElement("svg",b,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}},810(e,t,n){"use strict";n.d(t,{W1:()=>I,Xj:()=>N,hz:()=>T});var r,o,i,s,a,c,u,l,f,d,p,h,b,y,m,v,g,_,w,x,E,O,S,A,C=n(6072),P=n(428);const T=C.forwardRef(function({children:e,size:t=16,...n},a){return 16===t||"16"===t||"16px"===t?C.createElement(P.A,{width:t,height:t,ref:a,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},r||(r=C.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=C.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):C.createElement(P.A,{width:t,height:t,ref:a,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=C.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"})),s||(s=C.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=C.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?C.createElement(P.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},a||(a=C.createElement("path",{d:"M2 12H14V13H2z"})),c||(c=C.createElement("path",{d:"M2 9H14V10H2z"})),u||(u=C.createElement("path",{d:"M2 6H14V7H2z"})),l||(l=C.createElement("path",{d:"M2 3H14V4H2z"})),e):20===t||"20"===t||"20px"===t?C.createElement(P.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},f||(f=C.createElement("path",{d:"M2 14.8H18V16H2z"})),d||(d=C.createElement("path",{d:"M2 11.2H18V12.399999999999999H2z"})),p||(p=C.createElement("path",{d:"M2 7.6H18V8.799999999999999H2z"})),h||(h=C.createElement("path",{d:"M2 4H18V5.2H2z"})),e):24===t||"24"===t||"24px"===t?C.createElement(P.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},b||(b=C.createElement("path",{d:"M3 18H21V19.5H3z"})),y||(y=C.createElement("path",{d:"M3 13.5H21V15H3z"})),m||(m=C.createElement("path",{d:"M3 9H21V10.5H3z"})),v||(v=C.createElement("path",{d:"M3 4.5H21V6H3z"})),e):C.createElement(P.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},g||(g=C.createElement("path",{d:"M4 6H28V8H4z"})),_||(_=C.createElement("path",{d:"M4 24H28V26H4z"})),w||(w=C.createElement("path",{d:"M4 12H28V14H4z"})),x||(x=C.createElement("path",{d:"M4 18H28V20H4z"})),e)}),N=C.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?C.createElement(P.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},E||(E=C.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"})),O||(O=C.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):C.createElement(P.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},S||(S=C.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"})),A||(A=C.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:()=>E,d3:()=>x,sV:()=>S,x:()=>O});var r,o,i,s,a,c,u,l,f,d,p,h,b,y,m,v,g,_=n(6072),w=n(428);const x=_.forwardRef(function({children:e,size:t=16,...n},i){return _.createElement(w.A,{width:t,height:t,ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},r||(r=_.createElement("path",{d:"M16 18 6 8 7.4 6.6 16 15.2 24.6 6.6 26 8z"})),o||(o=_.createElement("path",{d:"M4 22H28V24H4z"})),e)}),E=_.forwardRef(function({children:e,size:t=16,...n},r){return _.createElement(w.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},i||(i=_.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)}),O=_.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?_.createElement(w.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},s||(s=_.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=_.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?_.createElement(w.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},c||(c=_.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=_.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?_.createElement(w.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},l||(l=_.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=_.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):_.createElement(w.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},d||(d=_.createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),p||(p=_.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)}),S=_.forwardRef(function({children:e,size:t=16,...n},r){return _.createElement(w.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},h||(h=_.createElement("path",{d:"M26,14H24v2h2a3.0033,3.0033,0,0,1,3,3v4h2V19A5.0058,5.0058,0,0,0,26,14Z"})),b||(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"})),y||(y=_.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"})),m||(m=_.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=_.createElement("path",{d:"M8,14H6a5.0059,5.0059,0,0,0-5,5v4H3V19a3.0033,3.0033,0,0,1,3-3H8Z"})),g||(g=_.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=a(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,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)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,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(e,t)||a(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 s(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 a(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:()=>gs,$nd:()=>Yt,Sc0:()=>In,a32:()=>ii,KXP:()=>is,lRv:()=>as,Y9Y:()=>ka,V8d:()=>$a,wdv:()=>Ma,dJ2:()=>Va,bCw:()=>Ua,K0:()=>qt,OuH:()=>vi,jeF:()=>vs,Wdr:()=>fi,cwr:()=>rs,jlY:()=>_i,rQ0:()=>di,aaP:()=>ws,zWQ:()=>Os,Psq:()=>xs,vji:()=>Is,f8J:()=>Ha,ryE:()=>js,ozo:()=>ea,wbY:()=>Qs,KpK:()=>na,T2N:()=>ra,tUM:()=>Xs,vwO:()=>ca,ksK:()=>da,FAs:()=>Pa});var c={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?c.enableCssCustomProperties=!0:c.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?c.enableCssGrid=!0:c.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?c.enableV11Release=!0:c.enableV11Release=!1:c.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?c.enableExperimentalTileContrast=!0:c.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_TILE_CONTRAST?c.enableTileContrast=!0:c.enableTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?c.enableV12TileDefaultIcons=!0:c.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?c.enableV12TileRadioIcons=!0:c.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?c.enableV12Overflowmenu=!0:c.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?c.enableTreeviewControllable=!0:c.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?c.enableV12StructuredListVisibleIcons=!0:c.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?c.enableExperimentalFocusWrapWithoutSentinels=!0:c.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS?c.enableFocusWrapWithoutSentinels=!0:c.enableFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?c.enableDialogElement=!0:c.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?c.enableV12DynamicFloatingStyles=!0:c.enableV12DynamicFloatingStyles=!1,process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING&&"true"===process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING?c.enableV12ToggleReducedLabelSpacing=!0:c.enableV12ToggleReducedLabelSpacing=!1,process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER&&"true"===process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER?c.enableEnhancedFileUploader=!0:c.enableEnhancedFileUploader=!1,process.env.CARBON_ENABLE_PRESENCE&&"true"===process.env.CARBON_ENABLE_PRESENCE?c.enablePresence=!0:c.enablePresence=!1}catch(e){c.enableCssCustomProperties=!1,c.enableCssGrid=!1,c.enableV11Release=!0,c.enableExperimentalTileContrast=!1,c.enableTileContrast=!1,c.enableV12TileDefaultIcons=!1,c.enableV12TileRadioIcons=!1,c.enableV12Overflowmenu=!1,c.enableTreeviewControllable=!1,c.enableV12StructuredListVisibleIcons=!1,c.enableExperimentalFocusWrapWithoutSentinels=!1,c.enableFocusWrapWithoutSentinels=!1,c.enableDialogElement=!1,c.enableV12DynamicFloatingStyles=!1,c.enableV12ToggleReducedLabelSpacing=!1,c.enableEnhancedFileUploader=!1,c.enablePresence=!1}var u=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:c.enableCssCustomProperties},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:c.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:c.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Deprecated, use enable-tile-contrast instead\n",enabled:c.enableExperimentalTileContrast},{name:"enable-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:c.enableTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:c.enableV12TileDefaultIcons},{name:"enable-v12-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:c.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:c.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:c.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:c.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Deprecated, use enable-focus-wrap-without-sentinels instead\n",enabled:c.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:c.enableFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:c.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:c.enableV12DynamicFloatingStyles},{name:"enable-v12-toggle-reduced-label-spacing",description:"Enable a reduced spacing between the toggle control and its label\n",enabled:c.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:c.enableEnhancedFileUploader},{name:"enable-presence",description:"Enable components to remain unmounted in closed state and mount in open state.\n",enabled:c.enablePresence}],l=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,s(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),s=r[0],a=r[1];this.flags.has(s)||this.flags.set(s,a)}}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}}])}(),f=function(){var e,t,n=new l(t),r=o(u);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 d(){return d=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},d.apply(null,arguments)}f.add.bind(f),f.enable.bind(f),f.disable.bind(f),f.enabled.bind(f),f.merge.bind(f)({"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),h=n.n(p),b=n(6072),y=n.t(b,2),m=n(6942),v=n.n(m);const g={},_=(e,t,n)=>(r,o,i,...s)=>{if(void 0===r[o])return null;if(!g[i]||!g[i][o]){g[i]={...g[i],[o]:!0};const e=r[o];n&&n(e);t&&!t.includes(e)&&(n||t.join(", "))}return e(r,o,i,...s)},w="undefined"!=typeof window?b.useLayoutEffect:b.useEffect,x=e=>{const t=(0,b.useMemo)(()=>e,e);return(0,b.useCallback)(e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},[t])},E=b.createContext("cds");function O(){return b.useContext(E)}const S=(e,t,n)=>{const r=(0,b.useRef)(null);(0,b.useEffect)(()=>{r.current=n},[n]),(0,b.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])},A=(e,t)=>{const n=(0,b.useRef)(null);(0,b.useEffect)(()=>{n.current=t},[t]),(0,b.useEffect)(()=>{const t=e=>{n.current&&n.current(e)};return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[e])},C={"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"},P=e=>C[e]??e;var T="undefined"!=typeof document?b.useLayoutEffect:function(){};const I={...y}.useInsertionEffect||(e=>e());function N(){return"undefined"!=typeof window}function j(e){return $(e)?(e.nodeName||"").toLowerCase():"#document"}function k(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function R(e){var t;return null==(t=($(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $(e){return!!N()&&(e instanceof Node||e instanceof k(e).Node)}function M(e){return!!N()&&(e instanceof Element||e instanceof k(e).Element)}function D(e){return!!N()&&(e instanceof HTMLElement||e instanceof k(e).HTMLElement)}function L(e){return!(!N()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof k(e).ShadowRoot)}function B(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function V(e){return/^(table|td|th)$/.test(j(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/,U=/paint|layout|strict|content/,K=e=>!!e&&"none"!==e;let W;function H(e){const t=M(e)?Y(e):e;return K(t.transform)||K(t.translate)||K(t.scale)||K(t.rotate)||K(t.perspective)||!q()&&(K(t.backdropFilter)||K(t.filter))||z.test(t.willChange||"")||U.test(t.contain||"")}function q(){return null==W&&(W="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),W}function G(e){return/^(html|body|#document)$/.test(j(e))}function Y(e){return k(e).getComputedStyle(e)}function Z(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if("html"===j(e))return e;const t=e.assignedSlot||e.parentNode||L(e)&&e.host||R(e);return L(t)?t.host:t}function Q(e){const t=X(e);return G(t)?e.ownerDocument?e.ownerDocument.body:e.body:D(t)&&B(t)?t:Q(t)}function J(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Q(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=k(o);if(i){const e=ee(s);return t.concat(s,s.visualViewport||[],B(o)?o:[],e&&n?J(e):[])}return t.concat(o,J(o,[],n))}function ee(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var te=n(961);const ne=["top","right","bottom","left"],re=Math.min,oe=Math.max,ie=Math.round,se=Math.floor,ae=e=>({x:e,y:e}),ce={left:"right",right:"left",bottom:"top",top:"bottom"};function ue(e,t,n){return oe(e,re(t,n))}function le(e,t){return"function"==typeof e?e(t):e}function fe(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function pe(e){return"y"===e?"height":"width"}function he(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function be(e){return"x"===he(e)?"y":"x"}function ye(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const me=["left","right"],ve=["right","left"],ge=["top","bottom"],_e=["bottom","top"];function we(e){const t=fe(e);return ce[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 Ee(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 Oe(e,t,n){let{reference:r,floating:o}=e;const i=he(t),s=be(t),a=pe(s),c=fe(t),u="y"===i,l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let p;switch(c){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(de(t)){case"start":p[s]-=d*(n&&u?-1:1);break;case"end":p[s]+=d*(n&&u?-1:1)}return p}async function Se(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=le(t,e),h=xe(p),b=a[d?"floating"===f?"reference":"floating":f],y=Ee(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(b)))||n?b:b.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:c})),m="floating"===f?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),g=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},_=Ee(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:v,strategy:c}):m);return{top:(y.top-_.top+h.top)/g.y,bottom:(_.bottom-y.bottom+h.bottom)/g.y,left:(y.left-_.left+h.left)/g.x,right:(_.right-y.right+h.right)/g.x}}function Ae(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ce(e){return ne.some(t=>e[t]>=0)}const Pe=new Set(["left","top"]);function Te(e){const t=Y(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=D(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ie(n)!==i||ie(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ie(e){return M(e)?e:e.contextElement}function Ne(e){const t=Ie(e);if(!D(t))return ae(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Te(t);let s=(i?ie(n.width):n.width)/r,a=(i?ie(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const je=ae(0);function ke(e){const t=k(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:je}function Re(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ie(e);let s=ae(1);t&&(r?M(r)&&(s=Ne(r)):s=Ne(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==k(e))&&t}(i,n,r)?ke(i):ae(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,l=o.width/s.x,f=o.height/s.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=Ne(o),t=o.getBoundingClientRect(),r=Y(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,l*=e.x,f*=e.y,c+=i,u+=s,n=k(o),o=ee(n)}}return Ee({width:l,height:f,x:c,y:u})}function $e(e,t){const n=Z(e).scrollLeft;return t?t.left+n:Re(R(e)).left+n}function Me(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-$e(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=R(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const e=q();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}const u=$e(r);if(u<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else u<=25&&(i+=u);return{width:i,height:s,x:a,y:c}}(e,n);else if("document"===t)r=function(e){const t=R(e),n=Z(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 s=-n.scrollLeft+$e(e);const a=-n.scrollTop;return"rtl"===Y(r).direction&&(s+=oe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(R(e));else if(M(t))r=function(e,t){const n=Re(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=D(e)?Ne(e):ae(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 Ee(r)}function Le(e,t){const n=X(e);return!(n===t||!M(n)||G(n))&&("fixed"===Y(n).position||Le(n,t))}function Be(e,t,n){const r=D(t),o=R(t),i="fixed"===n,s=Re(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=ae(0);function u(){c.x=$e(o)}if(r||!r&&!i)if(("body"!==j(t)||B(o))&&(a=Z(t)),r){const e=Re(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const l=!o||r||i?ae(0):Me(o,a);return{x:s.left+a.scrollLeft-c.x-l.x,y:s.top+a.scrollTop-c.y-l.y,width:s.width,height:s.height}}function Ve(e){return"static"===Y(e).position}function Fe(e,t){if(!D(e)||"fixed"===Y(e).position)return null;if(t)return t(e);let n=e.offsetParent;return R(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=X(e);for(;t&&!G(t);){if(M(t)&&!Ve(t))return t;t=X(t)}return n}let r=Fe(e,t);for(;r&&V(r)&&Ve(r);)r=Fe(r,t);return r&&G(r)&&Ve(r)&&!H(r)?n:r||function(e){let t=X(e);for(;D(t)&&!G(t);){if(H(t))return t;if(F(t))return null;t=X(t)}return null}(e)||n}const Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=R(r),a=!!t&&F(t.floating);if(r===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=ae(1);const l=ae(0),f=D(r);if((f||!f&&!i)&&(("body"!==j(r)||B(s))&&(c=Z(r)),f)){const e=Re(r);u=Ne(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const d=!s||f||i?ae(0):Me(s,c);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:n.y*u.y-c.scrollTop*u.y+l.y+d.y}},getDocumentElement:R,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=J(e,[],!1).filter(e=>M(e)&&"body"!==j(e)),o=null;const i="fixed"===Y(e).position;let s=i?X(e):e;for(;M(s)&&!G(s);){const t=Y(s),n=H(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||B(s)&&!n&&Le(e,s))?r=r.filter(e=>e!==s):o=t,s=X(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=De(t,i[0],o);let a=s.top,c=s.right,u=s.bottom,l=s.left;for(let e=1;e<i.length;e++){const n=De(t,i[e],o);a=oe(n.top,a),c=re(n.right,c),u=re(n.bottom,u),l=oe(n.left,l)}return{width:c-l,height:u-a,x:l,y:a}},getOffsetParent:ze,getElementRects:async function(e){const t=this.getOffsetParent||ze,n=this.getDimensions,r=await n(e.floating);return{reference:Be(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}=Te(e);return{width:t,height:n}},getScale:Ne,isElement:M,isRTL:function(e){return"rtl"===Y(e).direction}};function Ke(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:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=Ie(e),l=o||i?[...u?J(u):[],...t?J(t):[]]:[];l.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=u&&a?function(e,t){let n,r=null;const o=R(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:p}=u;if(a||t(),!d||!p)return;const h={rootMargin:-se(f)+"px "+-se(o.clientWidth-(l+d))+"px "+-se(o.clientHeight-(f+p))+"px "+-se(l)+"px",threshold:oe(0,re(1,c))||1};let b=!0;function y(t){const r=t[0].intersectionRatio;if(r!==c){if(!b)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||Ke(u,e.getBoundingClientRect())||s(),b=!1}try{r=new IntersectionObserver(y,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(y,h)}r.observe(e)}(!0),i}(u,n):null;let d,p=-1,h=null;s&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),u&&!c&&h.observe(u),t&&h.observe(t));let b=c?Re(e):null;return c&&function t(){const r=Re(e);b&&!Ke(b,r)&&n(),b=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(d)}}const He=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:b=!0,...y}=le(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=fe(o),v=he(a),g=fe(a)===a,_=await(null==c.isRTL?void 0:c.isRTL(u.floating)),w=d||(g||!b?[we(a)]:function(e){const t=we(e);return[ye(e),t,ye(t)]}(a)),x="none"!==h;!d&&x&&w.push(...function(e,t,n,r){const o=de(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ve:me:t?me:ve;case"left":case"right":return t?ge:_e;default:return[]}}(fe(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ye)))),i}(a,b,h,_));const E=[a,...w],O=await c.detectOverflow(t,y),S=[];let A=(null==(r=i.flip)?void 0:r.overflows)||[];if(l&&S.push(O[m]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=de(e),o=be(e),i=pe(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=we(s)),[s,we(s)]}(o,s,_);S.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:o,overflows:S}],!S.every(e=>e<=0)){var C,P;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=E[e];if(t&&("alignment"!==f||v===he(t)||A.every(e=>he(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(P=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=A.filter(e=>{if(x){const t=he(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:T[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},qe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:l=0}=le(e,t)||{};if(null==u)return{};const f=xe(l),d={x:n,y:r},p=be(o),h=pe(p),b=await s.getDimensions(u),y="y"===p,m=y?"top":"left",v=y?"bottom":"right",g=y?"clientHeight":"clientWidth",_=i.reference[h]+i.reference[p]-d[p]-i.floating[h],w=d[p]-i.reference[p],x=await(null==s.getOffsetParent?void 0:s.getOffsetParent(u));let E=x?x[g]:0;E&&await(null==s.isElement?void 0:s.isElement(x))||(E=a.floating[g]||i.floating[h]);const O=_/2-w/2,S=E/2-b[h]/2-1,A=re(f[m],S),C=re(f[v],S),P=A,T=E-b[h]-C,I=E/2-b[h]/2+O,N=ue(P,I,T),j=!c.arrow&&null!=de(o)&&I!==N&&i.reference[h]/2-(I<P?A:C)-b[h]/2<0,k=j?I<P?I-P:I-T:0;return{[p]:d[p]+k,data:{[p]:N,centerOffset:I-N-k,...j&&{alignmentOffset:k}},reset:j}}}),Ge=(e,t,n)=>{const r=new Map,o={platform:Ue,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Se},c=await(null==s.isRTL?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Oe(u,r,c),d=r,p=0;const h={};for(let n=0;n<i.length;n++){const b=i[n];if(!b)continue;const{name:y,fn:m}=b,{x:v,y:g,data:_,reset:w}=await m({x:l,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});l=null!=v?v:l,f=null!=g?g:f,h[y]={...h[y],..._},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(u=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:l,y:f}=Oe(u,d,c))),n=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Ye="undefined"!=typeof document?b.useLayoutEffect:function(){};function Ze(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(!Ze(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||Ze(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Xe(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qe(e,t){const n=Xe(e);return Math.round(t*n)/n}function Je(e){const t=b.useRef(e);return Ye(()=>{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:s,middlewareData:a}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=fe(n),a=de(n),c="y"===he(n),u=Pe.has(s)?-1:1,l=i&&c?-1:1,f=le(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),c?{x:p*l,y:d*u}:{x:d*u,y:p*l}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},tt=(e,t)=>{const n=He(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}=le(e,t);switch(o){case"referenceHidden":{const e=Ae(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ce(e)}}}case"escaped":{const e=Ae(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ce(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?qe({element:n.current,padding:r}).fn(t):{}:n?qe({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};const ot={...y};let it=!1,st=0;const at=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+st++,ct=ot.useId||function(){const[e,t]=b.useState(()=>it?at():void 0);return T(()=>{null==e&&t(at())},[]),b.useEffect(()=>{it=!0},[]),e};const ut=b.createContext(null),lt=b.createContext(null);function ft(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ct(),i=b.useRef({}),[s]=b.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)}}}()),a=null!=((null==(c=b.useContext(ut))?void 0:c.id)||null);var c;const[u,l]=b.useState(r.reference),f=function(e){const t=b.useRef(()=>{});return I(()=>{t.current=e}),b.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,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),d=b.useMemo(()=>({setPositionReference:l}),[]),p=b.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return b.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:p,events:s,floatingId:o,refs:d}),[t,f,p,s,o,d])}function dt(e){void 0===e&&(e={});const{nodeId:t}=e,n=ft({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=b.useState(null),[a,c]=b.useState(null),u=(null==o?void 0:o.domReference)||i,l=b.useRef(null),f=b.useContext(lt);T(()=>{u&&(l.current=u)},[u]);const d=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[l,f]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=b.useState(r);Ze(d,r)||p(r);const[h,y]=b.useState(null),[m,v]=b.useState(null),g=b.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),_=b.useCallback(e=>{e!==O.current&&(O.current=e,v(e))},[]),w=i||h,x=s||m,E=b.useRef(null),O=b.useRef(null),S=b.useRef(l),A=null!=c,C=Je(c),P=Je(o),T=Je(u),I=b.useCallback(()=>{if(!E.current||!O.current)return;const e={placement:t,strategy:n,middleware:d};P.current&&(e.platform=P.current),Ge(E.current,O.current,e).then(e=>{const t={...e,isPositioned:!1!==T.current};N.current&&!Ze(S.current,t)&&(S.current=t,te.flushSync(()=>{f(t)}))})},[d,t,n,P,T]);Ye(()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const N=b.useRef(!1);Ye(()=>(N.current=!0,()=>{N.current=!1}),[]),Ye(()=>{if(w&&(E.current=w),x&&(O.current=x),w&&x){if(C.current)return C.current(w,x,I);I()}},[w,x,I,C,A]);const j=b.useMemo(()=>({reference:E,floating:O,setReference:g,setFloating:_}),[g,_]),k=b.useMemo(()=>({reference:w,floating:x}),[w,x]),R=b.useMemo(()=>{const e={position:n,left:0,top:0};if(!k.floating)return e;const t=Qe(k.floating,l.x),r=Qe(k.floating,l.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Xe(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,k.floating,l.x,l.y]);return b.useMemo(()=>({...l,update:I,refs:j,elements:k,floatingStyles:R}),[l,I,j,k,R])}({...e,elements:{...o,...a&&{reference:a}}}),p=b.useCallback(e=>{const t=M(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),d.refs.setReference(t)},[d.refs]),h=b.useCallback(e=>{(M(e)||null===e)&&(l.current=e,s(e)),(M(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!M(e))&&d.refs.setReference(e)},[d.refs]),y=b.useMemo(()=>({...d.refs,setReference:h,setPositionReference:p,domReference:l}),[d.refs,h,p]),m=b.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),v=b.useMemo(()=>({...d,...r,refs:y,elements:m,nodeId:t}),[d,y,m,t,r]);return T(()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),b.useMemo(()=>({...d,context:v,refs:y,elements:m}),[d,y,m,v])}const pt=new Map,ht=(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)},bt=(0,b.createContext)(f);h().node,ht(h().objectOf(h().bool)),h().bool,h().bool,h().bool,h().bool,h().bool,h().bool,h().bool,h().bool,h().bool,h().bool;const yt=e=>(0,b.useContext)(bt).enabled(e),mt=b.createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),vt=b.forwardRef(function({isTabTip:e,align:t=(e?"bottom-start":"bottom"),as:n="span",autoAlign:r=!1,autoAlignBoundary:o,backgroundToken:i="layer",caret:s=!e,className:a,children:c,border:u=!1,dropShadow:l=!0,highContrast:f=!1,onRequestClose:p,open:h,alignmentAxisOffset:y,...m},g){const _=O(),E=(0,b.useRef)(null),C=(0,b.useRef)(null),T=(0,b.useRef)(null),I=yt("enable-v12-dynamic-floating-styles")||r,N=(0,b.useRef)(!1);let j=P(t);S(T,"mousedown",e=>{const t=e.target;N.current=$.floating.current?.contains(t)||!1,N.current&&setTimeout(()=>{N.current=!1},0)}),S(T,"focusout",e=>{const t=e.relatedTarget;if(t){if(t&&!T.current?.contains(t)){const e=!I||!$.floating.current||!$.floating.current.contains(t),n=t&&T.current&&t.contains(T.current);e&&!n&&p?.()}}else{if(N.current)return void(N.current=!1);p?.()}}),A("click",({target:e})=>{h&&e instanceof Node&&!T.current?.contains(e)&&p?.()});const k=b.Children.toArray(c).some(e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label"))?7:6,R=(0,b.useRef)({offset:10,caretHeight:k});w(()=>{if(s&&T.current){const e=window.getComputedStyle(T.current,null),t=e.getPropertyValue(`--${_}-popover-offset`),n=e.getPropertyValue(`--${_}-popover-caret-height`);t&&(R.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&(R.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}});const{refs:$,floatingStyles:M,placement:D,middlewareData:L,elements:B,update:V}=dt(I?{placement:j,strategy:"fixed",middleware:[et(e?0:{alignmentAxis:y,mainAxis:s?R?.current?.offset:4}),r&&tt({fallbackPlacements:e?j.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]:j.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:C,padding:16}),r&&nt()]}:{});(0,b.useEffect)(()=>{if(I&&h&&B.reference&&B.floating)return We(B.reference,B.floating,V)},[I,h,B,V]);const F=(0,b.useMemo)(()=>({floating:E,setFloating:$.setFloating,caretRef:C,autoAlign:r}),[$.setFloating,r]);e&&(["bottom-start","bottom-end"].includes(j)||(j="bottom-start")),(0,b.useEffect)(()=>{if(I){const e={...M,visibility:L.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach(t=>{$.floating.current&&($.floating.current.style[t]=e[t])}),s&&L&&L.arrow&&C?.current){const{x:e,y:t}=L.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[D.split("-")[0]];C.current.style.left=null!=e?`${e}px`:"",C.current.style.top=null!=t?`${t}px`:"",C.current.style.right="",C.current.style.bottom="",n&&(C.current.style[n]=-R?.current?.caretHeight+"px")}}},[M,$.floating,I,L,D,s]);const z=x([g,T]),U=r&&D!==j?D:j,K=v()({[`${_}--popover-container`]:!0,[`${_}--popover--caret`]:s,[`${_}--popover--drop-shadow`]:l,[`${_}--popover--border`]:u,[`${_}--popover--high-contrast`]:f,[`${_}--popover--open`]:h,[`${_}--popover--auto-align ${_}--autoalign`]:I,[`${_}--popover--${U}`]:!0,[`${_}--popover--tab-tip`]:e,[`${_}--popover--background-token__background`]:"background"===i&&!f},a),W=b.Children.map(c,t=>{const n=t,r=n?.type?.displayName,o="button"===n?.type,i=I&&r&&["ToggletipButton"].includes(r),s=I&&!["ToggletipContent","PopoverContent"].includes(r);if(b.isValidElement(n)&&(o||i||s)){const t=n?.props?.className,r=(n?.props).ref,o=v()(`${_}--popover--tab-tip__button`,t);return b.cloneElement(n,{className:e&&"button"===n?.type?o:t||"",ref:e=>{(I&&n?.type!==gt||I&&"ToggletipButton"===n?.type.displayName)&&$.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return n});return b.createElement(mt.Provider,{value:F},b.createElement(n,d({},m,{className:K,ref:z}),I||e?W:c))});vt.propTypes={align:_(h().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"],P),alignmentAxisOffset:h().number,as:h().oneOfType([h().string,h().elementType]),autoAlign:h().bool,backgroundToken:h().oneOf(["layer","background"]),autoAlignBoundary:h().oneOfType([h().oneOf(["clippingAncestors"]),h().elementType,h().arrayOf(h().elementType),h().exact({x:h().number.isRequired,y:h().number.isRequired,width:h().number.isRequired,height:h().number.isRequired})]),caret:h().bool,border:h().bool,children:h().node,className:h().string,dropShadow:h().bool,highContrast:h().bool,isTabTip:h().bool,onRequestClose:h().func,open:h().bool.isRequired};const gt=(0,b.forwardRef)((e,t)=>{const{className:n,children:r,...o}=e,i=O(),{setFloating:s,caretRef:a,autoAlign:c}=b.useContext(mt),u=x([s,t]),l=yt("enable-v12-dynamic-floating-styles")||c;return b.createElement("span",d({},o,{className:`${i}--popover`}),b.createElement("span",{className:v()(`${i}--popover-content`,n),ref:u},r,l&&b.createElement("span",{className:v()({[`${i}--popover-caret`]:!0,[`${i}--popover--auto-align`]:!0}),ref:a})),!l&&b.createElement("span",{className:v()({[`${i}--popover-caret`]:!0}),ref:a}))});gt.displayName="PopoverContent",gt.propTypes={children:h().node,className:h().string};const _t={key:"Tab",which:9,keyCode:9,code:"Tab"},wt={key:"Enter",which:13,keyCode:13,code:"Enter"},xt={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},Et={key:" ",which:32,keyCode:32,code:"Space"},Ot={key:"End",which:35,keyCode:35,code:"Numpad1"},St={key:"Home",which:36,keyCode:36,code:"Numpad7"},At={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},Ct={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},Pt={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},Tt=(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 Nt(e){const[t,n]=(0,b.useState)(e),r=(0,b.useRef)(null),o=(0,b.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,b.useEffect)(()=>()=>{window.clearTimeout(r.current??void 0)},[]),[t,o]}const jt=b.createContext(null);function kt(){return b.useContext(jt)}const Rt={...b},$t=(()=>{let e=0;return()=>++e})();let Mt=!1;const Dt=Rt.useId?function(e="id"){const t=kt();return`${t?`${t}-`:""}${e}-${Rt.useId()}`}:function(e="id"){const t=kt(),[n,r]=(0,b.useState)(()=>Mt?`${t?`${t}-`:""}${e}-${$t()}`:null);return w(()=>{null===n&&r(`${t?`${t}-`:""}${e}-${$t()}`)},[$t]),(0,b.useEffect)(()=>{!1===Mt&&(Mt=!0)},[]),n},Lt=(e,t="component should have no interactive child nodes")=>{(0,b.useEffect)(()=>{},[t,e])},Bt=e=>{if(!e||!e.childNodes)return null;if(Ft(e))return e;for(const t of e.childNodes)if(t instanceof HTMLElement){const e=Bt(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"]),Ut=b.forwardRef(({as:e,align:t="top",className:n,children:r,label:o,description:i,enterDelayMs:s=100,leaveDelayMs:a=300,defaultOpen:c=!1,closeOnActivation:u=!1,dropShadow:l=!1,highContrast:f=!0,...p},h)=>{const y=(0,b.useRef)(null),[m,g]=Nt(c),[_,x]=(0,b.useState)(!1),[E,S]=(0,b.useState)(!1),[A,C]=(0,b.useState)(!1),P=Dt("tooltip"),T=O(),I=b.Children.only(r),{"aria-labelledby":N,"aria-describedby":j}=I?.props??{},k=!!o,R={onFocus:()=>!E&&g(!0),onBlur:()=>{g(!1),S(!1)},onClick:()=>u&&g(!1),onMouseEnter:M,onMouseLeave:D,onMouseDown:function(){S(!0),L()},onMouseMove:function(e){1===e.buttons?x(!0):x(!1)},onTouchStart:L,"aria-labelledby":N??(k?P:void 0),"aria-describedby":j??(k?void 0:P)},$=(0,b.useCallback)(e=>{m&&It(e,xt)&&(e.stopPropagation(),g(!1)),m&&u&&(It(e,wt)||It(e,Et))&&g(!1)},[u,m,g]);function M(){p?.onMouseEnter||(C(!0),g(!0,s))}function D(){C(!1),_||g(!1,a)}function L(){x(!0)}w(()=>{if(m)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){It(e,xt)&&$(e)}},[m,$]);const B=(0,b.useCallback)(()=>{x(!1),A||g(!1,a)},[A,a,g]);return Lt(y,"The Tooltip component must have no interactive content rendered by the`label` or `description` prop"),(0,b.useEffect)(()=>(_&&zt.forEach(e=>{document.addEventListener(e,B)}),()=>{zt.forEach(e=>{document.removeEventListener(e,B)})}),[_,B]),b.createElement(vt,d({as:e,ref:h},p,{align:t,className:v()(`${T}--tooltip`,n),dropShadow:l,highContrast:f,onKeyDown:$,onMouseLeave:D,open:m}),b.createElement("div",{className:`${T}--tooltip-trigger__wrapper`},void 0!==I?b.cloneElement(I,{...R,...function(e){const t=Object.keys(R).filter(e=>e.startsWith("on")),n={};return t.forEach(t=>{n[t]=n=>{R[t](n),e?.[t]&&e?.[t](n)}}),n}(I.props)}):null),b.createElement(gt,{"aria-hidden":m?"false":"true",className:`${T}--tooltip-content`,id:P,onMouseEnter:M,role:"tooltip"},o||i))});Ut.propTypes={align:h().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:h().node,className:h().string,closeOnActivation:h().bool,defaultOpen:h().bool,description:h().node,dropShadow:h().bool,enterDelayMs:h().number,highContrast:h().bool,label:h().node,leaveDelayMs:h().number};const Kt=b.forwardRef(function({as:e,children:t,className:n,dangerDescription:r="danger",disabled:o=!1,hasIconOnly:i=!1,href:s,iconDescription:a,isExpressive:c=!1,isSelected:u,kind:l="primary",onBlur:f,onClick:d,onFocus:p,onMouseEnter:h,onMouseLeave:y,renderIcon:m,size:g,tabIndex:_,type:w="button",...x},E){const S=O(),A={tabIndex:_,className:v()(n,{[`${S}--btn`]:!0,[`${S}--btn--xs`]:"xs"===g&&!c,[`${S}--btn--sm`]:"sm"===g&&!c,[`${S}--btn--md`]:"md"===g&&!c,[`${S}--btn--lg`]:"lg"===g&&!c,[`${S}--btn--xl`]:"xl"===g,[`${S}--btn--2xl`]:"2xl"===g,[`${S}--layout--size-${g}`]:g,[`${S}--btn--${l}`]:l,[`${S}--btn--disabled`]:o,[`${S}--btn--expressive`]:c,[`${S}--btn--icon-only`]:i,[`${S}--btn--selected`]:i&&u&&"ghost"===l}),ref:E},C=m?b.createElement(m,{"aria-label":a,className:`${S}--btn__icon`,"aria-hidden":"true"}):null,P=["danger","danger--tertiary","danger--ghost"];let T="button";const I=Dt("danger-description"),{"aria-pressed":N,"aria-describedby":j}=x;let k={disabled:o,type:w,"aria-describedby":P.includes(l)?I:j||void 0,"aria-pressed":N??(i&&"ghost"===l?u:void 0)};const R={href:s};let $=null;return P.includes(l)&&($=b.createElement("span",{id:I,className:`${S}--visually-hidden`},r)),e?(T=e,k={...k,...R}):s&&!o&&(T="a",k=R),b.createElement(T,{onMouseEnter:h,onMouseLeave:y,onFocus:p,onBlur:f,onClick:d,...x,...A,...k},$,t,C)}),Wt=(0,b.forwardRef)((e,t)=>{const{className:n,count:r,...o}=e,i=O(),s=v()(`${i}--badge-indicator`,n,{[`${i}--badge-indicator--count`]:r}),a=r&&r>999?"999+":r;return b.createElement("div",d({className:s,ref:t},o),a)});Wt.propTypes={className:h().string,count:h().number,id:h().string};const Ht=["primary","secondary","ghost","tertiary"],qt=(0,b.forwardRef)(({align:e,autoAlign:t=!1,badgeCount:n,children:r,className:o,closeOnActivation:i=!0,defaultOpen:s=!1,disabled:a,dropShadow:c=!1,enterDelayMs:u=100,highContrast:l=!0,kind:f,label:p,leaveDelayMs:h=100,wrapperClasses:y,size:m,isSelected:g,..._},w)=>{const x=O(),E=v()(y,`${x}--icon-tooltip`,{[`${x}--icon-tooltip--disabled`]:a});!n||"ghost"===f&&"lg"===m||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const S=Dt("badge-indicator");return b.createElement(Ut,{align:e,autoAlign:t,closeOnActivation:i,className:E,defaultOpen:s,dropShadow:c,enterDelayMs:u,highContrast:l,label:p,leaveDelayMs:h},b.createElement(Kt,d({},_,{disabled:a,kind:f,ref:w,size:m,isSelected:g,hasIconOnly:!0,className:o,"aria-describedby":_["aria-describedby"]||n&&S}),r,!a&&void 0!==n&&b.createElement(Wt,{id:S,count:n>0?n:void 0})))});qt.propTypes={align:_(h().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"],P),autoAlign:h().bool,badgeCount:h().number,href:h().string,children:h().node,className:h().string,closeOnActivation:h().bool,defaultOpen:h().bool,dropShadow:h().bool,disabled:h().bool,enterDelayMs:h().number,isSelected:h().bool,highContrast:h().bool,kind:h().oneOf(Ht),label:h().node.isRequired,leaveDelayMs:h().number,rel:h().string,size:h().oneOf(["sm","md","lg"]),target:h().string,wrapperClasses:h().string};const Gt=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],Yt=b.forwardRef((e,t)=>{const{as:n,autoAlign:r=!1,children:o,hasIconOnly:i=!1,tooltipHighContrast:s=!0,tooltipDropShadow:a=!1,iconDescription:c,kind:u="primary",onBlur:l,onClick:f,onFocus:p,onMouseEnter:h,onMouseLeave:y,renderIcon:m,size:v,tooltipAlignment:g="center",tooltipPosition:_="top",...w}=e;!m||o||c||console.error("Button: renderIcon property specified without also providing an iconDescription property. This may impact accessibility for screen reader users.");const x=m?b.createElement(m,null):null;if(function(e){return!0===e}(i)){let e;return"top"!==_&&"bottom"!==_||("center"===g&&(e=_),"end"===g&&(e=`${_}-end`),"start"===g&&(e=`${_}-start`)),"right"!==_&&"left"!==_||(e=_),b.createElement(qt,d({},w,{ref:t,as:n,align:e,label:c,kind:u,size:v,highContrast:s,dropShadow:a,onMouseEnter:h,onMouseLeave:y,onFocus:p,onBlur:l,autoAlign:r,onClick:f,renderIcon:x?null:m}),x??o)}{const{tooltipAlignment:n,...r}=e;return b.createElement(Kt,d({ref:t},r))}});Yt.displayName="Button",Yt.propTypes={as:h().oneOfType([h().func,h().string,h().elementType]),autoAlign:h().bool,children:h().node,className:h().string,dangerDescription:h().string,disabled:h().bool,hasIconOnly:h().bool,href:h().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:h().bool,isSelected:h().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,o=r?Ht: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:h().func,onClick:h().func,onFocus:h().func,onMouseEnter:h().func,onMouseLeave:h().func,rel:h().string,renderIcon:h().oneOfType([h().func,h().object]),role:h().string,size:h().oneOf(["xs","sm","md","lg","xl","2xl"]),tabIndex:h().number,target:h().string,tooltipAlignment:h().oneOf(["start","center","end"]),tooltipDropShadow:h().bool,tooltipHighContrast:h().bool,tooltipPosition:h().oneOf(["top","right","bottom","left"]),type:h().oneOf(["button","reset","submit"])};const Zt=(0,b.createContext)({direction:"auto",getTextDirection:{current:void 0}}),Xt=(0,b.forwardRef)(({as:e,children:t,dir:n="auto",...r},o)=>{const i=(0,b.useContext)(Zt),s={},a=e??"span",c={...i};if(i){const{direction:e,getTextDirection:r}=i;if(r&&r.current){const n=Qt(t),o=r.current(n);e!==o?(s.dir=o,c.direction=o):"auto"===e&&(s.dir=o)}else e!==n?(s.dir=n,c.direction=n):"auto"===e&&(s.dir=n)}else s.dir=n,c.direction=n;return b.createElement(Zt.Provider,{value:c},b.createElement(a,d({ref:o},r,s),t))});Xt.propTypes={as:h().oneOfType([h().func,h().string,h().elementType]),children:h().node,dir:h().oneOf(["ltr","rtl","auto"])};const Qt=e=>{if("string"==typeof e)return e;const t=b.Children.map(e,e=>"string"==typeof e?e:null)?.filter(e=>null!==e);return 1===t?.length?t[0]:t};var Jt,en,tn,nn,rn,on,sn,an,cn,un,ln,fn=n(428);const dn=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Jt||(Jt=b.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=b.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=b.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=b.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},nn||(nn=b.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=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},on||(on=b.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"})),sn||(sn=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},an||(an=b.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"})),cn||(cn=b.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):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},un||(un=b.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"})),ln||(ln=b.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)}),hn=()=>{};h().elementType,h().node,h().string;const bn=b.createContext(void 0);function yn(){return(0,b.useContext)(bn)}function mn({align:e,as:t,autoAlign:n,className:r,children:o,defaultOpen:i=!1,...s}){const a=(0,b.useRef)(null),[c,u]=(0,b.useState)(i),l=O(),f=Dt(),p=v()(`${l}--toggletip`,r,{[`${l}--toggletip--open`]:c,[`${l}--autoalign`]:n}),h={toggle:()=>{u(!c)},close:()=>{u(!1)}},y={buttonProps:{"aria-expanded":c,"aria-controls":f,"aria-describedby":c?f:void 0,onClick:h.toggle},contentProps:{id:f},onClick:{onClick:h.toggle}};return A("blur",()=>{c&&h.close()}),(0,b.useEffect)(()=>{if(!a.current)return;const e=a.current.ownerDocument||document,t="PointerEvent"in window?"pointerdown":"mousedown",n=e=>{const t=e.target;c&&t&&!a.current?.contains(t)&&u(!1)},r={capture:!0};return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}},[c]),b.createElement(bn.Provider,{value:y},b.createElement(vt,d({align:e,as:t,caret:!0,className:p,dropShadow:!1,highContrast:!0,open:c,onKeyDown:e=>{if(c&&It(e,xt)){e.stopPropagation(),h.close();const t=a.current?.children[0];t instanceof HTMLButtonElement&&t.focus()}},onBlur:e=>{c&&null===e.relatedTarget||e.currentTarget.contains(e.relatedTarget)||h.close()},ref:a,autoAlign:n},s),o))}const{open:vn,...gn}=vt.propTypes??{};mn.propTypes={...gn,defaultOpen:h().bool};const _n=(0,b.forwardRef)(function({children:e,className:t,label:n="Show information",as:r,...o},i){const s=yn(),a=O(),c=v()(`${a}--toggletip-button`,t),u=r??"button";return"button"!==u?b.createElement(u,d({},s?.onClick,{className:c},o),e):b.createElement("button",d({},s?.buttonProps,{"aria-label":n,type:"button",className:c,ref:i},o),e)});_n.propTypes={children:h().node,className:h().string,label:h().string},_n.displayName="ToggletipButton";const wn=(0,b.forwardRef)((e,t)=>{const{children:n,className:r}=e,o=yn(),i=O();return b.createElement(gt,d({className:r},o?.contentProps,{ref:t}),b.createElement("div",{className:`${i}--toggletip-content`},n))});function xn({children:e,className:t}){const n=O(),r=v()(`${n}--toggletip-actions`,t);return b.createElement("div",{className:r},e)}var En;wn.propTypes={children:h().node,className:h().string},wn.displayName="ToggletipContent",xn.propTypes={children:h().node,className:h().string};const On=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},En||(En=b.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 Sn;const An=b.forwardRef(function({className:e,children:t},n){const r=O(),o=v()(e,{[`${r}--ai-label-content`]:!0,[`${r}--ai-label-content--with-actions`]:!1});return b.createElement(wn,{className:o},t)});An.displayName="AILabelContent",An.propTypes={children:h().node,className:h().string};const Cn=b.forwardRef(function({className:e,children:t},n){const r=O(),o=v()(e,{[`${r}--ai-label-actions`]:!0});return b.createElement(xn,{className:o},t)});Cn.displayName="AILabelActions",Cn.propTypes={children:h().node,className:h().string};const Pn=b.forwardRef(function({aiText:e="AI",aiTextLabel:t,textLabel:n,align:r,autoAlign:o=!0,children:i,className:s,kind:a="default",onRevertClick:c,revertActive:u,revertLabel:l="Revert to AI input",slugLabel:f="Show information","aria-label":p="Show information",size:h="xs",...y},m){const g=O(),_=Dt("AILabel"),w=v()(s,{[`${g}--ai-label`]:!0,[`${g}--ai-label--revert`]:u}),x=v()({[`${g}--ai-label__button`]:!0,[`${g}--ai-label__button--${h}`]:h,[`${g}--ai-label__button--${a}`]:a,[`${g}--ai-label__button--inline-with-content`]:"inline"===a&&(t||n)}),E=t||n?`${e} ${t||n}`:`${e} ${f||p}`,S=["xs","2xs","mini"].includes(h);return b.createElement("div",{className:w,ref:m,id:_},u?b.createElement(qt,d({onClick:e=>{c&&c(e)},kind:"ghost",size:"sm",label:l},y),Sn||(Sn=b.createElement(On,null))):b.createElement(mn,d({align:r,autoAlign:o,alignmentAxisOffset:S?-24:0},y),b.createElement(_n,{className:x,label:"inline"===a?"":E},b.createElement("span",{className:`${g}--ai-label__text`},e),"inline"===a&&(t||n)&&b.createElement("span",{className:`${g}--ai-label__additional-text`},t||n)),i))});Pn.displayName="AILabel",Pn.propTypes={...mn.propTypes,AILabelContent:h().node,aiText:h().string,aiTextLabel:ht(h().string),"aria-label":h().string,kind:h().oneOf(["default","inline"]),onRevertClick:h().func,revertActive:h().bool,revertLabel:h().string,size:h().oneOf(["mini","2xs","xs","sm","md","lg","xl"]),slugLabel:ht(h().string),textLabel:h().string};const Tn=(e,t)=>(0,b.isValidElement)(e)&&e.type===t,In=b.forwardRef(({className:e,decorator:t,helperText:n,id:r,labelText:o,onChange:i=hn,onClick:s,indeterminate:a=!1,invalid:c,invalidText:u,hideLabel:l,readOnly:f,title:p="",warn:h,warnText:y,slug:m,...g},_)=>{const w=O(),x=!f&&!c&&h,E=!c&&!h,S=Dt(),A=null!=n,C=A?`checkbox-helper-text-${S}`:void 0,P=A&&b.createElement("div",{id:C,className:`${w}--form__helper-text`},n),T=v()(`${w}--form-item`,`${w}--checkbox-wrapper`,e,{[`${w}--checkbox-wrapper--readonly`]:f,[`${w}--checkbox-wrapper--invalid`]:!f&&c,[`${w}--checkbox-wrapper--warning`]:x,[`${w}--checkbox-wrapper--slug`]:m,[`${w}--checkbox-wrapper--decorator`]:t}),I=v()(`${w}--checkbox-label-text`,{[`${w}--visually-hidden`]:l}),N=m??t,j=Tn(N,Pn)?(0,b.cloneElement)(N,{size:"inline"===N.props.kind?"md":"mini"}):N;return b.createElement("div",{className:T},b.createElement("input",d({},g,{type:"checkbox","data-invalid":!!c||void 0,onChange:e=>{!f&&i&&i(e,{checked:e.target.checked,id:r})},className:`${w}--checkbox`,id:r,ref:e=>{e&&(e.indeterminate=a??!1),"function"==typeof _?_(e):_&&"current"in _&&(_.current=e)},"aria-readonly":f,onClick:e=>{f&&e.preventDefault(),s&&s(e)}})),b.createElement("label",{htmlFor:r,className:`${w}--checkbox-label`,title:p},b.createElement(Xt,{as:"div",className:I},o,m?j:t?b.createElement("div",{className:`${w}--checkbox-wrapper-inner--decorator`},j):"")),b.createElement("div",{className:`${w}--checkbox__validation-msg`},!f&&c&&b.createElement(b.Fragment,null,b.createElement(pn,{className:`${w}--checkbox__invalid-icon`}),b.createElement("div",{className:`${w}--form-requirement`},u)),x&&b.createElement(b.Fragment,null,b.createElement(dn,{className:`${w}--checkbox__invalid-icon ${w}--checkbox__invalid-icon--warning`}),b.createElement("div",{className:`${w}--form-requirement`},y))),E&&P)});function Nn(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:h().bool,className:h().string,decorator:h().node,defaultChecked:h().bool,disabled:h().bool,helperText:h().node,hideLabel:h().bool,id:h().string.isRequired,indeterminate:h().bool,invalid:h().bool,invalidText:h().node,labelText:h().node.isRequired,onChange:h().func,readOnly:h().bool,slug:ht(h().node),title:h().string,warn:h().bool,warnText:h().node},In.displayName="Checkbox";var jn=n(8168);n(4353);const kn=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Rn=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,$n=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Rn(n.overflowY,t)||Rn(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,s,a)=>i<e&&s>t||i>e&&s<t?0:i<=e&&a<=n||s>=t&&a>=n?i-e-r:s>t&&a<n||i<e&&a>n?s-t+o:0,Dn=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t};var Ln=n(1635),Bn=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),s=0;s<o;s++)i[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,i)},t)}return o.cancel=r,o}function Un(){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 Kn(){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]=Hn(t,r)?t[r]:e[r],n},{}):e}function Hn(e,t){return void 0!==e[t]}function qn(e,t,n,r,o){void 0===o&&(o=!1);var i=n.length;if(0===i)return-1;var s=i-1;("number"!=typeof e||e<0||e>s)&&(e=t>0?-1:s+1);var a=e+t;a<0?a=o?s:0:a>s&&(a=o?0:s);var c=Gn(a,t<0,n,r,o);return-1===c?e>=i?-1:e:c}function Gn(e,t,n,r,o){void 0===o&&(o=!1);var i=n.length;if(t){for(var s=e;s>=0;s--)if(!r(n[s],s))return s}else for(var a=e;a<i;a++)if(!r(n[a],a))return a;return o?Gn(t?i-1:0,t,n,r):-1}function Yn(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 Zn=zn(function(e){Xn(e).textContent=""},500);function Xn(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 Qn={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var Jn=zn(function(e,t){!function(e,t){e&&t&&(Xn(t).textContent=e,Zn(t))}(e,t)},200),er="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?b.useLayoutEffect:b.useEffect,tr="useId"in b?function(e){var t=e.id,n=e.labelId,r=e.menuId,o=e.getItemId,i=e.toggleButtonId,s=e.inputId,a="downshift-"+b.useId();t||(t=a);var c=(0,b.useRef)({labelId:n||t+"-label",menuId:r||t+"-menu",getItemId:o||function(e){return t+"-item-"+e},toggleButtonId:i||t+"-toggle-button",inputId:s||t+"-input"});return c.current}:function(e){var t=e.id,n=void 0===t?"downshift-"+String(Bn++):t,r=e.labelId,o=e.menuId,i=e.getItemId,s=e.toggleButtonId,a=e.inputId,c=(0,b.useRef)({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(e){return n+"-item-"+e},toggleButtonId:s||n+"-toggle-button",inputId:a||n+"-input"});return c.current};function nr(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function rr(e){var t=(0,b.useRef)(e);return t.current=e,t}function or(e,t,n,r){var o=(0,b.useRef)(),i=(0,b.useRef)(),s=(0,b.useCallback)(function(t,n){i.current=n,t=Wn(t,n.props);var r=e(t,n);return n.props.stateReducer(t,(0,jn.A)({},n,{changes:r}))},[e]),a=(0,b.useReducer)(s,t,n),c=a[0],u=a[1],l=rr(t),f=(0,b.useCallback)(function(e){return u((0,jn.A)({props:l.current},e))},[l]),d=i.current;return(0,b.useEffect)(function(){var e=Wn(o.current,null==d?void 0:d.props);d&&o.current&&!r(e,c)&&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,s="on"+nr(e)+"Change";o[s]&&void 0!==r[e]&&r[e]!==n[e]&&o[s]((0,jn.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,jn.A)({type:o},i))}(d,e,c),o.current=c},[c,d,r]),[c,f]}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:s,block:a,inline:c,boundary:u,skipOverflowHiddenElements:l}=t,f="function"==typeof u?u:e=>e!==u;if(!kn(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let h=e;for(;kn(h)&&f(h);){if(h=Dn(h),h===d){p.push(h);break}null!=h&&h===document.body&&$n(h)&&!$n(document.documentElement)||null!=h&&$n(h,l)&&p.push(h)}const b=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,y=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:v}=window,{height:g,width:_,top:w,right:x,bottom:E,left:O}=e.getBoundingClientRect(),{top:S,right:A,bottom:C,left:P}=(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 T="start"===a||"nearest"===a?w-S:"end"===a?E+C:w+g/2-S+C,I="center"===c?O+_/2-P+A:"end"===c?x+A:O-P;const N=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:u,left:l}=t.getBoundingClientRect();if("if-needed"===s&&w>=0&&O>=0&&E<=y&&x<=b&&(t===d&&!$n(t)||w>=o&&E<=u&&O>=l&&x<=i))return N;const f=getComputedStyle(t),h=parseInt(f.borderLeftWidth,10),S=parseInt(f.borderTopWidth,10),A=parseInt(f.borderRightWidth,10),C=parseInt(f.borderBottomWidth,10);let P=0,j=0;const k="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-A:0,R="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-C:0,$="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,M="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(d===t)P="start"===a?T:"end"===a?T-y:"nearest"===a?Mn(v,v+y,y,S,C,v+T,v+T+g,g):T-y/2,j="start"===c?I:"center"===c?I-b/2:"end"===c?I-b:Mn(m,m+b,b,h,A,m+I,m+I+_,_),P=Math.max(0,P+v),j=Math.max(0,j+m);else{P="start"===a?T-o-S:"end"===a?T-u+C+R:"nearest"===a?Mn(o,u,n,S,C+R,T,T+g,g):T-(o+n/2)+R/2,j="start"===c?I-l-h:"center"===c?I-(l+r/2)+k/2:"end"===c?I-i+A+k:Mn(l,i,r,h,A+k,I,I+_,_);const{scrollLeft:e,scrollTop:s}=t;P=0===M?0:Math.max(0,Math.min(s+P/M,t.scrollHeight-n/M+R)),j=0===$?0:Math.max(0,Math.min(e+j/$,t.scrollWidth-r/$+k)),T+=s-P,I+=e-j}N.push({el:t,top:P,left:j})}return N})(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 sr(e,t,n){void 0===n&&(n=Qn);var r=e["default"+nr(t)];return void 0!==r?r:n[t]}function ar(e,t,n){void 0===n&&(n=Qn);var r=e[t];if(void 0!==r)return r;var o=e["initial"+nr(t)];return void 0!==o?o:sr(e,t,n)}function cr(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,s=e.isItemDisabled,a=e.itemToKey,c=t.selectedItem,u=t.highlightedIndex;return 0===r.length?-1:void 0===o||u!==o||s(r[o],o)?void 0===i||s(r[i],i)?c?r.findIndex(function(e){return a(c)===a(e)}):n<0&&!s(r[r.length-1],r.length-1)?r.length-1:n>0&&!s(r[0],0)?0:-1:i:o}var ur=Vn;function lr(e,t,n){var r;void 0===n&&(n=!0);var o=(null==(r=e.items)?void 0:r.length)&&t>=0;return(0,jn.A)({isOpen:!1,highlightedIndex:-1},o&&(0,jn.A)({selectedItem:e.items[t],isOpen:sr(e,"isOpen"),highlightedIndex:sr(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function fr(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function dr(){var e=b.useRef(!0);return b.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function pr(e){var t=sr(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var hr={environment:h().shape({addEventListener:h().func.isRequired,removeEventListener:h().func.isRequired,document:h().shape({createElement:h().func.isRequired,getElementById:h().func.isRequired,activeElement:h().any.isRequired,body:h().any.isRequired}).isRequired,Node:h().func.isRequired}),itemToString:h().func,itemToKey:h().func,stateReducer:h().func},br=(0,jn.A)({},hr,{getA11yStatusMessage:h().func,highlightedIndex:h().number,defaultHighlightedIndex:h().number,initialHighlightedIndex:h().number,isOpen:h().bool,defaultIsOpen:h().bool,initialIsOpen:h().bool,selectedItem:h().any,initialSelectedItem:h().any,defaultSelectedItem:h().any,id:h().string,labelId:h().string,menuId:h().string,getItemId:h().func,toggleButtonId:h().string,onSelectedItemChange:h().func,onHighlightedIndexChange:h().func,onStateChange:h().func,onIsOpenChange:h().func,scrollIntoView:h().func});(0,Ln.__assign)((0,Ln.__assign)({},br),{items:h().array.isRequired,isItemDisabled:h().func}),(0,Ln.__assign)((0,Ln.__assign)({},ir),{isItemDisabled:function(){return!1}});var yr=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 mr(e){var t=function(e){var t=ar(e,"selectedItem"),n=ar(e,"isOpen"),r=function(e){var t=ar(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}(e),o=ar(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,jn.A)({},t,{inputValue:r})}(0,jn.A)({},br,{items:h().array.isRequired,isItemDisabled:h().func,inputValue:h().string,defaultInputValue:h().string,initialInputValue:h().string,inputId:h().string,onInputValueChange:h().func});var vr=Vn,gr=(0,jn.A)({},ir,{isItemDisabled:function(){return!1}});function _r(e,t){var n,r,o=t.type,i=t.props,s=t.altKey;switch(o){case 13:r={isOpen:sr(i,"isOpen"),highlightedIndex:pr(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case 0:r=e.isOpen?{highlightedIndex:qn(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:{highlightedIndex:s&&null==e.selectedItem?-1:cr(i,e,1),isOpen:i.items.length>=0};break;case 1:r=e.isOpen?s?lr(i,e.highlightedIndex):{highlightedIndex:qn(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:{highlightedIndex:cr(i,e,-1),isOpen:i.items.length>=0};break;case 7:r=lr(i,e.highlightedIndex);break;case 2:r=(0,jn.A)({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case 5:r={highlightedIndex:qn(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case 6:r={highlightedIndex:qn(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,jn.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:cr(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:cr(i,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:cr(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:sr(i,"isOpen"),selectedItem:sr(i,"selectedItem"),inputValue:sr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return(0,jn.A)({},e,r)}(e,t,yr)}return(0,jn.A)({},e,r)}var wr,xr,Er,Or,Sr,Ar,Cr,Pr,Tr,Ir,Nr,jr,kr,Rr,$r,Mr,Dr,Lr,Br,Vr,Fr,zr,Ur,Kr,Wr,Hr=["onMouseLeave","refKey","ref"],qr=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Gr=["onClick","onPress","refKey","ref"],Yr=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];function Zr(e){void 0===e&&(e={}),vr(e,Zr);var t=(0,jn.A)({},gr,e),n=t.items,r=t.scrollIntoView,o=t.environment,i=t.getA11yStatusMessage,s=function(e,t,n,r){var o=(0,b.useRef)(),i=or(e,t,n,r),s=i[0],a=i[1],c=dr();return(0,b.useEffect)(function(){Hn(t,"selectedItem")&&(c||t.itemToKey(t.selectedItem)!==t.itemToKey(o.current)&&a({type:22,inputValue:t.itemToString(t.selectedItem)}),o.current=s.selectedItem===o.current?t.selectedItem:s.selectedItem)},[s.selectedItem,t.selectedItem]),[Wn(s,t),a]}(_r,t,mr,fr),a=s[0],c=s[1],u=a.isOpen,l=a.highlightedIndex,f=a.selectedItem,d=a.inputValue,p=(0,b.useRef)(null),h=(0,b.useRef)({}),y=(0,b.useRef)(null),m=(0,b.useRef)(null),v=dr(),g=tr(t),_=(0,b.useRef)(),w=rr({state:a,props:t}),x=(0,b.useCallback)(function(e){return h.current[g.getItemId(e)]},[g]);!function(e,t,n,r){void 0===r&&(r={});var o=r.document,i=dr();(0,b.useEffect)(function(){if(e&&!i&&o){var n=e(t);Jn(n,o)}},n),(0,b.useEffect)(function(){return function(){var e,t;Jn.cancel(),(t=null==(e=o)?void 0:e.getElementById("a11y-status-message"))&&t.remove()}},[o])}(i,a,[u,l,f,d],o);var E=function(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,s=e.scrollIntoView,a=(0,b.useRef)(!0);return er(function(){t<0||!n||!Object.keys(r.current).length||(!1===a.current?a.current=!0:s(o(t),i))},[t]),a}({menuElement:p.current,highlightedIndex:l,isOpen:u,itemRefs:h,scrollIntoView:r,getItemNodeFromIndex:x});ur({props:t,state:a}),(0,b.useEffect)(function(){ar(t,"isOpen")&&y.current&&y.current.focus()},[]),(0,b.useEffect)(function(){v||(_.current=n.length)});var O=function(e,t,n){var r=(0,b.useRef)({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1});return(0,b.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 s(n){r.current.isMouseDown=!1,Yn(n.target,o,e)||t()}function a(){r.current.isTouchEnd=!1,r.current.isTouchMove=!1}function c(){r.current.isTouchMove=!0}function u(n){r.current.isTouchEnd=!0,r.current.isTouchMove||Yn(n.target,o,e,!1)||t()}return e.addEventListener("mousedown",i),e.addEventListener("mouseup",s),e.addEventListener("touchstart",a),e.addEventListener("touchmove",c),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",i),e.removeEventListener("mouseup",s),e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",c),e.removeEventListener("touchend",u)}},[n,e,t]),r.current}(o,(0,b.useCallback)(function(){w.current.state.isOpen&&c({type:9,selectItem:!1})},[c,w]),(0,b.useMemo)(function(){return[p,m,y]},[p.current,m.current,y.current])),S=Vn;(0,b.useEffect)(function(){u||(h.current={})},[u]),(0,b.useEffect)(function(){var e;u&&null!=o&&o.document&&null!=y&&null!=(e=y.current)&&e.focus&&o.document.activeElement!==y.current&&y.current.focus()},[u,o]);var A=(0,b.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),c({type:0,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),c({type:1,altKey:e.altKey})},Home:function(e){w.current.state.isOpen&&(e.preventDefault(),c({type:3}))},End:function(e){w.current.state.isOpen&&(e.preventDefault(),c({type:4}))},Escape:function(e){var t=w.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),c({type:2}))},Enter:function(e){w.current.state.isOpen&&229!==e.which&&(e.preventDefault(),c({type:7}))},PageUp:function(e){w.current.state.isOpen&&(e.preventDefault(),c({type:5}))},PageDown:function(e){w.current.state.isOpen&&(e.preventDefault(),c({type:6}))}}},[c,w]),C=(0,b.useCallback)(function(e){return(0,jn.A)({id:g.labelId,htmlFor:g.inputId},e)},[g]),P=(0,b.useCallback)(function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,i=r.refKey,s=void 0===i?"ref":i,a=r.ref,u=Nn(r,Hr),l=(void 0===t?{}:t).suppressRefError;return S("getMenuProps",void 0!==l&&l,s,p),(0,jn.A)(((n={})[s]=Kn(a,function(e){p.current=e}),n.id=g.menuId,n.role="listbox",n["aria-labelledby"]=u&&u["aria-label"]?void 0:""+g.labelId,n.onMouseLeave=Un(o,function(){c({type:11})}),n),u)},[c,S,g]),T=(0,b.useCallback)(function(e){var t,n,r=void 0===e?{}:e,o=r.item,i=r.index,s=r.refKey,a=void 0===s?"ref":s,u=r.ref,l=r.onMouseMove,f=r.onMouseDown,d=r.onClick;r.onPress;var p=r.disabled,b=Nn(r,qr);void 0!==p&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var y=w.current,m=y.props,v=y.state,_=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,m.items,"Pass either item or index to getItemProps!"),x=_[0],S=_[1],A=m.isItemDisabled(x,S),C=d;return(0,jn.A)(((t={})[a]=Kn(u,function(e){e&&(h.current[g.getItemId(S)]=e)}),t["aria-disabled"]=A,t["aria-selected"]=S===v.highlightedIndex,t.id=g.getItemId(S),t.role="option",t),!A&&((n={}).onClick=Un(C,function(){c({type:13,index:S})}),n),{onMouseMove:Un(l,function(){O.isTouchEnd||S===v.highlightedIndex||(E.current=!1,c({type:12,index:S,disabled:A}))}),onMouseDown:Un(f,function(e){return e.preventDefault()})},b)},[c,g,w,O,E]),I=(0,b.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,s=n.ref,a=Nn(n,Gr),u=w.current.state;return(0,jn.A)(((t={})[i]=Kn(s,function(e){m.current=e}),t["aria-controls"]=g.menuId,t["aria-expanded"]=u.isOpen,t.id=g.toggleButtonId,t.tabIndex=-1,t),!a.disabled&&(0,jn.A)({},{onClick:Un(r,function(){c({type:14})})}),a)},[c,w,g]),N=(0,b.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onKeyDown,s=r.onChange,a=r.onInput,u=r.onBlur;r.onChangeText;var l=r.onClick,f=r.refKey,d=void 0===f?"ref":f,p=r.ref,h=Nn(r,Yr),b=(void 0===t?{}:t).suppressRefError;S("getInputProps",void 0!==b&&b,d,y);var m,v=w.current.state,_={};return h.disabled||((m={}).onChange=Un(s,a,function(e){c({type:8,inputValue:e.target.value})}),m.onKeyDown=Un(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&&A[t]&&A[t](e)}),m.onBlur=Un(u,function(e){if(null!=o&&o.document&&v.isOpen&&!O.isMouseDown){var t=null===e.relatedTarget&&o.document.activeElement!==o.document.body;c({type:9,selectItem:!t})}}),m.onClick=Un(l,function(){c({type:10})}),_=m),(0,jn.A)(((n={})[d]=Kn(p,function(e){y.current=e}),n["aria-activedescendant"]=v.isOpen&&v.highlightedIndex>-1?g.getItemId(v.highlightedIndex):"",n["aria-autocomplete"]="list",n["aria-controls"]=g.menuId,n["aria-expanded"]=v.isOpen,n["aria-labelledby"]=h&&h["aria-label"]?void 0:g.labelId,n.autoComplete="off",n.id=g.inputId,n.role="combobox",n.value=v.inputValue,n),_,h)},[c,g,o,A,w,O,S]),j=(0,b.useCallback)(function(){c({type:15})},[c]),k=(0,b.useCallback)(function(){c({type:17})},[c]),R=(0,b.useCallback)(function(){c({type:16})},[c]),$=(0,b.useCallback)(function(e){c({type:18,highlightedIndex:e})},[c]),M=(0,b.useCallback)(function(e){c({type:19,selectedItem:e})},[c]);return{getItemProps:T,getLabelProps:C,getMenuProps:P,getInputProps:N,getToggleButtonProps:I,toggleMenu:j,openMenu:R,closeMenu:k,setHighlightedIndex:$,setInputValue:(0,b.useCallback)(function(e){c({type:20,inputValue:e})},[c]),selectItem:M,reset:(0,b.useCallback)(function(){c({type:21})},[c]),highlightedIndex:l,isOpen:u,selectedItem:f,inputValue:d}}Zr.stateChangeTypes=yr,h().array,h().array,h().array,h().func,h().number,h().number,h().number,h().func,h().func,h().string,h().string;const Xr=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},wr||(wr=b.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)}),Qr=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},xr||(xr=b.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"})),Er||(Er=b.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)}),Jr=b.forwardRef(function({children:e,size:t=16,...n},r){return 20===t||"20"===t||"20px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Or||(Or=b.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"})),Sr||(Sr=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Ar||(Ar=b.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):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Cr||(Cr=b.createElement("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),e)}),eo=b.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Pr||(Pr=b.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"})),Tr||(Tr=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Ir||(Ir=b.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"})),Nr||(Nr=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},jr||(jr=b.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=b.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):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Rr||(Rr=b.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"})),$r||($r=b.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=b.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},Mr||(Mr=b.createElement("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"})),e):16===t||"16"===t||"16px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Dr||(Dr=b.createElement("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),e):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Lr||(Lr=b.createElement("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),e)}),no=b.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},Br||(Br=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Vr||(Vr=b.createElement("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),e):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Fr||(Fr=b.createElement("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),e)}),ro=b.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},zr||(zr=b.createElement("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"})),e):16===t||"16"===t||"16px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Ur||(Ur=b.createElement("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),e):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Kr||(Kr=b.createElement("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),e)}),oo=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Wr||(Wr=b.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),so=n.n(io);const ao=h().oneOf(["default","inline"]),co=h().oneOf(["sm","md","lg"]),uo=(0,b.createContext)({isFluid:!1}),lo=e=>{27===e.keyCode&&e.stopPropagation()},fo=e=>{e.preventDefault(),e.stopPropagation()},po=(0,b.forwardRef)((e,t)=>{const{children:n,className:r,disabled:o=!1,type:i="default",size:s,invalid:a,invalidText:c,invalidTextId:u,warn:l,warnText:f,warnTextId:p,light:h,isOpen:y,...m}=e,g=O(),{isFluid:_}=(0,b.useContext)(uo),w=!a&&l,x=v()({...r&&{[r]:!0},[`${g}--list-box`]:!0,[`${g}--list-box--${s}`]:s,[`${g}--list-box--inline`]:"inline"===i,[`${g}--list-box--disabled`]:o,[`${g}--list-box--light`]:h,[`${g}--list-box--expanded`]:y,[`${g}--list-box--invalid`]:a,[`${g}--list-box--warning`]:w});return b.createElement(b.Fragment,null,b.createElement("div",d({},m,{className:x,ref:t,onKeyDown:lo,onClick:fo,"data-invalid":a||void 0}),n),_&&b.createElement("hr",{className:`${g}--list-box__divider`}),a?b.createElement("div",{className:`${g}--form-requirement`,id:u},c):null,w?b.createElement("div",{className:`${g}--form-requirement`,id:p},f):null)});function ho({children:e,disabled:t,tabIndex:n,...r}){const o=O();return b.createElement("div",d({className:`${o}--list-box__field`,tabIndex:!t&&n||-1},r),e)}po.displayName="ListBox",po.propTypes={children:h().node,className:h().string,disabled:h().bool,invalid:h().bool,invalidText:h().node,invalidTextId:h().string,isOpen:h().bool,light:ht(h().bool),size:co,type:ao,warn:h().bool,warnText:h().string,warnTextId:h().string},ho.propTypes={"aria-haspopup":h().oneOfType([h().string,h().bool]),children:h().node,disabled:h().bool,role:h().string,tabIndex:h().oneOfType([h().number,h().string])};const bo=(0,b.forwardRef)(({children:e,isActive:t=!1,isHighlighted:n=!1,title:r,...o},i)=>{const s=O(),a=i&&"function"!=typeof i?i.menuItemOptionRef:void 0,{isTruncated:c,ref:u}=((e,t=[])=>{const n=(0,b.useRef)(null),r=x([...e?[e]:[],n]),[o,i]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const e=n.current;if(e){const{offsetWidth:t,scrollWidth:n}=e;i(t<n)}},[n,...t]),{isTruncated:o,ref:r}})(a,[e]),l=v()(`${s}--list-box__menu-item`,{[`${s}--list-box__menu-item--active`]:t,[`${s}--list-box__menu-item--highlighted`]:n});return b.createElement("li",d({},o,{className:l,title:c?r:void 0}),b.createElement("div",{className:`${s}--list-box__menu-item__option`,ref:u},e))});bo.displayName="ListBoxMenuItem",bo.propTypes={children:h().node,disabled:h().bool,isActive:h().bool,isHighlighted:h().bool,title:h().string};const yo=(0,b.forwardRef)(({children:e,id:t,...n},r)=>{const o=O();return b.createElement("ul",d({ref:r,id:t,className:`${o}--list-box__menu`,role:"listbox"},n),e)});yo.displayName="ListBoxMenu",yo.propTypes={children:h().oneOfType([h().node,h().arrayOf(h().oneOf([bo])),h().shape({type:h().oneOf([bo])}),h().bool]),id:h().string.isRequired};const mo="close.menu",vo="open.menu",go={[mo]:"Close menu",[vo]:"Open menu"},_o=e=>go[e],wo=({isOpen:e,translateWithId:t=_o})=>{const n=O(),r=v()(`${n}--list-box__menu-icon`,{[`${n}--list-box__menu-icon--open`]:e}),o=t(e?"close.menu":"open.menu");return b.createElement("div",{className:r},b.createElement(to,{name:"chevron--down","aria-label":o},b.createElement("title",null,o)))};var xo,Eo;wo.propTypes={isOpen:h().bool.isRequired,translateWithId:h().func};const Oo="clear.all",So="clear.selection",Ao={[Oo]:"Clear all selected items",[So]:"Clear selected item"},Co=e=>Ao[e],Po=({clearSelection:e,selectionCount:t,translateWithId:n=Co,disabled:r,onClearSelection:o,readOnly:i})=>{const s=O(),a=v()(`${s}--list-box__selection`,{[`${s}--tag--filter`]:t,[`${s}--list-box__selection--multi`]:t}),c=t=>{t.stopPropagation(),r||i||(e(t),o&&o(t))},u=n(t?"clear.all":"clear.selection"),l=v()(`${s}--tag`,`${s}--tag--filter`,`${s}--tag--high-contrast`,{[`${s}--tag--disabled`]:r});return t?b.createElement("div",{className:l},b.createElement("span",{className:`${s}--tag__label`,title:`${t}`},t),b.createElement("div",{role:"button",tabIndex:-1,className:`${s}--tag__close-icon`,onClick:c,"aria-label":n("clear.all"),title:u,"aria-disabled":!!i||void 0},xo||(xo=b.createElement(oo,null)))):b.createElement("div",{role:"button",className:a,tabIndex:-1,onClick:c,"aria-label":u,title:u},t,Eo||(Eo=b.createElement(oo,null)))};Po.propTypes={clearSelection:h().func.isRequired,disabled:h().bool,onClearSelection:h().func,readOnly:h().bool,selectionCount:h().number,translateWithId:h().func};const To=Object.assign(po,{Field:ho,Menu:yo,MenuIcon:wo,MenuItem:bo,Selection:Po});var Io,No;const jo="clear.all",ko="clear.selection",Ro={[jo]:"Clear all selected items",[ko]:"Clear selected item"},$o=e=>Ro[e];function Mo({clearSelection:e,selectionCount:t,translateWithId:n=$o,disabled:r,readOnly:o,onClearSelection:i,...s}){const a=O(),c=v()(`${a}--list-box__selection`,{[`${a}--tag--filter`]:t,[`${a}--list-box__selection--multi`]:t}),u=n(t?"clear.all":"clear.selection"),l=v()(`${a}--tag`,`${a}--tag--filter`,`${a}--tag--high-contrast`,{[`${a}--tag--disabled`]:r});function f(t){t.stopPropagation(),r||o||(e(t),i&&i(t))}return t?b.createElement("div",{className:l},b.createElement("span",{className:`${a}--tag__label`,title:t?.toString()},t),b.createElement("button",{"aria-label":u,className:`${a}--tag__close-icon`,disabled:r||o,onClick:f,tabIndex:-1,title:u,type:"button","aria-disabled":!!o||void 0},Io||(Io=b.createElement(oo,null)))):b.createElement("button",d({},s,{"aria-label":u,className:c,disabled:r||o,onClick:f,tabIndex:-1,title:u,type:"button","aria-disabled":!!o||void 0}),No||(No=b.createElement(oo,null)))}var Do;Mo.propTypes={clearSelection:h().func.isRequired,disabled:h().bool,readOnly:h().bool,onClearSelection:h().func,onClick:h().func,onMouseUp:h().func,onKeyDown:h().func,selectionCount:h().number,translateWithId:h().func};const Lo="close.menu",Bo="open.menu",Vo={[Lo]:"Close",[Bo]:"Open"},Fo=e=>Vo[e],zo=b.forwardRef(({isOpen:e,translateWithId:t=Fo,...n},r)=>{const o=O(),i=v()({[`${o}--list-box__menu-icon`]:!0,[`${o}--list-box__menu-icon--open`]:e}),s=t(e?"close.menu":"open.menu");return b.createElement("button",d({},n,{"aria-label":s,title:s,className:i,type:"button",tabIndex:-1,ref:r}),Do||(Do=b.createElement(to,null)))});zo.propTypes={isOpen:h().bool.isRequired,translateWithId:h().func};const Uo=(...e)=>t=>{e.forEach(e=>{e&&("function"==typeof e?e(t):"object"==typeof e&&"current"in e&&(e.current=t))})},Ko=({id:e,readOnly:t,disabled:n,invalid:r,invalidText:o,warn:i,warnText:s})=>{const a=O(),c={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 c.invalid?(c.icon=pn,c.validation=b.createElement(Xt,{as:"div",className:`${a}--form-requirement`,id:c.invalidId},o)):c.warn&&(c.icon=dn,c.validation=b.createElement(Xt,{as:"div",className:`${a}--form-requirement`,id:c.warnId},s)),c},Wo=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:e&&"object"==typeof e&&"label"in e&&"string"==typeof e.label?e.label:"",{InputBlur:Ho,InputKeyDownEnter:qo,FunctionToggleMenu:Go,ToggleButtonClick:Yo,ItemMouseMove:Zo,InputKeyDownArrowUp:Xo,InputKeyDownArrowDown:Qo,MenuMouseLeave:Jo,ItemClick:ei,FunctionSelectItem:ti}=Zr.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,b.forwardRef)((e,t)=>{const n=(0,b.useRef)(0),r=(0,b.useRef)(null),{"aria-label":o="Choose an item",ariaLabel:i,autoAlign:s=!1,className:a,decorator:c,direction:u="bottom",disabled:l=!1,downshiftActions:f,downshiftProps:p,helperText:h,id:y,initialSelectedItem:m,invalid:g,invalidText:_,items:w,itemToElement:x=null,itemToString:E=Wo,light:S,onChange:A,onInputChange:C,onToggleClick:P,placeholder:T,readOnly:I,selectedItem:N,shouldFilterItem:j=ni,size:k,titleText:R,translateWithId:$,typeahead:M=!1,warn:D,warnText:L,allowCustomValue:B=!1,slug:V,inputProps:F,...z}=e,U=yt("enable-v12-dynamic-floating-styles")||s,{refs:K,floatingStyles:W,middlewareData:H}=dt(U?{placement:u,strategy:"fixed",middleware:s?[tt(),nt()]:void 0,whileElementsMounted:We}:{}),q=K?.reference?.current,G=q instanceof HTMLElement?q.clientWidth:void 0;(0,b.useEffect)(()=>{if(U){const e={...W,visibility:H.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{K.floating.current&&(K.floating.current.style[t]=e[t])}),G&&K.floating.current&&(K.floating.current.style.width=G+"px")}},[U,W,K.floating,G]);const[Y,Z]=(0,b.useState)(oi({initialSelectedItem:m,itemToString:E,selectedItem:N})),[X,Q]=(0,b.useState)("");(0,b.useEffect)(()=>{if(M){if(Y.length>=n.current)if(Y){const e=w.filter(e=>ri({item:E(e),inputValue:Y}));if(e.length>0){const t=E(e[0]);Q(t.slice(Y.length))}else Q("")}else Q("");else Q("");n.current=Y.length}},[M,Y,w,E,ri]);const J=(0,b.useRef)(!1),ee=(0,b.useRef)(""),[te,ne]=(0,b.useState)(!1),re=O(),{isFluid:oe}=(0,b.useContext)(uo),ie=(0,b.useRef)(null),se=Dt(),[ae,ce]=(0,b.useState)(!1),ue=(0,b.useRef)(Y),le=(0,b.useRef)(N);(0,b.useEffect)(()=>{J.current=te,te&&ne(!1)},[te]),(0,b.useEffect)(()=>{if(le.current!==N){const e=oi({initialSelectedItem:m,itemToString:E,selectedItem:N,prevSelectedItem:le.current});Y!==e&&(Z(e),A({selectedItem:N,inputValue:e})),le.current=N}},[N]);const fe=(e,t,n)=>e.filter(e=>M?ri({item:t(e),inputValue:n}):j?j({item:e,itemToString:t,inputValue:n}):ni());(0,b.useEffect)(()=>{ue.current!==Y&&(ue.current=Y,C?.(Y))},[Y]);const de=()=>{ie?.current&&ie.current.focus()},pe=e=>fe(w,E,e||null),he=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),be=(0,b.useCallback)((e,t)=>{const{type:n,changes:r}=t,{highlightedIndex:o}=r;switch(n){case Ho:if(B&&-1===o){const t=e.inputValue??"",n=void 0===r.selectedItem?e.selectedItem:r.selectedItem;if(null!=n&&E(n)===t&&w.some(e=>so()(e,n)))return r;const o=""===t?null:w.find(e=>E(e)===t)??t,i="string"==typeof o&&""!==o&&!w.some(e=>so()(e,o));return!so()(n,o)&&A&&(A({selectedItem:o,inputValue:t}),ee.current=i?t:""),{...r,selectedItem:o}}if(e.inputValue&&-1===o&&r.selectedItem)return{...r,inputValue:E(r.selectedItem)};if(!B){const t=e.inputValue??"";if(!t||!w.some(e=>E(e)===t)){const t=null!==e.selectedItem?E(e.selectedItem):"";return{...r,inputValue:t}}}return r;case qo:if(!B)if(-1!==e.highlightedIndex){const t=fe(w,E,Y)[e.highlightedIndex];if(t&&!t.disabled)return{...r,selectedItem:t,inputValue:E(t)}}else{const t=he(Y);if(-1!==t){const e=w[t];if(e&&!e.disabled)return{...r,selectedItem:e,inputValue:E(e)}}if(null!==e.selectedItem)return{...r,selectedItem:null,inputValue:Y}}return{...r,isOpen:!0};case Go:case Yo:if(e.isOpen&&!r.isOpen&&!B){const t=e.inputValue??"";if(!t||!w.some(e=>E(e)===t)){const t=null!==e.selectedItem?E(e.selectedItem):"";return{...r,inputValue:t}}}return r;case Jo:return{...r,highlightedIndex:e.highlightedIndex};case Xo:case Qo:return-1===o?{...r,highlightedIndex:0}:r;case Zo:return{...r,highlightedIndex:e.highlightedIndex};default:return r}},[B,Y,E,w,A]),ye=Ko({id:y,readOnly:I,disabled:l||!1,invalid:g||!1,invalidText:_,warn:D||!1,warnText:L}),me=v()(`${re}--combo-box`,{[`${re}--combo-box--invalid--focused`]:g&&ae,[`${re}--list-box--up`]:"top"===u,[`${re}--combo-box--warning`]:ye.warn,[`${re}--combo-box--readonly`]:I,[`${re}--autoalign`]:U}),ve=v()(`${re}--label`,{[`${re}--label--disabled`]:l}),ge=`combobox-helper-text-${se}`,_e=`combobox-warn-text-${se}`,we=`combobox-invalid-text-${se}`,xe=v()(`${re}--form__helper-text`,{[`${re}--form__helper-text--disabled`]:l}),Ee=v()(`${re}--list-box__wrapper`,[a,{[`${re}--list-box__wrapper--fluid--invalid`]:oe&&g,[`${re}--list-box__wrapper--slug`]:V,[`${re}--list-box__wrapper--decorator`]:c}]),Oe=v()(`${re}--text-input`,{[`${re}--text-input--empty`]:!Y,[`${re}--combo-box--input--focus`]:ae}),Se=V??c,Ae=Tn(Se,Pn),Ce=Ae?(0,b.cloneElement)(Se,{size:"mini"}):Se,{getInputProps:Pe,getItemProps:Te,getLabelProps:Ie,getMenuProps:Ne,getToggleButtonProps:je,isOpen:ke,highlightedIndex:Re,selectedItem:$e,closeMenu:Me,openMenu:De,reset:Le,selectItem:Be,setHighlightedIndex:Ve,setInputValue:Fe,toggleMenu:ze}=Zr({items:fe(w,E,Y),inputValue:Y,itemToString:e=>E(e),onInputValueChange({inputValue:e}){const t=e||"";Z(t),Ve(he(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:m,inputId:y,stateReducer:be,isItemDisabled:(e,t)=>e?.disabled,...p,onStateChange:({type:e,selectedItem:t})=>{p?.onStateChange?.({type:e,selectedItem:t}),J.current||e!==ei&&e!==ti&&e!==qo||void 0===t||so()(N,t)||(w.some(e=>so()(e,t))&&(ee.current=""),A({selectedItem:t}))}}),Ue=void 0!==N?N:$e;(0,b.useEffect)(()=>{f&&(f.current={closeMenu:Me,openMenu:De,reset:Le,selectItem:Be,setHighlightedIndex:Ve,setInputValue:Fe,toggleMenu:ze})},[Me,De,Le,Be,Ve,Fe,ze]);const Ke=je({disabled:l||I,onClick:(e=>t=>{if(P&&P(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()}}),He=e=>{ce("focus"===e.type),r.current?.value||"blur"!==e.type||Be(null)},qe=I?{onKeyDown:e=>{"Tab"!==e.key&&e.preventDefault()},onClick:e=>{e.preventDefault(),e.currentTarget.focus()}}:{},Ge=ye.invalid&&_&&we||ye.warn&&L&&_e||h&&!oe&&ge||void 0,Ye=(0,b.useMemo)(()=>Ne({ref:U?K.setFloating:null}),[U,i,o,Ne,K.setFloating]);return(0,b.useEffect)(()=>{if(ie.current&&r.current&&X){const e=Y.length,t=e+X.length;r.current.value=Y+X,r.current.setSelectionRange(e,t)}},[Y,X]),b.createElement("div",{className:Ee},R&&b.createElement(Xt,d({as:"label",className:ve},Ie()),R),b.createElement(To,{onFocus:He,onBlur:He,className:me,disabled:l,invalid:ye.invalid,invalidText:_,invalidTextId:we,isOpen:ke,light:S,size:k,warn:ye.warn,ref:U?K.setReference:null,warnText:L,warnTextId:_e},b.createElement("div",{className:`${re}--list-box__field`},b.createElement("input",d({disabled:l,className:Oe,type:"text",tabIndex:0,"aria-haspopup":"listbox",title:ie?.current?.value},Pe({"aria-label":R?void 0:i||o,"aria-controls":Ye.id,placeholder:T,value:Y,...F,onChange:e=>{const t=e.target.value,n=B&&ee.current&&Y===ee.current&&""===t;Z(t),Fe(t),n&&(ne(!0),A({selectedItem:null,inputValue:""}),Be(null),ee.current="")},ref:Uo(ie,t,r),onKeyDown:e=>{if(It(e,Et)&&e.stopPropagation(),!It(e,wt)||Y&&!B||(ze(),-1!==Re&&Be(fe(w,E,Y)[Re]),B&&ke&&Y&&-1===Re&&(ee.current=Y,A({selectedItem:null,inputValue:Y})),e.preventDownshiftDefault=!0,e?.persist?.()),It(e,xt)&&Y&&e.target===ie.current&&ke&&(ze(),e.preventDownshiftDefault=!0,e?.persist?.()),It(e,St)&&"Numpad7"!==e.code&&e.target.setSelectionRange(0,0),It(e,Ot)&&"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()),Y||-1!=Re||"Enter"!=e.key||(ke||ze(),Be(null),e.preventDownshiftDefault=!0,"false"===e.currentTarget.ariaExpanded&&De()),M&&"Tab"===e.key){const e=w.find(e=>E(e).toLowerCase().startsWith(Y.toLowerCase()));if(e){const t=E(e);Fe(t),Be(e)}}}}),z,qe,{readOnly:I,"aria-describedby":Ge})),ye.invalid&&b.createElement(pn,{className:`${re}--list-box__invalid-icon`}),ye.warn&&b.createElement(dn,{className:`${re}--list-box__invalid-icon ${re}--list-box__invalid-icon--warning`}),Y&&b.createElement(Mo,{clearSelection:()=>{ne(!0),Z(""),A({selectedItem:null}),Be(null),ee.current="",de()},translateWithId:$,disabled:l||I,onClearSelection:de,selectionCount:0}),b.createElement(zo,d({},Ke,{isOpen:ke,translateWithId:$}))),V?Ce:c?b.createElement("div",{className:`${re}--list-box__inner-wrapper--decorator`},Ae?Ce:b.createElement("span",null,Ce)):"",b.createElement(To.Menu,Ye,ke?fe(w,E,Y).map((e,t)=>{const n=null!==e&&"object"==typeof e&&"text"in e&&x?e.text?.toString():E(e),r=Te({item:e,index:t}),o=r["aria-disabled"],{"aria-disabled":i,"aria-selected":s,...a}=r,c=so()(Ue,e);return b.createElement(To.MenuItem,d({key:r.id,isActive:c,isHighlighted:Re===t,title:n,disabled:o},a,{"aria-selected":c}),x?x(e):E(e),c&&b.createElement(Jr,{className:`${re}--list-box__menu-item__selected-icon`}))}):null)),h&&!ye.invalid&&!ye.warn&&!oe&&b.createElement(Xt,{as:"div",id:ge,className:xe},h))});ii.displayName="ComboBox",ii.propTypes={allowCustomValue:h().bool,"aria-label":h().string,ariaLabel:ht(h().string),autoAlign:h().bool,className:h().string,decorator:h().node,direction:h().oneOf(["top","bottom"]),disabled:h().bool,downshiftProps:h().object,downshiftActions:h().exact({current:h().any}),helperText:h().node,id:h().string.isRequired,initialSelectedItem:h().oneOfType([h().object,h().string,h().number]),invalid:h().bool,invalidText:h().node,itemToElement:h().func,itemToString:h().func,items:h().array.isRequired,light:ht(h().bool),onChange:h().func.isRequired,onInputChange:h().func,onToggleClick:h().func,placeholder:h().string,readOnly:h().bool,selectedItem:h().oneOfType([h().object,h().string,h().number]),shouldFilterItem:h().func,size:co,slug:ht(h().node),titleText:h().node,translateWithId:h().func,typeahead:h().bool,warn:h().bool,warnText:h().node,inputProps:h().object};const si=b.createContext(1),ai=["one","two","three"],ci=[0,1,2],ui=ci[0],li=ci[ci.length-1],fi=b.forwardRef((e,t)=>{const{as:n,className:r,children:o,level:i,withBackground:s=!1,...a}=e,c=b.useContext(si),u=i??c,l=O(),f=v()(`${l}--layer-${ai[u]}`,{[`${l}--layer__with-background`]:s},r),p=((e,t,n)=>Math.min(n,Math.max(t,e)))(u+1,ui,li),h=n||"div";return b.createElement(si.Provider,{value:p},b.createElement(h,d({ref:t},a,{className:f}),o))});fi.displayName="Layer",fi.propTypes={as:h().oneOfType([h().func,h().string,h().elementType]),children:h().node,className:h().string,level:h().oneOf([0,1,2]),withBackground:h().bool};const di=b.forwardRef(function({buttonOnClick:e,children:t,className:n,closeClassName:r,closeIconClassName:o,closeModal:i,iconDescription:s="Close",label:a,labelClassName:c,title:u,titleClassName:l,...f},p){const h=O(),y=v()(`${h}--modal-header`,n),m=v()(`${h}--modal-header__label ${h}--type-delta`,c),g=v()(`${h}--modal-header__heading ${h}--type-beta`,l),_=v()(`${h}--modal-close`,r),w=v()(`${h}--modal-close__icon`,o);return b.createElement("div",d({className:y},f,{ref:p}),a&&b.createElement("h2",{className:m},a),u&&b.createElement("h2",{className:g},u),t,b.createElement("div",{className:`${h}--modal-close-button`},b.createElement(qt,{className:_,label:s,onClick:function(t){i?.(t),e?.(t)},"aria-label":s,align:"left"},b.createElement(oo,{size:20,"aria-hidden":"true",tabIndex:"-1",className:w}))))});di.propTypes={buttonOnClick:h().func,children:h().node,className:h().string,closeClassName:h().string,closeIconClassName:h().string,closeModal:h().func,iconDescription:h().string,label:h().string,labelClassName:h().string,title:h().node,titleClassName:h().string};const pi=e=>({ghost:1,"danger--ghost":2,tertiary:3,danger:5,primary:6}[e]??4),hi=e=>b.isValidElement(e)&&e.props&&"object"==typeof e.props?e.props.kind??"primary":"primary",bi=(0,b.forwardRef)((e,t)=>{const{children:n,className:r,fluid:o,stacked:i,...s}=e,a=O(),c=(0,b.useRef)(null),[u,l]=(0,b.useState)(!1),[f,p]=(0,b.useState)(b.Children.toArray(n));w(()=>{const e=()=>{let e=i||!1;if(c&&c.current){const t=window.getComputedStyle(c.current);e="column"===t?.getPropertyValue?.("--flex-direction")}return e};if(l(e()),!c.current)return;const t=new ResizeObserver(()=>{l(e())});return t.observe(c.current),()=>t.disconnect()},[o,i]),(0,b.useEffect)(()=>{const e=b.Children.toArray(n);e.sort((e,t)=>(pi(hi(e))-pi(hi(t)))*(u?-1:1)),p(e)},[n,u]);const h=v()(r,`${a}--btn-set`,{[`${a}--btn-set--stacked`]:u,[`${a}--btn-set--fluid`]:o});return b.createElement("div",d({},s,{className:h,ref:t}),o?b.createElement("div",{ref:c,className:v()(`${a}--btn-set__fluid-inner`,{[`${a}--btn-set__fluid-inner--auto-stack`]:!0})},f):n)});bi.displayName="ButtonSet",bi.propTypes={children:h().node,className:h().string,fluid:h().bool,stacked:h().bool};var yi=n(771);function mi({active:e=!0,className:t,withOverlay:n=!0,small:r=!1,description:o="loading",...i}){const s=O(),a=v()(t,{[`${s}--loading`]:!0,[`${s}--loading--small`]:r,[`${s}--loading--stop`]:!e}),c=v()({[`${s}--loading-overlay`]:!0,[`${s}--loading-overlay--stop`]:!e}),u=b.createElement("div",d({},i,{"aria-atomic":"true","aria-live":e?"assertive":"off",className:a}),b.createElement("svg",{className:`${s}--loading__svg`,viewBox:"0 0 100 100",role:"img","aria-label":o},b.createElement("title",null,o),r?b.createElement("circle",{className:`${s}--loading__background`,cx:"50%",cy:"50%",r:"42"}):null,b.createElement("circle",{className:`${s}--loading__stroke`,cx:"50%",cy:"50%",r:r?"42":"44"})));return n?b.createElement("div",{className:c},u):u}mi.propTypes={active:h().bool,className:h().string,description:h().string,id:ht(h().string),small:h().bool,withOverlay:h().bool};const vi=({className:e,status:t="active",iconDescription:n,description:r,onSuccess:o,successDelay:i=1500,...s})=>{const a=O(),c=v()(`${a}--inline-loading`,e),u=(0,b.useRef)(null);(0,b.useEffect)(()=>("finished"===t&&(u.current=setTimeout(()=>{o&&o()},i)),()=>{u.current&&(clearTimeout(u.current),u.current=null)}),[t,o,i]);const l=r&&b.createElement("div",{className:`${a}--inline-loading__text`},r),f=(()=>{let e=n||t;if("error"===t)return b.createElement(yi.x,{className:`${a}--inline-loading--error`},b.createElement("title",null,e));if("finished"===t)return b.createElement(eo,{className:`${a}--inline-loading__checkmark-container`},b.createElement("title",null,e));if("inactive"===t||"active"===t){if("inactive"===t)return;return n||(e="loading"),b.createElement(mi,{small:!0,description:e,withOverlay:!1,active:"active"===t})}})(),p=f&&b.createElement("div",{className:`${a}--inline-loading__animation`},f);return b.createElement("div",d({className:c},s,{"aria-live":s["aria-live"]??("inactive"===t?"off":"assertive")}),p,l)};function gi({secondaryButtons:e,secondaryButtonText:t,secondaryClassName:n,closeModal:r,onRequestClose:o,disabled:i}){function s(e){r(e),o(e)}return Array.isArray(e)&&e.length<=2?b.createElement(b.Fragment,null,e.map(({buttonText:e,onClick:t},r)=>b.createElement(Yt,{key:`${e}-${r}`,className:n,kind:"secondary",onClick:t||s},e))):t?b.createElement(Yt,{disabled:i,className:n,onClick:s,kind:"secondary"},t):null}vi.propTypes={className:h().string,description:h().node,iconDescription:h().string,onSuccess:h().func,status:h().oneOf(["inactive","active","finished","error"]),successDelay:h().number},gi.propTypes={closeModal:h().func,disabled:h().bool,onRequestClose:h().func,secondaryButtonText:h().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:h().node,onClick:h().func};e[t].forEach(e=>{h().checkPropTypes(r,e,t,n)})}return null},secondaryClassName:h().string};const _i=b.forwardRef(function({children:e,className:t,closeModal:n=hn,danger:r,inputref:o,onRequestClose:i=hn,onRequestSubmit:s=hn,primaryButtonDisabled:a,primaryButtonText:c,primaryClassName:u,secondaryButtonText:l,secondaryButtons:f,secondaryClassName:p,loadingStatus:h="inactive",loadingDescription:y,loadingIconDescription:m,onLoadingSuccess:g=hn,..._},w){const x=O(),E=v()(`${x}--modal-footer`,t,Array.isArray(f)&&2===f.length?`${x}--modal-footer--three-button`:null),S=v()(u,"inactive"!==h?`${x}--btn--loading`:null),A="inactive"!==h,C={closeModal:n,secondaryButtons:f,secondaryButtonText:l,secondaryClassName:p,onRequestClose:i,disabled:A};return b.createElement(bi,d({className:E},_,{ref:w,"aria-busy":A}),b.createElement(gi,C),c&&b.createElement(Yt,{onClick:s,className:S,disabled:A||a,kind:r?"danger":"primary",ref:o},"inactive"===h?c:b.createElement(vi,{status:h,description:y,iconDescription:m,className:`${x}--inline-loading--btn`,onSuccess:g})),e)});_i.propTypes={children:h().node,className:h().string,closeModal:h().func,danger:h().bool,inputref:h().oneOfType([h().func,h().shape({current:h().any})]),loadingDescription:h().string,loadingIconDescription:h().string,loadingStatus:h().oneOf(["inactive","active","finished","error"]),onLoadingSuccess:h().func,onRequestClose:h().func,onRequestSubmit:h().func,primaryButtonDisabled:h().bool,primaryButtonText:h().string,primaryClassName:h().string,secondaryButtonText:h().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:h().node,onClick:h().func};e[t].forEach(e=>{h().checkPropTypes(r,e,t,n)})}return null},secondaryClassName:h().string};const wi=(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(","),Ei="undefined"==typeof Element,Oi=Ei?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Si=!Ei&&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},Ai=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]"):Ai(e.parentNode))},Ci=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Ai(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,c=Ci(a,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{Oi.call(i,xi)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),l=!Ai(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(u&&l){var f=Ci(!0===u?i.children:u.children,!0,n);n.flatten?r.push.apply(r,f):r.push({scopeParent:i,candidates:f})}else o.unshift.apply(o,i.children)}}return r},Pi=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Ti=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))&&!Pi(e)?0:e.tabIndex},Ii=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ni=function(e){return"INPUT"===e.tagName},ji=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 Ni(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=Oi.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Oi.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ji(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=Si(e);if(s&&!s.shadowRoot&&!0===r(s))return ji(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,r,o,i=e&&Si(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var c,u,l;a=!(null===(u=s=null===(c=i=Si(s))||void 0===c?void 0:c.host)||void 0===u||null===(l=u.ownerDocument)||void 0===l||!l.contains(s))}return a}(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!!Oi.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Ri=function(e,t){return!(function(e){return function(e){return Ni(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Si(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)||Ti(t)<0||!ki(e,t))},$i=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,s=function(e,t){var n=Ti(e);return n<0&&t&&!Pi(e)?0:n}(i,o),a=o?Mi(e.candidates):i;0===s?o?t.push.apply(t,a):t.push(i):n.push({documentOrder:r,tabIndex:s,item:e,isScope:o,content:a})}),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",Li="undefined"!=typeof Node?Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS:0,Bi="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:s="cds"})=>{if(e&&r&&o&&!e.contains(r)&&!Vi(r,i,s)){const i=o.compareDocumentPosition(r);if(r===t||i&Li){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&Bi){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=(s=e,c=(a=a||{}).getShadowRoot?Ci([s],a.includeContainer,{filter:Ri.bind(null,a),flatten:!1,getShadowRoot:a.getShadowRoot,shadowRootFilter:$i}):function(e,t,n){if(Ai(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(xi));return t&&Oi.call(e,xi)&&r.unshift(e),r.filter(n)}(s,a.includeContainer,Ri.bind(null,a)),Mi(c)),o=r[0],i=r[r.length-1];var s,a,c;t!==i||n.shiftKey||(n.preventDefault(),o.focus()),t===o&&n.shiftKey&&(n.preventDefault(),i.focus())},Ui=e=>(t,...n)=>{for(const r of e){if(t.defaultPrevented)break;"function"==typeof r&&r(t,...n)}};function Ki(e,t=0,n={}){"object"!=typeof n&&(n={});const{signal:r,leading:o=!1,trailing:i=!0,maxWait:s}=n,a=Array(2);let c;o&&(a[0]="leading"),i&&(a[1]="trailing");let u=null;const l=function(e,t,{signal:n,edges:r}={}){let o,i=null;const s=null!=r&&r.includes("leading"),a=null==r||r.includes("trailing"),c=()=>{null!==i&&(e.apply(o,i),o=void 0,i=null)};let u=null;const l=()=>{null!=u&&clearTimeout(u),u=setTimeout(()=>{u=null,a&&c(),d()},t)},f=()=>{null!==u&&(clearTimeout(u),u=null)},d=()=>{f(),o=void 0,i=null},p=function(...e){if(n?.aborted)return;o=this,i=e;const t=null==u;l(),s&&t&&c()};return p.schedule=l,p.cancel=d,p.flush=()=>{f(),c()},n?.addEventListener("abort",d,{once:!0}),p}(function(...t){c=e.apply(this,t),u=null},t,{signal:r,edges:a}),f=function(...t){if(null!=s)if(null===u)u=Date.now();else if(Date.now()-u>=s)return c=e.apply(this,t),u=Date.now(),l.cancel(),l.schedule(),c;return l.apply(this,t),c};return f.cancel=l.cancel,f.flush=()=>(l.flush(),c),f}const Wi=(0,b.createContext)({}),Hi=b.forwardRef(({children:e,className:t,focusAfterCloseRef:n,modal:r,onCancel:o=hn,onClick:i=hn,onClose:s=hn,onRequestClose:a=hn,open:c=!1,role:u,ariaLabel:l,ariaLabelledBy:f,ariaDescribedBy:p,...h},y)=>{const m=O(),g=Dt(),_=`${m}--dialog-header__heading--${g}`,w=`${m}--dialog-header__label--${g}`,x=(0,b.useRef)(null),E=y??x;(0,b.useEffect)(()=>{E.current&&(c?r?E.current.showModal():E.current.show():E.current.close())},[r,c]),(0,b.useEffect)(()=>{if(!c&&n){const e=setTimeout(()=>{n.current?.focus()});return()=>{clearTimeout(e)}}},[c,n]);const S=v()(`${m}--dialog-container`),A={dialogId:g,titleId:_,subtitleId:w,isOpen:c};return(0,b.useEffect)(()=>{if(E.current&&c&&!l&&!f){const e=E.current.querySelector(`.${m}--dialog-header__heading`);e&&e.id&&E.current.setAttribute("aria-labelledby",e.id)}},[c,l,f,m]),b.createElement(Wi.Provider,{value:A},b.createElement("dialog",d({},h,{className:v()(`${m}--dialog`,{[`${m}--dialog--modal`]:r},t),ref:E,onCancel:o,onClick:function(e){!function(e){c&&r&&e.target===E.current&&a(e)}(e),i(e)},onClose:s,role:u,"aria-label":l,"aria-labelledby":l?void 0:f||_,"aria-describedby":p}),b.createElement("div",{className:S},e)))});Hi.displayName="Dialog",Hi.propTypes={children:h().node,className:h().string,focusAfterCloseRef:h().oneOfType([h().func,h().shape({current:h().any})]),modal:h().bool,onRequestClose:h().func,open:h().bool,role:h().oneOf(["dialog","alertdialog"]),"aria-label":h().string,"aria-labelledby":h().string,ariaDescribedBy:h().string};const qi=b.forwardRef(({children:e,...t},n)=>{const r=O();return b.createElement("div",d({className:`${r}--dialog__header`,ref:n},t),e)});qi.displayName="DialogHeader",qi.propTypes={children:h().node};const Gi=b.forwardRef(({children:e,...t},n)=>{const r=O();return b.createElement("div",d({className:`${r}--dialog__header-controls`,ref:n},t),e)});Gi.displayName="DialogControls",Gi.propTypes={children:h().node};const Yi=b.forwardRef(({onClick:e,...t},n)=>{const r=O();return b.createElement(qt,d({kind:"ghost",className:`${r}--dialog__close`,label:"Close",title:"Close","aria-label":"Close",align:"left",onClick:e,ref:n},t),b.createElement(oo,{size:20,"aria-hidden":"true",tabIndex:-1,className:`${r}--icon__close`}))});Yi.displayName="DialogCloseButton",Yi.propTypes={onClick:h().func};const Zi=b.forwardRef(({children:e,className:t,id:n,...r},o)=>{const i=O(),{titleId:s}=(0,b.useContext)(Wi),a=n||s;return b.createElement(Xt,d({as:"h2",id:a,className:v()(`${i}--dialog-header__heading`,t),ref:o},r),e)});Zi.displayName="DialogTitle",Zi.propTypes={children:h().node,className:h().string,id:h().string};const Xi=b.forwardRef(({children:e,className:t,id:n,...r},o)=>{const i=O(),{subtitleId:s}=(0,b.useContext)(Wi),a=n||s;return b.createElement(Xt,d({as:"h2",id:a,className:v()(`${i}--dialog-header__label`,t),ref:o},r),e)});Xi.displayName="DialogSubtitle",Xi.propTypes={children:h().node,className:h().string,id:h().string};const Qi=b.forwardRef(({children:e,className:t,hasScrollingContent:n,...r},o)=>{const i=O(),s=(0,b.useRef)(null),[a,c]=(0,b.useState)(!1),u=`${i}--dialog-body--${Dt()}`;w(()=>{s.current&&c(s.current.scrollHeight>s.current.clientHeight);const e=Ki(function(){s.current&&c(s.current.scrollHeight>s.current.clientHeight)},200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[]);const l=v()(`${i}--dialog-content`,{[`${i}--dialog-scroll-content`]:n||a},t),f=n||a?{tabIndex:0,role:"region"}:{};return b.createElement(fi,d({ref:e=>{"function"==typeof o?o(e):o&&(o.current=e),s.current=e},id:u,className:l},f,r),e)});Qi.displayName="DialogBody",Qi.propTypes={children:h().node,className:h().string,hasScrollingContent:h().bool};const Ji=b.forwardRef(({children:e,className:t,onRequestClose:n=hn,onSecondarySubmit:r,onRequestSubmit:o=hn,primaryButtonText:i="Save",primaryButtonDisabled:s=!1,secondaryButtonText:a="Cancel",secondaryButtons:c,loadingStatus:u="inactive",loadingDescription:l,loadingIconDescription:f,onLoadingSuccess:p=hn,danger:h=!1,...y},m)=>{const g=O(),_=(0,b.useRef)(null),{isOpen:w}=(0,b.useContext)(Wi),[x,E]=(0,b.useState)(null);(0,b.useEffect)(()=>{if(h&&x){const e=requestAnimationFrame(()=>{x.focus()});return()=>cancelAnimationFrame(e)}},[h,x,w]);const S=v()(`${g}--dialog-footer`,t,{[`${g}--dialog-footer--three-button`]:Array.isArray(c)&&2===c.length}),A="inactive"!==u,C=v()({[`${g}--btn--loading`]:"inactive"!==u}),P=r||n;return e?b.createElement(bi,d({className:S,ref:m},y),e):b.createElement(bi,d({className:S,"aria-busy":A,ref:m},y),Array.isArray(c)&&c.length<=2?c.map(({buttonText:e,onClick:t},n)=>b.createElement(Yt,{key:`${e}-${n}`,autoFocus:h,kind:"secondary",ref:0===n&&h?E:void 0,onClick:t},e)):a&&b.createElement(Yt,{ref:h?E:void 0,disabled:A,kind:"secondary",autoFocus:h,onClick:P},a),b.createElement(Yt,{className:C,kind:h?"danger":"primary",disabled:A||s,onClick:o,ref:_},"inactive"===u?i:b.createElement(vi,{status:u,description:l,iconDescription:f,className:`${g}--inline-loading--btn`,onSuccess:p})))});Ji.displayName="DialogFooter",Ji.propTypes={children:h().node,className:h().string,onRequestClose:h().func,onSecondarySubmit:h().func,onRequestSubmit:h().func,primaryButtonText:h().node,primaryButtonDisabled:h().bool,secondaryButtonText:h().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:h().node,onClick:h().func};e[t].forEach(e=>{h().checkPropTypes(r,e,t,n)})}return null},danger:h().bool,loadingStatus:h().oneOf(["inactive","active","finished","error"]),loadingDescription:h().string,loadingIconDescription:h().string,onLoadingSuccess:h().func};const es=e=>{const[t,n]=(0,b.useState)(!!e),[r,o]=(0,b.useState)(!!e);return(0,b.useEffect)(()=>{e!==r&&(n(!!e),o(!!e))},[e,r]),(0,b.useMemo)(()=>[t,n],[t])},ts=({open:e,_presenceId:t,_autoEnablePresence:n=!0,children:r})=>{const o=es(e),[i]=o,[s,a]=((e,t)=>{const n=(0,b.useRef)(t),r=(0,b.useRef)(null),o=(0,b.useRef)(null);t||!o.current||r.current||(n.current=null),o.current=r.current;const{isPresent:i,isExiting:s}=((e,t)=>{const n=O(),[r,o]=(0,b.useState)(t?"idle":"finished"),i="active"===r;return w(()=>{o(e=>t||"idle"!==e?t&&"idle"!==e?"idle":e:"active")},[t]),w(()=>{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),a=(0,b.useCallback)(e=>!(!e||n.current&&n.current!==e||(n.current=e,0)),[]);return[i,(0,b.useMemo)(()=>({presenceRef:r,isPresenceExclusive:a,isExiting:s}),[r,a,s])]})(i,t),c=(0,b.useMemo)(()=>({modalState:o,autoEnablePresence:n,...a}),[o,n,a]);return s?b.createElement(ns,{value:c},r):null},ns=(0,b.createContext)(void 0),rs=b.forwardRef(function({className:e,children:t,hasForm:n,hasScrollingContent:r,...o},i){const s=O(),a=(0,b.useRef)(null),{height:c}=(({ref:e,onResize:t})=>{const[n,r]=(0,b.useState)(-1),[o,i]=(0,b.useState)(-1),s=(0,b.useRef)(null),a=(0,b.useRef)(t);return(0,b.useEffect)(()=>{a.current=t},[t]),(0,b.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]),w(()=>{if(!e?.current)return;const t=new ResizeObserver(t=>{s.current=t,window.requestAnimationFrame(()=>{(()=>{if(!e?.current||!Array.isArray(s?.current))return;const t=s.current[0];r(t.contentRect.width),i(t.contentRect.height),a.current?.(t.contentRect)})()})});return t.observe(e.current),()=>{t.disconnect()}},[]),{width:n,height:o}})({ref:a}),u=!!a.current&&a?.current?.scrollHeight>a?.current?.clientHeight,l=v()({[`${s}--modal-content`]:!0,[`${s}--modal-content--with-form`]:n,[`${s}--modal-scroll-content`]:r||u,[`${s}--modal-scroll-content--no-fade`]:c<=300},e),f=r||u?{tabIndex:0,role:"region"}:{};return b.createElement(fi,d({className:l},f,o,{ref:Uo(a,i)}),t)});var os;rs.propTypes={"aria-label":(os=h().string,(e,t,n,...r)=>os(e,t,n,...r)),children:h().node,className:h().string,hasForm:h().bool,hasScrollingContent:h().bool};const is=b.forwardRef(function({open:e,...t},n){const r=Dt(),o=yt("enable-presence"),i=Boolean((0,b.useContext)(ns)),s=o||i,a=(e=>{const t=(0,b.useContext)(ns);return t?.isPresenceExclusive(e)?t:void 0})(r);return s&&!a?b.createElement(ts,{open:e??!1,_presenceId:r,_autoEnablePresence:i},b.createElement(ss,d({open:!0,ref:n},t))):b.createElement(ss,d({ref:n,open:e},t))}),ss=b.forwardRef(function({"aria-labelledby":e,"aria-label":t,children:n,className:r,containerClassName:o,danger:i,decorator:s,isFullWidth:a,onClose:c,onKeyDown:u,open:l,preventCloseOnClickOutside:f,selectorPrimaryFocus:p="[data-modal-primary-focus]",selectorsFloatingMenus:h,size:y,launcherButtonRef:m,slug:g,..._},w){const x=O(),E=(0,b.useRef)(null),S=(0,b.useRef)(null),A=(0,b.useRef)(null),C=(0,b.useRef)(null),P=(0,b.useRef)(null),T=(0,b.useContext)(ns),I=function(e){const t=b.useRef(void 0),n=b.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 b.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}([w,T?.presenceRef]),N=yt("enable-presence")||T?.autoEnablePresence,j=l||N,k=es(j),[R,$]=T?.modalState??k,M=yt("enable-dialog-element"),D=yt("enable-experimental-focus-wrap-without-sentinels"),L=yt("enable-focus-wrap-without-sentinels"),B=D||L;function V(e){c&&!1===c(e)||$(!1)}(0,b.useEffect)(()=>{M||wi(document.body,`${x}--body--with-modal-open`,!!j)},[j,x]),(0,b.useEffect)(()=>{if(!M)return()=>{wi(document.body,`${x}--body--with-modal-open`,!1)}},[]);const F=v()(`${x}--modal`,{"is-visible":N||R,[`${x}--modal--enable-presence`]:T?.autoEnablePresence,[`${x}--modal--danger`]:i,[`${x}--modal--slug`]:g,[`${x}--modal--decorator`]:s},r),z=v()(`${x}--modal-container`,y&&`${x}--modal-container--${y}`,a&&`${x}--modal-container--full-width`,o);let U;const K=b.Children.toArray(n).map(e=>Tn(e,di)?(U=e.props.label,(0,b.cloneElement)(e,{closeModal:V})):Tn(e,_i)?(0,b.cloneElement)(e,{closeModal:V,inputref:S,danger:i}):e),W=!b.Children.toArray(K).some(e=>Tn(e,_i));(0,b.useEffect)(()=>{if(!j)return;const e=e=>{It(e,xt)&&(e.preventDefault(),e.stopPropagation(),V(e))};return document.addEventListener("keydown",e,!0),()=>{document.removeEventListener("keydown",e,!0)}},[j]),(0,b.useEffect)(()=>{M||N||j||!m||setTimeout(()=>{m.current?.focus()})},[M,N,j,m]),(0,b.useEffect)(()=>{const e=m?.current;return()=>{N&&e&&setTimeout(()=>{e.focus()})}},[N,m]),(0,b.useEffect)(()=>{if(!M){const e=e=>{const t=e||E.current;return(t?t.querySelector(i?`.${x}--btn--secondary`:p):null)||S&&S.current};j&&R&&(t=>{const n=e(t),r=t.querySelector(`.${x}--modal-close`);n?n.focus():!n&&r&&r?.focus()})(E.current)}},[j,p,R]);const H=g??s,q=Tn(H,Pn)?(0,b.cloneElement)(H,{size:"sm"}):H,G=M?b.createElement(Hi,{open:j,focusAfterCloseRef:m,modal:!0,className:z,"aria-label":t||U,"aria-labelledby":e,"data-exiting":T?.isExiting||void 0},b.createElement("div",{ref:E,className:`${x}--modal-container-body`},g?q:s?b.createElement("div",{className:`${x}--modal--inner__decorator`},q):"",K)):b.createElement("div",{className:z,role:"dialog","aria-modal":"true","aria-label":t||U,"aria-labelledby":e},!B&&b.createElement("button",{type:"button",ref:A,className:`${x}--visually-hidden`},"Focus sentinel"),b.createElement("div",{ref:E,className:`${x}--modal-container-body`},g?q:s?b.createElement("div",{className:`${x}--modal--inner__decorator`},q):"",K),!B&&b.createElement("button",{type:"button",ref:C,className:`${x}--visually-hidden`},"Focus sentinel"));return b.createElement(fi,d({},_,{level:0,role:"presentation",ref:I,"aria-hidden":!j,onBlur:function({target:e,relatedTarget:t}){if(!M&&!B&&j&&t&&e&&E.current){const{current:n}=E,{current:r}=A,{current:o}=C;Fi({bodyNode:n,startTrapNode:r,endTrapNode:o,currentActiveNode:t,oldActiveNode:e,selectorsFloatingMenus:h?.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:Ui([_?.onClick,function(e){const{target:t}=e,n=P.current;(W&&!f||!W&&!1===f)&&t instanceof Node&&!Vi(t,h,x)&&E.current&&!E.current.contains(t)&&!E.current.contains(n)&&V(e)}]),onMouseDown:Ui([_?.onMouseDown,function(e){const t=e.target;P.current=t}]),onKeyDown:function(e){M||B&&j&&It(e,_t)&&E.current&&zi({containerNode:E.current,currentActiveNode:e.target,event:e}),u?.(e)},className:F,"data-exiting":T?.isExiting||void 0}),G)});function as({className:e,children:t,id:n,...r}){const o=O(),i=v()(`${o}--label`,`${o}--label--no-margin`,e);return b.createElement(Xt,d({as:"label",htmlFor:n,className:i},r),t)}var cs,us,ls,fs;is.propTypes={"aria-label":h().string,"aria-labelledby":h().string,children:h().node,className:h().string,containerClassName:h().string,danger:h().bool,decorator:h().node,isFullWidth:h().bool,launcherButtonRef:h().oneOfType([h().func,h().shape({current:h().any})]),onClose:h().func,onKeyDown:h().func,open:h().bool,preventCloseOnClickOutside:h().bool,selectorPrimaryFocus:h().string,selectorsFloatingMenus:h().arrayOf(h().string.isRequired),size:h().oneOf(["xs","sm","md","lg"]),slug:ht(h().node)},as.propTypes={children:h().node,className:h().string,id:h().string};const ds=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},cs||(cs=b.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"})),us||(us=b.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)}),ps=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},ls||(ls=b.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"})),fs||(fs=b.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 hs({children:e,className:t,onClick:n,inline:r,...o}){const i=O(),s=v()(t,{[`${i}--actionable-notification__action-button`]:!0});return b.createElement(Yt,d({className:s,kind:r?"ghost":"tertiary",onClick:n,size:"sm"},o),e)}function bs({"aria-label":e="close notification",ariaLabel:t,className:n,type:r="button",renderIcon:o=oo,name:i,notificationType:s="toast",...a}){const c=O(),u=v()(n,{[`${c}--${s}-notification__close-button`]:s}),l=v()({[`${c}--${s}-notification__close-icon`]:s});return b.createElement("button",d({},a,{type:r,"aria-label":t||e,title:t||e,className:u}),o&&b.createElement(o,{className:l,name:i}))}hs.propTypes={children:h().node,className:h().string,inline:h().bool,onClick:h().func},bs.propTypes={"aria-label":h().string,ariaLabel:ht(h().string),className:h().string,name:h().string,notificationType:h().oneOf(["toast","inline","actionable"]),renderIcon:h().oneOfType([h().func,h().object]),type:h().string};const ys={error:yi.x,success:eo,warning:pn,"warning-alt":dn,info:ds,"info-square":ps};function ms({iconDescription:e,kind:t,notificationType:n}){const r=O(),o=ys[t];return o?b.createElement(o,{className:`${r}--${n}-notification__icon`,size:20},b.createElement("title",null,e)):null}function vs({"aria-label":e,children:t,title:n,subtitle:r,role:o="status",onClose:i,onCloseButtonClick:s=hn,statusIconDescription:a,className:c,kind:u="error",lowContrast:l,hideCloseButton:f=!1,...p}){const[h,y]=(0,b.useState)(!0),m=O(),g=v()(c,{[`${m}--inline-notification`]:!0,[`${m}--inline-notification--low-contrast`]:l,[`${m}--inline-notification--${u}`]:u,[`${m}--inline-notification--hide-close-button`]:f}),_=(0,b.useRef)(null);Lt(_);const w=(0,b.useRef)(null);return h?b.createElement("div",d({ref:w},p,{role:o,className:g}),b.createElement("div",{className:`${m}--inline-notification__details`},b.createElement(ms,{notificationType:"inline",kind:u,iconDescription:a||`${u} icon`}),b.createElement("div",{ref:_,className:`${m}--inline-notification__text-wrapper`},n&&b.createElement(Xt,{as:"div",className:`${m}--inline-notification__title`},n),r&&b.createElement(Xt,{as:"div",className:`${m}--inline-notification__subtitle`},r),t)),!f&&b.createElement(bs,{notificationType:"inline",onClick:function(e){s(e),i&&!1===i(e)||y(!1)},"aria-label":e})):null}function gs({actionButtonLabel:e,"aria-label":t,ariaLabel:n,caption:r,children:o,role:i="alertdialog",onActionButtonClick:s,onClose:a,onCloseButtonClick:c=hn,statusIconDescription:u,className:l,inline:f=!1,kind:p="error",lowContrast:h,hideCloseButton:y=!1,hasFocus:m=!0,closeOnEscape:g=!0,title:_,subtitle:x,...E}){const[S,A]=(0,b.useState)(!0),C=O(),P=Dt("actionable-notification"),T=Dt("actionable-notification-subtitle"),I=v()(l,{[`${C}--actionable-notification`]:!0,[`${C}--actionable-notification--toast`]:!f,[`${C}--actionable-notification--low-contrast`]:h,[`${C}--actionable-notification--${p}`]:p,[`${C}--actionable-notification--hide-close-button`]:y}),N=(0,b.useRef)(null),j=(0,b.useRef)(null),k=(0,b.useRef)(null),R=(0,b.useRef)(null),$=yt("enable-experimental-focus-wrap-without-sentinels"),M=yt("enable-focus-wrap-without-sentinels")||$;function D(e){c(e),a&&!1===a(e)||A(!1)}return w(()=>{if(m&&"alertdialog"===i){const e=document.querySelector(`button.${C}--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);Tt(r,[xt])&&n&&o&&t(r)};w(()=>(null!==e.current&&document.addEventListener("keydown",r,!1),()=>document.removeEventListener("keydown",r,!1)))}(R,D,g),S?b.createElement("div",d({},E,{ref:R,role:i,className:I,"aria-labelledby":_?P:T,onBlur:M?()=>{}:function({target:e,relatedTarget:t}){if(S&&t&&e&&"alertdialog"===i){const{current:n}=N,{current:r}=j,{current:o}=k;Fi({bodyNode:n,startTrapNode:r,endTrapNode:o,currentActiveNode:t,oldActiveNode:e,prefix:C})}},onKeyDown:M?function(e){S&&It(e,_t)&&R.current&&"alertdialog"===i&&zi({containerNode:R.current,currentActiveNode:e.target,event:e})}:()=>{}}),!M&&b.createElement("span",{ref:j,tabIndex:0,role:"link",className:`${C}--visually-hidden`},"Focus sentinel"),b.createElement("div",{ref:N,className:`${C}--actionable-notification__focus-wrapper`},b.createElement("div",{className:`${C}--actionable-notification__details`},b.createElement(ms,{notificationType:f?"inline":"toast",kind:p,iconDescription:u||`${p} icon`}),b.createElement("div",{className:`${C}--actionable-notification__text-wrapper`},b.createElement("div",{className:`${C}--actionable-notification__content`},_&&b.createElement(Xt,{as:"div",className:`${C}--actionable-notification__title`,id:P},_),x&&b.createElement(Xt,{as:"div",className:`${C}--actionable-notification__subtitle`,id:T},x),r&&b.createElement(Xt,{as:"div",className:`${C}--actionable-notification__caption`},r),o))),b.createElement("div",{className:`${C}--actionable-notification__button-wrapper`},e&&b.createElement(hs,{onClick:s,inline:f},e),!y&&b.createElement(bs,{"aria-label":n||t,notificationType:"actionable",onClick:D}))),!M&&b.createElement("span",{ref:k,tabIndex:0,role:"link",className:`${C}--visually-hidden`},"Focus sentinel")):null}ms.propTypes={iconDescription:h().string.isRequired,kind:h().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:h().oneOf(["inline","toast"]).isRequired},h().string,ht(h().string),h().string,h().node,h().string,h().bool,h().oneOf(["error","info","info-square","success","warning","warning-alt"]),h().bool,h().func,h().func,h().oneOf(["alert","log","status"]),h().string,h().string,h().number,h().string,vs.propTypes={"aria-label":h().string,children:h().node,className:h().string,hideCloseButton:h().bool,kind:h().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:h().bool,onClose:h().func,onCloseButtonClick:h().func,role:h().oneOf(["alert","log","status"]),statusIconDescription:h().string,subtitle:h().string,title:h().string},gs.propTypes={actionButtonLabel:h().string,"aria-label":h().string,ariaLabel:ht(h().string),caption:h().string,children:h().node,className:h().string,closeOnEscape:h().bool,hasFocus:ht(h().bool),hideCloseButton:h().bool,inline:h().bool,kind:h().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:h().bool,onActionButtonClick:h().func,onClose:h().func,onCloseButtonClick:h().func,role:h().string,statusIconDescription:h().string,subtitle:h().node,title:h().string};const _s={error:"warning",success:"info"};h().string,h().node,h().string,_(h().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],e=>_s[e]),h().bool,h().func,h().string,h().node,h().string,h().string;const ws=b.forwardRef((e,t)=>{const{className:n,decorator:r,disabled:o=!1,hideLabel:i,id:s,labelPosition:a="right",labelText:c="",name:u,onChange:l=()=>{},value:f="",slug:p,required:h,invalid:y=!1,invalidText:m,warn:g=!1,warnText:_,readOnly:w,...x}=e,E=O(),S=Dt("radio-button"),A=s||S,C=Ko({id:A,readOnly:w,disabled:o,invalid:y,invalidText:m,warn:g,warnText:_}),P=v()(`${E}--radio-button__label-text`,{[`${E}--visually-hidden`]:i}),T=v()(n,`${E}--radio-button-wrapper`,{[`${E}--radio-button-wrapper--label-${a}`]:"right"!==a,[`${E}--radio-button-wrapper--slug`]:p,[`${E}--radio-button-wrapper--decorator`]:r,[`${E}--radio-button-wrapper--invalid`]:C.invalid,[`${E}--radio-button-wrapper--warning`]:C.warn}),I=(0,b.useRef)(null),N=p??r,j=Tn(N,Pn)?(0,b.cloneElement)(N,{size:"inline"===N.props?.kind?"md":"mini"}):N;return b.createElement("div",{className:T},b.createElement("input",d({},x,{type:"radio",className:`${E}--radio-button`,onChange:function(e){l(f,u,e)},id:A,ref:Uo(I,t),disabled:C.disabled,value:f,name:u,required:h,readOnly:w})),b.createElement("label",{htmlFor:A,className:`${E}--radio-button__label`},b.createElement("span",{className:`${E}--radio-button__appearance`}),c&&b.createElement(Xt,{className:P},c,p?j:r?b.createElement("div",{className:`${E}--radio-button-wrapper-inner--decorator`},j):"")),C.validation)});function xs(e){const{className:t,...n}=e,r=O();return b.createElement("div",d({className:v()(`${r}--radio-button-wrapper`,t)},n),b.createElement("div",{className:`${r}--radio-button ${r}--skeleton`}),b.createElement("span",{className:`${r}--radio-button__label ${r}--skeleton`}))}ws.displayName="RadioButton",ws.propTypes={checked:h().bool,className:h().string,decorator:h().node,defaultChecked:h().bool,disabled:h().bool,hideLabel:h().bool,id:h().string,labelPosition:h().oneOf(["right","left"]),labelText:h().node.isRequired,name:h().string,onChange:h().func,onClick:h().func,required:h().bool,invalid:h().bool,invalidText:h().node,warn:h().bool,warnText:h().node,readOnly:h().bool,slug:ht(h().node),value:h().oneOfType([h().string,h().number])},xs.propTypes={className:h().string};const Es=e=>b.createElement(Xt,d({as:"legend"},e));const Os=b.forwardRef((e,t)=>{const{children:n,className:r,decorator:o,defaultSelected:i,disabled:s,helperText:a,invalid:c=!1,invalidText:u,labelPosition:l="right",legendText:f,name:p,onChange:h=()=>{},orientation:y="horizontal",readOnly:m,valueSelected:g,warn:_=!1,warnText:w,slug:x,required:E,...S}=e,A=O(),[C,P]=(0,b.useState)(g??i),T=(0,b.useRef)(g),I=Dt();function N(e,t,n){m||e!==C&&(P(e),h(e,p,n))}(0,b.useEffect)(()=>{g!==T.current&&(P(g),T.current=g)},[g]);const j=!m&&!s&&!c&&_,k=!c&&!s&&!_,R=v()(`${A}--form-item`,r),$=v()(`${A}--radio-button-group`,{[`${A}--radio-button-group--${y}`]:"vertical"===y,[`${A}--radio-button-group--label-${l}`]:l,[`${A}--radio-button-group--readonly`]:m,[`${A}--radio-button-group--invalid`]:!m&&!s&&c,[`${A}--radio-button-group--warning`]:j,[`${A}--radio-button-group--slug`]:x,[`${A}--radio-button-group--decorator`]:o}),M=v()(`${A}--form__helper-text`,{[`${A}--form__helper-text--disabled`]:s}),D=null!=a,L=D?`radio-button-group-helper-text-${I}`:void 0,B=D&&b.createElement("div",{id:L,className:M},a),V=(0,b.useRef)(null),F=x??o,z=Tn(F,Pn)?(0,b.cloneElement)(F,{size:"mini",kind:"default"}):F;return b.createElement("div",{className:R,ref:Uo(V,t)},b.createElement("fieldset",d({className:$,disabled:s,"data-invalid":!!c||void 0,"aria-describedby":k&&a?L:void 0},S),f&&b.createElement(Es,{className:`${A}--label`},f,x?z:o?b.createElement("div",{className:`${A}--radio-button-group-inner--decorator`},z):""),b.Children.map(n,e=>{if(!e)return;const t={name:p,key:e.props.value,value:e.props.value,onChange:N,checked:e.props.value===C,required:E};return!C&&e.props.checked&&(t.checked=!0),b.cloneElement(e,t)})),b.createElement("div",{className:`${A}--radio-button__validation-msg`},!m&&!s&&c&&b.createElement(b.Fragment,null,b.createElement(pn,{className:`${A}--radio-button__invalid-icon`}),b.createElement("div",{className:`${A}--form-requirement`},u)),j&&b.createElement(b.Fragment,null,b.createElement(dn,{className:`${A}--radio-button__invalid-icon ${A}--radio-button__invalid-icon--warning`}),b.createElement("div",{className:`${A}--form-requirement`},w))),k&&B)});var Ss,As;Os.propTypes={children:h().node,className:h().string,decorator:h().node,defaultSelected:h().oneOfType([h().string,h().number]),disabled:h().bool,helperText:h().node,invalid:h().bool,invalidText:h().node,labelPosition:h().oneOf(["left","right"]),legendText:h().node,name:h().string.isRequired,onChange:h().func,orientation:h().oneOf(["horizontal","vertical"]),readOnly:h().bool,required:h().bool,slug:ht(h().node),valueSelected:h().oneOfType([h().string,h().number]),warn:h().bool,warnText:h().node},Os.displayName="RadioButtonGroup";const Cs=b.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Ss||(Ss=b.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):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},As||(As=b.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)}),Ps=e=>""!==e&&void 0!==e;var Ts;const Is=b.forwardRef(({autoComplete:e="off",className:t,closeButtonLabelText:n="Clear search input",defaultValue:r,disabled:o,isExpanded:i=!0,id:s,labelText:a,light:c,onChange:u=()=>{},onClear:l=()=>{},onKeyDown:f,onExpand:p,placeholder:h="Search",renderIcon:y,role:m,size:g="md",type:_="search",value:w,...E},S)=>{const A=Ps(w)||Ps(r),C=O(),{isFluid:P}=(0,b.useContext)(uo),T=(0,b.useRef)(null),I=x([S,T]),N=(0,b.useRef)(null),j=Dt("search-input"),k=s||j,R=`${k}-search`,[$,M]=(0,b.useState)(A||!1),[D,L]=(0,b.useState)(w),B=v()({[`${C}--search`]:!0,[`${C}--search--sm`]:"sm"===g,[`${C}--search--md`]:"md"===g,[`${C}--search--lg`]:"lg"===g,[`${C}--search--light`]:c,[`${C}--search--disabled`]:o,[`${C}--search--fluid`]:P},t),V=v()({[`${C}--search-close`]:!0,[`${C}--search-close--hidden`]:!$||!i});function F(){if(!w&&T.current&&(T.current.value=""),T.current){const e=Object.assign({},T.current,{value:""}),t={bubbles:!1,cancelable:!1,currentTarget:T.current,defaultPrevented:!1,eventPhase:0,isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,isTrusted:!1,nativeEvent:new Event("change"),persist:hn,preventDefault:hn,stopPropagation:hn,target:e,timeStamp:0,type:"change"};u(t)}l(),M(!1),T.current?.focus()}w!==D&&(M(Ps(w)),L(w));const z=b.createElement("div",{"aria-labelledby":p?R:void 0,role:p?"button":void 0,className:`${C}--search-magnifier`,onClick:p,onKeyDown:function(e){(It(e,wt)||It(e,Et))&&(e.stopPropagation(),p&&p(e))},tabIndex:p&&!i?0:-1,ref:N,"aria-expanded":!(!p||!i)||!(p&&!i)&&void 0,"aria-controls":p?k:void 0},b.createElement(Ns,{icon:y})),U=p&&!i?b.createElement(Ut,{className:`${C}--search-tooltip ${C}--search-magnifier-tooltip`,align:"top",label:"Search"},z):z;return b.createElement("div",{role:"search","aria-label":h,className:B},U,b.createElement("label",{id:R,htmlFor:k,className:`${C}--label`},a),b.createElement("input",d({autoComplete:e,className:`${C}--search-input`,defaultValue:r,disabled:o,role:m,ref:I,id:k,onChange:Ui([u,function(e){M(""!==e.target.value)}]),onKeyDown:Ui([f,function(e){It(e,xt)&&(e.stopPropagation(),T.current?.value?F():p&&i&&N.current?.focus())}]),placeholder:h,type:_,value:w,tabIndex:p&&!i?-1:void 0},E)),b.createElement("button",{"aria-label":n,className:V,disabled:o,onClick:F,title:n,type:"button"},Ts||(Ts=b.createElement(oo,null))))});function Ns({icon:e}){const t=O();return e?b.createElement(e,{className:`${t}--search-magnifier-icon`}):b.createElement(Cs,{className:`${t}--search-magnifier-icon`})}Is.displayName="Search",Is.propTypes={autoComplete:h().string,className:h().string,closeButtonLabelText:h().string,defaultValue:h().oneOfType([h().string,h().number]),disabled:h().bool,id:h().string,isExpanded:h().bool,labelText:h().node.isRequired,light:ht(h().bool),onChange:h().func,onClear:h().func,onExpand:h().func,onKeyDown:h().func,placeholder:h().string,renderIcon:h().oneOfType([h().func,h().object]),role:ht(h().string),size:h().oneOf(["sm","md","lg"]),type:h().string,value:h().oneOfType([h().string,h().number])},Ns.propTypes={icon:h().oneOfType([h().func,h().object])};const js=({className:e,...t})=>{const n=O(),r=v()(e,{[`${n}--icon--skeleton`]:!0});return b.createElement("div",d({className:r},t))};function ks(e){return"".concat(e/16,"rem")}js.propTypes={className:h().string};ks(320);var Rs={width:ks(672),columns:8,margin:ks(16)},$s={width:ks(1056),columns:16,margin:ks(16)};ks(1312),ks(16),ks(1584),ks(24);function Ms(e){return ks(8*e)}Ms(.25),Ms(.5),Ms(1),Ms(1.5),Ms(2),Ms(3),Ms(4),Ms(5),Ms(6),Ms(8),Ms(10),Ms(12),Ms(20),Ms(2),Ms(3),Ms(4),Ms(6),Ms(8),Ms(12),Ms(20),Ms(3),Ms(4),Ms(5),Ms(6),Ms(8),ks(24),ks(32),ks(40),ks(48),ks(64),ks(80);const Ds=b.createContext({mode:"flexbox",subgrid:!1}),Ls=({children:e,mode:t,subgrid:n=!1})=>{const r=b.useMemo(()=>({mode:t,subgrid:n}),[t,n]);return b.createElement(Ds.Provider,{value:r},e)};Ls.propTypes={children:h().node,mode:h().oneOf(["flexbox","css-grid"]).isRequired,subgrid:h().bool};const Bs=b.forwardRef(({align:e,as:t,children:n,className:r,condensed:o=!1,fullWidth:i=!1,narrow:s=!1,...a},c)=>{const u=O(),{subgrid:l}=b.useContext(Ds);let f="wide";if(s?f="narrow":o&&(f="condensed"),l)return b.createElement(Ls,{mode:"css-grid",subgrid:!0},b.createElement(Vs,d({ref:c,as:t,className:r,mode:f},a),n));const p=v()(r,{[`${u}--css-grid`]:!0,[`${u}--css-grid--condensed`]:"condensed"===f,[`${u}--css-grid--narrow`]:"narrow"===f,[`${u}--css-grid--full-width`]:i,[`${u}--css-grid--start`]:"start"===e,[`${u}--css-grid--end`]:"end"===e}),h=t||"div";return b.createElement(Ls,{mode:"css-grid",subgrid:!0},b.createElement(h,d({className:p,ref:c},a),n))});Bs.propTypes={as:h().oneOfType([h().string,h().elementType]),align:h().oneOf(["start","center","end"]),children:h().node,className:h().string,condensed:h().bool,fullWidth:h().bool,narrow:h().bool};const Vs=b.forwardRef(({as:e,className:t,children:n,mode:r,...o},i)=>{const s=O(),a=v()(t,{[`${s}--subgrid`]:!0,[`${s}--subgrid--condensed`]:"condensed"===r,[`${s}--subgrid--narrow`]:"narrow"===r,[`${s}--subgrid--wide`]:"wide"===r}),c=e||"div";return b.createElement(c,d({},o,{ref:i,className:a}),n)});Vs.propTypes={as:h().oneOfType([h().string,h().elementType]),children:h().node,className:h().string,mode:h().oneOf(["wide","narrow","condensed"])};const Fs=b.forwardRef(({as:e,condensed:t=!1,narrow:n=!1,fullWidth:r=!1,className:o,children:i,...s},a)=>{const c=O(),u=v()(o,{[`${c}--grid`]:!0,[`${c}--grid--condensed`]:t,[`${c}--grid--narrow`]:n,[`${c}--grid--full-width`]:r}),l=e||"div";return b.createElement(Ls,{mode:"flexbox",subgrid:!1},b.createElement(l,d({className:u,ref:a},s),i))});Fs.propTypes={as:h().oneOfType([h().string,h().elementType]),children:h().node,className:h().string,condensed:h().bool,fullWidth:h().bool,narrow:h().bool};h().oneOf(["start","center","end"]),h().oneOfType([h().string,h().elementType]),h().node,h().string,h().bool,h().bool,h().bool;const zs=(e,{onPress:t,onPressIn:n,onPressOut:r,onLongPress:o,delayLongPressMs:i=500}={})=>{const s=(0,b.useRef)(t),a=(0,b.useRef)(n),c=(0,b.useRef)(r),u=(0,b.useRef)(o),[l,f]=(0,b.useState)(!1),[d,p]=(0,b.useState)(!1),h=(0,b.useRef)({longPress:!1});(0,b.useEffect)(()=>{s.current=t},[t]),(0,b.useEffect)(()=>{a.current=n},[n]),(0,b.useEffect)(()=>{c.current=r},[r]),(0,b.useEffect)(()=>{u.current=o},[o]),(0,b.useEffect)(()=>{const t=e.current;if(!t)return;const n=e=>{f(!0),a.current?.(),e.preventDefault()},r=()=>{f(!1),p(!1),c.current?.(h.current)},o=()=>{f(!1),p(!1),c.current?.(h.current),h.current.longPress=!1},i=()=>{f(!1),p(!1),c.current?.(h.current),h.current.longPress=!1},u=()=>{p(!1),f(!1),s.current?.(h.current),h.current.longPress=!1},l=e=>{e.preventDefault()};return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",o),t.addEventListener("pointerleave",i),t.addEventListener("click",u),t.addEventListener("contextmenu",l),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",o),t.removeEventListener("pointerleave",i),t.removeEventListener("click",u),t.removeEventListener("contextmenu",l)}},[e]),(0,b.useEffect)(()=>{if(l){const e=setTimeout(()=>{f(!1),p(!0)},i);return()=>{clearTimeout(e)}}},[l,i]),(0,b.useEffect)(()=>{if(d)return h.current.longPress=!0,u.current?.()},[d])},Us=(e,t=!1)=>{const[n,r]=(0,b.useState)(t);return(0,b.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 Ks,Ws,Hs;const qs=b.createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Gs=b.createContext({index:0,hasSecondaryLabel:!1}),Ys=`(min-width: ${$s.width})`,Zs=(Rs.width,b.createContext(0));function Xs({children:e,defaultSelectedIndex:t=0,onChange:n,selectedIndex:r,dismissable:o,onTabCloseRequest:i}){const s=Dt("ccs");o&&!i&&console.error("dismissable property specified without also providing an onTabCloseRequest property.");const[a,c]=(0,b.useState)(t),[u,l]=(({defaultValue:e,name:t="custom",onChange:n,value:r})=>{const[o,i]=(0,b.useState)(void 0!==r?r:e),s=(0,b.useRef)(null);null===s.current&&(s.current=void 0!==r);const a=e=>{const t="function"==typeof e?e(o):e;!1===s.current&&i(t),n&&n(t)};return(0,b.useEffect)(()=>{s.current,s.current},[t,r]),!0===s.current?[r,a,s.current]:[o,a,s.current]})({value:r,defaultValue:t,onChange:e=>n?.({selectedIndex:e})}),f={baseId:s,activeIndex:a,defaultSelectedIndex:t,dismissable:o,onTabCloseRequest:i,setActiveIndex:c,selectedIndex:u,setSelectedIndex:l};return b.createElement(qs.Provider,{value:f},e)}function Qs({activation:e="automatic","aria-label":t,children:n,className:r,contained:o=!1,fullWidth:i=!1,iconSize:s,leftOverflowButtonProps:a,light:c,rightOverflowButtonProps:u,scrollDebounceWait:l=200,scrollIntoView:f,...p}){const{activeIndex:h,selectedIndex:y,setSelectedIndex:m,setActiveIndex:g,dismissable:_}=b.useContext(qs),x=O(),E=(0,b.useRef)(null),S=(0,b.useRef)(null),A=(0,b.useRef)(null),[C,P]=(0,b.useState)(!1),[T,I]=(0,b.useState)(0),N=o&&b.Children.toArray(n).some(e=>Tn(e,ea)&&void 0!==e.props.secondaryLabel),j=Us(Ys),k=i&&o&&j&&b.Children.toArray(n).length<9,R=v()(`${x}--tabs`,{[`${x}--tabs--contained`]:o,[`${x}--tabs--light`]:c,[`${x}--tabs__icon--default`]:"default"===s,[`${x}--tabs__icon--lg`]:"lg"===s,[`${x}--layout--size-lg`]:"lg"===s,[`${x}--tabs--tall`]:N,[`${x}--tabs--full-width`]:k,[`${x}--tabs--dismissable`]:_},r),$=44,[M,D]=(0,b.useState)(!!E.current&&T+$+E.current.clientWidth<E.current.scrollWidth),L=!!E.current&&C&&T>0,B=v()(`${x}--tab--overflow-nav-button`,`${x}--tab--overflow-nav-button--previous`,{[`${x}--tab--overflow-nav-button--hidden`]:!L}),V=v()(`${x}--tab--overflow-nav-button`,`${x}--tab--overflow-nav-button--next`,{[`${x}--tab--overflow-nav-button--hidden`]:!M}),F=(0,b.useRef)([]),z=(0,b.useCallback)(()=>{Ki(()=>{E.current&&I(E.current.scrollLeft)},l)()},[l]);function U(e){if(C&&E.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,o=E.current.scrollLeft+$,i=E.current.scrollLeft+E.current.clientWidth-$;n<o&&I(n-$),r>i&&I(r+$-E.current.clientWidth)}}return(0,b.useEffect)(()=>{const e=F.current[y];f&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})},[]),(0,b.useEffect)(()=>{D(!!E.current&&T+$+E.current.clientWidth+1<E.current.scrollWidth),_&&E.current&&P(E.current.scrollWidth>E.current.clientWidth+1)},[n,_,T]),(0,b.useEffect)(()=>{if(F.current[y]?.disabled){const e=F.current.filter(e=>!e.disabled);if(e.length>0){const t=e[0];m(F.current.indexOf(t))}}},[]),w(()=>{E.current&&P(E.current.scrollWidth>E.current.clientWidth+1);const e=Ki(function(){E.current&&P(E.current.scrollWidth>E.current.clientWidth+1)},200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[]),w(()=>{null!==T&&E.current&&(E.current.scrollLeft=T)},[T]),w(()=>{U("manual"===e?F.current[h]:F.current[y])},[e,h]),w(()=>{U(F.current[y])},[y,C,n]),zs(S,{onPress({longPress:e}){!e&&E.current&&I(Math.max(T-E.current.scrollWidth/F.current.length*1.5,0))},onLongPress:()=>Js(E,"backward",I)}),zs(A,{onPress({longPress:e}){!e&&E.current&&I(Math.min(T+E.current.scrollWidth/F.current.length*1.5,E.current.scrollWidth-E.current.clientWidth))},onLongPress:()=>Js(E,"forward",I)}),b.createElement("div",{className:R},b.createElement("button",d({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:S,className:B,type:"button"},a),Ks||(Ks=b.createElement(no,null))),b.createElement("div",d({},p,{"aria-label":t,ref:E,role:"tablist",className:`${x}--tab--list`,onScroll:z,onKeyDown:function(t){if(Tt(t,[Ct,At,St,Ot])){t.preventDefault();const n=F.current.filter(e=>null!==e).filter(e=>!e.disabled),r=n.indexOf(F.current["automatic"===e?y:h]),o=F.current.indexOf(n[function(e,t,n){switch(!0){case It(e,Ct):return(n+1)%t;case It(e,At):return(t+n-1)%t;case It(e,St):return 0;case It(e,Ot):return t-1;default:return n}}(t,n.length,r)]);"automatic"===e?m(o):"manual"===e&&g(o),F.current[o]?.focus()}},onBlur:function({relatedTarget:t}){E.current?.contains(t)||"manual"===e&&g(y)}}),b.Children.map(n,(e,t)=>(0,b.isValidElement)(e)?b.createElement(Gs.Provider,{value:{index:t,hasSecondaryLabel:N,contained:o}},(0,b.cloneElement)(e,{ref:e=>{e&&(F.current[t]=e)}})):null)),b.createElement("button",d({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:A,className:V,type:"button"},u),Ws||(Ws=b.createElement(ro,null))))}function Js(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 s=null;return s=requestAnimationFrame(function e(){r&&(r.scrollLeft=r.scrollLeft+i,s=requestAnimationFrame(e))}),()=>{r.style["scroll-behavior"]=o,n(r.scrollLeft),s&&cancelAnimationFrame(s)}}Xs.propTypes={children:h().node,defaultSelectedIndex:h().number,dismissable:h().bool,onChange:h().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:h().number},h().node,h().number,h().string,h().func,h().number,Qs.propTypes={activation:h().oneOf(["automatic","manual"]),"aria-label":h().string,children:h().node,className:h().string,contained:h().bool,fullWidth:h().bool,iconSize:h().oneOf(["default","lg"]),leftOverflowButtonProps:h().object,light:ht(h().bool),rightOverflowButtonProps:h().object,scrollDebounceWait:h().number,scrollIntoView:h().bool},h().oneOf(["automatic","manual"]),h().string,h().node,h().string;const ea=(0,b.forwardRef)(({as:e="button",children:t,className:n,disabled:r,onClick:o,onKeyDown:i,secondaryLabel:s,renderIcon:a,...c},u)=>{const l=O(),{selectedIndex:f,setSelectedIndex:p,baseId:h,dismissable:y,onTabCloseRequest:m}=b.useContext(qs),{index:g,hasSecondaryLabel:_,contained:E}=b.useContext(Gs),{badgeIndicator:A}=b.useContext(ta)||{},C=(0,b.useRef)(null),P=(0,b.useRef)(null),T=x([u,P]),[I,N]=(0,b.useState)(!1),j=`${h}-tab-${g}`,k=`${h}-tabpanel-${g}`,[R,$]=(0,b.useState)(!1),M=v()(`${l}--tabs__nav-item`,`${l}--tabs__nav-link`,{[`${l}--tabs__nav-item--selected`]:f===g,[`${l}--tabs__nav-item--disabled`]:r,[`${l}--tabs__nav-item--hover-off`]:I},n),D=e;S(C,"mouseover",e=>{E&&P.current&&(e.stopPropagation(),N(!0),P.current.classList.add(`${l}--tabs__nav-item--hover-off`))}),S(C,"mouseleave",()=>{E&&P.current&&(P.current.classList.remove(`${l}--tabs__nav-item--hover-off`),N(!1))}),w(()=>{function e(){const e=document.getElementById(`${j}`)||P.current;if(e?.closest(`.${l}--tabs--vertical`)){const t=e?.getElementsByClassName(`${l}--tabs__nav-item-label`)[0];(e=>{$(e.offsetHeight<e.scrollHeight),e.offsetHeight,e.scrollHeight})(t)}}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[l,j]);const L=e=>{if(e.stopPropagation(),m?.(g),P.current&&P.current.parentElement){const e=Array.from(P.current.parentElement.childNodes).filter(e=>e instanceof HTMLElement&&e.classList.contains(`${l}--tabs__nav-link`)&&!e.classList.contains(`${l}--tabs__nav-item--disabled`)).length;if(P.current&&g+1!==e)P.current.focus();else{const t=2*(e-2),n=P.current.parentElement.childNodes[t];n instanceof HTMLElement&&n.focus()}}},B=e=>{y&&It(e,Pt)&&L(e),i?.(e)},V=b.createElement("div",{className:v()({[`${l}--tabs__nav-item--close`]:y,[`${l}--tabs__nav-item--close--hidden`]:!y})},b.createElement("button",{type:"button",tabIndex:-1,"aria-disabled":r,"aria-hidden":f===g&&y?"false":"true",disabled:r,className:v()({[`${l}--tabs__nav-item--close-icon`]:y,[`${l}--visually-hidden`]:!y,[`${l}--tabs__nav-item--close-icon--selected`]:f===g,[`${l}--tabs__nav-item--close-icon--disabled`]:r}),onClick:L,title:`Remove ${"string"==typeof t?t:""} tab`,ref:C},b.createElement(oo,{"aria-hidden":f===g&&y?"false":"true","aria-label":`Press delete to remove ${"string"==typeof t?t:""} tab`}))),F=a??y;return R?b.createElement(Ut,{label:t,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0},b.createElement(D,d({},c,{"aria-controls":k,"aria-disabled":r,"aria-selected":f===g,ref:T,id:j,role:"tab",className:M,disabled:r,title:t,onClick:e=>{r||(p(g),o?.(e))},onKeyDown:B,tabIndex:f===g?"0":"-1",type:"button"}),b.createElement("div",{className:`${l}--tabs__nav-item-label-wrapper`},b.createElement(Xt,{className:`${l}--tabs__nav-item-label`},t)),_&&s&&b.createElement(Xt,{as:"div",className:`${l}--tabs__nav-item-secondary-label`,title:s},s))):b.createElement(b.Fragment,null,b.createElement(D,d({},c,{"aria-controls":k,"aria-disabled":r,"aria-selected":f===g,ref:T,id:j,role:"tab",className:M,disabled:r,onClick:e=>{r||(p(g),o?.(e))},onKeyDown:B,tabIndex:f===g?"0":"-1",type:"button"}),b.createElement("div",{className:`${l}--tabs__nav-item-label-wrapper`},y&&a&&b.createElement("div",{className:`${l}--tabs__nav-item--icon-left`},b.createElement(a,{size:16})),b.createElement(Xt,{className:`${l}--tabs__nav-item-label`},t),!y&&a&&b.createElement("div",{className:v()(`${l}--tabs__nav-item--icon`,{[`${l}--visually-hidden`]:!F})},!y&&a&&b.createElement(a,{size:16}))),_&&s&&b.createElement(Xt,{as:"div",className:`${l}--tabs__nav-item-secondary-label`,title:s},s),!r&&A&&(Hs||(Hs=b.createElement(Wt,null)))),V)});ea.propTypes={as:h().oneOfType([h().string,h().elementType]),children:h().node,className:h().string,disabled:h().bool,onClick:h().func,onKeyDown:h().func,renderButton:h().func,renderIcon:h().oneOfType([h().func,h().object]),secondaryLabel:h().string};const ta=(0,b.createContext)(!1);b.forwardRef(({badgeIndicator:e,children:t,className:n,defaultOpen:r=!1,enterDelayMs:o,leaveDelayMs:i,label:s,...a},c)=>{const u=O(),l=(0,b.useMemo)(()=>({badgeIndicator:e}),[e]),f=(0,b.isValidElement)(t)&&(20===t.props.size||"20"===t.props.size),p=v()(`${u}--tabs__nav-item--icon-only`,n,{[`${u}--tabs__nav-item--icon-only__20`]:f});return b.createElement(ta.Provider,{value:l},b.createElement(Ut,{align:"bottom",defaultOpen:r,className:`${u}--icon-tooltip`,enterDelayMs:o,label:s,leaveDelayMs:i},b.createElement(ea,d({className:p,ref:c},a),t)))}).propTypes={badgeIndicator:h().bool,children:h().node,className:h().string,defaultOpen:h().bool,enterDelayMs:h().number,label:h().node.isRequired,leaveDelayMs:h().number};const na=b.forwardRef(({children:e,className:t,...n},r)=>{const o=O(),{selectedIndex:i,baseId:s}=b.useContext(qs),a=b.useContext(Zs),c=`${s}-tabpanel-${a}`,u=`${s}-tab-${a}`,l=v()(`${o}--tab-content`,t);return b.createElement("div",d({},n,{"aria-labelledby":u,id:c,className:l,ref:r,role:"tabpanel",hidden:i!==a}),e)});function ra({children:e}){const t=O(),n=(0,b.useRef)([]),r=(0,b.useRef)([]);return w(()=>{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])})}}),b.createElement(b.Fragment,null,b.Children.map(e,(e,t)=>(0,b.isValidElement)(e)?b.createElement(Zs.Provider,{value:t},(0,b.cloneElement)(e,{ref:e=>{n.current[t]=e}})):null))}na.propTypes={children:h().node,className:h().string},ra.propTypes={children:h().node};const oa=({align:e="bottom",autoAlign:t,className:n,children:r,definition:o,defaultOpen:i=!1,id:s,openOnHover:a,tooltipText:c,triggerClassName:u,...l})=>{const[f,p]=(0,b.useState)(i),h=O(),y=function(e){const t=Dt();return e??t}(s);return b.createElement(vt,{align:e,className:n,autoAlign:t,dropShadow:!1,highContrast:!0,onMouseLeave:()=>{p(!1)},onMouseEnter:()=>{a&&p(!0)},onFocus:()=>{p(!0)},open:f},b.createElement("button",d({},l,{className:v()(`${h}--definition-term`,u),"aria-controls":y,"aria-describedby":y,"aria-expanded":f,onBlur:()=>{p(!1)},onMouseDown:e=>{0===e.button&&p(!f)},onKeyDown:function(e){f&&It(e,xt)&&(e.stopPropagation(),p(!1))},type:"button"}),r),b.createElement(gt,{className:`${h}--definition-tooltip`,id:y},c??o))};var ia;oa.propTypes={align:h().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:h().bool,children:h().node.isRequired,className:h().string,defaultOpen:h().bool,definition:h().node.isRequired,id:h().string,openOnHover:h().bool,tooltipText:ht(h().node),triggerClassName:h().string};const sa={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"},aa=b.forwardRef(({children:e,className:t,decorator:n,id:r,type:o,filter:i,renderIcon:s,title:a="Clear filter",disabled:c,onClose:u,size:l,as:f,slug:p,...h},y)=>{const m=O(),g=(0,b.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."),u&&console.warn("The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.");const _=x([y,g]),E=Dt(),S=r??`tag-${E}`,[A,C]=(0,b.useState)(!1);w(()=>{const e=g.current?.getElementsByClassName(`${m}--tag__label`)[0];C((e=>!!e&&e?.offsetWidth<e?.scrollWidth)(e))},[m,g]);const P=[`${m}--tag--selectable`,`${m}--tag--filter`,`${m}--tag--operational`].some(e=>t?.includes(e)),T=v()(`${m}--tag`,t,{[`${m}--tag--disabled`]:c,[`${m}--tag--filter`]:i,[`${m}--tag--${l}`]:l,[`${m}--layout--size-${l}`]:l,[`${m}--tag--${o}`]:o,[`${m}--tag--interactive`]:h.onClick&&!P&&A}),I=void 0!==o&&o in Object.keys(sa)?sa[o]:"",N=e=>{u&&(e.stopPropagation(),u(e))},j=p??n,k=Tn(j,Pn)&&!P?(0,b.cloneElement)(j,{size:"sm",kind:"inline"}):null;if(i){const t=f??"div";return b.createElement(t,d({className:T,id:S},h),s&&"sm"!==l?b.createElement("div",{className:`${m}--tag__custom-icon`},b.createElement(s,null)):"",b.createElement(Xt,{title:"string"==typeof e?e:void 0,className:`${m}--tag__label`},null!=e?e:I),k,b.createElement("button",{type:"button",className:`${m}--tag__close-icon`,onClick:N,disabled:c,"aria-label":a,title:a},ia||(ia=b.createElement(oo,null))))}const R=f??(h.onClick||t?.includes(`${m}--tag--operational`)?"button":"div"),$=v()({[`${m}--tag__label`]:!P});return b.createElement(R,d({ref:_,disabled:c,className:T,id:S,type:"button"===R?"button":void 0},h),s&&"sm"!==l?b.createElement("div",{className:`${m}--tag__custom-icon`},b.createElement(s,null)):"",A&&!P?b.createElement(oa,{openOnHover:!1,definition:null!=e?e:I,className:`${m}--definition--tooltip--tag`},b.createElement(Xt,{title:null!=e&&"string"==typeof e?e:I,className:$},null!=e?e:I)):b.createElement(Xt,{title:null!=e&&"string"==typeof e?e:I,className:$},null!=e?e:I),p?k:n?b.createElement("div",{className:`${m}--tag__decorator`},k):"")}),ca=aa;ca.propTypes={as:h().elementType,children:h().node,className:h().string,decorator:h().node,disabled:h().bool,filter:ht(h().bool),id:h().string,onClose:ht(h().func),renderIcon:h().oneOfType([h().func,h().object]),size:h().oneOf(Object.keys({sm:"sm",md:"md",lg:"lg"})),slug:ht(h().node),title:ht(h().string),type:h().oneOf(Object.keys(sa))};const ua=e=>({"data-invalid":!0,"aria-invalid":!0,"aria-describedby":e}),la=e=>({"aria-describedby":e}),fa=e=>({"aria-describedby":e}),da=(0,b.forwardRef)(({className:e,decorator:t,disabled:n=!1,helperText:r,hideLabel:o,id:i,inline:s=!1,invalid:a=!1,invalidText:c,labelText:u,light:l,onChange:f=()=>{},onClick:d=()=>{},placeholder:p,readOnly:h,size:y,type:m="text",warn:g=!1,warnText:_,enableCounter:w=!1,maxCount:E,slug:S,...A},C)=>{const P=O(),{defaultValue:T,value:I}=A,N=(0,b.useRef)(null),j=x([C,N]);function k(){return(T||I||N.current?.value||"").toString().length}const[R,$]=(0,b.useState)(k());(0,b.useEffect)(()=>{$(k())},[I,T,w]);const M=Ko({id:i,readOnly:h,disabled:n,invalid:a,invalidText:c,warn:g,warnText:_}),D={id:i,onChange:e=>{M.disabled||($(e.target.value?.length),f(e))},onClick:e=>{M.disabled||d(e)},placeholder:p,type:m,ref:j,className:v()(`${P}--text-input`,{[`${P}--text-input--light`]:l,[`${P}--text-input--invalid`]:M.invalid,[`${P}--text-input--warning`]:M.warn,[`${P}--text-input--${y}`]:y,[`${P}--layout--size-${y}`]:y}),title:p,disabled:M.disabled,readOnly:h,"aria-describedby":r&&M.helperId,...A};w&&(D.maxLength=E);const L=v()([v()(`${P}--form-item`,e)],`${P}--text-input-wrapper`,{[`${P}--text-input-wrapper--readonly`]:h,[`${P}--text-input-wrapper--light`]:l,[`${P}--text-input-wrapper--inline`]:s,[`${P}--text-input-wrapper--inline--invalid`]:s&&M.invalid}),B=v()(`${P}--label`,{[`${P}--visually-hidden`]:o,[`${P}--label--disabled`]:M.disabled,[`${P}--label--inline`]:s,[`${P}--label--inline--${y}`]:s&&!!y}),V=v()(`${P}--form__helper-text`,{[`${P}--form__helper-text--disabled`]:M.disabled,[`${P}--form__helper-text--inline`]:s}),F=v()(`${P}--text-input__field-outer-wrapper`,{[`${P}--text-input__field-outer-wrapper--inline`]:s}),z=v()(`${P}--text-input__field-wrapper`,{[`${P}--text-input__field-wrapper--warning`]:M.warn,[`${P}--text-input__field-wrapper--slug`]:S,[`${P}--text-input__field-wrapper--decorator`]:t}),U=v()({[`${P}--text-input__invalid-icon`]:M.invalid||M.warn,[`${P}--text-input__invalid-icon--warning`]:M.warn}),K=v()(`${P}--label`,{[`${P}--label--disabled`]:n,[`${P}--text-input__label-counter`]:!0}),W=w&&E?b.createElement(Xt,{as:"div",className:K},`${R}/${E}`):null,H=null!=u&&b.createElement(Xt,{as:"label",htmlFor:i,className:B},u),q=b.createElement("div",{className:`${P}--text-input__label-wrapper`},H,W),G=null!=r&&b.createElement(Xt,{as:"div",id:M.helperId,className:V},r),Y=b.createElement("input",(({sharedTextInputProps:e,invalid:t,invalidId:n,warn:r,warnId:o,hasHelper:i,helperId:s})=>({...e,...t?ua(n):{},...r?la(o):{},...i?fa(s):{}}))({sharedTextInputProps:D,invalid:M.invalid,invalidId:M.invalidId,warn:M.warn,warnId:M.warnId})),{isFluid:Z}=(0,b.useContext)(uo),X=(0,b.useRef)(null),[Q,J]=(0,b.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})(R,E);(0,b.useEffect)(()=>{if(ee&&ee!==Q){const e=X.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=ee,J(ee))},1e3);return()=>{t&&clearTimeout(t)}}}},[ee,Q]);const te=M.icon,ne=S??t,re=Tn(ne,Pn)?(0,b.cloneElement)(ne,{size:"mini"}):ne;return b.createElement("div",{className:L},s?b.createElement("div",{className:`${P}--text-input__label-helper-wrapper`},q,!Z&&(M.validation||G)):q,b.createElement("div",{className:F},b.createElement("div",{className:z,"data-invalid":M.invalid||null},te&&b.createElement(te,{className:U}),Y,S?re:t?b.createElement("div",{className:`${P}--text-input__field-inner-wrapper--decorator`},re):"",b.createElement("span",{className:`${P}--text-input__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:X},ee),Z&&b.createElement("hr",{className:`${P}--text-input__divider`}),Z&&!s&&M.validation),!Z&&!s&&(M.validation||G)))});var pa,ha,ba,ya;da.displayName="TextInput",da.propTypes={className:h().string,decorator:h().node,defaultValue:h().oneOfType([h().string,h().number]),disabled:h().bool,enableCounter:h().bool,helperText:h().node,hideLabel:h().bool,id:h().string.isRequired,inline:h().bool,invalid:h().bool,invalidText:h().node,labelText:h().node.isRequired,light:ht(h().bool),maxCount:h().number,onChange:h().func,onClick:h().func,placeholder:h().string,readOnly:h().bool,size:h().oneOf(["sm","md","lg"]),slug:ht(h().node),type:h().string,value:h().oneOfType([h().string,h().number]),warn:h().bool,warnText:h().node};const ma=b.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},pa||(pa=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},ha||(ha=b.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?b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},ba||(ba=b.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):b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},ya||(ya=b.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 va,ga,_a;const wa=b.forwardRef(function({children:e,size:t=16,...n},r){return b.createElement(fn.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},va||(va=b.createElement("path",{d:"M19,21v-2h1v-7h-1v-2h4v2h-1v7h1v2h-4Z"})),ga||(ga=b.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"})),_a||(_a=b.createElement("path",{d:"M32,32H0V0h32v32ZM2,30h28V2H2v28Z"})),e)}),xa=b.forwardRef(({as:e,children:t,className:n,href:r,disabled:o=!1,inline:i=!1,visited:s=!1,renderIcon:a,size:c,target:u,...l},f)=>{const p=O(),h={className:v()(`${p}--link`,n,{[`${p}--link--disabled`]:o,[`${p}--link--inline`]:i,[`${p}--link--visited`]:s,[`${p}--link--${c}`]:c}),rel:"_blank"===u?"noopener":void 0,target:u};o?(h.role="link",h["aria-disabled"]=!0):h.href=r;const y=e??"a";return b.createElement(y,d({ref:f},h,l,{onClick:e=>{o?(e.preventDefault(),e.stopPropagation()):l.onClick&&l.onClick(e)}}),t,!i&&a&&b.createElement("span",{className:`${p}--link__icon`},b.createElement(a,null)))}),Ea=xa;var Oa,Sa,Aa,Ca;Ea.displayName="Link",Ea.propTypes={as:h().elementType,children:h().node,className:h().string,disabled:h().bool,href:h().string,inline:h().bool,renderIcon:h().oneOfType([h().func,h().object]),size:h().oneOf(["sm","md","lg"]),visited:h().bool};const Pa=b.forwardRef(({children:e,className:t,decorator:n,light:r=!1,slug:o,hasRoundedCorners:i=!1,...s},a)=>{const c=O(),u=v()(`${c}--tile`,{[`${c}--tile--light`]:r,[`${c}--tile--slug`]:o,[`${c}--tile--slug-rounded`]:o&&i,[`${c}--tile--decorator`]:n,[`${c}--tile--decorator-rounded`]:n&&i},t);return b.createElement("div",d({className:u,ref:a},s),e,o,n&&b.createElement("div",{className:`${c}--tile--inner-decorator`},n))});Pa.displayName="Tile",Pa.propTypes={children:h().node,className:h().string,decorator:h().node,hasRoundedCorners:h().bool,light:ht(h().bool),slug:ht(h().node)};const Ta=b.forwardRef(({children:e,className:t,clicked:n=!1,decorator:r,disabled:o,href:i,light:s,onClick:a=()=>{},onKeyDown:c=()=>{},renderIcon:u,hasRoundedCorners:l,slug:f,...p},h)=>{const y=O(),m=v()(`${y}--tile`,`${y}--tile--clickable`,{[`${y}--tile--is-clicked`]:n,[`${y}--tile--light`]:s,[`${y}--tile--slug`]:f,[`${y}--tile--slug-rounded`]:f&&l,[`${y}--tile--decorator`]:r,[`${y}--tile--decorator-rounded`]:r&&l},t),[g,_]=(0,b.useState)(n),w=yt("enable-v12-tile-default-icons");w&&(u||(u=ma),o&&(u=yi.$D));const x=v()({[`${y}--tile--icon`]:!w||w&&!o,[`${y}--tile--disabled-icon`]:w&&o});return b.createElement(Ea,d({className:m,href:i,tabIndex:i||o?void 0:0,onClick:o?void 0:function(e){e?.persist?.(),_(!g),a(e)},onKeyDown:function(e){e?.persist?.(),!i&&Tt(e,[wt,Et])&&(e.preventDefault(),_(!g),a(e)),c(e)},ref:h,disabled:o},p),f||r?b.createElement("div",{className:`${y}--tile-content`},e):e,(!0===f||!0===r)&&b.createElement(wa,{size:"24",className:`${y}--tile--ai-label-icon`}),b.isValidElement(r)&&b.createElement("div",{className:`${y}--tile--inner-decorator`},r),u&&b.createElement(u,{className:x,"aria-hidden":"true"}))});Ta.displayName="ClickableTile",Ta.propTypes={children:h().node,className:h().string,clicked:h().bool,decorator:h().oneOfType([h().bool,h().node]),disabled:h().bool,hasRoundedCorners:h().bool,href:h().string,light:ht(h().bool),onClick:h().func,onKeyDown:h().func,rel:h().string,renderIcon:h().oneOfType([h().func,h().object])},b.forwardRef(({children:e,className:t,decorator:n,disabled:r,id:o,light:i,onClick:s=()=>{},onChange:a=()=>{},onKeyDown:c=()=>{},selected:u=!1,tabIndex:l=0,title:f="title",slug:p,hasRoundedCorners:h,...y},m)=>{const g=O(),_=s,w=c,[x,E]=(0,b.useState)(u);(0,b.useEffect)(()=>{E(u)},[u]);const S=v()(`${g}--tile`,`${g}--tile--selectable`,{[`${g}--tile--is-selected`]:x,[`${g}--tile--light`]:i,[`${g}--tile--disabled`]:r,[`${g}--tile--slug`]:p,[`${g}--tile--slug-rounded`]:p&&h,[`${g}--tile--decorator`]:n,[`${g}--tile--decorator-rounded`]:n&&h},t),A=(0,b.useCallback)((e,t)=>{E(t),a(e,t,o)},[a,o]),C=(0,b.useRef)(null),P=p??n,T=Tn(P,Pn)?(0,b.cloneElement)(P,{size:"xs",ref:C}):P;return b.createElement("div",d({className:S,onClick:r?void 0:function(e){e.preventDefault(),e?.persist?.(),T&&C.current&&e.target instanceof Node&&C.current.contains(e.target)||(A(e,!x),_(e))},role:"checkbox","aria-checked":x,onKeyDown:r?void 0:function(e){e?.persist?.(),Tt(e,[wt,Et])&&(e.preventDefault(),A(e,!x)),w(e)},tabIndex:r?void 0:l,ref:m,id:o,title:f},y),b.createElement("span",{className:`${g}--tile__checkmark ${g}--tile__checkmark--persistent`},x?Oa||(Oa=b.createElement(Qr,null)):Sa||(Sa=b.createElement(Xr,null))),b.createElement(Xt,{as:"label",htmlFor:o,className:`${g}--tile-content`},e),p?T:n?b.createElement("div",{className:`${g}--tile--inner-decorator`},T):"")}).propTypes={children:h().node,className:h().string,decorator:h().node,disabled:h().bool,hasRoundedCorners:h().bool,id:h().string,light:ht(h().bool),name:ht(h().string),onChange:h().func,onClick:h().func,onKeyDown:h().func,selected:h().bool,slug:ht(h().node),tabIndex:h().number,title:h().string,value:ht(h().oneOfType([h().string,h().number]))};const Ia=(0,b.forwardRef)(({tabIndex:e=0,className:t,children:n,decorator:r,expanded:o=!1,tileMaxHeight:i=0,tilePadding:s=0,onClick:a,onKeyUp:c,tileCollapsedIconText:u="Interact to expand Tile",tileExpandedIconText:l="Interact to collapse Tile",tileCollapsedLabel:f,tileExpandedLabel:p,light:h,slug:y,hasRoundedCorners:m,...g},_)=>{const[E,S]=(0,b.useState)(0),[A,C]=(0,b.useState)(0),[P,T]=(0,b.useState)(o),[I,N]=(0,b.useState)(!0),j=(0,b.useRef)(null),k=(0,b.useRef)(null),R=(0,b.useRef)(null),$=(0,b.useRef)(null),M=(0,b.useRef)(null),D=x([_,M]),L=O();(0,b.useEffect)(()=>{T(o)},[o]);const B=()=>{T(e=>!e)},V=e=>{e.target!==M.current&&e.target!==R.current&&Tt(e,[wt,Et])&&e.preventDefault()},F=v()(`${L}--tile`,`${L}--tile--expandable`,{[`${L}--tile--is-expanded`]:P,[`${L}--tile--light`]:h},t),z=v()(F,`${L}--tile--expandable--interactive`,{[`${L}--tile--slug`]:y,[`${L}--tile--slug-rounded`]:y&&m,[`${L}--tile--decorator`]:r,[`${L}--tile--decorator-rounded`]:r&&m}),U=v()(`${L}--tile__chevron`,`${L}--tile__chevron--interactive`),K=b.Children.toArray(n);w(()=>{if(!M.current||!j.current)return;const e=window.getComputedStyle(M.current),t=parseInt(e.getPropertyValue("padding-top"),10)||0,n=parseInt(e.getPropertyValue("padding-bottom"),10)||0;C(t+n),S(j.current.scrollHeight)},[]),w(()=>{if(!j.current||!k.current)return;const e=Boolean(Bt(j.current))||Boolean(Vt(j.current))||Boolean(Bt(k.current))||Boolean(Vt(k.current))||Boolean(y||r);N(e)},[y,r,n]),w(()=>{if(!M.current)return;if(P)return void(M.current.style.maxHeight="");const e=E||j.current?.scrollHeight||0,t=i>0?i:e,n=s>0?s:A;M.current.style.maxHeight=`${t+n}px`},[P,i,s,E,A]),(0,b.useEffect)(()=>{if(!j.current)return;const e=new ResizeObserver(()=>{j.current&&S(j.current.scrollHeight)});return e.observe(j.current),()=>e.disconnect()},[]);const W=Dt(I?"expandable-tile-interactive":"expandable-tile"),H=y??r,q=Tn(H,Pn)?(0,b.cloneElement)(H,{size:"xs"}):H;return I?b.createElement("div",d({ref:D,className:z},g),b.createElement("div",{ref:$},y?q:r?b.createElement("div",{className:`${L}--tile--inner-decorator`},q):"",b.createElement("div",{ref:j,className:`${L}--tile-content`},K[0]),b.createElement("button",{type:"button","aria-expanded":P,"aria-controls":W,onKeyUp:Ui([c,V]),onClick:Ui([a,B]),"aria-label":P?l:u,ref:R,className:U},Aa||(Aa=b.createElement(to,null))),b.createElement("div",{ref:k,className:`${L}--tile-content`,id:W},K[1]))):b.createElement("button",d({type:"button",ref:D,className:F,"aria-controls":W,"aria-expanded":P,title:P?l:u},g,{onKeyUp:Ui([c,V]),onClick:Ui([a,B]),tabIndex:e}),b.createElement("div",{ref:$},b.createElement("div",{ref:j,className:`${L}--tile-content`},K[0]),b.createElement("div",{className:`${L}--tile__chevron`},b.createElement("span",null,P?p:f),Ca||(Ca=b.createElement(to,null))),b.createElement("div",{ref:k,id:W,className:`${L}--tile-content`},K[1])))});Ia.propTypes={children:h().node,className:h().string,decorator:h().node,expanded:h().bool,hasRoundedCorners:h().bool,id:h().string,light:ht(h().bool),onClick:h().func,onKeyUp:h().func,slug:ht(h().node),tabIndex:h().number,tileCollapsedIconText:h().string,tileCollapsedLabel:h().string,tileExpandedIconText:h().string,tileExpandedLabel:h().string},Ia.displayName="ExpandableTile";const Na=b.forwardRef(({children:e},t)=>{const n=O();return b.createElement("div",{ref:t,className:`${n}--tile-content__above-the-fold`},e)});Na.propTypes={children:h().node},Na.displayName="TileAboveTheFoldContent";const ja=b.forwardRef(({children:e},t)=>{const n=O();return b.createElement("div",{ref:t,className:`${n}--tile-content__below-the-fold`},e)});ja.propTypes={children:h().node},ja.displayName="TileBelowTheFoldContent";const ka=({className:e,children:t,...n})=>{const r=O(),o=v()(`${r}--header`,e);return b.createElement("header",d({},n,{className:o}),t)};ka.propTypes={"aria-label":h().string,"aria-labelledby":h().string,className:h().string};const Ra=(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":h().string,"aria-labelledby":h().string}),$a=b.forwardRef(({"aria-label":e,"aria-labelledby":t,children:n,className:r,onClick:o,tooltipHighContrast:i=!0,tooltipDropShadow:s,isActive:a,tooltipAlignment:c,...u},l)=>{const f=O(),p=v()({[r]:!!r,[`${f}--header__action`]:!0,[`${f}--header__action--active`]:a}),h={"aria-label":e,"aria-labelledby":t};return b.createElement(Yt,d({},u,h,{className:p,onClick:o,type:"button",hasIconOnly:!0,size:"lg",kind:"ghost",iconDescription:e,tooltipPosition:"bottom",tooltipAlignment:c,tooltipDropShadow:s,tooltipHighContrast:i,ref:l}),n)});$a.propTypes={...Ra,children:h().node.isRequired,className:h().string,isActive:h().bool,onClick:h().func,tooltipAlignment:h().oneOf(["start","center","end"]),tooltipDropShadow:h().bool,tooltipHighContrast:h().bool},$a.displayName="HeaderGlobalAction";const Ma=(({name:e,className:t,type:n})=>{function r({className:e,...r}){const o=O(),i=v()("function"==typeof t?t(o):t,e);return b.createElement(n,{...r,className:i||void 0})}return r.displayName=e,r.propTypes={className:h().string},r})({name:"HeaderGlobalBar",className:e=>`${e}--header__global`,type:"div"});var Da,La,Ba=n(810);function Va({"aria-label":e,"aria-labelledby":t,className:n,renderMenuIcon:r,renderCloseIcon:o,isActive:i,isCollapsible:s,...a}){const c=O(),u=v()({..."string"==typeof n&&{[n]:!!n},[`${c}--header__action`]:!0,[`${c}--header__menu-trigger`]:!0,[`${c}--header__action--active`]:i,[`${c}--header__menu-toggle`]:!0,[`${c}--header__menu-toggle__hidden`]:!s}),l=r||Da||(Da=b.createElement(Ba.W1,{size:20})),f=o||La||(La=b.createElement(oo,{size:20}));return b.createElement("button",d({},a,{"aria-label":e,"aria-labelledby":t,className:u,title:e,type:"button"}),i?f:l)}Va.propTypes={...Ra,className:h().string,isActive:h().bool,isCollapsible:h().bool,onClick:h().func};const Fa=(0,b.forwardRef)((e,t)=>{const{element:n,as:r,isSideNavExpanded:o,...i}=e,s=r??n??"a";return b.createElement(s,d({ref:t},i))}),za={as:h().elementType,element:ht(h().elementType),isSideNavExpanded:h().bool};function Ua({children:e,className:t,prefix:n="IBM",...r}){const o=O(),i=v()(`${o}--header__name`,t);return b.createElement(Fa,d({},r,{className:i}),n&&b.createElement(b.Fragment,null,b.createElement("span",{className:`${o}--header__name--prefix`},n)," "),b.createElement("span",null,e))}Fa.displayName="Link",Fa.propTypes=za,Ua.propTypes={...za,children:h().node.isRequired,className:h().string,href:h().string,prefix:h().string};const Ka=(0,b.createContext)({}),Wa=({children:e,isRail:t,isSideNavExpanded:n})=>b.createElement(Ka.Provider,{value:{isRail:t,isSideNavExpanded:n}},e),Ha=(0,b.forwardRef)((e,t)=>{const{expanded:n,defaultExpanded:r=!1,isChildOfHeader:o=!0,"aria-label":i,"aria-labelledby":s,children:a,onToggle:c,className:u,href:l,isFixedNav:f=!1,isRail:p,isPersistent:h=!0,addFocusListeners:y=!0,addMouseListeners:m=!0,onOverlayClick:g,onSideNavBlur:_,enterDelayMs:w=100,...E}=e,S=O(),{current:C}=(0,b.useRef)(void 0!==n),[P,T]=Nt(r),[I,N]=Nt(r),j=C?n:P,k=(0,b.useRef)(null),R=x([k,t]),$=(e,t=!j)=>{C||T(t,w),c&&c(e,t),(C||p)&&N(t,w)},M={"aria-label":i,"aria-labelledby":s},D=v()(u,{[`${S}--side-nav`]:!0,[`${S}--side-nav--expanded`]:j||I,[`${S}--side-nav--collapsed`]:!j&&f,[`${S}--side-nav--rail`]:p,[`${S}--side-nav--ux`]:o,[`${S}--side-nav--hidden`]:!h}),L=v()({[`${S}--side-nav__overlay`]:!0,[`${S}--side-nav__overlay-active`]:j||I}),B=C&&I||j,V={};y&&(V.onFocus=e=>{!e.currentTarget.contains(e.relatedTarget)&&p&&$(e,!0)},V.onBlur=e=>{e.currentTarget.contains(e.relatedTarget)||$(e,!1),e.currentTarget.contains(e.relatedTarget)||!j||f||_&&_()},V.onKeyDown=e=>{It(e,xt)&&($(e,!1),l&&(window.location.href=l))}),m&&p&&(V.onMouseEnter=()=>{$(!0,!0)},V.onMouseLeave=()=>{T(!1),N(!1),$(!1,!1)},V.onClick=()=>{T(!0),N(!0),$(!0,!0)}),A("keydown",e=>{const t=document.activeElement;It(e,_t)&&j&&!f&&k.current&&t?.classList.contains(`${S}--header__menu-toggle`)&&!t.closest("nav")&&k.current.focus()});const F=`(min-width: ${$s.width})`,z=Us(F),U=!p&&!(j||z);return(0,b.useEffect)(()=>{const e=k.current;e&&(U?e.setAttribute("inert",""):e.removeAttribute("inert"))},[U]),b.createElement(Wa,{isRail:p,isSideNavExpanded:B},f?null:b.createElement("div",{className:L,onClick:g}),b.createElement("nav",d({tabIndex:-1,ref:R,className:`${S}--side-nav__navigation ${D}`},M,V,E),a))});Ha.displayName="SideNav",Ha.propTypes={...Ra,addFocusListeners:h().bool,addMouseListeners:h().bool,className:h().string,defaultExpanded:h().bool,enterDelayMs:h().number,expanded:h().bool,href:h().string,isChildOfHeader:h().bool,isFixedNav:h().bool,isPersistent:h().bool,isRail:h().bool,onOverlayClick:h().func,onSideNavBlur:h().func,onToggle:h().func}},5885(e,t,n){"use strict";n.d(t,{B4:()=>l,D3:()=>a,jX:()=>i,jj:()=>c,sM:()=>u,uA:()=>s});var r=n(8249);const o={flags:function(){const e={};for(const t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){const n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()},i=(0,r.jf)("feature-flags",o);function s(e,t,n){i.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function a(){const e=i.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{const n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function c(e){return i.getState().flags[e].enabled}function u(e,t){i.subscribe(n=>{t(n.flags[e].enabled)})}function l(e,t){i.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}i.subscribe(e=>{for(const[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))})},7581(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},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,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"},115(e){var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var a,c,u,l;if(Array.isArray(e)){if((a=e.length)!=s.length)return!1;for(c=a;0!==c--;)if(!i(e[c],s[c]))return!1;return!0}if(n&&e instanceof Map&&s instanceof Map){if(e.size!==s.size)return!1;for(l=e.entries();!(c=l.next()).done;)if(!s.has(c.value[0]))return!1;for(l=e.entries();!(c=l.next()).done;)if(!i(c.value[1],s.get(c.value[0])))return!1;return!0}if(r&&e instanceof Set&&s instanceof Set){if(e.size!==s.size)return!1;for(l=e.entries();!(c=l.next()).done;)if(!s.has(c.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(s)){if((a=e.length)!=s.length)return!1;for(c=a;0!==c--;)if(e[c]!==s[c])return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof s.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof s.toString)return e.toString()===s.toString();if((a=(u=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(c=a;0!==c--;)if(!Object.prototype.hasOwnProperty.call(s,u[c]))return!1;if(t&&e instanceof Element)return!1;for(c=a;0!==c--;)if(("_owner"!==u[c]&&"__v"!==u[c]&&"__o"!==u[c]||!e.$$typeof)&&!i(e[u[c]],s[u[c]]))return!1;return!0}return e!=e&&s!=s}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)},9850(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(3207),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return o(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),s.Subscription.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),s.Subscription.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.Subject);t.AsyncSubject=a},466(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(6967),a=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.ObjectUnsubscribedError;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i.Subject);t.BehaviorSubject=a},4470(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(n(1396).Subscriber);t.InnerSubscriber=i},6765(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(453),i=n(7795),s=n(1576);(r=t.NotificationKind||(t.NotificationKind={})).NEXT="N",r.ERROR="E",r.COMPLETE="C";var a=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return i.of(this.value);case"E":return s.throwError(this.error);case"C":return o.empty()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}();t.Notification=a},2515(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4487),o=n(5158),i=n(6676),s=n(8173),a=n(3344),c=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=o.toSubscriber(e,t,n);if(r?i.add(r.call(i,this.source)):i.add(this.source||a.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),a.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){a.config.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),r.canReportError(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=u(t))(function(t,r){var o;o=n.subscribe(function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[i.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=u(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function u(e){if(e||(e=a.config.Promise||Promise),!e)throw new Error("no Promise impl found");return e}t.Observable=c},2544(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3344),o=n(4163);t.empty={closed:!0,next:function(e){},error:function(e){if(r.config.useDeprecatedSynchronousErrorHandling)throw e;o.hostReportError(e)},complete:function(){}}},5905(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(n(1396).Subscriber);t.OuterSubscriber=i},2173(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(5677),a=n(3207),c=n(5495),u=n(6967),l=n(3601),f=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=e.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=t<1?1:t,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o}return o(t,e),t.prototype.nextInfiniteTimeWindow=function(t){if(!this.isStopped){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new d(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),o=this.scheduler,i=r.length;if(this.closed)throw new u.ObjectUnsubscribedError;if(this.isStopped||this.hasError?t=a.Subscription.EMPTY:(this.observers.push(e),t=new l.SubjectSubscription(this,e)),o&&e.add(e=new c.ObserveOnSubscriber(e,o)),n)for(var s=0;s<i&&!e.closed;s++)e.next(r[s]);else for(s=0;s<i&&!e.closed;s++)e.next(r[s].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||s.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,o=r.length,i=0;i<o&&!(e-r[i].time<n);)i++;return o>t&&(i=Math.max(i,o-t)),i>0&&r.splice(0,i),r},t}(i.Subject);t.ReplaySubject=f;var d=function(e,t){this.time=e,this.value=t}},3849(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=function(){return Date.now()},e}();t.Scheduler=n},2888(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2515),s=n(1396),a=n(3207),c=n(6967),u=n(3601),l=n(4421),f=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return o(t,e),t}(s.Subscriber);t.SubjectSubscriber=f;var d=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype[l.rxSubscriber]=function(){return new f(this)},t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new c.ObjectUnsubscribedError;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new c.ObjectUnsubscribedError;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new c.ObjectUnsubscribedError;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new c.ObjectUnsubscribedError;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new c.ObjectUnsubscribedError;return this.hasError?(e.error(this.thrownError),a.Subscription.EMPTY):this.isStopped?(e.complete(),a.Subscription.EMPTY):(this.observers.push(e),new u.SubjectSubscription(this,e))},t.prototype.asObservable=function(){var e=new i.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(i.Observable);t.Subject=d;var p=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):a.Subscription.EMPTY},t}(d);t.AnonymousSubject=p},3601(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return o(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(n(3207).Subscription);t.SubjectSubscription=i},1396(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3385),s=n(2544),a=n(3207),c=n(4421),u=n(3344),l=n(4163),f=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=s.empty;break;case 1:if(!n){i.destination=s.empty;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new d(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new d(i,n,r,o)}return i}return o(t,e),t.prototype[c.rxSubscriber]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(a.Subscription);t.Subscriber=f;var d=function(e){function t(t,n,r,o){var a,c=e.call(this)||this;c._parentSubscriber=t;var u=c;return i.isFunction(n)?a=n:n&&(a=n.next,r=n.error,o=n.complete,n!==s.empty&&(u=Object.create(n),i.isFunction(u.unsubscribe)&&c.add(u.unsubscribe.bind(u)),u.unsubscribe=c.unsubscribe.bind(c))),c._context=u,c._next=a,c._error=r,c._complete=o,c}return o(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=u.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):l.hostReportError(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;l.hostReportError(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};u.config.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.config.useDeprecatedSynchronousErrorHandling)throw e;l.hostReportError(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return u.config.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(l.hostReportError(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(f);t.SafeSubscriber=d},3207(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4728),o=n(194),i=n(3385),s=n(1245),a=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,a=n._parentOrParents,u=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof e)a.remove(this);else if(null!==a)for(var d=0;d<a.length;++d)a[d].remove(this);if(i.isFunction(l)){u&&(this._unsubscribe=void 0);try{l.call(this)}catch(e){t=e instanceof s.UnsubscriptionError?c(e.errors):[e]}}if(r.isArray(f)){d=-1;for(var p=f.length;++d<p;){var h=f[d];if(o.isObject(h))try{h.unsubscribe()}catch(e){t=t||[],e instanceof s.UnsubscriptionError?t=t.concat(c(e.errors)):t.push(e)}}}if(t)throw new s.UnsubscriptionError(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function c(e){return e.reduce(function(e,t){return e.concat(t instanceof s.UnsubscriptionError?t.errors:t)},[])}t.Subscription=a},3344(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=!1;t.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=e},get useDeprecatedSynchronousErrorHandling(){return n}}},4398(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(2515),a=n(7092),c=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(e)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},t}(i.Subscriber);t.SimpleInnerSubscriber=c;var u=function(e){function t(t,n,r){var o=e.call(this)||this;return o.parent=t,o.outerValue=n,o.outerIndex=r,o}return o(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this)},t.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(i.Subscriber);t.ComplexInnerSubscriber=u;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.destination.complete()},t}(i.Subscriber);t.SimpleOuterSubscriber=l;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.notifyNext=function(e,t,n,r){this.destination.next(t)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(i.Subscriber);t.ComplexOuterSubscriber=f,t.innerSubscribe=function(e,t){if(!t.closed){if(e instanceof s.Observable)return e.subscribe(t);var n;try{n=a.subscribeTo(e)(t)}catch(e){t.error(e)}return n}}},2871(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i,s=n(2888),a=n(2515),c=n(1396),u=n(3207),l=n(6888),f=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return o(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new u.Subscription).add(this.source.subscribe(new d(this.getSubject(),this))),e.closed&&(this._connection=null,e=u.Subscription.EMPTY)),e},t.prototype.refCount=function(){return l.refCount()(this)},t}(a.Observable);t.ConnectableObservable=f,t.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(i=f.prototype)._subscribe},_isComplete:{value:i._isComplete,writable:!0},getSubject:{value:i.getSubject},connect:{value:i.connect},refCount:{value:i.refCount}};var d=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return o(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(s.SubjectSubscriber);!function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}(c.Subscriber)},8072(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2515),s=n(2745),a=n(5390),c=function(e){function t(t,n,r){void 0===n&&(n=0),void 0===r&&(r=s.asap);var o=e.call(this)||this;return o.source=t,o.delayTime=n,o.scheduler=r,(!a.isNumeric(n)||n<0)&&(o.delayTime=0),r&&"function"==typeof r.schedule||(o.scheduler=s.asap),o}return o(t,e),t.create=function(e,n,r){return void 0===n&&(n=0),void 0===r&&(r=s.asap),new t(e,n,r)},t.dispatch=function(e){var t=e.source,n=e.subscriber;return this.add(t.subscribe(n))},t.prototype._subscribe=function(e){var n=this.delayTime,r=this.source;return this.scheduler.schedule(t.dispatch,n,{source:r,subscriber:e})},t}(i.Observable);t.SubscribeOnObservable=c},278(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(8244),s=n(4728),a=n(5905),c=n(7849),u=n(5853),l={};t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=void 0,r=void 0;return i.isScheduler(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&s.isArray(e[0])&&(e=e[0]),u.fromArray(e,r).lift(new f(n))};var f=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.resultSelector))},e}();t.CombineLatestOperator=f;var d=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return o(t,e),t.prototype._next=function(e){this.values.push(l),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(c.subscribeToResult(this,r,void 0,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n){var r=this.values,o=r[n],i=this.toRespond?o===l?--this.toRespond:this.toRespond:0;r[n]=t,0===i&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(a.OuterSubscriber);t.CombineLatestSubscriber=d},5434(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7795),o=n(6345);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concatAll()(r.of.apply(void 0,e))}},3180(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(4098),i=n(453);t.defer=function(e){return new r.Observable(function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?o.from(n):i.empty()).subscribe(t)})}},453(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515);t.EMPTY=new r.Observable(function(e){return e.complete()}),t.empty=function(e){return e?function(e){return new r.Observable(function(t){return e.schedule(function(){return t.complete()})})}(e):t.EMPTY}},4098(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(7092),i=n(7315);t.from=function(e,t){return t?i.scheduled(e,t):e instanceof r.Observable?e:new r.Observable(o.subscribeTo(e))}},5853(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(499),i=n(8822);t.fromArray=function(e,t){return t?i.scheduleArray(e,t):new r.Observable(o.subscribeToArray(e))}},5776(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(8244),i=n(9287),s=n(5853);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,a=null,c=e[e.length-1];return o.isScheduler(c)?(a=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof c&&(n=e.pop()),null===a&&1===e.length&&e[0]instanceof r.Observable?e[0]:i.mergeAll(n)(s.fromArray(e,a))}},7795(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8244),o=n(5853),i=n(8822);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return r.isScheduler(n)?(e.pop(),i.scheduleArray(e,n)):o.fromArray(e)}},3827(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4728),s=n(5853),a=n(5905),c=n(7849);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!i.isArray(e[0]))return e[0];e=e[0]}return s.fromArray(e,void 0).lift(new u)};var u=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new l(e))},e}();t.RaceOperator=u;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],o=c.subscribeToResult(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(o),this.add(o)}this.observables=null}},t.prototype.notifyNext=function(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var o=this.subscriptions[r];o.unsubscribe(),this.remove(o)}this.subscriptions=null}this.destination.next(t)},t}(a.OuterSubscriber);t.RaceSubscriber=l},1576(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515);function o(e){var t=e.error;e.subscriber.error(t)}t.throwError=function(e,t){return t?new r.Observable(function(n){return t.schedule(o,0,{error:e,subscriber:n})}):new r.Observable(function(t){return t.error(e)})}},4529(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(5190),i=n(5390),s=n(8244);function a(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}t.timer=function(e,t,n){void 0===e&&(e=0);var c=-1;return i.isNumeric(t)?c=Number(t)<1?1:Number(t):s.isScheduler(t)&&(n=t),s.isScheduler(n)||(n=o.async),new r.Observable(function(t){var r=i.isNumeric(e)?e:+e-n.now();return n.schedule(a,r,{index:0,period:c,subscriber:t})})}},887(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5853),s=n(4728),a=n(1396),c=n(7211),u=n(4398);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),i.fromArray(e,void 0).lift(new l(n))};var l=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new f(e,this.resultSelector))},e}();t.ZipOperator=l;var f=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var o=e.call(this,t)||this;return o.resultSelector=n,o.iterators=[],o.active=0,o.resultSelector="function"==typeof n?n:void 0,o}return o(t,e),t.prototype._next=function(e){var t=this.iterators;s.isArray(e)?t.push(new p(e)):"function"==typeof e[c.iterator]?t.push(new d(e[c.iterator]())):t.push(new h(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(this.unsubscribe(),0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++)if("function"==typeof(s=e[r]).hasValue&&!s.hasValue())return;var o=!1,i=[];for(r=0;r<t;r++){var s,a=(s=e[r]).next();if(s.hasCompleted()&&(o=!0),a.done)return void n.complete();i.push(a.value)}this.resultSelector?this._tryresultSelector(i):n.next(i),o&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(a.Subscriber);t.ZipSubscriber=f;var d=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return Boolean(e&&e.done)},e}(),p=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[c.iterator]=function(){return this},e.prototype.next=function(e){var t=this.index++,n=this.array;return t<this.length?{value:n[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),h=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.parent=n,o.observable=r,o.stillUnsubscribed=!0,o.buffer=[],o.isComplete=!1,o}return o(t,e),t.prototype[c.iterator]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e){this.buffer.push(e),this.parent.checkIterators()},t.prototype.subscribe=function(){return u.innerSubscribe(this.observable,new u.SimpleInnerSubscriber(this))},t}(u.SimpleOuterSubscriber)},8461(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.audit=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.durationSelector))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){if(this.value=e,this.hasValue=!0,!this.throttled){var t=void 0;try{t=(0,this.durationSelector)(e)}catch(e){return this.destination.error(e)}var n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},t.prototype.clearThrottle=function(){var e=this,t=e.value,n=e.hasValue,r=e.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))},t.prototype.notifyNext=function(){this.clearThrottle()},t.prototype.notifyComplete=function(){this.clearThrottle()},t}(i.SimpleOuterSubscriber)},2392(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5190),o=n(8461),i=n(4529);t.auditTime=function(e,t){return void 0===t&&(t=r.async),o.audit(function(){return i.timer(e,t)})}},7954(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.buffer=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.closingNotifier=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.closingNotifier))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.buffer=[],r.add(i.innerSubscribe(n,new i.SimpleInnerSubscriber(r))),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype.notifyNext=function(){var e=this.buffer;this.buffer=[],this.destination.next(e)},t}(i.SimpleOuterSubscriber)},647(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.bufferCount=function(e,t){return void 0===t&&(t=null),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.bufferSize=e,this.startBufferEvery=t,this.subscriberClass=t&&e!==t?c:a}return e.prototype.call=function(e,t){return t.subscribe(new this.subscriberClass(e,this.bufferSize,this.startBufferEvery))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.bufferSize=n,r.buffer=[],r}return o(t,e),t.prototype._next=function(e){var t=this.buffer;t.push(e),t.length==this.bufferSize&&(this.destination.next(t),this.buffer=[])},t.prototype._complete=function(){var t=this.buffer;t.length>0&&this.destination.next(t),e.prototype._complete.call(this)},t}(i.Subscriber),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.bufferSize=n,o.startBufferEvery=r,o.buffers=[],o.count=0,o}return o(t,e),t.prototype._next=function(e){var t=this,n=t.bufferSize,r=t.startBufferEvery,o=t.buffers,i=t.count;this.count++,i%r===0&&o.push([]);for(var s=o.length;s--;){var a=o[s];a.push(e),a.length===n&&(o.splice(s,1),this.destination.next(a))}},t.prototype._complete=function(){for(var t=this.buffers,n=this.destination;t.length>0;){var r=t.shift();r.length>0&&n.next(r)}e.prototype._complete.call(this)},t}(i.Subscriber)},6327(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5190),s=n(1396),a=n(8244);t.bufferTime=function(e){var t=arguments.length,n=i.async;a.isScheduler(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],t--);var r=null;t>=2&&(r=arguments[1]);var o=Number.POSITIVE_INFINITY;return t>=3&&(o=arguments[2]),function(t){return t.lift(new c(e,r,o,n))}};var c=function(){function e(e,t,n,r){this.bufferTimeSpan=e,this.bufferCreationInterval=t,this.maxBufferSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},e}(),u=function(){this.buffer=[]},l=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=o,s.scheduler=i,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var c={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=i.schedule(f,n,c))}else{var u={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:i};s.add(a.closeAction=i.schedule(p,n,u)),s.add(i.schedule(d,r,l))}return s}return o(t,e),t.prototype._next=function(e){for(var t,n=this.contexts,r=n.length,o=0;o<r;o++){var i=n[o],s=i.buffer;s.push(e),s.length==this.maxBufferSize&&(t=i)}t&&this.onBufferFull(t)},t.prototype._error=function(t){this.contexts.length=0,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts,n=this.destination;t.length>0;){var r=t.shift();n.next(r.buffer)}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.contexts=null},t.prototype.onBufferFull=function(e){this.closeContext(e);var t=e.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){e=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:e,bufferTimeSpan:n};this.add(e.closeAction=this.scheduler.schedule(f,n,r))}},t.prototype.openContext=function(){var e=new u;return this.contexts.push(e),e},t.prototype.closeContext=function(e){this.destination.next(e.buffer);var t=this.contexts;(t?t.indexOf(e):-1)>=0&&t.splice(t.indexOf(e),1)},t}(s.Subscriber);function f(e){var t=e.subscriber,n=e.context;n&&t.closeContext(n),t.closed||(e.context=t.openContext(),e.context.closeAction=this.schedule(e,e.bufferTimeSpan))}function d(e){var t=e.bufferCreationInterval,n=e.bufferTimeSpan,r=e.subscriber,o=e.scheduler,i=r.openContext();r.closed||(r.add(i.closeAction=o.schedule(p,n,{subscriber:r,context:i})),this.schedule(e,t))}function p(e){var t=e.subscriber,n=e.context;t.closeContext(n)}},6786(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3207),s=n(7849),a=n(5905);t.bufferToggle=function(e,t){return function(n){return n.lift(new c(e,t))}};var c=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.openings,this.closingSelector))},e}(),u=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.closingSelector=r,o.contexts=[],o.add(s.subscribeToResult(o,n)),o}return o(t,e),t.prototype._next=function(e){for(var t=this.contexts,n=t.length,r=0;r<n;r++)t[r].buffer.push(e)},t.prototype._error=function(t){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,e.prototype._error.call(this,t)},t.prototype._complete=function(){for(var t=this.contexts;t.length>0;){var n=t.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,e.prototype._complete.call(this)},t.prototype.notifyNext=function(e,t){e?this.closeBuffer(e):this.openBuffer(t)},t.prototype.notifyComplete=function(e){this.closeBuffer(e.context)},t.prototype.openBuffer=function(e){try{var t=this.closingSelector.call(this,e);t&&this.trySubscribe(t)}catch(e){this._error(e)}},t.prototype.closeBuffer=function(e){var t=this.contexts;if(t&&e){var n=e.buffer,r=e.subscription;this.destination.next(n),t.splice(t.indexOf(e),1),this.remove(r),r.unsubscribe()}},t.prototype.trySubscribe=function(e){var t=this.contexts,n=new i.Subscription,r={buffer:[],subscription:n};t.push(r);var o=s.subscribeToResult(this,e,r);!o||o.closed?this.closeBuffer(r):(o.context=r,this.add(o),n.add(o))},t}(a.OuterSubscriber)},1662(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3207),s=n(4398);t.bufferWhen=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.closingSelector))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return o(t,e),t.prototype._next=function(e){this.buffer.push(e)},t.prototype._complete=function(){var t=this.buffer;t&&this.destination.next(t),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},t.prototype.notifyNext=function(){this.openBuffer()},t.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},t.prototype.openBuffer=function(){var e=this.closingSubscription;e&&(this.remove(e),e.unsubscribe());var t,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{t=(0,this.closingSelector)()}catch(e){return this.error(e)}e=new i.Subscription,this.closingSubscription=e,this.add(e),this.subscribing=!0,e.add(s.innerSubscribe(t,new s.SimpleInnerSubscriber(this))),this.subscribing=!1},t}(s.SimpleOuterSubscriber)},5503(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.catchError=function(e){return function(t){var n=new s(e),r=t.lift(n);return n.caught=r}};var s=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.selector,this.caught))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.selector=n,o.caught=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(t){return void e.prototype.error.call(this,t)}this._unsubscribeAndRecycle();var r=new i.SimpleInnerSubscriber(this);this.add(r);var o=i.innerSubscribe(n,r);o!==r&&this.add(o)}},t}(i.SimpleOuterSubscriber)},4908(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(278);t.combineAll=function(e){return function(t){return t.lift(new r.CombineLatestOperator(e))}}},9060(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4728),o=n(278),i=n(4098);t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null;return"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&r.isArray(e[0])&&(e=e[0].slice()),function(t){return t.lift.call(i.from([t].concat(e)),new o.CombineLatestOperator(n))}}},6600(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5434);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.concat.apply(void 0,[t].concat(e)))}}},6345(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9287);t.concatAll=function(){return r.mergeAll(1)}},2248(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5206);t.concatMap=function(e,t){return r.mergeMap(e,t,1)}},3577(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2248);t.concatMapTo=function(e,t){return r.concatMap(function(){return e},t)}},8765(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.count=function(e){return function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.source))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.count=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.predicate?this._tryPredicate(e):this.count++},t.prototype._tryPredicate=function(e){var t;try{t=this.predicate(e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t&&this.count++},t.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},t}(i.Subscriber)},3287(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.debounce=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.durationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.durationSelector))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.durationSelector=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){try{var t=this.durationSelector.call(this,e);t&&this._tryNext(e,t)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.emitValue(),this.destination.complete()},t.prototype._tryNext=function(e,t){var n=this.durationSubscription;this.value=e,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))&&!n.closed&&this.add(this.durationSubscription=n)},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){if(this.hasValue){var t=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,e.prototype._next.call(this,t)}},t}(i.SimpleOuterSubscriber)},8066(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(5190);t.debounceTime=function(e,t){return void 0===t&&(t=s.async),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.dueTime=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.dueTime,this.scheduler))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.dueTime=n,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return o(t,e),t.prototype._next=function(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(u,this.dueTime,this))},t.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},t.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var e=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}},t.prototype.clearDebounce=function(){var e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)},t}(i.Subscriber);function u(e){e.debouncedNext()}},2767(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.defaultIfEmpty=function(e){return void 0===e&&(e=null),function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.defaultValue))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return o(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(i.Subscriber)},6965(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5190),s=n(4465),a=n(1396),c=n(6765);t.delay=function(e,t){void 0===t&&(t=i.async);var n=s.isDate(e)?+e-t.now():Math.abs(e);return function(e){return e.lift(new u(n,t))}};var u=function(){function e(e,t){this.delay=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.delay,this.scheduler))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.delay=n,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return o(t,e),t.dispatch=function(e){for(var t=e.source,n=t.queue,r=e.scheduler,o=e.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var i=Math.max(0,n[0].time-r.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,n=new f(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(c.Notification.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(c.Notification.createComplete()),this.unsubscribe()},t}(a.Subscriber),f=function(e,t){this.time=e,this.notification=t}},9861(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(2515),a=n(5905),c=n(7849);t.delayWhen=function(e,t){return t?function(n){return new f(n,t).lift(new u(e))}:function(t){return t.lift(new u(e))}};var u=function(){function e(e){this.delayDurationSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.delayDurationSelector))},e}(),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.destination.next(e),this.removeSubscription(o),this.tryComplete()},t.prototype.notifyError=function(e,t){this._error(e)},t.prototype.notifyComplete=function(e){var t=this.removeSubscription(e);t&&this.destination.next(t),this.tryComplete()},t.prototype._next=function(e){var t=this.index++;try{var n=this.delayDurationSelector(e,t);n&&this.tryDelay(n,e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},t.prototype.removeSubscription=function(e){e.unsubscribe();var t=this.delayNotifierSubscriptions.indexOf(e);return-1!==t&&this.delayNotifierSubscriptions.splice(t,1),e.outerValue},t.prototype.tryDelay=function(e,t){var n=c.subscribeToResult(this,e,t);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},t.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},t}(a.OuterSubscriber),f=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subscriptionDelay=n,r}return o(t,e),t.prototype._subscribe=function(e){this.subscriptionDelay.subscribe(new d(e,this.source))},t}(s.Observable),d=function(e){function t(t,n){var r=e.call(this)||this;return r.parent=t,r.source=n,r.sourceSubscribed=!1,r}return o(t,e),t.prototype._next=function(e){this.subscribeToSource()},t.prototype._error=function(e){this.unsubscribe(),this.parent.error(e)},t.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},t.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},t}(i.Subscriber)},7642(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.dematerialize=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new a(e))},e}(),a=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){e.observe(this.destination)},t}(i.Subscriber)},8820(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.distinct=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.keySelector=e,this.flushes=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.keySelector,this.flushes))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=n,o.values=new Set,r&&o.add(i.innerSubscribe(r,new i.SimpleInnerSubscriber(o))),o}return o(t,e),t.prototype.notifyNext=function(){this.values.clear()},t.prototype.notifyError=function(e){this._error(e)},t.prototype._next=function(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)},t.prototype._useKeySelector=function(e){var t,n=this.destination;try{t=this.keySelector(e)}catch(e){return void n.error(e)}this._finalizeNext(t,e)},t.prototype._finalizeNext=function(e,t){var n=this.values;n.has(e)||(n.add(e),this.destination.next(t))},t}(i.SimpleOuterSubscriber);t.DistinctSubscriber=a},1772(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.distinctUntilChanged=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.compare=e,this.keySelector=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.compare,this.keySelector))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.keySelector=r,o.hasKey=!1,"function"==typeof n&&(o.compare=n),o}return o(t,e),t.prototype.compare=function(e,t){return e===t},t.prototype._next=function(e){var t;try{var n=this.keySelector;t=n?n(e):e}catch(e){return this.destination.error(e)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,t)}catch(e){return this.destination.error(e)}else this.hasKey=!0;r||(this.key=t,this.destination.next(e))},t}(i.Subscriber)},5075(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1772);t.distinctUntilKeyChanged=function(e,t){return r.distinctUntilChanged(function(n,r){return t?t(n[e],r[e]):n[e]===r[e]})}},2399(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7568),o=n(2670),i=n(2056),s=n(2767),a=n(1231);t.elementAt=function(e,t){if(e<0)throw new r.ArgumentOutOfRangeError;var n=arguments.length>=2;return function(c){return c.pipe(o.filter(function(t,n){return n===e}),a.take(1),n?s.defaultIfEmpty(t):i.throwIfEmpty(function(){return new r.ArgumentOutOfRangeError}))}}},2631(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5434),o=n(7795);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return r.concat(t,o.of.apply(void 0,e))}}},7233(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.every=function(e,t){return function(n){return n.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.thisArg,this.source))},e}(),a=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.source=o,i.index=0,i.thisArg=r||i,i}return o(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},2408(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.exhaust=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new a(e))},e}(),a=function(e){function t(t){var n=e.call(this,t)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return o(t,e),t.prototype._next=function(e){this.hasSubscription||(this.hasSubscription=!0,this.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this))))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(i.SimpleOuterSubscriber)},1112(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(6808),s=n(4098),a=n(4398);t.exhaustMap=function e(t,n){return n?function(r){return r.pipe(e(function(e,r){return s.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new c(t))}};var c=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return o(t,e),t.prototype._next=function(e){this.hasSubscription||this.tryNext(e)},t.prototype.tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.hasSubscription=!0,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new a.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=a.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyError=function(e){this.destination.error(e)},t.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},t}(a.SimpleOuterSubscriber)},7736(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.expand=function(e,t,n){return void 0===t&&(t=Number.POSITIVE_INFINITY),t=(t||0)<1?Number.POSITIVE_INFINITY:t,function(r){return r.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){this.project=e,this.concurrent=t,this.scheduler=n}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.concurrent,this.scheduler))},e}();t.ExpandOperator=s;var a=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.scheduler=o,i.index=0,i.active=0,i.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(i.buffer=[]),i}return o(t,e),t.dispatch=function(e){var t=e.subscriber,n=e.result,r=e.value,o=e.index;t.subscribeToProjection(n,r,o)},t.prototype._next=function(e){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(e);try{var o=(0,this.project)(e,r);if(this.scheduler){var i={subscriber:this,result:o,value:e,index:r};this.destination.add(this.scheduler.schedule(t.dispatch,0,i))}else this.subscribeToProjection(o,e,r)}catch(e){n.error(e)}}else this.buffer.push(e)}},t.prototype.subscribeToProjection=function(e,t,n){this.active++,this.destination.add(i.innerSubscribe(e,new i.SimpleInnerSubscriber(this)))},t.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this._next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},t}(i.SimpleOuterSubscriber);t.ExpandSubscriber=a},2670(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.filter=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.thisArg))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(i.Subscriber)},1258(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(3207);t.finalize=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.callback=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.callback))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.add(new s.Subscription(n)),r}return o(t,e),t}(i.Subscriber)},5063(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.find=function(e,t){if("function"!=typeof e)throw new TypeError("predicate is not a function");return function(n){return n.lift(new s(e,n,!1,t))}};var s=function(){function e(e,t,n,r){this.predicate=e,this.source=t,this.yieldIndex=n,this.thisArg=r}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.source,this.yieldIndex,this.thisArg))},e}();t.FindValueOperator=s;var a=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.predicate=n,s.source=r,s.yieldIndex=o,s.thisArg=i,s.index=0,s}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete(),this.unsubscribe()},t.prototype._next=function(e){var t=this.predicate,n=this.thisArg,r=this.index++;try{t.call(n||this,e,r,this.source)&&this.notifyComplete(this.yieldIndex?r:e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},t}(i.Subscriber);t.FindValueSubscriber=a},2939(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5063);t.findIndex=function(e,t){return function(n){return n.lift(new r.FindValueOperator(e,n,!0,t))}}},9948(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1136),o=n(2670),i=n(1231),s=n(2767),a=n(2056),c=n(4579);t.first=function(e,t){var n=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,n){return e(t,n,u)}):c.identity,i.take(1),n?s.defaultIfEmpty(t):a.throwIfEmpty(function(){return new r.EmptyError}))}}},7784(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(3207),a=n(2515),c=n(2888);t.groupBy=function(e,t,n,r){return function(o){return o.lift(new u(e,t,n,r))}};var u=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),l=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=o,s.subjectSelector=i,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return o(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){return void this.error(e)}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||(n=this.groups=new Map);var r,o=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!o){o=this.subjectSelector?this.subjectSelector():new c.Subject,n.set(t,o);var i=new d(t,o,this);if(this.destination.next(i),this.durationSelector){var s=void 0;try{s=this.durationSelector(new d(t,o))}catch(e){return void this.error(e)}this.add(s.subscribe(new f(t,o,this)))}}o.closed||o.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,n){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.Subscriber),f=function(e){function t(t,n,r){var o=e.call(this,n)||this;return o.key=t,o.group=n,o.parent=r,o}return o(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.Subscriber),d=function(e){function t(t,n,r){var o=e.call(this)||this;return o.key=t,o.groupSubject=n,o.refCountSubscription=r,o}return o(t,e),t.prototype._subscribe=function(e){var t=new s.Subscription,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new p(n)),t.add(r.subscribe(e)),t},t}(a.Observable);t.GroupedObservable=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return o(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(s.Subscription)},6863(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.ignoreElements=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new a(e))},e}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._next=function(e){},t}(i.Subscriber)},3371(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.isEmpty=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new a(e))},e}(),a=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.notifyComplete=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype._next=function(e){this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(i.Subscriber)},7064(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1136),o=n(2670),i=n(3439),s=n(2056),a=n(2767),c=n(4579);t.last=function(e,t){var n=arguments.length>=2;return function(u){return u.pipe(e?o.filter(function(t,n){return e(t,n,u)}):c.identity,i.takeLast(1),n?a.defaultIfEmpty(t):s.throwIfEmpty(function(){return new r.EmptyError}))}}},6808(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.map=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))},e}();t.MapOperator=s;var a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return o(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.Subscriber)},3353(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.mapTo=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.value=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.value))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return o(t,e),t.prototype._next=function(e){this.destination.next(this.value)},t}(i.Subscriber)},2539(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(6765);t.materialize=function(){return function(e){return e.lift(new a)}};var a=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}(),c=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype._next=function(e){this.destination.next(s.Notification.createNext(e))},t.prototype._error=function(e){var t=this.destination;t.next(s.Notification.createError(e)),t.complete()},t.prototype._complete=function(){var e=this.destination;e.next(s.Notification.createComplete()),e.complete()},t}(i.Subscriber)},6416(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2518);t.max=function(e){var t="function"==typeof e?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t};return r.reduce(t)}},1570(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5776);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.merge.apply(void 0,[t].concat(e)))}}},9287(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5206),o=n(4579);t.mergeAll=function(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),r.mergeMap(o.identity,e)}},5206(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(6808),s=n(4098),a=n(4398);function c(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(c(function(n,r){return s.from(e(n,r)).pipe(i.map(function(e,o){return t(n,e,r,o)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new u(e,n))})}t.mergeMap=c;var u=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.project,this.concurrent))},e}();t.MergeMapOperator=u;var l=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=e.call(this,t)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return o(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t)},t.prototype._innerSub=function(e){var t=new a.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=a.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},t.prototype.notifyNext=function(e){this.destination.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(a.SimpleOuterSubscriber);t.MergeMapSubscriber=l,t.flatMap=c},9019(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5206);t.mergeMapTo=function(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?r.mergeMap(function(){return e},t,n):("number"==typeof t&&(n=t),r.mergeMap(function(){return e},n))}},2307(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.mergeScan=function(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){this.accumulator=e,this.seed=t,this.concurrent=n}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.accumulator,this.seed,this.concurrent))},e}();t.MergeScanOperator=s;var a=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i.acc=r,i.concurrent=o,i.hasValue=!1,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return o(t,e),t.prototype._next=function(e){if(this.active<this.concurrent){var t=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,e,t)}catch(e){return n.error(e)}this.active++,this._innerSub(r)}else this.buffer.push(e)},t.prototype._innerSub=function(e){var t=new i.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=i.innerSubscribe(e,t);r!==t&&n.add(r)},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},t.prototype.notifyNext=function(e){var t=this.destination;this.acc=e,this.hasValue=!0,t.next(e)},t.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},t}(i.SimpleOuterSubscriber);t.MergeScanSubscriber=a},7198(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2518);t.min=function(e){var t="function"==typeof e?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t};return r.reduce(t)}},4864(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2871);t.multicast=function(e,t){return function(n){var i;if(i="function"==typeof e?e:function(){return e},"function"==typeof t)return n.lift(new o(i,t));var s=Object.create(n,r.connectableObservableDescriptor);return s.source=n,s.subjectFactory=i,s}};var o=function(){function e(e,t){this.subjectFactory=e,this.selector=t}return e.prototype.call=function(e,t){var n=this.selector,r=this.subjectFactory(),o=n(r).subscribe(e);return o.add(t.subscribe(r)),o},e}();t.MulticastOperator=o},5495(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(6765);t.observeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){void 0===t&&(t=0),this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.scheduler,this.delay))},e}();t.ObserveOnOperator=a;var c=function(e){function t(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return o(t,e),t.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(t.dispatch,this.delay,new u(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(s.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(s.Notification.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete()),this.unsubscribe()},t}(i.Subscriber);t.ObserveOnSubscriber=c;var u=function(e,t){this.notification=e,this.destination=t};t.ObserveOnMessage=u},5029(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4098),s=n(4728),a=n(4398);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&s.isArray(e[0])&&(e=e[0]),function(t){return t.lift(new c(e))}},t.onErrorResumeNextStatic=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n;return 1===e.length&&s.isArray(e[0])&&(e=e[0]),n=e.shift(),i.from(n).lift(new c(e))};var c=function(){function e(e){this.nextSources=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextSources))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.nextSources=n,r}return o(t,e),t.prototype.notifyError=function(){this.subscribeToNextSource()},t.prototype.notifyComplete=function(){this.subscribeToNextSource()},t.prototype._error=function(e){this.subscribeToNextSource(),this.unsubscribe()},t.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},t.prototype.subscribeToNextSource=function(){var e=this.nextSources.shift();if(e){var t=new a.SimpleInnerSubscriber(this),n=this.destination;n.add(t);var r=a.innerSubscribe(e,t);r!==t&&n.add(r)}else this.destination.complete()},t}(a.SimpleOuterSubscriber)},7304(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.pairwise=function(){return function(e){return e.lift(new s)}};var s=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new a(e))},e}(),a=function(e){function t(t){var n=e.call(this,t)||this;return n.hasPrev=!1,n}return o(t,e),t.prototype._next=function(e){var t;this.hasPrev?t=[this.prev,e]:this.hasPrev=!0,this.prev=e,t&&this.destination.next(t)},t}(i.Subscriber)},4236(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5352),o=n(2670);t.partition=function(e,t){return function(n){return[o.filter(e,t)(n),o.filter(r.not(e,t))(n)]}}},1075(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6808);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(t){return r.map(function(e,t){return function(n){for(var r=n,o=0;o<t;o++){var i=null!=r?r[e[o]]:void 0;if(void 0===i)return;r=i}return r}}(e,n))(t)}}},5485(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2888),o=n(4864);t.publish=function(e){return e?o.multicast(function(){return new r.Subject},e):o.multicast(new r.Subject)}},91(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(466),o=n(4864);t.publishBehavior=function(e){return function(t){return o.multicast(new r.BehaviorSubject(e))(t)}}},3433(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9850),o=n(4864);t.publishLast=function(){return function(e){return o.multicast(new r.AsyncSubject)(e)}}},9622(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2173),o=n(4864);t.publishReplay=function(e,t,n,i){n&&"function"!=typeof n&&(i=n);var s="function"==typeof n?n:void 0,a=new r.ReplaySubject(e,t,i);return function(e){return o.multicast(function(){return a},s)(e)}}},6721(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4728),o=n(3827);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return 1===e.length&&r.isArray(e[0])&&(e=e[0]),t.lift.call(o.race.apply(void 0,[t].concat(e)))}}},2518(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(253),o=n(3439),i=n(2767),s=n(8173);t.reduce=function(e,t){return arguments.length>=2?function(n){return s.pipe(r.scan(e,t),o.takeLast(1),i.defaultIfEmpty(t))(n)}:function(t){return s.pipe(r.scan(function(t,n,r){return e(t,n,r+1)}),o.takeLast(1))(t)}}},6888(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.refCount=function(){return function(e){return e.lift(new s(e))}};var s=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new a(e,n),o=t.subscribe(r);return r.closed||(r.connection=n.connect()),o},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return o(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(i.Subscriber)},6483(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(453);t.repeat=function(e){return void 0===e&&(e=-1),function(t){return 0===e?s.empty():e<0?t.lift(new a(-1,t)):t.lift(new a(e-1,t))}};var a=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.count,this.source))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.complete=function(){if(!this.isStopped){var t=this.source,n=this.count;if(0===n)return e.prototype.complete.call(this);n>-1&&(this.count=n-1),t.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},283(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(4398);t.repeatWhen=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.notifier,t))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o.sourceIsBeingSubscribedTo=!0,o}return o(t,e),t.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},t.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return e.prototype.complete.call(this)},t.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return e.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},t.prototype._unsubscribe=function(){var e=this.notifications,t=this.retriesSubscription;e&&(e.unsubscribe(),this.notifications=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype._unsubscribeAndRecycle=function(){var t=this._unsubscribe;return this._unsubscribe=null,e.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=t,this},t.prototype.subscribeToRetries=function(){var t;this.notifications=new i.Subject;try{t=(0,this.notifier)(this.notifications)}catch(t){return e.prototype.complete.call(this)}this.retries=t,this.retriesSubscription=s.innerSubscribe(t,new s.SimpleInnerSubscriber(this))},t}(s.SimpleOuterSubscriber)},3160(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.retry=function(e){return void 0===e&&(e=-1),function(t){return t.lift(new s(e,t))}};var s=function(){function e(e,t){this.count=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.count,this.source))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.count=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return e.prototype.error.call(this,t);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},t}(i.Subscriber)},5508(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(4398);t.retryWhen=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.notifier=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.notifier,this.source))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.notifier=n,o.source=r,o}return o(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new i.Subject;try{r=(0,this.notifier)(n)}catch(t){return e.prototype.error.call(this,t)}o=s.innerSubscribe(r,new s.SimpleInnerSubscriber(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(t)}},t.prototype._unsubscribe=function(){var e=this.errors,t=this.retriesSubscription;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},t.prototype.notifyNext=function(){var e=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)},t}(s.SimpleOuterSubscriber)},9373(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.sample=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new a(e),r=t.subscribe(n);return r.add(i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n))),r},e}(),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasValue=!1,t}return o(t,e),t.prototype._next=function(e){this.value=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.emitValue()},t.prototype.notifyComplete=function(){this.emitValue()},t.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},t}(i.SimpleOuterSubscriber)},1183(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(5190);t.sampleTime=function(e,t){return void 0===t&&(t=s.async),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.period=e,this.scheduler=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.period,this.scheduler))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.period=n,o.scheduler=r,o.hasValue=!1,o.add(r.schedule(u,n,{subscriber:o,period:n})),o}return o(t,e),t.prototype._next=function(e){this.lastValue=e,this.hasValue=!0},t.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},t}(i.Subscriber);function u(e){var t=e.subscriber,n=e.period;t.notifyNext(),this.schedule(e,n)}},253(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.scan=function(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new s(e,t,n))}};var s=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.accumulator,this.seed,this.hasSeed))},e}(),a=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.accumulator=n,i._seed=r,i.hasSeed=o,i.index=0,i}return o(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(i.Subscriber)},5017(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.sequenceEqual=function(e,t){return function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.compareTo=e,this.comparator=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.compareTo,this.comparator))},e}();t.SequenceEqualOperator=s;var a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.compareTo=n,o.comparator=r,o._a=[],o._b=[],o._oneComplete=!1,o.destination.add(n.subscribe(new c(t,o))),o}return o(t,e),t.prototype._next=function(e){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(e),this.checkValues())},t.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},t.prototype.checkValues=function(){for(var e=this,t=e._a,n=e._b,r=e.comparator;t.length>0&&n.length>0;){var o=t.shift(),i=n.shift(),s=!1;try{s=r?r(o,i):o===i}catch(e){this.destination.error(e)}s||this.emit(!1)}},t.prototype.emit=function(e){var t=this.destination;t.next(e),t.complete()},t.prototype.nextB=function(e){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(e),this.checkValues())},t.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},t}(i.Subscriber);t.SequenceEqualSubscriber=a;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.parent=n,r}return o(t,e),t.prototype._next=function(e){this.parent.nextB(e)},t.prototype._error=function(e){this.parent.error(e),this.unsubscribe()},t.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},t}(i.Subscriber)},3213(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4864),o=n(6888),i=n(2888);function s(){return new i.Subject}t.share=function(){return function(e){return o.refCount()(r.multicast(s)(e))}}},8614(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2173);t.shareReplay=function(e,t,n){var o;return o=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,o=e.bufferSize,i=void 0===o?Number.POSITIVE_INFINITY:o,s=e.windowTime,a=void 0===s?Number.POSITIVE_INFINITY:s,c=e.refCount,u=e.scheduler,l=0,f=!1,d=!1;return function(e){var o;l++,!t||f?(f=!1,t=new r.ReplaySubject(i,a,u),o=t.subscribe(this),n=e.subscribe({next:function(e){t.next(e)},error:function(e){f=!0,t.error(e)},complete:function(){d=!0,n=void 0,t.complete()}}),d&&(n=void 0)):o=t.subscribe(this),this.add(function(){l--,o.unsubscribe(),o=void 0,n&&!d&&c&&0===l&&(n.unsubscribe(),n=void 0,t=void 0)})}}(o))}}},8480(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(1136);t.single=function(e){return function(t){return t.lift(new a(e,t))}};var a=function(){function e(e,t){this.predicate=e,this.source=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.predicate,this.source))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.source=r,o.seenValue=!1,o.index=0,o}return o(t,e),t.prototype.applySingleValue=function(e){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=e)},t.prototype._next=function(e){var t=this.index++;this.predicate?this.tryNext(e,t):this.applySingleValue(e)},t.prototype.tryNext=function(e,t){try{this.predicate(e,t,this.source)&&this.applySingleValue(e)}catch(e){this.destination.error(e)}},t.prototype._complete=function(){var e=this.destination;this.index>0?(e.next(this.seenValue?this.singleValue:void 0),e.complete()):e.error(new s.EmptyError)},t}(i.Subscriber)},4775(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.skip=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.total=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.total))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){++this.count>this.total&&this.destination.next(e)},t}(i.Subscriber)},2807(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(7568);t.skipLast=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){if(this._skipCount=e,this._skipCount<0)throw new s.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return 0===this._skipCount?t.subscribe(new i.Subscriber(e)):t.subscribe(new c(e,this._skipCount))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return o(t,e),t.prototype._next=function(e){var t=this._skipCount,n=this._count++;if(n<t)this._ring[n]=e;else{var r=n%t,o=this._ring,i=o[r];o[r]=e,this.destination.next(i)}},t}(i.Subscriber)},2519(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.skipUntil=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.notifier))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;r.hasValue=!1;var o=new i.SimpleInnerSubscriber(r);r.add(o),r.innerSubscription=o;var s=i.innerSubscribe(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return o(t,e),t.prototype._next=function(t){this.hasValue&&e.prototype._next.call(this,t)},t.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},4846(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.skipWhile=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate))},e}(),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(e){this.destination.error(e)}},t}(i.Subscriber)},4558(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5434),o=n(8244);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return o.isScheduler(n)?(e.pop(),function(t){return r.concat(e,t,n)}):function(t){return r.concat(e,t)}}},15(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8072);t.subscribeOn=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new o(e,t))}};var o=function(){function e(e,t){this.scheduler=e,this.delay=t}return e.prototype.call=function(e,t){return new r.SubscribeOnObservable(t,this.delay,this.scheduler).subscribe(e)},e}()},5433(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7912),o=n(4579);t.switchAll=function(){return r.switchMap(o.identity)}},7912(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(6808),s=n(4098),a=n(4398);t.switchMap=function e(t,n){return"function"==typeof n?function(r){return r.pipe(e(function(e,r){return s.from(t(e,r)).pipe(i.map(function(t,o){return n(e,t,r,o)}))}))}:function(e){return e.lift(new c(t))}};var c=function(){function e(e){this.project=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.project))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.project=n,r.index=0,r}return o(t,e),t.prototype._next=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this._innerSub(t)},t.prototype._innerSub=function(e){var t=this.innerSubscription;t&&t.unsubscribe();var n=new a.SimpleInnerSubscriber(this),r=this.destination;r.add(n),this.innerSubscription=a.innerSubscribe(e,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},t.prototype._complete=function(){var t=this.innerSubscription;t&&!t.closed||e.prototype._complete.call(this),this.unsubscribe()},t.prototype._unsubscribe=function(){this.innerSubscription=void 0},t.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&e.prototype._complete.call(this)},t.prototype.notifyNext=function(e){this.destination.next(e)},t}(a.SimpleOuterSubscriber)},7865(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7912);t.switchMapTo=function(e,t){return t?r.switchMap(function(){return e},t):r.switchMap(function(){return e})}},1231(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(7568),a=n(453);t.take=function(e){return function(t){return 0===e?a.empty():t.lift(new c(e))}};var c=function(){function e(e){if(this.total=e,this.total<0)throw new s.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(i.Subscriber)},3439(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(7568),a=n(453);t.takeLast=function(e){return function(t){return 0===e?a.empty():t.lift(new c(e))}};var c=function(){function e(e){if(this.total=e,this.total<0)throw new s.ArgumentOutOfRangeError}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.total))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return o(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,o=0;o<n;o++){var i=t++%n;e.next(r[i])}e.complete()},t}(i.Subscriber)},1279(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.takeUntil=function(e){return function(t){return t.lift(new s(e))}};var s=function(){function e(e){this.notifier=e}return e.prototype.call=function(e,t){var n=new a(e),r=i.innerSubscribe(this.notifier,new i.SimpleInnerSubscriber(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n},e}(),a=function(e){function t(t){var n=e.call(this,t)||this;return n.seenValue=!1,n}return o(t,e),t.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},t.prototype.notifyComplete=function(){},t}(i.SimpleOuterSubscriber)},6518(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396);t.takeWhile=function(e,t){return void 0===t&&(t=!1),function(n){return n.lift(new s(e,t))}};var s=function(){function e(e,t){this.predicate=e,this.inclusive=t}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.predicate,this.inclusive))},e}(),a=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.inclusive=r,o.index=0,o}return o(t,e),t.prototype._next=function(e){var t,n=this.destination;try{t=this.predicate(e,this.index++)}catch(e){return void n.error(e)}this.nextOrComplete(e,t)},t.prototype.nextOrComplete=function(e,t){var n=this.destination;Boolean(t)?n.next(e):(this.inclusive&&n.next(e),n.complete())},t}(i.Subscriber)},1451(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(7653),a=n(3385);t.tap=function(e,t,n){return function(r){return r.lift(new c(e,t,n))}};var c=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))},e}(),u=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=s.noop,i._tapError=s.noop,i._tapComplete=s.noop,i._tapError=r||s.noop,i._tapComplete=o||s.noop,a.isFunction(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||s.noop,i._tapError=n.error||s.noop,i._tapComplete=n.complete||s.noop),i}return o(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(i.Subscriber)},464(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4398);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,n){return void 0===n&&(n=t.defaultThrottleConfig),function(t){return t.lift(new s(e,!!n.leading,!!n.trailing))}};var s=function(){function e(e,t,n){this.durationSelector=e,this.leading=t,this.trailing=n}return e.prototype.call=function(e,t){return t.subscribe(new a(e,this.durationSelector,this.leading,this.trailing))},e}(),a=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i.destination=t,i.durationSelector=n,i._leading=r,i._trailing=o,i._hasValue=!1,i}return o(t,e),t.prototype._next=function(e){this._hasValue=!0,this._sendValue=e,this._throttled||(this._leading?this.send():this.throttle(e))},t.prototype.send=function(){var e=this._hasValue,t=this._sendValue;e&&(this.destination.next(t),this.throttle(t)),this._hasValue=!1,this._sendValue=void 0},t.prototype.throttle=function(e){var t=this.tryDurationSelector(e);t&&this.add(this._throttled=i.innerSubscribe(t,new i.SimpleInnerSubscriber(this)))},t.prototype.tryDurationSelector=function(e){try{return this.durationSelector(e)}catch(e){return this.destination.error(e),null}},t.prototype.throttlingDone=function(){var e=this._throttled,t=this._trailing;e&&e.unsubscribe(),this._throttled=void 0,t&&this.send()},t.prototype.notifyNext=function(){this.throttlingDone()},t.prototype.notifyComplete=function(){this.throttlingDone()},t}(i.SimpleOuterSubscriber)},7661(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(5190),a=n(464);t.throttleTime=function(e,t,n){return void 0===t&&(t=s.async),void 0===n&&(n=a.defaultThrottleConfig),function(r){return r.lift(new c(e,t,n.leading,n.trailing))}};var c=function(){function e(e,t,n,r){this.duration=e,this.scheduler=t,this.leading=n,this.trailing=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.duration,this.scheduler,this.leading,this.trailing))},e}(),u=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.duration=n,s.scheduler=r,s.leading=o,s.trailing=i,s._hasTrailingValue=!1,s._trailingValue=null,s}return o(t,e),t.prototype._next=function(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(l,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))},t.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},t.prototype.clearThrottle=function(){var e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)},t}(i.Subscriber);function l(e){e.subscriber.clearThrottle()}},2056(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1136),s=n(1396);t.throwIfEmpty=function(e){return void 0===e&&(e=u),function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.errorFactory=e}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.errorFactory))},e}(),c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.errorFactory=n,r.hasValue=!1,r}return o(t,e),t.prototype._next=function(e){this.hasValue=!0,this.destination.next(e)},t.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var e=void 0;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)},t}(s.Subscriber);function u(){return new i.EmptyError}},5276(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5190),o=n(253),i=n(3180),s=n(6808);t.timeInterval=function(e){return void 0===e&&(e=r.async),function(t){return i.defer(function(){return t.pipe(o.scan(function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}},{current:e.now(),value:void 0,last:void 0}),s.map(function(e){var t=e.current,n=e.last,r=e.value;return new a(r,t-n)}))})}};var a=function(e,t){this.value=e,this.interval=t};t.TimeInterval=a},8673(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5190),o=n(3734),i=n(4053),s=n(1576);t.timeout=function(e,t){return void 0===t&&(t=r.async),i.timeoutWith(e,s.throwError(new o.TimeoutError),t)}},4053(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5190),s=n(4465),a=n(4398);t.timeoutWith=function(e,t,n){return void 0===n&&(n=i.async),function(r){var o=s.isDate(e),i=o?+e-n.now():Math.abs(e);return r.lift(new c(i,o,t,n))}};var c=function(){function e(e,t,n,r){this.waitFor=e,this.absoluteTimeout=t,this.withObservable=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},e}(),u=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=o,s.scheduler=i,s.scheduleTimeout(),s}return o(t,e),t.dispatchTimeout=function(e){var t=e.withObservable;e._unsubscribeAndRecycle(),e.add(a.innerSubscribe(t,new a.SimpleInnerSubscriber(e)))},t.prototype.scheduleTimeout=function(){var e=this.action;e?this.action=e.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(t.dispatchTimeout,this.waitFor,this))},t.prototype._next=function(t){this.absoluteTimeout||this.scheduleTimeout(),e.prototype._next.call(this,t)},t.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},t}(a.SimpleOuterSubscriber)},8858(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5190),o=n(6808);t.timestamp=function(e){return void 0===e&&(e=r.async),o.map(function(t){return new i(t,e.now())})};var i=function(e,t){this.value=e,this.timestamp=t};t.Timestamp=i},2284(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2518);function o(e,t,n){return 0===n?[t]:(e.push(t),e)}t.toArray=function(){return r.reduce(o,[])}},7544(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(4398);t.window=function(e){return function(t){return t.lift(new a(e))}};var a=function(){function e(e){this.windowBoundaries=e}return e.prototype.call=function(e,t){var n=new c(e),r=t.subscribe(n);return r.closed||n.add(s.innerSubscribe(this.windowBoundaries,new s.SimpleInnerSubscriber(n))),r},e}(),c=function(e){function t(t){var n=e.call(this,t)||this;return n.window=new i.Subject,t.next(n.window),n}return o(t,e),t.prototype.notifyNext=function(){this.openWindow()},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(){this._complete()},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e)},t.prototype._complete=function(){this.window.complete(),this.destination.complete()},t.prototype._unsubscribe=function(){this.window=null},t.prototype.openWindow=function(){var e=this.window;e&&e.complete();var t=this.destination,n=this.window=new i.Subject;t.next(n)},t}(s.SimpleOuterSubscriber)},1565(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1396),s=n(2888);t.windowCount=function(e,t){return void 0===t&&(t=0),function(n){return n.lift(new a(e,t))}};var a=function(){function e(e,t){this.windowSize=e,this.startWindowEvery=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.windowSize,this.startWindowEvery))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.destination=t,o.windowSize=n,o.startWindowEvery=r,o.windows=[new s.Subject],o.count=0,t.next(o.windows[0]),o}return o(t,e),t.prototype._next=function(e){for(var t=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,o=this.windows,i=o.length,a=0;a<i&&!this.closed;a++)o[a].next(e);var c=this.count-r+1;if(c>=0&&c%t===0&&!this.closed&&o.shift().complete(),++this.count%t===0&&!this.closed){var u=new s.Subject;o.push(u),n.next(u)}},t.prototype._error=function(e){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().complete();this.destination.complete()},t.prototype._unsubscribe=function(){this.count=0,this.windows=null},t}(i.Subscriber)},3877(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(5190),a=n(1396),c=n(5390),u=n(8244);t.windowTime=function(e){var t=s.async,n=null,r=Number.POSITIVE_INFINITY;return u.isScheduler(arguments[3])&&(t=arguments[3]),u.isScheduler(arguments[2])?t=arguments[2]:c.isNumeric(arguments[2])&&(r=Number(arguments[2])),u.isScheduler(arguments[1])?t=arguments[1]:c.isNumeric(arguments[1])&&(n=Number(arguments[1])),function(o){return o.lift(new l(e,n,r,t))}};var l=function(){function e(e,t,n,r){this.windowTimeSpan=e,this.windowCreationInterval=t,this.maxWindowSize=n,this.scheduler=r}return e.prototype.call=function(e,t){return t.subscribe(new d(e,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},e}(),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._numberOfNextedValues=0,t}return o(t,e),t.prototype.next=function(t){this._numberOfNextedValues++,e.prototype.next.call(this,t)},Object.defineProperty(t.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),t}(i.Subject),d=function(e){function t(t,n,r,o,i){var s=e.call(this,t)||this;s.destination=t,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=o,s.scheduler=i,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var c={subscriber:s,window:a,context:null},u={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:i};s.add(i.schedule(b,n,c)),s.add(i.schedule(h,r,u))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(i.schedule(p,n,l))}return s}return o(t,e),t.prototype._next=function(e){for(var t=this.windows,n=t.length,r=0;r<n;r++){var o=t[r];o.closed||(o.next(e),o.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(o))}},t.prototype._error=function(e){for(var t=this.windows;t.length>0;)t.shift().error(e);this.destination.error(e)},t.prototype._complete=function(){for(var e=this.windows;e.length>0;){var t=e.shift();t.closed||t.complete()}this.destination.complete()},t.prototype.openWindow=function(){var e=new f;return this.windows.push(e),this.destination.next(e),e},t.prototype.closeWindow=function(e){e.complete();var t=this.windows;t.splice(t.indexOf(e),1)},t}(a.Subscriber);function p(e){var t=e.subscriber,n=e.windowTimeSpan,r=e.window;r&&t.closeWindow(r),e.window=t.openWindow(),this.schedule(e,n)}function h(e){var t=e.windowTimeSpan,n=e.subscriber,r=e.scheduler,o=e.windowCreationInterval,i=n.openWindow(),s=this,a={action:s,subscription:null},c={subscriber:n,window:i,context:a};a.subscription=r.schedule(b,t,c),s.add(a.subscription),s.schedule(e,o)}function b(e){var t=e.subscriber,n=e.window,r=e.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),t.closeWindow(n)}},5428(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(3207),a=n(5905),c=n(7849);t.windowToggle=function(e,t){return function(n){return n.lift(new u(e,t))}};var u=function(){function e(e,t){this.openings=e,this.closingSelector=t}return e.prototype.call=function(e,t){return t.subscribe(new l(e,this.openings,this.closingSelector))},e}(),l=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.openings=n,o.closingSelector=r,o.contexts=[],o.add(o.openSubscription=c.subscribeToResult(o,n,n)),o}return o(t,e),t.prototype._next=function(e){var t=this.contexts;if(t)for(var n=t.length,r=0;r<n;r++)t[r].window.next(e)},t.prototype._error=function(t){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,o=-1;++o<r;){var i=n[o];i.window.error(t),i.subscription.unsubscribe()}e.prototype._error.call(this,t)},t.prototype._complete=function(){var t=this.contexts;if(this.contexts=null,t)for(var n=t.length,r=-1;++r<n;){var o=t[r];o.window.complete(),o.subscription.unsubscribe()}e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.contexts;if(this.contexts=null,e)for(var t=e.length,n=-1;++n<t;){var r=e[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},t.prototype.notifyNext=function(e,t,n,r,o){if(e===this.openings){var a=void 0;try{a=(0,this.closingSelector)(t)}catch(e){return this.error(e)}var u=new i.Subject,l=new s.Subscription,f={window:u,subscription:l};this.contexts.push(f);var d=c.subscribeToResult(this,a,f);d.closed?this.closeWindow(this.contexts.length-1):(d.context=f,l.add(d)),this.destination.next(u)}else this.closeWindow(this.contexts.indexOf(e))},t.prototype.notifyError=function(e){this.error(e)},t.prototype.notifyComplete=function(e){e!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(e.context))},t.prototype.closeWindow=function(e){if(-1!==e){var t=this.contexts,n=t[e],r=n.window,o=n.subscription;t.splice(e,1),r.complete(),o.unsubscribe()}},t}(a.OuterSubscriber)},9284(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(2888),s=n(5905),a=n(7849);t.windowWhen=function(e){return function(t){return t.lift(new c(e))}};var c=function(){function e(e){this.closingSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new u(e,this.closingSelector))},e}(),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.destination=t,r.closingSelector=n,r.openWindow(),r}return o(t,e),t.prototype.notifyNext=function(e,t,n,r,o){this.openWindow(o)},t.prototype.notifyError=function(e){this._error(e)},t.prototype.notifyComplete=function(e){this.openWindow(e)},t.prototype._next=function(e){this.window.next(e)},t.prototype._error=function(e){this.window.error(e),this.destination.error(e),this.unsubscribeClosingNotification()},t.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},t.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},t.prototype.openWindow=function(e){void 0===e&&(e=null),e&&(this.remove(e),e.unsubscribe());var t=this.window;t&&t.complete();var n,r=this.window=new i.Subject;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(e){return this.destination.error(e),void this.window.error(e)}this.add(this.closingNotification=a.subscribeToResult(this,n))},t}(s.OuterSubscriber)},3564(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(5905),s=n(7849);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n;"function"==typeof e[e.length-1]&&(n=e.pop());var r=e;return t.lift(new a(r,n))}};var a=function(){function e(e,t){this.observables=e,this.project=t}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.observables,this.project))},e}(),c=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.observables=n,o.project=r,o.toRespond=[];var i=n.length;o.values=new Array(i);for(var a=0;a<i;a++)o.toRespond.push(a);for(a=0;a<i;a++){var c=n[a];o.add(s.subscribeToResult(o,c,void 0,a))}return o}return o(t,e),t.prototype.notifyNext=function(e,t,n){this.values[n]=t;var r=this.toRespond;if(r.length>0){var o=r.indexOf(n);-1!==o&&r.splice(o,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(i.OuterSubscriber)},909(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(887);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return t.lift.call(r.zip.apply(void 0,[t].concat(e)))}}},3282(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(887);t.zipAll=function(e){return function(t){return t.lift(new r.ZipOperator(e))}}},8822(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(3207);t.scheduleArray=function(e,t){return new r.Observable(function(n){var r=new o.Subscription,i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},229(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(3207),i=n(7211);t.scheduleIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.Observable(function(n){var r,s=new o.Subscription;return s.add(function(){r&&"function"==typeof r.return&&r.return()}),s.add(t.schedule(function(){r=e[i.iterator](),s.add(t.schedule(function(){if(!n.closed){var e,t;try{var o=r.next();e=o.value,t=o.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}}))})),s})}},2(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(3207),i=n(6676);t.scheduleObservable=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){var o=e[i.observable]();r.add(o.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}},1138(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2515),o=n(3207);t.schedulePromise=function(e,t){return new r.Observable(function(n){var r=new o.Subscription;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}},7315(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(1138),i=n(8822),s=n(229),a=n(6565),c=n(7328),u=n(1087),l=n(2555);t.scheduled=function(e,t){if(null!=e){if(a.isInteropObservable(e))return r.scheduleObservable(e,t);if(c.isPromise(e))return o.schedulePromise(e,t);if(u.isArrayLike(e))return i.scheduleArray(e,t);if(l.isIterable(e)||"string"==typeof e)return s.scheduleIterable(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}},5666(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(3207).Subscription);t.Action=i},2883(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(772),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=i.Immediate.setImmediate(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(i.Immediate.clearImmediate(n),t.scheduled=void 0)},t}(n(1076).AsyncAction);t.AsapAction=s},3728(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,o=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<o&&(e=n.shift()));if(this.active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(n(4333).AsyncScheduler);t.AsapScheduler=i},1076(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(n(5666).Action);t.AsyncAction=i},4333(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(3849),s=function(e){function t(n,r){void 0===r&&(r=i.Scheduler.now);var o=e.call(this,n,function(){return t.delegate&&t.delegate!==o?t.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return o(t,e),t.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,o):e.prototype.schedule.call(this,n,r,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(i.Scheduler);t.AsyncScheduler=s},6847(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(n(1076).AsyncAction);t.QueueAction=i},5044(e,t,n){"use strict";var r,o=this&&this.__extends||(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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(4333).AsyncScheduler);t.QueueScheduler=i},2745(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2883),o=n(3728);t.asapScheduler=new o.AsapScheduler(r.AsapAction),t.asap=t.asapScheduler},5190(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1076),o=n(4333);t.asyncScheduler=new o.AsyncScheduler(r.AsyncAction),t.async=t.asyncScheduler},5677(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6847),o=n(5044);t.queueScheduler=new o.QueueScheduler(r.QueueAction),t.queue=t.queueScheduler},7211(e,t){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.getSymbolIterator=n,t.iterator=n(),t.$$iterator=t.iterator},6676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},4421(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),t.$$rxSubscriber=t.rxSubscriber},7568(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}();t.ArgumentOutOfRangeError=n},1136(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e}();t.EmptyError=n},772(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=1,r=Promise.resolve(),o={};function i(e){return e in o&&(delete o[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return o[t]=!0,r.then(function(){return i(t)&&e()}),t},clearImmediate:function(e){i(e)}},t.TestTools={pending:function(){return Object.keys(o).length}}},6967(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}();t.ObjectUnsubscribedError=n},3734(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return e.prototype=Object.create(Error.prototype),e}();t.TimeoutError=n},1245(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}();t.UnsubscriptionError=n},4487(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1396);t.canReportError=function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&o instanceof r.Subscriber?o:null}return!0}},4163(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hostReportError=function(e){setTimeout(function(){throw e},0)}},4579(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e}},4728(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},1087(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},4465(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDate=function(e){return e instanceof Date&&!isNaN(+e)}},3385(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e}},6565(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6676);t.isInteropObservable=function(e){return e&&"function"==typeof e[r.observable]}},2555(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7211);t.isIterable=function(e){return e&&"function"==typeof e[r.iterator]}},5390(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4728);t.isNumeric=function(e){return!r.isArray(e)&&e-parseFloat(e)+1>=0}},194(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return null!==e&&"object"==typeof e}},7328(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}},8244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=function(e){return e&&"function"==typeof e.schedule}},7653(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=function(){}},5352(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=function(e,t){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=e,n.thisArg=t,n}},8173(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4579);function o(e){return 0===e.length?r.identity:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)},t.pipeFromArray=o},7092(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(499),o=n(5259),i=n(8190),s=n(1021),a=n(1087),c=n(7328),u=n(194),l=n(7211),f=n(6676);t.subscribeTo=function(e){if(e&&"function"==typeof e[f.observable])return s.subscribeToObservable(e);if(a.isArrayLike(e))return r.subscribeToArray(e);if(c.isPromise(e))return o.subscribeToPromise(e);if(e&&"function"==typeof e[l.iterator])return i.subscribeToIterable(e);var t=u.isObject(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},499(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeToArray=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}}},8190(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7211);t.subscribeToIterable=function(e){return function(t){for(var n=e[r.iterator]();;){var o=void 0;try{o=n.next()}catch(e){return t.error(e),t}if(o.done){t.complete();break}if(t.next(o.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t}}},1021(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6676);t.subscribeToObservable=function(e){return function(t){var n=e[r.observable]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)}}},5259(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4163);t.subscribeToPromise=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,r.hostReportError),t}}},7849(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4470),o=n(7092),i=n(2515);t.subscribeToResult=function(e,t,n,s,a){if(void 0===a&&(a=new r.InnerSubscriber(e,n,s)),!a.closed)return t instanceof i.Observable?t.subscribe(a):o.subscribeTo(t)(a)}},5158(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1396),o=n(4421),i=n(2544);t.toSubscriber=function(e,t,n){if(e){if(e instanceof r.Subscriber)return e;if(e[o.rxSubscriber])return e[o.rxSubscriber]()}return e||t||n?new r.Subscriber(e,t,n):new r.Subscriber(i.empty)}},6170(e,t,n){"use strict";n(8461).audit,n(2392).auditTime,n(7954).buffer,n(647).bufferCount,n(6327).bufferTime,n(6786).bufferToggle,n(1662).bufferWhen,n(5503).catchError,n(4908).combineAll,n(9060).combineLatest,n(6600).concat,n(6345).concatAll,n(2248).concatMap,n(3577).concatMapTo,n(8765).count,n(3287).debounce,n(8066).debounceTime,n(2767).defaultIfEmpty,n(6965).delay,n(9861).delayWhen,n(7642).dematerialize,n(8820).distinct,n(1772).distinctUntilChanged,n(5075).distinctUntilKeyChanged,n(2399).elementAt,n(2631).endWith,n(7233).every,n(2408).exhaust,n(1112).exhaustMap,n(7736).expand,n(2670).filter,n(1258).finalize,n(5063).find,n(2939).findIndex,n(9948).first,n(7784).groupBy,n(6863).ignoreElements,n(3371).isEmpty,n(7064).last;var r=n(6808);t.Tj=r.map,n(3353).mapTo,n(2539).materialize,n(6416).max,n(1570).merge,n(9287).mergeAll;var o=n(5206);o.mergeMap,o.flatMap,n(9019).mergeMapTo,n(2307).mergeScan,n(7198).min,n(4864).multicast,n(5495).observeOn,n(5029).onErrorResumeNext,n(7304).pairwise,n(4236).partition,n(1075).pluck,n(5485).publish,n(91).publishBehavior,n(3433).publishLast,n(9622).publishReplay,n(6721).race,n(2518).reduce,n(6483).repeat,n(283).repeatWhen,n(3160).retry,n(5508).retryWhen,n(6888).refCount,n(9373).sample,n(1183).sampleTime,n(253).scan,n(5017).sequenceEqual,n(3213).share,n(8614).shareReplay,n(8480).single,n(4775).skip,n(2807).skipLast,n(2519).skipUntil,n(4846).skipWhile,n(4558).startWith,n(15).subscribeOn,n(5433).switchAll,n(7912).switchMap,n(7865).switchMapTo;var i=n(1231);t.s=i.take,n(3439).takeLast,n(1279).takeUntil,n(6518).takeWhile,n(1451).tap,n(464).throttle,n(7661).throttleTime,n(2056).throwIfEmpty,n(5276).timeInterval,n(8673).timeout,n(4053).timeoutWith,n(8858).timestamp,n(2284).toArray,n(7544).window,n(1565).windowCount,n(3877).windowTime,n(5428).windowToggle,n(9284).windowWhen,n(3564).withLatestFrom,n(909).zip,n(3282).zipAll},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=s(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=s(t,n));return t}function s(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})},8576(e,t,n){"use strict";n.d(t,{Q:()=>i,h:()=>o});var r=n(6886);const o="${openmrsSpaBase}/login",i={redirectAuthFailure:{enabled:{_type:r.ZU.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:r.ZU.String,_default:o,_validators:[r.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:r.ZU.Array,_default:[401],_elements:{_type:r.ZU.Number,_validators:[r.y$.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:r.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:r.ZU.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}}},1557(e,t,n){"use strict";n.d(t,{g$:()=>h,HW:()=>l,xC:()=>y,Kx:()=>m,EW:()=>f,yH:()=>p,eA:()=>c,Gp:()=>v,E4:()=>d,Fi:()=>g,st:()=>b});var r=n(44),o=n(8249);const i=function(e){return void 0===e};var s=n(3083),a=n(8315);const c=(0,o.Zd)("session",{loaded:!1,session:null});let u=0;function l(e={includeAuthStatus:!0}){return(u<Date.now()-6e4||!c.getState().loaded)&&p(),new s.Observable(t=>{const n=n=>{n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(n.session?.user))};return n(c.getState()),c.subscribe(n)})}function f(){return(u<Date.now()-6e4||!c.getState().loaded)&&p(),c}function d(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 p(e,t){u=Date.now();let n={};return e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`),_((0,a.lo)(a.Ct,{headers:n}))}function h(){c.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function b(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 y(){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(c.getState()),e||(t=c.subscribe(r))})}function m(){return new Promise((e,t)=>{l().subscribe(t=>{e(t.sessionLocation)},t).unsubscribe()})}async function v(e,t){return _((0,a.lo)(a.Ct,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function g(e,t,n){return n||(n=new AbortController),await(0,a.lo)(`${a.Jj}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),p()}function _(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},c.setState(r),t(r)):(r={loaded:!1,session:null},c.setState(r),n(r))}).catch(e=>{(0,r.N)(`Failed to fetch new session information: ${e}`);const t={loaded:!1,session:null};c.setState(t),n(t)})})}c.subscribe(e=>{e.loaded&&e.session&&d(e.session)})},2151(e,t,n){"use strict";function r(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}n.d(t,{L:()=>r})},8449(e,t,n){"use strict";n.d(t,{Q:()=>r});const r={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},8315(e,t,n){"use strict";n.d(t,{$f:()=>b,Ct:()=>f,Gm:()=>d,IU:()=>l,Jj:()=>u,lo:()=>p,ut:()=>h});var r=n(3083),o=n(4963),i=n(6886),s=n(178),a=n(8576);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u="/ws/rest/v1",l="/ws/fhir2/R4",f=`${u}/session`;function d(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function p(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=d(e);if(t.headers||(t.headers={}),(0,o.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(u)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(l)){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:c}=await(0,i.zj)("@openmrs/esm-api");if(t.ok){if(204===t.status){if(c&&t.headers.has("location")){const e=t.headers.get("location");e&&(0,s.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===d(f)&&403===t.status||o.enabled&&o.errors.includes(t.status)){(0,s.g4)();const e=o.url||t.headers.get("location")||a.h;return(0,s.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 b(n,t,o,r)},e=>{throw new b(n,t,null,r)})})}function h(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 r.Observable(r=>{let o=!1;return p(e,t).then(e=>{o=!0,r.next(e),r.complete()},e=>{o=!0,r.error(e)}),()=>{o||n.abort()}})}class b extends Error{constructor(e,t,n,r){super(),c(this,"response",void 0),c(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}`}}},9935(e,t,n){"use strict";n.d(t,{Y:()=>s});var r=n(6886),o=n(1557),i=n(8576);function s(){(0,r.T0)("@openmrs/esm-api",i.Q),(0,o.yH)()}},1856(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,{Nh:()=>Ne,T0:()=>ne,ks:()=>se,zj:()=>ce,td:()=>ue,mq:()=>le,Gt:()=>ae,kl:()=>oe,FL:()=>re,GV:()=>ie});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"],b=function(){return arguments.propertyIsEnumerable("length")}(),y=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const m="function"!=typeof Object.keys||b?o(function(e){if(Object(e)!==e)return[];var t,n,r=[],o=b&&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)&&!y(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 g(e,t,n,r){var o=s(e);function i(e,t){return _(e,t,n.slice(),r.slice())}return!a(function(e,t){return!a(i,t,e)},s(t),o)}function _(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&&g(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&g(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=m(e);if(l.length!==m(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)||!_(t[p],e[p],f,d))return!1;a-=1}return!0}const w=i(function(e,t){return _(e,t,[],[])});function x(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 E(e){return"[object Object]"===Object.prototype.toString.call(e)}const O=x(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}),S=x(function e(t,n,r){return O(function(n,r,o){return E(r)&&E(o)?e(t,r,o):t(n,r,o)},n,r)}),A=i(function(e,t){return S(function(e,t,n){return n},e,t)}),C=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 P(e,t,n){if(n||(n=new T),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?P(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 T=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():P(e,!0)}),N=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},j=o(function(e){return!!N(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 R(e,t,n){return function(r,o,i){if(j(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 $(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,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=M;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 B(e,t,n,r){return e["@@transducer/result"](n[r](D(e["@@transducer/step"],e),t))}const V=R($,B,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 z=x(function(e,t,n){return V("function"==typeof e?new F(e):e,t,n)});var U=n(1467),K=n(1290);const W=(0,K.N)(e=>Array.isArray(e),"must be an array"),H=(0,K.N)(e=>"boolean"==typeof e,"must be a boolean"),q=(0,K.N)(e=>"number"==typeof e,"must be a number"),G=(0,K.N)(e=>"string"==typeof e,"must be a string"),Y=(0,K.N)(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),Z=(0,K.N)(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 X=n(3101);function Q(e,t){for(let n of Object.keys(e.schemas)){const r=(0,X.IS)(n);if(e.moduleLoaded[n]){const o=me(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!0,config:o})}else{const o=ve(n,e,t);r.setState({translationOverridesLoaded:!0,loaded:!1,config:o})}}}function J(e,t){const n=function(e,t){const n=_e(be(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))he(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=(0,X.YP)(),i=o.getState(),s={slots:{...i.slots,...r}};w(i,s)||o.setState(s)}function ee(e,t){const n=function(e,t){let n=de(I(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,pe(e,t)]);return n}(e,t);X.tN.setState({config:n})}function te(e,t,n){const r={};for(let o of t.mountedExtensions){const t=fe(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}(0,X.GI)().setState({configs:r})}function ne(e,t){ye(e,t);const n=A(t,ke);X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function re(e){X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:ke}}))}function oe(e){X.Rt.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function ie(e){X.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:je}}))}function se(e,t){ye(e,t);const n=A(t,ke);X.Rt.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.Rt.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function ae(e,t="provided"){X.Rt.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function ce(e){return new Promise(t=>{const n=(0,X.IS)(e);function r(e){if(e.loaded&&e.config){const n=C(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}}r(n.getState());const o=n.subscribe(r)})}function ue(e,t,n){const r=[new Promise(t=>{const n=(0,X.IS)(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=(0,X.UY)(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 le(e,t,n){we(e,t,n);const r=Ae(e,t);return Ee(e,r,n),r}function fe(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=be(o,i),l=ge(e,u),f=l?.extensionSlots?.[n]?.configure?.[r]??{},d=_e([ge(c,u),f]),p=a??o.schemas[t];we(p,d,c);const h=Ae(p,d);return Ee(p,h,c),delete h.extensionSlots,h}function de(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:Pe(e)?Object.keys(e).reduce((t,n)=>(t[n]=de(e[n]),t),{}):{}}function pe(e,t){return Pe(e)?Object.keys(e).reduce((n,r)=>(n[r]=pe(e[r],t),n),{}):{_value:e,_source:t}}function he(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&&Ie(r,o+`' contains invalid keys '${i.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||Ie(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)||Ie(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)||Ie(r,o+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Pe(e.configure)||Ie(r,o+".configure' is invalid. Must be an object with extension IDs for keys"))}function be(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function ye(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}`),!Pe(s)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}s.hasOwnProperty("_default")||ye(e,s,i);const a=s._elements;if(Ce(a)&&ye(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(U.Z).includes(c)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(U.Z).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&&![U.Z.Array,U.Z.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 me(e,t,n){const r=t.schemas[e],o=ge(e,be(t,n));we(r,o,e);const i=Ae(r,o);return Ee(r,i,e),delete i.extensionSlots,i}function ve(e,t,n){const r=ge(e,be(t,n)),o=Ae(ke,r);return Ee(ke,o,e),delete o.extensionSlots,o}function ge(e,t){return _e(t.map(({[e]:t})=>t).filter(e=>!!e))}function _e(e){return z(A)({},e)}function we(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e.hasOwnProperty(r)?xe(s,o,i):"extensionSlots"===r&&""!==n||Ie(i,`Unknown config key '${i}' provided. Ignoring.`)}}function xe(e,t,n){Oe(n,e._type,t),Pe(t)?e._type===U.Z.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];xe(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||e.hasOwnProperty("_type")||we(e,t,n):e._type===U.Z.Array&&function(e,t,n){if(Oe(n,U.Z.Array,t)){if(Ce(e._elements))for(let r=0;r<t.length;r++)xe(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)Oe(`${n}[${r}]`,e._elements?._type,t[r])}}(e,t,n)}function Ee(e,t,n=""){if(e)if(t!==e._default&&Se(n,e._validators,t),Pe(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,s=e[r];e._type===U.Z.Object&&e._elements?Ee(e._elements,o,i):Ee(s,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)Ee(e._elements,t[r],`${n}[${r}]`)}function Oe(e,t,n){return!t||Se(e,[{Array:W,Boolean:H,ConceptUuid:Z,Number:q,Object:Y,String:G,UUID:Z,PersonAttributeTypeUuid:Z,PatientIdentifierTypeUuid:Z}[t]],n)}function Se(e,t,n){let r=!0;if(t)try{for(let o of t){const t=o(n);"string"==typeof t&&(Ie(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}Q(X.Rt.getState(),X.H.getState()),X.Rt.subscribe(e=>Q(e,X.H.getState())),X.H.subscribe(e=>Q(X.Rt.getState(),e)),ee(X.Rt.getState(),X.H.getState()),X.Rt.subscribe(e=>ee(e,X.H.getState())),X.H.subscribe(e=>ee(X.Rt.getState(),e)),J(X.Rt.getState(),X.H.getState()),X.Rt.subscribe(e=>J(e,X.H.getState())),X.H.subscribe(e=>J(X.Rt.getState(),e)),te(X.Rt.getState(),X.hs.getState(),X.H.getState()),X.Rt.subscribe(e=>{te(e,X.hs.getState(),X.H.getState())}),X.hs.subscribe(e=>{te(X.Rt.getState(),e,X.H.getState())}),X.H.subscribe(e=>{te(X.Rt.getState(),X.hs.getState(),e)});const Ae=(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&&Ce(e))if(o._type===U.Z.Array&&Array.isArray(r)){const o=r.map(t=>Ae(e,t));n[t]=o}else if(o._type===U.Z.Object)for(let t of Object.keys(r))r[t]=Ae(e,r[t])}else if(Pe(o)){const e=r??{};Pe(e)&&(n[t]=Ae(o,e))}}return n};function Ce(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function Pe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let Te=new Set;function Ie(e,t){const n=`${e}:::${t}`;Te||(Te=new Set),Te.has(n)||(console.error(t),Te.add(n))}function Ne(e){e?Te.forEach(t=>{t.startsWith(e)&&Te.delete(t)}):Te.clear()}const je={"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:U.Z.Object,_default:{},_validators:[(0,K.N)(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(", ")}.`)]}},ke={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:U.Z.Array,_default:[]}},...je}},3101(e,t,n){"use strict";n.d(t,{G9:()=>l,GI:()=>d,H:()=>s,IS:()=>c,P0:()=>h,Rt:()=>i,UY:()=>p,YP:()=>u,g$:()=>b,hs:()=>a,tN:()=>y,vu:()=>f});var r=n(8249),o=n(8101);const i=(0,r.Zd)("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),s=(0,r.Zd)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});s.subscribe(e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))});const a=(0,r.Zd)("config-store-of-extension-state",{mountedExtensions:[]});function c(e){return(0,r.jf)(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function u(){return(0,r.jf)("config-extension-slots",{slots:{}})}function l(e){return f(u().getState(),e)}function f(e,t){return e.slots[t]??{loaded:!1,config:{}}}function d(){return(0,r.jf)("config-extensions",{configs:{}})}function p(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=d(),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 i=r(t),s=r(n);(0,o.b)(i,s)||e(i,s)}),destroy(){}}}function h(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}function b(e,t,n){const r=e.configure?.[n];return r??null}const y=(0,r.Zd)("config-implementer-tools",{config:{}})},1467(e,t,n){"use strict";n.d(t,{Z:()=>r});var r=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}({})},1290(e,t,n){"use strict";function r(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}n.d(t,{N:()=>r})},5049(e,t,n){"use strict";n.d(t,{gU:()=>s,qG:()=>i,r4:()=>o,y$:()=>c,yL:()=>a});var r=n(1290);const o=(e,t)=>(0,r.N)(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),i=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return(0,r.N)(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(", "))},s=i([]),a=e=>(0,r.N)(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),c={inRange:o,isUrl:s,isUrlWithTemplateParameters:i,oneOf:a}},3596(e,t,n){"use strict";n.d(t,{II:()=>c,R:()=>l,ji:()=>a,r_:()=>u});var r=n(7283),o=n(8249);const i=(0,r.y)()(()=>({}));(0,o.CE)("openmrs-app-context",i);const s=Object();function a(e,t=s){i.setState(n=>{if(e in n)throw new Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[e]:t===s?{}:t})})}function c(e){i.setState(t=>(e in t&&delete t[e],t))}function u(e,t){i.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function l(e,t){let n=function(e,t=e=>e){const n=i.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}(e);return t(Object.freeze(Object.assign({},n))),i.subscribe(r=>{let o=e in r?r[e]:null;o!==n&&(n=o,t(Object.freeze(Object.assign({},o))))})}},8487(e,t,n){"use strict";n.d(t,{Bv:()=>s,KU:()=>i,SY:()=>c,Zu:()=>o,cD:()=>a});var r=n(1926);const o=`${r.Jj}/attachment`;function i(e,t){return(0,r.lo)(`${o}/${e}`,{signal:t.signal})}function s(e,t,n){return(0,r.lo)(`${o}?patient=${e}&includeEncounterless=${t}`,{signal:n.signal})}async function a(e,t){const n=new FormData;return n.append("fileCaption",t.fileDescription),n.append("patient",e),t.file?n.append("file",t.file,t.fileName):(n.append("file",new File([""],t.fileName),t.fileName),n.append("base64Content",t.base64Content)),(0,r.lo)(`${o}`,{method:"POST",body:n})}function c(e,t){return(0,r.lo)(`${o}/${e}`,{method:"DELETE",signal:t.signal})}},420(e,t,n){"use strict";n.d(t,{h:()=>i});var r=n(1926),o=n(6484);async function i(e,t,n=!0){if(e){let o=null;const[i,a]=await Promise.all([(0,r.lo)(`${r.IU}/Patient/${e}`,t).catch(e=>o=e),n?s(e):Promise.resolve(null)]);if(i.ok)return i.data;if(a)return a;if(o)throw o}return null}async function s(e){const t=(await(0,o.pb)("patient-registration")).find(t=>t.fhirPatient.id===e);return t?.fhirPatient??null}},8390(e,t,n){"use strict";n.d(t,{E:()=>i,V:()=>s});var r=n(1926),o=n(6170);function i(e){return{uuid:e.uuid,display:e.display}}function s(e=null,t=null){const n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);const s=n.toString(),a=`${r.Jj}/location${s?"?"+s:""}`;return(0,r.ut)(a).pipe((0,o.Tj)(e=>e.data.results.map(i))).pipe((0,o.s)(1))}},5175(e,t,n){"use strict";n.d(t,{P:()=>s,Q:()=>i});var r=n(1926),o=n(6170);function i(e){return{uuid:e.uuid,display:e.display,name:e.name}}function s(){return(0,r.ut)(`${r.Jj}/visittype`).pipe((0,o.Tj)(e=>e.data.results.map(i))).pipe((0,o.s)(1))}},8766(e,t,n){"use strict";n.d(t,{BR:()=>h,BX:()=>l,Cj:()=>a,DK:()=>b,Ds:()=>d,NH:()=>f,Rb:()=>c,dx:()=>s,xL:()=>p});var r=n(1926),o=n(8249),i=n(3083),s=function(e){return e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit",e}({}),a=function(e){return e.NOTSTARTED="notStarted",e.ONGOING="ongoing",e}({});const c="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",u=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null,mutateVisitCallbacks:{}};function l(){return(0,o.jf)("visit",u)}function f(e,t){l().setState({patientUuid:e,manuallySetVisitUuid:t})}function d(e,t){return(0,r.lo)(`${r.Jj}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function p(e,t,n){return(0,r.lo)(`${r.Jj}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function h(e,t,n){const o=n??c;return(0,r.lo)(`${r.Jj}/visit?patient=${e}&v=${o}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}l().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});const b=new i.BehaviorSubject(null)},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"})}},4596(e,t,n){"use strict";n.d(t,{wE:()=>_,_3:()=>d,eb:()=>h,Gz:()=>b,dX:()=>y,$F:()=>m,Sj:()=>v,uN:()=>g,mv:()=>p,PQ:()=>r.A});var r=n(9493);const o="ArrowFunctionExpression";var i={name:"arrow",init(e){function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=o,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){const n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;const e=this.gobbleBinaryOp();if("=>"===e){const n=this.gobbleBinaryExpression();return n||this.throwError("Expected expression after "+e),void(t.node={type:o,params:null,body:n})}}this.index=n}}),e.hooks.add("after-expression",function(e){t(e.node)})}},s={name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){const n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let r=t.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}},a={name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(e){return"x"===e||"X"===e?16:"b"===e||"B"===e?2:8}function r(e,t){return 95===e||t.some(([t,n])=>e>=t&&e<=n)}function o(t){const n=this.index;let r="";const o=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};o(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),o());let i=this.char;"e"!==i&&"E"!==i||(r+=this.expr.charAt(this.index++),i=this.char,"+"!==i&&"-"!==i||(r+=this.expr.charAt(this.index++)),o(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));const s=this.code;if(e.isIdentifierStart(s))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(s===e.PERIOD_CODE)return r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:s,number:r},null,2)}`),void(this.index=n);t.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(i){if(48===this.code){const s=this.index,a=this.expr.charAt(this.index+1),c=t.call(this,a);if(!c)return;let u="";for(;r(this.code,c);)95===this.code?this.index++:u+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(a.charCodeAt(0)))return this.index=s+1,void o.call(this,i);this.throwError("unexpected char within number")}i.node={type:e.LITERAL,value:parseInt(u,n(a)),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&o.call(this,i)})}},c={name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){const n=++this.index;let r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){const r=this.expr.slice(n,this.index);let o,i="";for(;++this.index<this.expr.length;){const e=this.code;if(!(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;i+=this.char}try{o=new RegExp(r,i)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:o,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}},u={name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}},l={name:"jsepTemplateLiteral",init(e){function t(e,t=!0){if(96===this.code){const n={type:"TemplateLiteral",quasis:[],expressions:[]};let r="",o="",i=!1;const s=this.expr.length,a=()=>n.quasis.push({type:"TemplateElement",value:{raw:o,cooked:r},tail:i});for(;this.index<s;){let s=this.expr.charAt(++this.index);if("`"===s)return this.index+=1,i=!0,a(),e.node=n,t&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===s&&"{"===this.expr.charAt(this.index+1))this.index+=2,a(),o="",r="",n.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===s)switch(o+=s,s=this.expr.charAt(++this.index),o+=s,s){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=s}else r+=s,o+=s}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}},f=n(2894);function d(e,t={}){return v(e,t,w)}async function p(e,t={}){return g(e,t,w)}function h(e,t={}){return v(e,t,x)}function b(e,t={}){return g(e,t,x)}function y(e,t={}){return v(e,t,E)}function m(e,t={}){return g(e,t,E)}function v(e,t={},n){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;null==t&&(t={});const o=function(e){return A(e,f.z)}(t),i=O("string"==typeof e?(0,r.A)(e):e,o);if(n(i))return i;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function g(e,t={},n){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);null==t&&(t={});const o=function(e){return A(e,f.f)}(t);return Promise.resolve(O("string"==typeof e?(0,r.A)(e):e,o)).then(t=>{if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function _(e){return(0,r.A)(e)}function w(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function x(e){return"boolean"==typeof e}function E(e){return"number"==typeof e}function O(e,t){switch(e.type){case"UnaryExpression":return function(e,t){const n=O(e.argument,t);switch(e.operator){case"+":return+n;case"-":return-n;case"~":return~n;case"!":return!n;default:throw`Expression evaluator does not support operator '${e.operator}''`}}(e,t);case"BinaryExpression":return function(e,t){let n=O(e.left,t),r=O(e.right,t);switch(e.operator){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;case"%":return n%r;case"**":return n**r;case"==":return n==r;case"===":return n===r;case"!=":return n!=r;case"!==":return n!==r;case">":return n>r;case">=":return n>=r;case"<":return n<r;case"<=":return n<=r;case"in":return n in r;case"&&":return n&&r;case"||":return n||r;case"??":return n??r;default:throw`Expression evaluator does not support operator '${e.operator}' operator`}}(e,t);case"ConditionalExpression":return function(e,t){const n=O(e.test,t);return O(n?e.consequent:e.alternate,t)}(e,t);case"CallExpression":return function(e,t){let n=e.arguments?.map(C(t)),r=O(e.callee,t);if(!r)throw`No function named ${I(e.callee)} is defined in this context`;if("function"!=typeof r)throw`${I(e.callee)} is not a function`;return r(...n)}(e,t);case"ArrowFunctionExpression":return function(e,t){const n=e.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[];return function(...r){if(r.length<n.length)throw`Required argument(s) ${n.slice(r.length,-1).join(", ")} were not provided`;const o=Object.fromEntries(n.reduce((e,t,n)=>{const o=r[n];return T(o)&&e.push([t,o]),e},[]));return O(e.body,t.addVariables(o))}.bind(t.thisObj??null)}(e,t);case"MemberExpression":return function(e,t){let n=O(e.object,t);if(void 0===n)switch(e.object.type){case"Identifier":{let n=S(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":{let n=S(e.property,t);throw TypeError(`TypeError: cannot read properties of undefined (reading '${n}')`)}default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}let r,o=n;if("string"==typeof n)o=String.prototype;else if("number"==typeof n)o=Number.prototype;else if("function"==typeof n);else if("object"!=typeof n)throw"VisitMemberExpression does not support member access on type "+typeof n;switch(t.thisObj=o,e.property.type){case"Identifier":case"MemberExpression":r=O(e.property,t);break;default:{const o=O(e.property,t);if(void 0===o)throw{type:"Illegal property access",message:"No property was supplied to the property access"};P(o),r=n[o]}}return"function"==typeof r?r.bind(n):r}(e,t);case"ArrayExpression":return function(e,t){return e.elements?.map(C(t))}(e,t);case"SequenceExpression":return function(e,t){const n=e.expressions.map(C(t));return n[n.length-1]}(e,t);case"NewExpression":return function(e,t){if(!e.callee||"Identifier"!==e.callee.type)throw e.callee?"new must be called with either Date or RegExp":'Could not handle "new" without a specified class';{let n=e.arguments?.map(C(t));switch(e.callee.name){case"Date":return new Date(...n);case"RegExp":return new RegExp(...n);default:throw`Cannot instantiate object of type ${e.callee.name}`}}}(e,t);case"Literal":return function(e){return P(e.value),e.value}(e);case"Identifier":return function(e,t){P(e.name);const n=t.thisObj;if(n&&("object"==typeof n||"function"==typeof n)&&e.name in n){const t=n[e.name];return P(t),t}if(t.variables&&e.name in t.variables){const n=t.variables[e.name];return P(n),n}return e.name in t.globals?t.globals[e.name]:void 0}(e,t);case"TemplateLiteral":return function(e,t){const n=e.expressions?.map(C(t))??[],r=e.quasis?.map(C(t))??[];return r.filter(e=>!e.tail).map(e=>e.value).join("")+n.join("")+r.filter(e=>e.tail).map(e=>e.value).join("")}(e,t);case"TemplateElement":return function(e){return{value:e.cooked,tail:e.tail}}(e);default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function S(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return S(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function A(e,t){const n={thisObj:void 0,variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}function C(e){return function(t){return null===t?null:O(t,e)}}function P(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}function T(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e||"function"==typeof e||null===e||e instanceof RegExp)return!0;if("object"==typeof e){for(const t of Object.keys(e))if(!T(e[t]))return!1;return!0}if(Array.isArray(e))for(const t of e)if(!T(t))return!1;return!1}function I(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}r.A.plugins.register(i),r.A.plugins.register(s),r.A.plugins.register(a),r.A.plugins.register(c),r.A.plugins.register(u),r.A.plugins.register(l),r.A.addBinaryOp("in",7),r.A.addBinaryOp("??",1)},2894(e,t,n){"use strict";n.d(t,{f:()=>o,z:()=>r});const r={Array,Boolean,Symbol,Infinity:1/0,NaN:NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},o={...r,Promise}},7022(e,t,n){"use strict";n.d(t,{K0:()=>ee,Yo:()=>te,No:()=>ne,zx:()=>ie,ES:()=>Z,Tj:()=>Q,xg:()=>X,VK:()=>J,FY:()=>se,cL:()=>ae});var r=n(1926),o=n(6886),i=n(4596),s=n(41),a=n(8581),c=n(5841),u=n(6734),l=n(1754),f=n(2528),d=n(6984);const p=function(e,t,n){(void 0!==n&&!(0,d.A)(e[t],n)||void 0===n&&!(t in e))&&(0,f.A)(e,t,n)},h=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[++r];if(!1===t(o[a],a,o))break}return e};var b=n(154),y=n(1801),m=n(9759),v=n(8598),g=n(2274),_=n(2049),w=n(8446),x=n(3098);var E=n(9912),O=n(9610),S=n(3149),A=n(4963),C=n(3858);const P=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var T=n(2031),I=n(5615);const N=function(e,t,n,r,o,i,s){var a,c=P(e,n),u=P(t,n),l=s.get(u);if(l)p(e,n,l);else{var f=i?i(c,u,n+"",e,t,s):void 0,d=void 0===f;if(d){var h=(0,_.A)(u),N=!h&&(0,E.A)(u),j=!h&&!N&&(0,C.A)(u);f=u,h||N||j?(0,_.A)(c)?f=c:(a=c,(0,x.A)(a)&&(0,w.A)(a)?f=(0,m.A)(c):N?(d=!1,f=(0,b.A)(u,!0)):j?(d=!1,f=(0,y.A)(u,!0)):f=[]):(0,A.A)(u)||(0,g.A)(u)?(f=c,(0,g.A)(c)?f=function(e){return(0,T.A)(e,(0,I.A)(e))}(c):(0,S.A)(c)&&!(0,O.A)(c)||(f=(0,v.A)(u))):d=!1}d&&(s.set(u,f),o(f,u,r,i,s),s.delete(u)),p(e,n,f)}},j=function e(t,n,r,o,i){t!==n&&h(n,function(s,a){if(i||(i=new l.A),(0,S.A)(s))N(t,n,a,r,e,o,i);else{var c=o?o(P(t,a),s,a+"",t,n,i):void 0;void 0===c&&(c=s),p(t,a,c)}},I.A)};var k=n(9008),R=n(6875),$=n(9727);var M=n(5353);const D=(L=function(e,t,n){j(e,t,n)},B=function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=L.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!(0,S.A)(n))return!1;var r=typeof t;return!!("number"==r?(0,w.A)(n)&&(0,M.A)(t,n.length):"string"==r&&t in n)&&(0,d.A)(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&L(e,s,n)}return e},(0,$.A)((0,R.A)(B,V,k.A),B+""));var L,B,V,F=n(67),z=n(7171);const U=(0,z.a9)(),K=(0,z.zF)(),W=(0,o.YP)(),H=(0,o.GI)();function q(e,t,n,r,i){const s={},a=(0,c.s)(),l=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,c]of Object.entries(e.slots)){const{config:u}=(0,o.vu)(t,c.name),f=oe(r,e,u,n,l,a,i.session);s[r]={moduleName:c.moduleName,assignedExtensions:f}}(0,u.A)(K.getState().slots,s)||K.setState({slots:s})}function G(){q(U.getState(),W.getState(),H.getState(),s.jX.getState(),r.eA.getState())}function Y(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function Z(e){const[t]=e.split("#");return t}function X(e,t){const n=Z(t);return e.extensions[n]}function Q(e){return X(U.getState(),e)}U.subscribe(e=>{q(e,W.getState(),H.getState(),s.jX.getState(),r.eA.getState())}),W.subscribe(e=>{q(U.getState(),e,H.getState(),s.jX.getState(),r.eA.getState())}),H.subscribe(e=>{q(U.getState(),W.getState(),e,s.jX.getState(),r.eA.getState())}),s.jX.subscribe(e=>{q(U.getState(),W.getState(),H.getState(),e,r.eA.getState())}),r.eA.subscribe(e=>{q(U.getState(),W.getState(),H.getState(),s.jX.getState(),e)}),G(),(0,a.gj)(G);const J=e=>U.setState(t=>(t.extensions[e.name]={...e,instances:[]},t));function ee(e,t){(0,z.DQ)(n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...Y(e),attachedIds:[t]}}}})}function te(e,t){(0,z.DQ)(n=>{const r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function ne(e){(0,z.DQ)(t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function re(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function oe(e,t,n,s,a,c,u){const l=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=U.getState();return[...t,...n].filter(e=>!r.includes(e)).sort((e,n)=>{const r=re(e,o,i[Z(e)]?.order,t),s=re(n,o,i[Z(n)]?.order,t);return-1===s?-1:-1===r?1:r-s})}(n,t.slots[e].attachedIds),f=[];for(let d of l){const{config:l}=(0,o.P0)(s,e,d),p=(0,o.g$)(n,e,d),h=D(l,p),b=Z(d),y=t.extensions[b];if(y){const e=h?.["Display conditions"]?.privileges??y.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)){if(!u?.user)continue;if(!(0,r.st)(e,u.user))continue}const t=h?.["Display conditions"]?.expression??null;if(null!==t)try{if(!(0,i.eb)(t,{session:u}))continue}catch(e){console.error(`Error while evaluating expression ${t}`,e);continue}if(y.featureFlag&&!a.includes(y.featureFlag))continue;if(window.offlineEnabled&&!(0,F.E)(c,y.online,y.offline))continue;f.push({id:d,name:b,moduleName:y.moduleName,config:h,featureFlag:y.featureFlag,meta:y.meta,online:h?.["Display conditions"]?.online??y.online??!0,offline:h?.["Display conditions"]?.offline??y.offline??!1})}}return f}function ie(e){const t=U.getState(),{config:n}=(0,o.G9)(e),i=H.getState(),a=s.jX.getState(),u=r.eA.getState(),l=(0,c.s)();return oe(e,t,n,i,Object.entries(a.flags).filter(([,{enabled:e}])=>e).map(([e])=>e),l,u.session)}const se=(e,t)=>U.setState(n=>{const r=n.slots[t]?.moduleName;if(r&&r!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),n;if(r&&r==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};const o=Y(t,e);return{...n,slots:{...n.slots,[t]:o}}}),ae=()=>K.setState(()=>({slots:{},extensions:{}}))},67(e,t,n){"use strict";n.d(t,{E:()=>i,d:()=>o});var r=n(5841);function o(e=!0,t=!1){return i((0,r.s)(),e,t)}function i(e,t=!0,n=!1){return Boolean(e?t:n)}},7261(e,t,n){"use strict";n.d(t,{Gp:()=>r,Vx:()=>o,sr:()=>i});const r=(0,n(8249).Zd)("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function o({name:e,basePath:t,mode:n,componentContext:o}){r.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:o})}function i(e){r.getState().slotName===e&&r.setState(r.getInitialState(),!0)}},4246(e,t,n){"use strict";n.d(t,{F:()=>a,J:()=>s});var r=n(8249),o=n(770);const i=(0,r.Zd)("modalRegistry",{modals:{}});function s(e){i.setState(t=>(t.modals[e.name]=e,t))}function a(e){let t=i.getState().modals[e];if(!t){const n=(0,o.Tj)(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),s(t))}return t}},8932(e,t,n){"use strict";n.d(t,{w:()=>c});var r=n(599),o=n(7022),i=n(67),s=n(7171);let a=0;async function c(e,t,n,c,u=e=>e,l={}){const f=(0,o.ES)(c),d=(0,o.Tj)(c);let p=null;if(e){if(!d)throw Error(`Couldn't find extension '${f}' to attach to '${t}'`);const{meta:o,moduleName:h,online:b,offline:y,load:m}=d;if((0,i.d)(b,y)){(0,s.DQ)(r=>{const o={domElement:e,id:c,slotName:t,slotModuleName:n};return{...r,extensions:{...r.extensions,[f]:{...r.extensions[f],instances:[...r.extensions[f].instances,o]}}}});const i=await m(),d=a++;p=(0,r.xL)(u({...i,name:`${t}/${f}-${d}`}),{...l,_meta:o,_extensionContext:{extensionId:c,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:h},domElement:e})}}else console.warn(`Tried to render ${c} into ${t} but no DOM element was available.`);return p}},7171(e,t,n){"use strict";n.d(t,{DQ:()=>c,a9:()=>a,zF:()=>u});var r=n(6734),o=n(6886),i=n(8249);const s=(0,i.Zd)("extensionsInternal",{slots:{},extensions:{}}),a=()=>(0,i.jf)("extensionsInternal",{slots:{},extensions:{}});function c(e){const t=s.getState(),n=e(t);n!==t&&s.setState(n)}const u=()=>(0,i.jf)("extensions",{slots:{}});function l(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});(0,r.A)(o.hs.getState().mountedExtensions,t)||o.hs.setState({mountedExtensions:t})}l(s.getState()),s.subscribe(l)},7330(e,t,n){"use strict";n.d(t,{Q_:()=>d,Xb:()=>f,io:()=>u,pm:()=>c});var r=n(770),o=n(8249),i=n(4652);const s=(0,o.Zd)("workspaceRegistrations",{workspaces:{}}),a=(0,o.Zd)("workspaceGroups",{workspaceGroups:{}});function c(e){s.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function u(e){a.setState(t=>{const n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}const l=new Set;function f(e){const t=s.getState().workspaces;if(t[e])return t[e];{const t=(0,r.Tj)(e);if(t)return l.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),l.add(e)),{name:t.name,title:p(t),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]};throw new Error(`No workspace named '${e}' has been registered.`)}}function d(e){const t=a.getState().workspaceGroups;if(t[e])return t[e];throw new Error(`No workspace group named '${e}' has been registered.`)}function p(e){const t=e?.meta?.title;return"string"==typeof t?t:t&&"object"==typeof t?(0,i.t)(e.moduleName,t.key,t.default):e.name}},8581(e,t,n){"use strict";n.d(t,{$3:()=>y,FI:()=>h,LQ:()=>b,Vt:()=>m,Yt:()=>o,bJ:()=>v,bK:()=>g,dX:()=>_,ff:()=>u,gj:()=>i,ls:()=>w,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 b(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function y(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))}function m(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 g(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function _(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(p,t),()=>window.removeEventListener(p,t)}},9486(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||"/#?")+"]",b=c?"^":"",y=0,m=e;y<m.length;y++){var v=m[y];if("string"==typeof v)b+=r(d(v));else{var g=r(d(v.prefix)),_=r(d(v.suffix));if(v.pattern)if(t&&t.push(v),g||_)if("+"===v.modifier||"*"===v.modifier){var w="*"===v.modifier?"?":"";b+="(?:"+g+"((?:"+v.pattern+")(?:"+_+g+"(?:"+v.pattern+"))*)"+_+")"+w}else b+="(?:"+g+"("+v.pattern+")"+_+")"+v.modifier;else b+="("+v.pattern+")"+v.modifier;else b+="(?:"+g+_+")"+v.modifier}}if(l)s||(b+=h+"?"),b+=n.endsWith?"(?="+p+")":"$";else{var x=e[e.length-1],E="string"==typeof x?h.indexOf(x[x.length-1])>-1:void 0===x;s||(b+="(?:"+h+"(?="+p+"))?"),E||(b+="(?="+h+"|"+p+")")}return new RegExp(b,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"),b=f("NAME"),y=f("PATTERN");if(b||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(a.push(l),l=""),a.push({name:b||c++,prefix:m,suffix:"",pattern:y||s,modifier:f("MODIFIER")||""})}else{var v=h||f("ESCAPED_CHAR");if(v)l+=v;else if(l&&(a.push(l),l=""),f("OPEN")){m=p();var g=f("NAME")||"",_=f("PATTERN")||"",w=p();d("CLOSE"),a.push({name:g||(_?c++:""),pattern:g&&!_?s:_,prefix:m,suffix:w,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,{lz:()=>f,vf:()=>u,MY:()=>l});const a=(0,n(8249).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()}},4237(e,t,n){"use strict";n.d(t,{D:()=>i,q:()=>s});var r=n(9486);function o(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=o(e,n.join("/"));if(t)return t}}(e,t)}function i(e,t){if(e.length>0){const n=o(e,t);if(n){const t=[n];let r=o(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=o(e,r.settings.parent);return t.reverse()}}return[]}function s(e){return i((0,r.lz)(),e)}},1561(e,t,n){"use strict";n.d(t,{JK:()=>a,Wh:()=>s,g4:()=>u,tA:()=>c});var r=n(6918);const o="openmrs:history";function i(e){let t=JSON.parse(sessionStorage.getItem(o)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(o,JSON.stringify(t))}function s(){0===JSON.parse(sessionStorage.getItem(o)??"[]").length&&document.referrer&&i(document.referrer),window.addEventListener("single-spa:routing-event",e=>{const t=a();"replaceState"==e.detail.originalEvent?.singleSpaTrigger?(t[t.length-1]=window.location.href,sessionStorage.setItem(o,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?c({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&i(window.location.href)})}function a(){return JSON.parse(sessionStorage.getItem(o)??"[]")}function c({toUrl:e}){const t=a(),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);(0,r.o)({to:t[n]}),sessionStorage.setItem(o,JSON.stringify(e))}}function u(){sessionStorage.removeItem(o)}},5466(e,t,n){"use strict";function r(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return o(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t}).replace(/^\/\//,"/")}function o(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}n.d(t,{J:()=>r,z:()=>o})},6918(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(599),o=n(5466);function i({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),i=(0,o.J)(e,t).replace(window.location.origin,"");i.startsWith(n)?(0,r.EH)(i):window.location.assign(i)}},6484(e,t,n){"use strict";n.d(t,{nr:()=>A,FO:()=>qr,xN:()=>Hr,lY:()=>Gr,sA:()=>ro,wJ:()=>O,FE:()=>co,WA:()=>uo,qb:()=>so,C$:()=>Kr,xc:()=>zr,e:()=>Nr,WK:()=>go,LM:()=>$r,Rs:()=>y,Gp:()=>Wr,pb:()=>Ur,Io:()=>Fr,bO:()=>oo,ms:()=>w,jU:()=>no,JC:()=>g,UH:()=>m,Gj:()=>v,yD:()=>lo,ff:()=>fo,Zr:()=>Vr,Iq:()=>Br,KG:()=>_o,sZ:()=>b,NU:()=>po,wn:()=>ho,AO:()=>Mr,Og:()=>S,iD:()=>ao,cy:()=>Yr,Td:()=>bo,u1:()=>yo,sK:()=>wo});try{self["workbox:window:6.5.4"]&&_()}catch(r){}function r(e,t){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])})}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.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)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.4"]&&_()}catch(r){}var s=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function a(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var c=function(e,t){this.type=e,Object.assign(this,t)};function u(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function l(){}var f={type:"SKIP_WAITING"};function d(e,t){if(!t)return e&&e.then?e.then(l):Promise.resolve()}var p=function(e){var t,n;function o(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new s,r.en=new s,r.on=new s,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!a(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,s={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(s.isUpdate=!0),r.dispatchEvent(new c(o,s)),"installed"===o?r.wn=self.setTimeout(function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new c("waiting",s))},200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new c("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return u(r.getSW(),function(){r.an.has(o)&&r.dispatchEvent(new c("message",{data:t,originalEvent:e,ports:n,sw:o}))})},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,l=o.prototype;return l.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}(function(){if(!n&&"complete"!==document.readyState)return d(new Promise(function(e){return window.addEventListener("load",e)}))},function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),u(r.bn(),function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&a(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then(function(){r.dispatchEvent(new c("waiting",{sw:t,wasWaitingBeforeRegister:!0}))}).then(function(){})),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn})})}catch(e){return Promise.reject(e)}},l.update=function(){try{return this.fn?d(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},l.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},l.messageSW=function(e){try{return u(this.getSW(),function(t){return r(t,e)})}catch(e){return Promise.reject(e)}},l.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&r(this.fn.waiting,f)},l.pn=function(){var e=navigator.serviceWorker.controller;return e&&a(e.scriptURL,this.sn.toString())?e:void 0},l.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(function(){return u(navigator.serviceWorker.register(e.sn,e.nn),function(t){return e.un=performance.now(),t})},function(e){throw e})}catch(e){return Promise.reject(e)}},(i=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&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,r.key,r)}}(o.prototype,i),o}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=i(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());let h;function b(e,t){if(void 0!==h)return console.warn(`The application's Service Worker has already been registered. The new service worker at ${e} will not be registered.`),h;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");const n=new p(e,t);return h=n.register().then(()=>n.controlling.then(()=>n)),h}function y(){return h??Promise.resolve(void 0)}const m="x-omrs-offline-response-body",v="x-omrs-offline-response-status",g="x-omrs-offline-caching-strategy";async function w(e){const t=await y();return t?await t.messageSW(e):{success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."}}const x="openmrs3:offline-mode";let E="unavailable";function O(){return{current:E,notAvailable:"unavailable"===E,active:"on"===E}}function S(e){"unavailable"!==E&&"unavailable"!==e&&(localStorage.setItem(x,"on"===e?"active":"disabled"),E=e)}async function A(){await async function(){return await async function(){return new Promise(e=>{const t=indexedDB.open("test");t.onerror=()=>e(!0),t.onsuccess=()=>e(!1)})}()||await async function(){return!window.indexedDB}()||await async function(){const e=window.sessionStorage;try{e.setItem("someKeyHere","test"),e.removeItem("someKeyHere")}catch(t){if(t.code===DOMException.QUOTA_EXCEEDED_ERR&&0===e.length)return!0}return!1}()}()||(E="active"===localStorage.getItem(x)?"on":"off"),navigator.onLine}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:globalThis,P=Object.keys,T=Array.isArray;function I(e,t){return"object"!=typeof t||P(t).forEach(function(n){e[n]=t[n]}),e}"undefined"==typeof Promise||C.Promise||(C.Promise=Promise);const N=Object.getPrototypeOf,j={}.hasOwnProperty;function k(e,t){return j.call(e,t)}function R(e,t){"function"==typeof t&&(t=t(N(e))),("undefined"==typeof Reflect?P:Reflect.ownKeys)(t).forEach(n=>{M(e,n,t[n])})}const $=Object.defineProperty;function M(e,t,n,r){$(e,t,I(n&&k(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function D(e){return{from:function(t){return e.prototype=Object.create(t.prototype),M(e.prototype,"constructor",e),{extend:R.bind(null,e.prototype)}}}}const L=Object.getOwnPropertyDescriptor;function B(e,t){let n;return L(e,t)||(n=N(e))&&B(n,t)}const V=[].slice;function F(e,t,n){return V.call(e,t,n)}function z(e,t){return t(e)}function U(e){if(!e)throw new Error("Assertion Failed")}function K(e){C.setImmediate?setImmediate(e):setTimeout(e,0)}function W(e,t){return e.reduce((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e},{})}function H(e,t){if("string"==typeof t&&k(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=H(e,t[r]);n.push(i)}return n}var s=t.indexOf(".");if(-1!==s){var a=e[t.substr(0,s)];return null==a?void 0:H(a,t.substr(s+1))}}function q(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){U("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)q(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var s=t.substr(0,i),a=t.substr(i+1);if(""===a)void 0===n?T(e)&&!isNaN(parseInt(s))?e.splice(s,1):delete e[s]:e[s]=n;else{var c=e[s];c&&k(e,s)||(c=e[s]={}),q(c,a,n)}}else void 0===n?T(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function G(e){var t={};for(var n in e)k(e,n)&&(t[n]=e[n]);return t}const Y=[].concat;function Z(e){return Y.apply([],e)}const X="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Z([8,16,32,64].map(e=>["Int","Uint","Float"].map(t=>t+e+"Array")))).filter(e=>C[e]),Q=X.map(e=>C[e]);W(X,e=>[e,!0]);let J=null;function ee(e){J="undefined"!=typeof WeakMap&&new WeakMap;const t=te(e);return J=null,t}function te(e){if(!e||"object"!=typeof e)return e;let t=J&&J.get(e);if(t)return t;if(T(e)){t=[],J&&J.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(te(e[n]))}else if(Q.indexOf(e.constructor)>=0)t=e;else{const n=N(e);for(var o in t=n===Object.prototype?{}:Object.create(n),J&&J.set(e,t),e)k(e,o)&&(t[o]=te(e[o]))}return t}const{toString:ne}={};function re(e){return ne.call(e).slice(8,-1)}const oe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",ie="symbol"==typeof oe?function(e){var t;return null!=e&&(t=e[oe])&&t.apply(e)}:function(){return null},se={};function ae(e){var t,n,r,o;if(1===arguments.length){if(T(e))return e.slice();if(this===se&&"string"==typeof e)return[e];if(o=ie(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const ce="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var ue="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function le(e,t){ue=e,fe=t}var fe=()=>!0;const de=!new Error("").stack;function pe(){if(de)try{throw pe.arguments,new Error}catch(e){return e}return new Error}function he(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(fe).map(e=>"\n"+e).join("")):""}var be=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ye=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(be),me={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ve(e,t){this._e=pe(),this.name=e,this.message=t}function ge(e,t){return e+". Errors: "+Object.keys(t).map(e=>t[e].toString()).filter((e,t,n)=>n.indexOf(e)===t).join("\n")}function _e(e,t,n,r){this._e=pe(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ge(e,t)}function we(e,t){this._e=pe(),this.name="BulkError",this.failures=Object.keys(t).map(e=>t[e]),this.failuresByPos=t,this.message=ge(e,t)}D(ve).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+he(this._e,2))}},toString:function(){return this.name+": "+this.message}}),D(_e).from(ve),D(we).from(ve);var xe=ye.reduce((e,t)=>(e[t]=t+"Error",e),{});const Ee=ve;var Oe=ye.reduce((e,t)=>{var n=t+"Error";function r(e,r){this._e=pe(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=me[t]||n,this.inner=null)}return D(r).from(Ee),e[t]=r,e},{});Oe.Syntax=SyntaxError,Oe.Type=TypeError,Oe.Range=RangeError;var Se=be.reduce((e,t)=>(e[t+"Error"]=Oe[t],e),{}),Ae=ye.reduce((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Oe[t]),e),{});function Ce(){}function Pe(e){return e}function Te(e,t){return null==e||e===Pe?t:function(n){return t(e(n))}}function Ie(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Ne(e,t){return e===Ce?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Ie(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Ie(o,this.onerror):o),void 0!==i?i:n}}function je(e,t){return e===Ce?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Ie(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Ie(r,this.onerror):r)}}function ke(e,t){return e===Ce?t:function(n){var r=e.apply(this,arguments);I(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var s=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Ie(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Ie(i,this.onerror):i),void 0===r?void 0===s?void 0:s:I(r,s)}}function Re(e,t){return e===Ce?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function $e(e,t){return e===Ce?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then(function(){return t.apply(r,i)})}return t.apply(this,arguments)}}Ae.ModifyError=_e,Ae.DexieError=ve,Ae.BulkError=we;var Me={};const[De,Le,Be]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,N(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,N(t),e]})(),Ve=Le&&Le.then,Fe=De&&De.constructor,ze=!!Be;var Ue=!1,Ke=Be?()=>{Be.then(pt)}:C.setImmediate?setImmediate.bind(null,pt):C.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver(()=>{pt(),e=null}).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(pt,0)},We=function(e,t){et.push([e,t]),qe&&(Ke(),qe=!1)},He=!0,qe=!0,Ge=[],Ye=[],Ze=null,Xe=Pe,Qe={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Lt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach(e=>{try{Lt(e[0],e[1])}catch(e){}})}},Je=Qe,et=[],tt=0,nt=[];function rt(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ce,this._lib=!1;var t=this._PSD=Je;if(ue&&(this._stackHolder=pe(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Me)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&at(this,this._value))}this._state=null,this._value=null,++t.ref,st(this,e)}const ot={get:function(){var e=Je,t=Et;function n(n,r){var o=!e.global&&(e!==Je||t!==Et);const i=o&&!Ct();var s=new rt((t,s)=>{ut(this,new it($t(n,e,o,i),$t(r,e,o,i),t,s,e))});return ue&&dt(s,this),s}return n.prototype=Me,n},set:function(e){M(this,"then",e&&e.prototype===Me?ot:{get:function(){return e},set:ot.set})}};function it(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function st(e,t){try{t(t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ht();t&&"function"==typeof t.then?st(e,(e,n)=>{t instanceof rt?t._then(e,n):t.then(e,n)}):(e._state=!0,e._value=t,ct(e)),n&&bt()}},at.bind(null,e))}catch(t){at(e,t)}}function at(e,t){if(Ye.push(t),null===e._state){var n=e._lib&&ht();t=Xe(t),e._state=!1,e._value=t,ue&&null!==t&&"object"==typeof t&&!t._promise&&function(e){try{e.apply(null,void 0)}catch(e){}}(()=>{var n=B(t,"stack");t._promise=e,M(t,"stack",{get:()=>Ue?n&&(n.get?n.get.apply(t):n.value):e.stack})}),function(e){Ge.some(t=>t._value===e._value)||Ge.push(e)}(e),ct(e),n&&bt()}}function ct(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)ut(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===tt&&(++tt,We(()=>{0==--tt&&yt()},[]))}function ut(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++tt,We(lt,[n,e,t])}else e._listeners.push(t)}function lt(e,t,n){try{Ze=t;var r,o=t._value;t._state?r=e(o):(Ye.length&&(Ye=[]),r=e(o),-1===Ye.indexOf(o)&&function(e){for(var t=Ge.length;t;)if(Ge[--t]._value===e._value)return void Ge.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ze=null,0==--tt&&yt(),--n.psd.ref||n.psd.finalize()}}function ft(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,s=e._value;null!=s?(o=s.name||"Error",i=s.message||s,r=he(s,0)):(o=s,i=""),t.push(o+(i?": "+i:"")+r)}return ue&&((r=he(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&ft(e._prev,t,n)),t}function dt(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function pt(){ht()&&bt()}function ht(){var e=He;return He=!1,qe=!1,e}function bt(){var e,t,n;do{for(;et.length>0;)for(e=et,et=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(et.length>0);He=!0,qe=!0}function yt(){var e=Ge;Ge=[],e.forEach(e=>{e._PSD.onunhandled.call(null,e._value,e)});for(var t=nt.slice(0),n=t.length;n;)t[--n]()}function mt(e){return new rt(Me,!1,e)}function vt(e,t){var n=Je;return function(){var r=ht(),o=Je;try{return Nt(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Nt(o,!1),r&&bt()}}}R(rt.prototype,{then:ot,_then:function(e,t){ut(this,new it(null,null,e,t,Je))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,e=>e instanceof t?n(e):mt(e)):this.then(null,e=>e&&e.name===t?n(e):mt(e))},finally:function(e){return this.then(t=>(e(),t),t=>(e(),mt(t)))},stack:{get:function(){if(this._stack)return this._stack;try{Ue=!0;var e=ft(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Ue=!1}}},timeout:function(e,t){return e<1/0?new rt((n,r)=>{var o=setTimeout(()=>r(new Oe.Timeout(t)),e);this.then(n,r).finally(clearTimeout.bind(null,o))}):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&M(rt.prototype,Symbol.toStringTag,"Dexie.Promise"),Qe.env=jt(),R(rt,{all:function(){var e=ae.apply(null,arguments).map(Pt);return new rt(function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((o,i)=>rt.resolve(o).then(n=>{e[i]=n,--r||t(e)},n))})},resolve:e=>{if(e instanceof rt)return e;if(e&&"function"==typeof e.then)return new rt((t,n)=>{e.then(t,n)});var t=new rt(Me,!0,e);return dt(t,Ze),t},reject:mt,race:function(){var e=ae.apply(null,arguments).map(Pt);return new rt((t,n)=>{e.map(e=>rt.resolve(e).then(t,n))})},PSD:{get:()=>Je,set:e=>Je=e},totalEchoes:{get:()=>Et},newPSD:St,usePSD:kt,scheduler:{get:()=>We,set:e=>{We=e}},rejectionMapper:{get:()=>Xe,set:e=>{Xe=e}},follow:(e,t)=>new rt((n,r)=>St((t,n)=>{var r=Je;r.unhandleds=[],r.onunhandled=n,r.finalize=Ie(function(){!function(e){nt.push(function t(){e(),nt.splice(nt.indexOf(t),1)}),++tt,We(()=>{0==--tt&&yt()},[])}(()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])})},r.finalize),e()},t,n,r))}),Fe&&(Fe.allSettled&&M(rt,"allSettled",function(){const e=ae.apply(null,arguments).map(Pt);return new rt(t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach((e,o)=>rt.resolve(e).then(e=>r[o]={status:"fulfilled",value:e},e=>r[o]={status:"rejected",reason:e}).then(()=>--n||t(r)))})}),Fe.any&&"undefined"!=typeof AggregateError&&M(rt,"any",function(){const e=ae.apply(null,arguments).map(Pt);return new rt((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach((e,i)=>rt.resolve(e).then(e=>t(e),e=>{o[i]=e,--r||n(new AggregateError(o))}))})}));const gt={awaits:0,echoes:0,id:0};var _t=0,wt=[],xt=0,Et=0,Ot=0;function St(e,t,n,r){var o=Je,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Ot;var s=Qe.env;i.env=ze?{Promise:rt,PromiseProp:{value:rt,configurable:!0,writable:!0},all:rt.all,race:rt.race,allSettled:rt.allSettled,any:rt.any,resolve:rt.resolve,reject:rt.reject,nthen:Mt(s.nthen,i),gthen:Mt(s.gthen,i)}:{},t&&I(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=kt(i,e,n,r);return 0===i.ref&&i.finalize(),a}function At(){return gt.id||(gt.id=++_t),++gt.awaits,gt.echoes+=100,gt.id}function Ct(){return!!gt.awaits&&(0==--gt.awaits&&(gt.id=0),gt.echoes=100*gt.awaits,!0)}function Pt(e){return gt.echoes&&e&&e.constructor===Fe?(At(),e.then(e=>(Ct(),e),e=>(Ct(),Bt(e)))):e}function Tt(e){++Et,gt.echoes&&0!=--gt.echoes||(gt.echoes=gt.id=0),wt.push(Je),Nt(e,!0)}function It(){var e=wt[wt.length-1];wt.pop(),Nt(e,!1)}function Nt(e,t){var n=Je;if((t?!gt.echoes||xt++&&e===Je:!xt||--xt&&e===Je)||Rt(t?Tt.bind(null,e):It),e!==Je&&(Je=e,n===Qe&&(Qe.env=jt()),ze)){var r=Qe.env.Promise,o=e.env;Le.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(C,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function jt(){var e=C.Promise;return ze?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(C,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Le.then,gthen:e.prototype.then}:{}}function kt(e,t,n,r,o){var i=Je;try{return Nt(e,!0),t(n,r,o)}finally{Nt(i,!1)}}function Rt(e){Ve.call(De,e)}function $t(e,t,n,r){return"function"!=typeof e?e:function(){var o=Je;n&&At(),Nt(t,!0);try{return e.apply(this,arguments)}finally{Nt(o,!1),r&&Rt(Ct)}}}function Mt(e,t){return function(n,r){return e.call(this,$t(n,t),$t(r,t))}}-1===(""+Ve).indexOf("[native code]")&&(At=Ct=Ce);const Dt="unhandledrejection";function Lt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(C.document&&document.createEvent?((r=document.createEvent("Event")).initEvent(Dt,!0,!0),I(r,o)):C.CustomEvent&&I(r=new CustomEvent(Dt,{detail:o}),o),r&&C.dispatchEvent&&(dispatchEvent(r),!C.PromiseRejectionEvent&&C.onunhandledrejection))try{C.onunhandledrejection(r)}catch(e){}ue&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}var Bt=rt.reject;function Vt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Je.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===xe.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>Vt(e,t,n,r))):Bt(o)}return o._promise(t,(e,t)=>St(()=>(Je.trans=o,r(e,t,o)))).then(e=>o._completion.then(()=>e))}if(e._state.openComplete)return Bt(new Oe.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Bt(new Oe.DatabaseClosed);e.open().catch(Ce)}return e._state.dbReadyPromise.then(()=>Vt(e,t,n,r))}const Ft="3.2.7",zt=String.fromCharCode(65535),Ut=-1/0,Kt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Wt="String expected.",Ht=[],qt="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Gt=qt,Yt=qt,Zt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e),Xt="__dbnames",Qt="readonly",Jt="readwrite";function en(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const tn={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function nn(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=ee(t))[e],t)}class rn{_trans(e,t,n){const r=this._tx||Je.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Oe.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const s=ht();try{return r&&r.db===this.db?r===Je.trans?r._promise(e,i,n):St(()=>r._promise(e,i,n),{trans:r,transless:Je.transless||Je}):Vt(this.db,e,[this.name],i)}finally{s&&bt()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",t=>this.core.get({trans:t,key:e}).then(e=>this.hook.reading.fire(e))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(T(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=P(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter(e=>{if(e.compound&&t.every(t=>e.keyPath.indexOf(t)>=0)){for(let n=0;n<t.length;++n)if(-1===t.indexOf(e.keyPath[n]))return!1;return!0}return!1}).sort((e,t)=>e.keyPath.length-t.keyPath.length)[0];if(n&&this.db._maxKey!==zt){const r=n.keyPath.slice(0,t.length);return this.where(r).equals(r.map(t=>e[t]))}!n&&ue&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[s,a]=t.reduce(([t,n],o)=>{const s=r[o],a=e[o];return[t||s,t||!s?en(n,s&&s.multi?e=>{const t=H(e,o);return T(t)&&t.some(e=>i(a,e))}:e=>i(a,H(e,o))):n]},[null,null]);return s?this.where(s.name).equals(e[s.keyPath]).filter(a):n?this.filter(a):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,T(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(k(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass(function(e){I(this,e)})}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=nn(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]})).then(e=>e.numFailures?rt.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{q(e,r,t)}catch(e){}return t})}update(e,t){if("object"!=typeof e||T(e))return this.where(":id").equals(e).modify(t);{const n=H(e,this.schema.primKey.keyPath);if(void 0===n)return Bt(new Oe.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?P(t).forEach(n=>{q(e,n,t[n])}):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=nn(r)(e)),this._trans("readwrite",e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null})).then(e=>e.numFailures?rt.reject(e.failures[0]):e.lastResult).then(t=>{if(r)try{q(e,r,t)}catch(e){}return t})}delete(e){return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:[e]})).then(e=>e.numFailures?rt.reject(e.failures[0]):void 0)}clear(){return this._trans("readwrite",e=>this.core.mutate({trans:e,type:"deleteRange",range:tn})).then(e=>e.numFailures?rt.reject(e.failures[0]):void 0)}bulkGet(e){return this._trans("readonly",t=>this.core.getMany({keys:e,trans:t}).then(e=>e.map(e=>this.hook.reading.fire(e))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Oe.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Oe.InvalidArgument("Arguments objects and keys must have the same length");const s=e.length;let a=i&&n?e.map(nn(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:a,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new we(`${this.name}.bulkAdd(): ${e} of ${s} operations failed`,r)})})}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Oe.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Oe.InvalidArgument("Arguments objects and keys must have the same length");const s=e.length;let a=i&&n?e.map(nn(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:a,wantResults:o}).then(({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new we(`${this.name}.bulkPut(): ${e} of ${s} operations failed`,r)})})}bulkDelete(e){const t=e.length;return this._trans("readwrite",t=>this.core.mutate({trans:t,type:"delete",keys:e})).then(({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new we(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)})}}function on(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"!=typeof e){var s;r||(r=Re),o||(o=Ce);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter(function(t){return t!==e}),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}P(s=e).forEach(function(e){var t=s[e];if(T(t))i(e,s[e][0],s[e][1]);else{if("asap"!==t)throw new Oe.InvalidArgument("Invalid event config");var n=i(e,Pe,function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];n.subscribers.forEach(function(e){K(function(){e.apply(null,t)})})})}})}}function sn(e,t){return D(t).from({prototype:e}),t}function an(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function cn(e,t){e.filter=en(e.filter,t)}function un(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>en(r(),t()):t,e.justLimit=n&&!r}function ln(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Oe.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function fn(e,t,n){const r=ln(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function dn(e,t,n,r){const o=e.replayFilter?en(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},s=(e,n,r)=>{if(!o||o(n,r,e=>n.stop(e),e=>n.fail(e))){var s=n.primaryKey,a=""+s;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(s)),k(i,a)||(i[a]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(s,n),pn(fn(e,r,n),e.algorithm,s,!e.keysOnly&&e.valueMapper)])}return pn(fn(e,r,n),en(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function pn(e,t,n,r){var o=vt(r?(e,t,o)=>n(r(e),t,o):n);return e.then(e=>{if(e)return e.start(()=>{var n=()=>e.continue();t&&!t(e,e=>n=e,t=>{e.stop(t),n=Ce},t=>{e.fail(t),n=Ce})||o(e.value,e,e=>n=e),n()})})}function hn(e,t){try{const n=bn(e),r=bn(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(yn(e),yn(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=hn(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function bn(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=re(e);return"ArrayBuffer"===n?"binary":n}function yn(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class mn{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,Bt.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,Bt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=en(t.algorithm,e)}_iterate(e,t){return dn(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&I(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read(n=>dn(t,e,n,t.table.core))}count(e){return this._read(e=>{const t=this._ctx,n=t.table.core;if(an(t,!0))return n.count({trans:e,query:{index:ln(t,n.schema),range:t.range}}).then(e=>Math.min(e,t.limit));var r=0;return dn(t,()=>(++r,!1),e,n).then(()=>r)}).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var s="next"===this._ctx.dir?1:-1;function a(e,t){var n=i(e,o),r=i(t,o);return n<r?-s:n>r?s:0}return this.toArray(function(e){return e.sort(a)}).then(t)}toArray(e){return this._read(e=>{var t=this._ctx;if("next"===t.dir&&an(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=ln(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then(({result:e})=>n?e.map(n):e)}{const n=[];return dn(t,e=>n.push(e),e,t.table.core).then(()=>n)}},e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,an(t)?un(t,()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n(()=>{e.advance(t),t=0}),!1))}):un(t,()=>{var t=e;return()=>--t<0})),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),un(this._ctx,()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}},!0),this}until(e,t){return cn(this._ctx,function(n,r,o){return!e(n.value)||(r(o),t)}),this}first(e){return this.limit(1).toArray(function(e){return e[0]}).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return cn(this._ctx,function(t){return e(t.value)}),t=this._ctx,n=e,t.isMatch=en(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.key,n)})}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(t,n){e(n.primaryKey,n)})}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.key)}).then(function(){return n}).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&an(t,!0)&&t.limit>0)return this._read(e=>{var n=ln(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})}).then(({result:e})=>e).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(e,t){n.push(t.primaryKey)}).then(function(){return n}).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys(function(e){return e[0]}).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return cn(this._ctx,function(e){var t=e.primaryKey.toString(),r=k(n,t);return n[t]=!0,!r}),this}modify(e){var t=this._ctx;return this._write(n=>{var r;if("function"==typeof e)r=e;else{var o=P(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var s=o[r],a=e[s];H(t,s)!==a&&(q(t,s,a),n=!0)}return n}}const s=t.table.core,{outbound:a,extractKey:c}=s.schema.primaryKey,u=this.db._options.modifyChunkSize||200,l=[];let f=0;const d=[],p=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of P(n))l.push(n[e])};return this.clone().primaryKeys().then(o=>{const i=l=>{const f=Math.min(u,o.length-l);return s.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then(d=>{const h=[],b=[],y=a?[]:null,m=[];for(let e=0;e<f;++e){const t=d[e],n={value:ee(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?m.push(o[l+e]):a||0===hn(c(t),c(n.value))?(b.push(n.value),a&&y.push(o[l+e])):(m.push(o[l+e]),h.push(n.value)))}const v=an(t)&&t.limit===1/0&&("function"!=typeof e||e===vn)&&{index:t.index,range:t.range};return Promise.resolve(h.length>0&&s.mutate({trans:n,type:"add",values:h}).then(e=>{for(let t in e.failures)m.splice(parseInt(t),1);p(h.length,e)})).then(()=>(b.length>0||v&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:y,values:b,criteria:v,changeSpec:"function"!=typeof e&&e}).then(e=>p(b.length,e))).then(()=>(m.length>0||v&&e===vn)&&s.mutate({trans:n,type:"delete",keys:m,criteria:v}).then(e=>p(m.length,e))).then(()=>o.length>l+f&&i(l+u))})};return i(0).then(()=>{if(l.length>0)throw new _e("Error modifying one or more objects",l,f,d);return o.length})})})}delete(){var e=this._ctx,t=e.range;return an(e)&&(e.isPrimKey&&!Yt||3===t.type)?this._write(n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then(t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then(({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new _e("Could not delete some values",Object.keys(e).map(t=>e[t]),t-o);return t-o}))}):this.modify(vn)}}const vn=(e,t)=>t.value=null;function gn(e,t){return e<t?-1:e===t?0:1}function _n(e,t){return e>t?-1:e===t?0:1}function wn(e,t,n){var r=e instanceof Cn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function xn(e){return new e.Collection(e,()=>An("")).limit(0)}function En(e,t,n,r,o,i){for(var s=Math.min(e.length,r.length),a=-1,c=0;c<s;++c){var u=t[c];if(u!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):a>=0?e.substr(0,a)+t[a]+n.substr(a+1):null;o(e[c],u)<0&&(a=c)}return s<r.length&&"next"===i?e+n.substr(e.length):s<e.length&&"prev"===i?e.substr(0,n.length):a<0?null:e.substr(0,a)+r[a]+n.substr(a+1)}function On(e,t,n,r){var o,i,s,a,c,u,l,f=n.length;if(!n.every(e=>"string"==typeof e))return wn(e,Wt);function d(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),s="next"===e?gn:_n;var t=n.map(function(e){return{lower:i(e),upper:o(e)}}).sort(function(e,t){return s(e.lower,t.lower)});a=t.map(function(e){return e.upper}),c=t.map(function(e){return e.lower}),u=e,l="next"===e?"":r}d("next");var p=new e.Collection(e,()=>Sn(a[0],c[f-1]+r));p._ondirectionchange=function(e){d(e)};var h=0;return p._addAlgorithm(function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,c,h))return!0;for(var p=null,b=h;b<f;++b){var y=En(o,d,a[b],c[b],s,u);null===y&&null===p?h=b+1:(null===p||s(p,y)>0)&&(p=y)}return n(null!==p?function(){e.continue(p+l)}:r),!1}),p}function Sn(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function An(e){return{type:1,lower:e,upper:e}}class Cn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?xn(this):new this.Collection(this,()=>Sn(e,t,!n,!r))}catch(e){return wn(this,Kt)}}equals(e){return null==e?wn(this,Kt):new this.Collection(this,()=>An(e))}above(e){return null==e?wn(this,Kt):new this.Collection(this,()=>Sn(e,void 0,!0))}aboveOrEqual(e){return null==e?wn(this,Kt):new this.Collection(this,()=>Sn(e,void 0,!1))}below(e){return null==e?wn(this,Kt):new this.Collection(this,()=>Sn(void 0,e,!1,!0))}belowOrEqual(e){return null==e?wn(this,Kt):new this.Collection(this,()=>Sn(void 0,e))}startsWith(e){return"string"!=typeof e?wn(this,Wt):this.between(e,e+zt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):On(this,(e,t)=>0===e.indexOf(t[0]),[e],zt)}equalsIgnoreCase(e){return On(this,(e,t)=>e===t[0],[e],"")}anyOfIgnoreCase(){var e=ae.apply(se,arguments);return 0===e.length?xn(this):On(this,(e,t)=>-1!==t.indexOf(e),e,"")}startsWithAnyOfIgnoreCase(){var e=ae.apply(se,arguments);return 0===e.length?xn(this):On(this,(e,t)=>t.some(t=>0===e.indexOf(t)),e,zt)}anyOf(){const e=ae.apply(se,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return wn(this,Kt)}if(0===e.length)return xn(this);const n=new this.Collection(this,()=>Sn(e[0],e[e.length-1]));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm((n,o,i)=>{const s=n.key;for(;t(s,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(s,e[r])||(o(()=>{n.continue(e[r])}),!1)}),n}notEqual(e){return this.inAnyRange([[Ut,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=ae.apply(se,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return wn(this,Kt)}const t=e.reduce((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[Ut,t]],null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,s=this._max;if(0===e.length)return xn(this);if(!e.every(e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0))return wn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Oe.InvalidArgument);const a=!t||!1!==t.includeLowers,c=t&&!0===t.includeUppers;let u,l=r;function f(e,t){return l(e[0],t[0])}try{u=e.reduce(function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===o&&e.push(t),e},[]),u.sort(f)}catch(e){return wn(this,Kt)}let d=0;const p=c?e=>r(e,u[d][1])>0:e=>r(e,u[d][1])>=0,h=a?e=>o(e,u[d][0])>0:e=>o(e,u[d][0])>=0;let b=p;const y=new this.Collection(this,()=>Sn(u[0][0],u[u.length-1][1],!a,!c));return y._ondirectionchange=e=>{"next"===e?(b=p,l=r):(b=h,l=o),u.sort(f)},y._addAlgorithm((e,t,n)=>{for(var o=e.key;b(o);)if(++d,d===u.length)return t(n),!1;return!!function(e){return!p(e)&&!h(e)}(o)||(0===this._cmp(o,u[d][1])||0===this._cmp(o,u[d][0])||t(()=>{l===r?e.continue(u[d][0]):e.continue(u[d][1])}),!1)}),y}startsWithAnyOf(){const e=ae.apply(se,arguments);return e.every(e=>"string"==typeof e)?0===e.length?xn(this):this.inAnyRange(e.map(e=>[e,e+zt])):wn(this,"startsWithAnyOf() only works with strings")}}function Pn(e){return vt(function(t){return Tn(t),e(t.target.error),!1})}function Tn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const In="storagemutated",Nn="x-storagemutated-1",jn=on(null,In);class kn{_lock(){return U(!Je.global),++this._reculock,1!==this._reculock||Je.global||(Je.lockOwnerFor=this),this}_unlock(){if(U(!Je.global),0==--this._reculock)for(Je.global||(Je.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{kt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Je.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(U(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Oe.DatabaseClosed(n);case"MissingAPIError":throw new Oe.MissingAPI(n.message,n);default:throw new Oe.OpenFailed(n)}if(!this.active)throw new Oe.TransactionInactive;return U(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=vt(t=>{Tn(t),this._reject(e.error)}),e.onabort=vt(t=>{Tn(t),this.active&&this._reject(new Oe.Abort(e.error)),this.active=!1,this.on("abort").fire(t)}),e.oncomplete=vt(()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&jn.storagemutated.fire(e.mutatedParts)}),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return Bt(new Oe.ReadOnly("Transaction is readonly"));if(!this.active)return Bt(new Oe.TransactionInactive);if(this._locked())return new rt((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Je])});if(n)return St(()=>{var e=new rt((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)});return e.finally(()=>this._unlock()),e._lib=!0,e});var r=new rt((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)});return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=rt.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then(()=>n);else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new rt((e,r)=>{n.then(n=>t._waitingQueue.push(vt(e.bind(null,n))),e=>t._waitingQueue.push(vt(r.bind(null,e)))).finally(()=>{t._waitingFor===o&&(t._waitingFor=null)})})}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Oe.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(k(t,e))return t[e];const n=this.schema[e];if(!n)throw new Oe.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function Rn(e,t,n,r,o,i,s){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!s?"&":"")+(r?"*":"")+(o?"++":"")+$n(t)}}function $n(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function Mn(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:W(n,e=>[e.name,e])}}let Dn=e=>{try{return e.only([[]]),Dn=()=>[[]],[[]]}catch(e){return Dn=()=>zt,zt}};function Ln(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>H(t,e)}(e):t=>H(t,e)}function Bn(e){return[].slice.call(e)}let Vn=0;function Fn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function zn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce((e,{create:t})=>({...e,...t(e)}),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Bn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map(e=>t.objectStore(e)).map(e=>{const{keyPath:t,autoIncrement:n}=e,r=T(t),o=null==t,i={},s={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:Ln(t)},indexes:Bn(e.indexNames).map(t=>e.index(t)).map(e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,s={name:t,compound:T(o),keyPath:o,unique:n,multiEntry:r,extractKey:Ln(o)};return i[Fn(o)]=s,s}),getIndexByKeyPath:e=>i[Fn(e)]};return i[":id"]=s.primaryKey,null!=t&&(i[Fn(t)]=s.primaryKey),s})},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),s=o.tables.map(e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:s}){return new Promise((a,c)=>{a=vt(a);const u=e.objectStore(t),l=null==u.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:d}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return a({numFailures:0,failures:{},results:[],lastResult:void 0});let p;const h=[],b=[];let y=0;const m=e=>{++y,Tn(e)};if("deleteRange"===n){if(4===s.type)return a({numFailures:y,failures:b,results:[],lastResult:void 0});3===s.type?h.push(p=u.clear()):h.push(p=u.delete(r(s)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<d;++r)h.push(p=t&&void 0!==t[r]?u[n](e[r],t[r]):u[n](e[r])),p.onerror=m;else for(let t=0;t<d;++t)h.push(p=u[n](e[t])),p.onerror=m}const v=e=>{const t=e.target.result;h.forEach((e,t)=>null!=e.error&&(b[t]=e.error)),a({numFailures:y,failures:b,results:"delete"===n?o:h.map(e=>e.result),lastResult:t})};p.onerror=e=>{m(e),v(e)},p.onsuccess=v})},getMany:({trans:e,keys:n})=>new Promise((r,o)=>{r=vt(r);const i=e.objectStore(t),s=n.length,a=new Array(s);let c,u=0,l=0;const f=e=>{const t=e.target;a[t._pos]=t.result,++l===u&&r(a)},d=Pn(o);for(let e=0;e<s;++e)null!=n[e]&&(c=i.get(n[e]),c._pos=e,c.onsuccess=f,c.onerror=d,++u);0===u&&r(a)}),get:({trans:e,key:n})=>new Promise((r,o)=>{r=vt(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Pn(o)}),query:function(e){return n=>new Promise((o,i)=>{o=vt(o);const{trans:s,values:a,limit:c,query:u}=n,l=c===1/0?void 0:c,{index:f,range:d}=u,p=s.objectStore(t),h=f.isPrimaryKey?p:p.index(f.name),b=r(d);if(0===c)return o({result:[]});if(e){const e=a?h.getAll(b,l):h.getAllKeys(b,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Pn(i)}else{let e=0;const t=a||!("openKeyCursor"in h)?h.openCursor(b):h.openKeyCursor(b),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(a?i.value:i.primaryKey),++e===c?o({result:n}):void i.continue()):o({result:n})},t.onerror=Pn(i)}})}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:s}){return new Promise((a,c)=>{a=vt(a);const{index:u,range:l}=o,f=e.objectStore(t),d=u.isPrimaryKey?f:f.index(u.name),p=i?s?"prevunique":"prev":s?"nextunique":"next",h=n||!("openKeyCursor"in d)?d.openCursor(r(l),p):d.openKeyCursor(r(l),p);h.onerror=Pn(c),h.onsuccess=vt(t=>{const n=h.result;if(!n)return void a(null);n.___id=++Vn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),s=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=vt(c),n.next=function(){let e=1;return this.start(()=>e--?this.continue():this.stop()).then(()=>this)},n.start=e=>{const t=new Promise((e,t)=>{e=vt(e),h.onerror=Pn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}}),a=()=>{if(h.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return h.onsuccess=vt(e=>{h.onsuccess=a,a()}),n.continue=r,n.continuePrimaryKey=o,n.advance=i,a(),t},a(n)},c)})},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise((e,s)=>{const a=n.objectStore(t),c=o.isPrimaryKey?a:a.index(o.name),u=r(i),l=u?c.count(u):c.count();l.onsuccess=vt(t=>e(t.target.result)),l.onerror=Pn(s)})}}}(e)),a={};return s.forEach(e=>a[e.name]=e),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!a[e])throw new Error(`Table '${e}' not found`);return a[e]},MIN_KEY:-1/0,MAX_KEY:Dn(t),schema:o}}(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach(t=>{const n=t.name;e.core.schema.tables.some(e=>e.name===n)&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))})}function Un({_novip:e},t,n,r){n.forEach(n=>{const o=r[n];t.forEach(t=>{const r=B(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?M(t,n,{get(){return this.table(n)},set(e){$(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))})})}function Kn({_novip:e},t){t.forEach(t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]})}function Wn(e,t){return e._cfg.version-t._cfg.version}function Hn(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!qt)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let s;for(s in t)r[s]||e.del.push(s);for(s in r){const n=t[s],o=r[s];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function qn(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach(e=>Gn(o,e)),o}function Gn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Yn(e,t,n){const r={};return F(t.objectStoreNames,0).forEach(e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Rn($n(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),s=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var a=Rn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);s.push(a)}r[e]=Mn(e,i,s)}),r}function Zn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],s=n.objectStore(i);e._hasGetAll="getAll"in s;for(let e=0;e<s.indexNames.length;++e){const n=s.indexNames[e],r=s.index(n).keyPath,o="string"==typeof r?r:"["+F(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&C.WorkerGlobalScope&&C instanceof C.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class Xn{_parseStoresSpec(e,t){P(e).forEach(n=>{if(null!==e[n]){var r=e[n].split(",").map((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Rn(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),T(r),0===t)}),o=r.shift();if(o.multi)throw new Oe.Schema("Primary key cannot be multi-valued");r.forEach(e=>{if(e.auto)throw new Oe.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Oe.Schema("Index must have a name and cannot be an empty string")}),t[n]=Mn(n,o,r)}})}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?I(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach(e=>{I(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)}),t._dbSchema=o,Kn(t,[t._allTables,t,t.Transaction.prototype]),Un(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],P(o),o),t._storeNames=P(o),this}upgrade(e){return this._cfg.contentUpgrade=$e(this._cfg.contentUpgrade||Ce,e),this}}function Qn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new gr(Xt,{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Jn(e){return e&&"function"==typeof e.databases}function er(e){return St(function(){return Je.letThrough=!0,e()})}function tr(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()}).finally(function(){return clearInterval(e)}):Promise.resolve()}function nr(e){var t=t=>e.next(t),n=o(t),r=o(t=>e.throw(t));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):T(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function rr(e,t,n){var r=arguments.length;if(r<2)throw new Oe.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,Z(o),n]}function or(e,t,n,r,o){return rt.resolve().then(()=>{const i=Je.transless||Je,s=e._createTransaction(t,n,e._dbSchema,r),a={trans:s,transless:i};if(r)s.idbtrans=r.idbtrans;else try{s.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===xe.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then(()=>or(e,t,n,null,o))):Bt(r)}const c=ce(o);let u;c&&At();const l=rt.follow(()=>{if(u=o.call(s,s),u)if(c){var e=Ct.bind(null,null);u.then(e,e)}else"function"==typeof u.next&&"function"==typeof u.throw&&(u=nr(u))},a);return(u&&"function"==typeof u.then?rt.resolve(u).then(e=>s.active?e:Bt(new Oe.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))):l.then(()=>u)).then(e=>(r&&s._resolve(),s._completion.then(()=>e))).catch(e=>(s._reject(e),Bt(e)))})}function ir(e,t,n){const r=T(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const sr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function s(e,t,n){const r=Fn(e),a=o[r]=o[r]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l={...n,isVirtual:u,keyTail:t,keyLength:c,extractKey:Ln(e),unique:!u&&n.unique};return a.push(l),l.isPrimaryKey||i.push(l),c>1&&s(2===c?e[0]:e.slice(0,c-1),t+1,n),a.sort((e,t)=>e.keyTail-t.keyTail),l}const a=s(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[a];for(const e of r.indexes)s(e.keyPath,0,e);function c(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:ir(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:ir(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const u={...n,schema:{...r,primaryKey:a,indexes:i,getIndexByKeyPath:function(e){const t=o[Fn(e)];return t&&t[0]}},count:e=>n.count(c(e)),query:e=>n.query(c(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(c(t)).then(n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(ir(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(ir(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n)):n.openCursor(t)}};return u}}}};function ar(e,t,n,r){return n=n||{},r=r||"",P(e).forEach(o=>{if(k(t,o)){var i=e[o],s=t[o];if("object"==typeof i&&"object"==typeof s&&i&&s){const e=re(i);e!==re(s)?n[r+o]=t[o]:"Object"===e?ar(i,s,n,r+o+"."):i!==s&&(n[r+o]=t[o])}else i!==s&&(n[r+o]=t[o])}else n[r+o]=void 0}),P(t).forEach(o=>{k(e,o)||(n[r+o]=t[o])}),n}const cr={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=Je.trans,{deleting:i,creating:s,updating:a}=o.table(t).hook;switch(e.type){case"add":if(s.fire===Ce)break;return o._promise("readwrite",()=>c(e),!0);case"put":if(s.fire===Ce&&a.fire===Ce)break;return o._promise("readwrite",()=>c(e),!0);case"delete":if(i.fire===Ce)break;return o._promise("readwrite",()=>c(e),!0);case"deleteRange":if(i.fire===Ce)break;return o._promise("readwrite",()=>function(e){return u(e.trans,e.range,1e4)}(e),!0)}return n.mutate(e);function c(e){const t=Je.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then(c=>{const u=o.map((n,o)=>{const u=c[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,u,t);else if("add"===e.type||void 0===u){const i=s.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||q(e.values[o],r.keyPath,n))}else{const r=ar(u,e.values[o]),i=a.fire.call(l,r,n,u,t);if(i){const t=e.values[o];Object.keys(i).forEach(e=>{k(t,e)?t[e]=i[e]:q(t,e,i[e])})}}return l});return n.mutate(e).then(({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],s=u[r];null==i?s.onerror&&s.onerror(t[r]):s.onsuccess&&s.onsuccess("put"===e.type&&c[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}}).catch(e=>(u.forEach(t=>t.onerror&&t.onerror(e)),Promise.reject(e)))})}function u(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then(({result:n})=>c({type:"delete",keys:n,trans:e}).then(r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:u(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))}}};return o}})};function ur(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===hn(t.keys[o],e[i])&&(r.push(n?ee(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const lr={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=ur(e.keys,e.trans._cache,"clone"===e.cache);return t?rt.resolve(t):n.getMany(e).then(t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?ee(t):t},t))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function fr(e){return!("from"in e)}const dr=function(e,t){if(!this){const t=new dr;return e&&"d"in e&&I(t,e),t}I(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function pr(e,t,n){const r=hn(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(fr(e))return I(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(hn(n,e.from)<0)return o?pr(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},yr(e);if(hn(t,e.to)>0)return i?pr(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},yr(e);hn(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),hn(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const s=!e.r;o&&!e.l&&hr(e,o),i&&s&&hr(e,i)}function hr(e,t){fr(t)||function e(t,{from:n,to:r,l:o,r:i}){pr(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function br(e){let t=fr(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&hn(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||hn(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function yr(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=mr(n)}e.d=mr(e)}function mr({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}R(dr.prototype,{add(e){return hr(this,e),this},addKey(e){return pr(this,e,e),this},addKeys(e){return e.forEach(e=>pr(this,e,e)),this},[oe](){return br(this)}});const vr={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new dr(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:s}=i,{extractKey:a,outbound:c}=s,u={...o,mutate:e=>{const s=e.trans,a=s.mutatedParts||(s.mutatedParts={}),c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new dr)},u=c(""),l=c(":dels"),{type:f}=e;let[d,p]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const h=e.trans._cache;return o.mutate(e).then(e=>{if(T(d)){"delete"!==f&&(d=e.results),u.addKeys(d);const t=ur(d,h);t||"add"===f||l.addKeys(d),(t||p)&&function(e,t,n,r){t.indexes.forEach(function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const s=e=>t.multiEntry&&T(e)?e.forEach(e=>o.addKey(e)):o.addKey(e);(n||r).forEach((e,t)=>{const o=n&&i(n[t]),a=r&&i(r[t]);0!==hn(o,a)&&(null!=o&&s(o),null!=a&&s(a))})})}(c,i,t,p)}else if(d){const e={from:d.lower,to:d.upper};l.add(e),u.add(e)}else u.add(n),l.add(n),i.indexes.forEach(e=>c(e.name).add(n));return e})}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new dr(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[s,new dr(e.key)],getMany:e=>[s,(new dr).addKeys(e.keys)],count:l,query:l,openCursor:l};return P(f).forEach(e=>{u[e]=function(i){const{subscr:s}=Je;if(s){const u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new dr)},l=u(""),d=u(":dels"),[p,h]=f[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&c&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then(n=>{if("query"===e){if(c&&i.values)return t.then(({result:e})=>(l.addKeys(e),n));const e=i.values?n.result.map(a):n.result;i.values?l.addKeys(e):d.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(d.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return d.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n})}d.add(n)}}return o[e].apply(this,arguments)}}),u}}}};class gr{constructor(e,t){this._middlewares={},this.verno=0;const n=gr.dependencies;this._options=t={addons:gr.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ce,dbReadyPromise:null,cancelOpen:Ce,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new rt(e=>{o.dbReadyResolve=e}),o.openCanceller=new rt((e,t)=>{o.cancelOpen=t}),this._state=o,this.name=e,this.on=on(this,"populate","blocked","versionchange","close",{ready:[$e,Ce]}),this.on.ready.subscribe=z(this.on.ready.subscribe,e=>(t,n)=>{gr.vip(()=>{const r=this._state;if(r.openComplete)r.dbOpenError||rt.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e(function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)})}})}),this.Collection=(i=this,sn(mn.prototype,function(e,t){this.db=i;let n=tn,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,s=o.table,a=s.hook.reading.fire;this._ctx={table:s,index:o.index,isPrimKey:!o.index||s.schema.primKey.keyPath&&o.index===s.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:a!==Pe?a:null}})),this.Table=function(e){return sn(rn.prototype,function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:on(null,{creating:[Ne,Ce],reading:[Te,Pe],updating:[ke,Ce],deleting:[je,Ce]})})}(this),this.Transaction=function(e){return sn(kn.prototype,function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=on(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new rt((e,t)=>{this._resolve=e,this._reject=t}),this._completion.then(()=>{this.active=!1,this.on.complete.fire()},e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),Bt(e)})})}(this),this.Version=function(e){return sn(Xn.prototype,function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})}(this),this.WhereClause=function(e){return sn(Cn.prototype,function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Oe.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange})}(this),this.on("versionchange",e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()}),this.on("blocked",e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)}),this._maxKey=Dn(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Ht.filter(e=>e.name===this.name&&e!==this&&!e._state.vcFired).map(t=>t.on("versionchange").fire(e))},this.use(sr),this.use(cr),this.use(vr),this.use(lr),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach(e=>e(this))}version(e){if(isNaN(e)||e<.1)throw new Oe.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Oe.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter(t=>t._cfg.version===e)[0];return n||(n=new this.Version(e),t.push(n),t.sort(Wn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Je.letThrough||this._vip)?e():new rt((e,t)=>{if(this._state.openComplete)return t(new Oe.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Oe.DatabaseClosed);this.open().catch(Ce)}this._state.dbReadyPromise.then(e,t)}).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort((e,t)=>e.level-t.level),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter(e=>n?e.create!==n:!!t&&e.name!==t)),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(()=>t.dbOpenError?Bt(t.dbOpenError):e);ue&&(t.openCanceller._stackHolder=pe()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Oe.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,s=null,a=!1;const c=()=>new rt((r,i)=>{if(o(),!n)throw new Oe.MissingAPI;const c=e.name,u=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!u)throw new Oe.MissingAPI;u.onerror=Pn(i),u.onblocked=vt(e._fireOnBlocked),u.onupgradeneeded=vt(r=>{if(s=u.transaction,t.autoSchema&&!e._options.allowEmptyDB){u.onerror=Tn,s.abort(),u.result.close();const e=n.deleteDatabase(c);e.onsuccess=e.onerror=vt(()=>{i(new Oe.NoSuchDatabase(`Database ${c} doesnt exist`))})}else{s.onerror=Pn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;a=o<1,e._novip.idbdb=u.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const s=i._reject.bind(i),a=Je.transless||Je;St(()=>{Je.trans=i,Je.transless=a,0===t?(P(o).forEach(e=>{qn(n,e,o[e].primKey,o[e].indexes)}),zn(e,n),rt.follow(()=>e.on.populate.fire(i)).catch(s)):function({_novip:e},t,n,r){const o=[],i=e._versions;let s=e._dbSchema=Yn(0,e.idbdb,r),a=!1;const c=i.filter(e=>e._cfg.version>=t);return c.forEach(i=>{o.push(()=>{const o=s,c=i._cfg.dbschema;Zn(e,o,r),Zn(e,c,r),s=e._dbSchema=c;const u=Hn(o,c);u.add.forEach(e=>{qn(r,e[0],e[1].primKey,e[1].indexes)}),u.change.forEach(e=>{if(e.recreate)throw new Oe.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach(e=>Gn(t,e)),e.change.forEach(e=>{t.deleteIndex(e.name),Gn(t,e)}),e.del.forEach(e=>t.deleteIndex(e))}});const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){zn(e,r),n._memoizedTables={},a=!0;let t=G(c);u.del.forEach(e=>{t[e]=o[e]}),Kn(e,[e.Transaction.prototype]),Un(e,[e.Transaction.prototype],P(t),t),n.schema=t;const i=ce(l);let s;i&&At();const f=rt.follow(()=>{if(s=l(n),s&&i){var e=Ct.bind(null,null);s.then(e,e)}});return s&&"function"==typeof s.then?rt.resolve(s):f.then(()=>s)}}),o.push(t=>{a&&Gt||function(e,t){[].slice.call(t.db.objectStoreNames).forEach(n=>null==e[n]&&t.db.deleteObjectStore(n))}(i._cfg.dbschema,t),Kn(e,[e.Transaction.prototype]),Un(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema})}),function e(){return o.length?rt.resolve(o.shift()(n.idbtrans)).then(e):rt.resolve()}().then(()=>{var e,t;t=r,P(e=s).forEach(n=>{t.db.objectStoreNames.contains(n)||qn(t,n,e[n].primKey,e[n].indexes)})})}(e,t,i,n).catch(s)})}(e,o/10,s,i)}},i),u.onsuccess=vt(()=>{s=null;const n=e._novip.idbdb=u.result,o=F(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Yn(0,t,n);e._storeNames=F(t.objectStoreNames,0),Un(e,[e._allTables],P(r),r)}(e,n,r):(Zn(e,e._dbSchema,r),function(e,t){const n=Hn(Yn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some(e=>e.add.length||e.change.length))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),zn(e,r)}catch(e){}var i;Ht.push(e),n.onversionchange=vt(n=>{t.vcFired=!0,e.on("versionchange").fire(n)}),n.onclose=vt(t=>{e.on("close").fire(t)}),a&&function({indexedDB:e,IDBKeyRange:t},n){!Jn(e)&&n!==Xt&&Qn(e,t).put({name:n}).catch(Ce)}(e._deps,c),r()},i)}).catch(e=>e&&"UnknownError"===e.name&&t.PR1398_maxLoop>0?(t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),c()):rt.reject(e));return rt.race([r,("undefined"==typeof navigator?rt.resolve():tr()).then(c)]).then(()=>(o(),t.onReadyBeingFired=[],rt.resolve(er(()=>e.on.ready.fire(e.vip))).then(function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce($e,Ce);return t.onReadyBeingFired=[],rt.resolve(er(()=>r(e.vip))).then(n)}}))).finally(()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1}).then(()=>e).catch(n=>{t.dbOpenError=n;try{s&&s.abort()}catch(e){}return r===t.openCanceller&&e._close(),Bt(n)}).finally(()=>{t.openComplete=!0,i()})}(this)}_close(){const e=this._state,t=Ht.indexOf(this);if(t>=0&&Ht.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new rt(t=>{e.dbReadyResolve=t}),e.openCanceller=new rt((t,n)=>{e.cancelOpen=n})}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Oe.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new rt((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=vt(()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Jn(e)&&n!==Xt&&Qn(e,t).delete(n).catch(Ce)}(this._deps,this.name),n()}),e.onerror=Pn(r),e.onblocked=this._fireOnBlocked};if(e)throw new Oe.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()})}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return P(this._allTables).map(e=>this._allTables[e])}transaction(){const e=rr.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Je.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,s;e=e.replace("!","").replace("?","");try{if(s=t.map(e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t}),"r"==e||e===Qt)i=Qt;else{if("rw"!=e&&e!=Jt)throw new Oe.InvalidArgument("Invalid transaction mode: "+e);i=Jt}if(r){if(r.mode===Qt&&i===Jt){if(!o)throw new Oe.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&s.forEach(e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Oe.SubTransaction("Table "+e+" not included in parent transaction.");r=null}}),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,(t,n)=>{n(e)}):Bt(e)}const a=or.bind(null,this,i,s,r,n);return r?r._promise(i,a,"lock"):Je.trans?kt(Je.transless,()=>this._whenReady(a)):this._whenReady(a)}table(e){if(!k(this._allTables,e))throw new Oe.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const _r="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class wr{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[_r](){return this}}function xr(e,t){return P(t).forEach(n=>{hr(e[n]||(e[n]=new dr),t[n])}),e}let Er;try{Er={indexedDB:C.indexedDB||C.mozIndexedDB||C.webkitIndexedDB||C.msIndexedDB,IDBKeyRange:C.IDBKeyRange||C.webkitIDBKeyRange}}catch(i){Er={indexedDB:null,IDBKeyRange:null}}const Or=gr;function Sr(e){let t=Ar;try{Ar=!0,jn.storagemutated.fire(e)}finally{Ar=t}}R(Or,{...Ae,delete:e=>new Or(e,{addons:[]}).delete(),exists:e=>new Or(e,{addons:[]}).open().then(e=>(e.close(),!0)).catch("NoSuchDatabaseError",()=>!1),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Jn(e)?Promise.resolve(e.databases()).then(e=>e.map(e=>e.name).filter(e=>e!==Xt)):Qn(e,t).toCollection().primaryKeys()}(Or.dependencies).then(e)}catch(e){return Bt(new Oe.MissingAPI)}},defineClass:()=>function(e){I(this,e)},ignoreTransaction:e=>Je.trans?kt(Je.transless,e):e(),vip:er,async:function(e){return function(){try{var t=nr(e.apply(this,arguments));return t&&"function"==typeof t.then?t:rt.resolve(t)}catch(e){return Bt(e)}}},spawn:function(e,t,n){try{var r=nr(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:rt.resolve(r)}catch(e){return Bt(e)}},currentTransaction:{get:()=>Je.trans||null},waitFor:function(e,t){const n=rt.resolve("function"==typeof e?Or.ignoreTransaction(e):e).timeout(t||6e4);return Je.trans?Je.trans.waitFor(n):n},Promise:rt,debug:{get:()=>ue,set:e=>{le(e,"dexie"===e?()=>!0:Zt)}},derive:D,extend:I,props:R,override:z,Events:on,on:jn,liveQuery:function(e){let t,n=!1;const r=new wr(r=>{const o=ce(e);let i=!1,s={},a={};const c={get closed(){return i},unsubscribe:()=>{i=!0,jn.storagemutated.unsubscribe(d)}};r.start&&r.start(c);let u=!1,l=!1;function f(){return P(a).some(e=>s[e]&&function(e,t){const n=br(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=br(e);let s=i.next(o.from),a=s.value;for(;!r.done&&!s.done;){if(hn(a.from,o.to)<=0&&hn(a.to,o.from)>=0)return!0;hn(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(s=i.next(o.from)).value}return!1}(s[e],a[e]))}const d=e=>{xr(s,e),f()&&p()},p=()=>{if(u||i)return;s={};const h={},b=function(t){o&&At();const n=()=>St(e,{subscr:t,trans:null}),r=Je.trans?kt(Je.transless,n):n();return o&&r.then(Ct,Ct),r}(h);l||(jn(In,d),l=!0),u=!0,Promise.resolve(b).then(e=>{n=!0,t=e,u=!1,i||(f()?p():(s={},a=h,r.next&&r.next(e)))},e=>{u=!1,n=!1,r.error&&r.error(e),c.unsubscribe()})};return p(),c});return r.hasValue=()=>n,r.getValue=()=>t,r},extendObservabilitySet:xr,getByKeyPath:H,setByKeyPath:q,delByKeyPath:function(e,t){"string"==typeof t?q(e,t,void 0):"length"in t&&[].map.call(t,function(t){q(e,t,void 0)})},shallowClone:G,deepClone:ee,getObjectDiff:ar,cmp:hn,asap:K,minKey:Ut,addons:[],connections:Ht,errnames:xe,dependencies:Er,semVer:Ft,version:Ft.split(".").map(e=>parseInt(e)).reduce((e,t,n)=>e+t/Math.pow(10,2*n))}),Or.maxKey=Dn(Or.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(jn(In,e=>{if(!Ar){let t;qt?(t=document.createEvent("CustomEvent"),t.initCustomEvent(Nn,!0,!0,e)):t=new CustomEvent(Nn,{detail:e}),Ar=!0,dispatchEvent(t),Ar=!1}}),addEventListener(Nn,({detail:e})=>{Ar||Sr(e)}));let Ar=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel(Nn);"function"==typeof e.unref&&e.unref(),jn(In,t=>{Ar||e.postMessage(t)}),e.onmessage=e=>{e.data&&Sr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){jn(In,e=>{try{Ar||("undefined"!=typeof localStorage&&localStorage.setItem(Nn,JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach(t=>t.postMessage({type:Nn,changedParts:e})))}catch(e){}}),"undefined"!=typeof addEventListener&&addEventListener("storage",e=>{if(e.key===Nn){const t=JSON.parse(e.newValue);t&&Sr(t.changedParts)}});const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",function({data:e}){e&&e.type===Nn&&Sr(e.changedParts)})}rt.rejectionMapper=function(e,t){if(!e||e instanceof ve||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Se[e.name])return e;var n=new Se[e.name](t||e.message,e);return"stack"in e&&M(n,"stack",{get:function(){return this.inner.stack}}),n},le(ue,Zt);var Cr=n(1926),Pr=n(8249);function Tr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ir extends gr{constructor(){super("EsmOffline"),Tr(this,"syncQueue",void 0),Tr(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}}function Nr(){return new Ir}const jr=new Ir,kr={},Rr=(0,Pr.Zd)("offline-synchronization",{});function $r(){return Rr}async function Mr(){if(Rr.getState().synchronization)return;const e=await jr.syncQueue.count(),t={},n=Object.entries(kr),r=n.length,o={},i=new AbortController,s=()=>{const e=Rr.getState().synchronization;Rr.setState({synchronization:{...e,pendingCount:e.pendingCount-1}})};try{Rr.setState({synchronization:{totalCount:e,pendingCount:e,abortController:i}});for(let e=0;e<r&&n.length>0;e++)for(let e=n.length;e--;){const[r,a]=n[e],c=a.dependsOn.map(e=>t[e]);c.every(Boolean)&&(o[r]={},await Promise.all(c),t[r]=Dr(a,o,i,s),n.splice(e,1))}await Promise.allSettled(Object.values(t))}finally{Rr.setState({synchronization:void 0})}}async function Dr({type:e,dependsOn:t,process:n},r,o,i){const s=[],a=[],c=await Lr();await jr.syncQueue.where({type:e,userId:c}).each((e,t)=>{s.push([t.primaryKey,e.content,e.descriptor]),a.push(e.content)});for(let u=0;u<s.length;u++){const[l,f,{id:d,dependencies:p=[]}]=s[u];try{const i=await n(f,{abort:o,index:u,items:a,userId:c,dependencies:p.map(({id:e,type:n})=>t.includes(n)?r[n][e]:void 0)});void 0!==d&&(r[e][d]=i),await jr.syncQueue.delete(l)}catch(e){await jr.syncQueue.update(l,{lastError:{name:e?.name,message:e?.message??e?.toString()}})}finally{i()}}}async function Lr(){const e=await(0,Cr.xC)();return e?.uuid||"*"}async function Br(e,t,n,r){const o=r&&r.id;return void 0!==o&&await jr.syncQueue.where({type:t,userId:e}).filter(e=>e?.descriptor.id===o).delete().catch(gr.errnames.DatabaseClosed),await jr.syncQueue.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date}).catch(gr.errnames.DatabaseClosed,()=>-1)}async function Vr(e,t,n){const r=await Lr();return await Br(r,e,t,n)}async function Fr(e,t){return(await zr(e,t)).map(e=>e.content)}async function zr(e,t){const n=t?{type:t,userId:e}:{userId:e};return await jr.syncQueue.where(n).toArray().catch(gr.errnames.DatabaseClosed,()=>[])}async function Ur(e){const t=await Lr();return await Fr(t,e)}async function Kr(e){const t=await Lr();return await zr(t,e)}async function Wr(e){return await jr.syncQueue.get(e).catch(gr.errnames.DatabaseClosed,()=>{})}function Hr(e){return!!kr[e]?.options.onBeginEditSyncItem}async function qr(e){const t=await Wr(e);if(!t)throw new Error(`No sync item with the ID ${e} exists.`);const n=kr[t.type]?.options.onBeginEditSyncItem;if(!n)throw new Error(`A sync item with the ID ${e} exists, but the associated handler (if one exists) doesn't support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "${t.type}" supports editing items.`);n(t)}async function Gr(e){await jr.syncQueue.delete(e).catch(gr.errnames.DatabaseClosed)}function Yr(e,t,n,r={}){kr[e]={type:e,dependsOn:t,process:n,options:r}}const Zr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Xr;const Qr=new Uint8Array(16);function Jr(){if(!Xr&&(Xr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xr(Qr)}const eo=[];for(let e=0;e<256;++e)eo.push((e+256).toString(16).slice(1));const to=function(e,t,n){if(Zr.randomUUID&&!t&&!e)return Zr.randomUUID();const r=(e=e||{}).random||(e.rng||Jr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return eo[e[t+0]]+eo[e[t+1]]+eo[e[t+2]]+eo[e[t+3]]+"-"+eo[e[t+4]]+eo[e[t+5]]+"-"+eo[e[t+6]]+eo[e[t+7]]+"-"+eo[e[t+8]]+eo[e[t+9]]+"-"+eo[e[t+10]]+eo[e[t+11]]+eo[e[t+12]]+eo[e[t+13]]+eo[e[t+14]]+eo[e[t+15]]}(r)},no="OFFLINE+";function ro(){return no+to()}function oo(e){return e.startsWith(no)}const io={};function so(){return Object.values(io)}function ao(e){io[e.id]&&console.warn(`[setupDynamicOfflineDataHandler] Another second handler with the ID "${e.id}" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.`),io[e.id]=e}async function co(e){const t=await mo();return await uo(t,e)}async function uo(e,t){const n=t?{type:t,users:e}:{users:e},r=new Ir;return await r.dynamicOfflineData.where(n).toArray().catch(gr.errnames.DatabaseClosed,()=>[])}async function lo(e,t){const n=await mo();return await fo(n,e,t)}async function fo(e,t,n){const r=new Ir,o=await r.dynamicOfflineData.get({type:t,identifier:n}).catch(gr.errnames.DatabaseClosed,()=>{});o?o.users.includes(e)||await r.dynamicOfflineData.update(o.id,{users:[...o.users,e]}).catch(gr.errnames.DatabaseClosed):await r.dynamicOfflineData.add({users:[e],type:t,identifier:n}).catch(gr.errnames.DatabaseClosed)}async function po(e,t){const n=await mo();return await ho(n,e,t)}async function ho(e,t,n){const r=new Ir,o=await r.dynamicOfflineData.get({type:t,identifier:n,users:e}).catch(gr.errnames.DatabaseClosed,()=>{});o&&(o.users.length>1?await r.dynamicOfflineData.update(o.id,{users:o.users.filter(t=>t!==e)}).catch(gr.errnames.DatabaseClosed):await r.dynamicOfflineData.delete(o.id).catch(gr.errnames.DatabaseClosed))}async function bo(e,t){const n=await co(e);await Promise.all(n.map(async e=>yo(e.type,e.identifier,t)))}async function yo(e,t,n){await lo(e,t);const r=new Ir,o=await mo(),i=await r.dynamicOfflineData.get({type:e,identifier:t}).catch(gr.errnames.DatabaseClosed,()=>{}),s=so().filter(t=>t.type===e);if(!i)return;const a=await Promise.all(s.map(async e=>{try{return e.sync(t,n),{id:e.id,error:void 0}}catch(t){const n=t.message?.toString()??t.toString();return{id:e.id,error:n}}})),c=a.filter(e=>!e.error).map(e=>e.id),u=a.filter(e=>e.error).map(e=>e.id),l=a.filter(e=>e.error).map(e=>({handlerId:e.id,message:e.error})),f={syncedOn:new Date,syncedBy:o,succeededHandlers:c,erroredHandlers:u,errors:l};i.id&&await r.dynamicOfflineData.update(i.id,{syncState:f}).catch(gr.errnames.DatabaseClosed)}async function mo(){const e=(await(0,Cr.xC)()).uuid;if(!e)throw new Error("Using the dynamic offline data API requires a logged in user.");return e}const vo=(0,Pr.Zd)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function go(){return xo(),vo}function _o(e,t){xo(),ao({type:"patient",displayName:t.displayName,id:e,isSynced:()=>Promise.resolve(!0),sync:(e,n)=>t.onOfflinePatientAdded({patientUuid:e,signal:n??(new AbortController).signal})})}async function wo(e){xo(),await yo("patient",e)}function xo(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")}},7564(e,t,n){"use strict";n.d(t,{CE:()=>a,Zd:()=>s,i7:()=>u,jf:()=>c});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)},4652(e,t,n){"use strict";n.d(t,{V:()=>a,t:()=>s});const r={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",actions:"Actions",address:"Address",age:"Age",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",edit:"Edit",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",female:"Female",loading:"Loading",male:"Male",other:"Other",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",seeMoreLists:"See {{count}} more lists",sex:"Sex",showLess:"Show less",showMore:"Show more",toggleDevTools:"Toggle dev tools",unknown:"Unknown"};var o=n(2635);const i=o.Ay.default||o.Ay;function s(e,t,n,r){return i.t(t,{ns:e,defaultValue:n,...r})}function a(e,t,n){return r[e]?s("core",e,t??r[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}i.on("initialized",function(){window.i18next.loadNamespaces(["core"])})},5841(e,t,n){"use strict";function r(e){return!window.offlineEnabled||(e??navigator.onLine)}n.d(t,{s:()=>r})},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})},9493(e,t,n){"use strict";n.d(t,{A:()=>i});class r{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+r.version}static addUnaryOp(e){return r.max_unop_len=Math.max(e.length,r.max_unop_len),r.unary_ops[e]=1,r}static addBinaryOp(e,t,n){return r.max_binop_len=Math.max(e.length,r.max_binop_len),r.binary_ops[e]=t,n?r.right_associative.add(e):r.right_associative.delete(e),r}static addIdentifierChar(e){return r.additional_identifier_chars.add(e),r}static addLiteral(e,t){return r.literals[e]=t,r}static removeUnaryOp(e){return delete r.unary_ops[e],e.length===r.max_unop_len&&(r.max_unop_len=r.getMaxKeyLen(r.unary_ops)),r}static removeAllUnaryOps(){return r.unary_ops={},r.max_unop_len=0,r}static removeIdentifierChar(e){return r.additional_identifier_chars.delete(e),r}static removeBinaryOp(e){return delete r.binary_ops[e],e.length===r.max_binop_len&&(r.max_binop_len=r.getMaxKeyLen(r.binary_ops)),r.right_associative.delete(e),r}static removeAllBinaryOps(){return r.binary_ops={},r.max_binop_len=0,r}static removeLiteral(e){return delete r.literals[e],r}static removeAllLiterals(){return r.literals={},r}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new r(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return r.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!r.binary_ops[String.fromCharCode(e)]||r.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return r.isIdentifierStart(e)||r.isDecimalDigit(e)}throwError(e){const t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(r.hooks[e]){const n={context:this,node:t};return r.hooks.run(e,n),n.node}return t}searchHook(e){if(r.hooks[e]){const t={context:this};return r.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===r.SPACE_CODE||e===r.TAB_CODE||e===r.LF_CODE||e===r.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:r.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t,n,o=[];for(;this.index<this.expr.length;)if(t=this.code,t===r.SEMCOL_CODE||t===r.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())o.push(n);else if(this.index<this.expr.length){if(t===e)break;this.throwError('Unexpected "'+this.char+'"')}return o}gobbleExpression(){const e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,r.max_binop_len),t=e.length;for(;t>0;){if(r.binary_ops.hasOwnProperty(e)&&(!r.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!r.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,o,i,s,a,c,u;if(s=this.gobbleToken(),!s)return s;if(t=this.gobbleBinaryOp(),!t)return s;for(i={value:t,prec:r.binaryPrecedence(t),right_a:r.right_associative.has(t)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+t),o=[s,i,a];t=this.gobbleBinaryOp();){if(n=r.binaryPrecedence(t),0===n){this.index-=t.length;break}i={value:t,prec:n,right_a:r.right_associative.has(t)},u=t;const c=e=>i.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;o.length>2&&c(o[o.length-2]);)a=o.pop(),t=o.pop().value,s=o.pop(),e={type:r.BINARY_EXP,operator:t,left:s,right:a},o.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+u),o.push(i,e)}for(c=o.length-1,e=o[c];c>1;)e={type:r.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:e},c-=2;return e}gobbleToken(){let e,t,n,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(e=this.code,r.isDecimalDigit(e)||e===r.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===r.SQUOTE_CODE||e===r.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(e===r.OBRACK_CODE)o=this.gobbleArray();else{for(t=this.expr.substr(this.index,r.max_unop_len),n=t.length;n>0;){if(r.unary_ops.hasOwnProperty(t)&&(!r.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!r.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;const e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:r.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}r.isIdentifierStart(e)?(o=this.gobbleIdentifier(),r.literals.hasOwnProperty(o.name)?o={type:r.LITERAL,value:r.literals[o.name],raw:o.name}:o.name===r.this_str&&(o={type:r.THIS_EXP})):e===r.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===r.PERIOD_CODE||t===r.OBRACK_CODE||t===r.OPAREN_CODE||t===r.QUMARK_CODE;){let n;if(t===r.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==r.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===r.OBRACK_CODE?((e={type:r.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),t=this.code,t!==r.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===r.OPAREN_CODE?e={type:r.CALL_EXP,arguments:this.gobbleArguments(r.CPAREN_CODE),callee:e}:(t===r.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:r.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e,t,n="";for(;r.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(this.code===r.PERIOD_CODE)for(n+=this.expr.charAt(this.index++);r.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(e=this.char,"e"===e||"E"===e){for(n+=this.expr.charAt(this.index++),e=this.char,"+"!==e&&"-"!==e||(n+=this.expr.charAt(this.index++));r.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);r.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")")}return t=this.code,r.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+n+this.char+")"):(t===r.PERIOD_CODE||1===n.length&&n.charCodeAt(0)===r.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:r.LITERAL,value:parseFloat(n),raw:n}}gobbleStringLiteral(){let e="";const t=this.index,n=this.expr.charAt(this.index++);let o=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){o=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++),t){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return o||this.throwError('Unclosed quote after "'+e+'"'),{type:r.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(r.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,r.isIdentifierPart(e));)this.index++;return{type:r.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){const t=[];let n=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let i=this.code;if(i===e){n=!0,this.index++,e===r.CPAREN_CODE&&o&&o>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(i===r.COMMA_CODE){if(this.index++,o++,o!==t.length)if(e===r.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===r.CBRACK_CODE)for(let e=t.length;e<o;e++)t.push(null)}else if(t.length!==o&&0!==o)this.throwError("Expected comma");else{const e=this.gobbleExpression();e&&e.type!==r.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(r.CPAREN_CODE);if(this.code===r.CPAREN_CODE)return this.index++,1===e.length?e[0]:!!e.length&&{type:r.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:r.ARRAY_EXP,elements:this.gobbleArguments(r.CBRACK_CODE)}}}const o=new class{add(e,t,n){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}};Object.assign(r,{hooks:o,plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(r),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),r.max_unop_len=r.getMaxKeyLen(r.unary_ops),r.max_binop_len=r.getMaxKeyLen(r.binary_ops);const i=e=>new r(e).parse(),s=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(r).filter(e=>!s.includes(e)&&void 0===i[e]).forEach(e=>{i[e]=r[e]}),i.Jsep=r;var a={name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:o},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}};i.plugins.register(a)},127(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(6984);const o=function(e,t){for(var n=e.length;n--;)if((0,r.A)(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=function(){this.__data__=[],this.size=0},s.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))},s.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},s.prototype.has=function(e){return o(this.__data__,e)>-1},s.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const a=s},8335(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8744),o=n(1917);const i=(0,r.A)(o.A,"Map")},9471(e,t,n){"use strict";n.d(t,{A:()=>d});const r=(0,n(8744).A)(Object,"create");var o=Object.prototype.hasOwnProperty;var i=Object.prototype.hasOwnProperty;function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},s.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},s.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0},s.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)},s.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};const a=s;var c=n(127),u=n(8335);const l=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function f(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}f.prototype.clear=function(){this.size=0,this.__data__={hash:new a,map:new(u.A||c.A),string:new a}},f.prototype.delete=function(e){var t=l(this,e).delete(e);return this.size-=t?1:0,t},f.prototype.get=function(e){return l(this,e).get(e)},f.prototype.has=function(e){return l(this,e).has(e)},f.prototype.set=function(e,t){var n=l(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const d=f},1754(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(127);var o=n(8335),i=n(9471);function s(e){var t=this.__data__=new r.A(e);this.size=t.size}s.prototype.clear=function(){this.__data__=new r.A,this.size=0},s.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},s.prototype.get=function(e){return this.__data__.get(e)},s.prototype.has=function(e){return this.__data__.has(e)},s.prototype.set=function(e,t){var n=this.__data__;if(n instanceof r.A){var s=n.__data__;if(!o.A||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i.A(s)}return n.set(e,t),this.size=n.size,this};const a=s},241(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1917).A.Symbol},3988(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1917).A.Uint8Array},3607(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(2274),o=n(2049),i=n(9912),s=n(5353),a=n(3858),c=Object.prototype.hasOwnProperty;const u=function(e,t){var n=(0,o.A)(e),u=!n&&(0,r.A)(e),l=!n&&!u&&(0,i.A)(e),f=!n&&!u&&!l&&(0,a.A)(e),d=n||u||l||f,p=d?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],h=p.length;for(var b in e)!t&&!c.call(e,b)||d&&("length"==b||l&&("offset"==b||"parent"==b)||f&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||(0,s.A)(b,h))||p.push(b);return p}},6912(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2851(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(2528),o=n(6984),i=Object.prototype.hasOwnProperty;const s=function(e,t,n){var s=e[t];i.call(e,t)&&(0,o.A)(s,n)&&(void 0!==n||t in e)||(0,r.A)(e,t,n)}},2528(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(4171);const o=function(e,t,n){"__proto__"==t&&r.A?(0,r.A)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3831(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6912),o=n(2049);const i=function(e,t,n){var i=t(e);return(0,o.A)(e)?i:(0,r.A)(i,n(e))}},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)}},1852(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(7271);const o=(0,n(367).A)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const s=function(e){if(!(0,r.A)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2789(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return function(t){return e(t)}}},565(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(3988);const o=function(e){var t=new e.constructor(e.byteLength);return new r.A(t).set(new r.A(e)),t}},154(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(1917),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o?r.A.Buffer:void 0,a=s?s.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},1801(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(565);const o=function(e,t){var n=t?(0,r.A)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},9759(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},2031(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(2851),o=n(2528);const i=function(e,t,n,i){var s=!n;n||(n={});for(var a=-1,c=t.length;++a<c;){var u=t[a],l=i?i(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),s?(0,o.A)(n,u,l):(0,r.A)(n,u,l)}return n}},4171(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8744);const o=function(){try{var e=(0,r.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},2136(e,t,n){"use strict";n.d(t,{A:()=>r});const r="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis},9042(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(3831),o=n(8634),i=n(7422);const s=function(e){return(0,r.A)(e,i.A,o.A)}},8744(e,t,n){"use strict";n.d(t,{A:()=>y});var r=n(9610);const o=n(1917).A["__core-js_shared__"];var i,s=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var a=n(3149),c=n(1121),u=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,d=l.toString,p=f.hasOwnProperty,h=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const b=function(e){return!(!(0,a.A)(e)||(t=e,s&&s in t))&&((0,r.A)(e)?h:u).test((0,c.A)(e));var t},y=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return b(n)?n:void 0}},5647(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(367).A)(Object.getPrototypeOf,Object)},8634(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(3153),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;const s=i?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(i(e),function(t){return o.call(e,t)}))}:r.A},4906(e,t,n){"use strict";n.d(t,{A:()=>E});var r=n(8744),o=n(1917);const i=(0,r.A)(o.A,"DataView");var s=n(8335);const a=(0,r.A)(o.A,"Promise"),c=(0,r.A)(o.A,"Set"),u=(0,r.A)(o.A,"WeakMap");var l=n(8496),f=n(1121),d="[object Map]",p="[object Promise]",h="[object Set]",b="[object WeakMap]",y="[object DataView]",m=(0,f.A)(i),v=(0,f.A)(s.A),g=(0,f.A)(a),_=(0,f.A)(c),w=(0,f.A)(u),x=l.A;(i&&x(new i(new ArrayBuffer(1)))!=y||s.A&&x(new s.A)!=d||a&&x(a.resolve())!=p||c&&x(new c)!=h||u&&x(new u)!=b)&&(x=function(e){var t=(0,l.A)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.A)(n):"";if(r)switch(r){case m:return y;case v:return d;case g:return p;case _:return h;case w:return b}return t});const E=x},8598(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(3149),o=Object.create;const i=function(){function e(){}return function(t){if(!(0,r.A)(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var s=n(5647),a=n(7271);const c=function(e){return"function"!=typeof e.constructor||(0,a.A)(e)?{}:i((0,s.A)(e))}},5353(e,t,n){"use strict";n.d(t,{A:()=>o});var r=/^(?:0|[1-9]\d*)$/;const o=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},7271(e,t,n){"use strict";n.d(t,{A:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},4841(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(2136),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o&&r.A.process;const a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}()},367(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},6875(e,t,n){"use strict";n.d(t,{A:()=>o});var r=Math.max;const o=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=r(o.length-t,0),a=Array(s);++i<s;)a[i]=o[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=o[i];return c[t]=n(a),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,c)}}},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")()},9727(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(4171),o=n(9008);const i=r.A?function(e,t){return(0,r.A)(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:o.A;var s=Date.now;const a=(c=i,u=0,l=0,function(){var e=s(),t=16-(e-l);if(l=e,t>0){if(++u>=800)return arguments[0]}else u=0;return c.apply(void 0,arguments)});var c,u,l},1121(e,t,n){"use strict";n.d(t,{A:()=>o});var r=Function.prototype.toString;const o=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},6984(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e,t){return e===t||e!=e&&t!=t}},9008(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return e}},2274(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(8496),o=n(3098);const i=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,r.A)(e)};var s=Object.prototype,a=s.hasOwnProperty,c=s.propertyIsEnumerable,u=i(function(){return arguments}())?i:function(e){return(0,o.A)(e)&&a.call(e,"callee")&&!c.call(e,"callee")};const l=u},2049(e,t,n){"use strict";n.d(t,{A:()=>r});const r=Array.isArray},8446(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(9610),o=n(5254);const i=function(e){return null!=e&&(0,o.A)(e.length)&&!(0,r.A)(e)}},9912(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(1917);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=i&&i.exports===o?r.A.Buffer:void 0;const a=(s?s.isBuffer:void 0)||function(){return!1}},6734(e,t,n){"use strict";n.d(t,{A:()=>T});var r=n(1754),o=n(9471);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new o.A;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},i.prototype.has=function(e){return this.__data__.has(e)};const s=i,a=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},c=function(e,t,n,r,o,i){var c=1&n,u=e.length,l=t.length;if(u!=l&&!(c&&l>u))return!1;var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=-1,h=!0,b=2&n?new s:void 0;for(i.set(e,t),i.set(t,e);++p<u;){var y=e[p],m=t[p];if(r)var v=c?r(m,y,p,t,e,i):r(y,m,p,e,t,i);if(void 0!==v){if(v)continue;h=!1;break}if(b){if(!a(t,function(e,t){if(s=t,!b.has(s)&&(y===e||o(y,e,n,r,i)))return b.push(t);var s})){h=!1;break}}else if(y!==m&&!o(y,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h};var u=n(241),l=n(3988),f=n(6984);const d=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},p=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var h=u.A?u.A.prototype:void 0,b=h?h.valueOf:void 0;var y=n(9042),m=Object.prototype.hasOwnProperty;var v=n(4906),g=n(2049),_=n(9912),w=n(3858),x="[object Arguments]",E="[object Array]",O="[object Object]",S=Object.prototype.hasOwnProperty;const A=function(e,t,n,o,i,s){var a=(0,g.A)(e),u=(0,g.A)(t),h=a?E:(0,v.A)(e),A=u?E:(0,v.A)(t),C=(h=h==x?O:h)==O,P=(A=A==x?O:A)==O,T=h==A;if(T&&(0,_.A)(e)){if(!(0,_.A)(t))return!1;a=!0,C=!1}if(T&&!C)return s||(s=new r.A),a||(0,w.A)(e)?c(e,t,n,o,i,s):function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new l.A(e),new l.A(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,f.A)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=d;case"[object Set]":var u=1&r;if(a||(a=p),e.size!=t.size&&!u)return!1;var h=s.get(e);if(h)return h==t;r|=2,s.set(e,t);var y=c(a(e),a(t),r,o,i,s);return s.delete(e),y;case"[object Symbol]":if(b)return b.call(e)==b.call(t)}return!1}(e,t,h,n,o,i,s);if(!(1&n)){var I=C&&S.call(e,"__wrapped__"),N=P&&S.call(t,"__wrapped__");if(I||N){var j=I?e.value():e,k=N?t.value():t;return s||(s=new r.A),i(j,k,n,o,s)}}return!!T&&(s||(s=new r.A),function(e,t,n,r,o,i){var s=1&n,a=(0,y.A)(e),c=a.length;if(c!=(0,y.A)(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:m.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=s;++u<c;){var b=e[l=a[u]],v=t[l];if(r)var g=s?r(v,b,l,t,e,i):r(b,v,l,e,t,i);if(!(void 0===g?b===v||o(b,v,n,r,i):g)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,o,i,s))};var C=n(3098);const P=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,C.A)(t)&&!(0,C.A)(n)?t!=t&&n!=n:A(t,n,r,o,e,i))},T=function(e,t){return P(e,t)}},9610(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8496),o=n(3149);const i=function(e){if(!(0,o.A)(e))return!1;var t=(0,r.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5254(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3149(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},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}},3858(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(8496),o=n(5254),i=n(3098),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var a=n(2789),c=n(4841),u=c.A&&c.A.isTypedArray;const l=u?(0,a.A)(u):function(e){return(0,i.A)(e)&&(0,o.A)(e.length)&&!!s[(0,r.A)(e)]}},7422(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(3607),o=n(1852),i=n(8446);const s=function(e){return(0,i.A)(e)?(0,r.A)(e):(0,o.A)(e)}},5615(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(3607),o=n(3149),i=n(7271);var s=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,o.A)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=(0,i.A)(e),n=[];for(var r in e)("constructor"!=r||!t&&s.call(e,r))&&n.push(r);return n};var c=n(8446);const u=function(e){return(0,c.A)(e)?(0,r.A)(e,!0):a(e)}},3153(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(){return[]}},599(e,t,n){"use strict";n.d(t,{AG:()=>Se,EH:()=>re,fz:()=>Ne,xL:()=>z});var r=Object.freeze({__proto__:null,get start(){return Be},get ensureJQuerySupport(){return pe},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return G},get setUnmountMaxTime(){return Y},get setUnloadMaxTime(){return Z},get registerApplication(){return Se},get unregisterApplication(){return Ce},get getMountedApps(){return we},get getAppStatus(){return Ee},get unloadApplication(){return Pe},get checkActivityFunctions(){return Ae},get getAppNames(){return xe},get pathToActiveWhen(){return Ne},get navigateToUrl(){return re},get patchHistoryApi(){return le},get triggerAppChange(){return $e},get addErrorHandler(){return c},get removeErrorHandler(){return u},get mountRootParcel(){return z},get NOT_LOADED(){return d},get LOADING_SOURCE_CODE(){return p},get NOT_BOOTSTRAPPED(){return h},get BOOTSTRAPPING(){return b},get NOT_MOUNTED(){return y},get MOUNTING(){return m},get UPDATING(){return g},get LOAD_ERROR(){return x},get MOUNTED(){return v},get UNLOADING(){return w},get UNMOUNTING(){return _},get SKIP_BECAUSE_BROKEN(){return E}}),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=`${P(t)} '${A(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,A(t)));try{o=Error(r+JSON.stringify(e))}catch(t){o=e}}return o.appOrParcelName=A(t),t.status=n,o}const d="NOT_LOADED",p="LOADING_SOURCE_CODE",h="NOT_BOOTSTRAPPED",b="BOOTSTRAPPING",y="NOT_MOUNTED",m="MOUNTING",v="MOUNTED",g="UPDATING",_="UNMOUNTING",w="UNLOADING",x="LOAD_ERROR",E="SKIP_BECAUSE_BROKEN";function O(e){return e.status===v}function S(e){try{return e.activeWhen(window.location)}catch(t){return a(t,e,E),!1}}function A(e){return e.name}function C(e){return Boolean(e.unmountThisParcel)}function P(e){return C(e)?"parcel":"application"}function T(){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 N(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!I(t,e=>"function"!=typeof e)));var t}function j(e,t){let n=e[t]||[];n=Array.isArray(n)?n:[n],0===n.length&&(n=[()=>Promise.resolve()]);const r=P(e),o=A(e);return function(e){return n.reduce((n,i,s)=>n.then(()=>{const n=i(e);return k(n)?n:Promise.reject(l(15,!1,r,o,t,s))}),Promise.resolve())}}function k(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let R=[];function $(e,t){return Promise.resolve().then(()=>e.status!==h?e:(e.status=b,e.bootstrap?X(e,"bootstrap").then(n).catch(n=>{if(t)throw f(n,e,E);return a(n,e,E),e}):Promise.resolve().then(n)));function n(){return e.status=y,e}}function M(e,t){return Promise.resolve().then(()=>{if(e.status!==v)return e;e.status=_;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,E);a(r,e,E)})).then(()=>e);function r(){return X(e,"unmount").then(()=>{e.status=y},n=>{if(t)throw f(n,e,E);a(n,e,E)})}})}let D=!1,L=!1;function B(e,t){return Promise.resolve().then(()=>e.status!==y?e:(D||(window.dispatchEvent(new i("single-spa:before-first-mount")),D=!0),e.status=m,X(e,"mount").then(()=>(e.status=v,L||(window.dispatchEvent(new i("single-spa:first-mount")),L=!0),e)).catch(n=>{return e.status=v,M(e,!0).then(r,r);function r(){if(t)throw f(n,e,E);return a(n,e,E),e}})))}let V=0;const F={parcels:{}};function z(){return U.apply(F,arguments)}function U(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=V++;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:A(n),unmountThisParcel:()=>b.then(()=>{if(a.status!==v)throw Error(l(6,!1,o,a.status));return M(a,!0)}).then(e=>(a.parentName&&delete n.parcels[a.id],e)).then(e=>(m(e),e)).catch(e=>{throw a.status=E,_(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")&&!N(e.bootstrap))throw Error(l(9,!1,o));if(!N(e.mount))throw Error(l(10,!1,o));if(!N(e.unmount))throw Error(l(11,!1,o));if(e.update&&!N(e.update))throw Error(l(12,!1,o));const t=j(e,"bootstrap"),n=j(e,"mount"),i=j(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=j(e,"update"),c.update=function(e){return a.customProps=e,K((t=a,Promise.resolve().then(()=>{if(t.status!==v)throw Error(l(32,!1,A(t)));return t.status=g,X(t,"update").then(()=>(t.status=v,t)).catch(e=>{throw f(e,t,E)})})));var t})});const d=u.then(()=>$(a,!0)),b=d.then(()=>B(a,!0));let m,_;const w=new Promise((e,t)=>{m=e,_=t});return c={mount:()=>K(Promise.resolve().then(()=>{if(a.status!==y)throw Error(l(13,!1,o,a.status));return n.parcels[r]=a,B(a)})),unmount:()=>K(a.unmountThisParcel()),getStatus:()=>a.status,loadPromise:K(u),bootstrapPromise:K(d),mountPromise:K(b),unmountPromise:K(w)},c}function K(e){return e.then(()=>null)}function W(e){const t=A(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=T({},n,{name:t,mountParcel:U.bind(e),singleSpa:r});return C(e)&&(o.unmountSelf=e.unmountThisParcel),o}const H={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 q(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(16,!1));H.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function G(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(17,!1));H.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(18,!1));H.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(l(19,!1));H.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function X(e,t){const n=e.timeouts[t],r=n.warningMillis,o=P(e);return new Promise((i,s)=>{let a=!1,c=!1;e[t](W(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,A(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 H)t[n]=T({},H[n],e&&e[n]||{});return t}function J(e){return Promise.resolve().then(()=>{if(e.loadPromise)return e.loadPromise;if(e.status!==d&&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(l(33,!1,A(e)));return r.then(n=>{let r;e.loadErrorTime=null,t=n,"object"!=typeof t&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!N(t.bootstrap)&&(r=35),N(t.mount)||(r=36),N(t.unmount)||(r=37);const o=P(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(l(r,!1,o,A(e),n),t),a(void 0,e,E),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=T({},e.devtools.overlays,t.devtools.overlays)),e.status=h,e.bootstrap=j(t,"bootstrap"),e.mount=j(t,"mount"),e.unmount=j(t,"unmount"),e.unload=j(t,"unload"),e.timeouts=Q(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=E:(r=x,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(){Me([],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)||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=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 be={};function ye(e){return Promise.resolve().then(()=>{const t=be[A(e)];if(!t)return e;if(e.status===d)return me(e,t),e;if(e.status===w)return t.promise.then(()=>e);if(e.status!==y&&e.status!==x)return e;const n=e.status===x?Promise.resolve():X(e,"unload");return e.status=w,n.then(()=>(me(e,t),e)).catch(n=>(function(e,t,n){delete be[A(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,a(n,e,E),t.reject(n)}(e,t,n),e))})}function me(e,t){delete be[A(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=d,t.resolve()}function ve(e,t,n,r){be[A(e)]={app:e,resolve:n,reject:r},Object.defineProperty(be[A(e)],"promise",{get:t})}function ge(e){return be[e]}const _e=[];function we(){return _e.filter(O).map(A)}function xe(){return _e.map(A)}function Ee(e){const t=I(_e,t=>A(t)===e);return t?t.status:null}let Oe=!1;function Se(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(!Ie(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(!Ie(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:Ne(e)),e=>t.some(t=>t(e))}(o.activeWhen),o;var i}(e,t,n,r);if(Ve()||Oe||(Oe=!0,setTimeout(()=>{Ve()||console.warn(l(1,!1))},5e3)),-1!==xe().indexOf(o.name))throw Error(l(21,!1,o.name));_e.push(T({loadErrorTime:null,status:d,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ee&&(pe(),Me())}function Ae(e=window.location){return _e.filter(t=>t.activeWhen(e)).map(A)}function Ce(e){if(0===_e.filter(t=>A(t)===e).length)throw Error(l(25,!1,e));return(ee?Pe(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{const t=_e.map(A).indexOf(e);_e.splice(t,1)})}function Pe(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(l(26,!1));const n=I(_e,t=>A(t)===e);if(!n)throw Error(l(27,!1,e));const r=ge(A(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,Te(n,r.resolve,r.reject)):e=new Promise((t,r)=>{ve(n,()=>e,t,r),Te(n,t,r)}),e}}function Te(e,t,n){Promise.resolve().then(()=>{if(I(Ae(),t=>t===A(e)))return $e()}).then(()=>M(e).then(ye).then(()=>{t(),setTimeout(()=>{Me()})})).catch(n)}function Ie(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ne(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 je=!1,ke=[],Re=ee&&window.location.href;function $e(){return Me()}function Me(e=[],t,n=!1){if(je)return new Promise((e,n)=>{ke.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 _e.forEach(i=>{const s=i.status!==E&&S(i);switch(i.status){case x:s&&o-i.loadErrorTime>=200&&n.push(i);break;case d:case p:s&&n.push(i);break;case h:case y:!s&&ge(A(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=Re,b=Re=window.location.href;return Ve()?(je=!0,c=r.concat(s,o,a),Promise.resolve().then(()=>(O(0===c.length?"before-no-app-change":"before-app-change",w(!0)),O("before-routing-event",w(!0,{cancelNavigation:m})),Promise.all(u).then(n=>{if(n.some(e=>e))return ce.call(window.history,history.state,"",f.substring(location.origin.length)),Re=location.href,je=!1,Me(e,t,!0);const i=r.map(ye),c=o.map(M).map(e=>e.then(ye)).concat(i),u=Promise.all(c);u.then(()=>{O("before-mount-routing-event",w(!0))},e=>{throw e});const l=s.map(e=>J(e).then(e=>De(e,u))),d=a.filter(e=>s.indexOf(e)<0).map(e=>De(e,u));return u.catch(e=>{throw _(),e}).then(()=>(_(),Promise.all(l.concat(d)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(g).then(()=>{},e=>{throw e})))})))):(c=s,Promise.resolve().then(()=>{const e=s.map(J);return Promise.all(e).then(_).then(()=>[]).catch(e=>{throw _(),e}).finally(()=>{})}));function m(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 g(){const t=we();e.forEach(e=>e.resolve(t));try{O(0===c.length?"no-app-change":"app-change",w()),O("routing-event",w())}catch(e){setTimeout(()=>{throw e})}if(je=!1,ke.length>0){const e=ke;ke=[],Me(e)}return t}function _(){n||(e.forEach(e=>{oe(e.eventArguments)}),oe(t))}function w(e=!1,n){const i={},u={[v]:[],[y]:[],[d]:[],[E]:[]};e?(s.concat(a).forEach((e,t)=>{p(e,v)}),r.forEach(e=>{p(e,d)}),o.forEach(e=>{p(e,y)})):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:b}};return n&&T(l.detail,n),l;function p(e,t){const n=A(e);t=t||Ee(n),i[n]=t,(u[t]=u[t]||[]).push(n)}}function O(e,t){n||window.dispatchEvent(new i(`single-spa:${e}`,t))}}function De(e,t){return S(e)?$(e).then(e=>t.then(()=>S(e)?B(e):e)):t.then(()=>e)}let Le=!1;function Be(e){Le=!0,ee&&(le(e),Me())}function Ve(){return Le}var Fe={getRawAppData:function(){return[..._e]},reroute:Me,NOT_LOADED:d,toLoadPromise:J,toBootstrapPromise:$,unregisterApplication:Ce,getProfilerData:function(){return R}};ee&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Fe)},4993(e,t,n){"use strict";n.d(t,{BE:()=>U,Es:()=>P,Ht:()=>X,PP:()=>L,Tn:()=>c,X3:()=>A,ZH:()=>i,aw:()=>Z,b0:()=>a,bZ:()=>p,bu:()=>R,dO:()=>S,lK:()=>N,lg:()=>k,mF:()=>$,mf:()=>C,q9:()=>K,qm:()=>Y,qv:()=>s,r9:()=>g,rL:()=>u,sb:()=>V});var r=n(6072);const o=()=>{},i=o(),s=Object,a=e=>e===i,c=e=>"function"==typeof e,u=(e,t)=>({...e,...t}),l=new WeakMap;let f=0;const d=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(s(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=l.get(e),o)return o;if(o=++f+"~",l.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=d(e[i])+",";l.set(e,o)}if(n==s){o="#";const t=s.keys(e).sort();for(;!a(i=t.pop());)a(e[i])||(o+=i+":"+d(e[i])+",");l.set(e,o)}}return o},p=new WeakMap,h={},b={},y="undefined",m=typeof window!=y,v=typeof document!=y,g=(e,t)=>{const n=p.get(e);return[()=>!a(t)&&e.get(t)||h,r=>{if(!a(t)){const o=e.get(t);t in b||(b[t]=o),n[5](t,u(o,r),o||h)}},n[6],()=>!a(t)&&t in b?b[t]:!a(t)&&e.get(t)||h]};let _=!0;const[w,x]=m&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[o,o],E={isOnline:()=>_,isVisible:()=>{const e=v&&document.visibilityState;return a(e)||"hidden"!==e}},O={initFocus:e=>(v&&document.addEventListener("visibilitychange",e),w("focus",e),()=>{v&&document.removeEventListener("visibilitychange",e),x("focus",e)}),initReconnect:e=>{const t=()=>{_=!0,e()},n=()=>{_=!1};return w("online",t),w("offline",n),()=>{x("online",t),x("offline",n)}}},S=!r.useId,A=!m||"Deno"in window,C=e=>m&&typeof window.requestAnimationFrame!=y?window.requestAnimationFrame(e):setTimeout(e,1),P=A?r.useEffect:r.useLayoutEffect,T="undefined"!=typeof navigator&&navigator.connection,I=!A&&T&&(["slow-2g","2g"].includes(T.effectiveType)||T.saveData),N=e=>{if(c(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?d(e):"",t]};let j=0;const k=()=>++j;var R={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function $(...e){const[t,n,r,o]=e,s=u({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let l=s.populateCache;const f=s.rollbackOnError;let d=s.optimisticData;const h=s.throwOnError;if(c(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(b))}return b(n);async function b(n){const[o]=N(n);if(!o)return;const[u,b]=g(t,o),[y,m,v,_]=p.get(t),w=()=>{const e=y[o];return(c(s.revalidate)?s.revalidate(u().data,n):!1!==s.revalidate)&&(delete v[o],delete _[o],e&&e[0])?e[0](2).then(()=>u().data):u().data};if(e.length<3)return w();let x,E=r;const O=k();m[o]=[O,0];const S=!a(d),A=u(),C=A.data,P=A._c,T=a(P)?C:P;if(S&&(d=c(d)?d(T,C):d,b({data:d,_c:T})),c(E))try{E=E(T)}catch(e){x=e}if(E&&c(E.then)){if(E=await E.catch(e=>{x=e}),O!==m[o][0]){if(x)throw x;return E}x&&S&&(e=>"function"==typeof f?f(e):!1!==f)(x)&&(l=!0,b({data:T,_c:i}))}if(l&&!x)if(c(l)){const e=l(E,T);b({data:e,error:i,_c:i})}else b({data:E,error:i,_c:i});if(m[o][1]=k(),Promise.resolve(w()).then(()=>{b({_c:i})}),!x)return E;if(h)throw x}}const M=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},D=(e,t)=>{if(!p.has(e)){const n=u(O,t),r={},s=$.bind(i,e);let a=o;const c={},l=(e,t)=>{const n=c[e]||[];return c[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},f=(t,n,r)=>{e.set(t,n);const o=c[t];if(o)for(const e of o)e(n,r)},d=()=>{if(!p.has(e)&&(p.set(e,[r,{},{},{},s,f,l]),!A)){const t=n.initFocus(setTimeout.bind(i,M.bind(i,r,0))),o=n.initReconnect(setTimeout.bind(i,M.bind(i,r,1)));a=()=>{t&&t(),o&&o(),p.delete(e)}}};return d(),[e,s,d,a]}return[e,p.get(e)[4]]},[L,B]=D(new Map),V=u({onLoadingSlow:o,onSuccess:o,onError:o,onErrorRetry:(e,t,n,r,o)=>{const i=n.errorRetryCount,s=o.retryCount,c=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!a(i)&&s>i||setTimeout(r,c,o)},onDiscarded:o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:I?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:I?5e3:3e3,compare:(e,t)=>d(e)==d(t),isPaused:()=>!1,cache:L,mutate:B,fallback:{}},E),F=(e,t)=>{const n=u(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:s}=t;r&&i&&(n.use=r.concat(i)),o&&s&&(n.fallback=u(o,s))}return n},z=(0,r.createContext)({}),U=e=>{const{value:t}=e,n=(0,r.useContext)(z),o=c(t),s=(0,r.useMemo)(()=>o?t(n):t,[o,n,t]),a=(0,r.useMemo)(()=>o?s:F(n,s),[o,n,s]),l=s&&s.provider,f=(0,r.useRef)(i);l&&!f.current&&(f.current=D(l(a.cache||L),s));const d=f.current;return d&&(a.cache=d[0],a.mutate=d[1]),P(()=>{if(d)return d[2]&&d[2](),d[3]},[]),(0,r.createElement)(z.Provider,u(e,{value:a}))},K="$inf$",W=m&&window.__SWR_DEVTOOLS_USE__,H=W?window.__SWR_DEVTOOLS_USE__:[],q=e=>c(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],G=H.concat(e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=N(t),[,,,o]=p.get(L);if(r.startsWith(K))return n(...e);const i=o[r];return a(i)?n(...e):(delete o[r],i)}),r)),Y=e=>function(...t){const n=u(V,(0,r.useContext)(z)),[o,i,s]=q(t),a=F(n,s);let c=e;const{use:l}=a,f=(l||[]).concat(G);for(let e=f.length;e--;)c=f[e](c);return c(o,i||a.fetcher||null,a)},Z=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},X=(e,t)=>(...n)=>{const[r,o,i]=q(n),s=(i.use||[]).concat(t);return e(r,o,{...i,use:s})};W&&(window.__SWR_DEVTOOLS_REACT__=r)},1635(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>$,__assign:()=>i,__asyncDelegator:()=>S,__asyncGenerator:()=>O,__asyncValues:()=>A,__await:()=>E,__awaiter:()=>h,__classPrivateFieldGet:()=>j,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>k,__createBinding:()=>y,__decorate:()=>a,__disposeResources:()=>D,__esDecorate:()=>u,__exportStar:()=>m,__extends:()=>o,__generator:()=>b,__importDefault:()=>N,__importStar:()=>I,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>c,__propKey:()=>f,__read:()=>g,__rest:()=>s,__rewriteRelativeImportExtension:()=>L,__runInitializers:()=>l,__setFunctionName:()=>d,__spread:()=>_,__spreadArray:()=>x,__spreadArrays:()=>w,__values:()=>v,default:()=>B});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 s(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 a(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=r.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?r.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d=!1,p=n.length-1;p>=0;p--){var h={};for(var b in r)h[b]="access"===b?{}:r[b];for(var b in r.access)h.access[b]=r.access[b];h.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var y=(0,n[p])("accessor"===c?{get:f.get,set:f.set}:f[u],h);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(a=s(y.get))&&(f.get=a),(a=s(y.set))&&(f.set=a),(a=s(y.init))&&o.unshift(a)}else(a=s(y))&&("field"===c?o.unshift(a):f[u]=a)}l&&Object.defineProperty(l,r.name,f),d=!0}function l(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 f(e){return"symbol"==typeof e?e:"".concat(e)}function d(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 h(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function b(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var y=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 m(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||y(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 g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.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 s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){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],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];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(e){return this instanceof E?(this.v=e,this):new E(e)}function O(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),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{(n=o[e](t)).value instanceof E?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function S(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(e[r](t)),done:!1}:o?o(t):t}:o}}function A(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 C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},T=function(e){return T=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},T(e)};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=T(e),r=0;r<n.length;r++)"default"!==n[r]&&y(t,e,n[r]);return P(t,e),t}function N(e){return e&&e.__esModule?e:{default:e}}function j(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 R(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 $(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 L(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 B={__extends:o,__assign:i,__rest:s,__decorate:a,__param:c,__esDecorate:u,__runInitializers:l,__propKey:f,__setFunctionName:d,__metadata:p,__awaiter:h,__generator:b,__createBinding:y,__exportStar:m,__values:v,__read:g,__spread:_,__spreadArrays:w,__spreadArray:x,__await:E,__asyncGenerator:O,__asyncDelegator:S,__asyncValues:A,__makeTemplateObject:C,__importStar:I,__importDefault:N,__classPrivateFieldGet:j,__classPrivateFieldSet:k,__classPrivateFieldIn:R,__addDisposableResource:$,__disposeResources:D,__rewriteRelativeImportExtension:L}},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}}]);
|