@openmrs/esm-framework 3.2.1-pre.1104 → 3.2.1-pre.1111
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/openmrs-esm-framework.js +1 -1
- package/dist/openmrs-esm-framework.js.LICENSE.txt +0 -2
- package/dist/openmrs-esm-framework.js.map +1 -1
- package/docs/API.md +33 -24
- package/docs/interfaces/LoggedInUser.md +12 -12
- package/docs/interfaces/LoggedInUserFetchResponse.md +2 -2
- package/docs/interfaces/Person.md +3 -3
- package/docs/interfaces/Privilege.md +4 -4
- package/docs/interfaces/Role.md +3 -3
- package/docs/interfaces/Session.md +92 -0
- package/docs/interfaces/SessionLocation.md +3 -3
- package/jest.config.js +1 -1
- package/package.json +13 -13
- package/webpack.config.js +1 -1
- package/babel.config.js +0 -7
- package/docs/interfaces/SessionUser.md +0 -92
- package/docs/interfaces/UnauthenticatedUser.md +0 -52
- package/docs/interfaces/User.md +0 -107
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see openmrs-esm-framework.js.LICENSE.txt */
|
|
2
|
-
System.register([],(function(e,t){return{execute:function(){e((()=>{var e={9672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,s=n,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return u}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u})}()},5426:(e,t,n)=>{System.register(["@openmrs/esm-config"],(function(e,t){var r={};return{setters:[function(e){r.Type=e.Type,r.defineConfigSchema=e.defineConfigSchema,r.getConfig=e.getConfig,r.navigate=e.navigate,r.validators=e.validators}],execute:function(){e((()=>{var e={672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,s=n,u="";i.charAt(0|a)||(s="=",a%1);u+=s.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return u}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,s=0,u="";i=t.charAt(s++);~i&&(o=a%4?64*o+i:i,a++%4)?u+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return u})}()},525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],s=[];for(i=0;i<a.length;i++)s.push(a[i].resource);o(s);var u=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){u.resolve()}))}),(function(e){u.resolve()})),u.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var s=e.data;s.entry&&s.entry.forEach((function(e){var o=e.resource,u=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(u===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(s,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),s=n(856),u=n(719),c=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},g=function(e,t){return h("headers."+e,t)},y=d(a),m=d(s(e,n)).and(y).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(g("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(g("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),E=m.and(v("DELETE")),x=m.and(v("PATCH")),S=i.Http(e,n),O=f.Path,k=O(e.baseUrl),T=k.slash(":type || :resource.resourceType"),P=T.slash("_history"),j=T.slash(":id || :resource.id"),C=j.slash("_history"),N=j.slash(":versionId || :resource.meta.versionId"),A=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=g("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(S),document:w.and(k.slash("Document")).end(S),profile:b.and(k.slash("Profile").slash(":type")).end(S),transaction:w.and(k).end(S),history:b.and(k.slash("_history")).and(R).end(S),typeHistory:b.and(P).and(R).end(S),resourceHistory:b.and(C).and(R).end(S),read:b.and(c.$WithPatient).and(j).end(S),vread:b.and(N).end(S),delete:E.and(j).and(I).end(S),create:w.and(T).and(I).end(S),validate:w.and(T.slash("_validate")).end(S),meta:{add:w.and(A.slash("$meta-add")).end(S),delete:w.and(A.slash("$meta-delete")).end(S),read:b.and(A.slash("$meta")).end(S)},search:b.and(T).and(c.$WithPatient).and(r.$SearchParams).and(R).end(S),update:_.and(j).and(I).end(S),conditionalUpdate:_.and(T).and(r.$SearchParams).and(I).end(S),conditionalDelete:E.and(T).and(r.$SearchParams).and(I).end(S),nextPage:b.and(u.$$BundleLinkUrl("next")).end(S),prevPage:b.and(u.$$BundleLinkUrl("previous")).and(u.$$BundleLinkUrl("prev")).end(S),getBundleByUrl:b.and(O(":url")).end(S),resolve:b.and(l.resolve).end(S),patch:x.and(j).and(g("Content-Type","application/json-patch+json")).end(S)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var s=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===s}))[0]||(null!=n?n[s]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,s=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return s.resolve(i),s.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,s={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},u={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(s[a]&&(l.operator=s[a]),u[a]&&(l.modifier=u[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,s,u;for(u=[],o=0,i=(s=l(e)).length;o<i;o++)t=s[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,u.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return u}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var s=function(){return Array.prototype.slice.call(arguments)};t.argsArray=s,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},s.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var u=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=u;var c=function(e,t,n){return t?u(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],s=o.length;(e||"object"!==i(a))&&(a={});for(var u=0;u<s;++u){var c=o[u];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.y=t,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(968).s)(1),(()=>{"use strict";i.r(a),i.d(a,{OpenmrsFetchError:()=>H,VisitMode:()=>tt,VisitStatus:()=>nt,backendDependencies:()=>st,defaultVisitCustomRepresentation:()=>Ye,fetchCurrentPatient:()=>We,fhir:()=>G,fhirBaseUrl:()=>q,getCurrentUser:()=>De,getLocations:()=>at,getLoggedInUser:()=>Fe,getSessionLocation:()=>Be,getStartedVisit:()=>et,getVisitTypes:()=>ot,getVisitsForPatient:()=>Qe,makeUrl:()=>V,openmrsFetch:()=>W,openmrsObservableFetch:()=>K,refetchCurrentUser:()=>Me,saveVisit:()=>Je,sessionEndpoint:()=>z,setSessionLocation:()=>ze,setupApiModule:()=>Ve,toLocationObject:()=>it,toVisitTypeObject:()=>rt,updateVisit:()=>Xe,userHasAccess:()=>Ue});var e=function(t,n){return e=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])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function r(e){return"function"==typeof e}var o=!1,s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,o=e},get useDeprecatedSynchronousErrorHandling(){return o}};function u(e){setTimeout((function(){throw e}),0)}var c={closed:!0,next:function(e){},error:function(e){if(s.useDeprecatedSynchronousErrorHandling)throw e;u(e)},complete:function(){}},l=Array.isArray||function(e){return e&&"number"==typeof e.length};function f(e){return null!==e&&"object"==typeof e}var p=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}(),d=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,o=n._parentOrParents,i=n._ctorUnsubscribe,a=n._unsubscribe,s=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof e)o.remove(this);else if(null!==o)for(var u=0;u<o.length;++u)o[u].remove(this);if(r(a)){i&&(this._unsubscribe=void 0);try{a.call(this)}catch(e){t=e instanceof p?h(e.errors):[e]}}if(l(s)){u=-1;for(var c=s.length;++u<c;){var d=s[u];if(f(d))try{d.unsubscribe()}catch(e){t=t||[],e instanceof p?t=t.concat(h(e.errors)):t.push(e)}}}if(t)throw new p(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=function(e){return e.closed=!0,e}(new e),e}();function h(e){return e.reduce((function(e,t){return e.concat(t instanceof p?t.errors:t)}),[])}var v="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),g=function(e){function n(t,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=c;break;case 1:if(!t){i.destination=c;break}if("object"==typeof t){t instanceof n?(i.syncErrorThrowable=t.syncErrorThrowable,i.destination=t,t.add(i)):(i.syncErrorThrowable=!0,i.destination=new y(i,t));break}default:i.syncErrorThrowable=!0,i.destination=new y(i,t,r,o)}return i}return t(n,e),n.prototype[v]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(d),y=function(e){function n(t,n,o,i){var a,s=e.call(this)||this;s._parentSubscriber=t;var u=s;return r(n)?a=n:n&&(a=n.next,o=n.error,i=n.complete,n!==c&&(r((u=Object.create(n)).unsubscribe)&&s.add(u.unsubscribe.bind(u)),u.unsubscribe=s.unsubscribe.bind(s))),s._context=u,s._next=a,s._error=o,s._complete=i,s}return t(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.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):u(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;u(e)}}},n.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)};s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw e;u(e)}},n.prototype.__tryOrSetError=function(e,t,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return s.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(u(t),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(g),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function b(e){return e}function w(e){return 0===e.length?b:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var _=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,o=function(e,t,n){if(e){if(e instanceof g)return e;if(e[v])return e[v]()}return e||t||n?new g(e,t,n):new g(c)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||s.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){s.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof g?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=E(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[m]=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:w(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=E(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 E(e){if(e||(e=s.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var S="object"==typeof self&&self&&self.Object===Object&&self;const O=(x||S||Function("return this")()).Symbol;var k=Object.prototype,T=k.hasOwnProperty,P=k.toString,j=O?O.toStringTag:void 0,C=Object.prototype.toString,N=O?O.toStringTag:void 0;const A=(I=Object.getPrototypeOf,R=Object,function(e){return I(R(e))});var I,R,$=Function.prototype,D=Object.prototype,L=$.toString,M=D.hasOwnProperty,U=L.call(Object);const F=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N&&N in Object(e)?function(e){var t=T.call(e,j),n=e[j];try{e[j]=void 0;var r=!0}catch(e){}var o=P.call(e);return r&&(t?e[j]=n:delete e[j]),o}(e):function(e){return C.call(e)}(e)}(e))return!1;var t=A(e);if(null===t)return!0;var n=M.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&L.call(n)==U};var B=i(824);const z="/ws/rest/v1/session";function V(e){return window.openmrsBase+e}function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");const n=V(e);t.headers||(t.headers={}),F(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;const r=Error();return window.fetch(n,t).then((async e=>{const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=await(0,B.getConfig)("@openmrs/esm-api");return n===V(z)&&403===t.status||e.enabled&&e.errors.includes(t.status)?((0,B.navigate)({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new H(n,t,o,r)}),(e=>{throw new H(n,t,null,r)}))}}))}function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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=>{let o=!1;return W(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}class H extends Error{constructor(e,t,n,r){super(),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const q="/ws/fhir2/R4",G=i(256)({baseUrl:q},{http:e=>W(e.url,{method:e.method,headers:e.headers}).then((t=>({status:t.status,headers:t.headers,data:t.data,config:e})),(t=>({status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e})))});var Z=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Y=function(e){function n(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return t(n,e),n.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)}}},n}(d),Q=function(e){function n(t){var n=e.call(this,t)||this;return n.destination=t,n}return t(n,e),n}(g),J=function(e){function n(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(n,e),n.prototype[v]=function(){return new Q(this)},n.prototype.lift=function(e){var t=new X(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Z;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Z;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},n.prototype.complete=function(){if(this.closed)throw new Z;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},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(t){if(this.closed)throw new Z;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){if(this.closed)throw new Z;return this.hasError?(e.error(this.thrownError),d.EMPTY):this.isStopped?(e.complete(),d.EMPTY):(this.observers.push(e),new Y(this,e))},n.prototype.asObservable=function(){var e=new _;return e.source=this,e},n.create=function(e,t){return new X(e,t)},n}(_),X=function(e){function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t(n,e),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):d.EMPTY},n}(J),ee=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t(n,e),n.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)},n.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},n.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)},n}(function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t(n,e),n.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},n.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},n.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},n.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))},n.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},n.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},n}(function(e){function n(t,n){return e.call(this)||this}return t(n,e),n.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},n}(d))),te=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}(),ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n}(function(e){function n(t,r){void 0===r&&(r=te.now);var o=e.call(this,t,(function(){return n.delegate&&n.delegate!==o?n.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return t(n,e),n.prototype.schedule=function(t,r,o){return void 0===r&&(r=0),n.delegate&&n.delegate!==this?n.delegate.schedule(t,r,o):e.prototype.schedule.call(this,t,r,o)},n.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}}},n}(te)),re=new ne(ee),oe=new _((function(e){return e.complete()}));function ie(e){return e?function(e){return new _((function(t){return e.schedule((function(){return t.complete()}))}))}(e):oe}function ae(e){return e&&"function"==typeof e.schedule}var se,ue=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function ce(e,t){return new _((function(n){var r=new d,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function le(e,t){return t?ce(e,t):new _(ue(e))}se||(se={});var fe=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return ae(n)?(e.pop(),ce(e,n)):le(e)}(this.value);case"E":return e=this.error,new _((function(t){return t.error(e)}));case"C":return ie()}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}(),pe=function(e){function n(t,n,r){void 0===r&&(r=0);var o=e.call(this,t)||this;return o.scheduler=n,o.delay=r,o}return t(n,e),n.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},n.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new de(e,this.destination)))},n.prototype._next=function(e){this.scheduleMessage(fe.createNext(e))},n.prototype._error=function(e){this.scheduleMessage(fe.createError(e)),this.unsubscribe()},n.prototype._complete=function(){this.scheduleMessage(fe.createComplete()),this.unsubscribe()},n}(g),de=function(e,t){this.notification=e,this.destination=t},he=function(e){function n(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 t(n,e),n.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)},n.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new ve(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},n.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 Z;if(this.isStopped||this.hasError?t=d.EMPTY:(this.observers.push(e),t=new Y(this,e)),o&&e.add(e=new pe(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},n.prototype._getNow=function(){return(this.scheduler||re).now()},n.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},n}(J),ve=function(e,t){this.time=e,this.value=t};function ge(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 ye(e,t))}}var ye=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new me(e,this.project,this.thisArg))},e}(),me=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o}return t(n,e),n.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)},n}(g),be="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",we=function(e){if(e&&"function"==typeof e[m])return r=e,function(e){var t=r[m]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}(e))return ue(e);if(function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,u),e};if(e&&"function"==typeof e[be])return t=e,function(e){for(var n=t[be]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=f(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")},_e=function(e){function n(t){var n=e.call(this)||this;return n.parent=t,n}return t(n,e),n.prototype._next=function(e){this.parent.notifyNext(e)},n.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},n}(g),Ee=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyError=function(e){this.destination.error(e)},n.prototype.notifyComplete=function(){this.destination.complete()},n}(g);function xe(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(xe((function(n,r){return(o=e(n,r),o instanceof _?o:new _(we(o))).pipe(ge((function(e,o){return t(n,e,r,o)})));var o}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new Se(e,n))})}var Se=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 Oe(e,this.project,this.concurrent))},e}(),Oe=function(e){function n(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 t(n,e),n.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},n.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)},n.prototype._innerSub=function(e){var t=new _e(this),n=this.destination;n.add(t);var r=function(e,t){if(!t.closed){if(e instanceof _)return e.subscribe(t);var n;try{n=we(e)(t)}catch(e){t.error(e)}return n}}(e,t);r!==t&&n.add(r)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(Ee);function ke(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),xe(b,e)}function Te(){}function Pe(e,t,n){return function(r){return r.lift(new je(e,t,n))}}var je=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 Ce(e,this.nextOrObserver,this.error,this.complete))},e}(),Ce=function(e){function n(t,n,o,i){var a=e.call(this,t)||this;return a._tapNext=Te,a._tapError=Te,a._tapComplete=Te,a._tapError=o||Te,a._tapComplete=i||Te,r(n)?(a._context=a,a._tapNext=n):n&&(a._context=n,a._tapNext=n.next||Te,a._tapError=n.error||Te,a._tapComplete=n.complete||Te),a}return t(n,e),n.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},n.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},n.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},n}(g);function Ne(e,t){return function(n){return n.lift(new Ae(e,t))}}var Ae=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Ie(e,this.predicate,this.thisArg))},e}(),Ie=function(e){function n(t,n,r){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.count=0,o}return t(n,e),n.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)},n}(g);const Re=new he(1);let $e=0;function De(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return $e<Date.now()-6e4&&Me(),Re.asObservable().pipe(ke(),Pe(Le),ge((t=>e.includeAuthStatus?t:t.user)),Ne(Boolean))}function Le(e){if(e?.user?.userProperties?.defaultLocale){const t=e.user.userProperties.defaultLocale;t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}}function Me(){$e=Date.now(),Re.next(W(z).then((e=>"object"==typeof e.data?e.data:Promise.reject())).catch((()=>({sessionId:"",authenticated:!1}))))}function Ue(e,t){return function(e,t){return t.privileges.find((t=>e===t.display))}(e,t)||function(e){return e.roles.find((e=>"System Developer"===e.display))}(t)}function Fe(){return new Promise(((e,t)=>{const n=De().subscribe((t=>{e(t),n.unsubscribe()}),t)}))}function Be(){return new Promise(((e,t)=>{const n=De({includeAuthStatus:!0}).subscribe((t=>{e(t.sessionLocation),n.unsubscribe()}),t)}))}async function ze(e,t){await W(z,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),Me()}function Ve(){(0,B.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:B.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:B.Type.String,_default:"${openmrsSpaBase}/login",_validators:[B.validators.isUrl]},errors:{_type:B.Type.Array,_default:[401],_elements:{_type:B.Type.Number,_validators:[B.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:B.Type.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."}}}),Me()}function We(e,t){return e?G.read({type:"Patient",patient:e,...t}):Promise.resolve(null)}var Ke=function(e){function n(t){var n=e.call(this)||this;return n._value=t,n}return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Z;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(J),He=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}();function qe(e){return function(t){return 0===e?ie():t.lift(new Ge(e))}}var Ge=function(){function e(e){if(this.total=e,this.total<0)throw new He}return e.prototype.call=function(e,t){return t.subscribe(new Ze(e,this.total))},e}(),Ze=function(e){function n(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return t(n,e),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(g);const Ye="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Qe(e,t,n){return K(`/ws/rest/v1/visit?patient=${e}&v=${n??Ye}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(qe(1)).pipe(ge((e=>e)))}function Je(e,t){return K("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Xe(e,t,n){return K(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const et=new Ke(null);let tt,nt;function rt(e){return{uuid:e.uuid,display:e.display,name:e.name}}function ot(){return K("/ws/rest/v1/visittype").pipe(ge((e=>e.data.results.map(rt)))).pipe(qe(1))}function it(e){return{uuid:e.uuid,display:e.display}}function at(){return K("/ws/rest/v1/location").pipe(ge((e=>e.data.results.map(it)))).pipe(qe(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(tt||(tt={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(nt||(nt={}));const st={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})(),a})())}}}))},2199:(e,t,n)=>{"use strict";n.d(t,{nF:()=>m,u4:()=>$e,Rx:()=>De,Wf:()=>Be,I$:()=>Ce,Vy:()=>Se,N$:()=>w,DN:()=>b,ts:()=>ye,JC:()=>Fe,r:()=>_e,WK:()=>Ee,$X:()=>Re,P9:()=>Me,nx:()=>Ne,bf:()=>v,vb:()=>g,uj:()=>y,VJ:()=>be,bX:()=>Ae,z$:()=>h,jK:()=>xe,Lq:()=>Ue,VF:()=>Le,ym:()=>Ie,y9:()=>we});var r=n(921),o=n(963);const i=(0,n(6899).Z)(Object.getPrototypeOf,Object);var a=n(4897),s=Function.prototype,u=Object.prototype,c=s.toString,l=u.hasOwnProperty,f=c.call(Object);const p=function(e){if(!(0,a.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==f};var d=n(7179);const h="/ws/rest/v1/session";function v(e){return window.openmrsBase+e}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");const n=v(e);t.headers||(t.headers={}),p(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;const r=Error();return window.fetch(n,t).then((async e=>{const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=await(0,d.getConfig)("@openmrs/esm-api");return n===v(h)&&403===t.status||e.enabled&&e.errors.includes(t.status)?((0,d.navigate)({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new m(n,t,o,r)}),(e=>{throw new m(n,t,null,r)}))}}))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.y((r=>{let o=!1;return g(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}class m extends Error{constructor(e,t,n,r){super(),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}}const b="/ws/fhir2/R4",w=n(1256)({baseUrl:b},{http:e=>g(e.url,{method:e.method,headers:e.headers}).then((t=>({status:t.status,headers:t.headers,data:t.data,config:e})),(t=>({status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e})))});var _=n(7080),E=n(2585),x=n(1098),S=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return _.ZT(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}(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 _.ZT(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}(function(e){function t(t,n){return e.call(this)||this}return _.ZT(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(x.w))),O=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}(),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.ZT(t,e),t}(function(e){function t(n,r){void 0===r&&(r=O.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 _.ZT(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}(O)),T=new k(S),P=n(7811),j=new r.y((function(e){return e.complete()}));function C(e){return e?function(e){return new r.y((function(t){return e.schedule((function(){return t.complete()}))}))}(e):j}function N(e){return e&&"function"==typeof e.schedule}var A,I=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function R(e,t){return new r.y((function(n){var r=new x.w,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function $(e,t){return t?R(e,t):new r.y(I(e))}A||(A={});var D=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return N(n)?(e.pop(),R(e,n)):$(e)}(this.value);case"E":return e=this.error,new r.y((function(t){return t.error(e)}));case"C":return C()}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}(),L=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 _.ZT(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 M(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(D.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(D.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(D.createComplete()),this.unsubscribe()},t}(P.L),M=function(){return function(e,t){this.notification=e,this.destination=t}}(),U=n(7043),F=n(6362),B=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 _.ZT(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 z(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.N;if(this.isStopped||this.hasError?t=x.w.EMPTY:(this.observers.push(e),t=new F.W(this,e)),o&&e.add(e=new L(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||T).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}(E.xQ),z=function(){return function(e,t){this.time=e,this.value=t}}();function V(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 W(e,t))}}var W=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new K(e,this.project,this.thisArg))},e}(),K=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 _.ZT(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}(P.L),H=n(1450);function q(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var G=q(),Z=n(4002),Y=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Q(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var J=n(1167),X=function(e){if(e&&"function"==typeof e[Z.L])return r=e,function(e){var t=r[Z.L]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Y(e))return I(e);if(Q(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,H.z),e};if(e&&"function"==typeof e[G])return t=e,function(e){for(var n=t[G]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=(0,J.K)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};var ee=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return _.ZT(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}(P.L),te=(P.L,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _.ZT(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}(P.L));function ne(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(o){return o.pipe(ne((function(n,o){return(i=e(n,o),i instanceof r.y?i:new r.y(X(i))).pipe(V((function(e,r){return t(n,e,o,r)})));var i}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new re(e,n))})}P.L;var re=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 oe(e,this.project,this.concurrent))},e}(),oe=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 _.ZT(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 ee(this),n=this.destination;n.add(t);var o=function(e,t){if(!t.closed){if(e instanceof r.y)return e.subscribe(t);var n;try{n=X(e)(t)}catch(e){t.error(e)}return n}}(e,t);o!==t&&n.add(o)},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}(te),ie=n(7430);function ae(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),ne(ie.y,e)}function se(){}var ue=n(9147);function ce(e,t,n){return function(r){return r.lift(new le(e,t,n))}}var le=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 fe(e,this.nextOrObserver,this.error,this.complete))},e}(),fe=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=se,i._tapError=se,i._tapComplete=se,i._tapError=r||se,i._tapComplete=o||se,(0,ue.m)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||se,i._tapError=n.error||se,i._tapComplete=n.complete||se),i}return _.ZT(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}(P.L);function pe(e,t){return function(n){return n.lift(new de(e,t))}}var de=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new he(e,this.predicate,this.thisArg))},e}(),he=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 _.ZT(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}(P.L);const ve=new B(1);let ge=0;function ye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return ge<Date.now()-6e4&&be(),ve.asObservable().pipe(ae(),ce(me),V((t=>e.includeAuthStatus?t:t.user)),pe(Boolean))}function me(e){if(e?.user?.userProperties?.defaultLocale){const t=e.user.userProperties.defaultLocale;t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}}function be(){ge=Date.now(),ve.next(g(h).then((e=>"object"==typeof e.data?e.data:Promise.reject())).catch((()=>({sessionId:"",authenticated:!1}))))}function we(e,t){return function(e,t){return t.privileges.find((t=>e===t.display))}(e,t)||function(e){return e.roles.find((e=>"System Developer"===e.display))}(t)}function _e(){return new Promise(((e,t)=>{const n=ye().subscribe((t=>{e(t),n.unsubscribe()}),t)}))}function Ee(){return new Promise(((e,t)=>{const n=ye({includeAuthStatus:!0}).subscribe((t=>{e(t.sessionLocation),n.unsubscribe()}),t)}))}async function xe(e,t){await g(h,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),be()}function Se(e,t){return e?w.read({type:"Patient",patient:e,...t}):Promise.resolve(null)}var Oe=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return _.ZT(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 U.N;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(E.xQ),ke=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}();function Te(e){return function(t){return 0===e?C():t.lift(new Pe(e))}}var Pe=function(){function e(e){if(this.total=e,this.total<0)throw new ke}return e.prototype.call=function(e,t){return t.subscribe(new je(e,this.total))},e}(),je=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return _.ZT(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}(P.L);const Ce="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function Ne(e,t,n){return y(`/ws/rest/v1/visit?patient=${e}&v=${n??Ce}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(Te(1)).pipe(V((e=>e)))}function Ae(e,t){return y("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Ie(e,t,n){return y(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const Re=new Oe(null);let $e,De;function Le(e){return{uuid:e.uuid,display:e.display,name:e.name}}function Me(){return y("/ws/rest/v1/visittype").pipe(V((e=>e.data.results.map(Le)))).pipe(Te(1))}function Ue(e){return{uuid:e.uuid,display:e.display}}function Fe(){return y("/ws/rest/v1/location").pipe(V((e=>e.data.results.map(Ue)))).pipe(Te(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}($e||($e={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(De||(De={}));const Be={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},3107:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";function e(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function n(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,c=o.end,l=void 0===c||c,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+e(o.endsWith||"")+"]|$",h="["+e(o.delimiter||"/#?")+"]",v=u?"^":"",g=0,y=n;g<y.length;g++){var m=y[g];if("string"==typeof m)v+=e(p(m));else{var b=e(p(m.prefix)),w=e(p(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+d+")":"$";else{var E=n[n.length-1],x="string"==typeof E?h.indexOf(E[E.length-1])>-1:void 0===E;a||(v+="(?:"+h+"(?="+d+"))?"),x||(v+="(?="+h+"|"+d+")")}return new RegExp(v,t(o))}(function(t,n){void 0===n&&(n={});for(var r=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[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];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=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}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}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",s=[],u=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=f("CHAR"),v=f("NAME"),g=f("PATTERN");if(v||g){var y=h||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(s.push(l),l=""),s.push({name:v||u++,prefix:y,suffix:"",pattern:g||a,modifier:f("MODIFIER")||""})}else{var m=h||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(s.push(l),l=""),f("OPEN")){y=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),s.push({name:b||(w?u++:""),pattern:b&&!w?a:w,prefix:y,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return s}(n,o),r,o)}function r(e,o,i){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,o):Array.isArray(e)?function(e,n,o){var i=e.map((function(e){return r(e,n,o).source}));return new RegExp("(?:"+i.join("|")+")",t(o))}(e,o,i):n(e,o,i)}o.r(i),o.d(i,{filterBreadcrumbs:()=>p,getBreadcrumbs:()=>l,getBreadcrumbsFor:()=>d,registerBreadcrumb:()=>u,registerBreadcrumbs:()=>c});const a=(0,o(685).createGlobalStore)("breadcrumbs",[]);function s(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?r(e.matcher):r(e.path)}function u(e){return c([e])}function c(e){const t=[...l(),...e.map((e=>({matcher:s(e),settings:e})))];a.setState(t,!0)}function l(){return a.getState()}function f(e,t){if(t)return function(e,t){const[n]=e.filter((e=>e.matcher.test(t)));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=f(e,n.join("/"));if(t)return t}}(e,t)}function p(e,t){if(e.length>0){const n=f(e,t);if(n){const t=[n];let r=f(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=f(e,r.settings.parent);return t.reverse()}}return[]}function d(e){return p(l(),e)}})(),i})())}}}))},7179:()=>{System.register(["@openmrs/esm-state","single-spa"],(function(e,t){var n={},r={};return{setters:[function(e){n.createGlobalStore=e.createGlobalStore,n.getGlobalStore=e.getGlobalStore},function(e){r.navigateToUrl=e.navigateToUrl}],execute:function(){e((()=>{var e={712:(e,t,n)=>{var r=n(823),o=n(773)((function(e,t){return r(e.length,(function(){return e.apply(t,arguments)}))}));e.exports=o},122:(e,t,n)=>{var r=n(918),o=n(764)((function(e){return null!=e&&"function"==typeof e.clone?e.clone():r(e,[],[],!0)}));e.exports=o},102:(e,t,n)=>{var r=n(773),o=n(968),i=r((function(e,t){return o(e,t,[],[])}));e.exports=i},823:e=>{e.exports=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},340:e=>{e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},918:(e,t,n)=>{var r=n(259),o=n(704);e.exports=function e(t,n,i,a){var s=function(r){for(var o=n.length,s=0;s<o;){if(t===n[s])return i[s];s+=1}for(var u in n[s+1]=t,i[s+1]=r,t)r[u]=a?e(t[u],n,i,!0):t[u];return r};switch(o(t)){case"Object":return s({});case"Array":return s([]);case"Date":return new Date(t.valueOf());case"RegExp":return r(t);default:return t}}},259:e=>{e.exports=function(e){return new RegExp(e.source,(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":""))}},764:(e,t,n)=>{var r=n(230);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},773:(e,t,n)=>{var r=n(764),o=n(230);e.exports=function(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return o(n)?t:r((function(t){return e(n,t)}));default:return o(n)&&o(i)?t:o(n)?r((function(t){return e(t,i)})):o(i)?r((function(t){return e(n,t)})):e(n,i)}}}},138:(e,t,n)=>{var r=n(764),o=n(773),i=n(230);e.exports=function(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return i(n)?t:o((function(t,r){return e(n,t,r)}));case 2:return i(n)&&i(a)?t:i(n)?o((function(t,n){return e(t,a,n)})):i(a)?o((function(t,r){return e(n,t,r)})):r((function(t){return e(n,a,t)}));default:return i(n)&&i(a)&&i(s)?t:i(n)&&i(a)?o((function(t,n){return e(t,n,s)})):i(n)&&i(s)?o((function(t,n){return e(t,a,n)})):i(a)&&i(s)?o((function(t,r){return e(n,t,r)})):i(n)?r((function(t){return e(t,a,s)})):i(a)?r((function(t){return e(n,t,s)})):i(s)?r((function(t){return e(n,a,t)})):e(n,a,s)}}}},968:(e,t,n)=>{var r=n(340),o=n(587),i=n(168),a=n(673),s=n(784),u=n(478),c=n(704);function l(e,t,n,i){var a=r(e),s=r(t);function u(e,t){return f(e,t,n.slice(),i.slice())}return!o((function(e,t){return!o(u,t,e)}),s,a)}function f(e,t,n,r){if(s(e,t))return!0;var o=c(e);if(o!==c(t))return!1;if(null==e||null==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(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===i(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!s(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!s(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 p=n.length-1;p>=0;){if(n[p]===e)return r[p]===t;p-=1}switch(o){case"Map":return e.size===t.size&&l(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&l(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 d=u(e);if(d.length!==u(t).length)return!1;var h=n.concat([e]),v=r.concat([t]);for(p=d.length-1;p>=0;){var g=d[p];if(!a(g,t)||!f(t[g],e[g],h,v))return!1;p-=1}return!0}e.exports=f},168:e=>{e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},673:e=>{e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},587:e=>{e.exports=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}},640:(e,t,n)=>{var r=n(673),o=Object.prototype.toString,i=function(){return"[object Arguments]"===o.call(arguments)?function(e){return"[object Arguments]"===o.call(e)}:function(e){return r("callee",e)}}();e.exports=i},726:e=>{e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},534:(e,t,n)=>{var r=n(764),o=n(726),i=n(468),a=r((function(e){return!!o(e)||!!e&&"object"==typeof e&&!i(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));e.exports=a},78:e=>{e.exports=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},230:e=>{e.exports=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},468:e=>{e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},784:e=>{e.exports="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},623:(e,t,n)=>{var r=n(534),o=n(782),i=n(712);function a(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 s(e,t,n,r){return e["@@transducer/result"](n[r](i(e["@@transducer/step"],e),t))}var u="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";e.exports=function(e,t,n){if("function"==typeof e&&(e=o(e)),r(n))return 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)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[u])return a(e,t,n[u]());if("function"==typeof n.next)return a(e,t,n);if("function"==typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},782:e=>{var t=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}();e.exports=function(e){return new t(e)}},478:(e,t,n)=>{var r=n(764),o=n(673),i=n(640),a=!{toString:null}.propertyIsEnumerable("toString"),s=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],u=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},l="function"!=typeof Object.keys||u?r((function(e){if(Object(e)!==e)return[];var t,n,r=[],l=u&&i(e);for(t in e)!o(t,e)||l&&"length"===t||(r[r.length]=t);if(a)for(n=s.length-1;n>=0;)o(t=s[n],e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r})):r((function(e){return Object(e)!==e?[]:Object.keys(e)}));e.exports=l},317:(e,t,n)=>{var r=n(773),o=n(937),i=r((function(e,t){return o((function(e,t,n){return n}),e,t)}));e.exports=i},937:(e,t,n)=>{var r=n(138),o=n(78),i=n(145),a=r((function e(t,n,r){return i((function(n,r,i){return o(r)&&o(i)?e(t,r,i):t(n,r,i)}),n,r)}));e.exports=a},145:(e,t,n)=>{var r=n(138),o=n(673),i=r((function(e,t,n){var r,i={};for(r in t)o(r,t)&&(i[r]=o(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)o(r,n)&&!o(r,i)&&(i[r]=n[r]);return i}));e.exports=i},61:(e,t,n)=>{var r=n(138)(n(623));e.exports=r},704:(e,t,n)=>{var r=n(764)((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));e.exports=r},685:e=>{"use strict";e.exports=n},645:e=>{"use strict";e.exports=r}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{Type:()=>l,configExtensionStore:()=>S,configInternalStore:()=>w,defineConfigSchema:()=>L,defineExtensionConfigSchema:()=>M,getConfig:()=>F,getConfigStore:()=>O,getExtensionConfig:()=>C,getExtensionConfigFromStore:()=>N,getExtensionSlotConfig:()=>T,getExtensionSlotConfigFromStore:()=>P,getExtensionSlotsConfigStore:()=>k,getExtensionsConfigStore:()=>j,implementerToolsConfigStore:()=>A,inRange:()=>ce,interpolateString:()=>se,interpolateUrl:()=>ae,isUrl:()=>fe,isUrlWithTemplateParameters:()=>le,navigate:()=>ue,processConfig:()=>B,provide:()=>U,temporaryConfigStore:()=>x,validator:()=>f,validators:()=>pe});var e=o(317),t=o.n(e),n=o(61),r=o.n(n),a=o(122),s=o.n(a),u=o(102),c=o.n(u);let l;function f(e,t){return n=>{if(!e(n))return t}}!function(e){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"}(l||(l={}));const p=f((e=>Array.isArray(e)),"must be an array"),d=f((e=>"boolean"==typeof e),"must be a boolean"),h=f((e=>"number"==typeof e),"must be a number"),v=f((e=>"string"==typeof e),"must be a string"),g=f((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),y=f((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 m=o(685);const b={providedConfigs:[],schemas:{},devDefaultsAreOn:E()},w=(0,m.createGlobalStore)("config-internal",b);let _=E();function E(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}w.subscribe((e=>{var t;e.devDefaultsAreOn!=_&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),_=e.devDefaultsAreOn)}));const x=(0,m.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});x.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const S=(0,m.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function O(e){return(0,m.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function k(){return(0,m.getGlobalStore)("config-extension-slots",{slots:{}})}function T(e){return P(k().getState(),e)}function P(e,t){return e.slots[t]??{loaded:!1,config:{}}}function j(){return(0,m.getGlobalStore)("config-extensions",{configs:{}})}function C(e,t){return N(j().getState(),e,t)}function N(e,t,n){const r=e.configs[t]?.[n];return r??{loaded:!1,config:null}}const A=(0,m.createGlobalStore)("config-implementer-tools",{config:{}});function I(e,t){for(let n of Object.keys(e.schemas)){const r=G(n,e,t);O(n).setState({loaded:!0,config:r})}}function R(e,t){const n=function(e,t){const n=Y(H(e,t)),r=Object.keys(n).reduce(((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e)),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))K(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>({...e,...r[t]})),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((e=>{let[t,n]=e;return[t,{loaded:!0,config:n}]}))),o=k(),i=o.getState(),a={slots:{...i.slots,...r}};c()(i,a)||o.setState(a)}function $(e,t){const n=function(e,t){let n=V(s()(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=Y([n,W(e,t)]);return n}(e,t);A.setState({config:n})}function D(e,t,n){const r={};for(let o of t.mountedExtensions){const t=z(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}j().setState({configs:r})}function L(e,t){q(e,t);const n=w.getState();w.setState({schemas:{...n.schemas,[e]:t}})}function M(e,t){q(e,t);const n=w.getState();n.schemas[e]&&console.warn(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),w.setState({schemas:{...n.schemas,[e]:t}})}function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";const n=w.getState();w.setState({providedConfigs:[...n.providedConfigs,{source:t,config:e}]})}function F(e){return new Promise((t=>{const n=O(e);function r(e){e.loaded&&e.config&&(t(e.config),o&&o())}r(n.getState());const o=n.subscribe(r)}))}function B(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Q(e,t,n);const o=ne(e,t,r);return o}function z(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),s=o.schemas[a],u=s?a:t,c=H(o,i),l=Z(e,c)?.extensionSlots?.[n]?.configure?.[r]??{},f=Y([Z(u,c),l]),p=s??o.schemas[t];Q(p,f,u);const d=ne(p,f,o.devDefaultsAreOn);return delete d.extensionSlots,d}function V(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:oe(e)?Object.keys(e).reduce(((t,n)=>(t[n]=V(e[n]),t)),{}):{}}function W(e,t){return oe(e)?Object.keys(e).reduce(((n,r)=>(n[r]=W(e[r],t),n)),{}):{_value:e,_source:t}}function K(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"string"==typeof e))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((e=>"string"==typeof e))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(oe(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function H(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter((e=>!e.startsWith("_")))){const i=n+(n&&".")+o,a=t[o];if(!oe(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||q(e,a,i);const s=a._elements;if(re(s)&&q(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const u=a._type;u&&!Object.values(l).includes(u)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(l).join(", ")}. Received '${u}'`),Object.keys(a).every((e=>["_description","_validators","_elements","_type"].includes(e)))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&u&&![l.Array,l.Object].includes(u)&&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(u)}`)}}function G(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=Z(e,H(t,n));Q(r,o,e);const i=ne(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Z(e,t){return Y(t.map((t=>{let{[e]:n}=t;return n})).filter((e=>!!e)))}function Y(e){return r()(t())({},e)}I(w.getState(),x.getState()),w.subscribe((e=>I(e,x.getState()))),x.subscribe((e=>I(w.getState(),e))),$(w.getState(),x.getState()),w.subscribe((e=>$(e,x.getState()))),x.subscribe((e=>$(w.getState(),e))),R(w.getState(),x.getState()),w.subscribe((e=>R(e,x.getState()))),x.subscribe((e=>R(w.getState(),e))),D(w.getState(),S.getState(),x.getState()),w.subscribe((e=>{D(e,S.getState(),x.getState())})),S.subscribe((e=>{D(w.getState(),e,x.getState())})),x.subscribe((e=>{D(w.getState(),S.getState(),e)}));const Q=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?(ee(i,a._type,o),te(i,a._validators,o),oe(o)?a._type===l.Object?J(a,o,i):a.hasOwnProperty("_default")||Q(a,o,i):a._type===l.Array&&X(a,o,i)):"extensionSlots"!==r&&console.error(`Unknown config key '${i}' provided. Ignoring.`)}};function J(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Q(e._elements,o,`${n}.${r}`)}}function X(e,t,n){if(re(e._elements))for(let r=0;r<t.length;r++)Q(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)ee(`${n}[${r}]`,e._elements?._type,t[r]),te(`${n}[${r}]`,e._elements?._validators,t[r])}function ee(e,t,n){t&&te(e,[{Array:p,Boolean:d,ConceptUuid:y,Number:h,Object:g,String:v,UUID:y,PersonAttributeTypeUuid:y,PatientIdentifierTypeUuid:y}[t]],n)}function te(e,t,n){if(t)try{for(let r of t){const t=r(n);if("string"==typeof t){const r="object"==typeof n?JSON.stringify(n):n;console.error(`Invalid configuration value ${r} for ${e}: ${t}`)}}}catch(t){console.error(`Skipping invalid validator at "${e}".`)}}const ne=(e,t,n)=>{const r=s()(t);if(!e)return r;for(const t of Object.keys(e)){const o=r[t],i=e[t];if(i&&i.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){const e=i._devDefault||i._default;r[t]=n?e:i._default}const e=i._elements;if(o&&re(e))if(i._type===l.Array){const i=o.map((t=>ne(e,t,n)));r[t]=i}else if(i._type===l.Object)for(let t of Object.keys(o))o[t]=ne(e,o[t],n)}else if(oe(i)){const e=r.hasOwnProperty(t)?o:{};oe(e)&&(r[t]=ne(i,e,n))}}return r};function re(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function oe(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var ie=o(645);function ae(e){const t=window.getOpenmrsSpaBase().replace(/\/$/,"");return se(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function se(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}function ue(e){let{to:t}=e;const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=ae(t);r.startsWith(n)?(0,ie.navigateToUrl)(r):window.location.assign(r)}const ce=(e,t)=>f((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),le=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return f((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(", "))},fe=le([]),pe={inRange:ce,isUrl:fe,isUrlWithTemplateParameters:le}})(),i})())}}}))},5734:(e,t,n)=>{"use strict";n.d(t,{JU:()=>r.ConfigStore,Dy:()=>o,SH:()=>ye,Tj:()=>me,iE:()=>we,pR:()=>ce,Z2:()=>l,IT:()=>a,ll:()=>i,CB:()=>p,gZ:()=>f,c4:()=>u,JJ:()=>be,sC:()=>c,z2:()=>d});var r={};let o;function i(e){const t=window.getOpenmrsSpaBase().replace(/\/$/,"");return a(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function a(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}n.r(r),n.d(r,{R2:()=>ue,hv:()=>oe,pR:()=>ce,Gr:()=>le,_z:()=>fe,HN:()=>pe,DK:()=>se}),function(e){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"}(o||(o={}));var s=n(3710);function u(e){let{to:t}=e;const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=i(t);r.startsWith(n)?(0,s.UO)(r):window.location.assign(r)}function c(e,t){return n=>{if(!e(n))return t}}const l=(e,t)=>c((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),f=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return c((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(", "))},p=f([]),d={inRange:l,isUrl:p,isUrlWithTemplateParameters:f};function h(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function v(e){return function t(n){return 0===arguments.length||h(n)?t:e.apply(this,arguments)}}function g(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return h(n)?t:v((function(t){return e(n,t)}));default:return h(n)&&h(r)?t:h(n)?v((function(t){return e(t,r)})):h(r)?v((function(t){return e(n,t)})):e(n,r)}}}function y(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function m(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function b(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const w="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var _=Object.prototype.toString,E=function(){return"[object Arguments]"===_.call(arguments)?function(e){return"[object Arguments]"===_.call(e)}:function(e){return b("callee",e)}}();const x=E;var S=!{toString:null}.propertyIsEnumerable("toString"),O=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=function(){return arguments.propertyIsEnumerable("length")}(),T=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const P="function"!=typeof Object.keys||k?v((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=k&&x(e);for(t in e)!b(t,e)||o&&"length"===t||(r[r.length]=t);if(S)for(n=O.length-1;n>=0;)b(t=O[n],e)&&!T(r,t)&&(r[r.length]=t),n-=1;return r})):v((function(e){return Object(e)!==e?[]:Object.keys(e)})),j=v((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e,t,n,r){var o=y(e);function i(e,t){return N(e,t,n.slice(),r.slice())}return!m((function(e,t){return!m(i,t,e)}),y(t),o)}function N(e,t,n,r){if(w(e,t))return!0;var o,i,a=j(e);if(a!==j(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!w(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!w(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 s=n.length-1;s>=0;){if(n[s]===e)return r[s]===t;s-=1}switch(a){case"Map":return e.size===t.size&&C(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&C(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=P(e);if(u.length!==P(t).length)return!1;var c=n.concat([e]),l=r.concat([t]);for(s=u.length-1;s>=0;){var f=u[s];if(!b(f,t)||!N(t[f],e[f],c,l))return!1;s-=1}return!0}const A=g((function(e,t){return N(e,t,[],[])}));function I(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?I(e[s],t,n,!0):e[s];return o};switch(j(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const R=v((function(e){return null!=e&&"function"==typeof e.clone?e.clone():I(e,[],[],!0)}));function $(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return h(n)?t:g((function(t,r){return e(n,t,r)}));case 2:return h(n)&&h(r)?t:h(n)?g((function(t,n){return e(t,r,n)})):h(r)?g((function(t,r){return e(n,t,r)})):v((function(t){return e(n,r,t)}));default:return h(n)&&h(r)&&h(o)?t:h(n)&&h(r)?g((function(t,n){return e(t,n,o)})):h(n)&&h(o)?g((function(t,n){return e(t,r,n)})):h(r)&&h(o)?g((function(t,r){return e(n,t,r)})):h(n)?v((function(t){return e(t,r,o)})):h(r)?v((function(t){return e(n,t,o)})):h(o)?v((function(t){return e(n,r,t)})):e(n,r,o)}}}const D=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},L=v((function(e){return!!D(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));var M=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}(),U=g((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,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 F=U;function B(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function z(e,t,n,r){return e["@@transducer/result"](n[r](F(e["@@transducer/step"],e),t))}var V="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function W(e,t,n){if("function"==typeof e&&(e=function(e){return new M(e)}(e)),L(n))return 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)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return z(e,t,n,"fantasy-land/reduce");if(null!=n[V])return B(e,t,n[V]());if("function"==typeof n.next)return B(e,t,n);if("function"==typeof n.reduce)return z(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const K=$(W);function H(e){return"[object Object]"===Object.prototype.toString.call(e)}const q=$((function(e,t,n){var r,o={};for(r in t)b(r,t)&&(o[r]=b(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)b(r,n)&&!b(r,o)&&(o[r]=n[r]);return o})),G=$((function e(t,n,r){return q((function(n,r,o){return H(r)&&H(o)?e(t,r,o):t(n,r,o)}),n,r)})),Z=g((function(e,t){return G((function(e,t,n){return n}),e,t)})),Y=c((e=>Array.isArray(e)),"must be an array"),Q=c((e=>"boolean"==typeof e),"must be a boolean"),J=c((e=>"number"==typeof e),"must be a number"),X=c((e=>"string"==typeof e),"must be a string"),ee=c((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),te=c((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 ne=n(8748);const re={providedConfigs:[],schemas:{},devDefaultsAreOn:ae()},oe=(0,ne.createGlobalStore)("config-internal",re);let ie=ae();function ae(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}oe.subscribe((e=>{var t;e.devDefaultsAreOn!=ie&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),ie=e.devDefaultsAreOn)}));const se=(0,ne.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});se.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const ue=(0,ne.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ce(e){return(0,ne.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function le(){return(0,ne.getGlobalStore)("config-extension-slots",{slots:{}})}function fe(){return(0,ne.getGlobalStore)("config-extensions",{configs:{}})}const pe=(0,ne.createGlobalStore)("config-implementer-tools",{config:{}});function de(e,t){for(let n of Object.keys(e.schemas)){const r=Te(n,e,t);ce(n).setState({loaded:!0,config:r})}}function he(e,t){const n=function(e,t){const n=je(Oe(e,t)),r=Object.keys(n).reduce(((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e)),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Se(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>({...e,...r[t]})),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((e=>{let[t,n]=e;return[t,{loaded:!0,config:n}]}))),o=le(),i=o.getState(),a={slots:{...i.slots,...r}};A(i,a)||o.setState(a)}function ve(e,t){const n=function(e,t){let n=Ee(R(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=je([n,xe(e,t)]);return n}(e,t);pe.setState({config:n})}function ge(e,t,n){const r={};for(let o of t.mountedExtensions){const t=_e(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]={...r[o.slotName],[o.extensionId]:{config:t,loaded:!0}}}fe().setState({configs:r})}function ye(e,t){ke(e,t);const n=oe.getState();oe.setState({schemas:{...n.schemas,[e]:t}})}function me(e,t){ke(e,t);const n=oe.getState();n.schemas[e]&&console.warn(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),oe.setState({schemas:{...n.schemas,[e]:t}})}function be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided";const n=oe.getState();oe.setState({providedConfigs:[...n.providedConfigs,{source:t,config:e}]})}function we(e){return new Promise((t=>{const n=ce(e);function r(e){e.loaded&&e.config&&(t(e.config),o&&o())}r(n.getState());const o=n.subscribe(r)}))}function _e(e,t,n,r,o,i){const a=function(e){const[t]=e.split("#");return t}(r),s=o.schemas[a],u=s?a:t,c=Oe(o,i),l=Pe(e,c)?.extensionSlots?.[n]?.configure?.[r]??{},f=je([Pe(u,c),l]),p=s??o.schemas[t];Ce(p,f,u);const d=$e(p,f,o.devDefaultsAreOn);return delete d.extensionSlots,d}function Ee(e){return e.hasOwnProperty("_default")?{...e,_value:e._default,_source:"default"}:Le(e)?Object.keys(e).reduce(((t,n)=>(t[n]=Ee(e[n]),t)),{}):{}}function xe(e,t){return Le(e)?Object.keys(e).reduce(((n,r)=>(n[r]=xe(e[r],t),n)),{}):{_value:e,_source:t}}function Se(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"string"==typeof e))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((e=>"string"==typeof e))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Le(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Oe(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function ke(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const i of Object.keys(t).filter((e=>!e.startsWith("_")))){const a=n+(n&&".")+i,s=t[i];if(!Le(s)){console.error(`${e} has bad config schema definition for key '${a}'. ${r}`);continue}s.hasOwnProperty("_default")||ke(e,s,a);const u=s._elements;if(De(u)&&ke(e,u,a+"._elements"),s._validators)for(let t of s._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${a}' ${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(o).includes(c)&&console.error(`${e} has invalid type for key '${a}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(o).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 '${a}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(s)}`),u&&c&&![o.Array,o.Object].includes(c)&&console.error(`${e} has bad config schema definition for key '${a}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(c)}`)}}function Te(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=Pe(e,Oe(t,n));Ce(r,o,e);const i=$e(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Pe(e,t){return je(t.map((t=>{let{[e]:n}=t;return n})).filter((e=>!!e)))}function je(e){return K(Z)({},e)}de(oe.getState(),se.getState()),oe.subscribe((e=>de(e,se.getState()))),se.subscribe((e=>de(oe.getState(),e))),ve(oe.getState(),se.getState()),oe.subscribe((e=>ve(e,se.getState()))),se.subscribe((e=>ve(oe.getState(),e))),he(oe.getState(),se.getState()),oe.subscribe((e=>he(e,se.getState()))),se.subscribe((e=>he(oe.getState(),e))),ge(oe.getState(),ue.getState(),se.getState()),oe.subscribe((e=>{ge(e,ue.getState(),se.getState())})),ue.subscribe((e=>{ge(oe.getState(),e,se.getState())})),se.subscribe((e=>{ge(oe.getState(),ue.getState(),e)}));const Ce=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";for(const r of Object.keys(t)){const i=t[r],a=n+"."+r,s=e[r];e.hasOwnProperty(r)?(Ie(a,s._type,i),Re(a,s._validators,i),Le(i)?s._type===o.Object?Ne(s,i,a):s.hasOwnProperty("_default")||Ce(s,i,a):s._type===o.Array&&Ae(s,i,a)):"extensionSlots"!==r&&console.error(`Unknown config key '${a}' provided. Ignoring.`)}};function Ne(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Ce(e._elements,o,`${n}.${r}`)}}function Ae(e,t,n){if(De(e._elements))for(let r=0;r<t.length;r++)Ce(e._elements,t[r],`${n}[${r}]`);for(let r=0;r<t.length;r++)Ie(`${n}[${r}]`,e._elements?._type,t[r]),Re(`${n}[${r}]`,e._elements?._validators,t[r])}function Ie(e,t,n){t&&Re(e,[{Array:Y,Boolean:Q,ConceptUuid:te,Number:J,Object:ee,String:X,UUID:te,PersonAttributeTypeUuid:te,PatientIdentifierTypeUuid:te}[t]],n)}function Re(e,t,n){if(t)try{for(let r of t){const t=r(n);if("string"==typeof t){const r="object"==typeof n?JSON.stringify(n):n;console.error(`Invalid configuration value ${r} for ${e}: ${t}`)}}}catch(t){console.error(`Skipping invalid validator at "${e}".`)}}const $e=(e,t,n)=>{const r=R(t);if(!e)return r;for(const t of Object.keys(e)){const i=r[t],a=e[t];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(t)){const e=a._devDefault||a._default;r[t]=n?e:a._default}const e=a._elements;if(i&&De(e))if(a._type===o.Array){const o=i.map((t=>$e(e,t,n)));r[t]=o}else if(a._type===o.Object)for(let t of Object.keys(i))i[t]=$e(e,i[t],n)}else if(Le(a)){const e=r.hasOwnProperty(t)?i:{};Le(e)&&(r[t]=$e(a,e,n))}}return r};function De(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function Le(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}},4729:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:e=>{"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var i={};return(0,o(968).s)(1),(()=>{"use strict";o.r(i),o.d(i,{createErrorHandler:()=>n,reportError:()=>t});var e=o(728);function t(e){const t=r(e);setTimeout((()=>{throw t}))}function n(){const e=Error();return n=>{r(n).stack+=`\nAsync stacktrace:\n${e.stack}`,t(n)}}function r(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(){return(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,e.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}})(),i})())}}}))},2465:(e,t,n)=>{e=n.nmd(e),System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(r,o){var i={},a={},s={};return{setters:[function(e){i.configExtensionStore=e.configExtensionStore,i.getExtensionConfigFromStore=e.getExtensionConfigFromStore,i.getExtensionSlotConfig=e.getExtensionSlotConfig,i.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,i.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,i.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){a.createGlobalStore=e.createGlobalStore,a.getGlobalStore=e.getGlobalStore},function(e){s.mountRootParcel=e.mountRootParcel}],execute:function(){r((()=>{var r={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:e=>{"use strict";e.exports=i},685:e=>{"use strict";e.exports=a},645:e=>{"use strict";e.exports=s}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return r[e](n,n.exports,c),n.exports}c.y=o,c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e})();var l={};return(0,c(968).s)(1),(()=>{"use strict";c.r(l),c.d(l,{attach:()=>wt,checkStatus:()=>jt,checkStatusFor:()=>Ct,detach:()=>_t,detachAll:()=>Et,extensionStore:()=>Rt,getAssignedExtensions:()=>kt,getConnectedExtensions:()=>St,getCustomProps:()=>Nt,getExtensionInternalStore:()=>at,getExtensionNameFromId:()=>gt,getExtensionRegistration:()=>mt,getExtensionRegistrationFrom:()=>yt,getExtensionStore:()=>ut,registerExtension:()=>bt,registerExtensionSlot:()=>Tt,renderExtension:()=>It,reset:()=>Pt,updateInternalExtensionStore:()=>st});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(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])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.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))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.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 s=a,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var f="object"==typeof self&&self&&self.Object===Object&&self;const p=u||f||Function("return this")(),d=p.Symbol;var h=Object.prototype,v=h.hasOwnProperty,g=h.toString,y=d?d.toStringTag:void 0,m=Object.prototype.toString,b=d?d.toStringTag:void 0;const w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=v.call(e,y),n=e[y];try{e[y]=void 0;var r=!0}catch(e){}var o=g.call(e);return r&&(t?e[y]=n:delete e[y]),o}(e):function(e){return m.call(e)}(e)},_=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},E=function(e){if(!_(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},x=p["__core-js_shared__"];var S,O=(S=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",k=Function.prototype.toString;const T=function(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var P=/^\[object .+?Constructor\]$/,j=Function.prototype,C=Object.prototype,N=j.toString,A=C.hasOwnProperty,I=RegExp("^"+N.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const R=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!_(e)||(t=e,O&&O in t))&&(E(e)?I:P).test(T(e));var t}(n)?n:void 0},$=R(p,"Map"),D=R(Object,"create");var L=Object.prototype.hasOwnProperty,M=Object.prototype.hasOwnProperty;function U(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])}}U.prototype.clear=function(){this.__data__=D?D(null):{},this.size=0},U.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},U.prototype.get=function(e){var t=this.__data__;if(D){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return L.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return D?void 0!==t[e]:M.call(t,e)},U.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=D&&void 0===t?"__lodash_hash_undefined__":t,this};const F=U,B=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 z(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])}}z.prototype.clear=function(){this.size=0,this.__data__={hash:new F,map:new($||s),string:new F}},z.prototype.delete=function(e){var t=B(this,e).delete(e);return this.size-=t?1:0,t},z.prototype.get=function(e){return B(this,e).get(e)},z.prototype.has=function(e){return B(this,e).has(e)},z.prototype.set=function(e,t){var n=B(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const V=z;function W(e){var t=this.__data__=new s(e);this.size=t.size}W.prototype.clear=function(){this.__data__=new s,this.size=0},W.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},W.prototype.get=function(e){return this.__data__.get(e)},W.prototype.has=function(e){return this.__data__.has(e)},W.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new V(r)}return n.set(e,t),this.size=n.size,this};const K=W;function H(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new V;++t<n;)this.add(e[t])}H.prototype.add=H.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},H.prototype.has=function(e){return this.__data__.has(e)};const q=H,G=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},Z=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new q:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var g=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!G(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},Y=p.Uint8Array,Q=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},J=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var X=d?d.prototype:void 0,ee=X?X.valueOf:void 0;const te=Array.isArray;var ne=Object.prototype.propertyIsEnumerable,re=Object.getOwnPropertySymbols;const oe=re?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 a=e[n];t(a)&&(i[o++]=a)}return i}(re(e),(function(t){return ne.call(e,t)})))}:function(){return[]},ie=function(e){return null!=e&&"object"==typeof e},ae=function(e){return ie(e)&&"[object Arguments]"==w(e)};var se=Object.prototype,ue=se.hasOwnProperty,ce=se.propertyIsEnumerable,le=ae(function(){return arguments}())?ae:function(e){return ie(e)&&ue.call(e,"callee")&&!ce.call(e,"callee")};const fe=le;var pe=t&&!t.nodeType&&t,de=pe&&e&&!e.nodeType&&e,he=de&&de.exports===pe?p.Buffer:void 0;const ve=(he?he.isBuffer:void 0)||function(){return!1};var ge=/^(?:0|[1-9]\d*)$/;const ye=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t},me=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var be={};be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be["[object Arguments]"]=be["[object Array]"]=be["[object ArrayBuffer]"]=be["[object Boolean]"]=be["[object DataView]"]=be["[object Date]"]=be["[object Error]"]=be["[object Function]"]=be["[object Map]"]=be["[object Number]"]=be["[object Object]"]=be["[object RegExp]"]=be["[object Set]"]=be["[object String]"]=be["[object WeakMap]"]=!1;var we=t&&!t.nodeType&&t,_e=we&&e&&!e.nodeType&&e,Ee=_e&&_e.exports===we&&u.process,xe=function(){try{return _e&&_e.require&&_e.require("util").types||Ee&&Ee.binding&&Ee.binding("util")}catch(e){}}(),Se=xe&&xe.isTypedArray;const Oe=Se?(ke=Se,function(e){return ke(e)}):function(e){return ie(e)&&me(e.length)&&!!be[w(e)]};var ke,Te=Object.prototype.hasOwnProperty,Pe=Object.prototype;const je=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Ce=Object.prototype.hasOwnProperty;const Ne=function(e){return null!=(t=e)&&me(t.length)&&!E(t)?function(e,t){var n=te(e),r=!n&&fe(e),o=!n&&!r&&ve(e),i=!n&&!r&&!o&&Oe(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!Te.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ye(c,u))||s.push(c);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Pe))return je(e);var t,n,r=[];for(var o in Object(e))Ce.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Ae=function(e){return function(e,t,n){var r=t(e);return te(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ne,oe)};var Ie=Object.prototype.hasOwnProperty;const Re=R(p,"DataView"),$e=R(p,"Promise"),De=R(p,"Set"),Le=R(p,"WeakMap");var Me="[object Map]",Ue="[object Promise]",Fe="[object Set]",Be="[object WeakMap]",ze="[object DataView]",Ve=T(Re),We=T($),Ke=T($e),He=T(De),qe=T(Le),Ge=w;(Re&&Ge(new Re(new ArrayBuffer(1)))!=ze||$&&Ge(new $)!=Me||$e&&Ge($e.resolve())!=Ue||De&&Ge(new De)!=Fe||Le&&Ge(new Le)!=Be)&&(Ge=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?T(n):"";if(r)switch(r){case Ve:return ze;case We:return Me;case Ke:return Ue;case He:return Fe;case qe:return Be}return t});const Ze=Ge;var Ye="[object Arguments]",Qe="[object Array]",Je="[object Object]",Xe=Object.prototype.hasOwnProperty;const et=function(e,t,n,o,i,a){var s=te(e),u=te(t),c=s?Qe:Ze(e),l=u?Qe:Ze(t),f=(c=c==Ye?Je:c)==Je,p=(l=l==Ye?Je:l)==Je,d=c==l;if(d&&ve(e)){if(!ve(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new K),s||Oe(e)?Z(e,t,n,o,i,a):function(e,t,n,o,i,a,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||!a(new Y(e),new Y(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+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 u=Q;case"[object Set]":var c=1&o;if(u||(u=J),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=Z(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Xe.call(e,"__wrapped__"),v=p&&Xe.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,y=v?t.value():t;return a||(a=new K),i(g,y,n,o,a)}}return!!d&&(a||(a=new K),function(e,t,n,r,o,i){var a=1&n,s=Ae(e),u=s.length;if(u!=Ae(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:Ie.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var v=e[l=s[c]],g=t[l];if(r)var y=a?r(g,v,l,t,e,i):r(v,g,l,e,t,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))},tt=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ie(t)&&!ie(n)?t!=t&&n!=n:et(t,n,r,o,e,i))},nt=function(e,t){return tt(e,t)};var rt=c(824),ot=c(685);const it=(0,ot.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),at=()=>(0,ot.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function st(e){const t=it.getState(),n=e(t);n!==t&&it.setState(n)}const ut=()=>(0,ot.getGlobalStore)("extensions",{slots:{}});function ct(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});nt(rt.configExtensionStore.getState().mountedExtensions,t)||rt.configExtensionStore.setState({mountedExtensions:t})}ct(it.getState()),it.subscribe(ct);const lt=at(),ft=ut(),pt=(0,rt.getExtensionSlotsConfigStore)(),dt=(0,rt.getExtensionsConfigStore)();function ht(e,t,n){const r={};for(let[o,i]of Object.entries(e.slots)){const{config:a}=(0,rt.getExtensionSlotConfigFromStore)(t,i.name),s=Ot(o,e,a,n);r[o]={moduleName:i.moduleName,assignedExtensions:s}}nt(ft.getState().slots,r)||ft.setState({slots:r})}function vt(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function gt(e){const[t]=e.split("#");return t}function yt(e,t){const n=gt(t);return e.extensions[n]}function mt(e){return yt(lt.getState(),e)}lt.subscribe((e=>{ht(e,pt.getState(),dt.getState())})),pt.subscribe((e=>{ht(lt.getState(),e,dt.getState())})),dt.subscribe((e=>{ht(lt.getState(),pt.getState(),e)}));const bt=lt.action(((e,t)=>{e.extensions[t.name]={...t,instances:[]}}));function wt(e,t){st((n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...vt(e),attachedIds:[t]}}}}))}function _t(e,t){st((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 Et(e){st((t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t}))}function xt(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 St(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t??navigator.onLine;return e.filter((e=>Ct(n,e.online,e.offline)))}function Ot(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=lt.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{const r=xt(e,o,i[gt(e)].order,t),a=xt(n,o,i[gt(n)].order,t);return-1===a?-1:-1===r?1:r-a}))}(n,t.slots[e].attachedIds),i=[];for(let n of o){const{config:o}=(0,rt.getExtensionConfigFromStore)(r,e,n),a=gt(n),s=t.extensions[a];i.push({id:n,name:a,moduleName:s.moduleName,config:o,meta:s.meta,online:s.online,offline:s.offline})}return i}function kt(e){const t=lt.getState(),{config:n}=(0,rt.getExtensionSlotConfig)(e);return Ot(e,t,n,dt.getState())}const Tt=lt.action(((e,t,n)=>{const r=e.slots[n]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),e;if(r&&r==t)return e;if(e.slots[n])return{...e,slots:{...e.slots,[n]:{...e.slots[n],moduleName:t}}};const o=vt(n,t);return{...e,slots:{...e.slots,[n]:o}}})),Pt=ft.action((()=>({slots:{},extensions:{}})));function jt(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=navigator.onLine;return Ct(n,e,t)}function Ct(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function Nt(e,t){const n=navigator.onLine?e:t;return"object"==typeof n?n:{}}var At=c(645);function It(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=gt(r),s=mt(r);let u=!0,c=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:l,online:f,offline:p,meta:d,moduleName:h}=s;jt(f,p)&&(l().then((a=>{let{default:s,...l}=a;u&&(c=(0,At.mountRootParcel)(o(s??l),{...Nt(f,p),...i,_meta:d,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:h},domElement:e}))})),st((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return{...o,extensions:{...o.extensions,[a]:{...o.extensions[a],instances:[...o.extensions[a].instances,i]}}}})))}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return()=>{u=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((()=>{c&&c.unmount()})):c.unmount())}}const Rt=at()})(),l})())}}}))},9187:(e,t,n)=>{"use strict";n.d(t,{pv:()=>r.AssignedExtension,x9:()=>o.CancelLoading,uP:()=>r.ConnectedExtension,uu:()=>r.ExtensionMeta,tj:()=>r.ExtensionRegistration,u_:()=>r.ExtensionSlotState,qN:()=>r.ExtensionStore,ub:()=>T,og:()=>P,lW:()=>j,h6:()=>I,Kq:()=>N,EB:()=>S,yw:()=>f,ix:()=>k,Qq:()=>R,H8:()=>y});var r={};n.r(r),n.d(r,{Co:()=>c,yw:()=>f,qO:()=>l});var o={};n.r(o),n.d(o,{H:()=>y});var i=n(7179),a=n(3202),s=n(8748);const u=(0,s.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),c=()=>(0,s.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function l(e){const t=u.getState(),n=e(t);n!==t&&u.setState(n)}const f=()=>(0,s.getGlobalStore)("extensions",{slots:{}});function p(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,a.Z)(i.configExtensionStore.getState().mountedExtensions,t)||i.configExtensionStore.setState({mountedExtensions:t})}function d(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=navigator.onLine;return h(n,e,t)}function h(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function v(e,t){const n=navigator.onLine?e:t;return"object"==typeof n?n:{}}p(u.getState()),u.subscribe(p);var g=n(3710);function y(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=S(r),s=O(r);let u=!0,c=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:f,online:p,offline:h,meta:y,moduleName:m}=s;d(p,h)&&(f().then((a=>{let{default:s,...l}=a;u&&(c=(0,g.BP)(o(s??l),{...v(p,h),...i,_meta:y,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:m},domElement:e}))})),l((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return{...o,extensions:{...o.extensions,[a]:{...o.extensions[a],instances:[...o.extensions[a].instances,i]}}}})))}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return()=>{u=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((()=>{c&&c.unmount()})):c.unmount())}}c();const m=c(),b=f(),w=(0,i.getExtensionSlotsConfigStore)(),_=(0,i.getExtensionsConfigStore)();function E(e,t,n){const r={};for(let[o,a]of Object.entries(e.slots)){const{config:s}=(0,i.getExtensionSlotConfigFromStore)(t,a.name),u=A(o,e,s,n);r[o]={moduleName:a.moduleName,assignedExtensions:u}}(0,a.Z)(b.getState().slots,r)||b.setState({slots:r})}function x(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function S(e){const[t]=e.split("#");return t}function O(e){return function(e,t){const n=S(t);return e.extensions[n]}(m.getState(),e)}m.subscribe((e=>{E(e,w.getState(),_.getState())})),w.subscribe((e=>{E(m.getState(),e,_.getState())})),_.subscribe((e=>{E(m.getState(),w.getState(),e)}));const k=m.action(((e,t)=>{e.extensions[t.name]={...t,instances:[]}}));function T(e,t){l((n=>{const r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...x(e),attachedIds:[t]}}}}))}function P(e,t){l((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 j(e){l((t=>{const n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t}))}function C(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 N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t??navigator.onLine;return e.filter((e=>h(n,e.online,e.offline)))}function A(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=m.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{const r=C(e,o,i[S(e)].order,t),a=C(n,o,i[S(n)].order,t);return-1===a?-1:-1===r?1:r-a}))}(n,t.slots[e].attachedIds),a=[];for(let n of o){const{config:o}=(0,i.getExtensionConfigFromStore)(r,e,n),s=S(n),u=t.extensions[s];a.push({id:n,name:s,moduleName:u.moduleName,config:o,meta:u.meta,online:u.online,offline:u.offline})}return a}function I(e){const t=m.getState(),{config:n}=(0,i.getExtensionSlotConfig)(e);return A(e,t,n,_.getState())}const R=m.action(((e,t,n)=>{const r=e.slots[n]?.moduleName;if(r&&r!=t)return console.warn(`An extension slot with the name '${n}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),e;if(r&&r==t)return e;if(e.slots[n])return{...e,slots:{...e.slots,[n]:{...e.slots[n],moduleName:t}}};const o=x(n,t);return{...e,slots:{...e.slots,[n]:o}}}));b.action((()=>({slots:{},extensions:{}})))},9976:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{dispatchConnectivityChanged:()=>t,dispatchNotificationShown:()=>f,dispatchPrecacheStaticDependencies:()=>s,setupPaths:()=>h,setupUtils:()=>v,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>n,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>d});const e="openmrs:connectivity-changed";function t(t){window.dispatchEvent(new CustomEvent(e,{detail:{online:t}}))}function n(t){const n=e=>t(e.detail);return window.addEventListener(e,n),()=>window.removeEventListener(e,n)}function i(e){return e({online:navigator.onLine}),n(e)}const a="openmrs:precache-static-dependencies";function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function d(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function h(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=()=>`${window.spaBase}/`}function v(){window.copyText=e=>{const t=window.getSelection();if(t){const n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}}})(),o})())}}}))},5763:(e,t,n)=>{"use strict";n.d(t,{ac:()=>r.ConnectivityChangedEvent,hM:()=>r.PrecacheStaticDependenciesEvent,Kj:()=>r.ShowNotificationEvent,P3:()=>r.ShowToastEvent,BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>u,id:()=>p});var r={};n.r(r),n.d(r,{BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>u,id:()=>p});const o="openmrs:connectivity-changed";function i(e){const t=t=>e(t.detail);return window.addEventListener(o,t),()=>window.removeEventListener(o,t)}function a(e){return e({online:navigator.onLine}),i(e)}const s="openmrs:precache-static-dependencies";function u(e){const t=t=>e(t.detail);return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}const c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}},5614:(e,t,n)=>{"use strict";n.d(t,{iC:()=>r.OfflineMode,Vm:()=>r.OfflineModeResult,Cg:()=>o.QueueItemDescriptor,we:()=>o.SyncItem,Ug:()=>o.SyncProcessOptions,jp:()=>zr,Qd:()=>Br,Gy:()=>Vr,sF:()=>Nr,vm:()=>a,aA:()=>Dr,k1:()=>rr,TI:()=>Fr,Q2:()=>Ur,z7:()=>Ar,nN:()=>sr,gp:()=>mr,a7:()=>Cr,Rz:()=>_r,QI:()=>br,$9:()=>wr,X2:()=>Mr,dt:()=>or,H_:()=>Wr,MO:()=>ir});var r={};n.r(r),n.d(r,{vm:()=>a});var o={};n.r(o),n.d(o,{jp:()=>zr,Qd:()=>Br,Gy:()=>Vr,aA:()=>Dr,TI:()=>Fr,Q2:()=>Ur,X2:()=>Mr,H_:()=>Wr});let i="unavailable";function a(){return{current:i,notAvailable:!0,active:!1}}const s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,u=Object.keys,c=Array.isArray;function l(e,t){return"object"!=typeof t||u(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||s.Promise||(s.Promise=Promise);const f=Object.getPrototypeOf,p={}.hasOwnProperty;function d(e,t){return p.call(e,t)}function h(e,t){"function"==typeof t&&(t=t(f(e))),("undefined"==typeof Reflect?u:Reflect.ownKeys)(t).forEach((n=>{g(e,n,t[n])}))}const v=Object.defineProperty;function g(e,t,n,r){v(e,t,l(n&&d(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function y(e){return{from:function(t){return e.prototype=Object.create(t.prototype),g(e.prototype,"constructor",e),{extend:h.bind(null,e.prototype)}}}}const m=Object.getOwnPropertyDescriptor;function b(e,t){let n;return m(e,t)||(n=f(e))&&b(n,t)}const w=[].slice;function E(e,t,n){return w.call(e,t,n)}function x(e,t){return t(e)}function S(e){if(!e)throw new Error("Assertion Failed")}function O(e){s.setImmediate?setImmediate(e):setTimeout(e,0)}function k(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function T(e,t){if(d(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=T(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:T(s,t.substr(a+1))}}function P(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){S("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)P(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?c(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u||(u=e[a]={}),P(u,s,n)}}else void 0===n?c(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function j(e){var t={};for(var n in e)d(e,n)&&(t[n]=e[n]);return t}const C=[].concat;function N(e){return C.apply([],e)}const A="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(N([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>s[e])),I=A.map((e=>s[e]));k(A,(e=>[e,!0]));let R=null;function $(e){R="undefined"!=typeof WeakMap&&new WeakMap;const t=D(e);return R=null,t}function D(e){if(!e||"object"!=typeof e)return e;let t=R&&R.get(e);if(t)return t;if(c(e)){t=[],R&&R.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(D(e[n]))}else if(I.indexOf(e.constructor)>=0)t=e;else{const n=f(e);for(var o in t=n===Object.prototype?{}:Object.create(n),R&&R.set(e,t),e)d(e,o)&&(t[o]=D(e[o]))}return t}const{toString:L}={};function M(e){return L.call(e).slice(8,-1)}const U="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",F="symbol"==typeof U?function(e){var t;return null!=e&&(t=e[U])&&t.apply(e)}:function(){return null},B={};function z(e){var t,n,r,o;if(1===arguments.length){if(c(e))return e.slice();if(this===B&&"string"==typeof e)return[e];if(o=F(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 V="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var W="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function K(e,t){W=e,H=t}var H=()=>!0;const q=!new Error("").stack;function G(){if(q)try{throw G.arguments,new Error}catch(e){return e}return new Error}function Z(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(H).map((e=>"\n"+e)).join("")):""}var Y=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Q=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Y),J={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 X(e,t){this._e=G(),this.name=e,this.message=t}function ee(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function te(e,t,n,r){this._e=G(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ee(e,t)}function ne(e,t){this._e=G(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=ee(e,t)}y(X).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),y(te).from(X),y(ne).from(X);var re=Q.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const oe=X;var ie=Q.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=G(),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=J[t]||n,this.inner=null)}return y(r).from(oe),e[t]=r,e}),{});ie.Syntax=SyntaxError,ie.Type=TypeError,ie.Range=RangeError;var ae=Y.reduce(((e,t)=>(e[t+"Error"]=ie[t],e)),{}),se=Q.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ie[t]),e)),{});function ue(){}function ce(e){return e}function le(e,t){return null==e||e===ce?t:function(n){return t(e(n))}}function fe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function pe(e,t){return e===ue?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?fe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?fe(o,this.onerror):o),void 0!==i?i:n}}function de(e,t){return e===ue?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?fe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?fe(r,this.onerror):r)}}function he(e,t){return e===ue?t:function(n){var r=e.apply(this,arguments);l(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?fe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?fe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:l(r,a)}}function ve(e,t){return e===ue?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function ge(e,t){return e===ue?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)}}se.ModifyError=te,se.DexieError=X,se.BulkError=ne;var ye={};const[me,be,we]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,f(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,f(t),e]})(),_e=be&&be.then,Ee=me&&me.constructor,xe=!!we;var Se=!1,Oe=we?()=>{we.then(Ge)}:s.setImmediate?setImmediate.bind(null,Ge):s.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Ge(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Ge,0)},ke=function(e,t){$e.push([e,t]),Pe&&(Oe(),Pe=!1)},Te=!0,Pe=!0,je=[],Ce=[],Ne=null,Ae=ce,Ie={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:mt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{mt(e[0],e[1])}catch(e){}}))}},Re=Ie,$e=[],De=0,Le=[];function Me(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=ue,this._lib=!1;var t=this._PSD=Re;if(W&&(this._stackHolder=G(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==ye)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ze(this,this._value))}this._state=null,this._value=null,++t.ref,Be(this,e)}const Ue={get:function(){var e=Re,t=ot;function n(n,r){var o=!e.global&&(e!==Re||t!==ot);const i=o&&!ut();var a=new Me(((t,a)=>{We(this,new Fe(gt(n,e,o,i),gt(r,e,o,i),t,a,e))}));return W&&qe(a,this),a}return n.prototype=ye,n},set:function(e){g(this,"then",e&&e.prototype===ye?Ue:{get:function(){return e},set:Ue.set})}};function Fe(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 Be(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&&Ze();t&&"function"==typeof t.then?Be(e,((e,n)=>{t instanceof Me?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Ve(e)),n&&Ye()}}),ze.bind(null,e))}catch(t){ze(e,t)}}function ze(e,t){if(Ce.push(t),null===e._state){var n=e._lib&&Ze();t=Ae(t),e._state=!1,e._value=t,W&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=b(t,"stack");t._promise=e,g(t,"stack",{get:()=>Se?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){je.some((t=>t._value===e._value))||je.push(e)}(e),Ve(e),n&&Ye()}}function Ve(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)We(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===De&&(++De,ke((()=>{0==--De&&Qe()}),[]))}function We(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,++De,ke(Ke,[n,e,t])}else e._listeners.push(t)}function Ke(e,t,n){try{Ne=t;var r,o=t._value;t._state?r=e(o):(Ce.length&&(Ce=[]),r=e(o),-1===Ce.indexOf(o)&&function(e){for(var t=je.length;t;)if(je[--t]._value===e._value)return void je.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ne=null,0==--De&&Qe(),--n.psd.ref||n.psd.finalize()}}function He(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Z(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return W&&((r=Z(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&He(e._prev,t,n)),t}function qe(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Ge(){Ze()&&Ye()}function Ze(){var e=Te;return Te=!1,Pe=!1,e}function Ye(){var e,t,n;do{for(;$e.length>0;)for(e=$e,$e=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while($e.length>0);Te=!0,Pe=!0}function Qe(){var e=je;je=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=Le.slice(0),n=t.length;n;)t[--n]()}function Je(e){return new Me(ye,!1,e)}function Xe(e,t){var n=Re;return function(){var r=Ze(),o=Re;try{return pt(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{pt(o,!1),r&&Ye()}}}h(Me.prototype,{then:Ue,_then:function(e,t){We(this,new Fe(null,null,e,t,Re))},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):Je(e))):this.then(null,(e=>e&&e.name===t?n(e):Je(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),Je(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Se=!0;var e=He(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Se=!1}}},timeout:function(e,t){return e<1/0?new Me(((n,r)=>{var o=setTimeout((()=>r(new ie.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&g(Me.prototype,Symbol.toStringTag,"Dexie.Promise"),Ie.env=dt(),h(Me,{all:function(){var e=z.apply(null,arguments).map(ct);return new Me((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Me.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Me)return e;if(e&&"function"==typeof e.then)return new Me(((t,n)=>{e.then(t,n)}));var t=new Me(ye,!0,e);return qe(t,Ne),t},reject:Je,race:function(){var e=z.apply(null,arguments).map(ct);return new Me(((t,n)=>{e.map((e=>Me.resolve(e).then(t,n)))}))},PSD:{get:()=>Re,set:e=>Re=e},totalEchoes:{get:()=>ot},newPSD:at,usePSD:ht,scheduler:{get:()=>ke,set:e=>{ke=e}},rejectionMapper:{get:()=>Ae,set:e=>{Ae=e}},follow:(e,t)=>new Me(((n,r)=>at(((t,n)=>{var r=Re;r.unhandleds=[],r.onunhandled=n,r.finalize=fe((function(){!function(e){Le.push((function t(){e(),Le.splice(Le.indexOf(t),1)})),++De,ke((()=>{0==--De&&Qe()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),Ee&&(Ee.allSettled&&g(Me,"allSettled",(function(){const e=z.apply(null,arguments).map(ct);return new Me((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Me.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),Ee.any&&"undefined"!=typeof AggregateError&&g(Me,"any",(function(){const e=z.apply(null,arguments).map(ct);return new Me(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Me.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const et={awaits:0,echoes:0,id:0};var tt=0,nt=[],rt=0,ot=0,it=0;function at(e,t,n,r){var o=Re,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++it;var a=Ie.env;i.env=xe?{Promise:Me,PromiseProp:{value:Me,configurable:!0,writable:!0},all:Me.all,race:Me.race,allSettled:Me.allSettled,any:Me.any,resolve:Me.resolve,reject:Me.reject,nthen:yt(a.nthen,i),gthen:yt(a.gthen,i)}:{},t&&l(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=ht(i,e,n,r);return 0===i.ref&&i.finalize(),s}function st(){return et.id||(et.id=++tt),++et.awaits,et.echoes+=100,et.id}function ut(){return!!et.awaits&&(0==--et.awaits&&(et.id=0),et.echoes=100*et.awaits,!0)}function ct(e){return et.echoes&&e&&e.constructor===Ee?(st(),e.then((e=>(ut(),e)),(e=>(ut(),bt(e))))):e}function lt(e){++ot,et.echoes&&0!=--et.echoes||(et.echoes=et.id=0),nt.push(Re),pt(e,!0)}function ft(){var e=nt[nt.length-1];nt.pop(),pt(e,!1)}function pt(e,t){var n=Re;if((t?!et.echoes||rt++&&e===Re:!rt||--rt&&e===Re)||vt(t?lt.bind(null,e):ft),e!==Re&&(Re=e,n===Ie&&(Ie.env=dt()),xe)){var r=Ie.env.Promise,o=e.env;be.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(s,"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 dt(){var e=s.Promise;return xe?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:be.then,gthen:e.prototype.then}:{}}function ht(e,t,n,r,o){var i=Re;try{return pt(e,!0),t(n,r,o)}finally{pt(i,!1)}}function vt(e){_e.call(me,e)}function gt(e,t,n,r){return"function"!=typeof e?e:function(){var o=Re;n&&st(),pt(t,!0);try{return e.apply(this,arguments)}finally{pt(o,!1),r&&vt(ut)}}}function yt(e,t){return function(n,r){return e.call(this,gt(n,t),gt(r,t))}}function mt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(s.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),l(r,o)):s.CustomEvent&&l(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&s.dispatchEvent&&(dispatchEvent(r),!s.PromiseRejectionEvent&&s.onunhandledrejection))try{s.onunhandledrejection(r)}catch(e){}W&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+_e).indexOf("[native code]")&&(st=ut=ue);var bt=Me.reject;function wt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Re.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===re.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>wt(e,t,n,r)))):bt(o)}return o._promise(t,((e,t)=>at((()=>(Re.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return bt(new ie.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return bt(new ie.DatabaseClosed);e.open().catch(ue)}return e._state.dbReadyPromise.then((()=>wt(e,t,n,r)))}const _t=String.fromCharCode(65535),Et="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",xt=[],St="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Ot=St,kt=St,Tt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Pt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const jt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ct(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=$(t))[e],t)}class Nt{_trans(e,t,n){const r=this._tx||Re.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new ie.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Ze();try{return r&&r.db===this.db?r===Re.trans?r._promise(e,i,n):at((()=>r._promise(e,i,n)),{trans:r,transless:Re.transless||Re}):wt(this.db,e,[this.name],i)}finally{a&&Ye()}}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(c(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=u(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=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==_t)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&W&&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[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Pt(n,a&&a.multi?e=>{const t=T(e,o);return c(t)&&t.some((e=>i(s,e)))}:e=>i(s,T(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):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,c(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(d(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){l(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ct(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Me.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{P(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||c(e))return this.where(":id").equals(e).modify(t);{const n=T(e,this.schema.primKey.keyPath);if(void 0===n)return bt(new ie.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?u(t).forEach((n=>{P(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=Ct(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Me.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{P(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?Me.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:jt}))).then((e=>e.numFailures?Me.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 ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ct(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new ne(`${this.name}.bulkAdd(): ${e} of ${a} 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 ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ct(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new ne(`${this.name}.bulkPut(): ${e} of ${a} 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 ne(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function At(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)return a(e);r||(r=ve),o||(o=ue);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){u(e).forEach((function(t){var n=e[t];if(c(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new ie.InvalidArgument("Invalid event config");var r=i(t,ce,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){O((function(){e.apply(null,t)}))}))}))}}))}}function It(e,t){return y(t).from({prototype:e}),t}function Rt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function $t(e,t){e.filter=Pt(e.filter,t)}function Dt(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Pt(r(),t()):t,e.justLimit=n&&!r}function Lt(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new ie.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Mt(e,t,n){const r=Lt(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 Ut(e,t,n,r){const o=e.replayFilter?Pt(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),d(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),Ft(Mt(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return Ft(Mt(e,r,n),Pt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function Ft(e,t,n,r){var o=Xe(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=ue}),(t=>{e.fail(t),n=ue}))||o(e.value,e,(e=>n=e)),n()}))}))}function Bt(e,t){try{const n=zt(e),r=zt(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}(Vt(e),Vt(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=Bt(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function zt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=M(e);return"ArrayBuffer"===n?"binary":n}function Vt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Wt{_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=Pt(t.algorithm,e)}_iterate(e,t){return Ut(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&l(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Ut(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Rt(t,!0))return n.count({trans:e,query:{index:Lt(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Ut(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 a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Rt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=Lt(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 Ut(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Rt(t)?Dt(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Dt(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Dt(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return $t(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 $t(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Pt(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&&Rt(t,!0)&&t.limit>0)return this._read((e=>{var n=Lt(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 $t(this._ctx,(function(e){var t=e.primaryKey.toString(),r=d(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=u(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];T(t,a)!==s&&(P(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:c}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,f=[];let p=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;p+=e-r;for(let e of u(n))f.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=u=>{const f=Math.min(l,o.length-u);return a.getMany({trans:n,keys:o.slice(u,u+f),cache:"immutable"}).then((p=>{const d=[],v=[],g=s?[]:null,y=[];for(let e=0;e<f;++e){const t=p[e],n={value:$(t),primKey:o[u+e]};!1!==r.call(n,n.value,n)&&(null==n.value?y.push(o[u+e]):s||0===Bt(c(t),c(n.value))?(v.push(n.value),s&&g.push(o[u+e])):(y.push(o[u+e]),d.push(n.value)))}const m=Rt(t)&&t.limit===1/0&&("function"!=typeof e||e===Kt)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)y.splice(parseInt(t),1);h(d.length,e)}))).then((()=>(v.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:g,values:v,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(v.length,e))))).then((()=>(y.length>0||m&&e===Kt)&&a.mutate({trans:n,type:"delete",keys:y,criteria:m}).then((e=>h(y.length,e))))).then((()=>o.length>u+f&&i(u+l)))}))};return i(0).then((()=>{if(f.length>0)throw new te("Error modifying one or more objects",f,p,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Rt(e)&&(e.isPrimKey&&!kt||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 te("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Kt)}}const Kt=(e,t)=>t.value=null;function Ht(e,t){return e<t?-1:e===t?0:1}function qt(e,t){return e>t?-1:e===t?0:1}function Gt(e,t,n){var r=e instanceof en?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Zt(e){return new e.Collection(e,(()=>Xt(""))).limit(0)}function Yt(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function Qt(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Gt(e,"String expected.");function p(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),a="next"===e?Ht:qt;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(()=>Jt(s[0],u[f-1]+r)));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,u,h))return!0;for(var d=null,v=h;v<f;++v){var g=Yt(o,p,s[v],u[v],a,c);null===g&&null===d?h=v+1:(null===d||a(d,g)>0)&&(d=g)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function Jt(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Xt(e){return{type:1,lower:e,upper:e}}class en{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)?Zt(this):new this.Collection(this,(()=>Jt(e,t,!n,!r)))}catch(e){return Gt(this,Et)}}equals(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Xt(e)))}above(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(e,void 0,!0)))}aboveOrEqual(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(e,void 0,!1)))}below(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Gt(this,Et):new this.Collection(this,(()=>Jt(void 0,e)))}startsWith(e){return"string"!=typeof e?Gt(this,"String expected."):this.between(e,e+_t,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Qt(this,((e,t)=>0===e.indexOf(t[0])),[e],_t)}equalsIgnoreCase(e){return Qt(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=z.apply(B,arguments);return 0===e.length?Zt(this):Qt(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=z.apply(B,arguments);return 0===e.length?Zt(this):Qt(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,_t)}anyOf(){const e=z.apply(B,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Gt(this,Et)}if(0===e.length)return Zt(this);const n=new this.Collection(this,(()=>Jt(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 a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=z.apply(B,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Gt(this,Et)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,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,a=this._max;if(0===e.length)return Zt(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Gt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ie.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=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]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return Gt(this,Et)}let p=0;const d=u?e=>r(e,c[p][1])>0:e=>r(e,c[p][1])>=0,h=s?e=>o(e,c[p][0])>0:e=>o(e,c[p][0])>=0;let v=d;const g=new this.Collection(this,(()=>Jt(c[0][0],c[c.length-1][1],!s,!u)));return g._ondirectionchange=e=>{"next"===e?(v=d,l=r):(v=h,l=o),c.sort(f)},g._addAlgorithm(((e,t,n)=>{for(var o=e.key;v(o);)if(++p,p===c.length)return t(n),!1;return!!function(e){return!d(e)&&!h(e)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||t((()=>{l===r?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),g}startsWithAnyOf(){const e=z.apply(B,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Zt(this):this.inAnyRange(e.map((e=>[e,e+_t]))):Gt(this,"startsWithAnyOf() only works with strings")}}function tn(e){return Xe((function(t){return nn(t),e(t.target.error),!1}))}function nn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const rn=At(null,"storagemutated");class on{_lock(){return S(!Re.global),++this._reculock,1!==this._reculock||Re.global||(Re.lockOwnerFor=this),this}_unlock(){if(S(!Re.global),0==--this._reculock)for(Re.global||(Re.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{ht(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Re.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(S(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new ie.DatabaseClosed(n);case"MissingAPIError":throw new ie.MissingAPI(n.message,n);default:throw new ie.OpenFailed(n)}if(!this.active)throw new ie.TransactionInactive;return S(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=Xe((t=>{nn(t),this._reject(e.error)})),e.onabort=Xe((t=>{nn(t),this.active&&this._reject(new ie.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Xe((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&rn.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return bt(new ie.ReadOnly("Transaction is readonly"));if(!this.active)return bt(new ie.TransactionInactive);if(this._locked())return new Me(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Re])}));if(n)return at((()=>{var e=new Me(((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 Me(((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=Me.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 Me(((e,r)=>{n.then((n=>t._waitingQueue.push(Xe(e.bind(null,n)))),(e=>t._waitingQueue.push(Xe(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 ie.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(d(t,e))return t[e];const n=this.schema[e];if(!n)throw new ie.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 an(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+sn(t)}}function sn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function un(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:k(n,(e=>[e.name,e]))}}let cn=e=>{try{return e.only([[]]),cn=()=>[[]],[[]]}catch(e){return cn=()=>_t,_t}};function ln(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>T(t,e)}(e):t=>T(t,e)}function fn(e){return[].slice.call(e)}let pn=0;function dn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function hn(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=fn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=c(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:ln(t)},indexes:fn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:c(o),keyPath:o,unique:n,multiEntry:r,extractKey:ln(o)};return i[dn(o)]=a,a})),getIndexByKeyPath:e=>i[dn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[dn(t)]=a.primaryKey),a}))},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),a=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:a}){return new Promise(((s,u)=>{s=Xe(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=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===p)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const h=[],v=[];let g=0;const y=e=>{++g,nn(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:g,failures:v,results:[],lastResult:void 0});3===a.type?h.push(d=c.clear()):h.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)h.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=y;else for(let t=0;t<p;++t)h.push(d=c[n](e[t])),d.onerror=y}const m=e=>{const t=e.target.result;h.forEach(((e,t)=>null!=e.error&&(v[t]=e.error))),s({numFailures:g,failures:v,results:"delete"===n?o:h.map((e=>e.result)),lastResult:t})};d.onerror=e=>{y(e),m(e)},d.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Xe(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},p=tn(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=p,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Xe(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=tn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Xe(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:p}=c,d=a.objectStore(t),h=f.isPrimaryKey?d:d.index(f.name),v=r(p);if(0===u)return o({result:[]});if(e){const e=s?h.getAll(v,l):h.getAllKeys(v,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=tn(i)}else{let e=0;const t=s||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=tn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Xe(s);const{index:c,range:l}=o,f=e.objectStore(t),p=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=tn(u),h.onsuccess=Xe((t=>{const n=h.result;if(!n)return void s(null);n.___id=++pn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{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=Xe(u),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=Xe(e),h.onerror=tn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{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=Xe((e=>{h.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=Xe((t=>e(t.target.result))),l.onerror=tn(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:cn(t),schema:o}}function vn({_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)}(hn(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 gn({_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?g(t,n,{get(){return this.table(n)},set(e){v(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function yn({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function mn(e,t){return e._cfg.version-t._cfg.version}function bn(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=Re.transless||Re;at((()=>{Re.trans=i,Re.transless=s,0===t?(u(o).forEach((e=>{_n(n,e,o[e].primKey,o[e].indexes)})),vn(e,n),Me.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=xn(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,c=i._cfg.dbschema;Sn(e,o,r),Sn(e,c,r),a=e._dbSchema=c;const l=wn(o,c);l.add.forEach((e=>{_n(r,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((e=>{if(e.recreate)throw new ie.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>En(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),En(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const f=i._cfg.contentUpgrade;if(f&&i._cfg.version>t){vn(e,r),n._memoizedTables={},s=!0;let t=j(c);l.del.forEach((e=>{t[e]=o[e]})),yn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],u(t),t),n.schema=t;const i=V(f);let a;i&&st();const p=Me.follow((()=>{if(a=f(n),a&&i){var e=ut.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Me.resolve(a):p.then((()=>a))}})),o.push((t=>{s&&Ot||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),yn(e,[e.Transaction.prototype]),gn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Me.resolve(o.shift()(n.idbtrans)).then(e):Me.resolve()}().then((()=>{var e,t;t=r,u(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||_n(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function wn(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&&!St)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];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 _n(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=>En(o,e))),o}function En(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function xn(e,t,n){const r={};return E(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=an(sn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=an(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=un(e,i,a)})),r}function Sn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+E(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)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class On{_parseStoresSpec(e,t){u(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 an(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),c(r),0===t)})),o=r.shift();if(o.multi)throw new ie.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new ie.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ie.Schema("Index must have a name and cannot be an empty string")})),t[n]=un(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{l(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,yn(t,[t._allTables,t,t.Transaction.prototype]),gn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],u(o),o),t._storeNames=u(o),this}upgrade(e){return this._cfg.contentUpgrade=ge(this._cfg.contentUpgrade||ue,e),this}}function kn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new qn("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Tn(e){return e&&"function"==typeof e.databases}function Pn(e){return at((function(){return Re.letThrough=!0,e()}))}function jn(){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 Cn(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):c(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Nn(e,t,n){var r=arguments.length;if(r<2)throw new ie.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=N(o);return[e,i,n]}function An(e,t,n,r,o){return Me.resolve().then((()=>{const i=Re.transless||Re,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===re.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>An(e,t,n,null,o)))):bt(r)}const u=V(o);let c;u&&st();const l=Me.follow((()=>{if(c=o.call(a,a),c)if(u){var e=ut.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Cn(c))}),s);return(c&&"function"==typeof c.then?Me.resolve(c).then((e=>a.active?e:bt(new ie.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),bt(e))))}))}function In(e,t,n){const r=c(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Rn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=dn(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:ln(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(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:In(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:In(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[dn(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(In(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(In(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 c}}}};function $n(e,t,n,r){return n=n||{},r=r||"",u(e).forEach((o=>{if(d(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=M(i);e!==M(a)?n[r+o]=t[o]:"Object"===e?$n(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),u(t).forEach((o=>{d(e,o)||(n[r+o]=t[o])})),n}const Dn={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=Re.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===ue&&s.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===ue)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===ue)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Re.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((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||P(e.values[o],r.keyPath,n))}else{const r=$n(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{d(t,e)?t[e]=i[e]:P(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],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({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}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Ln(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===Bt(t.keys[o],e[i])&&(r.push(n?$(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Mn={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=Ln(e.keys,e.trans._cache,"clone"===e.cache);return t?Me.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?$(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Un(e){return!("from"in e)}const Fn=function(e,t){if(!this){const t=new Fn;return e&&"d"in e&&l(t,e),t}l(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Bn(e,t,n){const r=Bt(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Un(e))return l(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Bt(n,e.from)<0)return o?Bn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Wn(e);if(Bt(t,e.to)>0)return i?Bn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Wn(e);Bt(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Bt(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&zn(e,o),i&&a&&zn(e,i)}function zn(e,t){Un(t)||function e(t,{from:n,to:r,l:o,r:i}){Bn(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Vn(e){let t=Un(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&&Bt(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||Bt(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 Wn(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=Kn(n)}e.d=Kn(e)}function Kn({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}h(Fn.prototype,{add(e){return zn(this,e),this},addKey(e){return Bn(this,e,e),this},addKeys(e){return e.forEach((e=>Bn(this,e,e))),this},[U](){return Vn(this)}});const Hn={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new Fn(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:l}=a,f={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new Fn)},l=u(""),f=u(":dels"),{type:p}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const v=e.trans._cache;return o.mutate(e).then((e=>{if(c(d)){"delete"!==p&&(d=e.results),l.addKeys(d);const t=Ln(d,v);t||"add"===p||f.addKeys(d),(t||h)&&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 a=e=>t.multiEntry&&c(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Bt(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};f.add(e),l.add(e)}else l.add(n),f.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},p=({query:{index:t,range:n}})=>{var r,o;return[t,new Fn(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},d={get:e=>[a,new Fn(e.key)],getMany:e=>[a,(new Fn).addKeys(e.keys)],count:p,query:p,openCursor:p};return u(d).forEach((e=>{f[e]=function(i){const{subscr:a}=Re;if(a){const u=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new Fn)},c=u(""),f=u(":dels"),[p,h]=d[e](i);if(u(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&l&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(l&&i.values)return t.then((({result:e})=>(c.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?c.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(f.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return f.addKey(t),t}},value:{get:()=>(t&&c.addKey(e.primaryKey),e.value)}})}return n}))}f.add(n)}}return o[e].apply(this,arguments)}})),f}}}};class qn{constructor(e,t){this._middlewares={},this.verno=0;const n=qn.dependencies;this._options=t={addons:qn.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:ue,dbReadyPromise:null,cancelOpen:ue,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Me((e=>{o.dbReadyResolve=e})),o.openCanceller=new Me(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=At(this,"populate","blocked","versionchange","close",{ready:[ge,ue]}),this.on.ready.subscribe=x(this.on.ready.subscribe,(e=>(t,n)=>{qn.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Me.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,It(Wt.prototype,(function(e,t){this.db=i;let n=jt,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.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:s!==ce?s:null}}))),this.Table=function(e){return It(Nt.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:At(null,{creating:[pe,ue],reading:[le,ce],updating:[he,ue],deleting:[de,ue]})}))}(this),this.Transaction=function(e){return It(on.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=At(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 Me(((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 It(On.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return It(en.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 ie.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=cn(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),xt.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Rn),this.use(Dn),this.use(Hn),this.use(Mn),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new ie.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ie.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(mn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Re.letThrough||this._vip)?e():new Me(((e,t)=>{if(this._state.openComplete)return t(new ie.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ie.DatabaseClosed);this.open().catch(ue)}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));W&&(t.openCanceller._stackHolder=G()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new ie.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Me.race([r,("undefined"==typeof navigator?Me.resolve():jn()).then((()=>new Me(((r,i)=>{if(o(),!n)throw new ie.MissingAPI;const c=e.name,l=t.autoSchema?n.open(c):n.open(c,Math.round(10*e.verno));if(!l)throw new ie.MissingAPI;l.onerror=tn(i),l.onblocked=Xe(e._fireOnBlocked),l.onupgradeneeded=Xe((r=>{if(a=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=nn,a.abort(),l.result.close();const e=n.deleteDatabase(c);e.onsuccess=e.onerror=Xe((()=>{i(new ie.NoSuchDatabase(`Database ${c} doesnt exist`))}))}else{a.onerror=tn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=l.result,bn(e,o/10,a,i)}}),i),l.onsuccess=Xe((()=>{a=null;const n=e._novip.idbdb=l.result,o=E(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=xn(0,t,n);e._storeNames=E(t.objectStoreNames,0),gn(e,[e._allTables],u(r),r)}(e,n,r):(Sn(e,e._dbSchema,r),function(e,t){const n=wn(xn(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.")),vn(e,r)}catch(e){}var i;xt.push(e),n.onversionchange=Xe((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Xe((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Tn(e)&&"__dbnames"!==n&&kn(e,t).put({name:n}).catch(ue)}(e._deps,c),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Me.resolve(Pn((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(ge,ue);return t.onReadyBeingFired=[],Me.resolve(Pn((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),bt(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=xt.indexOf(this);if(t>=0&&xt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Me((t=>{e.dbReadyResolve=t})),e.openCanceller=new Me(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ie.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Me(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Xe((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Tn(e)&&"__dbnames"!==n&&kn(e,t).delete(n).catch(ue)}(this._deps,this.name),n()})),e.onerror=tn(r),e.onblocked=this._fireOnBlocked};if(e)throw new ie.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 u(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Nn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Re.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=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||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new ie.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new ie.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new ie.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 s=An.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):Re.trans?ht(Re.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!d(this._allTables,e))throw new ie.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Gn="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Zn{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Gn](){return this}}function Yn(e,t){return u(t).forEach((n=>{zn(e[n]||(e[n]=new Fn),t[n])})),e}let Qn;try{Qn={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch(s){Qn={indexedDB:null,IDBKeyRange:null}}const Jn=qn;function Xn(e){let t=er;try{er=!0,rn.storagemutated.fire(e)}finally{er=t}}h(Jn,{...se,delete:e=>new Jn(e,{addons:[]}).delete(),exists:e=>new Jn(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Tn(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):kn(e,t).toCollection().primaryKeys()}(Jn.dependencies).then(e)}catch(e){return bt(new ie.MissingAPI)}},defineClass:()=>function(e){l(this,e)},ignoreTransaction:e=>Re.trans?ht(Re.transless,e):e(),vip:Pn,async:function(e){return function(){try{var t=Cn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Me.resolve(t)}catch(e){return bt(e)}}},spawn:function(e,t,n){try{var r=Cn(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Me.resolve(r)}catch(e){return bt(e)}},currentTransaction:{get:()=>Re.trans||null},waitFor:function(e,t){const n=Me.resolve("function"==typeof e?Jn.ignoreTransaction(e):e).timeout(t||6e4);return Re.trans?Re.trans.waitFor(n):n},Promise:Me,debug:{get:()=>W,set:e=>{K(e,"dexie"===e?()=>!0:Tt)}},derive:y,extend:l,props:h,override:x,Events:At,on:rn,liveQuery:function(e){return new Zn((t=>{const n=V(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,rn.storagemutated.unsubscribe(f)}};t.start&&t.start(a);let s=!1,c=!1;function l(){return u(i).some((e=>o[e]&&function(e,t){const n=Vn(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Vn(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Bt(s.from,o.to)<=0&&Bt(s.to,o.from)>=0)return!0;Bt(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const f=e=>{Yn(o,e),l()&&p()},p=()=>{if(s||r)return;o={};const u={},d=function(t){n&&st();const r=()=>at(e,{subscr:t,trans:null}),o=Re.trans?ht(Re.transless,r):r();return n&&o.then(ut,ut),o}(u);c||(rn("storagemutated",f),c=!0),s=!0,Promise.resolve(d).then((e=>{s=!1,r||(l()?p():(o={},i=u,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return p(),a}))},extendObservabilitySet:Yn,getByKeyPath:T,setByKeyPath:P,delByKeyPath:function(e,t){"string"==typeof t?P(e,t,void 0):"length"in t&&[].map.call(t,(function(t){P(e,t,void 0)}))},shallowClone:j,deepClone:$,getObjectDiff:$n,cmp:Bt,asap:O,minKey:-1/0,addons:[],connections:xt,errnames:re,dependencies:Qn,semVer:"3.2.1",version:"3.2.1".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),Jn.maxKey=cn(Jn.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(rn("storagemutated",(e=>{if(!er){let t;St?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),er=!0,dispatchEvent(t),er=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{er||Xn(e)})));let er=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");rn("storagemutated",(t=>{er||e.postMessage(t)})),e.onmessage=e=>{e.data&&Xn(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){rn("storagemutated",(e=>{try{er||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Xn(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Xn(e.changedParts)}))}Me.rejectionMapper=function(e,t){if(!e||e instanceof X||e instanceof TypeError||e instanceof SyntaxError||!e.name||!ae[e.name])return e;var n=new ae[e.name](t||e.message,e);return"stack"in e&&g(n,"stack",{get:function(){return this.inner.stack}}),n},K(W,Tt);var tr=n(8748);const nr=(0,tr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function rr(){return nr}function or(e,t){const n=nr.getState();nr.setState({handlers:{...n.handlers,[e]:t}})}async function ir(e){const t=Object.entries(nr.getState().handlers),n=t.map((e=>{let[t]=e;return t})),r=[],o=[],i={},a=new AbortController;await ar(e,{timestamp:new Date,syncingHandlers:n,syncedHandlers:r,failedHandlers:o,errors:i,abort:()=>(a.abort(),!0)}),await Promise.all(t.map((async t=>{let[n,s]=t;try{await s.onOfflinePatientAdded({patientUuid:e,signal:a.signal}),console.debug(`Offline patient handler ${n} successfully synchronized patient data.`),r.push(n)}catch(e){console.error(`Offline patient handler ${n} failed. Error: `,e),o.push(n),i[n]=e?.message??e?.toString()??""}}))),await ar(e,{timestamp:new Date,syncingHandlers:[],syncedHandlers:r,failedHandlers:o,errors:i,abort:()=>!1})}async function ar(e,t){const n=nr.getState();nr.setState({offlinePatientDataSyncState:{...n.offlinePatientDataSyncState,[e]:t}});const r=new ur,o={id:(await r.offlinePatientDataSyncStates.get({patientUuid:e}))?.id,patientUuid:e,state:{timestamp:t.timestamp,syncedHandlers:t.syncedHandlers,failedHandlers:[...t.failedHandlers,...t.syncingHandlers],errors:t.errors}};await r.offlinePatientDataSyncStates.put(o)}async function sr(){const e=new ur,t=await e.offlinePatientDataSyncStates.toArray(),n=nr.getState().offlinePatientDataSyncState;for(const e of t)n[e.patientUuid]={...e.state,syncingHandlers:[],abort:()=>!1};nr.setState({offlinePatientDataSyncState:n})}class ur extends qn{constructor(){super("EsmOfflinePatientData"),this.version(1).stores({offlinePatientDataSyncStates:"++id,&patientUuid"}),this.offlinePatientDataSyncStates=this.table("offlinePatientDataSyncStates")}}try{self["workbox:window:6.5.1"]&&_()}catch(c){}function cr(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 lr(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}try{self["workbox:core:6.5.1"]&&_()}catch(c){}var fr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function pr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var dr=function(e,t){this.type=e,Object.assign(this,t)};function hr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function vr(){}var gr={type:"SKIP_WAITING"};function yr(e,t){if(!t)return e&&e.then?e.then(vr):Promise.resolve()}async function mr(e){const t=await Promise.resolve(void 0);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."}}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new fr,r.en=new fr,r.on=new fr,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!pr(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,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new dr(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new dr("waiting",a))}),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 dr("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 hr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new dr("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=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.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 yr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),hr(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&&pr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new dr("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)}},i.update=function(){try{return this.fn?yr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return hr(this.getSW(),(function(t){return cr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&cr(this.fn.waiting,gr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&pr(e.scriptURL,this.sn.toString())?e:void 0},i.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 hr(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)}},(o=[{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)}}(r.prototype,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=function(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 lr(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)?lr(e,t):void 0}}(e))){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)}(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}());const br="x-omrs-offline-response-body",wr="x-omrs-offline-response-status",_r="x-omrs-offline-caching-strategy";var Er,xr=new Uint8Array(16);function Sr(){if(!Er&&!(Er="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Er(xr)}const Or=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,kr=function(e){return"string"==typeof e&&Or.test(e)};for(var Tr=[],Pr=0;Pr<256;++Pr)Tr.push((Pr+256).toString(16).substr(1));const jr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Sr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]).toLowerCase();if(!kr(n))throw TypeError("Stringified UUID is invalid");return n}(r)},Cr="OFFLINE+";function Nr(){return Cr+jr()}function Ar(e){return e.startsWith(Cr)}var Ir=n(5426);const Rr=new class extends qn{constructor(){super("EsmOffline"),this.version(3).stores({syncQueue:"++id,userId,type,[userId+type]"}),this.syncQueue=this.table("syncQueue")}},$r={};function Dr(){return Rr}async function Lr(){return(await(0,Ir.getLoggedInUser)())?.uuid||"*"}async function Mr(e,t,n){const r=await Lr();return await async function(e,t,n,r){const o=Rr.syncQueue,i=r&&r.id;return void 0!==i&&await o.where({type:t,userId:e}).filter((e=>e?.descriptor.id===i)).delete(),await o.add({type:t,content:n,userId:e,descriptor:r||{},createdOn:new Date})}(r,e,t,n)}async function Ur(e){const t=await Lr();return await async function(e,t){const n=Rr.syncQueue,r=[];return await n.where({type:t,userId:e}).each((e=>{r.push(e.content)})),r}(t,e)}async function Fr(e){return await Rr.syncQueue.get(e)}function Br(e){return!!$r[e]?.options.onBeginEditSyncItem}async function zr(e){const t=await Fr(e);if(!t)throw new Error(`No sync item with the ID ${e} exists.`);const n=$r[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 Vr(e){await Rr.syncQueue.delete(e)}function Wr(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};$r[e]={type:e,dependsOn:t,process:n,options:r}}(0,tr.createGlobalStore)("offline-synchronization",{})},4734:(e,t,n)=>{"use strict";n.d(t,{w:()=>u,hj:()=>fn,g:()=>r.ExtensionData,dT:()=>b,Vz:()=>ot,NV:()=>c,D$:()=>Re,Ae:()=>Ae,tl:()=>Ne,a$:()=>Ie,YV:()=>$e,P3:()=>h,yn:()=>De,ZR:()=>Fe,BL:()=>v,Y9:()=>p,Yq:()=>Qe,p8:()=>g,qd:()=>Je,jf:()=>Xe,mr:()=>tt,Z_:()=>nt,t$:()=>rt,h0:()=>ln,lm:()=>He,Oy:()=>it,oR:()=>ct,xQ:()=>lt,JF:()=>un,NN:()=>cn});var r={};n.r(r),n.d(r,{s:()=>i});var o=n(2735);const i=o.createContext({moduleName:""});var a=n(7179);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const u=e=>{let{to:t,children:n,...r}=e;return o.createElement("a",s({onClick:e=>function(e,t){e.metaKey||e.ctrlKey||e.shiftKey||0!=e.button||(e.preventDefault(),(0,a.navigate)({to:t}))}(e,t),href:(0,a.interpolateUrl)(t)},r),n)};function c(e){return function(t){const[n,r]=(0,o.useState)(e.getState());(0,o.useEffect)((()=>e.subscribe((e=>r(e)))),[]);let i={};return t&&(i=(0,o.useMemo)((()=>function(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=e.action(t[r]);return n}(e,t)),[e,t])),{...n,...i}}}var l=n(2465),f=n(9976);function p(){let[e,t]=(0,o.useState)(window.navigator.onLine);return(0,o.useEffect)((()=>(0,f.subscribeConnectivityChanged)((e=>{let{online:n}=e;return t(n)}))),[]),e}var d=n(2891);function h(e){const[t,n]=(0,o.useState)([]);return(0,o.useEffect)((()=>{function r(r){const o=r.slots[e]?.assignedExtensions??[];(0,d.isEqual)(o,t)||n(o)}return r((0,l.getExtensionStore)().getState()),(0,l.getExtensionStore)().subscribe(r)}),[e,t]),t}function v(e){const t=p(),n=h(e);return(0,o.useMemo)((()=>(0,l.getConnectedExtensions)(n,t)),[n,t])}function g(e){const{moduleName:t}=(0,o.useContext)(i);if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,o.useEffect)((()=>{(0,l.registerExtensionSlot)(t,e)}),[]),{extensions:v(e),extensionSlotName:e,extensionSlotModuleName:t}}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function m(e){return e}const b=e=>{let{extensionSlotName:t,select:n=m,children:r,state:a,style:s,...u}=e;const c=(0,o.useRef)(null),{extensions:l,extensionSlotModuleName:f}=g(t),p=(0,o.useRef)(a);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){const o=n[r];if(!(o in t)||t[o]!==e[o])return!1}return!0})(p.current,a)||(p.current=a);const d=(0,o.useMemo)((()=>t&&n(l).map((e=>o.createElement(i.Provider,{key:e.id,value:{moduleName:f,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:f}}},r??o.createElement(fn,{state:p.current}))))),[n,l,t,p.current]);return o.createElement("div",y({ref:c,"data-extension-slot-name":t,"data-extension-slot-module-name":f,style:{...s,position:"relative"}},u),d)};var w=n(2788);function _(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(O(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(O(e)));return e}}var T=null;try{T=require("react").createContext()}catch(_){}var P={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function j(e){if("object"!==x(e))throw new Error("single-spa-react requires a configuration object");var t=E(E({},P),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!T&&t.React.createContext&&(T=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:C.bind(null,t),mount:N.bind(null,t),unmount:A.bind(null,t)};return t.parcelCanUpdate&&(n.update=I.bind(null,t)),n}function C(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function N(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=R(e,t,(function(){n(this)})),i=k(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))}function A(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function I(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=R(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=k(e,t)();e.ReactDOM.render(r,i)}}))}function R(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=T?e.React.createElement(T.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,E(E({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)}function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){D(e,t,n[t])}))}return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&U(e.prototype,t),n&&U(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function W(e,t){return W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},W(e,t)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}var H={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,e),this.init(t,n)}return F(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||H,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,L({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),G=new q,Z=function(){function e(){M(this,e),this.observers={}}return F(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function Y(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Q(e){return null==e?"":""+e}function J(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function X(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function ee(e,t,n){var r=X(e,t,Object);r.obj[r.k]=n}function te(e,t){var n=X(e,t),r=n.obj,o=n.k;if(r)return r[o]}function ne(e,t,n){var r=te(e,n);return void 0!==r?r:te(t,n)}function re(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):re(e[r],t[r],n):e[r]=t[r]);return e}function oe(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ie={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function ae(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return ie[e]})):e}var se="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,ue=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return M(this,t),n=z(this,V(t).call(this)),se&&Z.call(B(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return K(t,e),F(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),te(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ee(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=te(this.data,a)||{};r?re(s,n,o):s=L({},s,n),ee(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?L({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(Z),ce={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},le={},fe=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return M(this,t),n=z(this,V(t).call(this)),se&&Z.call(B(n)),J(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,B(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=G.create("translator"),n}return K(t,e),F(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==$(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,u=a.namespaces,c=u[u.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var p=n.nsSeparator||this.options.nsSeparator;return c+p+s}return s}var d=this.resolve(e,n),h=d&&d.res,v=d&&d.usedKey||s,g=d&&d.exactUsedKey||s,y=Object.prototype.toString.apply(h),m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&m.indexOf(y)<0&&("string"!=typeof b||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var E="[object Array]"===y,x=E?[]:{},S=E?g:v;for(var O in h)if(Object.prototype.hasOwnProperty.call(h,O)){var k="".concat(S).concat(i).concat(O);x[O]=this.translate(k,L({},n,{joinArrays:!1,ns:u})),x[O]===k&&(x[O]=h[O])}h=x}}else if(w&&"string"==typeof b&&"[object Array]"===y)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var T=!1,P=!1,j=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),N=j?this.pluralResolver.getSuffix(l,n.count):"",A=n["defaultValue".concat(N)]||n.defaultValue;!this.isValidLookup(h)&&C&&(T=!0,h=A),this.isValidLookup(h)||(P=!0,h=s);var I=C&&A!==h&&this.options.updateMissing;if(P||T||I){if(this.logger.log(I?"updateKey":"missingKey",l,c,s,I?A:h),i){var R=this.resolve(s,L({},n,{keySeparator:!1}));R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&M&&M[0])for(var U=0;U<M.length;U++)D.push(M[U]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var F=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,t,I?r:h,I,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,t,I?r:h,I,n),o.emit("missingKey",e,c,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?D.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){F([e],s+t,n["defaultValue".concat(t)]||A)}))})):F(D,s,A))}h=this.extendTranslation(h,e,n,d,r),P&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(s)),P&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(L({},n,{interpolation:L({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=L({},this.options.interpolation.defaultVariables,c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=ce.handle(p,e,t,this.options&&this.options.postProcessPassResolved?L({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,p=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,d=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!le["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(le["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&d.push(l+=i));u=d.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(Z);function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var de=function(){function e(t){M(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=G.create("languageUtils")}return F(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=pe(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=pe(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),he=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ve={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function ge(){var e={};return he.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:ve[t.fc]}}))})),e}var ye=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};M(this,e),this.languageUtils=t,this.options=n,this.logger=G.create("pluralResolver"),this.rules=ge()}return F(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};M(this,e),this.logger=G.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return F(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:ae,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?oe(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?oe(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?oe(t.nestingPrefix):t.nestingPrefixEscaped||oe("$t("),this.nestingSuffix=t.nestingSuffix?oe(t.nestingSuffix):t.nestingSuffixEscaped||oe(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=ne(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(ne(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=Q(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=L({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=L({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],c=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),u=l,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Q(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=u.reduce((function(e,t){return o.format(e,t,i.lng,i)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),be=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return M(this,t),o=z(this,V(t).call(this)),se&&Z.call(B(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=G.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return K(t,e),F(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=X(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,L({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(Z);function we(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===$(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===$(e[2])||"object"===$(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function _e(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ee(){}var xe=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(M(this,t),e=z(this,V(t).call(this)),se&&Z.call(B(e)),e.options=_e(n),e.services={},e.logger=G,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),z(e,B(e));setTimeout((function(){e.init(n,r)}),0)}return e}return K(t,e),F(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=L({},we(),this.options,_e(t)),this.format=this.options.interpolation.format,n||(n=Ee),!this.options.isClone){this.modules.logger?G.init(r(this.modules.logger),this.options):G.init(null,this.options);var o=new de(this.options);this.store=new ue(this.options.resources,this.options);var i=this.services;i.logger=G,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new ye(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new me(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new be(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new fe(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var c=Y(),l=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=Y();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Ee),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ce.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Y();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==$(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=L({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Y();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Y();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ee,o=L({},this.options,n,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=L({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new fe(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(Z);const Se=new xe;var Oe=o.createContext();function ke(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,o.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,o.createElement)(Oe.Provider,{value:i},r)}F((function e(){M(this,e),this.usedNamespaces={}}),[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]);const Te=Se.default||Se,Pe={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},je=e=>{(0,o.useEffect)((()=>(Te.on("languageChanged",e.forceUpdate),()=>Te.off("languageChanged",e.forceUpdate))),[e.forceUpdate]);const t=(0,o.useRef)(null);if(t.current)throw t.current;if(!Te.hasLoadedNamespace(e.ns)){const n=setTimeout((()=>{console.warn(`openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['${e.ns}']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects.`)}),3e3);throw Te.loadNamespaces([e.ns]).then((()=>clearTimeout(n))).catch((e=>{clearTimeout(n),t.current=e}))}return o.createElement(o.Fragment,null,e.children)};function Ce(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");const t=Object.assign({},Pe,e);return function(e){var n,r,a,s;return r=n=class extends o.Component{constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}}}componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((()=>{throw e})),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return o.createElement("div",null,"An error has occurred. Please try reloading the page.");{const n=o.createElement(i.Provider,{value:this.state.config},o.createElement(o.Suspense,{fallback:null},t.disableTranslations?o.createElement(e,this.props):o.createElement(je,{ns:t.moduleName,forceUpdate:()=>this.forceUpdate()},o.createElement(ke,{i18n:Te,defaultNS:t.moduleName},o.createElement(e,this.props)))));return t.strictMode||!o.StrictMode?n:o.createElement(o.StrictMode,null,n)}}},a="displayName",s=`OpenmrsReactComponent(${t.featureName})`,a in r?Object.defineProperty(r,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[a]=s,n}}function Ne(e,t){return j({React:o,ReactDOM:w,rootComponent:Ce(t)(e)})}function Ae(e,t){return()=>e().then((e=>{let{default:n}=e;return Ne(n,t)}))}function Ie(e,t){return()=>Promise.resolve(Ne(e,t))}const Re=Ae;function $e(e){const[t,n]=(0,o.useState)([]);return(0,o.useEffect)((()=>(0,l.getExtensionStore)().subscribe((r=>{const o=r.slots[e]?.assignedExtensions.map((e=>e.id))??[];(0,d.isEqual)(o,t)||n(o)}))),[]),t}function De(e){(0,o.useEffect)((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}var Le=n(3202);const Me={};function Ue(e){const t=(0,o.useMemo)(a.getExtensionsConfigStore,[]),n=function(e,t){const[n,r]=(0,o.useState)(function(e,t){return t?()=>{const n=e.getState(),r=(0,a.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t));return(0,o.useEffect)((()=>{if(t)return e.subscribe((e=>{const o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&!(0,Le.Z)(o.config,n)&&r(o.config)}))}),[e,t,n]),n}(t,e);if(!n&&e){const n=`${e.extensionSlotName}-${e.extensionId}`;throw!Me[n]&&t&&(Me[n]=function(e,t){return new Promise((n=>{const r=e.subscribe((e=>{const o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),Me[n]}return n||{}}function Fe(){const{moduleName:e,extension:t}=(0,o.useContext)(i);if(!e&&!t)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');const n=function(e){const t=(0,o.useMemo)((()=>(0,a.getConfigStore)(e)),[e]),n=e,r=function(e){const[t,n]=(0,o.useState)(function(e){return()=>{const t=e.getState();return t.loaded&&t.config?t.config:null}}(e));return(0,o.useEffect)((()=>e?.subscribe((e=>{e.loaded&&e.config&&n(e.config)}))),[e]),t}(t);if(!r)throw Me[n]||(Me[n]=function(e){return new Promise((t=>{const n=e.subscribe((e=>{e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),Me[n];return r}(e),r=Ue(t);return(0,o.useMemo)((()=>({...n,...r})),[n,r])}var Be,ze=n(5426);!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(Be||(Be={}));const Ve={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function We(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Ke(e,t){switch(t.type){case Be.loadPatient:return{...e,patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null};case Be.newPatient:return{...e,patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null};case Be.loadError:return{...e,patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err};default:return e}}function He(e){const[t,n]=(0,o.useReducer)(Ke,{...Ve,patientUuid:e??null,isPendingUuid:!e,isLoadingPatient:!!e});return(0,o.useEffect)((()=>{if(t.isPendingUuid){const e=We();n(e?{type:Be.loadPatient,patientUuid:e}:{type:Be.newPatient,patient:null})}let e=!0;return t.isLoadingPatient&&t.patientUuid&&(0,ze.fetchCurrentPatient)(t.patientUuid).then((t=>e&&n({patient:t.data,type:Be.newPatient})),(t=>e&&n({err:t,type:Be.loadError}))),()=>{e=!1}}),[t.isPendingUuid,t.isLoadingPatient,t.patientUuid]),(0,o.useEffect)((()=>{const e=e=>{const r=We();r!=t.patientUuid&&n({type:Be.loadPatient,patientUuid:r})};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)}),[t.patientUuid]),{isLoading:t.isPendingUuid||t.isLoadingPatient,patient:t.patient,patientUuid:e??t.patientUuid,error:t.err}}var qe;!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(qe||(qe={}));const Ge={patient:null,isLoadingPatient:!0,err:null};function Ze(){const e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function Ye(e,t){switch(t.type){case qe.loadPatient:return{...e,patient:null,isLoadingPatient:!0,err:null};case qe.newPatient:return{...e,patient:t.patient,isLoadingPatient:!1,err:null};case qe.loadError:return{...e,patient:null,isLoadingPatient:!1,err:t.err};default:return e}}function Qe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ze();const[t,n]=(0,o.useReducer)(Ye,Ge);return(0,o.useEffect)((()=>{let t=!0;return e?((0,ze.fetchCurrentPatient)(e).then((e=>t&&n({patient:e.data,type:qe.newPatient})),(e=>t&&n({err:e,type:qe.loadError}))),n({type:qe.loadPatient})):n({type:qe.newPatient,patient:null}),()=>{t=!1}}),[e]),[t.isLoadingPatient,t.patient,e,t.err]}function Je(e){const t=v(e);return(0,o.useMemo)((()=>Object.fromEntries(t.map((e=>[e.name,e.meta])))),[t])}c((0,l.getExtensionInternalStore)());const Xe=c((0,l.getExtensionStore)());function et(){let e="tablet";return document.body.classList.forEach((t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e}function tt(){const[e,t]=(0,o.useState)(et);return(0,o.useEffect)((()=>{const e=()=>{t(et())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}function nt(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)((()=>{const e=(0,ze.getLocations)().subscribe((e=>{t(e)}),(e=>{console.error(e)}));return()=>e.unsubscribe()}),[]),e}function rt(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(t){const t=t=>{n?.current?.contains(t.target)||e(t)};return window.addEventListener("click",t),()=>window.removeEventListener("click",t)}}),[e,t]),n}const ot=e=>{let{privilege:t,children:n}=e;const[r,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const e=(0,ze.getCurrentUser)({includeAuthStatus:!1}).subscribe(i);return()=>e.unsubscribe()}),[]),r&&(0,ze.userHasAccess)(t,r)?o.createElement(o.Fragment,null,n):null};function it(){const[e,t]=(0,o.useState)(null);return(0,o.useEffect)((()=>{if(null===e){const e=(0,ze.openmrsObservableFetch)("/ws/rest/v1/session").subscribe((e=>{t(e.data)}));return()=>e.unsubscribe()}}),[e]),e}var at=n(8748);function st(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=e.action(t[r]);return n}const ut=e=>e;function ct(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ut,n=arguments.length>2?arguments[2]:void 0;const[r,i]=(0,o.useState)((()=>t(e.getState())));(0,o.useEffect)((()=>(0,at.subscribeTo)(e,t,i)),[e,t]);let a={};return n&&(a=(0,o.useMemo)((()=>st(e,n)),[e,n])),{...r,...a}}function lt(e,t){return ct(e,ut,t)}function ft(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function pt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var dt,ht=function(){},vt=ht(),gt=Object,yt=function(e){return e===vt},mt=function(e){return"function"==typeof e},bt=function(e,t){return gt.assign({},e,t)},wt="undefined",_t=function(){return typeof window!=wt},Et=new WeakMap,xt=0,St=function(e){var t,n,r=typeof e,o=e&&e.constructor,i=o==Date;if(gt(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Et.get(e))return t;if(t=++xt+"~",Et.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=St(e[n])+",";Et.set(e,t)}if(o==gt){t="#";for(var a=gt.keys(e).sort();!yt(n=a.pop());)yt(e[n])||(t+=n+":"+St(e[n])+",");Et.set(e,t)}}return t},Ot=!0,kt=_t(),Tt=typeof document!=wt,Pt=kt&&window.addEventListener?window.addEventListener.bind(window):ht,jt=Tt?document.addEventListener.bind(document):ht,Ct=kt&&window.removeEventListener?window.removeEventListener.bind(window):ht,Nt=Tt?document.removeEventListener.bind(document):ht,At={isOnline:function(){return Ot},isVisible:function(){var e=Tt&&document.visibilityState;return yt(e)||"hidden"!==e}},It={initFocus:function(e){return jt("visibilitychange",e),Pt("focus",e),function(){Nt("visibilitychange",e),Ct("focus",e)}},initReconnect:function(e){var t=function(){Ot=!0,e()},n=function(){Ot=!1};return Pt("online",t),Pt("offline",n),function(){Ct("online",t),Ct("offline",n)}}},Rt=!_t()||"Deno"in window,$t=Rt?o.useEffect:o.useLayoutEffect,Dt="undefined"!=typeof navigator&&navigator.connection,Lt=!Rt&&Dt&&(["slow-2g","2g"].includes(Dt.effectiveType)||Dt.saveData),Mt=function(e){if(mt(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?St(e):"",t,e?"$swr$"+e:""]},Ut=new WeakMap,Ft=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var s=Ut.get(e),u=s[0],c=s[1],l=s[3],f=u[t],p=c[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Bt=0,zt=function(){return++Bt},Vt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ft(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,l,f,p,d,h,v,g,y,m,b,w;return pt(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!yt((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,s=!1!==i.revalidate,u=!1!==i.rollbackOnError,c=i.optimisticData,l=Mt(n),f=l[0],p=l[2],!f)return[2];if(d=Ut.get(t),h=d[2],e.length<3)return[2,Ft(t,f,t.get(f),vt,vt,s,!0)];if(v=r,y=zt(),h[f]=[y,0],m=!yt(c),b=t.get(f),m&&(t.set(f,c),Ft(t,f,c)),mt(v))try{v=v(t.get(f))}catch(e){g=e}return v&&mt(v.then)?[4,v.catch((function(e){g=e}))]:[3,2];case 1:if(v=_.sent(),y!==h[f][0]){if(g)throw g;return[2,v]}g&&m&&u&&(a=!0,v=b,t.set(f,b)),_.label=2;case 2:return a&&(g||(mt(a)&&(v=a(v,b)),t.set(f,v)),t.set(p,bt(t.get(p),{error:g}))),h[f][1]=zt(),[4,Ft(t,f,v,g,vt,s,!!a)];case 3:if(w=_.sent(),g)throw g;return[2,a?w:v]}}))}))},Wt=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},Kt=function(e,t){if(!Ut.has(e)){var n=bt(It,t),r={},o=Vt.bind(vt,e),i=ht;if(Ut.set(e,[r,{},{},{},o]),!Rt){var a=n.initFocus(setTimeout.bind(vt,Wt.bind(vt,r,0))),s=n.initReconnect(setTimeout.bind(vt,Wt.bind(vt,r,1)));i=function(){a&&a(),s&&s(),Ut.delete(e)}}return[e,o,i]}return[e,Ut.get(e)[4]]},Ht=Kt(new Map),qt=Ht[0],Gt=Ht[1],Zt=bt({onLoadingSlow:ht,onSuccess:ht,onError:ht,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!yt(i)&&a>i||setTimeout(r,s,o)},onDiscarded:ht,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Lt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Lt?5e3:3e3,compare:function(e,t){return St(e)==St(t)},isPaused:function(){return!1},cache:qt,mutate:Gt,fallback:{}},At),Yt=function(e,t){var n=bt(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=bt(o,a))}return n},Qt=(0,o.createContext)({}),Jt=function(e){return mt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},Xt=function(){return bt(Zt,(0,o.useContext)(Qt))},en=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},tn={dedupe:!0},nn=(gt.defineProperty((function(e){var t=e.value,n=Yt((0,o.useContext)(Qt),t),r=t&&t.provider,i=(0,o.useState)((function(){return r?Kt(r(n.cache||qt),t):vt}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),$t((function(){return i?i[2]:vt}),[]),(0,o.createElement)(Qt.Provider,bt(e,{value:n}))}),"default",{value:Zt}),dt=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,s=n.suspense,u=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=Ut.get(r),d=p[0],h=p[1],v=p[2],g=p[3],y=Mt(e),m=y[0],b=y[1],w=y[2],_=(0,o.useRef)(!1),E=(0,o.useRef)(!1),x=(0,o.useRef)(m),S=(0,o.useRef)(t),O=(0,o.useRef)(n),k=function(){return O.current},T=function(){return k().isVisible()&&k().isOnline()},P=function(e){return r.set(w,bt(r.get(w),e))},j=r.get(m),C=yt(a)?n.fallback[m]:a,N=yt(j)?C:j,A=r.get(w)||{},I=A.error,R=!_.current,$=function(){return R&&!yt(u)?u:!k().isPaused()&&(s?!yt(N):yt(N)||n.revalidateIfStale)},D=!(!m||!t)&&(!!A.isValidating||R&&$()),L=function(e,t){var n=(0,o.useState)({})[1],r=(0,o.useRef)(e),i=(0,o.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,o.useCallback)((function(e){var o=!1,a=r.current;for(var s in e){var u=s;a[u]!==e[u]&&(a[u]=e[u],i.current[u]&&(o=!0))}o&&!t.current&&n({})}),[]);return $t((function(){r.current=e})),[r,i.current,a]}({data:N,error:I,isValidating:D},E),M=L[0],U=L[1],F=L[2],B=(0,o.useCallback)((function(e){return ft(void 0,void 0,void 0,(function(){var t,o,a,s,u,c,l,f,p,d,h,y,w;return pt(this,(function(O){switch(O.label){case 0:if(t=S.current,!m||!t||E.current||k().isPaused())return[2,!1];s=!0,u=e||{},c=!g[m]||!u.dedupe,l=function(){return!E.current&&m===x.current&&_.current},f=function(){var e=g[m];e&&e[1]===a&&delete g[m]},p={isValidating:!1},d=function(){P({isValidating:!1}),l()&&F(p)},P({isValidating:!0}),F({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),c&&(Ft(r,m,M.current.data,M.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){s&&l()&&k().onLoadingSlow(m,n)}),n.loadingTimeout),g[m]=[t.apply(void 0,b),zt()]),w=g[m],o=w[0],a=w[1],[4,o];case 2:return o=O.sent(),c&&setTimeout(f,n.dedupingInterval),g[m]&&g[m][1]===a?(P({error:vt}),p.error=vt,h=v[m],!yt(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),c&&l()&&k().onDiscarded(m),[2,!1]):(i(M.current.data,o)?p.data=M.current.data:p.data=o,i(r.get(m),o)||r.set(m,o),c&&l()&&k().onSuccess(o,m,n),[3,4])):(c&&l()&&k().onDiscarded(m),[2,!1]);case 3:return y=O.sent(),f(),k().isPaused()||(P({error:y}),p.error=y,c&&l()&&(k().onError(y,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||mt(n.shouldRetryOnError)&&n.shouldRetryOnError(y))&&T()&&k().onErrorRetry(y,m,n,B,{retryCount:(u.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return s=!1,d(),l()&&c&&Ft(r,m,p.data,p.error,!1),[2,!0]}}))}))}),[m]),z=(0,o.useCallback)(Vt.bind(vt,r,(function(){return x.current})),[]);if($t((function(){S.current=t,O.current=n})),$t((function(){if(m){var e=m!==x.current,t=B.bind(vt,tn),n=0,r=en(m,h,(function(e,t,n){F(bt({error:t,isValidating:n},i(M.current.data,e)?vt:{data:e}))})),o=en(m,d,(function(e){if(0==e){var r=Date.now();k().revalidateOnFocus&&r>n&&T()&&(n=r+k().focusThrottleInterval,t())}else if(1==e)k().revalidateOnReconnect&&T()&&t();else if(2==e)return B()}));return E.current=!1,x.current=m,_.current=!0,e&&F({data:N,error:I,isValidating:D}),$()&&(yt(N)||Rt?t():(a=t,_t()&&typeof window.requestAnimationFrame!=wt?window.requestAnimationFrame(a):setTimeout(a,1))),function(){E.current=!0,r(),o()}}var a}),[m,B]),$t((function(){var e;function t(){var t=mt(c)?c(N):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){M.current.error||!l&&!k().isVisible()||!f&&!k().isOnline()?t():B(tn).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[c,l,f,B]),(0,o.useDebugValue)(N),s&&yt(N)&&m)throw S.current=t,O.current=n,E.current=!1,yt(I)?B(tn):I;return{mutate:z,get data(){return U.data=!0,N},get error(){return U.error=!0,I},get isValidating(){return U.isValidating=!0,D}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Xt(),r=Jt(e),o=r[0],i=r[1],a=r[2],s=Yt(n,a),u=dt,c=s.use;if(c)for(var l=c.length;l-- >0;)u=c[l](u);return u(o,i||s.fetcher,s)}),rn=n(7530),on=n.n(rn),an=n(4332),sn=n.n(an);function un(e){const{data:t,error:n,mutate:r,isValidating:o}=nn(`/ws/rest/v1/visit?patient=${e}&v=${ze.defaultVisitCustomRepresentation}&includeInactive=false`,ze.openmrsFetch);return{error:n,mutate:r,isValidating:o,currentVisit:t?.data.results.find((e=>null===e.stopDatetime&&on()(e.startDatetime).isToday()))??null}}function cn(){const[e,t]=(0,o.useState)([]);return(0,o.useEffect)((()=>{const e=(0,ze.getVisitTypes)().subscribe((e=>{t(e)}),(e=>console.error(e)));return()=>e.unsubscribe()}),[]),e}function ln(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const[n,r]=(0,o.useState)(1),i=(0,o.useMemo)((()=>Math.max(1,Math.ceil(e.length/t))),[e.length,t]),a=(0,o.useMemo)((()=>{const r=(n-1)*t,o=(n+0)*t;return e.slice(r,o)}),[e,n,t]);return{results:a,totalPages:i,currentPage:n,paginated:e.length>t,showNextButton:n<i,showPreviousButton:n>1,goTo(e){r(Math.max(1,Math.min(i,e)))},goToNext(){n<i&&r(n+1)},goToPrevious(){n>1&&r(n-1)}}}on().extend(sn());const fn=e=>{let{state:t,wrap:n}=e;const[r,a]=(0,o.useState)(),{extension:s}=(0,o.useContext)(i),u=(0,o.useCallback)((e=>{a(e)}),[]);(0,o.useEffect)((()=>{if(null!=r&&s)return(0,l.renderExtension)(r,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,t)}),[s?.extensionSlotName,s?.extensionId,s?.extensionSlotModuleName,t,r]);const c=o.createElement("div",{ref:u,"data-extension-id":s?.extensionId,style:{position:"relative"}});return s&&n?n(c,s):c}},8748:()=>{System.register([],(function(e,t){return{execute:function(){e((()=>{var e={968:(e,t,n)=>{const r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(968).s)(1),(()=>{"use strict";function e(e,t){for(var n in t)e[n]=t[n];return e}function t(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,s=0;s<a.length;s++)a[s](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}}r.r(o),r.d(o,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>c});const n={};function i(e,r){const o=n[e];if(o)return o.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):o.value.setState(r,!0),o.active=!0,o.value;{const o=t(r);return n[e]={value:o,active:!0},o}}function a(e,r){const o=n[e];if(!o){const o=t(r);return n[e]={value:o,active:!1},o}return o.value}function s(e){return i("app",e)}function u(){return a("app",{})}function c(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})(),o})())}}}))},9850:(e,t,n)=>{"use strict";n.d(t,{aB:()=>r.AppState,jk:()=>s,W5:()=>c,zJ:()=>u,se:()=>l});var r={};function o(e,t){for(var n in t)e[n]=t[n];return e}function i(e){var t=[];function n(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function r(n,r,i){e=r?n:o(o({},e),n);for(var a=t,s=0;s<a.length;s++)a[s](e,i)}return e=e||{},{action:function(t){function n(e){r(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}n.r(r),n.d(r,{jk:()=>s,W5:()=>c,zJ:()=>u,se:()=>l});const a={};function s(e,t){const n=a[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=i(t);return a[e]={value:n,active:!0},n}}function u(e,t){const n=a[e];if(!n){const n=i(t);return a[e]={value:n,active:!1},n}return n.value}function c(){return u("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}},7202:(e,t,n)=>{"use strict";n.d(t,{iW:()=>r.InlineNotificationType,MK:()=>r.NotificationDescriptor,fU:()=>o.ToastDescriptor,yQ:()=>o.ToastNotificationMeta,pC:()=>o.ToastType,K4:()=>O,c0:()=>m,CF:()=>_});var r={};n.r(r);var o={};n.r(o),n(2735),n(2788);var i=n(2585),a=n(9295),s=n(606),u=n(175),c=n(6575),l=n(6905),f=n(7840),p=n(9494),d=n(8396),h=Object.prototype.hasOwnProperty;const v=function(e){if(null==e)return!0;if((0,l.Z)(e)&&((0,c.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,f.Z)(e)||(0,d.Z)(e)||(0,u.Z)(e)))return!e.length;var t=(0,s.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,p.Z)(e))return!(0,a.Z)(e).length;for(var n in e)if(h.call(e,n))return!1;return!0},g=new i.xQ;let y=0;function m(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!v(t))?setTimeout((()=>{g.next({...e,id:y++})}),0):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}const b=new i.xQ;let w=0;function _(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!v(t))?setTimeout((()=>{b.next({...e,id:w++})}),0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}n(2465);const E=(0,n(8748).createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]});function x(e){const t=E.getState(),n=[e,...t.modalStack];E.setState({...t,modalStack:n})}function S(e){const t=E.getState(),n=t.modalStack.map((t=>t===e?{...t,state:"TO_BE_DELETED"}:t));E.setState({...t,modalStack:n})}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const r=()=>{const e=E.getState().modalStack.find((e=>e.onClose===n));e&&S(e)};return x({state:"NEW",onClose:n,extensionId:e,props:{extensionId:e,close:r,...t}}),r}window.getComputedStyle(document.body).overflow},3315:()=>{System.register(["dayjs","i18next"],(function(e,t){var n={},r={};return{setters:[function(e){n.default=e.default},function(e){r.default=e.default}],execute:function(){e((()=>{var e={4332:function(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)}}}()},9014:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,i){var a=o.prototype;i.utc=function(e){return new o({date:e,utc:!0,args:arguments})},a.utc=function(t){var n=i(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var u=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(r,o){var i=this.$utils().u;if(i(r))return this.$u?0:i(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],i=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===i?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(o)return s.$offset=a,s.$u=0===r,s;if(0!==r){var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+u,e)).$offset=a,s.$x.$localOffset=u}else s=this.utc();return s};var l=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var f=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var p=a.diff;a.diff=function(e,t,n){if(e&&this.$u===e.$u)return p.call(this,e,t,n);var r=this.local(),o=i(e).local();return p.call(r,o,t,n)}}}()},5923:(e,t,n)=>{"use strict";const r=n(2138),o=Symbol("max"),i=Symbol("length"),a=Symbol("lengthCalculator"),s=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1,v=(e,t,n)=>{const r=e[p].get(t);if(r){const t=r.value;if(g(e,t)){if(m(e,r),!e[s])return}else n&&(e[d]&&(r.value.now=Date.now()),e[f].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[u]&&n>e[u]},y=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[c]&&e[c](n.key,n.value),e[i]-=n.length,e[p].delete(n.key),e[f].removeNode(t)}};class b{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const w=(e,t,n,r)=>{let o=n.value;g(e,o)&&(m(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[a]="function"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,y(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[f].forEach((e=>{e.length=this[a](e.value,e.key),this[i]+=e.length}))),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;null!==n;){const r=n.prev;w(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;null!==n;){const r=n.next;w(this,e,n,t),n=r}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[p]=new Map,this[f]=new r,this[i]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,n){if((n=n||this[u])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const r=n?Date.now():0,s=this[a](t,e);if(this[p].has(e)){if(s>this[o])return m(this,this[p].get(e)),!1;const a=this[p].get(e).value;return this[c]&&(this[l]||this[c](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),y(this),!0}const d=new b(e,t,s,r,n);return d.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=d.length,this[f].unshift(d),this[p].set(e,this[f].head),y(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[p].forEach(((e,t)=>v(this,t,!1)))}}},4074:(e,t,n)=>{const r=Symbol("SemVer ANY");class o{static get ANY(){return r}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===r?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===r||e===r)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new f(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new f(this.value,t).test(e.semver);const n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),r=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=u(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=u(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&a||s||c}}e.exports=o;const i=n(156),{re:a,t:s}=n(887),u=n(2401),c=n(3843),l=n(9405),f=n(4355)},4355:(e,t,n)=>{class r{constructor(e,t){if(t=i(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=o.get(t);if(n)return n;const r=this.options.loose,i=r?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(i,T(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),s("comparator trim",e,c[l.COMPARATORTRIM]),e=(e=(e=e.replace(c[l.TILDETRIM],p)).replace(c[l.CARETTRIM],d)).split(/\s+/).join(" ");const u=r?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],v=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>k(e,this.options))).filter(this.options.loose?e=>!!e.match(u):()=>!0).map((e=>new a(e,this.options))),g=(v.length,new Map);for(const e of v){if(h(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const m=[...g.values()];return o.set(t,m),m}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>g(n,t)&&e.set.some((e=>g(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const o=new(n(5923))({max:1e3}),i=n(156),a=n(4074),s=n(3843),u=n(9405),{re:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:d}=n(887),h=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},y=(e,t)=>(s("comp",e,t),e=_(e,t),s("caret",e),e=b(e,t),s("tildes",e),e=x(e,t),s("xrange",e),e=O(e,t),s("stars",e),e),m=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{const n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,((t,n,r,o,i)=>{let a;return s("tilde",e,t,n,r,o,i),m(n)?a="":m(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:m(o)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:i?(s("replaceTilde pr",i),a=`>=${n}.${r}.${o}-${i} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,s("tilde return",a),a}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{s("caret",e,t);const n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,i,a)=>{let u;return s("caret",e,t,n,o,i,a),m(n)?u="":m(o)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:m(i)?u="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(s("replaceCaret pr",a),u="0"===n?"0"===o?`>=${n}.${o}.${i}-${a} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i}-${a} <${+n+1}.0.0-0`):(s("no pr"),u="0"===n?"0"===o?`>=${n}.${o}.${i}${r} <${n}.${o}.${+i+1}-0`:`>=${n}.${o}.${i}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${i} <${+n+1}.0.0-0`),s("caret return",u),u}))},x=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,((n,r,o,i,a,u)=>{s("xRange",e,n,r,o,i,a,u);const c=m(o),l=c||m(i),f=l||m(a),p=f;return"="===r&&p&&(r=""),u=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(l&&(i=0),a=0,">"===r?(r=">=",l?(o=+o+1,i=0,a=0):(i=+i+1,a=0)):"<="===r&&(r="<",l?o=+o+1:i=+i+1),"<"===r&&(u="-0"),n=`${r+o}.${i}.${a}${u}`):l?n=`>=${o}.0.0${u} <${+o+1}.0.0-0`:f&&(n=`>=${o}.${i}.0${u} <${o}.${+i+1}.0-0`),s("xRange return",n),n}))},O=(e,t)=>(s("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=e=>(t,n,r,o,i,a,s,u,c,l,f,p,d)=>`${n=m(r)?"":m(o)?`>=${r}.0.0${e?"-0":""}`:m(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${u=m(c)?"":m(l)?`<${+c+1}.0.0-0`:m(f)?`<${c}.${+l+1}.0-0`:p?`<=${c}.${l}.${f}-${p}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(s(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},9405:(e,t,n)=>{const r=n(3843),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=n(8202),{re:a,t:s}=n(887),u=n(156),{compareIdentifiers:c}=n(1630);class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return c(n,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return c(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},953:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},2401:(e,t,n)=>{const r=n(8896),o=n(8378),i=n(9261),a=n(6647),s=n(3433),u=n(4622);e.exports=(e,t,n,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,c);case"!=":return o(e,n,c);case">":return i(e,n,c);case">=":return a(e,n,c);case"<":return s(e,n,c);case"<=":return u(e,n,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6839:(e,t,n)=>{const r=n(9405),o=n(5497),{re:i,t:a}=n(887);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=i[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),i[a.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[a.COERCERTL].lastIndex=-1}else n=e.match(i[a.COERCE]);return null===n?null:o(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)}},6218:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>{const o=new r(e,n),i=new r(t,n);return o.compare(i)||o.compareBuild(i)}},9643:(e,t,n)=>{const r=n(3308);e.exports=(e,t)=>r(e,t,!0)},3308:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},3948:(e,t,n)=>{const r=n(5497),o=n(8896);e.exports=(e,t)=>{if(o(e,t))return null;{const n=r(e),o=r(t),i=n.prerelease.length||o.prerelease.length,a=i?"pre":"",s=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==o[e])return a+e;return s}}},8896:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0===r(e,t,n)},9261:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>0},6647:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)>=0},5791:(e,t,n)=>{const r=n(9405);e.exports=(e,t,n,o)=>{"string"==typeof n&&(o=n,n=void 0);try{return new r(e,n).inc(t,o).version}catch(e){return null}}},3433:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<0},4622:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(e,t,n)<=0},629:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).major},9986:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).minor},8378:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>0!==r(e,t,n)},5497:(e,t,n)=>{const{MAX_LENGTH:r}=n(8202),{re:o,t:i}=n(887),a=n(9405),s=n(156);e.exports=(e,t)=>{if(t=s(t),e instanceof a)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?o[i.LOOSE]:o[i.FULL]).test(e))return null;try{return new a(e,t)}catch(e){return null}}},9800:(e,t,n)=>{const r=n(9405);e.exports=(e,t)=>new r(e,t).patch},4408:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},762:(e,t,n)=>{const r=n(3308);e.exports=(e,t,n)=>r(t,e,n)},2743:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5312:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},2354:(e,t,n)=>{const r=n(6218);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},4512:(e,t,n)=>{const r=n(5497);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},4770:(e,t,n)=>{const r=n(887);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(8202).SEMVER_SPEC_VERSION,SemVer:n(9405),compareIdentifiers:n(1630).compareIdentifiers,rcompareIdentifiers:n(1630).rcompareIdentifiers,parse:n(5497),valid:n(4512),clean:n(953),inc:n(5791),diff:n(3948),major:n(629),minor:n(9986),patch:n(9800),prerelease:n(4408),compare:n(3308),rcompare:n(762),compareLoose:n(9643),compareBuild:n(6218),sort:n(2354),rsort:n(2743),gt:n(9261),lt:n(3433),eq:n(8896),neq:n(8378),gte:n(6647),lte:n(4622),cmp:n(2401),coerce:n(6839),Comparator:n(4074),Range:n(4355),satisfies:n(5312),toComparators:n(9663),maxSatisfying:n(4931),minSatisfying:n(5891),minVersion:n(4925),validRange:n(9965),outside:n(3260),gtr:n(715),ltr:n(6),intersects:n(9560),simplifyRange:n(7795),subset:n(7732)}},8202:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},3843:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error("SEMVER",...t)}:()=>{};e.exports=t},1630:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),o=t.test(n);return r&&o&&(e=+e,n=+n),e===n?0:r&&!o?-1:o&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},156:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},887:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r}=n(8202),o=n(3843),i=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let u=0;const c=(e,t,n)=>{const r=u++;o(r,t),s[e]=r,a[r]=t,i[r]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),c("FULL",`^${a[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),c("LOOSE",`^${a[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),c("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),c("COERCERTL",a[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},715:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,">",n)},9560:(e,t,n)=>{const r=n(4355);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t))},6:(e,t,n)=>{const r=n(3260);e.exports=(e,t,n)=>r(e,t,"<",n)},4931:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&-1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},5891:(e,t,n)=>{const r=n(9405),o=n(4355);e.exports=(e,t,n)=>{let i=null,a=null,s=null;try{s=new o(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(i&&1!==a.compare(e)||(i=e,a=new r(i,n)))})),i}},4925:(e,t,n)=>{const r=n(9405),o=n(4355),i=n(9261);e.exports=(e,t)=>{e=new o(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!i(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||n&&!i(n,a)||(n=a)}return n&&e.test(n)?n:null}},3260:(e,t,n)=>{const r=n(9405),o=n(4074),{ANY:i}=o,a=n(4355),s=n(5312),u=n(9261),c=n(3433),l=n(4622),f=n(6647);e.exports=(e,t,n,p)=>{let d,h,v,g,y;switch(e=new r(e,p),t=new a(t,p),n){case">":d=u,h=l,v=c,g=">",y=">=";break;case"<":d=c,h=f,v=u,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,p))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let a=null,s=null;if(r.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),a=a||e,s=s||e,d(e.semver,a.semver,p)?a=e:v(e.semver,s.semver,p)&&(s=e)})),a.operator===g||a.operator===y)return!1;if((!s.operator||s.operator===g)&&h(e,s.semver))return!1;if(s.operator===y&&v(e,s.semver))return!1}return!0}},7795:(e,t,n)=>{const r=n(5312),o=n(3308);e.exports=(e,t,n)=>{const i=[];let a=null,s=null;const u=e.sort(((e,t)=>o(e,t,n)));for(const e of u)r(e,t,n)?(s=e,a||(a=e)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);const c=[];for(const[e,t]of i)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7732:(e,t,n)=>{const r=n(4355),o=n(4074),{ANY:i}=o,a=n(5312),s=n(3308),u=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=n.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===i){if(n.includePrerelease)return!0;t=[new o(">=0.0.0")]}const r=new Set;let u,f,p,d,h,v,g;for(const t of e)">"===t.operator||">="===t.operator?u=c(u,t,n):"<"===t.operator||"<="===t.operator?f=l(f,t,n):r.add(t.semver);if(r.size>1)return null;if(u&&f){if(p=s(u.semver,f.semver,n),p>0)return null;if(0===p&&(">="!==u.operator||"<="!==f.operator))return null}for(const e of r){if(u&&!a(e,String(u),n))return null;if(f&&!a(e,String(f),n))return null;for(const r of t)if(!a(e,String(r),n))return!1;return!0}let y=!(!f||n.includePrerelease||!f.semver.prerelease.length)&&f.semver,m=!(!u||n.includePrerelease||!u.semver.prerelease.length)&&u.semver;y&&1===y.prerelease.length&&"<"===f.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(g=g||">"===e.operator||">="===e.operator,v=v||"<"===e.operator||"<="===e.operator,u)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(d=c(u,e,n),d===e&&d!==u)return!1}else if(">="===u.operator&&!a(u.semver,String(e),n))return!1;if(f)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(h=l(f,e,n),h===e&&h!==f)return!1}else if("<="===f.operator&&!a(f.semver,String(e),n))return!1;if(!e.operator&&(f||u)&&0!==p)return!1}return!(u&&v&&!f&&0!==p||f&&g&&!u&&0!==p||m||y)},c=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},l=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return!0;e=new r(e,n),t=new r(t,n);let o=!1;e:for(const r of e.set){for(const e of t.set){const t=u(r,e,n);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},9663:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},9965:(e,t,n)=>{const r=n(4355);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},9961:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},2138:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function i(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,o=this.head;null!==o;)n.push(e.call(t,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,o=this.tail;null!==o;)n.push(e.call(t,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n<e;n++)r=r.next;var o,i,s,u,c=[];for(n=0;r&&n<t;n++)c.push(r.value),r=this.removeNode(r);for(null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev),n=0;n<(arguments.length<=2?0:arguments.length-2);n++)s=n+2<2||arguments.length<=n+2?void 0:arguments[n+2],u=void 0,null===(u=(i=r)===(o=this).head?new a(s,null,i,o):new a(s,i,i.next,o)).next&&(o.tail=u),null===u.prev&&(o.head=u),o.length++,r=u;return c},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(9961)(r)}catch(e){}},9688:e=>{"use strict";e.exports=n},7064:e=>{"use strict";e.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}i.y=t,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})();var a={};return(0,i(7968).s)(1),(()=>{"use strict";function e(e){return(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0,0))/24/60/60/1e3}function t(e,t){const n=e.toISOString(),r=t.toISOString();return n.slice(0,n.indexOf("T"))===r.slice(0,r.indexOf("T"))}function n(n){const r=new Date,o=new Date(n),i=r.getUTCMonth()-o.getUTCMonth(),a=r.getUTCDate()-o.getUTCDate();let s=r.getUTCFullYear()-o.getUTCFullYear();(i<0||0===i&&a<0)&&s--;let u=i>=0?i:i+12;a<0&&u--;const c=u>0?`${u} mo`:"";let l=e(r)-e(o);l<0&&(l+=365);const f=Math.floor(l/7),p=l-7*f;return 0===s?t(r,o)?"Today":f<4||0===f?`${l} day`:p>0?`${f} wk ${p} d`:`${f} week`:s<2?`${c} ${s} yr`.trim():s<18?`${s} yr ${c}`.trim():`${s} years`}i.r(a),i.d(a,{age:()=>n,daysIntoYear:()=>e,formatDate:()=>E,formatDatetime:()=>S,formatTime:()=>x,isOmrsDateStrict:()=>f,isOmrsDateToday:()=>p,isSameDay:()=>t,isVersionSatisfied:()=>C,parseDate:()=>w,retry:()=>N,toDateObjectStrict:()=>d,toOmrsDateFormat:()=>b,toOmrsDayDateFormat:()=>y,toOmrsIsoString:()=>h,toOmrsTimeString:()=>g,toOmrsTimeString24:()=>v,toOmrsYearlessDateFormat:()=>m,translateFrom:()=>T});var r=i(9688),o=i(9014),s=i.n(o),u=i(4332),c=i.n(u);r.default.extend(s()),r.default.extend(c());const l="YYYY-MM-DDTHH:mm:ss.SSSZZ";function f(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&"+"===e[23]&&":"!==e[26]&&(0,r.default)(e,l).isValid()}function p(e){return(0,r.default)(e).isToday()}function d(e){return f(e)?(0,r.default)(e,l).toDate():null}function h(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,r.default)(e);return t&&(n=n.utc()),n.format(l)}function v(e){return(0,r.default)(e).format("HH:mm")}function g(e){return r.default.utc(e).format("HH:mm A")}function y(e){return b(e,"DD - MMM - YYYY")}function m(e){return b(e,"DD-MMM")}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MMM-DD";return(0,r.default)(e).format(t)}function w(e){return(0,r.default)(e).toDate()}const _={mode:"standard",time:"for today",day:!0,year:!0};function E(e,t){const{mode:n,time:o,day:i,year:a}={..._,...t},s={year:a?"numeric":void 0,month:"short",day:i?"2-digit":void 0};let u,c=O();const l=(0,r.default)(e).isToday();if(l)u=new Intl.RelativeTimeFormat(c,{numeric:"auto"}).format(0,"day"),u=u[0].toLocaleUpperCase(c)+u.slice(1);else if("en"==c&&(c="en-GB"),u=e.toLocaleDateString(c,s),"en-GB"==c&&"standard"==n&&a&&i&&(u=u.replace(/ /g,"-")),"wide"==n&&(u=u.replace(/ /g," — "),/ru.*/.test(c))){const e=u.length;u=u.slice(0,e-5)+u.slice(e-5).replace(" — "," ")}return(!0===o||l&&"for today"===o)&&(u+=`, ${x(e)}`),u}function x(e){return e.toLocaleTimeString(O(),{hour:"2-digit",minute:"2-digit"})}function S(e,t){return E(e,{...t,time:!0})}function O(){let e=window.i18next.language;return e=e.replace("_","-"),"ht"===e&&(e="fr-HT"),e}var k=i(7064);function T(e,t,n,r){return(k.default.default||k.default).t(t,{ns:e,defaultValue:n,...r})}var P=i(4770);function j(e){const[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function C(e,t){const n=function(e){const t=e.indexOf("-");return t>=0?`${j(e.slice(0,t))}-${e.slice(t+1)}`:j(e)}(t);return P.satisfies(n,e,{includePrerelease:!0})}async function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{shouldRetry:n,getDelay:r,onError:o}=t;n=n??(e=>A(e,5)),r=r??(e=>I(e,1e3));let i,a=0;do{try{return await R(r(a)),await e()}catch(e){o?.(e,a),i=e}}while(n(a++));throw i}function A(e,t){return e<=t}function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=n?e+1:e;return t*Math.pow(2,r)}async function R(e){if(!(e<=0))return new Promise((t=>setTimeout(t,e)))}})(),a})())}}}))},7530:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",s="week",u="month",c="quarter",l="year",f="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),i=n-o<0,a=t.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:l,w:s,d:a,D:f,h:i,m:o,s:r,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},m="en",b={};b[m]=v;var w=function(e){return e instanceof S},_=function e(t,n,r){var o;if(!t)return m;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!r&&o&&(m=o),o||!r&&m},E=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},x=y;x.l=_,x.i=w,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function v(e){this.$L=_(e.locale,null,!0),this.parse(e)}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return x},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=E(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return E(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<E(e)},g.$g=function(e,t,n){return x.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,c=!!x.u(t)||t,p=x.p(e),d=function(e,t){var r=x.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?r:r.endOf(a)},h=function(e,t){return x.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,g=this.$M,y=this.$D,m="set"+(this.$u?"UTC":"");switch(p){case l:return c?d(1,0):d(31,11);case u:return c?d(1,g):d(0,g+1);case s:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return d(c?y-w:y+(6-w),g);case a:case f:return h(m+"Hours",0);case i:return h(m+"Minutes",1);case o:return h(m+"Seconds",2);case r:return h(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,c=x.p(e),p="set"+(this.$u?"UTC":""),d=(s={},s[a]=p+"Date",s[f]=p+"Date",s[u]=p+"Month",s[l]=p+"FullYear",s[i]=p+"Hours",s[o]=p+"Minutes",s[r]=p+"Seconds",s[n]=p+"Milliseconds",s)[c],h=c===a?this.$D+(t-this.$W):t;if(c===u||c===l){var v=this.clone().set(f,1);v.$d[d](h),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[x.p(e)]()},g.add=function(n,c){var f,p=this;n=Number(n);var d=x.p(c),h=function(e){var t=E(p);return x.w(t.date(t.date()+Math.round(e*n)),p)};if(d===u)return this.set(u,this.$M+n);if(d===l)return this.set(l,this.$y+n);if(d===a)return h(1);if(d===s)return h(7);var v=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[d]||1,g=this.$d.getTime()+n*v;return x.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].substr(0,i)},f=function(e){return x.s(i%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:x.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:x.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,a,!0),A:d(i,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:o};return r.replace(h,(function(e,t){return t||v[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,f,p){var d,h=x.p(f),v=E(n),g=(v.utcOffset()-this.utcOffset())*e,y=this-v,m=x.m(this,v);return m=(d={},d[l]=m/12,d[u]=m,d[c]=m/3,d[s]=(y-g)/6048e5,d[a]=(y-g)/864e5,d[i]=y/t,d[o]=y/e,d[r]=y/1e3,d)[h]||y,p?m:x.a(m)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return b[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=_(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return x.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),O=S.prototype;return E.prototype=O,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",u],["$y",l],["$D",f]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,S,E),e.$i=!0),E},E.locale=_,E.isDayjs=w,E.unix=function(e){return E(1e3*e)},E.en=b[m],E.Ls=b,E.p={},E}()},4332:function(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)}}}()},4525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],s=[];for(i=0;i<a.length;i++)s.push(a[i].resource);o(s);var u=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){u.resolve()}))}),(function(e){u.resolve()})),u.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var s=e.data;s.entry&&s.entry.forEach((function(e){var o=e.resource,u=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(u===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(s,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},1256:function(e,t,n){(function(){n(5454);var t=n(4801),r=n(7921),o=n(8294),i=n(8821),a=n(442),s=n(856),u=n(7719),c=n(3029),l=n(2723),f=n(4249),p=n(4525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,v=function(e){return h("method",e)},g=function(e,t){return h("headers."+e,t)},y=d(a),m=d(s(e,n)).and(y).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(g("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(g("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(v("GET")),w=m.and(v("POST")),_=m.and(v("PUT")),E=m.and(v("DELETE")),x=m.and(v("PATCH")),S=i.Http(e,n),O=f.Path,k=O(e.baseUrl),T=k.slash(":type || :resource.resourceType"),P=T.slash("_history"),j=T.slash(":id || :resource.id"),C=j.slash("_history"),N=j.slash(":versionId || :resource.meta.versionId"),A=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),I=g("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(S),document:w.and(k.slash("Document")).end(S),profile:b.and(k.slash("Profile").slash(":type")).end(S),transaction:w.and(k).end(S),history:b.and(k.slash("_history")).and(R).end(S),typeHistory:b.and(P).and(R).end(S),resourceHistory:b.and(C).and(R).end(S),read:b.and(c.$WithPatient).and(j).end(S),vread:b.and(N).end(S),delete:E.and(j).and(I).end(S),create:w.and(T).and(I).end(S),validate:w.and(T.slash("_validate")).end(S),meta:{add:w.and(A.slash("$meta-add")).end(S),delete:w.and(A.slash("$meta-delete")).end(S),read:b.and(A.slash("$meta")).end(S)},search:b.and(T).and(c.$WithPatient).and(r.$SearchParams).and(R).end(S),update:_.and(j).and(I).end(S),conditionalUpdate:_.and(T).and(r.$SearchParams).and(I).end(S),conditionalDelete:E.and(T).and(r.$SearchParams).and(I).end(S),nextPage:b.and(u.$$BundleLinkUrl("next")).end(S),prevPage:b.and(u.$$BundleLinkUrl("previous")).and(u.$$BundleLinkUrl("prev")).end(S),getBundleByUrl:b.and(O(":url")).end(S),resolve:b.and(l.resolve).end(S),patch:x.and(j).and(g("Content-Type","application/json-patch+json")).end(S)},n)}}).call(this)},8294:function(e,t,n){(function(){var e,r=n(4801),o=n(9672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},7719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},4801:function(e,t,n){(function(){var e=n(5454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},8821:function(e,t,n){(function(){var e=n(5454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},3029:function(e,t,n){(function(){var e=n(4801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},2723:function(e,t,n){(function(){var t=n(5454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var s=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===s}))[0]||(null!=n?n[s]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,s=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return s.resolve(i),s.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},7921:function(e,t,n){(function(){var e=n(5454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,s={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},u={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(s[a]&&(l.operator=s[a]),u[a]&&(l.modifier=u[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,s,u;for(u=[],o=0,i=(s=l(e)).length;o<i;o++)t=s[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,u.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return u}().join("&")};t._query=l,t.query=f;var p=n(4801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},4249:function(e,t,n){(function(){n(5454);var e=n(4801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},5454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var s=function(){return Array.prototype.slice.call(arguments)};t.argsArray=s,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},s.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var u=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=u;var c=function(e,t,n){return t?u(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},2891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],v="[object Arguments]",g="[object Array]",y="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",E="[object Map]",x="[object Number]",S="[object Object]",O="[object Promise]",k="[object RegExp]",T="[object Set]",P="[object String]",j="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",$="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",M="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,q=RegExp(K.source),G=RegExp(H.source),Z=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="["+Se+"]",ke="["+_e+"]",Te="\\d+",Pe="["+Ee+"]",je="[^\\ud800-\\udfff"+Se+Te+"\\u2700-\\u27bf"+Ee+xe+"]",Ce="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Ae="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+xe+"]",$e="(?:"+Pe+"|"+je+")",De="(?:"+Re+"|"+je+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+ke+"|"+Ce+")?",Fe="[\\ufe0e\\ufe0f]?",Be=Fe+Ue+"(?:\\u200d(?:"+[Ne,Ae,Ie].join("|")+")"+Fe+Ue+")*",ze="(?:"+["[\\u2700-\\u27bf]",Ae,Ie].join("|")+")"+Be,Ve="(?:"+[Ne+ke+"?",ke,Ae,Ie,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ke=RegExp(ke,"g"),He=RegExp(Ce+"(?="+Ce+")|"+Ve+Be,"g"),qe=RegExp([Re+"?"+Pe+"+"+Le+"(?="+[Oe,Re,"$"].join("|")+")",De+"+"+Me+"(?="+[Oe,Re+$e,"$"].join("|")+")",Re+"?"+$e+"+"+Le,Re+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,ze].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+_e+"\\ufe0e\\ufe0f]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qe=-1,Je={};Je[I]=Je[R]=Je[$]=Je[D]=Je[L]=Je[M]=Je[U]=Je[F]=Je[B]=!0,Je[v]=Je[g]=Je[N]=Je[y]=Je[A]=Je[m]=Je[b]=Je[w]=Je[E]=Je[x]=Je[S]=Je[k]=Je[T]=Je[P]=Je[C]=!1;var Xe={};Xe[v]=Xe[g]=Xe[N]=Xe[A]=Xe[y]=Xe[m]=Xe[I]=Xe[R]=Xe[$]=Xe[D]=Xe[L]=Xe[E]=Xe[x]=Xe[S]=Xe[k]=Xe[T]=Xe[P]=Xe[j]=Xe[M]=Xe[U]=Xe[F]=Xe[B]=!0,Xe[b]=Xe[w]=Xe[C]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,st=at&&e&&!e.nodeType&&e,ut=st&&st.exports===at,ct=ut&&rt.process,lt=function(){try{return st&&st.require&&st.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&<.isArrayBuffer,pt=lt&<.isDate,dt=lt&<.isMap,ht=lt&<.isRegExp,vt=lt&<.isSet,gt=lt&<.isTypedArray;function yt(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)}function mt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&It(e,t,0)>-1}function St(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ot(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function kt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Tt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Pt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ct=Lt("length");function Nt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function At(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function It(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):At(e,$t,n)}function Rt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function $t(e){return e!=e}function Dt(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:p}function Lt(e){return function(t){return null==t?o:t[e]}}function Mt(e){return function(t){return null==e?o:e[t]}}function Ut(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ft(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Bt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,sn(e)+1).replace(re,""):e}function Vt(e){return function(t){return e(t)}}function Wt(e,t){return Ot(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function Ht(e,t){for(var n=-1,r=e.length;++n<r&&It(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&It(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Zt=Mt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Yt=Mt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Qt(e){return"\\"+et[e]}function Jt(e){return Ge.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Jt(e)?function(e){for(var t=He.lastIndex=0;He.test(e);)++t;return t}(e):Ct(e)}function an(e){return Jt(e)?function(e){return e.match(He)||[]}(e):function(e){return e.split("")}(e)}function sn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var un=Mt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cn=function e(t){var n,r=(t=null==t?it:cn.defaults(it.Object(),t,cn.pick(it,Ye))).Array,oe=t.Date,_e=t.Error,Ee=t.Function,xe=t.Math,Se=t.Object,Oe=t.RegExp,ke=t.String,Te=t.TypeError,Pe=r.prototype,je=Ee.prototype,Ce=Se.prototype,Ne=t["__core-js_shared__"],Ae=je.toString,Ie=Ce.hasOwnProperty,Re=0,$e=(n=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=Ce.toString,Le=Ae.call(Se),Me=it._,Ue=Oe("^"+Ae.call(Ie).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ut?t.Buffer:o,Be=t.Symbol,ze=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:o,He=en(Se.getPrototypeOf,Se),Ge=Se.create,et=Ce.propertyIsEnumerable,rt=Pe.splice,ot=Be?Be.isConcatSpreadable:o,at=Be?Be.iterator:o,st=Be?Be.toStringTag:o,ct=function(){try{var e=li(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,Ct=oe&&oe.now!==it.Date.now&&oe.now,Mt=t.setTimeout!==it.setTimeout&&t.setTimeout,ln=xe.ceil,fn=xe.floor,pn=Se.getOwnPropertySymbols,dn=Fe?Fe.isBuffer:o,hn=t.isFinite,vn=Pe.join,gn=en(Se.keys,Se),yn=xe.max,mn=xe.min,bn=oe.now,wn=t.parseInt,_n=xe.random,En=Pe.reverse,xn=li(t,"DataView"),Sn=li(t,"Map"),On=li(t,"Promise"),kn=li(t,"Set"),Tn=li(t,"WeakMap"),Pn=li(Se,"create"),jn=Tn&&new Tn,Cn={},Nn=Ui(xn),An=Ui(Sn),In=Ui(On),Rn=Ui(kn),$n=Ui(Tn),Dn=Be?Be.prototype:o,Ln=Dn?Dn.valueOf:o,Mn=Dn?Dn.toString:o;function Un(e){if(ns(e)&&!Ka(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Ie.call(e,"__wrapped__"))return Fi(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(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])}}function Kn(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])}}function Hn(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])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Gn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Zn(e,t){var n=Ka(e),r=!n&&Wa(e),o=!n&&!r&&Za(e),i=!n&&!r&&!o&&ls(e),a=n||r||o||i,s=a?Bt(e.length,ke):[],u=s.length;for(var c in e)!t&&!Ie.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,u))||s.push(c);return s}function Yn(e){var t=e.length;return t?e[Hr(0,t-1)]:o}function Qn(e,t){return Ri(Po(e),ar(t,0,e.length))}function Jn(e){return Ri(Po(e))}function Xn(e,t,n){(n!==o&&!Ba(e[t],n)||n===o&&!(t in e))&&or(e,t,n)}function er(e,t,n){var r=e[t];Ie.call(e,t)&&Ba(r,n)&&(n!==o||t in e)||or(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&jo(t,As(t),e)}function or(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:Ts(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function sr(e,t,n,r,i,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ts(e))return e;var f=Ka(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return Po(e,s)}else{var p=di(e),d=p==w||p==_;if(Za(e))return Eo(e,u);if(p==S||p==v||d&&!i){if(s=c||d?{}:vi(e),!u)return c?function(e,t){return jo(e,pi(e),t)}(e,function(e,t){return e&&jo(t,Is(t),e)}(s,e)):function(e,t){return jo(e,fi(e),t)}(e,rr(s,e))}else{if(!Xe[p])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case N:return xo(e);case y:case m:return new o(+e);case A:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case I:case R:case $:case D:case L:case M:case U:case F:case B:return So(e,n);case E:return new o;case x:case P:return new o(e);case k:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new o;case j:return r=e,Ln?Se(Ln.call(r)):{}}}(e,p,u)}}a||(a=new Gn);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach((function(r){s.add(sr(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,sr(r,t,n,o,e,a))}));var g=f?o:(l?c?ri:ni:c?Is:As)(e);return bt(g||e,(function(r,o){g&&(r=e[o=r]),er(s,o,sr(r,t,n,o,e,a))})),s}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Se(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new Te(i);return Ci((function(){e.apply(o,n)}),t)}function lr(e,t,n,r){var o=-1,i=xt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Ot(t,Vt(n))),r?(i=St,a=!1):t.length>=200&&(i=Kt,a=!1,t=new qn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}Un.templateSettings={escape:Z,evaluate:Y,interpolate:Q,variable:"",imports:{_:Un}},Un.prototype=Bn.prototype,Un.prototype.constructor=Un,zn.prototype=Fn(Bn.prototype),zn.prototype.constructor=zn,Vn.prototype=Fn(Bn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Pn){var n=t[e];return n===a?o:n}return Ie.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==o:Ie.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===o?a:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?o:t[n][1]},Kn.prototype.has=function(e){return tr(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Sn||Kn),string:new Wn}},Hn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ui(this,e).get(e)},Hn.prototype.has=function(e){return ui(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,a),this},qn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gn.prototype.get=function(e){return this.__data__.get(e)},Gn.prototype.has=function(e){return this.__data__.has(e)},Gn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var fr=Ao(br),pr=Ao(wr,!0);function dr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(u===o?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function vr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?gr(s,t-1,n,r,o):kt(o,s):r||(o[o.length]=s)}return o}var yr=Io(),mr=Io(!0);function br(e,t){return e&&yr(e,t,As)}function wr(e,t){return e&&mr(e,t,As)}function _r(e,t){return Et(t,(function(t){return Ja(e[t])}))}function Er(e,t){for(var n=0,r=(t=mo(t,e)).length;null!=e&&n<r;)e=e[Mi(t[n++])];return n&&n==r?e:o}function xr(e,t,n){var r=t(e);return Ka(e)?r:kt(r,n(e))}function Sr(e){return null==e?e===o?"[object Undefined]":"[object Null]":st&&st in Se(e)?function(e){var t=Ie.call(e,st),n=e[st];try{e[st]=o;var r=!0}catch(e){}var i=De.call(e);return r&&(t?e[st]=n:delete e[st]),i}(e):function(e){return De.call(e)}(e)}function Or(e,t){return e>t}function kr(e,t){return null!=e&&Ie.call(e,t)}function Tr(e,t){return null!=e&&t in Se(e)}function Pr(e,t,n){for(var i=n?St:xt,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Ot(p,Vt(t))),l=mn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new qn(u&&p):o}p=e[0];var d=-1,h=c[0];e:for(;++d<a&&f.length<l;){var v=p[d],g=t?t(v):v;if(v=n||0!==v?v:0,!(h?Kt(h,g):i(f,g,n))){for(u=s;--u;){var y=c[u];if(!(y?Kt(y,g):i(e[u],g,n)))continue e}h&&h.push(g),f.push(v)}}return f}function jr(e,t,n){var r=null==(e=ki(e,t=mo(t,e)))?e:e[Mi(Qi(t))];return null==r?o:yt(r,e,n)}function Cr(e){return ns(e)&&Sr(e)==v}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!ns(e)&&!ns(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=Ka(e),u=Ka(t),c=s?g:di(e),l=u?g:di(t),f=(c=c==v?S:c)==S,p=(l=l==v?S:l)==S,d=c==l;if(d&&Za(e)){if(!Za(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Gn),s||ls(e)?ei(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case y:case m:case x:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case k:case P:return e==t+"";case E:var s=Xt;case T:var u=1&r;if(s||(s=nn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ei(s(e),s(t),r,o,i,a);return a.delete(e),l;case j:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=f&&Ie.call(e,"__wrapped__"),w=p&&Ie.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,O=w?t.value():t;return a||(a=new Gn),i(_,O,n,r,a)}}return!!d&&(a||(a=new Gn),function(e,t,n,r,i,a){var s=1&n,u=ni(e),c=u.length;if(c!=ni(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Ie.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=s;++l<c;){var g=e[f=u[l]],y=t[f];if(r)var m=s?r(y,g,f,t,e,a):r(g,y,f,e,t,a);if(!(m===o?g===y||i(g,y,n,r,a):m)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Nr,i))}function Ar(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Se(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=n[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in e))return!1}else{var p=new Gn;if(r)var d=r(l,f,c,e,t,p);if(!(d===o?Nr(f,l,3,r,p):d))return!1}}return!0}function Ir(e){return!(!ts(e)||(t=e,$e&&$e in t))&&(Ja(e)?Ue:ve).test(Ui(e));var t}function Rr(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?Ka(e)?Ur(e[0],e[1]):Mr(e):du(e)}function $r(e){if(!Ei(e))return gn(e);var t=[];for(var n in Se(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function Lr(e,t){var n=-1,o=qa(e)?r(e.length):[];return fr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Mr(e){var t=ci(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function Ur(e,t){return bi(e)&&xi(t)?Si(Mi(e),t):function(n){var r=Ts(n,e);return r===o&&r===t?Ps(n,e):Nr(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&yr(t,(function(a,s){if(i||(i=new Gn),ts(a))!function(e,t,n,r,i,a,s){var u=Pi(e,n),c=Pi(t,n),l=s.get(c);if(l)Xn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):o,p=f===o;if(p){var d=Ka(c),h=!d&&Za(c),v=!d&&!h&&ls(c);f=c,d||h||v?Ka(u)?f=u:Ga(u)?f=Po(u):h?(p=!1,f=Eo(c,!0)):v?(p=!1,f=So(c,!0)):f=[]:is(c)||Wa(c)?(f=u,Wa(u)?f=ms(u):ts(u)&&!Ja(u)||(f=vi(c))):p=!1}p&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Xn(e,n,f)}}(e,t,s,n,Fr,r,i);else{var u=r?r(Pi(e,s),a,s+"",e,t,i):o;u===o&&(u=a),Xn(e,s,u)}}),Is)}function Br(e,t){var n=e.length;if(n)return yi(t+=t<0?n:0,n)?e[t]:o}function zr(e,t,n){t=t.length?Ot(t,(function(e){return Ka(e)?function(t){return Er(t,1===e.length?e[0]:e)}:e})):[ou];var r=-1;t=Ot(t,Vt(si()));var o=Lr(e,(function(e,n,o){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=Oo(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=Er(e,a);n(s,a)&&Qr(i,mo(a,e),s)}return i}function Wr(e,t,n,r){var o=r?Rt:It,i=-1,a=t.length,s=e;for(e===t&&(t=Po(t)),n&&(s=Ot(e,Vt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&rt.call(s,u,1),rt.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;yi(o)?rt.call(e,o,1):co(e,o)}}return e}function Hr(e,t){return e+fn(_n()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Gr(e,t){return Ni(Oi(e,t,ou),e+"")}function Zr(e){return Yn(Bs(e))}function Yr(e,t){var n=Bs(e);return Ri(n,ar(t,0,n.length))}function Qr(e,t,n,r){if(!ts(e))return e;for(var i=-1,a=(t=mo(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var c=Mi(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=ts(f)?f:yi(t[i+1])?[]:{})}er(u,c,l),u=u[c]}return e}var Jr=jn?function(e,t){return jn.set(e,t),e}:ou,Xr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ou;function eo(e){return Ri(Bs(e))}function to(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function no(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ro(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return oo(e,t,ou,n)}function oo(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=cs(t),l=t===o;i<a;){var f=fn((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,v=p==p,g=cs(p);if(s)var y=r||v;else y=l?v&&(r||d):u?v&&d&&(r||!h):c?v&&d&&!h&&(r||!g):!h&&!g&&(r?p<=t:p<t);y?i=f+1:a=f}return mn(a,4294967294)}function io(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Ba(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function ao(e){return"number"==typeof e?e:cs(e)?p:+e}function so(e){if("string"==typeof e)return e;if(Ka(e))return Ot(e,so)+"";if(cs(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=xt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=St;else if(i>=200){var c=t?null:Go(e);if(c)return nn(c);a=!1,o=Kt,u=new qn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function co(e,t){return null==(e=ki(e,t=mo(t,e)))||delete e[Mi(Qi(t))]}function lo(e,t,n,r){return Qr(e,t,n(Er(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?to(e,r?0:i,r?i+1:o):to(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),n)}function ho(e,t,n){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=lr(a[i]||s,e[u],t,n));return uo(gr(a,1),t,n)}function vo(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function go(e){return Ga(e)?e:[]}function yo(e){return"function"==typeof e?e:ou}function mo(e,t){return Ka(e)?e:bi(e,t)?[e]:Li(bs(e))}var bo=Gr;function wo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:to(e,t,n)}var _o=lt||function(e){return it.clearTimeout(e)};function Eo(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function So(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=cs(e),s=t!==o,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function ko(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=yn(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function To(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=yn(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function Po(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function jo(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):o;c===o&&(c=e[u]),i?or(n,u,c):er(n,u,c)}return n}function Co(e,t){return function(n,r){var o=Ka(n)?mt:nr,i=t?t():{};return o(n,e,si(r,2),i)}}function No(e){return Gr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&mi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Se(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ao(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Se(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Io(e){return function(t,n,r){for(var o=-1,i=Se(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function Ro(e){return function(t){var n=Jt(t=bs(t))?an(t):o,r=n?n[0]:t.charAt(0),i=n?wo(n,1).join(""):t.slice(1);return r[e]()+i}}function $o(e){return function(t){return Tt(Js(Ws(t).replace(We,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return ts(r)?r:n}}function Lo(e){return function(t,n,r){var i=Se(t);if(!qa(t)){var a=si(n,3);t=As(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Mo(e){return ti((function(t){var n=t.length,r=n,a=zn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Te(i);if(a&&!u&&"wrapper"==ii(s))var u=new zn([],!0)}for(r=u?r:n;++r<n;){var c=ii(s=t[r]),l="wrapper"==c?oi(s):o;u=l&&wi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ii(l[0])].apply(u,l[3]):1==s.length&&wi(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ka(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function Uo(e,t,n,i,a,s,u,l,f,p){var d=t&c,h=1&t,v=2&t,g=24&t,y=512&t,m=v?o:Do(e);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(g)var _=ai(o),E=Gt(b,_);if(i&&(b=ko(b,i,a,g)),s&&(b=To(b,s,u,g)),c-=E,g&&c<p){var x=tn(b,_);return Ho(e,t,Uo,o.placeholder,n,b,x,l,f,p-c)}var S=h?n:this,O=v?S[e]:e;return c=b.length,l?b=Ti(b,l):y&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==it&&this instanceof o&&(O=m||Do(O)),O.apply(S,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=so(n),r=so(r)):(n=ao(n),r=ao(r)),i=e(n,r)}return i}}function zo(e){return ti((function(t){return t=Ot(t,Vt(si())),Gr((function(n){var r=this;return e(t,(function(e){return yt(e,r,n)}))}))}))}function Vo(e,t){var n=(t=t===o?" ":so(t)).length;if(n<2)return n?qr(t,e):t;var r=qr(t,ln(e/on(t)));return Jt(t)?wo(an(r),0,e).join(""):r.slice(0,e)}function Wo(e){return function(t,n,i){return i&&"number"!=typeof i&&mi(t,n,i)&&(n=i=o),t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n,o){for(var i=-1,a=yn(ln((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:hs(i),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Ho(e,t,n,r,i,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,i,p?a:o,p?s:o,p?o:a,p?o:s,c,l,f],h=n.apply(o,d);return wi(e)&&ji(h,d),h.placeholder=r,Ai(h,e,t)}function qo(e){var t=xe[e];return function(e,n){if(e=ys(e),(n=null==n?0:mn(vs(n),292))&&hn(e)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Go=kn&&1/nn(new kn([,-0]))[1]==l?function(e){return new kn(e)}:cu;function Zo(e){return function(t){var n=di(t);return n==E?Xt(t):n==T?rn(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Yo(e,t,n,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Te(i);var v=a?a.length:0;if(v||(t&=-97,a=l=o),p=p===o?p:yn(vs(p),0),d=d===o?d:vs(d),v-=l?l.length:0,64&t){var g=a,y=l;a=l=o}var m=h?o:oi(e),b=[e,t,n,a,l,g,y,f,p,d];if(m&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?ko(l,u,t[4]):u,e[4]=l?tn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?To(l,u,t[6]):u,e[6]=l?tn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,m),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(d=b[9]=b[9]===o?h?0:e.length:yn(b[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Do(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=ai(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:tn(u,l);return(s-=f.length)<n?Ho(e,t,Uo,a.placeholder,o,u,f,o,o,n-s):yt(this&&this!==it&&this instanceof a?i:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Uo.apply(o,b):function(e,t,n,o){var i=1&t,a=Do(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==it&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return yt(p,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Do(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ai((m?Jr:ji)(w,b),e,t)}function Qo(e,t,n,r){return e===o||Ba(e,Ce[n])&&!Ie.call(r,n)?t:e}function Jo(e,t,n,r,i,a){return ts(e)&&ts(t)&&(a.set(t,e),Fr(e,t,o,Jo,a),a.delete(t)),e}function Xo(e){return is(e)?o:e}function ei(e,t,n,r,i,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new qn:o;for(a.set(e,t),a.set(t,e);++p<u;){var v=e[p],g=t[p];if(r)var y=s?r(g,v,p,t,e,a):r(v,g,p,e,t,a);if(y!==o){if(y)continue;d=!1;break}if(h){if(!jt(t,(function(e,t){if(!Kt(h,t)&&(v===e||i(v,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(v!==g&&!i(v,g,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ti(e){return Ni(Oi(e,o,Hi),e+"")}function ni(e){return xr(e,As,fi)}function ri(e){return xr(e,Is,pi)}var oi=jn?function(e){return jn.get(e)}:cu;function ii(e){for(var t=e.name+"",n=Cn[t],r=Ie.call(Cn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ai(e){return(Ie.call(Un,"placeholder")?Un:e).placeholder}function si(){var e=Un.iteratee||iu;return e=e===iu?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(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 ci(e){for(var t=As(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,xi(o)]}return t}function li(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Ir(n)?n:o}var fi=pn?function(e){return null==e?[]:(e=Se(e),Et(pn(e),(function(t){return et.call(e,t)})))}:gu,pi=pn?function(e){for(var t=[];e;)kt(t,fi(e)),e=He(e);return t}:gu,di=Sr;function hi(e,t,n){for(var r=-1,o=(t=mo(t,e)).length,i=!1;++r<o;){var a=Mi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&es(o)&&yi(a,o)&&(Ka(e)||Wa(e))}function vi(e){return"function"!=typeof e.constructor||Ei(e)?{}:Fn(He(e))}function gi(e){return Ka(e)||Wa(e)||!!(ot&&e&&e[ot])}function yi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function mi(e,t,n){if(!ts(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&yi(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function bi(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||X.test(e)||!J.test(e)||null!=t&&e in Se(t)}function wi(e){var t=ii(e),n=Un[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(xn&&di(new xn(new ArrayBuffer(1)))!=A||Sn&&di(new Sn)!=E||On&&di(On.resolve())!=O||kn&&di(new kn)!=T||Tn&&di(new Tn)!=C)&&(di=function(e){var t=Sr(e),n=t==S?e.constructor:o,r=n?Ui(n):"";if(r)switch(r){case Nn:return A;case An:return E;case In:return O;case Rn:return T;case $n:return C}return t});var _i=Ne?Ja:yu;function Ei(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ce)}function xi(e){return e==e&&!ts(e)}function Si(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Se(n))}}function Oi(e,t,n){return t=yn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=yn(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),yt(e,this,u)}}function ki(e,t){return t.length<2?e:Er(e,to(t,0,-1))}function Ti(e,t){for(var n=e.length,r=mn(t.length,n),i=Po(e);r--;){var a=t[r];e[r]=yi(a,n)?i[a]:o}return e}function Pi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ji=Ii(Jr),Ci=Mt||function(e,t){return it.setTimeout(e,t)},Ni=Ii(Xr);function Ai(e,t,n){var r=t+"";return Ni(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(h,(function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Ii(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Hr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var $i,Di,Li=($i=$a((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Di.size&&Di.clear(),e})),Di=$i.cache,$i);function Mi(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ui(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Vn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Gr((function(e,t){return Ga(e)?lr(e,gr(t,1,Ga,!0)):[]})),zi=Gr((function(e,t){var n=Qi(t);return Ga(n)&&(n=o),Ga(e)?lr(e,gr(t,1,Ga,!0),si(n,2)):[]})),Vi=Gr((function(e,t){var n=Qi(t);return Ga(n)&&(n=o),Ga(e)?lr(e,gr(t,1,Ga,!0),o,n):[]}));function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),At(e,si(t,3),o)}function Ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=vs(n),i=n<0?yn(r+i,0):mn(i,r-1)),At(e,si(t,3),i,!0)}function Hi(e){return null!=e&&e.length?gr(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Gi=Gr((function(e){var t=Ot(e,go);return t.length&&t[0]===e[0]?Pr(t):[]})),Zi=Gr((function(e){var t=Qi(e),n=Ot(e,go);return t===Qi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Pr(n,si(t,2)):[]})),Yi=Gr((function(e){var t=Qi(e),n=Ot(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Pr(n,o,t):[]}));function Qi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ji=Gr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var ea=ti((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Kr(e,Ot(t,(function(e){return yi(e,n)?+e:e})).sort(Oo)),r}));function ta(e){return null==e?e:En.call(e)}var na=Gr((function(e){return uo(gr(e,1,Ga,!0))})),ra=Gr((function(e){var t=Qi(e);return Ga(t)&&(t=o),uo(gr(e,1,Ga,!0),si(t,2))})),oa=Gr((function(e){var t=Qi(e);return t="function"==typeof t?t:o,uo(gr(e,1,Ga,!0),o,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Et(e,(function(e){if(Ga(e))return t=yn(e.length,t),!0})),Bt(t,(function(t){return Ot(e,Lt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Ot(n,(function(e){return yt(t,o,e)}))}var sa=Gr((function(e,t){return Ga(e)?lr(e,t):[]})),ua=Gr((function(e){return ho(Et(e,Ga))})),ca=Gr((function(e){var t=Qi(e);return Ga(t)&&(t=o),ho(Et(e,Ga),si(t,2))})),la=Gr((function(e){var t=Qi(e);return t="function"==typeof t?t:o,ho(Et(e,Ga),o,t)})),fa=Gr(ia),pa=Gr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,aa(e,n)}));function da(e){var t=Un(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var va=ti((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&yi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new zn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ga=Co((function(e,t,n){Ie.call(e,n)?++e[n]:or(e,n,1)})),ya=Lo(Wi),ma=Lo(Ki);function ba(e,t){return(Ka(e)?bt:fr)(e,si(t,3))}function wa(e,t){return(Ka(e)?wt:pr)(e,si(t,3))}var _a=Co((function(e,t,n){Ie.call(e,n)?e[n].push(t):or(e,n,[t])})),Ea=Gr((function(e,t,n){var o=-1,i="function"==typeof t,a=qa(e)?r(e.length):[];return fr(e,(function(e){a[++o]=i?yt(t,e,n):jr(e,t,n)})),a})),xa=Co((function(e,t,n){or(e,n,t)}));function Sa(e,t){return(Ka(e)?Ot:Lr)(e,si(t,3))}var Oa=Co((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ka=Gr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mi(e,t[0],t[1])?t=[]:n>2&&mi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,gr(t,1),[])})),Ta=Ct||function(){return it.Date.now()};function Pa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Yo(e,c,o,o,o,o,t)}function ja(e,t){var n;if("function"!=typeof t)throw new Te(i);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=Gr((function(e,t,n){var r=1;if(n.length){var o=tn(n,ai(Ca));r|=u}return Yo(e,r,t,n,o)})),Na=Gr((function(e,t,n){var r=3;if(n.length){var o=tn(n,ai(Na));r|=u}return Yo(t,r,e,n,o)}));function Aa(e,t,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new Te(i);function v(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function g(e){return f=e,c=Ci(m,t),p?v(e):u}function y(e){var n=e-l;return l===o||n>=t||n<0||d&&e-f>=s}function m(){var e=Ta();if(y(e))return b(e);c=Ci(m,function(e){var n=t-(e-l);return d?mn(n,s-(e-f)):n}(e))}function b(e){return c=o,h&&r?v(e):(r=a=o,u)}function w(){var e=Ta(),n=y(e);if(r=arguments,a=this,l=e,n){if(c===o)return g(l);if(d)return _o(c),c=Ci(m,t),v(l)}return c===o&&(c=Ci(m,t)),u}return t=ys(t)||0,ts(n)&&(p=!!n.leading,s=(d="maxWait"in n)?yn(ys(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==o&&_o(c),f=0,r=l=a=c=o},w.flush=function(){return c===o?u:b(Ta())},w}var Ia=Gr((function(e,t){return cr(e,1,t)})),Ra=Gr((function(e,t,n){return cr(e,ys(t)||0,n)}));function $a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new($a.Cache||Hn),n}function Da(e){if("function"!=typeof e)throw new Te(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}$a.Cache=Hn;var La=bo((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Ot(t[0],Vt(si())):Ot(gr(t,1),Vt(si()))).length;return Gr((function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return yt(e,this,r)}))})),Ma=Gr((function(e,t){var n=tn(t,ai(Ma));return Yo(e,u,o,t,n)})),Ua=Gr((function(e,t){var n=tn(t,ai(Ua));return Yo(e,64,o,t,n)})),Fa=ti((function(e,t){return Yo(e,256,o,o,o,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var za=Ko(Or),Va=Ko((function(e,t){return e>=t})),Wa=Cr(function(){return arguments}())?Cr:function(e){return ns(e)&&Ie.call(e,"callee")&&!et.call(e,"callee")},Ka=r.isArray,Ha=ft?Vt(ft):function(e){return ns(e)&&Sr(e)==N};function qa(e){return null!=e&&es(e.length)&&!Ja(e)}function Ga(e){return ns(e)&&qa(e)}var Za=dn||yu,Ya=pt?Vt(pt):function(e){return ns(e)&&Sr(e)==m};function Qa(e){if(!ns(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ja(e){if(!ts(e))return!1;var t=Sr(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==vs(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=dt?Vt(dt):function(e){return ns(e)&&di(e)==E};function os(e){return"number"==typeof e||ns(e)&&Sr(e)==x}function is(e){if(!ns(e)||Sr(e)!=S)return!1;var t=He(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ae.call(n)==Le}var as=ht?Vt(ht):function(e){return ns(e)&&Sr(e)==k},ss=vt?Vt(vt):function(e){return ns(e)&&di(e)==T};function us(e){return"string"==typeof e||!Ka(e)&&ns(e)&&Sr(e)==P}function cs(e){return"symbol"==typeof e||ns(e)&&Sr(e)==j}var ls=gt?Vt(gt):function(e){return ns(e)&&es(e.length)&&!!Je[Sr(e)]},fs=Ko(Dr),ps=Ko((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(qa(e))return us(e)?an(e):Po(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=di(e);return(t==E?Xt:t==T?nn:Bs)(e)}function hs(e){return e?(e=ys(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function vs(e){var t=hs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?ar(vs(e),0,d):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||ge.test(e)?nt(e.slice(2),n?2:8):de.test(e)?p:+e}function ms(e){return jo(e,Is(e))}function bs(e){return null==e?"":so(e)}var ws=No((function(e,t){if(Ei(t)||qa(t))jo(t,As(t),e);else for(var n in t)Ie.call(t,n)&&er(e,n,t[n])})),_s=No((function(e,t){jo(t,Is(t),e)})),Es=No((function(e,t,n,r){jo(t,Is(t),e,r)})),xs=No((function(e,t,n,r){jo(t,As(t),e,r)})),Ss=ti(ir),Os=Gr((function(e,t){e=Se(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&mi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Is(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===o||Ba(f,Ce[l])&&!Ie.call(e,l))&&(e[l]=a[l])}return e})),ks=Gr((function(e){return e.push(o,Jo),yt($s,o,e)}));function Ts(e,t,n){var r=null==e?o:Er(e,t);return r===o?n:r}function Ps(e,t){return null!=e&&hi(e,t,Tr)}var js=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n}),tu(ou)),Cs=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]}),si),Ns=Gr(jr);function As(e){return qa(e)?Zn(e):$r(e)}function Is(e){return qa(e)?Zn(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var n in Se(e))t.push(n);return t}(e);var t=Ei(e),n=[];for(var r in e)("constructor"!=r||!t&&Ie.call(e,r))&&n.push(r);return n}(e)}var Rs=No((function(e,t,n){Fr(e,t,n)})),$s=No((function(e,t,n,r){Fr(e,t,n,r)})),Ds=ti((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ot(t,(function(t){return t=mo(t,e),r||(r=t.length>1),t})),jo(e,ri(e),n),r&&(n=sr(n,7,Xo));for(var o=t.length;o--;)co(n,t[o]);return n})),Ls=ti((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function Ms(e,t){if(null==e)return{};var n=Ot(ri(e),(function(e){return[e]}));return t=si(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Us=Zo(As),Fs=Zo(Is);function Bs(e){return null==e?[]:Wt(e,As(e))}var zs=$o((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Qs(bs(e).toLowerCase())}function Ws(e){return(e=bs(e))&&e.replace(me,Zt).replace(Ke,"")}var Ks=$o((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Hs=$o((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Ro("toLowerCase"),Gs=$o((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Zs=$o((function(e,t,n){return e+(n?" ":"")+Qs(t)})),Ys=$o((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qs=Ro("toUpperCase");function Js(e,t,n){return e=bs(e),(t=n?o:t)===o?function(e){return Ze.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xs=Gr((function(e,t){try{return yt(e,o,t)}catch(e){return Qa(e)?e:new _e(e)}})),eu=ti((function(e,t){return bt(t,(function(t){t=Mi(t),or(e,t,Ca(e[t],e))})),e}));function tu(e){return function(){return e}}var nu=Mo(),ru=Mo(!0);function ou(e){return e}function iu(e){return Rr("function"==typeof e?e:sr(e,1))}var au=Gr((function(e,t){return function(n){return jr(n,e,t)}})),su=Gr((function(e,t){return function(n){return jr(e,n,t)}}));function uu(e,t,n){var r=As(t),o=_r(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,As(t)));var i=!(ts(n)&&"chain"in n&&!n.chain),a=Ja(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=Po(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,kt([this.value()],arguments))})})),e}function cu(){}var lu=zo(Ot),fu=zo(_t),pu=zo(jt);function du(e){return bi(e)?Lt(Mi(e)):function(e){return function(t){return Er(t,e)}}(e)}var hu=Wo(),vu=Wo(!0);function gu(){return[]}function yu(){return!1}var mu,bu=Bo((function(e,t){return e+t}),0),wu=qo("ceil"),_u=Bo((function(e,t){return e/t}),1),Eu=qo("floor"),xu=Bo((function(e,t){return e*t}),1),Su=qo("round"),Ou=Bo((function(e,t){return e-t}),0);return Un.after=function(e,t){if("function"!=typeof t)throw new Te(i);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Un.ary=Pa,Un.assign=ws,Un.assignIn=_s,Un.assignInWith=Es,Un.assignWith=xs,Un.at=Ss,Un.before=ja,Un.bind=Ca,Un.bindAll=eu,Un.bindKey=Na,Un.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},Un.chain=da,Un.chunk=function(e,t,n){t=(n?mi(e,t,n):t===o)?1:yn(vs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(ln(i/t));a<i;)u[s++]=to(e,a,a+=t);return u},Un.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Un.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(Ka(n)?Po(n):[n],gr(t,1))},Un.cond=function(e){var t=null==e?0:e.length,n=si();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new Te(i);return[n(e[0]),e[1]]})):[],Gr((function(n){for(var r=-1;++r<t;){var o=e[r];if(yt(o[0],this,n))return yt(o[1],this,n)}}))},Un.conforms=function(e){return function(e){var t=As(e);return function(n){return ur(n,e,t)}}(sr(e,1))},Un.constant=tu,Un.countBy=ga,Un.create=function(e,t){var n=Fn(e);return null==t?n:rr(n,t)},Un.curry=function e(t,n,r){var i=Yo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.curryRight=function e(t,n,r){var i=Yo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Un.debounce=Aa,Un.defaults=Os,Un.defaultsDeep=ks,Un.defer=Ia,Un.delay=Ra,Un.difference=Bi,Un.differenceBy=zi,Un.differenceWith=Vi,Un.drop=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=n||t===o?1:vs(t))<0?0:t,r):[]},Un.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,0,(t=r-(t=n||t===o?1:vs(t)))<0?0:t):[]},Un.dropRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0,!0):[]},Un.dropWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0):[]},Un.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=vs(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:vs(r))<0&&(r+=i),r=n>r?0:gs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Un.filter=function(e,t){return(Ka(e)?Et:vr)(e,si(t,3))},Un.flatMap=function(e,t){return gr(Sa(e,t),1)},Un.flatMapDeep=function(e,t){return gr(Sa(e,t),l)},Un.flatMapDepth=function(e,t,n){return n=n===o?1:vs(n),gr(Sa(e,t),n)},Un.flatten=Hi,Un.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Un.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:vs(t)):[]},Un.flip=function(e){return Yo(e,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Un.functions=function(e){return null==e?[]:_r(e,As(e))},Un.functionsIn=function(e){return null==e?[]:_r(e,Is(e))},Un.groupBy=_a,Un.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},Un.intersection=Gi,Un.intersectionBy=Zi,Un.intersectionWith=Yi,Un.invert=js,Un.invertBy=Cs,Un.invokeMap=Ea,Un.iteratee=iu,Un.keyBy=xa,Un.keys=As,Un.keysIn=Is,Un.map=Sa,Un.mapKeys=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},Un.mapValues=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},Un.matches=function(e){return Mr(sr(e,1))},Un.matchesProperty=function(e,t){return Ur(e,sr(t,1))},Un.memoize=$a,Un.merge=Rs,Un.mergeWith=$s,Un.method=au,Un.methodOf=su,Un.mixin=uu,Un.negate=Da,Un.nthArg=function(e){return e=vs(e),Gr((function(t){return Br(t,e)}))},Un.omit=Ds,Un.omitBy=function(e,t){return Ms(e,Da(si(t)))},Un.once=function(e){return ja(2,e)},Un.orderBy=function(e,t,n,r){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=r?o:n)||(n=null==n?[]:[n]),zr(e,t,n))},Un.over=lu,Un.overArgs=La,Un.overEvery=fu,Un.overSome=pu,Un.partial=Ma,Un.partialRight=Ua,Un.partition=Oa,Un.pick=Ls,Un.pickBy=Ms,Un.property=du,Un.propertyOf=function(e){return function(t){return null==e?o:Er(e,t)}},Un.pull=Ji,Un.pullAll=Xi,Un.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,si(n,2)):e},Un.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,o,n):e},Un.pullAt=ea,Un.range=hu,Un.rangeRight=vu,Un.rearg=Fa,Un.reject=function(e,t){return(Ka(e)?Et:vr)(e,Da(si(t,3)))},Un.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=si(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Kr(e,o),n},Un.rest=function(e,t){if("function"!=typeof e)throw new Te(i);return Gr(e,t=t===o?t:vs(t))},Un.reverse=ta,Un.sampleSize=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:vs(t),(Ka(e)?Qn:Yr)(e,t)},Un.set=function(e,t,n){return null==e?e:Qr(e,t,n)},Un.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Qr(e,t,n,r)},Un.shuffle=function(e){return(Ka(e)?Jn:eo)(e)},Un.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mi(e,t,n)?(t=0,n=r):(t=null==t?0:vs(t),n=n===o?r:vs(n)),to(e,t,n)):[]},Un.sortBy=ka,Un.sortedUniq=function(e){return e&&e.length?io(e):[]},Un.sortedUniqBy=function(e,t){return e&&e.length?io(e,si(t,2)):[]},Un.split=function(e,t,n){return n&&"number"!=typeof n&&mi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=so(t))&&Jt(e)?wo(an(e),0,n):e.split(t,n):[]},Un.spread=function(e,t){if("function"!=typeof e)throw new Te(i);return t=null==t?0:yn(vs(t),0),Gr((function(n){var r=n[t],o=wo(n,0,t);return r&&kt(o,r),yt(e,this,o)}))},Un.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},Un.take=function(e,t,n){return e&&e.length?to(e,0,(t=n||t===o?1:vs(t))<0?0:t):[]},Un.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=r-(t=n||t===o?1:vs(t)))<0?0:t,r):[]},Un.takeRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!1,!0):[]},Un.takeWhile=function(e,t){return e&&e.length?fo(e,si(t,3)):[]},Un.tap=function(e,t){return t(e),e},Un.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Te(i);return ts(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Aa(e,t,{leading:r,maxWait:t,trailing:o})},Un.thru=ha,Un.toArray=ds,Un.toPairs=Us,Un.toPairsIn=Fs,Un.toPath=function(e){return Ka(e)?Ot(e,Mi):cs(e)?[e]:Po(Li(bs(e)))},Un.toPlainObject=ms,Un.transform=function(e,t,n){var r=Ka(e),o=r||Za(e)||ls(e);if(t=si(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Ja(i)?Fn(He(e)):{}}return(o?bt:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},Un.unary=function(e){return Pa(e,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=oa,Un.uniq=function(e){return e&&e.length?uo(e):[]},Un.uniqBy=function(e,t){return e&&e.length?uo(e,si(t,2)):[]},Un.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Un.unset=function(e,t){return null==e||co(e,t)},Un.unzip=ia,Un.unzipWith=aa,Un.update=function(e,t,n){return null==e?e:lo(e,t,yo(n))},Un.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,yo(n),r)},Un.values=Bs,Un.valuesIn=function(e){return null==e?[]:Wt(e,Is(e))},Un.without=sa,Un.words=Js,Un.wrap=function(e,t){return Ma(yo(t),e)},Un.xor=ua,Un.xorBy=ca,Un.xorWith=la,Un.zip=fa,Un.zipObject=function(e,t){return vo(e||[],t||[],er)},Un.zipObjectDeep=function(e,t){return vo(e||[],t||[],Qr)},Un.zipWith=pa,Un.entries=Us,Un.entriesIn=Fs,Un.extend=_s,Un.extendWith=Es,uu(Un,Un),Un.add=bu,Un.attempt=Xs,Un.camelCase=zs,Un.capitalize=Vs,Un.ceil=wu,Un.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ys(n))==n?n:0),t!==o&&(t=(t=ys(t))==t?t:0),ar(ys(e),t,n)},Un.clone=function(e){return sr(e,4)},Un.cloneDeep=function(e){return sr(e,5)},Un.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:o)},Un.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:o)},Un.conformsTo=function(e,t){return null==t||ur(e,t,As(t))},Un.deburr=Ws,Un.defaultTo=function(e,t){return null==e||e!=e?t:e},Un.divide=_u,Un.endsWith=function(e,t,n){e=bs(e),t=so(t);var r=e.length,i=n=n===o?r:ar(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Un.eq=Ba,Un.escape=function(e){return(e=bs(e))&&G.test(e)?e.replace(H,Yt):e},Un.escapeRegExp=function(e){return(e=bs(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Un.every=function(e,t,n){var r=Ka(e)?_t:dr;return n&&mi(e,t,n)&&(t=o),r(e,si(t,3))},Un.find=ya,Un.findIndex=Wi,Un.findKey=function(e,t){return Nt(e,si(t,3),br)},Un.findLast=ma,Un.findLastIndex=Ki,Un.findLastKey=function(e,t){return Nt(e,si(t,3),wr)},Un.floor=Eu,Un.forEach=ba,Un.forEachRight=wa,Un.forIn=function(e,t){return null==e?e:yr(e,si(t,3),Is)},Un.forInRight=function(e,t){return null==e?e:mr(e,si(t,3),Is)},Un.forOwn=function(e,t){return e&&br(e,si(t,3))},Un.forOwnRight=function(e,t){return e&&wr(e,si(t,3))},Un.get=Ts,Un.gt=za,Un.gte=Va,Un.has=function(e,t){return null!=e&&hi(e,t,kr)},Un.hasIn=Ps,Un.head=qi,Un.identity=ou,Un.includes=function(e,t,n,r){e=qa(e)?e:Bs(e),n=n&&!r?vs(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),us(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&It(e,t,n)>-1},Un.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:vs(n);return o<0&&(o=yn(r+o,0)),It(e,t,o)},Un.inRange=function(e,t,n){return t=hs(t),n===o?(n=t,t=0):n=hs(n),function(e,t,n){return e>=mn(t,n)&&e<yn(t,n)}(e=ys(e),t,n)},Un.invoke=Ns,Un.isArguments=Wa,Un.isArray=Ka,Un.isArrayBuffer=Ha,Un.isArrayLike=qa,Un.isArrayLikeObject=Ga,Un.isBoolean=function(e){return!0===e||!1===e||ns(e)&&Sr(e)==y},Un.isBuffer=Za,Un.isDate=Ya,Un.isElement=function(e){return ns(e)&&1===e.nodeType&&!is(e)},Un.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Za(e)||ls(e)||Wa(e)))return!e.length;var t=di(e);if(t==E||t==T)return!e.size;if(Ei(e))return!$r(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},Un.isEqual=function(e,t){return Nr(e,t)},Un.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Nr(e,t,o,n):!!r},Un.isError=Qa,Un.isFinite=function(e){return"number"==typeof e&&hn(e)},Un.isFunction=Ja,Un.isInteger=Xa,Un.isLength=es,Un.isMap=rs,Un.isMatch=function(e,t){return e===t||Ar(e,t,ci(t))},Un.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ar(e,t,ci(t),n)},Un.isNaN=function(e){return os(e)&&e!=+e},Un.isNative=function(e){if(_i(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ir(e)},Un.isNil=function(e){return null==e},Un.isNull=function(e){return null===e},Un.isNumber=os,Un.isObject=ts,Un.isObjectLike=ns,Un.isPlainObject=is,Un.isRegExp=as,Un.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=f},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(e){return e===o},Un.isWeakMap=function(e){return ns(e)&&di(e)==C},Un.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Sr(e)},Un.join=function(e,t){return null==e?"":vn.call(e,t)},Un.kebabCase=Ks,Un.last=Qi,Un.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=vs(n))<0?yn(r+i,0):mn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):At(e,$t,i,!0)},Un.lowerCase=Hs,Un.lowerFirst=qs,Un.lt=fs,Un.lte=ps,Un.max=function(e){return e&&e.length?hr(e,ou,Or):o},Un.maxBy=function(e,t){return e&&e.length?hr(e,si(t,2),Or):o},Un.mean=function(e){return Dt(e,ou)},Un.meanBy=function(e,t){return Dt(e,si(t,2))},Un.min=function(e){return e&&e.length?hr(e,ou,Dr):o},Un.minBy=function(e,t){return e&&e.length?hr(e,si(t,2),Dr):o},Un.stubArray=gu,Un.stubFalse=yu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=xu,Un.nth=function(e,t){return e&&e.length?Br(e,vs(t)):o},Un.noConflict=function(){return it._===this&&(it._=Me),this},Un.noop=cu,Un.now=Ta,Un.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(fn(o),n)+e+Vo(ln(o),n)},Un.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?e+Vo(t-r,n):e},Un.padStart=function(e,t,n){e=bs(e);var r=(t=vs(t))?on(e):0;return t&&r<t?Vo(t-r,n)+e:e},Un.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(bs(e).replace(re,""),t||0)},Un.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hs(e),t===o?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return mn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Un.reduce=function(e,t,n){var r=Ka(e)?Tt:Ut,o=arguments.length<3;return r(e,si(t,4),n,o,fr)},Un.reduceRight=function(e,t,n){var r=Ka(e)?Pt:Ut,o=arguments.length<3;return r(e,si(t,4),n,o,pr)},Un.repeat=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:vs(t),qr(bs(e),t)},Un.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Un.result=function(e,t,n){var r=-1,i=(t=mo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Mi(t[r])];a===o&&(r=i,a=n),e=Ja(a)?a.call(e):a}return e},Un.round=Su,Un.runInContext=e,Un.sample=function(e){return(Ka(e)?Yn:Zr)(e)},Un.size=function(e){if(null==e)return 0;if(qa(e))return us(e)?on(e):e.length;var t=di(e);return t==E||t==T?e.size:$r(e).length},Un.snakeCase=Gs,Un.some=function(e,t,n){var r=Ka(e)?jt:no;return n&&mi(e,t,n)&&(t=o),r(e,si(t,3))},Un.sortedIndex=function(e,t){return ro(e,t)},Un.sortedIndexBy=function(e,t,n){return oo(e,t,si(n,2))},Un.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ro(e,t);if(r<n&&Ba(e[r],t))return r}return-1},Un.sortedLastIndex=function(e,t){return ro(e,t,!0)},Un.sortedLastIndexBy=function(e,t,n){return oo(e,t,si(n,2),!0)},Un.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ro(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},Un.startCase=Zs,Un.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ar(vs(n),0,e.length),t=so(t),e.slice(n,n+t.length)==t},Un.subtract=Ou,Un.sum=function(e){return e&&e.length?Ft(e,ou):0},Un.sumBy=function(e,t){return e&&e.length?Ft(e,si(t,2)):0},Un.template=function(e,t,n){var r=Un.templateSettings;n&&mi(e,t,n)&&(t=o),e=bs(e),t=Es({},t,r,Qo);var i,a,s=Es({},t.imports,r.imports,Qo),u=As(s),c=Wt(s,u),l=0,f=t.interpolate||be,p="__p += '",d=Oe((t.escape||be).source+"|"+f.source+"|"+(f===Q?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qe+"]")+"\n";e.replace(d,(function(t,n,r,o,s,u){return r||(r=o),p+=e.slice(l,u).replace(we,Qt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var v=Ie.call(t,"variable")&&t.variable;if(v){if(ce.test(v))throw new _e("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(z,""):p).replace(V,"$1").replace(W,"$1;"),p="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xs((function(){return Ee(u,h+"return "+p).apply(o,c)}));if(g.source=p,Qa(g))throw g;return g},Un.times=function(e,t){if((e=vs(e))<1||e>f)return[];var n=d,r=mn(e,d);t=si(t),e-=d;for(var o=Bt(r,t);++n<e;)t(n);return o},Un.toFinite=hs,Un.toInteger=vs,Un.toLength=gs,Un.toLower=function(e){return bs(e).toLowerCase()},Un.toNumber=ys,Un.toSafeInteger=function(e){return e?ar(vs(e),-9007199254740991,f):0===e?e:0},Un.toString=bs,Un.toUpper=function(e){return bs(e).toUpperCase()},Un.trim=function(e,t,n){if((e=bs(e))&&(n||t===o))return zt(e);if(!e||!(t=so(t)))return e;var r=an(e),i=an(t);return wo(r,Ht(r,i),qt(r,i)+1).join("")},Un.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.slice(0,sn(e)+1);if(!e||!(t=so(t)))return e;var r=an(e);return wo(r,0,qt(r,an(t))+1).join("")},Un.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=so(t)))return e;var r=an(e);return wo(r,Ht(r,an(t))).join("")},Un.truncate=function(e,t){var n=30,r="...";if(ts(t)){var i="separator"in t?t.separator:i;n="length"in t?vs(t.length):n,r="omission"in t?so(t.omission):r}var a=(e=bs(e)).length;if(Jt(e)){var s=an(e);a=s.length}if(n>=a)return e;var u=n-on(r);if(u<1)return r;var c=s?wo(s,0,u).join(""):e.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),as(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,bs(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===o?u:p)}}else if(e.indexOf(so(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Un.unescape=function(e){return(e=bs(e))&&q.test(e)?e.replace(K,un):e},Un.uniqueId=function(e){var t=++Re;return bs(e)+t},Un.upperCase=Ys,Un.upperFirst=Qs,Un.each=ba,Un.eachRight=wa,Un.first=qi,uu(Un,(mu={},br(Un,(function(e,t){Ie.call(Un.prototype,t)||(mu[t]=e)})),mu),{chain:!1}),Un.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Un[e].placeholder=Un})),bt(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:yn(vs(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:si(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(ou)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Gr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return jr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Da(si(e)))},Vn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},br(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Un[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Un.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Vn,c=s[0],l=u||Ka(t),f=function(e){var t=i.apply(Un,kt([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,v=u&&!d;if(!a&&l){t=v?t:new Vn(this);var g=e.apply(t,s);return g.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(g,p)}return h&&v?e.apply(this,s):(g=this.thru(f),h?r?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Pe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Un.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ka(o)?o:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),br(Vn.prototype,(function(e,t){var n=Un[t];if(n){var r=n.name+"";Ie.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Uo(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=mn(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return po(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var v=-1,g=e[c+=t];++v<f;){var y=l[v],m=y.iteratee,b=y.type,w=m(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}h[p++]=g}return h},Un.prototype.at=va,Un.prototype.chain=function(){return da(this)},Un.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===o&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Un.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Un.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:o}),new zn(t,this.__chain__)}return this.thru(ta)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,at&&(Un.prototype[at]=function(){return this}),Un}();it._=cn,(r=function(){return cn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],s=o.length;(e||"object"!==i(a))&&(a={});for(var u=0;u<s;++u){var c=o[u];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},4516:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},3975:(e,t,n)=>{"use strict";var r=n(2735),o=n(4516),i=n(9146);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var u=!1,c=null,l=!1,f=null,p={onError:function(e){u=!0,c=e}};function d(e,t,n,r,o,i,a,l,f){u=!1,c=null,s.apply(p,arguments)}var h=null,v=null,g=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,o,i,s,p,h){if(d.apply(this,arguments),u){if(!u)throw Error(a(198));var v=c;u=!1,c=null,l||(l=!0,f=v)}}(r,t,void 0,e),e.currentTarget=null}var m=null,b={};function w(){if(m)for(var e in b){var t=b[e],n=m.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var o=void 0,i=n[r],s=t,u=r;if(x.hasOwnProperty(u))throw Error(a(99,u));x[u]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&_(c[o],s,u);o=!0}else i.registrationName?(_(i.registrationName,s,u),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function _(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,O[e]=t.eventTypes[n].dependencies}var E=[],x={},S={},O={};function k(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),P=null,j=null,C=null;function N(e){if(e=v(e)){if("function"!=typeof P)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),P(e.stateNode,e.type,t))}}function A(e){j?C?C.push(e):C=[e]:j=e}function I(){if(j){var e=j,t=C;if(C=j=null,N(e),t)for(e=0;e<t.length;e++)N(t[e])}}function R(e,t){return e(t)}function $(e,t,n,r,o){return e(t,n,r,o)}function D(){}var L=R,M=!1,U=!1;function F(){null===j&&null===C||(D(),I())}function B(e,t,n){if(U)return e(t,n);U=!0;try{return L(e,t,n)}finally{U=!1,F()}}var z=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,W={},K={};function H(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){q[e]=new H(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];q[t]=new H(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){q[e]=new H(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){q[e]=new H(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){q[e]=new H(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){q[e]=new H(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){q[e]=new H(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){q[e]=new H(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){q[e]=new H(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Z(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,Z);q[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){q[e]=new H(e,1,!1,e.toLowerCase(),null,!1)})),q.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){q[e]=new H(e,1,!1,e.toLowerCase(),null,!0)}));var Y=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q(e,t,n,r){var o=q.hasOwnProperty(t)?q[t]:null;(null!==o?0===o.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!V.call(K,e)||!V.call(W,e)&&(z.test(e)?K[e]=!0:(W[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Y.hasOwnProperty("ReactCurrentDispatcher")||(Y.ReactCurrentDispatcher={current:null}),Y.hasOwnProperty("ReactCurrentBatchConfig")||(Y.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,X="function"==typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,oe=X?Symbol.for("react.profiler"):60114,ie=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,se=X?Symbol.for("react.concurrent_mode"):60111,ue=X?Symbol.for("react.forward_ref"):60112,ce=X?Symbol.for("react.suspense"):60113,le=X?Symbol.for("react.suspense_list"):60120,fe=X?Symbol.for("react.memo"):60115,pe=X?Symbol.for("react.lazy"):60116,de=X?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function ve(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ge(e.type);case de:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ye(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ge(e.type);n=null,r&&(n=ge(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(J,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function me(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=me(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&Q(e,"checked",t,!1)}function Oe(e,t){Se(e,t);var n=me(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Te(e,t.type,n):t.hasOwnProperty("defaultValue")&&Te(e,t.type,me(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ke(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Te(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Pe(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function je(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+me(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ce(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ne(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:me(n)}}function Ae(e,t){var n=me(t.value),r=me(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $e(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var De,Le,Me=(Le=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((De=De||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=De.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return Le(e,t)}))}:Le);function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Fe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Fe("Animation","AnimationEnd"),animationiteration:Fe("Animation","AnimationIteration"),animationstart:Fe("Animation","AnimationStart"),transitionend:Fe("Transition","TransitionEnd")},ze={},Ve={};function We(e){if(ze[e])return ze[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ve)return ze[e]=n[t];return e}T&&(Ve=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var Ke=We("animationend"),He=We("animationiteration"),qe=We("animationstart"),Ge=We("transitionend"),Ze="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"==typeof WeakMap?WeakMap:Map);function Qe(e){var t=Ye.get(e);return void 0===t&&(t=new Map,Ye.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function et(e){if(Je(e)!==e)throw Error(a(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return et(o),e;if(i===r)return et(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function nt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function it(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)y(e,t[r],n[r]);else t&&y(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function at(e){if(null!==e&&(ot=nt(ot,e)),e=ot,ot=null,e){if(rt(e,it),ot)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function st(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ut(e){if(!T)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function lt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function ft(e,t,n,r){if(ct.length){var o=ct.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=jn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=st(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<E.length;u++){var c=E[u];c&&(c=c.extractEvents(r,t,i,o,a))&&(s=nt(s,c))}at(s)}}function dt(e,t,n){if(!n.has(e)){switch(e){case"scroll":qt(t,"scroll",!0);break;case"focus":case"blur":qt(t,"focus",!0),qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ut(e)&&qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ze.indexOf(e)&&Ht(e,t)}n.set(e,null)}}var ht,vt,gt,yt=!1,mt=[],bt=null,wt=null,_t=null,Et=new Map,xt=new Map,St=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),kt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Tt(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Pt(e,t){switch(e){case"focus":case"blur":bt=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":Et.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xt.delete(t.pointerId)}}function jt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=Tt(t,n,r,o,i),null!==t&&null!==(t=Cn(t))&&vt(t),e):(e.eventSystemFlags|=r,e)}function Ct(e){var t=jn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){gt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Cn(t);return null!==n&&vt(n),e.blockedOn=t,!1}return!0}function At(e,t,n){Nt(e)&&n.delete(t)}function It(){for(yt=!1;0<mt.length;){var e=mt[0];if(null!==e.blockedOn){null!==(e=Cn(e.blockedOn))&&ht(e);break}var t=Qt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:mt.shift()}null!==bt&&Nt(bt)&&(bt=null),null!==wt&&Nt(wt)&&(wt=null),null!==_t&&Nt(_t)&&(_t=null),Et.forEach(At),xt.forEach(At)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,yt||(yt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,It)))}function $t(e){function t(t){return Rt(t,e)}if(0<mt.length){Rt(mt[0],e);for(var n=1;n<mt.length;n++){var r=mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bt&&Rt(bt,e),null!==wt&&Rt(wt,e),null!==_t&&Rt(_t,e),Et.forEach(t),xt.forEach(t),n=0;n<St.length;n++)(r=St[n]).blockedOn===e&&(r.blockedOn=null);for(;0<St.length&&null===(n=St[0]).blockedOn;)Ct(n),null===n.blockedOn&&St.shift()}var Dt={},Lt=new Map,Mt=new Map,Ut=["abort","abort",Ke,"animationEnd",He,"animationIteration",qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ge,"transitionEnd","waiting","waiting"];function Ft(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Mt.set(r,t),Lt.set(r,i),Dt[o]=i}}Ft("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ft("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ft(Ut,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),zt=0;zt<Bt.length;zt++)Mt.set(Bt[zt],0);var Vt=i.unstable_UserBlockingPriority,Wt=i.unstable_runWithPriority,Kt=!0;function Ht(e,t){qt(t,e,!1)}function qt(e,t,n){var r=Mt.get(t);switch(void 0===r?2:r){case 0:r=Gt.bind(null,t,1,e);break;case 1:r=Zt.bind(null,t,1,e);break;default:r=Yt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Gt(e,t,n,r){M||D();var o=Yt,i=M;M=!0;try{$(o,e,t,n,r)}finally{(M=i)||F()}}function Zt(e,t,n,r){Wt(Vt,Yt.bind(null,e,t,n,r))}function Yt(e,t,n,r){if(Kt)if(0<mt.length&&-1<Ot.indexOf(e))e=Tt(null,e,t,n,r),mt.push(e);else{var o=Qt(e,t,n,r);if(null===o)Pt(e,r);else if(-1<Ot.indexOf(e))e=Tt(o,e,t,n,r),mt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return bt=jt(bt,e,t,n,r,o),!0;case"dragenter":return wt=jt(wt,e,t,n,r,o),!0;case"mouseover":return _t=jt(_t,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Et.set(i,jt(Et.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,xt.set(i,jt(xt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Pt(e,r),e=ft(e,r,null,t);try{B(pt,e)}finally{lt(e)}}}}function Qt(e,t,n,r){if(null!==(n=jn(n=st(r)))){var o=Je(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=Xe(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=ft(e,r,n,t);try{B(pt,e)}finally{lt(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=en(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Jt).forEach((function(e){Xt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var an="http://www.w3.org/1999/xhtml";function sn(e,t){var n=Qe(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=O[t];for(var r=0;r<t.length;r++)dt(t[r],e,n)}function un(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ln(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,r=ln(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ln(r)}}function pn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vn="$?",gn="$!",yn=null,mn=null;function bn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function wn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var _n="function"==typeof setTimeout?setTimeout:void 0,En="function"==typeof clearTimeout?clearTimeout:void 0;function xn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Sn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===gn||n===vn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),kn="__reactInternalInstance$"+On,Tn="__reactEventHandlers$"+On,Pn="__reactContainere$"+On;function jn(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[kn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Sn(e);null!==e;){if(n=e[kn])return n;e=Sn(e)}return t}n=(e=n).parentNode}return null}function Cn(e){return!(e=e[kn]||e[Pn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Nn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function An(e){return e[Tn]||null}function In(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function $n(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Dn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=In(t);for(t=n.length;0<t--;)$n(n[t],"captured",e);for(t=0;t<n.length;t++)$n(n[t],"bubbled",e)}}function Ln(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Mn(e){e&&e.dispatchConfig.registrationName&&Ln(e._targetInst,null,e)}function Un(e){rt(e,Dn)}var Fn=null,Bn=null,zn=null;function Vn(){if(zn)return zn;var e,t,n=Bn,r=n.length,o="value"in Fn?Fn.value:Fn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return zn=o.slice(e,1<t?1-t:void 0)}function Wn(){return!0}function Kn(){return!1}function Hn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:Kn,this.isPropagationStopped=Kn,this}function qn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Gn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Zn(e){e.eventPool=[],e.getPooled=qn,e.release=Gn}o(Hn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:Kn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Kn,this._dispatchInstances=this._dispatchListeners=null}}),Hn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Hn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Zn(n),n},Zn(Hn);var Yn=Hn.extend({data:null}),Qn=Hn.extend({data:null}),Jn=[9,13,27,32],Xn=T&&"CompositionEvent"in window,er=null;T&&"documentMode"in document&&(er=document.documentMode);var tr=T&&"TextEvent"in window&&!er,nr=T&&(!Xn||er&&8<er&&11>=er),rr=String.fromCharCode(32),or={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ir=!1;function ar(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function sr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ur=!1,cr={eventTypes:or,extractEvents:function(e,t,n,r){var o;if(Xn)e:{switch(e){case"compositionstart":var i=or.compositionStart;break e;case"compositionend":i=or.compositionEnd;break e;case"compositionupdate":i=or.compositionUpdate;break e}i=void 0}else ur?ar(e,n)&&(i=or.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=or.compositionStart);return i?(nr&&"ko"!==n.locale&&(ur||i!==or.compositionStart?i===or.compositionEnd&&ur&&(o=Vn()):(Bn="value"in(Fn=r)?Fn.value:Fn.textContent,ur=!0)),i=Yn.getPooled(i,t,n,r),(o||null!==(o=sr(n)))&&(i.data=o),Un(i),o=i):o=null,(e=tr?function(e,t){switch(e){case"compositionend":return sr(t);case"keypress":return 32!==t.which?null:(ir=!0,rr);case"textInput":return(e=t.data)===rr&&ir?null:e;default:return null}}(e,n):function(e,t){if(ur)return"compositionend"===e||!Xn&&ar(e,t)?(e=Vn(),zn=Bn=Fn=null,ur=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nr&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Qn.getPooled(or.beforeInput,t,n,r)).data=e,Un(t)):t=null,null===o?t:null===t?o:[o,t]}},lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lr[e.type]:"textarea"===t}var pr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function dr(e,t,n){return(e=Hn.getPooled(pr.change,e,t,n)).type="change",A(n),Un(e),e}var hr=null,vr=null;function gr(e){at(e)}function yr(e){if(_e(Nn(e)))return e}function mr(e,t){if("change"===e)return t}var br=!1;function wr(){hr&&(hr.detachEvent("onpropertychange",_r),vr=hr=null)}function _r(e){if("value"===e.propertyName&&yr(vr))if(e=dr(vr,e,st(e)),M)at(e);else{M=!0;try{R(gr,e)}finally{M=!1,F()}}}function Er(e,t,n){"focus"===e?(wr(),vr=n,(hr=t).attachEvent("onpropertychange",_r)):"blur"===e&&wr()}function xr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return yr(vr)}function Sr(e,t){if("click"===e)return yr(t)}function Or(e,t){if("input"===e||"change"===e)return yr(t)}T&&(br=ut("input")&&(!document.documentMode||9<document.documentMode));var kr={eventTypes:pr,_isInputEventSupported:br,extractEvents:function(e,t,n,r){var o=t?Nn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=mr;else if(fr(o))if(br)a=Or;else{a=xr;var s=Er}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Sr);if(a&&(a=a(e,t)))return dr(a,n,r);s&&s(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Te(o,"number",o.value)}},Tr=Hn.extend({view:null,detail:null}),Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Cr(){return jr}var Nr=0,Ar=0,Ir=!1,Rr=!1,$r=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Cr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Nr;return Nr=e.screenX,Ir?"mousemove"===e.type?e.screenX-t:0:(Ir=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ar;return Ar=e.screenY,Rr?"mousemove"===e.type?e.screenY-t:0:(Rr=!0,0)}}),Dr=$r.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Mr={eventTypes:Lr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?jn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var s=$r,u=Lr.mouseLeave,c=Lr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(s=Dr,u=Lr.pointerLeave,c=Lr.pointerEnter,l="pointer");if(e=null==a?i:Nn(a),i=null==t?i:Nn(t),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=e,u.relatedTarget=i,(n=s.getPooled(c,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(c=l,a=0,e=s=r;e;e=In(e))a++;for(e=0,t=c;t;t=In(t))e++;for(;0<a-e;)s=In(s),a--;for(;0<e-a;)c=In(c),e--;for(;a--;){if(s===c||s===c.alternate)break e;s=In(s),c=In(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=In(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=In(l);for(l=0;l<s.length;l++)Ln(s[l],"bubbled",u);for(l=r.length;0<l--;)Ln(r[l],"captured",n);return 0==(64&o)?[u]:[u,n]}},Ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fr=Object.prototype.hasOwnProperty;function Br(e,t){if(Ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(t,n[r])||!Ur(e[n[r]],t[n[r]]))return!1;return!0}var zr=T&&"documentMode"in document&&11>=document.documentMode,Vr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wr=null,Kr=null,Hr=null,qr=!1;function Gr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qr||null==Wr||Wr!==cn(n)?null:(n="selectionStart"in(n=Wr)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Hr&&Br(Hr,n)?null:(Hr=n,(e=Hn.getPooled(Vr.select,Kr,e,t)).type="select",e.target=Wr,Un(e),e))}var Zr={eventTypes:Vr,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Qe(o),i=O.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Nn(t):window,e){case"focus":(fr(o)||"true"===o.contentEditable)&&(Wr=o,Kr=t,Hr=null);break;case"blur":Hr=Kr=Wr=null;break;case"mousedown":qr=!0;break;case"contextmenu":case"mouseup":case"dragend":return qr=!1,Gr(n,r);case"selectionchange":if(zr)break;case"keydown":case"keyup":return Gr(n,r)}return null}},Yr=Hn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qr=Hn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jr=Tr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var eo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},to={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},no=Tr.extend({key:function(e){if(e.key){var t=eo[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?to[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Cr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ro=$r.extend({dataTransfer:null}),oo=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Cr}),io=Hn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ao=$r.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),so={eventTypes:Dt,extractEvents:function(e,t,n,r){var o=Lt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=no;break;case"blur":case"focus":e=Jr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=$r;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ro;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=oo;break;case Ke:case He:case qe:e=Yr;break;case Ge:e=io;break;case"scroll":e=Tr;break;case"wheel":e=ao;break;case"copy":case"cut":case"paste":e=Qr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Dr;break;default:e=Hn}return Un(t=e.getPooled(o,t,n,r)),t}};if(m)throw Error(a(101));m=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=An,v=Cn,g=Nn,k({SimpleEventPlugin:so,EnterLeaveEventPlugin:Mr,ChangeEventPlugin:kr,SelectEventPlugin:Zr,BeforeInputEventPlugin:cr});var uo=[],co=-1;function lo(e){0>co||(e.current=uo[co],uo[co]=null,co--)}function fo(e,t){co++,uo[co]=e.current,e.current=t}var po={},ho={current:po},vo={current:!1},go=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mo(e){return null!=e.childContextTypes}function bo(){lo(vo),lo(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ge(t)||"Unknown",i));return o({},n,{},r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,go=ho.current,fo(ho,e),fo(vo,vo.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var So=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,ko=i.unstable_cancelCallback,To=i.unstable_requestPaint,Po=i.unstable_now,jo=i.unstable_getCurrentPriorityLevel,Co=i.unstable_ImmediatePriority,No=i.unstable_UserBlockingPriority,Ao=i.unstable_NormalPriority,Io=i.unstable_LowPriority,Ro=i.unstable_IdlePriority,$o={},Do=i.unstable_shouldYield,Lo=void 0!==To?To:function(){},Mo=null,Uo=null,Fo=!1,Bo=Po(),zo=1e4>Bo?Po:function(){return Po()-Bo};function Vo(){switch(jo()){case Co:return 99;case No:return 98;case Ao:return 97;case Io:return 96;case Ro:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Co;case 98:return No;case 97:return Ao;case 96:return Io;case 95:return Ro;default:throw Error(a(332))}}function Ko(e,t){return e=Wo(e),So(e,t)}function Ho(e,t,n){return e=Wo(e),Oo(e,t,n)}function qo(e){return null===Mo?(Mo=[e],Uo=Oo(Co,Zo)):Mo.push(e),$o}function Go(){if(null!==Uo){var e=Uo;Uo=null,ko(e)}Zo()}function Zo(){if(!Fo&&null!==Mo){Fo=!0;var e=0;try{var t=Mo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Mo=null}catch(t){throw null!==Mo&&(Mo=Mo.slice(e+1)),Oo(Co,Go),t}finally{Fo=!1}}}function Yo(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Jo={current:null},Xo=null,ei=null,ti=null;function ni(){ti=ei=Xo=null}function ri(e){var t=Jo.current;lo(Jo),e.type._context._currentValue=t}function oi(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ii(e,t){Xo=e,ti=ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Aa=!0),e.firstContext=null)}function ai(e,t){if(ti!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ti=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ei){if(null===Xo)throw Error(a(308));ei=t,Xo.dependencies={expirationTime:0,firstContext:t,responders:null}}else ei=ei.next=t;return e._currentValue}var si=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.alternate;null!==n&&ci(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function di(e,t,n,r){var i=e.updateQueue;si=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,i.shared.pending=null,null!==(u=e.alternate)&&null!==(u=u.updateQueue)&&(u.baseQueue=s)}if(null!==a){u=a.next;var c=i.baseState,l=0,f=null,p=null,d=null;if(null!==u)for(var h=u;;){if((s=h.expirationTime)<r){var v={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===d?(p=d=v,f=c):d=d.next=v,s>l&&(l=s)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),cu(s,h.suspenseConfig);e:{var g=e,y=h;switch(s=t,v=n,y.tag){case 1:if("function"==typeof(g=y.payload)){c=g.call(v,c,s);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(s="function"==typeof(g=y.payload)?g.call(v,c,s):g))break e;c=o({},c,s);break e;case 2:si=!0}}null!==h.callback&&(e.effectTag|=32,null===(s=i.effects)?i.effects=[h]:s.push(h))}if(null===(h=h.next)||h===u){if(null===(s=i.shared.pending))break;h=a.next=s.next,s.next=u,i.baseQueue=a=s,i.shared.pending=null}}null===d?f=c:d.next=p,i.baseState=f,i.baseQueue=d,lu(l),e.expirationTime=l,e.memoizedState=c}}function hi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var vi=Y.ReactCurrentBatchConfig,gi=(new r.Component).refs;function yi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Ys(),o=vi.suspense;(o=li(r=Qs(r,e,o),o)).payload=t,null!=n&&(o.callback=n),fi(e,o),Js(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Ys(),o=vi.suspense;(o=li(r=Qs(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),fi(e,o),Js(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ys(),r=vi.suspense;(r=li(n=Qs(n,e,r),r)).tag=2,null!=t&&(r.callback=t),fi(e,r),Js(e,n)}};function bi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Br(n,r)&&Br(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"==typeof i&&null!==i?i=ai(i):(o=mo(t)?go:ho.current,i=(r=null!=(r=t.contextTypes))?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _i(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function Ei(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=gi,ui(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ai(i):(i=mo(t)?go:ho.current,o.context=yo(e,i)),di(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&mi.enqueueReplaceState(o,o.state,null),di(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var xi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===gi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Oi(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function ki(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Cu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Iu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ru(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Au(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Iu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case te:return(t=Ru(t,e.mode,n)).return=e,t}if(xi(t)||ve(t))return(t=Au(t,e.mode,n,null)).return=e,t;Oi(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case te:return n.key===o?l(e,t,n,r):null}if(xi(n)||ve(n))return null!==o?null:f(e,t,n,r,null);Oi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||ve(r))return f(t,e=e.get(n)||null,r,o,null);Oi(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,g=null;null!==f&&v<s.length;v++){f.index>v?(g=f,f=null):g=f.sibling;var y=d(o,f,s[v],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=g}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=p(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(g=h(f,o,v,s[v],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?v:g.key),a=i(g,a,v),null===l?c=g:l.sibling=g,l=g);return e&&f.forEach((function(e){return t(o,e)})),c}function g(o,s,u,c){var l=ve(u);if("function"!=typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,g=s=0,y=null,m=u.next();null!==v&&!m.done;g++,m=u.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=d(o,v,m.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,g),null===f?l=b:f.sibling=b,f=b,v=y}if(m.done)return n(o,v),l;if(null===v){for(;!m.done;g++,m=u.next())null!==(m=p(o,m.value,c))&&(s=i(m,s,g),null===f?l=m:f.sibling=m,f=m);return l}for(v=r(o,v);!m.done;g++,m=u.next())null!==(m=h(v,o,g,m.value,c))&&(e&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=i(m,s,g),null===f?l=m:f.sibling=m,f=m);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var l="object"==typeof i&&null!==i;if(l)switch(i.$$typeof){case ee:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Si(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Au(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Nu(i.type,i.key,i.props,null,e.mode,u)).ref=Si(e,r,i),u.return=e,e=u)}return s(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ru(i,e.mode,u)).return=e,e=r}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Iu(i,e.mode,u)).return=e,e=r),s(e);if(xi(i))return v(e,r,i,u);if(ve(i))return g(e,r,i,u);if(l&&Oi(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ti=ki(!0),Pi=ki(!1),ji={},Ci={current:ji},Ni={current:ji},Ai={current:ji};function Ii(e){if(e===ji)throw Error(a(174));return e}function Ri(e,t){switch(fo(Ai,t),fo(Ni,e),fo(Ci,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$e(null,"");break;default:t=$e(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ci),fo(Ci,t)}function $i(){lo(Ci),lo(Ni),lo(Ai)}function Di(e){Ii(Ai.current);var t=Ii(Ci.current),n=$e(t,e.type);t!==n&&(fo(Ni,e),fo(Ci,n))}function Li(e){Ni.current===e&&(lo(Ci),lo(Ni))}var Mi={current:0};function Ui(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===vn||n.data===gn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Fi(e,t){return{responder:e,props:t}}var Bi=Y.ReactCurrentDispatcher,zi=Y.ReactCurrentBatchConfig,Vi=0,Wi=null,Ki=null,Hi=null,qi=!1;function Gi(){throw Error(a(321))}function Zi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ur(e[n],t[n]))return!1;return!0}function Yi(e,t,n,r,o,i){if(Vi=i,Wi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Bi.current=null===e||null===e.memoizedState?ba:wa,e=n(r,o),t.expirationTime===Vi){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Hi=Ki=null,t.updateQueue=null,Bi.current=_a,e=n(r,o)}while(t.expirationTime===Vi)}if(Bi.current=ma,t=null!==Ki&&null!==Ki.next,Vi=0,Hi=Ki=Wi=null,qi=!1,t)throw Error(a(300));return e}function Qi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e,Hi}function Ji(){if(null===Ki){var e=Wi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===Hi?Wi.memoizedState:Hi.next;if(null!==t)Hi=t,Ki=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===Hi?Wi.memoizedState=Hi=e:Hi=Hi.next=e}return Hi}function Xi(e,t){return"function"==typeof t?t(e):t}function ea(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ki,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.expirationTime;if(l<Vi){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,l>Wi.expirationTime&&(Wi.expirationTime=l,lu(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),cu(l,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,Ur(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ta(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);Ur(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function na(e){var t=Qi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e}).dispatch=ya.bind(null,Wi,e),[t.memoizedState,e]}function ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Wi.updateQueue)?(t={lastEffect:null},Wi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oa(){return Ji().memoizedState}function ia(e,t,n,r){var o=Qi();Wi.effectTag|=e,o.memoizedState=ra(1|t,n,void 0,void 0===r?null:r)}function aa(e,t,n,r){var o=Ji();r=void 0===r?null:r;var i=void 0;if(null!==Ki){var a=Ki.memoizedState;if(i=a.destroy,null!==r&&Zi(r,a.deps))return void ra(t,n,i,r)}Wi.effectTag|=e,o.memoizedState=ra(1|t,n,i,r)}function sa(e,t){return ia(516,4,e,t)}function ua(e,t){return aa(516,4,e,t)}function ca(e,t){return aa(4,2,e,t)}function la(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function fa(e,t,n){return n=null!=n?n.concat([e]):null,aa(4,2,la.bind(null,t,e),n)}function pa(){}function da(e,t){return Qi().memoizedState=[e,void 0===t?null:t],e}function ha(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function va(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Zi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ga(e,t,n){var r=Vo();Ko(98>r?98:r,(function(){e(!0)})),Ko(97<r?97:r,(function(){var r=zi.suspense;zi.suspense=void 0===t?null:t;try{e(!1),n()}finally{zi.suspense=r}}))}function ya(e,t,n){var r=Ys(),o=vi.suspense;o={expirationTime:r=Qs(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Wi||null!==i&&i===Wi)qi=!0,o.expirationTime=Vi,Wi.expirationTime=Vi;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.eagerReducer=i,o.eagerState=s,Ur(s,a))return}catch(e){}Js(e,r)}}var ma={readContext:ai,useCallback:Gi,useContext:Gi,useEffect:Gi,useImperativeHandle:Gi,useLayoutEffect:Gi,useMemo:Gi,useReducer:Gi,useRef:Gi,useState:Gi,useDebugValue:Gi,useResponder:Gi,useDeferredValue:Gi,useTransition:Gi},ba={readContext:ai,useCallback:da,useContext:ai,useEffect:sa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ia(4,2,la.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ia(4,2,e,t)},useMemo:function(e,t){var n=Qi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ya.bind(null,Wi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Qi().memoizedState=e},useState:na,useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=na(e),r=n[0],o=n[1];return sa((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(!1),n=t[0];return t=t[1],[da(ga.bind(null,t,e),[t,e]),n]}},wa={readContext:ai,useCallback:ha,useContext:ai,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:va,useReducer:ea,useRef:oa,useState:function(){return ea(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ea(Xi),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(Xi),n=t[0];return t=t[1],[ha(ga.bind(null,t,e),[t,e]),n]}},_a={readContext:ai,useCallback:ha,useContext:ai,useEffect:ua,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:va,useReducer:ta,useRef:oa,useState:function(){return ta(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ta(Xi),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ta(Xi),n=t[0];return t=t[1],[ha(ga.bind(null,t,e),[t,e]),n]}},Ea=null,xa=null,Sa=!1;function Oa(e,t){var n=Pu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ta(e){if(Sa){var t=xa;if(t){var n=t;if(!ka(e,t)){if(!(t=xn(n.nextSibling))||!ka(e,t))return e.effectTag=-1025&e.effectTag|2,Sa=!1,void(Ea=e);Oa(Ea,n)}Ea=e,xa=xn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Sa=!1,Ea=e}}function Pa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ea=e}function ja(e){if(e!==Ea)return!1;if(!Sa)return Pa(e),Sa=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wn(t,e.memoizedProps))for(t=xa;t;)Oa(e,t),t=xn(t.nextSibling);if(Pa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){xa=xn(e.nextSibling);break e}t--}else"$"!==n&&n!==gn&&n!==vn||t++}e=e.nextSibling}xa=null}}else xa=Ea?xn(e.stateNode.nextSibling):null;return!0}function Ca(){xa=Ea=null,Sa=!1}var Na=Y.ReactCurrentOwner,Aa=!1;function Ia(e,t,n,r){t.child=null===e?Pi(t,null,n,r):Ti(t,e.child,n,r)}function Ra(e,t,n,r,o){n=n.render;var i=t.ref;return ii(t,o),r=Yi(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ia(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ya(e,t,o))}function $a(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||ju(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Da(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Br)(o,r)&&e.ref===t.ref)?Ya(e,t,i):(t.effectTag|=1,(e=Cu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Da(e,t,n,r,o,i){return null!==e&&Br(e.memoizedProps,r)&&e.ref===t.ref&&(Aa=!1,o<i)?(t.expirationTime=e.expirationTime,Ya(e,t,i)):Ma(e,t,n,r,i)}function La(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ma(e,t,n,r,o){var i=mo(n)?go:ho.current;return i=yo(t,i),ii(t,o),n=Yi(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ia(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ya(e,t,o))}function Ua(e,t,n,r,o){if(mo(n)){var i=!0;Eo(t)}else i=!1;if(ii(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),wi(t,n,r),Ei(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;c="object"==typeof c&&null!==c?ai(c):yo(t,c=mo(n)?go:ho.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&_i(t,a,r,c),si=!1;var p=t.memoizedState;a.state=p,di(t,r,a,o),u=t.memoizedState,s!==r||p!==u||vo.current||si?("function"==typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=si||bi(t,n,s,r,p,u,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ci(e,t),s=t.memoizedProps,a.props=t.type===t.elementType?s:Qo(t.type,s),u=a.context,c="object"==typeof(c=n.contextType)&&null!==c?ai(c):yo(t,c=mo(n)?go:ho.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&_i(t,a,r,c),si=!1,u=t.memoizedState,a.state=u,di(t,r,a,o),p=t.memoizedState,s!==r||u!==p||vo.current||si?("function"==typeof l&&(yi(t,n,l,r),p=t.memoizedState),(l=si||bi(t,n,s,r,u,p,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Fa(e,t,n,r,i,o)}function Fa(e,t,n,r,o,i){La(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&xo(t,n,!1),Ya(e,t,i);r=t.stateNode,Na.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,s,i)):Ia(e,t,s,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function Ba(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Ri(e,t.containerInfo)}var za,Va,Wa,Ka={dehydrated:null,retryTime:0};function Ha(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Mi.current,s=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(s=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),fo(Mi,1&a),null===e){if(void 0!==i.fallback&&Ta(t),s){if(s=i.fallback,(i=Au(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Au(s,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ka,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Pi(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,s){if(i=i.fallback,(n=Cu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(s=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(o=Cu(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ka,t.child=n,o}return n=Ti(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,s){if(s=i.fallback,(i=Au(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Au(s,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ka,t.child=i,n}return t.memoizedState=null,t.child=Ti(t,e,i.children,n)}function qa(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oi(e.return,t)}function Ga(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Za(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ia(e,t,r.children,n),0!=(2&(r=Mi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&qa(e,n);else if(19===e.tag)qa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Mi,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ui(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ga(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ui(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ga(t,!0,n,null,i,t.lastEffect);break;case"together":Ga(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ya(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&lu(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Qa(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ja(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return mo(t.type)&&bo(),null;case 3:return $i(),lo(vo),lo(ho),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!ja(t)||(t.effectTag|=4),null;case 5:Li(t),n=Ii(Ai.current);var i=t.type;if(null!==e&&null!=t.stateNode)Va(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ii(Ci.current),ja(t)){r=t.stateNode,i=t.type;var s=t.memoizedProps;switch(r[kn]=t,r[Tn]=s,i){case"iframe":case"object":case"embed":Ht("load",r);break;case"video":case"audio":for(e=0;e<Ze.length;e++)Ht(Ze[e],r);break;case"source":Ht("error",r);break;case"img":case"image":case"link":Ht("error",r),Ht("load",r);break;case"form":Ht("reset",r),Ht("submit",r);break;case"details":Ht("toggle",r);break;case"input":xe(r,s),Ht("invalid",r),sn(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ht("invalid",r),sn(n,"onChange");break;case"textarea":Ne(r,s),Ht("invalid",r),sn(n,"onChange")}for(var u in rn(i,s),e=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):S.hasOwnProperty(u)&&null!=c&&sn(n,u)}switch(i){case"input":we(r),ke(r,s,!0);break;case"textarea":we(r),Ie(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=un)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===an&&(e=Re(i)),e===an?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[kn]=t,e[Tn]=r,za(e,t),t.stateNode=e,u=on(i,r),i){case"iframe":case"object":case"embed":Ht("load",e),c=r;break;case"video":case"audio":for(c=0;c<Ze.length;c++)Ht(Ze[c],e);c=r;break;case"source":Ht("error",e),c=r;break;case"img":case"image":case"link":Ht("error",e),Ht("load",e),c=r;break;case"form":Ht("reset",e),Ht("submit",e),c=r;break;case"details":Ht("toggle",e),c=r;break;case"input":xe(e,r),c=Ee(e,r),Ht("invalid",e),sn(n,"onChange");break;case"option":c=Pe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),Ht("invalid",e),sn(n,"onChange");break;case"textarea":Ne(e,r),c=Ce(e,r),Ht("invalid",e),sn(n,"onChange");break;default:c=r}rn(i,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?tn(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&Me(e,f):"children"===s?"string"==typeof f?("textarea"!==i||""!==f)&&Ue(e,f):"number"==typeof f&&Ue(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=f&&sn(n,s):null!=f&&Q(e,s,f,u))}switch(i){case"input":we(e),ke(e,r,!1);break;case"textarea":we(e),Ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+me(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?je(e,!!r.multiple,n,!1):null!=r.defaultValue&&je(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=un)}bn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Wa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ii(Ai.current),Ii(Ci.current),ja(t)?(n=t.stateNode,r=t.memoizedProps,n[kn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[kn]=t,t.stateNode=n)}return null;case 13:return lo(Mi),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&ja(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(s=t.firstEffect)?(t.firstEffect=i,i.nextEffect=s):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Mi.current)?Ns===Ss&&(Ns=Os):(Ns!==Ss&&Ns!==Os||(Ns=ks),0!==Ds&&null!==Ps&&(Lu(Ps,Cs),Mu(Ps,Ds)))),(n||r)&&(t.effectTag|=4),null);case 4:return $i(),null;case 10:return ri(t),null;case 19:if(lo(Mi),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(s=r.rendering)){if(i)Qa(r,!1);else if(Ns!==Ss||null!==e&&0!=(64&e.effectTag))for(s=t.child;null!==s;){if(null!==(e=Ui(s))){for(t.effectTag|=64,Qa(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)s=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,s=e.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return fo(Mi,1&Mi.current|2),t.child}s=s.sibling}}else{if(!i)if(null!==(e=Ui(s))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zo()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Qa(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=zo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zo(),n.sibling=null,t=Mi.current,fo(Mi,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:mo(e.type)&&bo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if($i(),lo(vo),lo(ho),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Li(e),null;case 13:return lo(Mi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return lo(Mi),null;case 4:return $i(),null;case 10:return ri(e),null;default:return null}}function es(e,t){return{value:e,source:t,stack:ye(t)}}za=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var s,u,c=t.stateNode;switch(Ii(Ci.current),e=null,n){case"input":a=Ee(c,a),r=Ee(c,r),e=[];break;case"option":a=Pe(c,a),r=Pe(c,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Ce(c,a),r=Ce(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=un)}for(s in rn(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?e||(e=[]):(e=e||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(e||(e=[]),e.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(s,l)):"children"===s?c===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=l&&sn(i,s),e||c===l||(e=[])):(e=e||[]).push(s,l))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Wa=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var ts="function"==typeof WeakSet?WeakSet:Set;function ns(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ye(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function rs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eu(e,t)}else t.current=null}function os(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function as(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ss(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void as(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Qo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&hi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}hi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&bn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&$t(n)))))}throw Error(a(163))}function us(e,t,n){switch("function"==typeof ku&&ku(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Ko(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Eu(o,e)}}e=e.next}while(e!==r)}))}break;case 1:rs(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Eu(e,t)}}(t,n);break;case 5:rs(t);break;case 4:hs(e,t,n)}}function cs(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&cs(t)}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function fs(e){e:{for(var t=e.return;null!==t;){if(ls(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ue(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ls(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?ps(e,n,t):ds(e,n,t)}function ps(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=un));else if(4!==r&&null!==(e=e.child))for(ps(e,t,n),e=e.sibling;null!==e;)ps(e,t,n),e=e.sibling}function ds(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ds(e,t,n),e=e.sibling;null!==e;)ds(e,t,n),e=e.sibling}function hs(e,t,n){for(var r,o,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,l=n,f=c;;)if(us(u,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(us(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function vs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void is(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Tn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),on(e,o),t=on(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?tn(n,u):"dangerouslySetInnerHTML"===s?Me(n,u):"children"===s?Ue(n,u):Q(n,s,u,t)}switch(e){case"input":Oe(n,r);break;case"textarea":Ae(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?je(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?je(n,!!r.multiple,r.defaultValue,!0):je(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,$t(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Ms=zo()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=en("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void gs(t);case 19:return void gs(t)}throw Error(a(163))}function gs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ts),t.forEach((function(t){var r=Su.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var ys="function"==typeof WeakMap?WeakMap:Map;function ms(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fs||(Fs=!0,Bs=r),ns(e,t)},n}function bs(e,t,n){(n=li(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return ns(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===zs?zs=new Set([this]):zs.add(this),ns(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var ws,_s=Math.ceil,Es=Y.ReactCurrentDispatcher,xs=Y.ReactCurrentOwner,Ss=0,Os=3,ks=4,Ts=0,Ps=null,js=null,Cs=0,Ns=Ss,As=null,Is=1073741823,Rs=1073741823,$s=null,Ds=0,Ls=!1,Ms=0,Us=null,Fs=!1,Bs=null,zs=null,Vs=!1,Ws=null,Ks=90,Hs=null,qs=0,Gs=null,Zs=0;function Ys(){return 0!=(48&Ts)?1073741821-(zo()/10|0):0!==Zs?Zs:Zs=1073741821-(zo()/10|0)}function Qs(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Vo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&Ts))return Cs;if(null!==n)e=Yo(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Yo(e,150,100);break;case 97:case 96:e=Yo(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Ps&&e===Cs&&--e,e}function Js(e,t){if(50<qs)throw qs=0,Gs=null,Error(a(185));if(null!==(e=Xs(e,t))){var n=Vo();1073741823===t?0!=(8&Ts)&&0==(48&Ts)?ru(e):(tu(e),0===Ts&&Go()):tu(e),0==(4&Ts)||98!==n&&99!==n||(null===Hs?Hs=new Map([[e,t]]):(void 0===(n=Hs.get(e))||n>t)&&Hs.set(e,t))}}function Xs(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Ps===o&&(lu(t),Ns===ks&&Lu(o,Cs)),Mu(o,t)),o}function eu(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Du(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function tu(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=qo(ru.bind(null,e));else{var t=eu(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ys();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==$o&&ko(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?qo(ru.bind(null,e)):Ho(r,nu.bind(null,e),{timeout:10*(1073741821-t)-zo()}),e.callbackNode=t}}}function nu(e,t){if(Zs=0,t)return Uu(e,t=Ys()),tu(e),null;var n=eu(e);if(0!==n){if(t=e.callbackNode,0!=(48&Ts))throw Error(a(327));if(bu(),e===Ps&&n===Cs||au(e,n),null!==js){var r=Ts;Ts|=16;for(var o=uu();;)try{pu();break}catch(t){su(e,t)}if(ni(),Ts=r,Es.current=o,1===Ns)throw t=As,au(e,n),Lu(e,n),tu(e),t;if(null===js)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Ns,Ps=null,r){case Ss:case 1:throw Error(a(345));case 2:Uu(e,2<n?2:n);break;case Os:if(Lu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(o)),1073741823===Is&&10<(o=Ms+500-zo())){if(Ls){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,au(e,n);break}}if(0!==(i=eu(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=_n(gu.bind(null,e),o);break}gu(e);break;case ks:if(Lu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=vu(o)),Ls&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,au(e,n);break}if(0!==(o=eu(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Rs?r=10*(1073741821-Rs)-zo():1073741823===Is?r=0:(r=10*(1073741821-Is)-5e3,0>(r=(o=zo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_s(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=_n(gu.bind(null,e),r);break}gu(e);break;case 5:if(1073741823!==Is&&null!==$s){i=Is;var s=$s;if(0>=(r=0|s.busyMinDurationMs)?r=0:(o=0|s.busyDelayMs,r=(i=zo()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Lu(e,n),e.timeoutHandle=_n(gu.bind(null,e),r);break}}gu(e);break;default:throw Error(a(329))}if(tu(e),e.callbackNode===t)return nu.bind(null,e)}}return null}function ru(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Ts))throw Error(a(327));if(bu(),e===Ps&&t===Cs||au(e,t),null!==js){var n=Ts;Ts|=16;for(var r=uu();;)try{fu();break}catch(t){su(e,t)}if(ni(),Ts=n,Es.current=r,1===Ns)throw n=As,au(e,t),Lu(e,t),tu(e),n;if(null!==js)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Ps=null,gu(e),tu(e)}return null}function ou(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&Go()}}function iu(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&Go()}}function au(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,En(n)),null!==js)for(n=js.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&bo();break;case 3:$i(),lo(vo),lo(ho);break;case 5:Li(r);break;case 4:$i();break;case 13:case 19:lo(Mi);break;case 10:ri(r)}n=n.return}Ps=e,js=Cu(e.current,null),Cs=t,Ns=Ss,As=null,Rs=Is=1073741823,$s=null,Ds=0,Ls=!1}function su(e,t){for(;;){try{if(ni(),Bi.current=ma,qi)for(var n=Wi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Vi=0,Hi=Ki=Wi=null,qi=!1,null===js||null===js.return)return Ns=1,As=t,js=null;e:{var o=e,i=js.return,a=js,s=t;if(t=Cs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Mi.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var v=f.updateQueue;if(null===v){var g=new Set;g.add(u),f.updateQueue=g}else v.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=li(1073741823,null);y.tag=2,fi(a,y)}a.expirationTime=1073741823;break e}s=void 0,a=t;var m=o.pingCache;if(null===m?(m=o.pingCache=new ys,s=new Set,m.set(u,s)):void 0===(s=m.get(u))&&(s=new Set,m.set(u,s)),!s.has(a)){s.add(a);var b=xu.bind(null,o,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);s=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ye(a))}5!==Ns&&(Ns=2),s=es(s,a),f=i;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=t,pi(f,ms(f,u,t));break e;case 1:u=s;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===zs||!zs.has(_)))){f.effectTag|=4096,f.expirationTime=t,pi(f,bs(f,u,t));break e}}f=f.return}while(null!==f)}js=hu(js)}catch(e){t=e;continue}break}}function uu(){var e=Es.current;return Es.current=ma,null===e?ma:e}function cu(e,t){e<Is&&2<e&&(Is=e),null!==t&&e<Rs&&2<e&&(Rs=e,$s=t)}function lu(e){e>Ds&&(Ds=e)}function fu(){for(;null!==js;)js=du(js)}function pu(){for(;null!==js&&!Do();)js=du(js)}function du(e){var t=ws(e.alternate,e,Cs);return e.memoizedProps=e.pendingProps,null===t&&(t=hu(e)),xs.current=null,t}function hu(e){js=e;do{var t=js.alternate;if(e=js.return,0==(2048&js.effectTag)){if(t=Ja(t,js,Cs),1===Cs||1!==js.childExpirationTime){for(var n=0,r=js.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}js.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=js.firstEffect),null!==js.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=js.firstEffect),e.lastEffect=js.lastEffect),1<js.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=js:e.firstEffect=js,e.lastEffect=js))}else{if(null!==(t=Xa(js)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=js.sibling))return t;js=e}while(null!==js);return Ns===Ss&&(Ns=5),null}function vu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function gu(e){var t=Vo();return Ko(99,yu.bind(null,e,t)),null}function yu(e,t){do{bu()}while(null!==Ws);if(0!=(48&Ts))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=vu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Ps&&(js=Ps=null,Cs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=Ts;Ts|=32,xs.current=null,yn=Kt;var s=dn();if(hn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(e){u=null;break e}var p=0,d=-1,h=-1,v=0,g=0,y=s,m=null;t:for(;;){for(var b;y!==u||0!==l&&3!==y.nodeType||(d=p+l),y!==f||0!==c&&3!==y.nodeType||(h=p+c),3===y.nodeType&&(p+=y.nodeValue.length),null!==(b=y.firstChild);)m=y,y=b;for(;;){if(y===s)break t;if(m===u&&++v===l&&(d=p),m===f&&++g===c&&(h=p),null!==(b=y.nextSibling))break;m=(y=m).parentNode}y=b}u=-1===d||-1===h?null:{start:d,end:h}}else u=null}u=u||{start:0,end:0}}else u=null;mn={activeElementDetached:null,focusedElem:s,selectionRange:u},Kt=!1,Us=o;do{try{mu()}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=o;do{try{for(s=e,u=t;null!==Us;){var w=Us.effectTag;if(16&w&&Ue(Us.stateNode,""),128&w){var _=Us.alternate;if(null!==_){var E=_.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&w){case 2:fs(Us),Us.effectTag&=-3;break;case 6:fs(Us),Us.effectTag&=-3,vs(Us.alternate,Us);break;case 1024:Us.effectTag&=-1025;break;case 1028:Us.effectTag&=-1025,vs(Us.alternate,Us);break;case 4:vs(Us.alternate,Us);break;case 8:hs(s,l=Us,u),cs(l)}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);if(E=mn,_=dn(),w=E.focusedElem,u=E.selectionRange,_!==w&&w&&w.ownerDocument&&pn(w.ownerDocument.documentElement,w)){null!==u&&hn(w)&&(_=u.start,void 0===(E=u.end)&&(E=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(E,w.value.length)):(E=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(E=E.getSelection(),l=w.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!E.extend&&s>u&&(l=u,u=s,s=l),l=fn(w,s),f=fn(w,u),l&&f&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),s>u?(E.addRange(_),E.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),E.addRange(_))))),_=[];for(E=w;E=E.parentNode;)1===E.nodeType&&_.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(E=_[w]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Kt=!!yn,mn=yn=null,e.current=n,Us=o;do{try{for(w=e;null!==Us;){var x=Us.effectTag;if(36&x&&ss(w,Us.alternate,Us),128&x){_=void 0;var S=Us.ref;if(null!==S){var O=Us.stateNode;Us.tag,_=O,"function"==typeof S?S(_):S.current=_}}Us=Us.nextEffect}}catch(e){if(null===Us)throw Error(a(330));Eu(Us,e),Us=Us.nextEffect}}while(null!==Us);Us=null,Lo(),Ts=i}else e.current=n;if(Vs)Vs=!1,Ws=e,Ks=t;else for(Us=o;null!==Us;)t=Us.nextEffect,Us.nextEffect=null,Us=t;if(0===(t=e.firstPendingTime)&&(zs=null),1073741823===t?e===Gs?qs++:(qs=0,Gs=e):qs=0,"function"==typeof Ou&&Ou(n.stateNode,r),tu(e),Fs)throw Fs=!1,e=Bs,Bs=null,e;return 0!=(8&Ts)||Go(),null}function mu(){for(;null!==Us;){var e=Us.effectTag;0!=(256&e)&&os(Us.alternate,Us),0==(512&e)||Vs||(Vs=!0,Ho(97,(function(){return bu(),null}))),Us=Us.nextEffect}}function bu(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Ko(e,wu)}}function wu(){if(null===Ws)return!1;var e=Ws;if(Ws=null,0!=(48&Ts))throw Error(a(331));var t=Ts;for(Ts|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:is(5,n),as(5,n)}}catch(t){if(null===e)throw Error(a(330));Eu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Ts=t,Go(),!0}function _u(e,t,n){fi(e,t=ms(e,t=es(n,t),1073741823)),null!==(e=Xs(e,1073741823))&&tu(e)}function Eu(e,t){if(3===e.tag)_u(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){_u(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zs||!zs.has(r))){fi(n,e=bs(n,e=es(t,e),1073741823)),null!==(n=Xs(n,1073741823))&&tu(n);break}}n=n.return}}function xu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Ps===e&&Cs===n?Ns===ks||Ns===Os&&1073741823===Is&&zo()-Ms<500?au(e,Cs):Ls=!0:Du(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,tu(e)))}function Su(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Qs(t=Ys(),e,null)),null!==(e=Xs(e,t))&&tu(e)}ws=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||vo.current)Aa=!0;else{if(r<n){switch(Aa=!1,t.tag){case 3:Ba(t),Ca();break;case 5:if(Di(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:mo(t.type)&&Eo(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,fo(Jo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Ha(e,t,n):(fo(Mi,1&Mi.current),null!==(t=Ya(e,t,n))?t.sibling:null);fo(Mi,1&Mi.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Za(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),fo(Mi,Mi.current),!r)return null}return Ya(e,t,n)}Aa=!1}}else Aa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=yo(t,ho.current),ii(t,n),o=Yi(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mo(r)){var i=!0;Eo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ui(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&yi(t,r,s,e),o.updater=mi,t.stateNode=o,o._reactInternalFiber=t,Ei(t,r,e,n),t=Fa(null,t,r,!0,i,n)}else t.tag=0,Ia(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return ju(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(o),e=Qo(o,e),i){case 0:t=Ma(null,t,o,e,n);break e;case 1:t=Ua(null,t,o,e,n);break e;case 11:t=Ra(null,t,o,e,n);break e;case 14:t=$a(null,t,o,Qo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ma(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 3:if(Ba(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),di(t,r,null,n),(r=t.memoizedState.element)===o)Ca(),t=Ya(e,t,n);else{if((o=t.stateNode.hydrate)&&(xa=xn(t.stateNode.containerInfo.firstChild),Ea=t,o=Sa=!0),o)for(n=Pi(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ia(e,t,r,n),Ca();t=t.child}return t;case 5:return Di(t),null===e&&Ta(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,wn(r,o)?s=null:null!==i&&wn(r,i)&&(t.effectTag|=16),La(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ia(e,t,s,n),t=t.child),t;case 6:return null===e&&Ta(t),null;case 13:return Ha(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ra(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Jo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0==(i=Ur(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=Ya(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&i)){1===u.tag&&((l=li(n,null)).tag=2,fi(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),oi(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Ia(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ii(t,n),r=r(o=ai(o,i.unstable_observedBits)),t.effectTag|=1,Ia(e,t,r,n),t.child;case 14:return i=Qo(o=t.type,t.pendingProps),$a(e,t,o,i=Qo(o.type,i),r,n);case 15:return Da(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,mo(r)?(e=!0,Eo(t)):e=!1,ii(t,n),wi(t,r,o),Ei(t,r,o,n),Fa(null,t,r,!0,e,n);case 19:return Za(e,t,n)}throw Error(a(156,t.tag))};var Ou=null,ku=null;function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Pu(e,t,n,r){return new Tu(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cu(e,t){var n=e.alternate;return null===n?((n=Pu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nu(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)ju(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ne:return Au(n.children,o,i,t);case se:s=8,o|=7;break;case re:s=8,o|=1;break;case oe:return(e=Pu(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case ce:return(e=Pu(13,n,t,o)).type=ce,e.elementType=ce,e.expirationTime=i,e;case le:return(e=Pu(19,n,t,o)).elementType=le,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:s=10;break e;case ae:s=9;break e;case ue:s=11;break e;case fe:s=14;break e;case pe:s=16,r=null;break e;case de:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Pu(s,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Au(e,t,n,r){return(e=Pu(7,e,r,t)).expirationTime=n,e}function Iu(e,t,n){return(e=Pu(6,e,null,t)).expirationTime=n,e}function Ru(e,t,n){return(t=Pu(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Du(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Lu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Mu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Uu(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Fu(e,t,n,r){var o=t.current,i=Ys(),s=vi.suspense;i=Qs(i,o,s);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(mo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(mo(c)){n=_o(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),Js(o,i),i}function Bu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function zu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Vu(e,t){zu(e,t),(e=e.alternate)&&zu(e,t)}function Wu(e,t,n){var r=new $u(e,t,n=null!=n&&!0===n.hydrate),o=Pu(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,ui(o),e[Pn]=r.current,n&&0!==t&&function(e,t){var n=Qe(t);Ot.forEach((function(e){dt(e,t,n)})),kt.forEach((function(e){dt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ku(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var s=o;o=function(){var e=Bu(a);s.call(e)}}Fu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Wu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var u=o;o=function(){var e=Bu(a);u.call(e)}}iu((function(){Fu(t,a,e,o)}))}return Bu(a)}function qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ku(t))throw Error(a(200));return qu(e,t,null,n)}Wu.prototype.render=function(e){Fu(e,this._internalRoot,null,null)},Wu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Fu(null,e,null,(function(){t[Pn]=null}))},ht=function(e){if(13===e.tag){var t=Yo(Ys(),150,100);Js(e,t),Vu(e,t)}},vt=function(e){13===e.tag&&(Js(e,3),Vu(e,3))},gt=function(e){if(13===e.tag){var t=Ys();Js(e,t=Qs(t,e,null)),Vu(e,t)}},P=function(e,t,n){switch(t){case"input":if(Oe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=An(r);if(!o)throw Error(a(90));_e(r),Oe(r,o)}}}break;case"textarea":Ae(e,n);break;case"select":null!=(t=n.value)&&je(e,!!n.multiple,t,!1)}},R=ou,$=function(e,t,n,r,o){var i=Ts;Ts|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(Ts=i)&&Go()}},D=function(){0==(49&Ts)&&(function(){if(null!==Hs){var e=Hs;Hs=null,e.forEach((function(e,t){Uu(t,e),tu(t)})),Go()}}(),bu())},L=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&Go()}};var Zu={Events:[Cn,Nn,An,k,x,Un,function(e){rt(e,Mn)},A,I,Yt,at,bu,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Ou=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},ku=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(o({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:jn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zu,t.createPortal=Gu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Ts))throw Error(a(187));var n=Ts;Ts|=1;try{return Ko(99,e.bind(null,t))}finally{Ts=n,Go()}},t.hydrate=function(e,t,n){if(!Ku(t))throw Error(a(200));return Hu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ku(t))throw Error(a(200));return Hu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ku(e))throw Error(a(40));return!!e._reactRootContainer&&(iu((function(){Hu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Pn]=null}))})),!0)},t.unstable_batchedUpdates=ou,t.unstable_createPortal=function(e,t){return Gu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ku(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Hu(e,t,n,!1,r)},t.version="16.14.0"},2788:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(3975)},8447:(e,t,n)=>{"use strict";var r=n(4516),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function _(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var x=E.prototype=new _;x.constructor=E,r(x,w.prototype),x.isPureReactComponent=!0;var S={current:null},O=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)O.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:S.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var j=/\/+/g,C=[];function N(e,t,n,r){if(C.length){var o=C.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>C.length&&C.push(e)}function I(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+$(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=t+$(o=e[u],u);s+=I(o,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null))for(e=c.call(e),u=0;!(o=e.next()).done;)s+=I(o=o.value,c=t+$(o,u++),n,r);else if("object"===o)throw n=""+e,Error(y(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function R(e,t,n){return null==e?0:I(e,"",t,n)}function $(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function D(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?M(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(j,"$&/")+"/")+n)),r.push(e))}function M(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(j,"$&/")+"/"),R(e,L,t=N(t,i,r,o)),A(t)}var U={current:null};function F(){var e=U.current;if(null===e)throw Error(y(321));return e}var B={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return M(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,D,t=N(null,null,t,n)),A(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return M(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=E,t.StrictMode=u,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var o=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)O.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},2735:(e,t,n)=>{"use strict";e.exports=n(8447)},921:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(7811),o=n(9714),i=n(2412),a=n(4002),s=n(7430);function u(e){return 0===e.length?s.y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var c=n(5769),l=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 a=this.operator,s=function(e,t,n){if(e){if(e instanceof r.L)return e;if(e[o.b])return e[o.b]()}return e||t||n?new r.L(e,t,n):new r.L(i.c)}(e,t,n);if(a?s.add(a.call(s,this.source)):s.add(this.source||c.v.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.v.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){c.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),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.L?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(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[a.L]=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:u(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(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 f(e){if(e||(e=c.v.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},2412:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});var r=n(5769),o=n(1450),i={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,o.z)(e)},complete:function(){}}},2585:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>f});var r=n(7080),o=n(921),i=n(7811),a=n(1098),s=n(7043),u=n(6362),c=n(9714),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.ZT(t,e),t}(i.L),f=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 r.ZT(t,e),t.prototype[c.b]=function(){return new l(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 s.N;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 s.N;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 s.N;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 s.N;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new s.N;return this.hasError?(e.error(this.thrownError),a.w.EMPTY):this.isStopped?(e.complete(),a.w.EMPTY):(this.observers.push(e),new u.W(this,e))},t.prototype.asObservable=function(){var e=new o.y;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(o.y),p=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r.ZT(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.w.EMPTY},t}(f)},6362:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(7080),o=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.ZT(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(1098).w)},7811:(e,t,n)=>{"use strict";n.d(t,{L:()=>l});var r=n(7080),o=n(9147),i=n(2412),a=n(1098),s=n(9714),u=n(5769),c=n(1450),l=function(e){function t(n,r,o){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.c;break;case 1:if(!n){a.destination=i.c;break}if("object"==typeof n){n instanceof t?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,n,r,o)}return a}return r.ZT(t,e),t.prototype[s.b]=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.w),f=function(e){function t(t,n,r,a){var s,u=e.call(this)||this;u._parentSubscriber=t;var c=u;return(0,o.m)(n)?s=n:n&&(s=n.next,r=n.error,a=n.complete,n!==i.c&&(c=Object.create(n),(0,o.m)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=r,u._complete=a,u}return r.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.v.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.v.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):(0,c.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,c.z)(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.v.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.v.useDeprecatedSynchronousErrorHandling)throw e;(0,c.z)(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!u.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return u.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,c.z)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},1098:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var r=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}(),o=n(1167),i=n(9147),a=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}(),s=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,s=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,s instanceof e)s.remove(this);else if(null!==s)for(var p=0;p<s.length;++p)s[p].remove(this);if((0,i.m)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(e){t=e instanceof a?u(e.errors):[e]}}if(r(f)){p=-1;for(var d=f.length;++p<d;){var h=f[p];if((0,o.K)(h))try{h.unsubscribe()}catch(e){t=t||[],e instanceof a?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new a(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 u(e){return e.reduce((function(e,t){return e.concat(t instanceof a?t.errors:t)}),[])}},5769:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},4002:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},9714:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},7043:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1450:(e,t,n)=>{"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,{z:()=>r})},7430:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{y:()=>r})},9147:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{m:()=>r})},1167:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{K:()=>r})},7080:(e,t,n)=>{"use strict";n.d(t,{ZT:()=>o});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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}},9666:(e,t)=>{"use strict";var n,r,o,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(c,0),e}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var y=!1,m=null,b=-1,w=5,_=0;i=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,x=E.port2;E.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();_=e+w;try{m(!0,e)?x.postMessage(null):(y=!1,m=null)}catch(e){throw x.postMessage(null),e}}else y=!1},n=function(e){m=e,y||(y=!0,x.postMessage(null))},r=function(e,n){b=d((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function O(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>T(a,n))void 0!==u&&0>T(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>T(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],j=[],C=1,N=null,A=3,I=!1,R=!1,$=!1;function D(e){for(var t=O(j);null!==t;){if(null===t.callback)k(j);else{if(!(t.startTime<=e))break;k(j),t.sortIndex=t.expirationTime,S(P,t)}t=O(j)}}function L(e){if($=!1,D(e),!R)if(null!==O(P))R=!0,n(M);else{var t=O(j);null!==t&&r(L,t.startTime-e)}}function M(e,n){R=!1,$&&($=!1,o()),I=!0;var a=A;try{for(D(n),N=O(P);null!==N&&(!(N.expirationTime>n)||e&&!i());){var s=N.callback;if(null!==s){N.callback=null,A=N.priorityLevel;var u=s(N.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?N.callback=u:N===O(P)&&k(P),D(n)}else k(P);N=O(P)}if(null!==N)var c=!0;else{var l=O(j);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{N=null,A=a,I=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||I||(R=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return O(P)},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:U(e)}else a=U(e),u=s;return e={id:C++,callback:i,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(e.sortIndex=u,S(j,e),null===O(P)&&e===O(j)&&($?o():$=!0,r(L,u-s))):(e.sortIndex=a,S(P,e),R||I||(R=!0,n(M))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=O(P);return n!==N&&null!==N&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<N.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}}},9146:(e,t,n)=>{"use strict";e.exports=n(9666)},3710:(e,t,n)=>{"use strict";n.d(t,{BP:()=>z,UO:()=>oe});var r=Object.freeze({__proto__:null,get start(){return Ue},get ensureJQuerySupport(){return de},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return G},get setUnmountMaxTime(){return Z},get setUnloadMaxTime(){return Y},get registerApplication(){return Oe},get unregisterApplication(){return Te},get getMountedApps(){return Ee},get getAppStatus(){return Se},get unloadApplication(){return Pe},get checkActivityFunctions(){return ke},get getAppNames(){return xe},get pathToActiveWhen(){return Ne},get navigateToUrl(){return oe},get triggerAppChange(){return $e},get addErrorHandler(){return l},get removeErrorHandler(){return f},get mountRootParcel(){return z},get NOT_LOADED(){return h},get LOADING_SOURCE_CODE(){return v},get NOT_BOOTSTRAPPED(){return g},get BOOTSTRAPPING(){return y},get NOT_MOUNTED(){return m},get MOUNTING(){return b},get UPDATING(){return _},get LOAD_ERROR(){return x},get MOUNTED(){return w},get UNMOUNTING(){return E},get SKIP_BECAUSE_BROKEN(){return S}});function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,s=function(){try{var e=new a("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?a:"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},u=[];function c(e,t,n){var r=d(e,t,n);u.length?u.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function l(e){if("function"!=typeof e)throw Error(p(28,!1));u.push(e)}function f(e){if("function"!=typeof e)throw Error(p(29,!1));var t=!1;return u=u.filter((function(n){var r=n===e;return t=t||r,!r})),t}function p(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function d(e,t,n){var r,o="".concat(j(t)," '").concat(T(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(p(30,!1,t.status,T(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=T(t),t.status=n,r}var h="NOT_LOADED",v="LOADING_SOURCE_CODE",g="NOT_BOOTSTRAPPED",y="BOOTSTRAPPING",m="NOT_MOUNTED",b="MOUNTING",w="MOUNTED",_="UPDATING",E="UNMOUNTING",x="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function O(e){return e.status===w}function k(e){try{return e.activeWhen(window.location)}catch(t){return c(t,e,S),!1}}function T(e){return e.name}function P(e){return Boolean(e.unmountThisParcel)}function j(e){return P(e)?"parcel":"application"}function C(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function A(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!N(t,(function(e){return"function"!=typeof e}))));var t}function I(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=j(e),o=T(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return R(n)?n:Promise.reject(p(15,!1,r,o,t,a))}))}),Promise.resolve())}}function R(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function $(e,t){return Promise.resolve().then((function(){return e.status!==g?e:(e.status=y,e.bootstrap?Q(e,"bootstrap").then(n).catch((function(n){if(t)throw d(n,e,S);return c(n,e,S),e})):Promise.resolve().then(n))}));function n(){return e.status=m,e}}function D(e,t){return Promise.resolve().then((function(){if(e.status!==w)return e;e.status=E;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw d(r,e,S);c(r,e,S)}))})).then((function(){return e}));function r(){return Q(e,"unmount").then((function(){e.status=m})).catch((function(n){if(t)throw d(n,e,S);c(n,e,S)}))}}))}var L=!1,M=!1;function U(e,t){return Promise.resolve().then((function(){return e.status!==m?e:(L||(window.dispatchEvent(new s("single-spa:before-first-mount")),L=!0),Q(e,"mount").then((function(){return e.status=w,M||(window.dispatchEvent(new s("single-spa:first-mount")),M=!0),e})).catch((function(n){return e.status=w,D(e,!0).then(r,r);function r(){if(t)throw d(n,e,S);return c(n,e,S),e}})))}))}var F=0,B={parcels:{}};function z(){return V.apply(B,arguments)}function V(e,t){var n=this;if(!e||"object"!==o(e)&&"function"!=typeof e)throw Error(p(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(p(3,!1,o(e.name)));if("object"!==o(t))throw Error(p(4,!1,name,o(t)));if(!t.domElement)throw Error(p(5,!1,name));var r,i=F++,a="function"==typeof e,s=a?e:function(){return Promise.resolve(e)},u={id:i,parcels:{},status:a?v:g,customProps:t,parentName:T(n),unmountThisParcel:function(){return y.then((function(){if(u.status!==w)throw Error(p(6,!1,name,u.status));return D(u,!0)})).then((function(e){return u.parentName&&delete n.parcels[u.id],e})).then((function(e){return l(e),e})).catch((function(e){throw u.status=S,f(e),e}))}};n.parcels[i]=u;var c=s();if(!c||"function"!=typeof c.then)throw Error(p(7,!1));var l,f,h=(c=c.then((function(e){if(!e)throw Error(p(8,!1));var t=e.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap))throw Error(p(9,!1,t));if(!A(e.mount))throw Error(p(10,!1,t));if(!A(e.unmount))throw Error(p(11,!1,t));if(e.update&&!A(e.update))throw Error(p(12,!1,t));var n=I(e,"bootstrap"),o=I(e,"mount"),a=I(e,"unmount");u.status=g,u.name=t,u.bootstrap=n,u.mount=o,u.unmount=a,u.timeouts=J(e.timeouts),e.update&&(u.update=I(e,"update"),r.update=function(e){return u.customProps=e,W(function(e){return Promise.resolve().then((function(){if(e.status!==w)throw Error(p(32,!1,T(e)));return e.status=_,Q(e,"update").then((function(){return e.status=w,e})).catch((function(t){throw d(t,e,S)}))}))}(u))})}))).then((function(){return $(u,!0)})),y=h.then((function(){return U(u,!0)})),b=new Promise((function(e,t){l=e,f=t}));return r={mount:function(){return W(Promise.resolve().then((function(){if(u.status!==m)throw Error(p(13,!1,name,u.status));return n.parcels[i]=u,U(u)})))},unmount:function(){return W(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:W(c),bootstrapPromise:W(h),mountPromise:W(y),unmountPromise:W(b)}}function W(e){return e.then((function(){return null}))}function K(e){var t=T(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==o(n)||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),t,n));var i=C({},n,{name:t,mountParcel:V.bind(e),singleSpa:r});return P(e)&&(i.unmountSelf=e.unmountThisParcel),i}var 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(p(16,!1));H.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function G(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(17,!1));H.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(18,!1));H.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(19,!1));H.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Q(e,t){var n=e.timeouts[t],r=n.warningMillis,o=j(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](K(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=p(31,!1,t,o,T(e),n.millis);function l(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function J(e){var t={};for(var n in H)t[n]=C({},H[n],e&&e[n]||{});return t}function X(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==h&&e.status!==x?e:(e.status=v,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(K(e));if(!R(r))throw n=!0,Error(p(33,!1,T(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==o(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap)&&(r=35),A(t.mount)||(r=36),A(t.unmount)||(r=37);var i=j(t);if(r){var a;try{a=JSON.stringify(t)}catch(e){}return console.error(p(r,!1,i,T(e),a),t),c(void 0,e,S),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=C({},e.devtools.overlays,t.devtools.overlays)),e.status=g,e.bootstrap=I(t,"bootstrap"),e.mount=I(t,"mount"),e.unmount=I(t,"unmount"),e.unload=I(t,"unload"),e.timeouts=J(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=S:(r=x,e.loadErrorTime=(new Date).getTime()),c(t,e,r),e})));var t,n}))}var ee,te="undefined"!=typeof window,ne={hashchange:[],popstate:[]},re=["hashchange","popstate"];function oe(e){var 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(p(14,!1));t=e.currentTarget.href,e.preventDefault()}var 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 ie(e){var t=this;if(e){var n=e[0].type;re.indexOf(n)>=0&&ne[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function ae(){De([],arguments)}function se(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ee&&n===o||(Fe()?window.dispatchEvent(ue(window.history.state,t)):De([])),r}}function ue(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}if(te){window.addEventListener("hashchange",ae),window.addEventListener("popstate",ae);var ce=window.addEventListener,le=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0)||N(ne[e],(function(e){return e===t})))return ce.apply(this,arguments);ne[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0))return le.apply(this,arguments);ne[e]=ne[e].filter((function(e){return e!==t}))},window.history.pushState=se(window.history.pushState,"pushState"),window.history.replaceState=se(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=oe}function fe(e){var t=document.createElement("a");return t.href=e,t}var pe=!1;function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!pe){var 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)},pe=!0}}function he(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){re.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var ve={};function ge(e){return Promise.resolve().then((function(){var t=ve[T(e)];if(!t)return e;if(e.status===h)return ye(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==m&&e.status!==x)return e;var n=e.status===x?Promise.resolve():Q(e,"unload");return e.status="UNLOADING",n.then((function(){return ye(e,t),e})).catch((function(n){return function(e,t,n){delete ve[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,c(n,e,S),t.reject(n)}(e,t,n),e}))}))}function ye(e,t){delete ve[T(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=h,t.resolve()}function me(e,t,n,r){ve[T(e)]={app:e,resolve:n,reject:r},Object.defineProperty(ve[T(e)],"promise",{get:t})}function be(e){return ve[e]}var we=[];function _e(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return we.forEach((function(i){var a=i.status!==S&&k(i);switch(i.status){case x:a&&o-i.loadErrorTime>=200&&n.push(i);break;case h:case v:a&&n.push(i);break;case g:case m:!a&&be(T(i))?e.push(i):a&&r.push(i);break;case w:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}function Ee(){return we.filter(O).map(T)}function xe(){return we.map(T)}function Se(e){var t=N(we,(function(t){return T(t)===e}));return t?t.status:null}function Oe(e,t,n,r){var i=function(e,t,n,r){var i,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===o(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(p(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(p(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(p(20,!1));if("object"!==o(e.app)&&"function"!=typeof e.app)throw Error(p(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(p(24,!1));if(!Ce(e.customProps))throw Error(p(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(p(20,!1));if(!t)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!Ce(r))throw Error(p(22,!1))}(e,t,n,r),a.name=e,a.loadApp=t,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(i=a.loadApp)?function(){return Promise.resolve(i)}:i,a.customProps=function(e){return e||{}}(a.customProps),a.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Ne(e)})),function(e){return t.some((function(t){return t(e)}))}}(a.activeWhen),a}(e,t,n,r);if(-1!==xe().indexOf(i.name))throw Error(p(21,!1,i.name));we.push(C({loadErrorTime:null,status:h,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),te&&(de(),De())}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return we.filter((function(t){return t.activeWhen(e)})).map(T)}function Te(e){if(0===we.filter((function(t){return T(t)===e})).length)throw Error(p(25,!1,e));return Pe(e).then((function(){var t=we.map(T).indexOf(e);we.splice(t,1)}))}function Pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(p(26,!1));var n=N(we,(function(t){return T(t)===e}));if(!n)throw Error(p(27,!1,e));var r,o=be(T(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){me(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,je(n,o.resolve,o.reject)):r=new Promise((function(e,t){me(n,(function(){return r}),e,t),je(n,e,t)})),r}function je(e,t,n){D(e).then(ge).then((function(){t(),setTimeout((function(){De()}))})).catch(n)}function Ce(e){return!e||"function"==typeof e||"object"===o(e)&&null!==e&&!Array.isArray(e)}function Ne(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var Ae=!1,Ie=[],Re=te&&window.location.href;function $e(){return De()}function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(Ae)return new Promise((function(e,n){Ie.push({resolve:e,reject:n,eventArguments:t})}));var n,r=_e(),o=r.appsToUnload,a=r.appsToUnmount,u=r.appsToLoad,c=r.appsToMount,l=!1,f=Re,p=Re=window.location.href;return Fe()?(Ae=!0,n=o.concat(u,a,c),g()):(n=u,v());function d(){l=!0}function v(){return Promise.resolve().then((function(){var e=u.map(X);return Promise.all(e).then(b).then((function(){return[]})).catch((function(e){throw b(),e}))}))}function g(){return Promise.resolve().then((function(){if(window.dispatchEvent(new s(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",_(!0))),window.dispatchEvent(new s("single-spa:before-routing-event",_(!0,{cancelNavigation:d}))),l)return window.dispatchEvent(new s("single-spa:before-mount-routing-event",_(!0))),y(),void oe(f);var t=o.map(ge),r=a.map(D).map((function(e){return e.then(ge)})).concat(t),i=Promise.all(r);i.then((function(){window.dispatchEvent(new s("single-spa:before-mount-routing-event",_(!0)))}));var p=u.map((function(e){return X(e).then((function(e){return Le(e,i)}))})),h=c.filter((function(e){return u.indexOf(e)<0})).map((function(e){return Le(e,i)}));return i.catch((function(e){throw b(),e})).then((function(){return b(),Promise.all(p.concat(h)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(y)}))}))}function y(){var t=Ee();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new s(r,_())),window.dispatchEvent(new s("single-spa:routing-event",_()))}catch(e){setTimeout((function(){throw e}))}if(Ae=!1,Ie.length>0){var o=Ie;Ie=[],De(o)}return t}function b(){e.forEach((function(e){ie(e.eventArguments)})),ie(t)}function _(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0,d={},v=(i(e={},w,[]),i(e,m,[]),i(e,h,[]),i(e,S,[]),e);r?(u.concat(c).forEach((function(e,t){y(e,w)})),o.forEach((function(e){y(e,h)})),a.forEach((function(e){y(e,m)}))):n.forEach((function(e){y(e)}));var g={detail:{newAppStatuses:d,appsByNewStatus:v,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:p,navigationIsCanceled:l}};return s&&C(g.detail,s),g;function y(e,t){var n=T(e);t=t||Se(n),d[n]=t,(v[t]=v[t]||[]).push(n)}}}function Le(e,t){return k(e)?$(e).then((function(e){return t.then((function(){return k(e)?U(e):e}))})):t.then((function(){return e}))}var Me=!1;function Ue(e){var t;Me=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,ee=t),te&&De()}function Fe(){return Me}te&&setTimeout((function(){Me||console.warn(p(1,!1))}),5e3);var Be={getRawAppData:function(){return[].concat(we)},reroute:De,NOT_LOADED:h,toLoadPromise:X,toBootstrapPromise:$,unregisterApplication:Te};te&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Be)},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a};Number.isInteger},6763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"Map")},7851:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(658).Z.Symbol},963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7851),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r.Z?r.Z.toStringTag:void 0;var u=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}(e):function(e){return u.call(e)}(e)}},9295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9494);const o=(0,n(6899).Z)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5852:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>g});var r=n(3200);const o=n(658).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var s=n(7275),u=n(9441),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const v=function(e){return!(!(0,s.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?h:c).test((0,u.Z)(e));var t},g=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return v(n)?n:void 0}},606:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"DataView");var a=n(6763);const s=(0,r.Z)(o.Z,"Promise"),u=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(963),f=n(9441),p="[object Map]",d="[object Promise]",h="[object Set]",v="[object WeakMap]",g="[object DataView]",y=(0,f.Z)(i),m=(0,f.Z)(a.Z),b=(0,f.Z)(s),w=(0,f.Z)(u),_=(0,f.Z)(c),E=l.Z;(i&&E(new i(new ArrayBuffer(1)))!=g||a.Z&&E(new a.Z)!=p||s&&E(s.resolve())!=d||u&&E(new u)!=h||c&&E(new c)!=v)&&(E=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case y:return g;case m:return p;case b:return d;case w:return h;case _:return v}return t});const x=E},9494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},6899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5852),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},9441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>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""}},175:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(963),o=n(4897);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,s=a.hasOwnProperty,u=a.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&s.call(e,"callee")&&!u.call(e,"callee")};const l=c},6575:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},6905:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3200),o=n(3492);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},7840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(658);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},3202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(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])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.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))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.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 s=a;var u=n(6763);const c=(0,n(682).Z)(Object,"create");var l=Object.prototype.hasOwnProperty;var f=Object.prototype.hasOwnProperty;function p(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])}}p.prototype.clear=function(){this.__data__=c?c(null):{},this.size=0},p.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},p.prototype.get=function(e){var t=this.__data__;if(c){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return l.call(t,e)?t[e]:void 0},p.prototype.has=function(e){var t=this.__data__;return c?void 0!==t[e]:f.call(t,e)},p.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=c&&void 0===t?"__lodash_hash_undefined__":t,this};const d=p,h=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 v(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])}}v.prototype.clear=function(){this.size=0,this.__data__={hash:new d,map:new(u.Z||s),string:new d}},v.prototype.delete=function(e){var t=h(this,e).delete(e);return this.size-=t?1:0,t},v.prototype.get=function(e){return h(this,e).get(e)},v.prototype.has=function(e){return h(this,e).has(e)},v.prototype.set=function(e,t){var n=h(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const g=v;function y(e){var t=this.__data__=new s(e);this.size=t.size}y.prototype.clear=function(){this.__data__=new s,this.size=0},y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},y.prototype.get=function(e){return this.__data__.get(e)},y.prototype.has=function(e){return this.__data__.has(e)},y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!u.Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new g(r)}return n.set(e,t),this.size=n.size,this};const m=y;function b(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new g;++t<n;)this.add(e[t])}b.prototype.add=b.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},b.prototype.has=function(e){return this.__data__.has(e)};const w=b,_=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},E=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new w:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],v=t[f];if(r)var g=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==g){if(g)continue;p=!1;break}if(d){if(!_(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p};var x=n(7851);const S=n(658).Z.Uint8Array,O=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},k=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var T=x.Z?x.Z.prototype:void 0,P=T?T.valueOf:void 0;var j=n(6575);var C=Object.prototype.propertyIsEnumerable,N=Object.getOwnPropertySymbols;const A=N?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 a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(N(e),(function(t){return C.call(e,t)})))}:function(){return[]};var I=n(175),R=n(7840),$=/^(?:0|[1-9]\d*)$/;const D=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&$.test(e))&&e>-1&&e%1==0&&e<t};var L=n(8396),M=Object.prototype.hasOwnProperty;const U=function(e,t){var n=(0,j.Z)(e),r=!n&&(0,I.Z)(e),o=!n&&!r&&(0,R.Z)(e),i=!n&&!r&&!o&&(0,L.Z)(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!t&&!M.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||D(c,u))||s.push(c);return s};var F=n(9295),B=n(6905);const z=function(e){return(0,B.Z)(e)?U(e):(0,F.Z)(e)},V=function(e){return function(e,t,n){var r=t(e);return(0,j.Z)(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,z,A)};var W=Object.prototype.hasOwnProperty;var K=n(606),H="[object Arguments]",q="[object Array]",G="[object Object]",Z=Object.prototype.hasOwnProperty;const Y=function(e,t,n,o,i,a){var s=(0,j.Z)(e),u=(0,j.Z)(t),c=s?q:(0,K.Z)(e),l=u?q:(0,K.Z)(t),f=(c=c==H?G:c)==G,p=(l=l==H?G:l)==G,d=c==l;if(d&&(0,R.Z)(e)){if(!(0,R.Z)(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new m),s||(0,L.Z)(e)?E(e,t,n,o,i,a):function(e,t,n,o,i,a,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||!a(new S(e),new S(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+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 u=O;case"[object Set]":var c=1&o;if(u||(u=k),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;o|=2,s.set(e,t);var f=E(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(P)return P.call(e)==P.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Z.call(e,"__wrapped__"),v=p&&Z.call(t,"__wrapped__");if(h||v){var g=h?e.value():e,y=v?t.value():t;return a||(a=new m),i(g,y,n,o,a)}}return!!d&&(a||(a=new m),function(e,t,n,r,o,i){var a=1&n,s=V(e),u=s.length;if(u!=V(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:W.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<u;){var v=e[l=s[c]],g=t[l];if(r)var y=a?r(g,v,l,t,e,i):r(v,g,l,e,t,i);if(!(void 0===y?v===g||o(v,g,n,r,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))};var Q=n(4897);const J=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,Q.Z)(t)&&!(0,Q.Z)(n)?t!=t&&n!=n:Y(t,n,r,o,e,i))},X=function(e,t){return J(e,t)}},3200:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(963),o=n(7275);const i=function(e){if(!(0,o.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3492:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7275:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},4897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},8396:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(963),o=n(3492),i=n(4897),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=n(5852),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=u&&"object"==typeof module&&module&&!module.nodeType&&module,l=c&&c.exports===u&&s.Z.process,f=function(){try{return c&&c.require&&c.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}(),p=f&&f.isTypedArray;const d=p?(h=p,function(e){return h(e)}):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,r.Z)(e)]};var h}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.y=t,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(7968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{AppState:()=>f.aB,AssignedExtension:()=>s.pv,CancelLoading:()=>s.x9,ConfigStore:()=>i.JU,ConfigurableLink:()=>l.w,ConnectedExtension:()=>s.uP,ConnectivityChangedEvent:()=>u.ac,Extension:()=>l.hj,ExtensionData:()=>l.g,ExtensionMeta:()=>s.uu,ExtensionRegistration:()=>s.tj,ExtensionSlot:()=>l.dT,ExtensionSlotState:()=>s.u_,ExtensionStore:()=>s.qN,InlineNotificationType:()=>p.iW,NotificationDescriptor:()=>p.MK,OfflineMode:()=>c.iC,OfflineModeResult:()=>c.Vm,OpenmrsFetchError:()=>e.nF,PrecacheStaticDependenciesEvent:()=>u.hM,QueueItemDescriptor:()=>c.Cg,ShowNotificationEvent:()=>u.Kj,ShowToastEvent:()=>u.P3,SyncItem:()=>c.we,SyncProcessOptions:()=>c.Ug,ToastDescriptor:()=>p.fU,ToastNotificationMeta:()=>p.yQ,ToastType:()=>p.pC,Type:()=>i.Dy,UserHasAccess:()=>l.Vz,VisitMode:()=>e.u4,VisitStatus:()=>e.Rx,attach:()=>s.ub,backendDependencies:()=>e.Wf,beginEditSynchronizationItem:()=>c.jp,canBeginEditSynchronizationItemsOfType:()=>c.Qd,createGlobalStore:()=>f.jk,createUseStore:()=>l.NV,defaultVisitCustomRepresentation:()=>e.I$,defineConfigSchema:()=>i.SH,defineExtensionConfigSchema:()=>i.Tj,deleteSynchronizationItem:()=>c.Gy,detach:()=>s.og,detachAll:()=>s.lW,fetchCurrentPatient:()=>e.Vy,fhir:()=>e.N$,fhirBaseUrl:()=>e.DN,generateOfflineUuid:()=>c.sF,getAppState:()=>f.W5,getAssignedExtensions:()=>s.h6,getAsyncExtensionLifecycle:()=>l.D$,getAsyncLifecycle:()=>l.Ae,getConfig:()=>i.iE,getConfigStore:()=>i.pR,getConnectedExtensions:()=>s.Kq,getCurrentOfflineMode:()=>c.vm,getCurrentUser:()=>e.ts,getExtensionNameFromId:()=>s.EB,getExtensionStore:()=>s.yw,getGlobalStore:()=>f.zJ,getLifecycle:()=>l.tl,getLocations:()=>e.JC,getLoggedInUser:()=>e.r,getOfflineDb:()=>c.aA,getOfflinePatientDataStore:()=>c.k1,getSessionLocation:()=>e.WK,getStartedVisit:()=>e.$X,getSyncLifecycle:()=>l.a$,getSynchronizationItem:()=>c.TI,getSynchronizationItems:()=>c.Q2,getVisitTypes:()=>e.P9,getVisitsForPatient:()=>e.nx,inRange:()=>i.Z2,interpolateString:()=>i.IT,interpolateUrl:()=>i.ll,isOfflineUuid:()=>c.z7,isUrl:()=>i.CB,isUrlWithTemplateParameters:()=>i.gZ,loadPersistedPatientDataSyncState:()=>c.nN,makeUrl:()=>e.bf,messageOmrsServiceWorker:()=>c.gp,navigate:()=>i.c4,offlineUuidPrefix:()=>c.a7,omrsOfflineCachingStrategyHttpHeaderName:()=>c.Rz,omrsOfflineResponseBodyHttpHeaderName:()=>c.QI,omrsOfflineResponseStatusHttpHeaderName:()=>c.$9,openmrsFetch:()=>e.vb,openmrsObservableFetch:()=>e.uj,provide:()=>i.JJ,queueSynchronizationItem:()=>c.X2,refetchCurrentUser:()=>e.VJ,registerExtension:()=>s.ix,registerExtensionSlot:()=>s.Qq,registerOfflinePatientHandler:()=>c.dt,renderExtension:()=>s.H8,saveVisit:()=>e.bX,sessionEndpoint:()=>e.z$,setSessionLocation:()=>e.jK,setupOfflineSync:()=>c.H_,showModal:()=>p.K4,showNotification:()=>p.c0,showToast:()=>p.CF,subscribeConnectivity:()=>u.BW,subscribeConnectivityChanged:()=>u.XS,subscribeNotificationShown:()=>u.NQ,subscribePrecacheStaticDependencies:()=>u.dY,subscribeTo:()=>f.se,subscribeToastShown:()=>u.id,syncOfflinePatientData:()=>c.MO,toLocationObject:()=>e.Lq,toVisitTypeObject:()=>e.VF,updateVisit:()=>e.ym,useAssignedExtensionIds:()=>l.YV,useAssignedExtensions:()=>l.P3,useBodyScrollLock:()=>l.yn,useConfig:()=>l.ZR,useConnectedExtensions:()=>l.BL,useConnectivity:()=>l.Y9,useCurrentPatient:()=>l.Yq,useExtensionSlot:()=>l.p8,useExtensionSlotMeta:()=>l.qd,useExtensionStore:()=>l.jf,useLayoutType:()=>l.mr,useLocations:()=>l.Z_,useOnClickOutside:()=>l.t$,usePagination:()=>l.h0,usePatient:()=>l.lm,useSessionUser:()=>l.Oy,useStore:()=>l.oR,useStoreWithActions:()=>l.xQ,useVisit:()=>l.JF,useVisitTypes:()=>l.NN,userHasAccess:()=>e.y9,validator:()=>i.sC,validators:()=>i.z2});var e=r(2199),t=r(3107),n={};for(const e in t)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess"].indexOf(e)<0&&(n[e]=()=>t[e]);r.d(o,n);var i=r(5734),a=r(4729);n={};for(const e in a)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators"].indexOf(e)<0&&(n[e]=()=>a[e]);r.d(o,n);var s=r(9187),u=r(5763),c=r(5614),l=r(4734),f=r(9850),p=r(7202),d=r(3315);n={};for(const e in d)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators","AssignedExtension","CancelLoading","ConnectedExtension","ExtensionMeta","ExtensionRegistration","ExtensionSlotState","ExtensionStore","attach","detach","detachAll","getAssignedExtensions","getConnectedExtensions","getExtensionNameFromId","getExtensionStore","registerExtension","registerExtensionSlot","renderExtension","ConnectivityChangedEvent","PrecacheStaticDependenciesEvent","ShowNotificationEvent","ShowToastEvent","subscribeConnectivity","subscribeConnectivityChanged","subscribeNotificationShown","subscribePrecacheStaticDependencies","subscribeToastShown","OfflineMode","OfflineModeResult","QueueItemDescriptor","SyncItem","SyncProcessOptions","beginEditSynchronizationItem","canBeginEditSynchronizationItemsOfType","deleteSynchronizationItem","generateOfflineUuid","getCurrentOfflineMode","getOfflineDb","getOfflinePatientDataStore","getSynchronizationItem","getSynchronizationItems","isOfflineUuid","loadPersistedPatientDataSyncState","messageOmrsServiceWorker","offlineUuidPrefix","omrsOfflineCachingStrategyHttpHeaderName","omrsOfflineResponseBodyHttpHeaderName","omrsOfflineResponseStatusHttpHeaderName","queueSynchronizationItem","registerOfflinePatientHandler","setupOfflineSync","syncOfflinePatientData","ConfigurableLink","Extension","ExtensionData","ExtensionSlot","UserHasAccess","createUseStore","getAsyncExtensionLifecycle","getAsyncLifecycle","getLifecycle","getSyncLifecycle","useAssignedExtensionIds","useAssignedExtensions","useBodyScrollLock","useConfig","useConnectedExtensions","useConnectivity","useCurrentPatient","useExtensionSlot","useExtensionSlotMeta","useExtensionStore","useLayoutType","useLocations","useOnClickOutside","usePagination","usePatient","useSessionUser","useStore","useStoreWithActions","useVisit","useVisitTypes","AppState","createGlobalStore","getAppState","getGlobalStore","subscribeTo","InlineNotificationType","NotificationDescriptor","ToastDescriptor","ToastNotificationMeta","ToastType","showModal","showNotification","showToast"].indexOf(e)<0&&(n[e]=()=>d[e]);r.d(o,n)})(),o})())}}}));
|
|
2
|
+
System.register([],(function(e,t){return{execute:function(){e((()=>{var e={9672:(e,t)=>{!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var t,o,i=String(e),a=0,u=n,s="";i.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&t>>8-a%1*8)){if((o=i.charCodeAt(a+=3/4))>255)throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return s}),e.atob||(e.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,i,a=0,u=0,s="";i=t.charAt(u++);~i&&(o=a%4?64*o+i:i,a++%4)?s+=String.fromCharCode(255&o>>(-2*a&6)):0)i=n.indexOf(i);return s})}()},7530:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",u="week",s="month",c="quarter",l="year",f="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,s),i=n-o<0,a=t.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:s,y:l,w:u,d:a,D:f,h:i,m:o,s:r,ms:n,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},m="en",b={};b[m]=y;var w=function(e){return e instanceof E},_=function e(t,n,r){var o;if(!t)return m;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var u=t.name;b[u]=t,o=u}return!r&&o&&(m=o),o||!r&&m},S=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},x=g;x.l=_,x.i=w,x.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function y(e){this.$L=_(e.locale,null,!0),this.parse(e)}var v=y.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(d);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return x},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return S(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<S(e)},v.$g=function(e,t,n){return x.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,c=!!x.u(t)||t,p=x.p(e),d=function(e,t){var r=x.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return c?r:r.endOf(a)},h=function(e,t){return x.w(n.toDate()[e].apply(n.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(p){case l:return c?d(1,0):d(31,11);case s:return c?d(1,v):d(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return d(c?g-w:g+(6-w),v);case a:case f:return h(m+"Hours",0);case i:return h(m+"Minutes",1);case o:return h(m+"Seconds",2);case r:return h(m+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var u,c=x.p(e),p="set"+(this.$u?"UTC":""),d=(u={},u[a]=p+"Date",u[f]=p+"Date",u[s]=p+"Month",u[l]=p+"FullYear",u[i]=p+"Hours",u[o]=p+"Minutes",u[r]=p+"Seconds",u[n]=p+"Milliseconds",u)[c],h=c===a?this.$D+(t-this.$W):t;if(c===s||c===l){var y=this.clone().set(f,1);y.$d[d](h),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else d&&this.$d[d](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[x.p(e)]()},v.add=function(n,c){var f,p=this;n=Number(n);var d=x.p(c),h=function(e){var t=S(p);return x.w(t.date(t.date()+Math.round(e*n)),p)};if(d===s)return this.set(s,this.$M+n);if(d===l)return this.set(l,this.$y+n);if(d===a)return h(1);if(d===u)return h(7);var y=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[d]||1,v=this.$d.getTime()+n*y;return x.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),i=this.$H,a=this.$m,u=this.$M,s=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].substr(0,i)},f=function(e){return x.s(i%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},y={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:x.s(u+1,2,"0"),MMM:l(n.monthsShort,u,c,3),MMMM:l(c,u),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,s,2),ddd:l(n.weekdaysShort,this.$W,s,3),dddd:s[this.$W],H:String(i),HH:x.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,a,!0),A:d(i,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:o};return r.replace(h,(function(e,t){return t||y[e]||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,f,p){var d,h=x.p(f),y=S(n),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=x.m(this,y);return m=(d={},d[l]=m/12,d[s]=m,d[c]=m/3,d[u]=(g-v)/6048e5,d[a]=(g-v)/864e5,d[i]=g/t,d[o]=g/e,d[r]=g/1e3,d)[h]||g,p?m:x.a(m)},v.daysInMonth=function(){return this.endOf(s).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=_(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return x.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},y}(),O=E.prototype;return S.prototype=O,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",s],["$y",l],["$D",f]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,E,S),e.$i=!0),S},S.locale=_,S.isDayjs=w,S.unix=function(e){return S(1e3*e)},S.en=b[m],S.Ls=b,S.p={},S}()},4332:function(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)}}}()},4525:function(e){(function(){var t,n;function r(e,o){var i,a=e.data.entry||[],u=[];for(i=0;i<a.length;i++)u.push(a[i].resource);o(u);var s=n.defer();return t.nextPage({bundle:e.data}).then((function(e){r(e,o).then((function(e){s.resolve()}))}),(function(e){s.resolve()})),s.promise}function o(e,o,i,a){n.defer(),t.search(e).then((function(e){r(e,o).then((function(){i()}),(function(e){a(e)}))}),(function(e){a(e)}))}function i(e){var t=n.defer(),r=[];return o(e,(function(e){e.forEach((function(e){r.push(e)}))}),(function(){t.resolve(r)}),(function(e){t.reject(e)})),t.promise}function a(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,s=o.resourceType;r&&r.forEach((function(e){var r=e.split("."),c=r[0],l=r[1],f=o[l];if(s===c&&f){var p=f.reference;n[p]||function(e,r,o){i.push((function(){!function(e,r,o){var i=o.reference;t.resolve({bundle:e,resource:r,reference:o}).then((function(e){var t=e.data||e.content;n[i]=t,a()}))}(e,r,o)}))}(u,o,f)}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise}e.exports=function(e,r){return t=e,n=r,e.drain=o,e.fetchAll=i,e.fetchAllWithReferences=a,e}}).call(this)},1256:function(e,t,n){(function(){n(5454);var t=n(4801),r=n(7921),o=n(8294),i=n(8821),a=n(442),u=n(856),s=n(7719),c=n(3029),l=n(2723),f=n(4249),p=n(4525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,y=function(e){return h("method",e)},v=function(e,t){return h("headers."+e,t)},g=d(a),m=d(u(e,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(v("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(v("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(y("GET")),w=m.and(y("POST")),_=m.and(y("PUT")),S=m.and(y("DELETE")),x=m.and(y("PATCH")),E=i.Http(e,n),O=f.Path,k=O(e.baseUrl),j=k.slash(":type || :resource.resourceType"),T=j.slash("_history"),P=j.slash(":id || :resource.id"),C=P.slash("_history"),A=P.slash(":versionId || :resource.meta.versionId"),I=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),N=v("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(E),document:w.and(k.slash("Document")).end(E),profile:b.and(k.slash("Profile").slash(":type")).end(E),transaction:w.and(k).end(E),history:b.and(k.slash("_history")).and(R).end(E),typeHistory:b.and(T).and(R).end(E),resourceHistory:b.and(C).and(R).end(E),read:b.and(c.$WithPatient).and(P).end(E),vread:b.and(A).end(E),delete:S.and(P).and(N).end(E),create:w.and(j).and(N).end(E),validate:w.and(j.slash("_validate")).end(E),meta:{add:w.and(I.slash("$meta-add")).end(E),delete:w.and(I.slash("$meta-delete")).end(E),read:b.and(I.slash("$meta")).end(E)},search:b.and(j).and(c.$WithPatient).and(r.$SearchParams).and(R).end(E),update:_.and(P).and(N).end(E),conditionalUpdate:_.and(j).and(r.$SearchParams).and(N).end(E),conditionalDelete:S.and(j).and(r.$SearchParams).and(N).end(E),nextPage:b.and(s.$$BundleLinkUrl("next")).end(E),prevPage:b.and(s.$$BundleLinkUrl("previous")).and(s.$$BundleLinkUrl("prev")).end(E),getBundleByUrl:b.and(O(":url")).end(E),resolve:b.and(l.resolve).end(E),patch:x.and(P).and(v("Content-Type","application/json-patch+json")).end(E)},n)}}).call(this)},8294:function(e,t,n){(function(){var e,r=n(4801),o=n(9672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},7719:(e,t)=>{t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},4801:function(e,t,n){(function(){var e=n(5454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:e=>{e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},8821:function(e,t,n){(function(){var e=n(5454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},3029:function(e,t,n){(function(){var e=n(4801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},2723:function(e,t,n){(function(){var t=n(5454),r=/^#(.*)/,o=function(e){var n=e.cache,o=e.reference,i=e.bundle,a=o;if(!a.reference)return null;if(a.reference.match(r))return function(e,t){var n=e.match(r)[1],o=(t.contained||[]).filter((function(e){return(e.id||e._id)==n}))[0];return o&&{content:o}||null}(a.reference,e.resource);var u=t.absoluteUrl(e.baseUrl,a.reference);return(i&&i.entry||[]).filter((function(e){return e.id===u}))[0]||(null!=n?n[u]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},7921:function(e,t,n){(function(){var e=n(5454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},s={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n;switch(r(t)){case"object":return function(e,t){return i(t,(function(n,i){var a,l,f,p;return a=i[0],p=i[1],n.concat("$and"===a?o(p).reduce((function(t,n){return t.concat(c(e,n))}),[]):"$type"===a?[]:function(e){return 0===e.indexOf("$")}(a)?(l={param:e},"$or"===a?l.value=p:(u[a]&&(l.operator=u[a]),s[a]&&(l.modifier=s[a]),"object"===r(p)&&p.$or?l.value=p.$or:l.value=[p]),[l]):(t.$type&&(f=":"+t.$type),c(""+e+(f||"")+"."+a,p)))}))}(e,t);case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,s;for(s=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,s.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return s}().join("&")};t._query=l,t.query=f;var p=n(4801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},4249:function(e,t,n){(function(){n(5454);var e=n(4801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n=function(e,t){return 0==e.indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(e,t):e}(e.trim(),t);if((null==n||void 0===n)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return n}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},5454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var s=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=s;var c=function(e,t,n){return t?s(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},2891:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",g="[object Boolean]",m="[object Date]",b="[object Error]",w="[object Function]",_="[object GeneratorFunction]",S="[object Map]",x="[object Number]",E="[object Object]",O="[object Promise]",k="[object RegExp]",j="[object Set]",T="[object String]",P="[object Symbol]",C="[object WeakMap]",A="[object ArrayBuffer]",I="[object DataView]",N="[object Float32Array]",R="[object Float64Array]",D="[object Int8Array]",L="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",$="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,H=RegExp(K.source),Z=RegExp(q.source),G=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="["+Ee+"]",ke="["+_e+"]",je="\\d+",Te="["+Se+"]",Pe="[^\\ud800-\\udfff"+Ee+je+"\\u2700-\\u27bf"+Se+xe+"]",Ce="\\ud83c[\\udffb-\\udfff]",Ae="[^\\ud800-\\udfff]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",Re="["+xe+"]",De="(?:"+Te+"|"+Pe+")",Le="(?:"+Re+"|"+Pe+")",Me="(?:['’](?:d|ll|m|re|s|t|ve))?",Ue="(?:['’](?:D|LL|M|RE|S|T|VE))?",$e="(?:"+ke+"|"+Ce+")?",Fe="[\\ufe0e\\ufe0f]?",Be=Fe+$e+"(?:\\u200d(?:"+[Ae,Ie,Ne].join("|")+")"+Fe+$e+")*",ze="(?:"+["[\\u2700-\\u27bf]",Ie,Ne].join("|")+")"+Be,Ve="(?:"+[Ae+ke+"?",ke,Ie,Ne,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ke=RegExp(ke,"g"),qe=RegExp(Ce+"(?="+Ce+")|"+Ve+Be,"g"),He=RegExp([Re+"?"+Te+"+"+Me+"(?="+[Oe,Re,"$"].join("|")+")",Le+"+"+Ue+"(?="+[Oe,Re+De,"$"].join("|")+")",Re+"?"+De+"+"+Me,Re+"+"+Ue,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je,ze].join("|"),"g"),Ze=RegExp("[\\u200d\\ud800-\\udfff"+_e+"\\ufe0e\\ufe0f]"),Ge=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ye=-1,Je={};Je[N]=Je[R]=Je[D]=Je[L]=Je[M]=Je[U]=Je[$]=Je[F]=Je[B]=!0,Je[y]=Je[v]=Je[A]=Je[g]=Je[I]=Je[m]=Je[b]=Je[w]=Je[S]=Je[x]=Je[E]=Je[k]=Je[j]=Je[T]=Je[C]=!1;var Xe={};Xe[y]=Xe[v]=Xe[A]=Xe[I]=Xe[g]=Xe[m]=Xe[N]=Xe[R]=Xe[D]=Xe[L]=Xe[M]=Xe[S]=Xe[x]=Xe[E]=Xe[k]=Xe[j]=Xe[T]=Xe[P]=Xe[U]=Xe[$]=Xe[F]=Xe[B]=!0,Xe[b]=Xe[w]=Xe[C]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,ut=at&&e&&!e.nodeType&&e,st=ut&&ut.exports===at,ct=st&&rt.process,lt=function(){try{return ut&&ut.require&&ut.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ft=lt&<.isArrayBuffer,pt=lt&<.isDate,dt=lt&<.isMap,ht=lt&<.isRegExp,yt=lt&<.isSet,vt=lt&<.isTypedArray;function gt(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)}function mt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&Nt(e,t,0)>-1}function Et(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Ot(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function kt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function jt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Tt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Ct=Mt("length");function At(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function It(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Nt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):It(e,Dt,n)}function Rt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Dt(e){return e!=e}function Lt(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:p}function Mt(e){return function(t){return null==t?o:t[e]}}function Ut(e){return function(t){return null==e?o:e[t]}}function $t(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ft(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Bt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,un(e)+1).replace(re,""):e}function Vt(e){return function(t){return e(t)}}function Wt(e,t){return Ot(t,(function(t){return e[t]}))}function Kt(e,t){return e.has(t)}function qt(e,t){for(var n=-1,r=e.length;++n<r&&Nt(t,e[n],0)>-1;);return n}function Ht(e,t){for(var n=e.length;n--&&Nt(t,e[n],0)>-1;);return n}function Zt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Gt=Ut({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Qt=Ut({"&":"&","<":"<",">":">",'"':""","'":"'"});function Yt(e){return"\\"+et[e]}function Jt(e){return Ze.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,i[o++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Jt(e)?function(e){for(var t=qe.lastIndex=0;qe.test(e);)++t;return t}(e):Ct(e)}function an(e){return Jt(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.split("")}(e)}function un(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var sn=Ut({"&":"&","<":"<",">":">",""":'"',"'":"'"}),cn=function e(t){var n,r=(t=null==t?it:cn.defaults(it.Object(),t,cn.pick(it,Qe))).Array,oe=t.Date,_e=t.Error,Se=t.Function,xe=t.Math,Ee=t.Object,Oe=t.RegExp,ke=t.String,je=t.TypeError,Te=r.prototype,Pe=Se.prototype,Ce=Ee.prototype,Ae=t["__core-js_shared__"],Ie=Pe.toString,Ne=Ce.hasOwnProperty,Re=0,De=(n=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Le=Ce.toString,Me=Ie.call(Ee),Ue=it._,$e=Oe("^"+Ie.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=st?t.Buffer:o,Be=t.Symbol,ze=t.Uint8Array,Ve=Fe?Fe.allocUnsafe:o,qe=en(Ee.getPrototypeOf,Ee),Ze=Ee.create,et=Ce.propertyIsEnumerable,rt=Te.splice,ot=Be?Be.isConcatSpreadable:o,at=Be?Be.iterator:o,ut=Be?Be.toStringTag:o,ct=function(){try{var e=li(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,Ct=oe&&oe.now!==it.Date.now&&oe.now,Ut=t.setTimeout!==it.setTimeout&&t.setTimeout,ln=xe.ceil,fn=xe.floor,pn=Ee.getOwnPropertySymbols,dn=Fe?Fe.isBuffer:o,hn=t.isFinite,yn=Te.join,vn=en(Ee.keys,Ee),gn=xe.max,mn=xe.min,bn=oe.now,wn=t.parseInt,_n=xe.random,Sn=Te.reverse,xn=li(t,"DataView"),En=li(t,"Map"),On=li(t,"Promise"),kn=li(t,"Set"),jn=li(t,"WeakMap"),Tn=li(Ee,"create"),Pn=jn&&new jn,Cn={},An=$i(xn),In=$i(En),Nn=$i(On),Rn=$i(kn),Dn=$i(jn),Ln=Be?Be.prototype:o,Mn=Ln?Ln.valueOf:o,Un=Ln?Ln.toString:o;function $n(e){if(nu(e)&&!Ka(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Ne.call(e,"__wrapped__"))return Fi(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!tu(t))return{};if(Ze)return Ze(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Bn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Wn(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])}}function Kn(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])}}function qn(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])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Gn(e,t){var n=Ka(e),r=!n&&Wa(e),o=!n&&!r&&Ga(e),i=!n&&!r&&!o&&lu(e),a=n||r||o||i,u=a?Bt(e.length,ke):[],s=u.length;for(var c in e)!t&&!Ne.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gi(c,s))||u.push(c);return u}function Qn(e){var t=e.length;return t?e[qr(0,t-1)]:o}function Yn(e,t){return Ri(To(e),ar(t,0,e.length))}function Jn(e){return Ri(To(e))}function Xn(e,t,n){(n!==o&&!Ba(e[t],n)||n===o&&!(t in e))&&or(e,t,n)}function er(e,t,n){var r=e[t];Ne.call(e,t)&&Ba(r,n)&&(n!==o||t in e)||or(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Ba(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&Po(t,Iu(t),e)}function or(e,t,n){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,i=t.length,a=r(i),u=null==e;++n<i;)a[n]=u?o:ju(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ur(e,t,n,r,i,a){var u,s=1&t,c=2&t,l=4&t;if(n&&(u=i?n(e,r,i,a):n(e)),u!==o)return u;if(!tu(e))return e;var f=Ka(e);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return To(e,u)}else{var p=di(e),d=p==w||p==_;if(Ga(e))return So(e,s);if(p==E||p==y||d&&!i){if(u=c||d?{}:yi(e),!s)return c?function(e,t){return Po(e,pi(e),t)}(e,function(e,t){return e&&Po(t,Nu(t),e)}(u,e)):function(e,t){return Po(e,fi(e),t)}(e,rr(u,e))}else{if(!Xe[p])return i?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case A:return xo(e);case g:case m:return new o(+e);case I:return function(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case N:case R:case D:case L:case M:case U:case $:case F:case B:return Eo(e,n);case S:return new o;case x:case T:return new o(e);case k:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new o;case P:return r=e,Mn?Ee(Mn.call(r)):{}}}(e,p,s)}}a||(a=new Zn);var h=a.get(e);if(h)return h;a.set(e,u),uu(e)?e.forEach((function(r){u.add(ur(r,t,n,r,e,a))})):ru(e)&&e.forEach((function(r,o){u.set(o,ur(r,t,n,o,e,a))}));var v=f?o:(l?c?ri:ni:c?Nu:Iu)(e);return bt(v||e,(function(r,o){v&&(r=e[o=r]),er(u,o,ur(r,t,n,o,e,a))})),u}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ee(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0}function cr(e,t,n){if("function"!=typeof e)throw new je(i);return Ci((function(){e.apply(o,n)}),t)}function lr(e,t,n,r){var o=-1,i=xt,a=!0,u=e.length,s=[],c=t.length;if(!u)return s;n&&(t=Ot(t,Vt(n))),r?(i=Et,a=!1):t.length>=200&&(i=Kt,a=!1,t=new Hn(t));e:for(;++o<u;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;s.push(l)}else i(t,f,r)||s.push(l)}return s}$n.templateSettings={escape:G,evaluate:Q,interpolate:Y,variable:"",imports:{_:$n}},$n.prototype=Bn.prototype,$n.prototype.constructor=$n,zn.prototype=Fn(Bn.prototype),zn.prototype.constructor=zn,Vn.prototype=Fn(Bn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===a?o:n}return Ne.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==o:Ne.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===o?a:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?o:t[n][1]},Kn.prototype.has=function(e){return tr(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(En||Kn),string:new Wn}},qn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return si(this,e).get(e)},qn.prototype.has=function(e){return si(this,e).has(e)},qn.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,a),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Io(br),pr=Io(wr,!0);function dr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(s===o?u==u&&!cu(u):n(u,s)))var s=u,c=a}return c}function yr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function vr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=vi),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?vr(u,t-1,n,r,o):kt(o,u):r||(o[o.length]=u)}return o}var gr=No(),mr=No(!0);function br(e,t){return e&&gr(e,t,Iu)}function wr(e,t){return e&&mr(e,t,Iu)}function _r(e,t){return St(t,(function(t){return Ja(e[t])}))}function Sr(e,t){for(var n=0,r=(t=mo(t,e)).length;null!=e&&n<r;)e=e[Ui(t[n++])];return n&&n==r?e:o}function xr(e,t,n){var r=t(e);return Ka(e)?r:kt(r,n(e))}function Er(e){return null==e?e===o?"[object Undefined]":"[object Null]":ut&&ut in Ee(e)?function(e){var t=Ne.call(e,ut),n=e[ut];try{e[ut]=o;var r=!0}catch(e){}var i=Le.call(e);return r&&(t?e[ut]=n:delete e[ut]),i}(e):function(e){return Le.call(e)}(e)}function Or(e,t){return e>t}function kr(e,t){return null!=e&&Ne.call(e,t)}function jr(e,t){return null!=e&&t in Ee(e)}function Tr(e,t,n){for(var i=n?Et:xt,a=e[0].length,u=e.length,s=u,c=r(u),l=1/0,f=[];s--;){var p=e[s];s&&t&&(p=Ot(p,Vt(t))),l=mn(p.length,l),c[s]=!n&&(t||a>=120&&p.length>=120)?new Hn(s&&p):o}p=e[0];var d=-1,h=c[0];e:for(;++d<a&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=n||0!==y?y:0,!(h?Kt(h,v):i(f,v,n))){for(s=u;--s;){var g=c[s];if(!(g?Kt(g,v):i(e[s],v,n)))continue e}h&&h.push(v),f.push(y)}}return f}function Pr(e,t,n){var r=null==(e=ki(e,t=mo(t,e)))?e:e[Ui(Yi(t))];return null==r?o:gt(r,e,n)}function Cr(e){return nu(e)&&Er(e)==y}function Ar(e,t,n,r,i){return e===t||(null==e||null==t||!nu(e)&&!nu(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Ka(e),s=Ka(t),c=u?v:di(e),l=s?v:di(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ga(e)){if(!Ga(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new Zn),u||lu(e)?ei(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!i(new ze(e),new ze(t)));case g:case m:case x:return Ba(+e,+t);case b:return e.name==t.name&&e.message==t.message;case k:case T:return e==t+"";case S:var u=Xt;case j:var s=1&r;if(u||(u=nn),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ei(u(e),u(t),r,o,i,a);return a.delete(e),l;case P:if(Mn)return Mn.call(e)==Mn.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=f&&Ne.call(e,"__wrapped__"),w=p&&Ne.call(t,"__wrapped__");if(h||w){var _=h?e.value():e,O=w?t.value():t;return a||(a=new Zn),i(_,O,n,r,a)}}return!!d&&(a||(a=new Zn),function(e,t,n,r,i,a){var u=1&n,s=ni(e),c=s.length;if(c!=ni(t).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in t:Ne.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var y=u;++l<c;){var v=e[f=s[l]],g=t[f];if(r)var m=u?r(g,v,f,t,e,a):r(v,g,f,e,t,a);if(!(m===o?v===g||i(v,g,n,r,a):m)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Ar,i))}function Ir(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=Ee(e);i--;){var s=n[i];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],l=e[c],f=s[1];if(u&&s[2]){if(l===o&&!(c in e))return!1}else{var p=new Zn;if(r)var d=r(l,f,c,e,t,p);if(!(d===o?Ar(f,l,3,r,p):d))return!1}}return!0}function Nr(e){return!(!tu(e)||(t=e,De&&De in t))&&(Ja(e)?$e:ye).test($i(e));var t}function Rr(e){return"function"==typeof e?e:null==e?os:"object"==typeof e?Ka(e)?$r(e[0],e[1]):Ur(e):ds(e)}function Dr(e){if(!Si(e))return vn(e);var t=[];for(var n in Ee(e))Ne.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e,t){return e<t}function Mr(e,t){var n=-1,o=Ha(e)?r(e.length):[];return fr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Ur(e){var t=ci(e);return 1==t.length&&t[0][2]?Ei(t[0][0],t[0][1]):function(n){return n===e||Ir(n,e,t)}}function $r(e,t){return bi(e)&&xi(t)?Ei(Ui(e),t):function(n){var r=ju(n,e);return r===o&&r===t?Tu(n,e):Ar(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&gr(t,(function(a,u){if(i||(i=new Zn),tu(a))!function(e,t,n,r,i,a,u){var s=Ti(e,n),c=Ti(t,n),l=u.get(c);if(l)Xn(e,n,l);else{var f=a?a(s,c,n+"",e,t,u):o,p=f===o;if(p){var d=Ka(c),h=!d&&Ga(c),y=!d&&!h&&lu(c);f=c,d||h||y?Ka(s)?f=s:Za(s)?f=To(s):h?(p=!1,f=So(c,!0)):y?(p=!1,f=Eo(c,!0)):f=[]:iu(c)||Wa(c)?(f=s,Wa(s)?f=mu(s):tu(s)&&!Ja(s)||(f=yi(c))):p=!1}p&&(u.set(c,f),i(f,c,r,a,u),u.delete(c)),Xn(e,n,f)}}(e,t,u,n,Fr,r,i);else{var s=r?r(Ti(e,u),a,u+"",e,t,i):o;s===o&&(s=a),Xn(e,u,s)}}),Nu)}function Br(e,t){var n=e.length;if(n)return gi(t+=t<0?n:0,n)?e[t]:o}function zr(e,t,n){t=t.length?Ot(t,(function(e){return Ka(e)?function(t){return Sr(t,1===e.length?e[0]:e)}:e})):[os];var r=-1;t=Ot(t,Vt(ui()));var o=Mr(e,(function(e,n,o){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var s=Oo(o[r],i[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=Sr(e,a);n(u,a)&&Yr(i,mo(a,e),u)}return i}function Wr(e,t,n,r){var o=r?Rt:Nt,i=-1,a=t.length,u=e;for(e===t&&(t=To(t)),n&&(u=Ot(e,Vt(n)));++i<a;)for(var s=0,c=t[i],l=n?n(c):c;(s=o(u,l,s,r))>-1;)u!==e&&rt.call(u,s,1),rt.call(e,s,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;gi(o)?rt.call(e,o,1):co(e,o)}}return e}function qr(e,t){return e+fn(_n()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return Ai(Oi(e,t,os),e+"")}function Gr(e){return Qn(Bu(e))}function Qr(e,t){var n=Bu(e);return Ri(n,ar(t,0,n.length))}function Yr(e,t,n,r){if(!tu(e))return e;for(var i=-1,a=(t=mo(t,e)).length,u=a-1,s=e;null!=s&&++i<a;){var c=Ui(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=u){var f=s[c];(l=r?r(f,c,s):o)===o&&(l=tu(f)?f:gi(t[i+1])?[]:{})}er(s,c,l),s=s[c]}return e}var Jr=Pn?function(e,t){return Pn.set(e,t),e}:os,Xr=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:ts(t),writable:!0})}:os;function eo(e){return Ri(Bu(e))}function to(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function no(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ro(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!cu(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return oo(e,t,os,n)}function oo(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,s=null===t,c=cu(t),l=t===o;i<a;){var f=fn((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,y=p==p,v=cu(p);if(u)var g=r||y;else g=l?y&&(r||d):s?y&&d&&(r||!h):c?y&&d&&!h&&(r||!v):!h&&!v&&(r?p<=t:p<t);g?i=f+1:a=f}return mn(a,4294967294)}function io(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!Ba(u,s)){var s=u;i[o++]=0===a?0:a}}return i}function ao(e){return"number"==typeof e?e:cu(e)?p:+e}function uo(e){if("string"==typeof e)return e;if(Ka(e))return Ot(e,uo)+"";if(cu(e))return Un?Un.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function so(e,t,n){var r=-1,o=xt,i=e.length,a=!0,u=[],s=u;if(n)a=!1,o=Et;else if(i>=200){var c=t?null:Zo(e);if(c)return nn(c);a=!1,o=Kt,s=new Hn}else s=t?[]:u;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=s.length;p--;)if(s[p]===f)continue e;t&&s.push(f),u.push(l)}else o(s,f,n)||(s!==u&&s.push(f),u.push(l))}return u}function co(e,t){return null==(e=ki(e,t=mo(t,e)))||delete e[Ui(Yi(t))]}function lo(e,t,n,r){return Yr(e,t,n(Sr(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?to(e,r?0:i,r?i+1:o):to(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Vn&&(n=n.value()),jt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),n)}function ho(e,t,n){var o=e.length;if(o<2)return o?so(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],s=-1;++s<o;)s!=i&&(a[i]=lr(a[i]||u,e[s],t,n));return so(vr(a,1),t,n)}function yo(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var s=r<a?t[r]:o;n(u,e[r],s)}return u}function vo(e){return Za(e)?e:[]}function go(e){return"function"==typeof e?e:os}function mo(e,t){return Ka(e)?e:bi(e,t)?[e]:Mi(bu(e))}var bo=Zr;function wo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:to(e,t,n)}var _o=lt||function(e){return it.clearTimeout(e)};function So(e,t){if(t)return e.slice();var n=e.length,r=Ve?Ve(n):new e.constructor(n);return e.copy(r),r}function xo(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function Eo(e,t){var n=t?xo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=cu(e),u=t!==o,s=null===t,c=t==t,l=cu(t);if(!s&&!l&&!a&&e>t||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!u&&i||!c)return-1}return 0}function ko(e,t,n,o){for(var i=-1,a=e.length,u=n.length,s=-1,c=t.length,l=gn(a-u,0),f=r(c+l),p=!o;++s<c;)f[s]=t[s];for(;++i<u;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[s++]=e[i++];return f}function jo(e,t,n,o){for(var i=-1,a=e.length,u=-1,s=n.length,c=-1,l=t.length,f=gn(a-s,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++u<s;)(d||i<a)&&(p[h+n[u]]=e[i++]);return p}function To(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function Po(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var s=t[a],c=r?r(n[s],e[s],s,n,e):o;c===o&&(c=e[s]),i?or(n,s,c):er(n,s,c)}return n}function Co(e,t){return function(n,r){var o=Ka(n)?mt:nr,i=t?t():{};return o(n,e,ui(r,2),i)}}function Ao(e){return Zr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&mi(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=Ee(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}function Io(e,t){return function(n,r){if(null==n)return n;if(!Ha(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function No(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}function Ro(e){return function(t){var n=Jt(t=bu(t))?an(t):o,r=n?n[0]:t.charAt(0),i=n?wo(n,1).join(""):t.slice(1);return r[e]()+i}}function Do(e){return function(t){return jt(Ju(Wu(t).replace(We,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return tu(r)?r:n}}function Mo(e){return function(t,n,r){var i=Ee(t);if(!Ha(t)){var a=ui(n,3);t=Iu(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}}function Uo(e){return ti((function(t){var n=t.length,r=n,a=zn.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new je(i);if(a&&!s&&"wrapper"==ii(u))var s=new zn([],!0)}for(r=s?r:n;++r<n;){var c=ii(u=t[r]),l="wrapper"==c?oi(u):o;s=l&&wi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[ii(l[0])].apply(s,l[3]):1==u.length&&wi(u)?s[c]():s.thru(u)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ka(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function $o(e,t,n,i,a,u,s,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,g=512&t,m=y?o:Lo(e);return function o(){for(var c=arguments.length,b=r(c),w=c;w--;)b[w]=arguments[w];if(v)var _=ai(o),S=Zt(b,_);if(i&&(b=ko(b,i,a,v)),u&&(b=jo(b,u,s,v)),c-=S,v&&c<p){var x=tn(b,_);return qo(e,t,$o,o.placeholder,n,b,x,l,f,p-c)}var E=h?n:this,O=y?E[e]:e;return c=b.length,l?b=ji(b,l):g&&c>1&&b.reverse(),d&&f<c&&(b.length=f),this&&this!==it&&this instanceof o&&(O=m||Lo(O)),O.apply(E,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=uo(n),r=uo(r)):(n=ao(n),r=ao(r)),i=e(n,r)}return i}}function zo(e){return ti((function(t){return t=Ot(t,Vt(ui())),Zr((function(n){var r=this;return e(t,(function(e){return gt(e,r,n)}))}))}))}function Vo(e,t){var n=(t=t===o?" ":uo(t)).length;if(n<2)return n?Hr(t,e):t;var r=Hr(t,ln(e/on(t)));return Jt(t)?wo(an(r),0,e).join(""):r.slice(0,e)}function Wo(e){return function(t,n,i){return i&&"number"!=typeof i&&mi(t,n,i)&&(n=i=o),t=hu(t),n===o?(n=t,t=0):n=hu(n),function(e,t,n,o){for(var i=-1,a=gn(ln((t-e)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=e,e+=n;return u}(t,n,i=i===o?t<n?1:-1:hu(i),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gu(t),n=gu(n)),e(t,n)}}function qo(e,t,n,r,i,a,u,c,l,f){var p=8&t;t|=p?s:64,4&(t&=~(p?64:s))||(t&=-4);var d=[e,t,i,p?a:o,p?u:o,p?o:a,p?o:u,c,l,f],h=n.apply(o,d);return wi(e)&&Pi(h,d),h.placeholder=r,Ii(h,e,t)}function Ho(e){var t=xe[e];return function(e,n){if(e=gu(e),(n=null==n?0:mn(yu(n),292))&&hn(e)){var r=(bu(e)+"e").split("e");return+((r=(bu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zo=kn&&1/nn(new kn([,-0]))[1]==l?function(e){return new kn(e)}:cs;function Go(e){return function(t){var n=di(t);return n==S?Xt(t):n==j?rn(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qo(e,t,n,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new je(i);var y=a?a.length:0;if(y||(t&=-97,a=l=o),p=p===o?p:gn(yu(p),0),d=d===o?d:yu(d),y-=l?l.length:0,64&t){var v=a,g=l;a=l=o}var m=h?o:oi(e),b=[e,t,n,a,l,v,g,f,p,d];if(m&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?ko(l,s,t[4]):s,e[4]=l?tn(e[3],u):t[4]}(s=t[5])&&(l=e[5],e[5]=l?jo(l,s,t[6]):s,e[6]=l?tn(e[5],u):t[6]),(s=t[7])&&(e[7]=s),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,m),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(d=b[9]=b[9]===o?h?0:e.length:gn(b[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Lo(e);return function a(){for(var u=arguments.length,s=r(u),c=u,l=ai(a);c--;)s[c]=arguments[c];var f=u<3&&s[0]!==l&&s[u-1]!==l?[]:tn(s,l);return(u-=f.length)<n?qo(e,t,$o,a.placeholder,o,s,f,o,o,n-u):gt(this&&this!==it&&this instanceof a?i:e,this,s)}}(e,t,d):t!=s&&33!=t||l.length?$o.apply(o,b):function(e,t,n,o){var i=1&t,a=Lo(e);return function t(){for(var u=-1,s=arguments.length,c=-1,l=o.length,f=r(l+s),p=this&&this!==it&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;s--;)f[c++]=arguments[++u];return gt(p,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ii((m?Jr:Pi)(w,b),e,t)}function Yo(e,t,n,r){return e===o||Ba(e,Ce[n])&&!Ne.call(r,n)?t:e}function Jo(e,t,n,r,i,a){return tu(e)&&tu(t)&&(a.set(t,e),Fr(e,t,o,Jo,a),a.delete(t)),e}function Xo(e){return iu(e)?o:e}function ei(e,t,n,r,i,a){var u=1&n,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new Hn:o;for(a.set(e,t),a.set(t,e);++p<s;){var y=e[p],v=t[p];if(r)var g=u?r(v,y,p,t,e,a):r(y,v,p,e,t,a);if(g!==o){if(g)continue;d=!1;break}if(h){if(!Pt(t,(function(e,t){if(!Kt(h,t)&&(y===e||i(y,e,n,r,a)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!i(y,v,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ti(e){return Ai(Oi(e,o,qi),e+"")}function ni(e){return xr(e,Iu,fi)}function ri(e){return xr(e,Nu,pi)}var oi=Pn?function(e){return Pn.get(e)}:cs;function ii(e){for(var t=e.name+"",n=Cn[t],r=Ne.call(Cn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ai(e){return(Ne.call($n,"placeholder")?$n:e).placeholder}function ui(){var e=$n.iteratee||is;return e=e===is?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function si(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 ci(e){for(var t=Iu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,xi(o)]}return t}function li(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Nr(n)?n:o}var fi=pn?function(e){return null==e?[]:(e=Ee(e),St(pn(e),(function(t){return et.call(e,t)})))}:vs,pi=pn?function(e){for(var t=[];e;)kt(t,fi(e)),e=qe(e);return t}:vs,di=Er;function hi(e,t,n){for(var r=-1,o=(t=mo(t,e)).length,i=!1;++r<o;){var a=Ui(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&eu(o)&&gi(a,o)&&(Ka(e)||Wa(e))}function yi(e){return"function"!=typeof e.constructor||Si(e)?{}:Fn(qe(e))}function vi(e){return Ka(e)||Wa(e)||!!(ot&&e&&e[ot])}function gi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function mi(e,t,n){if(!tu(n))return!1;var r=typeof t;return!!("number"==r?Ha(n)&&gi(t,n.length):"string"==r&&t in n)&&Ba(n[t],e)}function bi(e,t){if(Ka(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cu(e))||X.test(e)||!J.test(e)||null!=t&&e in Ee(t)}function wi(e){var t=ii(e),n=$n[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(xn&&di(new xn(new ArrayBuffer(1)))!=I||En&&di(new En)!=S||On&&di(On.resolve())!=O||kn&&di(new kn)!=j||jn&&di(new jn)!=C)&&(di=function(e){var t=Er(e),n=t==E?e.constructor:o,r=n?$i(n):"";if(r)switch(r){case An:return I;case In:return S;case Nn:return O;case Rn:return j;case Dn:return C}return t});var _i=Ae?Ja:gs;function Si(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ce)}function xi(e){return e==e&&!tu(e)}function Ei(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ee(n))}}function Oi(e,t,n){return t=gn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=gn(o.length-t,0),u=r(a);++i<a;)u[i]=o[t+i];i=-1;for(var s=r(t+1);++i<t;)s[i]=o[i];return s[t]=n(u),gt(e,this,s)}}function ki(e,t){return t.length<2?e:Sr(e,to(t,0,-1))}function ji(e,t){for(var n=e.length,r=mn(t.length,n),i=To(e);r--;){var a=t[r];e[r]=gi(a,n)?i[a]:o}return e}function Ti(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Pi=Ni(Jr),Ci=Ut||function(e,t){return it.setTimeout(e,t)},Ai=Ni(Xr);function Ii(e,t,n){var r=t+"";return Ai(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(h,(function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ue):[]}(r),n)))}function Ni(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=qr(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e}var Di,Li,Mi=(Di=Da((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)})),t}),(function(e){return 500===Li.size&&Li.clear(),e})),Li=Di.cache,Di);function Ui(e){if("string"==typeof e||cu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function $i(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Vn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=To(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bi=Zr((function(e,t){return Za(e)?lr(e,vr(t,1,Za,!0)):[]})),zi=Zr((function(e,t){var n=Yi(t);return Za(n)&&(n=o),Za(e)?lr(e,vr(t,1,Za,!0),ui(n,2)):[]})),Vi=Zr((function(e,t){var n=Yi(t);return Za(n)&&(n=o),Za(e)?lr(e,vr(t,1,Za,!0),o,n):[]}));function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:yu(n);return o<0&&(o=gn(r+o,0)),It(e,ui(t,3),o)}function Ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=yu(n),i=n<0?gn(r+i,0):mn(i,r-1)),It(e,ui(t,3),i,!0)}function qi(e){return null!=e&&e.length?vr(e,1):[]}function Hi(e){return e&&e.length?e[0]:o}var Zi=Zr((function(e){var t=Ot(e,vo);return t.length&&t[0]===e[0]?Tr(t):[]})),Gi=Zr((function(e){var t=Yi(e),n=Ot(e,vo);return t===Yi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Tr(n,ui(t,2)):[]})),Qi=Zr((function(e){var t=Yi(e),n=Ot(e,vo);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Tr(n,o,t):[]}));function Yi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ji=Zr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var ea=ti((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Kr(e,Ot(t,(function(e){return gi(e,n)?+e:e})).sort(Oo)),r}));function ta(e){return null==e?e:Sn.call(e)}var na=Zr((function(e){return so(vr(e,1,Za,!0))})),ra=Zr((function(e){var t=Yi(e);return Za(t)&&(t=o),so(vr(e,1,Za,!0),ui(t,2))})),oa=Zr((function(e){var t=Yi(e);return t="function"==typeof t?t:o,so(vr(e,1,Za,!0),o,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Za(e))return t=gn(e.length,t),!0})),Bt(t,(function(t){return Ot(e,Mt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Ot(n,(function(e){return gt(t,o,e)}))}var ua=Zr((function(e,t){return Za(e)?lr(e,t):[]})),sa=Zr((function(e){return ho(St(e,Za))})),ca=Zr((function(e){var t=Yi(e);return Za(t)&&(t=o),ho(St(e,Za),ui(t,2))})),la=Zr((function(e){var t=Yi(e);return t="function"==typeof t?t:o,ho(St(e,Za),o,t)})),fa=Zr(ia),pa=Zr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,aa(e,n)}));function da(e){var t=$n(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ya=ti((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Vn&&gi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:o}),new zn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),va=Co((function(e,t,n){Ne.call(e,n)?++e[n]:or(e,n,1)})),ga=Mo(Wi),ma=Mo(Ki);function ba(e,t){return(Ka(e)?bt:fr)(e,ui(t,3))}function wa(e,t){return(Ka(e)?wt:pr)(e,ui(t,3))}var _a=Co((function(e,t,n){Ne.call(e,n)?e[n].push(t):or(e,n,[t])})),Sa=Zr((function(e,t,n){var o=-1,i="function"==typeof t,a=Ha(e)?r(e.length):[];return fr(e,(function(e){a[++o]=i?gt(t,e,n):Pr(e,t,n)})),a})),xa=Co((function(e,t,n){or(e,n,t)}));function Ea(e,t){return(Ka(e)?Ot:Mr)(e,ui(t,3))}var Oa=Co((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ka=Zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&mi(e,t[0],t[1])?t=[]:n>2&&mi(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,vr(t,1),[])})),ja=Ct||function(){return it.Date.now()};function Ta(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Qo(e,c,o,o,o,o,t)}function Pa(e,t){var n;if("function"!=typeof t)throw new je(i);return e=yu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ca=Zr((function(e,t,n){var r=1;if(n.length){var o=tn(n,ai(Ca));r|=s}return Qo(e,r,t,n,o)})),Aa=Zr((function(e,t,n){var r=3;if(n.length){var o=tn(n,ai(Aa));r|=s}return Qo(t,r,e,n,o)}));function Ia(e,t,n){var r,a,u,s,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new je(i);function y(t){var n=r,i=a;return r=a=o,f=t,s=e.apply(i,n)}function v(e){return f=e,c=Ci(m,t),p?y(e):s}function g(e){var n=e-l;return l===o||n>=t||n<0||d&&e-f>=u}function m(){var e=ja();if(g(e))return b(e);c=Ci(m,function(e){var n=t-(e-l);return d?mn(n,u-(e-f)):n}(e))}function b(e){return c=o,h&&r?y(e):(r=a=o,s)}function w(){var e=ja(),n=g(e);if(r=arguments,a=this,l=e,n){if(c===o)return v(l);if(d)return _o(c),c=Ci(m,t),y(l)}return c===o&&(c=Ci(m,t)),s}return t=gu(t)||0,tu(n)&&(p=!!n.leading,u=(d="maxWait"in n)?gn(gu(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h),w.cancel=function(){c!==o&&_o(c),f=0,r=l=a=c=o},w.flush=function(){return c===o?s:b(ja())},w}var Na=Zr((function(e,t){return cr(e,1,t)})),Ra=Zr((function(e,t,n){return cr(e,gu(t)||0,n)}));function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Da.Cache||qn),n}function La(e){if("function"!=typeof e)throw new je(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=qn;var Ma=bo((function(e,t){var n=(t=1==t.length&&Ka(t[0])?Ot(t[0],Vt(ui())):Ot(vr(t,1),Vt(ui()))).length;return Zr((function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return gt(e,this,r)}))})),Ua=Zr((function(e,t){var n=tn(t,ai(Ua));return Qo(e,s,o,t,n)})),$a=Zr((function(e,t){var n=tn(t,ai($a));return Qo(e,64,o,t,n)})),Fa=ti((function(e,t){return Qo(e,256,o,o,o,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var za=Ko(Or),Va=Ko((function(e,t){return e>=t})),Wa=Cr(function(){return arguments}())?Cr:function(e){return nu(e)&&Ne.call(e,"callee")&&!et.call(e,"callee")},Ka=r.isArray,qa=ft?Vt(ft):function(e){return nu(e)&&Er(e)==A};function Ha(e){return null!=e&&eu(e.length)&&!Ja(e)}function Za(e){return nu(e)&&Ha(e)}var Ga=dn||gs,Qa=pt?Vt(pt):function(e){return nu(e)&&Er(e)==m};function Ya(e){if(!nu(e))return!1;var t=Er(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iu(e)}function Ja(e){if(!tu(e))return!1;var t=Er(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==yu(e)}function eu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function tu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function nu(e){return null!=e&&"object"==typeof e}var ru=dt?Vt(dt):function(e){return nu(e)&&di(e)==S};function ou(e){return"number"==typeof e||nu(e)&&Er(e)==x}function iu(e){if(!nu(e)||Er(e)!=E)return!1;var t=qe(e);if(null===t)return!0;var n=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ie.call(n)==Me}var au=ht?Vt(ht):function(e){return nu(e)&&Er(e)==k},uu=yt?Vt(yt):function(e){return nu(e)&&di(e)==j};function su(e){return"string"==typeof e||!Ka(e)&&nu(e)&&Er(e)==T}function cu(e){return"symbol"==typeof e||nu(e)&&Er(e)==P}var lu=vt?Vt(vt):function(e){return nu(e)&&eu(e.length)&&!!Je[Er(e)]},fu=Ko(Lr),pu=Ko((function(e,t){return e<=t}));function du(e){if(!e)return[];if(Ha(e))return su(e)?an(e):To(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=di(e);return(t==S?Xt:t==j?nn:Bu)(e)}function hu(e){return e?(e=gu(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function yu(e){var t=hu(e),n=t%1;return t==t?n?t-n:t:0}function vu(e){return e?ar(yu(e),0,d):0}function gu(e){if("number"==typeof e)return e;if(cu(e))return p;if(tu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||ve.test(e)?nt(e.slice(2),n?2:8):de.test(e)?p:+e}function mu(e){return Po(e,Nu(e))}function bu(e){return null==e?"":uo(e)}var wu=Ao((function(e,t){if(Si(t)||Ha(t))Po(t,Iu(t),e);else for(var n in t)Ne.call(t,n)&&er(e,n,t[n])})),_u=Ao((function(e,t){Po(t,Nu(t),e)})),Su=Ao((function(e,t,n,r){Po(t,Nu(t),e,r)})),xu=Ao((function(e,t,n,r){Po(t,Iu(t),e,r)})),Eu=ti(ir),Ou=Zr((function(e,t){e=Ee(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&mi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=Nu(a),s=-1,c=u.length;++s<c;){var l=u[s],f=e[l];(f===o||Ba(f,Ce[l])&&!Ne.call(e,l))&&(e[l]=a[l])}return e})),ku=Zr((function(e){return e.push(o,Jo),gt(Du,o,e)}));function ju(e,t,n){var r=null==e?o:Sr(e,t);return r===o?n:r}function Tu(e,t){return null!=e&&hi(e,t,jr)}var Pu=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n}),ts(os)),Cu=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Ne.call(e,t)?e[t].push(n):e[t]=[n]}),ui),Au=Zr(Pr);function Iu(e){return Ha(e)?Gn(e):Dr(e)}function Nu(e){return Ha(e)?Gn(e,!0):function(e){if(!tu(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=Si(e),n=[];for(var r in e)("constructor"!=r||!t&&Ne.call(e,r))&&n.push(r);return n}(e)}var Ru=Ao((function(e,t,n){Fr(e,t,n)})),Du=Ao((function(e,t,n,r){Fr(e,t,n,r)})),Lu=ti((function(e,t){var n={};if(null==e)return n;var r=!1;t=Ot(t,(function(t){return t=mo(t,e),r||(r=t.length>1),t})),Po(e,ri(e),n),r&&(n=ur(n,7,Xo));for(var o=t.length;o--;)co(n,t[o]);return n})),Mu=ti((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return Tu(e,n)}))}(e,t)}));function Uu(e,t){if(null==e)return{};var n=Ot(ri(e),(function(e){return[e]}));return t=ui(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var $u=Go(Iu),Fu=Go(Nu);function Bu(e){return null==e?[]:Wt(e,Iu(e))}var zu=Do((function(e,t,n){return t=t.toLowerCase(),e+(n?Vu(t):t)}));function Vu(e){return Yu(bu(e).toLowerCase())}function Wu(e){return(e=bu(e))&&e.replace(me,Gt).replace(Ke,"")}var Ku=Do((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qu=Do((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Hu=Ro("toLowerCase"),Zu=Do((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Gu=Do((function(e,t,n){return e+(n?" ":"")+Yu(t)})),Qu=Do((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Yu=Ro("toUpperCase");function Ju(e,t,n){return e=bu(e),(t=n?o:t)===o?function(e){return Ge.test(e)}(e)?function(e){return e.match(He)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Xu=Zr((function(e,t){try{return gt(e,o,t)}catch(e){return Ya(e)?e:new _e(e)}})),es=ti((function(e,t){return bt(t,(function(t){t=Ui(t),or(e,t,Ca(e[t],e))})),e}));function ts(e){return function(){return e}}var ns=Uo(),rs=Uo(!0);function os(e){return e}function is(e){return Rr("function"==typeof e?e:ur(e,1))}var as=Zr((function(e,t){return function(n){return Pr(n,e,t)}})),us=Zr((function(e,t){return function(n){return Pr(e,n,t)}}));function ss(e,t,n){var r=Iu(t),o=_r(t,r);null!=n||tu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=_r(t,Iu(t)));var i=!(tu(n)&&"chain"in n&&!n.chain),a=Ja(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=To(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,kt([this.value()],arguments))})})),e}function cs(){}var ls=zo(Ot),fs=zo(_t),ps=zo(Pt);function ds(e){return bi(e)?Mt(Ui(e)):function(e){return function(t){return Sr(t,e)}}(e)}var hs=Wo(),ys=Wo(!0);function vs(){return[]}function gs(){return!1}var ms,bs=Bo((function(e,t){return e+t}),0),ws=Ho("ceil"),_s=Bo((function(e,t){return e/t}),1),Ss=Ho("floor"),xs=Bo((function(e,t){return e*t}),1),Es=Ho("round"),Os=Bo((function(e,t){return e-t}),0);return $n.after=function(e,t){if("function"!=typeof t)throw new je(i);return e=yu(e),function(){if(--e<1)return t.apply(this,arguments)}},$n.ary=Ta,$n.assign=wu,$n.assignIn=_u,$n.assignInWith=Su,$n.assignWith=xu,$n.at=Eu,$n.before=Pa,$n.bind=Ca,$n.bindAll=es,$n.bindKey=Aa,$n.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ka(e)?e:[e]},$n.chain=da,$n.chunk=function(e,t,n){t=(n?mi(e,t,n):t===o)?1:gn(yu(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,u=0,s=r(ln(i/t));a<i;)s[u++]=to(e,a,a+=t);return s},$n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},$n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(Ka(n)?To(n):[n],vr(t,1))},$n.cond=function(e){var t=null==e?0:e.length,n=ui();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new je(i);return[n(e[0]),e[1]]})):[],Zr((function(n){for(var r=-1;++r<t;){var o=e[r];if(gt(o[0],this,n))return gt(o[1],this,n)}}))},$n.conforms=function(e){return function(e){var t=Iu(e);return function(n){return sr(n,e,t)}}(ur(e,1))},$n.constant=ts,$n.countBy=va,$n.create=function(e,t){var n=Fn(e);return null==t?n:rr(n,t)},$n.curry=function e(t,n,r){var i=Qo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},$n.curryRight=function e(t,n,r){var i=Qo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},$n.debounce=Ia,$n.defaults=Ou,$n.defaultsDeep=ku,$n.defer=Na,$n.delay=Ra,$n.difference=Bi,$n.differenceBy=zi,$n.differenceWith=Vi,$n.drop=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=n||t===o?1:yu(t))<0?0:t,r):[]},$n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,0,(t=r-(t=n||t===o?1:yu(t)))<0?0:t):[]},$n.dropRightWhile=function(e,t){return e&&e.length?fo(e,ui(t,3),!0,!0):[]},$n.dropWhile=function(e,t){return e&&e.length?fo(e,ui(t,3),!0):[]},$n.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=yu(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:yu(r))<0&&(r+=i),r=n>r?0:vu(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},$n.filter=function(e,t){return(Ka(e)?St:yr)(e,ui(t,3))},$n.flatMap=function(e,t){return vr(Ea(e,t),1)},$n.flatMapDeep=function(e,t){return vr(Ea(e,t),l)},$n.flatMapDepth=function(e,t,n){return n=n===o?1:yu(n),vr(Ea(e,t),n)},$n.flatten=qi,$n.flattenDeep=function(e){return null!=e&&e.length?vr(e,l):[]},$n.flattenDepth=function(e,t){return null!=e&&e.length?vr(e,t=t===o?1:yu(t)):[]},$n.flip=function(e){return Qo(e,512)},$n.flow=ns,$n.flowRight=rs,$n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},$n.functions=function(e){return null==e?[]:_r(e,Iu(e))},$n.functionsIn=function(e){return null==e?[]:_r(e,Nu(e))},$n.groupBy=_a,$n.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},$n.intersection=Zi,$n.intersectionBy=Gi,$n.intersectionWith=Qi,$n.invert=Pu,$n.invertBy=Cu,$n.invokeMap=Sa,$n.iteratee=is,$n.keyBy=xa,$n.keys=Iu,$n.keysIn=Nu,$n.map=Ea,$n.mapKeys=function(e,t){var n={};return t=ui(t,3),br(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},$n.mapValues=function(e,t){var n={};return t=ui(t,3),br(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},$n.matches=function(e){return Ur(ur(e,1))},$n.matchesProperty=function(e,t){return $r(e,ur(t,1))},$n.memoize=Da,$n.merge=Ru,$n.mergeWith=Du,$n.method=as,$n.methodOf=us,$n.mixin=ss,$n.negate=La,$n.nthArg=function(e){return e=yu(e),Zr((function(t){return Br(t,e)}))},$n.omit=Lu,$n.omitBy=function(e,t){return Uu(e,La(ui(t)))},$n.once=function(e){return Pa(2,e)},$n.orderBy=function(e,t,n,r){return null==e?[]:(Ka(t)||(t=null==t?[]:[t]),Ka(n=r?o:n)||(n=null==n?[]:[n]),zr(e,t,n))},$n.over=ls,$n.overArgs=Ma,$n.overEvery=fs,$n.overSome=ps,$n.partial=Ua,$n.partialRight=$a,$n.partition=Oa,$n.pick=Mu,$n.pickBy=Uu,$n.property=ds,$n.propertyOf=function(e){return function(t){return null==e?o:Sr(e,t)}},$n.pull=Ji,$n.pullAll=Xi,$n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,ui(n,2)):e},$n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,o,n):e},$n.pullAt=ea,$n.range=hs,$n.rangeRight=ys,$n.rearg=Fa,$n.reject=function(e,t){return(Ka(e)?St:yr)(e,La(ui(t,3)))},$n.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ui(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Kr(e,o),n},$n.rest=function(e,t){if("function"!=typeof e)throw new je(i);return Zr(e,t=t===o?t:yu(t))},$n.reverse=ta,$n.sampleSize=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:yu(t),(Ka(e)?Yn:Qr)(e,t)},$n.set=function(e,t,n){return null==e?e:Yr(e,t,n)},$n.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Yr(e,t,n,r)},$n.shuffle=function(e){return(Ka(e)?Jn:eo)(e)},$n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mi(e,t,n)?(t=0,n=r):(t=null==t?0:yu(t),n=n===o?r:yu(n)),to(e,t,n)):[]},$n.sortBy=ka,$n.sortedUniq=function(e){return e&&e.length?io(e):[]},$n.sortedUniqBy=function(e,t){return e&&e.length?io(e,ui(t,2)):[]},$n.split=function(e,t,n){return n&&"number"!=typeof n&&mi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=bu(e))&&("string"==typeof t||null!=t&&!au(t))&&!(t=uo(t))&&Jt(e)?wo(an(e),0,n):e.split(t,n):[]},$n.spread=function(e,t){if("function"!=typeof e)throw new je(i);return t=null==t?0:gn(yu(t),0),Zr((function(n){var r=n[t],o=wo(n,0,t);return r&&kt(o,r),gt(e,this,o)}))},$n.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},$n.take=function(e,t,n){return e&&e.length?to(e,0,(t=n||t===o?1:yu(t))<0?0:t):[]},$n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=r-(t=n||t===o?1:yu(t)))<0?0:t,r):[]},$n.takeRightWhile=function(e,t){return e&&e.length?fo(e,ui(t,3),!1,!0):[]},$n.takeWhile=function(e,t){return e&&e.length?fo(e,ui(t,3)):[]},$n.tap=function(e,t){return t(e),e},$n.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new je(i);return tu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ia(e,t,{leading:r,maxWait:t,trailing:o})},$n.thru=ha,$n.toArray=du,$n.toPairs=$u,$n.toPairsIn=Fu,$n.toPath=function(e){return Ka(e)?Ot(e,Ui):cu(e)?[e]:To(Mi(bu(e)))},$n.toPlainObject=mu,$n.transform=function(e,t,n){var r=Ka(e),o=r||Ga(e)||lu(e);if(t=ui(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:tu(e)&&Ja(i)?Fn(qe(e)):{}}return(o?bt:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},$n.unary=function(e){return Ta(e,1)},$n.union=na,$n.unionBy=ra,$n.unionWith=oa,$n.uniq=function(e){return e&&e.length?so(e):[]},$n.uniqBy=function(e,t){return e&&e.length?so(e,ui(t,2)):[]},$n.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},$n.unset=function(e,t){return null==e||co(e,t)},$n.unzip=ia,$n.unzipWith=aa,$n.update=function(e,t,n){return null==e?e:lo(e,t,go(n))},$n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:lo(e,t,go(n),r)},$n.values=Bu,$n.valuesIn=function(e){return null==e?[]:Wt(e,Nu(e))},$n.without=ua,$n.words=Ju,$n.wrap=function(e,t){return Ua(go(t),e)},$n.xor=sa,$n.xorBy=ca,$n.xorWith=la,$n.zip=fa,$n.zipObject=function(e,t){return yo(e||[],t||[],er)},$n.zipObjectDeep=function(e,t){return yo(e||[],t||[],Yr)},$n.zipWith=pa,$n.entries=$u,$n.entriesIn=Fu,$n.extend=_u,$n.extendWith=Su,ss($n,$n),$n.add=bs,$n.attempt=Xu,$n.camelCase=zu,$n.capitalize=Vu,$n.ceil=ws,$n.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=gu(n))==n?n:0),t!==o&&(t=(t=gu(t))==t?t:0),ar(gu(e),t,n)},$n.clone=function(e){return ur(e,4)},$n.cloneDeep=function(e){return ur(e,5)},$n.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:o)},$n.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:o)},$n.conformsTo=function(e,t){return null==t||sr(e,t,Iu(t))},$n.deburr=Wu,$n.defaultTo=function(e,t){return null==e||e!=e?t:e},$n.divide=_s,$n.endsWith=function(e,t,n){e=bu(e),t=uo(t);var r=e.length,i=n=n===o?r:ar(yu(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},$n.eq=Ba,$n.escape=function(e){return(e=bu(e))&&Z.test(e)?e.replace(q,Qt):e},$n.escapeRegExp=function(e){return(e=bu(e))&&ne.test(e)?e.replace(te,"\\$&"):e},$n.every=function(e,t,n){var r=Ka(e)?_t:dr;return n&&mi(e,t,n)&&(t=o),r(e,ui(t,3))},$n.find=ga,$n.findIndex=Wi,$n.findKey=function(e,t){return At(e,ui(t,3),br)},$n.findLast=ma,$n.findLastIndex=Ki,$n.findLastKey=function(e,t){return At(e,ui(t,3),wr)},$n.floor=Ss,$n.forEach=ba,$n.forEachRight=wa,$n.forIn=function(e,t){return null==e?e:gr(e,ui(t,3),Nu)},$n.forInRight=function(e,t){return null==e?e:mr(e,ui(t,3),Nu)},$n.forOwn=function(e,t){return e&&br(e,ui(t,3))},$n.forOwnRight=function(e,t){return e&&wr(e,ui(t,3))},$n.get=ju,$n.gt=za,$n.gte=Va,$n.has=function(e,t){return null!=e&&hi(e,t,kr)},$n.hasIn=Tu,$n.head=Hi,$n.identity=os,$n.includes=function(e,t,n,r){e=Ha(e)?e:Bu(e),n=n&&!r?yu(n):0;var o=e.length;return n<0&&(n=gn(o+n,0)),su(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Nt(e,t,n)>-1},$n.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:yu(n);return o<0&&(o=gn(r+o,0)),Nt(e,t,o)},$n.inRange=function(e,t,n){return t=hu(t),n===o?(n=t,t=0):n=hu(n),function(e,t,n){return e>=mn(t,n)&&e<gn(t,n)}(e=gu(e),t,n)},$n.invoke=Au,$n.isArguments=Wa,$n.isArray=Ka,$n.isArrayBuffer=qa,$n.isArrayLike=Ha,$n.isArrayLikeObject=Za,$n.isBoolean=function(e){return!0===e||!1===e||nu(e)&&Er(e)==g},$n.isBuffer=Ga,$n.isDate=Qa,$n.isElement=function(e){return nu(e)&&1===e.nodeType&&!iu(e)},$n.isEmpty=function(e){if(null==e)return!0;if(Ha(e)&&(Ka(e)||"string"==typeof e||"function"==typeof e.splice||Ga(e)||lu(e)||Wa(e)))return!e.length;var t=di(e);if(t==S||t==j)return!e.size;if(Si(e))return!Dr(e).length;for(var n in e)if(Ne.call(e,n))return!1;return!0},$n.isEqual=function(e,t){return Ar(e,t)},$n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Ar(e,t,o,n):!!r},$n.isError=Ya,$n.isFinite=function(e){return"number"==typeof e&&hn(e)},$n.isFunction=Ja,$n.isInteger=Xa,$n.isLength=eu,$n.isMap=ru,$n.isMatch=function(e,t){return e===t||Ir(e,t,ci(t))},$n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ir(e,t,ci(t),n)},$n.isNaN=function(e){return ou(e)&&e!=+e},$n.isNative=function(e){if(_i(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(e)},$n.isNil=function(e){return null==e},$n.isNull=function(e){return null===e},$n.isNumber=ou,$n.isObject=tu,$n.isObjectLike=nu,$n.isPlainObject=iu,$n.isRegExp=au,$n.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=f},$n.isSet=uu,$n.isString=su,$n.isSymbol=cu,$n.isTypedArray=lu,$n.isUndefined=function(e){return e===o},$n.isWeakMap=function(e){return nu(e)&&di(e)==C},$n.isWeakSet=function(e){return nu(e)&&"[object WeakSet]"==Er(e)},$n.join=function(e,t){return null==e?"":yn.call(e,t)},$n.kebabCase=Ku,$n.last=Yi,$n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=yu(n))<0?gn(r+i,0):mn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):It(e,Dt,i,!0)},$n.lowerCase=qu,$n.lowerFirst=Hu,$n.lt=fu,$n.lte=pu,$n.max=function(e){return e&&e.length?hr(e,os,Or):o},$n.maxBy=function(e,t){return e&&e.length?hr(e,ui(t,2),Or):o},$n.mean=function(e){return Lt(e,os)},$n.meanBy=function(e,t){return Lt(e,ui(t,2))},$n.min=function(e){return e&&e.length?hr(e,os,Lr):o},$n.minBy=function(e,t){return e&&e.length?hr(e,ui(t,2),Lr):o},$n.stubArray=vs,$n.stubFalse=gs,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=xs,$n.nth=function(e,t){return e&&e.length?Br(e,yu(t)):o},$n.noConflict=function(){return it._===this&&(it._=Ue),this},$n.noop=cs,$n.now=ja,$n.pad=function(e,t,n){e=bu(e);var r=(t=yu(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(fn(o),n)+e+Vo(ln(o),n)},$n.padEnd=function(e,t,n){e=bu(e);var r=(t=yu(t))?on(e):0;return t&&r<t?e+Vo(t-r,n):e},$n.padStart=function(e,t,n){e=bu(e);var r=(t=yu(t))?on(e):0;return t&&r<t?Vo(t-r,n)+e:e},$n.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(bu(e).replace(re,""),t||0)},$n.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hu(e),t===o?(t=e,e=0):t=hu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=_n();return mn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return qr(e,t)},$n.reduce=function(e,t,n){var r=Ka(e)?jt:$t,o=arguments.length<3;return r(e,ui(t,4),n,o,fr)},$n.reduceRight=function(e,t,n){var r=Ka(e)?Tt:$t,o=arguments.length<3;return r(e,ui(t,4),n,o,pr)},$n.repeat=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:yu(t),Hr(bu(e),t)},$n.replace=function(){var e=arguments,t=bu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},$n.result=function(e,t,n){var r=-1,i=(t=mo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Ui(t[r])];a===o&&(r=i,a=n),e=Ja(a)?a.call(e):a}return e},$n.round=Es,$n.runInContext=e,$n.sample=function(e){return(Ka(e)?Qn:Gr)(e)},$n.size=function(e){if(null==e)return 0;if(Ha(e))return su(e)?on(e):e.length;var t=di(e);return t==S||t==j?e.size:Dr(e).length},$n.snakeCase=Zu,$n.some=function(e,t,n){var r=Ka(e)?Pt:no;return n&&mi(e,t,n)&&(t=o),r(e,ui(t,3))},$n.sortedIndex=function(e,t){return ro(e,t)},$n.sortedIndexBy=function(e,t,n){return oo(e,t,ui(n,2))},$n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ro(e,t);if(r<n&&Ba(e[r],t))return r}return-1},$n.sortedLastIndex=function(e,t){return ro(e,t,!0)},$n.sortedLastIndexBy=function(e,t,n){return oo(e,t,ui(n,2),!0)},$n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ro(e,t,!0)-1;if(Ba(e[n],t))return n}return-1},$n.startCase=Gu,$n.startsWith=function(e,t,n){return e=bu(e),n=null==n?0:ar(yu(n),0,e.length),t=uo(t),e.slice(n,n+t.length)==t},$n.subtract=Os,$n.sum=function(e){return e&&e.length?Ft(e,os):0},$n.sumBy=function(e,t){return e&&e.length?Ft(e,ui(t,2)):0},$n.template=function(e,t,n){var r=$n.templateSettings;n&&mi(e,t,n)&&(t=o),e=bu(e),t=Su({},t,r,Yo);var i,a,u=Su({},t.imports,r.imports,Yo),s=Iu(u),c=Wt(u,s),l=0,f=t.interpolate||be,p="__p += '",d=Oe((t.escape||be).source+"|"+f.source+"|"+(f===Y?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ye+"]")+"\n";e.replace(d,(function(t,n,r,o,u,s){return r||(r=o),p+=e.slice(l,s).replace(we,Yt),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),u&&(a=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+t.length,t})),p+="';\n";var y=Ne.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new _e("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(z,""):p).replace(V,"$1").replace(W,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Xu((function(){return Se(s,h+"return "+p).apply(o,c)}));if(v.source=p,Ya(v))throw v;return v},$n.times=function(e,t){if((e=yu(e))<1||e>f)return[];var n=d,r=mn(e,d);t=ui(t),e-=d;for(var o=Bt(r,t);++n<e;)t(n);return o},$n.toFinite=hu,$n.toInteger=yu,$n.toLength=vu,$n.toLower=function(e){return bu(e).toLowerCase()},$n.toNumber=gu,$n.toSafeInteger=function(e){return e?ar(yu(e),-9007199254740991,f):0===e?e:0},$n.toString=bu,$n.toUpper=function(e){return bu(e).toUpperCase()},$n.trim=function(e,t,n){if((e=bu(e))&&(n||t===o))return zt(e);if(!e||!(t=uo(t)))return e;var r=an(e),i=an(t);return wo(r,qt(r,i),Ht(r,i)+1).join("")},$n.trimEnd=function(e,t,n){if((e=bu(e))&&(n||t===o))return e.slice(0,un(e)+1);if(!e||!(t=uo(t)))return e;var r=an(e);return wo(r,0,Ht(r,an(t))+1).join("")},$n.trimStart=function(e,t,n){if((e=bu(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=uo(t)))return e;var r=an(e);return wo(r,qt(r,an(t))).join("")},$n.truncate=function(e,t){var n=30,r="...";if(tu(t)){var i="separator"in t?t.separator:i;n="length"in t?yu(t.length):n,r="omission"in t?uo(t.omission):r}var a=(e=bu(e)).length;if(Jt(e)){var u=an(e);a=u.length}if(n>=a)return e;var s=n-on(r);if(s<1)return r;var c=u?wo(u,0,s).join(""):e.slice(0,s);if(i===o)return c+r;if(u&&(s+=c.length-s),au(i)){if(e.slice(s).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,bu(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===o?s:p)}}else if(e.indexOf(uo(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},$n.unescape=function(e){return(e=bu(e))&&H.test(e)?e.replace(K,sn):e},$n.uniqueId=function(e){var t=++Re;return bu(e)+t},$n.upperCase=Qu,$n.upperFirst=Yu,$n.each=ba,$n.eachRight=wa,$n.first=Hi,ss($n,(ms={},br($n,(function(e,t){Ne.call($n.prototype,t)||(ms[t]=e)})),ms),{chain:!1}),$n.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){$n[e].placeholder=$n})),bt(["drop","take"],(function(e,t){Vn.prototype[e]=function(n){n=n===o?1:gn(yu(n),0);var r=this.__filtered__&&!t?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ui(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(os)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Zr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return Pr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(La(ui(e)))},Vn.prototype.slice=function(e,t){e=yu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Vn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=yu(t))<0?n.dropRight(-t):n.take(t-e)),n)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},br(Vn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=$n[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&($n.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,s=t instanceof Vn,c=u[0],l=s||Ka(t),f=function(e){var t=i.apply($n,kt([e],u));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,y=s&&!d;if(!a&&l){t=y?t:new Vn(this);var v=e.apply(t,u);return v.__actions__.push({func:ha,args:[f],thisArg:o}),new zn(v,p)}return h&&y?e.apply(this,u):(v=this.thru(f),h?r?v.value()[0]:v.value():v)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);$n.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ka(o)?o:[],e)}return this[n]((function(n){return t.apply(Ka(n)?n:[],e)}))}})),br(Vn.prototype,(function(e,t){var n=$n[t];if(n){var r=n.name+"";Ne.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[$o(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=To(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=To(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=To(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ka(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=gn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,f=l.length,p=0,d=mn(s,this.__takeCount__);if(!n||!r&&o==s&&d==s)return po(e,this.__actions__);var h=[];e:for(;s--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var g=l[y],m=g.iteratee,b=g.type,w=m(v);if(2==b)v=w;else if(!w){if(1==b)continue e;break e}}h[p++]=v}return h},$n.prototype.at=ya,$n.prototype.chain=function(){return da(this)},$n.prototype.commit=function(){return new zn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===o&&(this.__values__=du(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},$n.prototype.plant=function(e){for(var t,n=this;n instanceof Bn;){var r=Fi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},$n.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:o}),new zn(t,this.__chain__)}return this.thru(ta)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,at&&($n.prototype[at]=function(){return this}),$n}();it._=cn,(r=function(){return cn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},651:(e,t,n)=>{!function(t){var n=function(e){return o(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function o(e,t,o){var a=o[0],u=o.length;(e||"object"!==i(a))&&(a={});for(var s=0;s<u;++s){var c=o[s];if("object"===i(c))for(var l in c)if("__proto__"!==l){var f=e?n.clone(c[l]):c[l];a[l]=t?r(a[l],f):f}}return a}function i(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return o(!0===e,!0,arguments)},n.clone=function(e){var t,r,o=e,a=i(e);if("array"===a)for(o=[],r=e.length,t=0;t<r;++t)o[t]=n.clone(e[t]);else if("object"===a)for(t in o={},e)o[t]=n.clone(e[t]);return o},t?e.exports=n:window.merge=n}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},4516:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,s=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(s[l]=a[l]);if(t){u=t(a);for(var f=0;f<u.length;f++)r.call(a,u[f])&&(s[u[f]]=a[u[f]])}}return s}},3975:(e,t,n)=>{"use strict";var r=n(2735),o=n(4516),i=n(9146);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function u(e,t,n,r,o,i,a,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var s=!1,c=null,l=!1,f=null,p={onError:function(e){s=!0,c=e}};function d(e,t,n,r,o,i,a,l,f){s=!1,c=null,u.apply(p,arguments)}var h=null,y=null,v=null;function g(e,t,n){var r=e.type||"unknown-event";e.currentTarget=v(n),function(e,t,n,r,o,i,u,p,h){if(d.apply(this,arguments),s){if(!s)throw Error(a(198));var y=c;s=!1,c=null,l||(l=!0,f=y)}}(r,t,void 0,e),e.currentTarget=null}var m=null,b={};function w(){if(m)for(var e in b){var t=b[e],n=m.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!S[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in S[n]=t,n=t.eventTypes){var o=void 0,i=n[r],u=t,s=r;if(x.hasOwnProperty(s))throw Error(a(99,s));x[s]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&_(c[o],u,s);o=!0}else i.registrationName?(_(i.registrationName,u,s),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function _(e,t,n){if(E[e])throw Error(a(100,e));E[e]=t,O[e]=t.eventTypes[n].dependencies}var S=[],x={},E={},O={};function k(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var j=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),T=null,P=null,C=null;function A(e){if(e=y(e)){if("function"!=typeof T)throw Error(a(280));var t=e.stateNode;t&&(t=h(t),T(e.stateNode,e.type,t))}}function I(e){P?C?C.push(e):C=[e]:P=e}function N(){if(P){var e=P,t=C;if(C=P=null,A(e),t)for(e=0;e<t.length;e++)A(t[e])}}function R(e,t){return e(t)}function D(e,t,n,r,o){return e(t,n,r,o)}function L(){}var M=R,U=!1,$=!1;function F(){null===P&&null===C||(L(),N())}function B(e,t,n){if($)return e(t,n);$=!0;try{return M(e,t,n)}finally{$=!1,F()}}var z=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,W={},K={};function q(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var H={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){H[e]=new q(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];H[t]=new q(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){H[e]=new q(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){H[e]=new q(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){H[e]=new q(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){H[e]=new q(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){H[e]=new q(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){H[e]=new q(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){H[e]=new q(e,5,!1,e.toLowerCase(),null,!1)}));var Z=/[\-:]([a-z])/g;function G(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(Z,G);H[t]=new q(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(Z,G);H[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(Z,G);H[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){H[e]=new q(e,1,!1,e.toLowerCase(),null,!1)})),H.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){H[e]=new q(e,1,!1,e.toLowerCase(),null,!0)}));var Q=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(e,t,n,r){var o=H.hasOwnProperty(t)?H[t]:null;(null!==o?0===o.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!V.call(K,e)||!V.call(W,e)&&(z.test(e)?K[e]=!0:(W[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}Q.hasOwnProperty("ReactCurrentDispatcher")||(Q.ReactCurrentDispatcher={current:null}),Q.hasOwnProperty("ReactCurrentBatchConfig")||(Q.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,X="function"==typeof Symbol&&Symbol.for,ee=X?Symbol.for("react.element"):60103,te=X?Symbol.for("react.portal"):60106,ne=X?Symbol.for("react.fragment"):60107,re=X?Symbol.for("react.strict_mode"):60108,oe=X?Symbol.for("react.profiler"):60114,ie=X?Symbol.for("react.provider"):60109,ae=X?Symbol.for("react.context"):60110,ue=X?Symbol.for("react.concurrent_mode"):60111,se=X?Symbol.for("react.forward_ref"):60112,ce=X?Symbol.for("react.suspense"):60113,le=X?Symbol.for("react.suspense_list"):60120,fe=X?Symbol.for("react.memo"):60115,pe=X?Symbol.for("react.lazy"):60116,de=X?Symbol.for("react.block"):60121,he="function"==typeof Symbol&&Symbol.iterator;function ye(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=he&&e[he]||e["@@iterator"])?e:null}function ve(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case le:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case se:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ve(e.type);case de:return ve(e.render);case pe:if(e=1===e._status?e._result:null)return ve(e)}return null}function ge(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ve(e.type);n=null,r&&(n=ve(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(J,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function me(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Se(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=me(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Ee(e,t){null!=(t=t.checked)&&Y(e,"checked",t,!1)}function Oe(e,t){Ee(e,t);var n=me(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?je(e,t.type,n):t.hasOwnProperty("defaultValue")&&je(e,t.type,me(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ke(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function je(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Te(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Pe(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+me(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ce(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:me(n)}}function Ie(e,t){var n=me(t.value),r=me(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ne(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Re(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function De(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Re(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Le,Me,Ue=(Me=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Le=Le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return Me(e,t)}))}:Me);function $e(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Fe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Fe("Animation","AnimationEnd"),animationiteration:Fe("Animation","AnimationIteration"),animationstart:Fe("Animation","AnimationStart"),transitionend:Fe("Transition","TransitionEnd")},ze={},Ve={};function We(e){if(ze[e])return ze[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ve)return ze[e]=n[t];return e}j&&(Ve=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var Ke=We("animationend"),qe=We("animationiteration"),He=We("animationstart"),Ze=We("transitionend"),Ge="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Qe=new("function"==typeof WeakMap?WeakMap:Map);function Ye(e){var t=Qe.get(e);return void 0===t&&(t=new Map,Qe.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function et(e){if(Je(e)!==e)throw Error(a(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return et(o),e;if(i===r)return et(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var u=!1,s=o.child;s;){if(s===n){u=!0,n=o,r=i;break}if(s===r){u=!0,r=o,n=i;break}s=s.sibling}if(!u){for(s=i.child;s;){if(s===n){u=!0,n=i,r=o;break}if(s===r){u=!0,r=i,n=o;break}s=s.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function nt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function rt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var ot=null;function it(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)g(e,t[r],n[r]);else t&&g(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function at(e){if(null!==e&&(ot=nt(ot,e)),e=ot,ot=null,e){if(rt(e,it),ot)throw Error(a(95));if(l)throw e=f,l=!1,f=null,e}}function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function st(e){if(!j)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function lt(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function ft(e,t,n,r){if(ct.length){var o=ct.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Pn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=ut(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var u=null,s=0;s<S.length;s++){var c=S[s];c&&(c=c.extractEvents(r,t,i,o,a))&&(u=nt(u,c))}at(u)}}function dt(e,t,n){if(!n.has(e)){switch(e){case"scroll":Ht(t,"scroll",!0);break;case"focus":case"blur":Ht(t,"focus",!0),Ht(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":st(e)&&Ht(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ge.indexOf(e)&&qt(e,t)}n.set(e,null)}}var ht,yt,vt,gt=!1,mt=[],bt=null,wt=null,_t=null,St=new Map,xt=new Map,Et=[],Ot="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),kt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function jt(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Tt(e,t){switch(e){case"focus":case"blur":bt=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":St.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xt.delete(t.pointerId)}}function Pt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=jt(t,n,r,o,i),null!==t&&null!==(t=Cn(t))&&yt(t),e):(e.eventSystemFlags|=r,e)}function Ct(e){var t=Pn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){vt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function At(e){if(null!==e.blockedOn)return!1;var t=Yt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Cn(t);return null!==n&&yt(n),e.blockedOn=t,!1}return!0}function It(e,t,n){At(e)&&n.delete(t)}function Nt(){for(gt=!1;0<mt.length;){var e=mt[0];if(null!==e.blockedOn){null!==(e=Cn(e.blockedOn))&&ht(e);break}var t=Yt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:mt.shift()}null!==bt&&At(bt)&&(bt=null),null!==wt&&At(wt)&&(wt=null),null!==_t&&At(_t)&&(_t=null),St.forEach(It),xt.forEach(It)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,gt||(gt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Nt)))}function Dt(e){function t(t){return Rt(t,e)}if(0<mt.length){Rt(mt[0],e);for(var n=1;n<mt.length;n++){var r=mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==bt&&Rt(bt,e),null!==wt&&Rt(wt,e),null!==_t&&Rt(_t,e),St.forEach(t),xt.forEach(t),n=0;n<Et.length;n++)(r=Et[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Et.length&&null===(n=Et[0]).blockedOn;)Ct(n),null===n.blockedOn&&Et.shift()}var Lt={},Mt=new Map,Ut=new Map,$t=["abort","abort",Ke,"animationEnd",qe,"animationIteration",He,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ze,"transitionEnd","waiting","waiting"];function Ft(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},Ut.set(r,t),Mt.set(r,i),Lt[o]=i}}Ft("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ft("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ft($t,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),zt=0;zt<Bt.length;zt++)Ut.set(Bt[zt],0);var Vt=i.unstable_UserBlockingPriority,Wt=i.unstable_runWithPriority,Kt=!0;function qt(e,t){Ht(t,e,!1)}function Ht(e,t,n){var r=Ut.get(t);switch(void 0===r?2:r){case 0:r=Zt.bind(null,t,1,e);break;case 1:r=Gt.bind(null,t,1,e);break;default:r=Qt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Zt(e,t,n,r){U||L();var o=Qt,i=U;U=!0;try{D(o,e,t,n,r)}finally{(U=i)||F()}}function Gt(e,t,n,r){Wt(Vt,Qt.bind(null,e,t,n,r))}function Qt(e,t,n,r){if(Kt)if(0<mt.length&&-1<Ot.indexOf(e))e=jt(null,e,t,n,r),mt.push(e);else{var o=Yt(e,t,n,r);if(null===o)Tt(e,r);else if(-1<Ot.indexOf(e))e=jt(o,e,t,n,r),mt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return bt=Pt(bt,e,t,n,r,o),!0;case"dragenter":return wt=Pt(wt,e,t,n,r,o),!0;case"mouseover":return _t=Pt(_t,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return St.set(i,Pt(St.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,xt.set(i,Pt(xt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Tt(e,r),e=ft(e,r,null,t);try{B(pt,e)}finally{lt(e)}}}}function Yt(e,t,n,r){if(null!==(n=Pn(n=ut(r)))){var o=Je(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=Xe(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=ft(e,r,n,t);try{B(pt,e)}finally{lt(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=en(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Jt).forEach((function(e){Xt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var an="http://www.w3.org/1999/xhtml";function un(e,t){var n=Ye(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=O[t];for(var r=0;r<t.length;r++)dt(t[r],e,n)}function sn(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ln(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fn(e,t){var n,r=ln(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ln(r)}}function pn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yn="$?",vn="$!",gn=null,mn=null;function bn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function wn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var _n="function"==typeof setTimeout?setTimeout:void 0,Sn="function"==typeof clearTimeout?clearTimeout:void 0;function xn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function En(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===vn||n===yn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var On=Math.random().toString(36).slice(2),kn="__reactInternalInstance$"+On,jn="__reactEventHandlers$"+On,Tn="__reactContainere$"+On;function Pn(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tn]||n[kn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=En(e);null!==e;){if(n=e[kn])return n;e=En(e)}return t}n=(e=n).parentNode}return null}function Cn(e){return!(e=e[kn]||e[Tn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function An(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function In(e){return e[jn]||null}function Nn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Rn(e,t){var n=e.stateNode;if(!n)return null;var r=h(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function Dn(e,t,n){(t=Rn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Ln(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Nn(t);for(t=n.length;0<t--;)Dn(n[t],"captured",e);for(t=0;t<n.length;t++)Dn(n[t],"bubbled",e)}}function Mn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Rn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Un(e){e&&e.dispatchConfig.registrationName&&Mn(e._targetInst,null,e)}function $n(e){rt(e,Ln)}var Fn=null,Bn=null,zn=null;function Vn(){if(zn)return zn;var e,t,n=Bn,r=n.length,o="value"in Fn?Fn.value:Fn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return zn=o.slice(e,1<t?1-t:void 0)}function Wn(){return!0}function Kn(){return!1}function qn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:Kn,this.isPropagationStopped=Kn,this}function Hn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Zn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Gn(e){e.eventPool=[],e.getPooled=Hn,e.release=Zn}o(qn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:Kn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Kn,this._dispatchInstances=this._dispatchListeners=null}}),qn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},qn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Gn(n),n},Gn(qn);var Qn=qn.extend({data:null}),Yn=qn.extend({data:null}),Jn=[9,13,27,32],Xn=j&&"CompositionEvent"in window,er=null;j&&"documentMode"in document&&(er=document.documentMode);var tr=j&&"TextEvent"in window&&!er,nr=j&&(!Xn||er&&8<er&&11>=er),rr=String.fromCharCode(32),or={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ir=!1;function ar(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ur(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var sr=!1,cr={eventTypes:or,extractEvents:function(e,t,n,r){var o;if(Xn)e:{switch(e){case"compositionstart":var i=or.compositionStart;break e;case"compositionend":i=or.compositionEnd;break e;case"compositionupdate":i=or.compositionUpdate;break e}i=void 0}else sr?ar(e,n)&&(i=or.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=or.compositionStart);return i?(nr&&"ko"!==n.locale&&(sr||i!==or.compositionStart?i===or.compositionEnd&&sr&&(o=Vn()):(Bn="value"in(Fn=r)?Fn.value:Fn.textContent,sr=!0)),i=Qn.getPooled(i,t,n,r),(o||null!==(o=ur(n)))&&(i.data=o),$n(i),o=i):o=null,(e=tr?function(e,t){switch(e){case"compositionend":return ur(t);case"keypress":return 32!==t.which?null:(ir=!0,rr);case"textInput":return(e=t.data)===rr&&ir?null:e;default:return null}}(e,n):function(e,t){if(sr)return"compositionend"===e||!Xn&&ar(e,t)?(e=Vn(),zn=Bn=Fn=null,sr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nr&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Yn.getPooled(or.beforeInput,t,n,r)).data=e,$n(t)):t=null,null===o?t:null===t?o:[o,t]}},lr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!lr[e.type]:"textarea"===t}var pr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function dr(e,t,n){return(e=qn.getPooled(pr.change,e,t,n)).type="change",I(n),$n(e),e}var hr=null,yr=null;function vr(e){at(e)}function gr(e){if(_e(An(e)))return e}function mr(e,t){if("change"===e)return t}var br=!1;function wr(){hr&&(hr.detachEvent("onpropertychange",_r),yr=hr=null)}function _r(e){if("value"===e.propertyName&&gr(yr))if(e=dr(yr,e,ut(e)),U)at(e);else{U=!0;try{R(vr,e)}finally{U=!1,F()}}}function Sr(e,t,n){"focus"===e?(wr(),yr=n,(hr=t).attachEvent("onpropertychange",_r)):"blur"===e&&wr()}function xr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return gr(yr)}function Er(e,t){if("click"===e)return gr(t)}function Or(e,t){if("input"===e||"change"===e)return gr(t)}j&&(br=st("input")&&(!document.documentMode||9<document.documentMode));var kr={eventTypes:pr,_isInputEventSupported:br,extractEvents:function(e,t,n,r){var o=t?An(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=mr;else if(fr(o))if(br)a=Or;else{a=xr;var u=Sr}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Er);if(a&&(a=a(e,t)))return dr(a,n,r);u&&u(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&je(o,"number",o.value)}},jr=qn.extend({view:null,detail:null}),Tr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Tr[e])&&!!t[e]}function Cr(){return Pr}var Ar=0,Ir=0,Nr=!1,Rr=!1,Dr=jr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Cr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Ar;return Ar=e.screenX,Nr?"mousemove"===e.type?e.screenX-t:0:(Nr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ir;return Ir=e.screenY,Rr?"mousemove"===e.type?e.screenY-t:0:(Rr=!0,0)}}),Lr=Dr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Mr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ur={eventTypes:Mr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;if(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Pn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null,a===t)return null;if("mouseout"===e||"mouseover"===e)var u=Dr,s=Mr.mouseLeave,c=Mr.mouseEnter,l="mouse";else"pointerout"!==e&&"pointerover"!==e||(u=Lr,s=Mr.pointerLeave,c=Mr.pointerEnter,l="pointer");if(e=null==a?i:An(a),i=null==t?i:An(t),(s=u.getPooled(s,a,n,r)).type=l+"leave",s.target=e,s.relatedTarget=i,(n=u.getPooled(c,t,n,r)).type=l+"enter",n.target=i,n.relatedTarget=e,l=t,(r=a)&&l)e:{for(c=l,a=0,e=u=r;e;e=Nn(e))a++;for(e=0,t=c;t;t=Nn(t))e++;for(;0<a-e;)u=Nn(u),a--;for(;0<e-a;)c=Nn(c),e--;for(;a--;){if(u===c||u===c.alternate)break e;u=Nn(u),c=Nn(c)}u=null}else u=null;for(c=u,u=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)u.push(r),r=Nn(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=Nn(l);for(l=0;l<u.length;l++)Mn(u[l],"bubbled",s);for(l=r.length;0<l--;)Mn(r[l],"captured",n);return 0==(64&o)?[s]:[s,n]}},$r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Fr=Object.prototype.hasOwnProperty;function Br(e,t){if($r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(t,n[r])||!$r(e[n[r]],t[n[r]]))return!1;return!0}var zr=j&&"documentMode"in document&&11>=document.documentMode,Vr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wr=null,Kr=null,qr=null,Hr=!1;function Zr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Hr||null==Wr||Wr!==cn(n)?null:(n="selectionStart"in(n=Wr)&&hn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},qr&&Br(qr,n)?null:(qr=n,(e=qn.getPooled(Vr.select,Kr,e,t)).type="select",e.target=Wr,$n(e),e))}var Gr={eventTypes:Vr,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Ye(o),i=O.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?An(t):window,e){case"focus":(fr(o)||"true"===o.contentEditable)&&(Wr=o,Kr=t,qr=null);break;case"blur":qr=Kr=Wr=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Hr=!1,Zr(n,r);case"selectionchange":if(zr)break;case"keydown":case"keyup":return Zr(n,r)}return null}},Qr=qn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Yr=qn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jr=jr.extend({relatedTarget:null});function Xr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var eo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},to={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},no=jr.extend({key:function(e){if(e.key){var t=eo[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?to[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Cr,charCode:function(e){return"keypress"===e.type?Xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),ro=Dr.extend({dataTransfer:null}),oo=jr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Cr}),io=qn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ao=Dr.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),uo={eventTypes:Lt,extractEvents:function(e,t,n,r){var o=Mt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":e=no;break;case"blur":case"focus":e=Jr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Dr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=ro;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=oo;break;case Ke:case qe:case He:e=Qr;break;case Ze:e=io;break;case"scroll":e=jr;break;case"wheel":e=ao;break;case"copy":case"cut":case"paste":e=Yr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Lr;break;default:e=qn}return $n(t=e.getPooled(o,t,n,r)),t}};if(m)throw Error(a(101));m=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),h=In,y=Cn,v=An,k({SimpleEventPlugin:uo,EnterLeaveEventPlugin:Ur,ChangeEventPlugin:kr,SelectEventPlugin:Gr,BeforeInputEventPlugin:cr});var so=[],co=-1;function lo(e){0>co||(e.current=so[co],so[co]=null,co--)}function fo(e,t){co++,so[co]=e.current,e.current=t}var po={},ho={current:po},yo={current:!1},vo=po;function go(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mo(e){return null!=e.childContextTypes}function bo(){lo(yo),lo(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(yo,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ve(t)||"Unknown",i));return o({},n,{},r)}function So(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,vo=ho.current,fo(ho,e),fo(yo,yo.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,vo),r.__reactInternalMemoizedMergedChildContext=e,lo(yo),lo(ho),fo(ho,e)):lo(yo),fo(yo,n)}var Eo=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,ko=i.unstable_cancelCallback,jo=i.unstable_requestPaint,To=i.unstable_now,Po=i.unstable_getCurrentPriorityLevel,Co=i.unstable_ImmediatePriority,Ao=i.unstable_UserBlockingPriority,Io=i.unstable_NormalPriority,No=i.unstable_LowPriority,Ro=i.unstable_IdlePriority,Do={},Lo=i.unstable_shouldYield,Mo=void 0!==jo?jo:function(){},Uo=null,$o=null,Fo=!1,Bo=To(),zo=1e4>Bo?To:function(){return To()-Bo};function Vo(){switch(Po()){case Co:return 99;case Ao:return 98;case Io:return 97;case No:return 96;case Ro:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Co;case 98:return Ao;case 97:return Io;case 96:return No;case 95:return Ro;default:throw Error(a(332))}}function Ko(e,t){return e=Wo(e),Eo(e,t)}function qo(e,t,n){return e=Wo(e),Oo(e,t,n)}function Ho(e){return null===Uo?(Uo=[e],$o=Oo(Co,Go)):Uo.push(e),Do}function Zo(){if(null!==$o){var e=$o;$o=null,ko(e)}Go()}function Go(){if(!Fo&&null!==Uo){Fo=!0;var e=0;try{var t=Uo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Uo=null}catch(t){throw null!==Uo&&(Uo=Uo.slice(e+1)),Oo(Co,Zo),t}finally{Fo=!1}}}function Qo(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Yo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Jo={current:null},Xo=null,ei=null,ti=null;function ni(){ti=ei=Xo=null}function ri(e){var t=Jo.current;lo(Jo),e.type._context._currentValue=t}function oi(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ii(e,t){Xo=e,ti=ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Ia=!0),e.firstContext=null)}function ai(e,t){if(ti!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ti=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ei){if(null===Xo)throw Error(a(308));ei=t,Xo.dependencies={expirationTime:0,firstContext:t,responders:null}}else ei=ei.next=t;return e._currentValue}var ui=!1;function si(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function li(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.alternate;null!==n&&ci(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function di(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.baseQueue,u=i.shared.pending;if(null!==u){if(null!==a){var s=a.next;a.next=u.next,u.next=s}a=u,i.shared.pending=null,null!==(s=e.alternate)&&null!==(s=s.updateQueue)&&(s.baseQueue=u)}if(null!==a){s=a.next;var c=i.baseState,l=0,f=null,p=null,d=null;if(null!==s)for(var h=s;;){if((u=h.expirationTime)<r){var y={expirationTime:h.expirationTime,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null};null===d?(p=d=y,f=c):d=d.next=y,u>l&&(l=u)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:h.suspenseConfig,tag:h.tag,payload:h.payload,callback:h.callback,next:null}),cs(u,h.suspenseConfig);e:{var v=e,g=h;switch(u=t,y=n,g.tag){case 1:if("function"==typeof(v=g.payload)){c=v.call(y,c,u);break e}c=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(u="function"==typeof(v=g.payload)?v.call(y,c,u):v))break e;c=o({},c,u);break e;case 2:ui=!0}}null!==h.callback&&(e.effectTag|=32,null===(u=i.effects)?i.effects=[h]:u.push(h))}if(null===(h=h.next)||h===s){if(null===(u=i.shared.pending))break;h=a.next=u.next,u.next=s,i.baseQueue=a=u,i.shared.pending=null}}null===d?f=c:d.next=p,i.baseState=f,i.baseQueue=d,ls(l),e.expirationTime=l,e.memoizedState=c}}function hi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var yi=Q.ReactCurrentBatchConfig,vi=(new r.Component).refs;function gi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Qu(),o=yi.suspense;(o=li(r=Yu(r,e,o),o)).payload=t,null!=n&&(o.callback=n),fi(e,o),Ju(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Qu(),o=yi.suspense;(o=li(r=Yu(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),fi(e,o),Ju(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Qu(),r=yi.suspense;(r=li(n=Yu(n,e,r),r)).tag=2,null!=t&&(r.callback=t),fi(e,r),Ju(e,n)}};function bi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&Br(n,r)&&Br(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"==typeof i&&null!==i?i=ai(i):(o=mo(t)?vo:ho.current,i=(r=null!=(r=t.contextTypes))?go(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _i(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function Si(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=vi,si(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ai(i):(i=mo(t)?vo:ho.current,o.context=go(e,i)),di(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(gi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&mi.enqueueReplaceState(o,o.state,null),di(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var xi=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===vi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Oi(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function ki(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Cs(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function u(t){return e&&null===t.alternate&&(t.effectTag=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ns(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=As(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Rs(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Is(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ns(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=As(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case te:return(t=Rs(t,e.mode,n)).return=e,t}if(xi(t)||ye(t))return(t=Is(t,e.mode,n,null)).return=e,t;Oi(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case te:return n.key===o?l(e,t,n,r):null}if(xi(n)||ye(n))return null!==o?null:f(e,t,n,r,null);Oi(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case te:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||ye(r))return f(t,e=e.get(n)||null,r,o,null);Oi(t,r)}return null}function y(o,a,u,s){for(var c=null,l=null,f=a,y=a=0,v=null;null!==f&&y<u.length;y++){f.index>y?(v=f,f=null):v=f.sibling;var g=d(o,f,u[y],s);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(o,f),a=i(g,a,y),null===l?c=g:l.sibling=g,l=g,f=v}if(y===u.length)return n(o,f),c;if(null===f){for(;y<u.length;y++)null!==(f=p(o,u[y],s))&&(a=i(f,a,y),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);y<u.length;y++)null!==(v=h(f,o,y,u[y],s))&&(e&&null!==v.alternate&&f.delete(null===v.key?y:v.key),a=i(v,a,y),null===l?c=v:l.sibling=v,l=v);return e&&f.forEach((function(e){return t(o,e)})),c}function v(o,u,s,c){var l=ye(s);if("function"!=typeof l)throw Error(a(150));if(null==(s=l.call(s)))throw Error(a(151));for(var f=l=null,y=u,v=u=0,g=null,m=s.next();null!==y&&!m.done;v++,m=s.next()){y.index>v?(g=y,y=null):g=y.sibling;var b=d(o,y,m.value,c);if(null===b){null===y&&(y=g);break}e&&y&&null===b.alternate&&t(o,y),u=i(b,u,v),null===f?l=b:f.sibling=b,f=b,y=g}if(m.done)return n(o,y),l;if(null===y){for(;!m.done;v++,m=s.next())null!==(m=p(o,m.value,c))&&(u=i(m,u,v),null===f?l=m:f.sibling=m,f=m);return l}for(y=r(o,y);!m.done;v++,m=s.next())null!==(m=h(y,o,v,m.value,c))&&(e&&null!==m.alternate&&y.delete(null===m.key?v:m.key),u=i(m,u,v),null===f?l=m:f.sibling=m,f=m);return e&&y.forEach((function(e){return t(o,e)})),l}return function(e,r,i,s){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var l="object"==typeof i&&null!==i;if(l)switch(i.$$typeof){case ee:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===ne){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Is(i.props.children,e.mode,s,i.key)).return=e,e=r):((s=As(i.type,i.key,i.props,null,e.mode,s)).ref=Ei(e,r,i),s.return=e,e=s)}return u(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Rs(i,e.mode,s)).return=e,e=r}return u(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ns(i,e.mode,s)).return=e,e=r),u(e);if(xi(i))return y(e,r,i,s);if(ye(i))return v(e,r,i,s);if(l&&Oi(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var ji=ki(!0),Ti=ki(!1),Pi={},Ci={current:Pi},Ai={current:Pi},Ii={current:Pi};function Ni(e){if(e===Pi)throw Error(a(174));return e}function Ri(e,t){switch(fo(Ii,t),fo(Ai,e),fo(Ci,Pi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:De(null,"");break;default:t=De(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ci),fo(Ci,t)}function Di(){lo(Ci),lo(Ai),lo(Ii)}function Li(e){Ni(Ii.current);var t=Ni(Ci.current),n=De(t,e.type);t!==n&&(fo(Ai,e),fo(Ci,n))}function Mi(e){Ai.current===e&&(lo(Ci),lo(Ai))}var Ui={current:0};function $i(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===yn||n.data===vn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Fi(e,t){return{responder:e,props:t}}var Bi=Q.ReactCurrentDispatcher,zi=Q.ReactCurrentBatchConfig,Vi=0,Wi=null,Ki=null,qi=null,Hi=!1;function Zi(){throw Error(a(321))}function Gi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$r(e[n],t[n]))return!1;return!0}function Qi(e,t,n,r,o,i){if(Vi=i,Wi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Bi.current=null===e||null===e.memoizedState?ba:wa,e=n(r,o),t.expirationTime===Vi){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,qi=Ki=null,t.updateQueue=null,Bi.current=_a,e=n(r,o)}while(t.expirationTime===Vi)}if(Bi.current=ma,t=null!==Ki&&null!==Ki.next,Vi=0,qi=Ki=Wi=null,Hi=!1,t)throw Error(a(300));return e}function Yi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qi?Wi.memoizedState=qi=e:qi=qi.next=e,qi}function Ji(){if(null===Ki){var e=Wi.alternate;e=null!==e?e.memoizedState:null}else e=Ki.next;var t=null===qi?Wi.memoizedState:qi.next;if(null!==t)qi=t,Ki=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ki=e).memoizedState,baseState:Ki.baseState,baseQueue:Ki.baseQueue,queue:Ki.queue,next:null},null===qi?Wi.memoizedState=qi=e:qi=qi.next=e}return qi}function Xi(e,t){return"function"==typeof t?t(e):t}function ea(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ki,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var u=o.next;o.next=i.next,i.next=u}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var s=u=i=null,c=o;do{var l=c.expirationTime;if(l<Vi){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===s?(u=s=f,i=r):s=s.next=f,l>Wi.expirationTime&&(Wi.expirationTime=l,ls(l))}else null!==s&&(s=s.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),cs(l,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==o);null===s?i=r:s.next=u,$r(r,t.memoizedState)||(Ia=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ta(e){var t=Ji(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var u=o=o.next;do{i=e(i,u.action),u=u.next}while(u!==o);$r(i,t.memoizedState)||(Ia=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function na(e){var t=Yi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e}).dispatch=ga.bind(null,Wi,e),[t.memoizedState,e]}function ra(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Wi.updateQueue)?(t={lastEffect:null},Wi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function oa(){return Ji().memoizedState}function ia(e,t,n,r){var o=Yi();Wi.effectTag|=e,o.memoizedState=ra(1|t,n,void 0,void 0===r?null:r)}function aa(e,t,n,r){var o=Ji();r=void 0===r?null:r;var i=void 0;if(null!==Ki){var a=Ki.memoizedState;if(i=a.destroy,null!==r&&Gi(r,a.deps))return void ra(t,n,i,r)}Wi.effectTag|=e,o.memoizedState=ra(1|t,n,i,r)}function ua(e,t){return ia(516,4,e,t)}function sa(e,t){return aa(516,4,e,t)}function ca(e,t){return aa(4,2,e,t)}function la(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function fa(e,t,n){return n=null!=n?n.concat([e]):null,aa(4,2,la.bind(null,t,e),n)}function pa(){}function da(e,t){return Yi().memoizedState=[e,void 0===t?null:t],e}function ha(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Gi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ya(e,t){var n=Ji();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Gi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function va(e,t,n){var r=Vo();Ko(98>r?98:r,(function(){e(!0)})),Ko(97<r?97:r,(function(){var r=zi.suspense;zi.suspense=void 0===t?null:t;try{e(!1),n()}finally{zi.suspense=r}}))}function ga(e,t,n){var r=Qu(),o=yi.suspense;o={expirationTime:r=Yu(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Wi||null!==i&&i===Wi)Hi=!0,o.expirationTime=Vi,Wi.expirationTime=Vi;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,u=i(a,n);if(o.eagerReducer=i,o.eagerState=u,$r(u,a))return}catch(e){}Ju(e,r)}}var ma={readContext:ai,useCallback:Zi,useContext:Zi,useEffect:Zi,useImperativeHandle:Zi,useLayoutEffect:Zi,useMemo:Zi,useReducer:Zi,useRef:Zi,useState:Zi,useDebugValue:Zi,useResponder:Zi,useDeferredValue:Zi,useTransition:Zi},ba={readContext:ai,useCallback:da,useContext:ai,useEffect:ua,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ia(4,2,la.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ia(4,2,e,t)},useMemo:function(e,t){var n=Yi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ga.bind(null,Wi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Yi().memoizedState=e},useState:na,useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=na(e),r=n[0],o=n[1];return ua((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=na(!1),n=t[0];return t=t[1],[da(va.bind(null,t,e),[t,e]),n]}},wa={readContext:ai,useCallback:ha,useContext:ai,useEffect:sa,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:ya,useReducer:ea,useRef:oa,useState:function(){return ea(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ea(Xi),r=n[0],o=n[1];return sa((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(Xi),n=t[0];return t=t[1],[ha(va.bind(null,t,e),[t,e]),n]}},_a={readContext:ai,useCallback:ha,useContext:ai,useEffect:sa,useImperativeHandle:fa,useLayoutEffect:ca,useMemo:ya,useReducer:ta,useRef:oa,useState:function(){return ta(Xi)},useDebugValue:pa,useResponder:Fi,useDeferredValue:function(e,t){var n=ta(Xi),r=n[0],o=n[1];return sa((function(){var n=zi.suspense;zi.suspense=void 0===t?null:t;try{o(e)}finally{zi.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ta(Xi),n=t[0];return t=t[1],[ha(va.bind(null,t,e),[t,e]),n]}},Sa=null,xa=null,Ea=!1;function Oa(e,t){var n=Ts(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function ka(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function ja(e){if(Ea){var t=xa;if(t){var n=t;if(!ka(e,t)){if(!(t=xn(n.nextSibling))||!ka(e,t))return e.effectTag=-1025&e.effectTag|2,Ea=!1,void(Sa=e);Oa(Sa,n)}Sa=e,xa=xn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ea=!1,Sa=e}}function Ta(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Sa=e}function Pa(e){if(e!==Sa)return!1;if(!Ea)return Ta(e),Ea=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wn(t,e.memoizedProps))for(t=xa;t;)Oa(e,t),t=xn(t.nextSibling);if(Ta(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){xa=xn(e.nextSibling);break e}t--}else"$"!==n&&n!==vn&&n!==yn||t++}e=e.nextSibling}xa=null}}else xa=Sa?xn(e.stateNode.nextSibling):null;return!0}function Ca(){xa=Sa=null,Ea=!1}var Aa=Q.ReactCurrentOwner,Ia=!1;function Na(e,t,n,r){t.child=null===e?Ti(t,null,n,r):ji(t,e.child,n,r)}function Ra(e,t,n,r,o){n=n.render;var i=t.ref;return ii(t,o),r=Qi(e,t,n,r,i,o),null===e||Ia?(t.effectTag|=1,Na(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Qa(e,t,o))}function Da(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Ps(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=As(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,La(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Br)(o,r)&&e.ref===t.ref)?Qa(e,t,i):(t.effectTag|=1,(e=Cs(a,r)).ref=t.ref,e.return=t,t.child=e)}function La(e,t,n,r,o,i){return null!==e&&Br(e.memoizedProps,r)&&e.ref===t.ref&&(Ia=!1,o<i)?(t.expirationTime=e.expirationTime,Qa(e,t,i)):Ua(e,t,n,r,i)}function Ma(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ua(e,t,n,r,o){var i=mo(n)?vo:ho.current;return i=go(t,i),ii(t,o),n=Qi(e,t,n,r,i,o),null===e||Ia?(t.effectTag|=1,Na(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Qa(e,t,o))}function $a(e,t,n,r,o){if(mo(n)){var i=!0;So(t)}else i=!1;if(ii(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),wi(t,n,r),Si(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,c=n.contextType;c="object"==typeof c&&null!==c?ai(c):go(t,c=mo(n)?vo:ho.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||s!==c)&&_i(t,a,r,c),ui=!1;var p=t.memoizedState;a.state=p,di(t,r,a,o),s=t.memoizedState,u!==r||p!==s||yo.current||ui?("function"==typeof l&&(gi(t,n,l,r),s=t.memoizedState),(u=ui||bi(t,n,u,r,p,s,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=c,r=u):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ci(e,t),u=t.memoizedProps,a.props=t.type===t.elementType?u:Yo(t.type,u),s=a.context,c="object"==typeof(c=n.contextType)&&null!==c?ai(c):go(t,c=mo(n)?vo:ho.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||s!==c)&&_i(t,a,r,c),ui=!1,s=t.memoizedState,a.state=s,di(t,r,a,o),p=t.memoizedState,u!==r||s!==p||yo.current||ui?("function"==typeof l&&(gi(t,n,l,r),p=t.memoizedState),(l=ui||bi(t,n,u,r,s,p,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),r=!1);return Fa(e,t,n,r,i,o)}function Fa(e,t,n,r,o,i){Ma(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&xo(t,n,!1),Qa(e,t,i);r=t.stateNode,Aa.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=ji(t,e.child,null,i),t.child=ji(t,null,u,i)):Na(e,t,u,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function Ba(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Ri(e,t.containerInfo)}var za,Va,Wa,Ka={dehydrated:null,retryTime:0};function qa(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Ui.current,u=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(u=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),fo(Ui,1&a),null===e){if(void 0!==i.fallback&&ja(t),u){if(u=i.fallback,(i=Is(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Is(u,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ka,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=Ti(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,u){if(i=i.fallback,(n=Cs(e,e.pendingProps)).return=t,0==(2&t.mode)&&(u=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=u;null!==u;)u.return=n,u=u.sibling;return(o=Cs(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ka,t.child=n,o}return n=ji(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,u){if(u=i.fallback,(i=Is(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Is(u,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ka,t.child=i,n}return t.memoizedState=null,t.child=ji(t,e,i.children,n)}function Ha(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),oi(e.return,t)}function Za(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Ga(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Na(e,t,r.children,n),0!=(2&(r=Ui.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ha(e,n);else if(19===e.tag)Ha(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Ui,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===$i(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Za(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===$i(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Za(t,!0,n,null,i,t.lastEffect);break;case"together":Za(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Qa(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&ls(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ya(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ja(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return mo(t.type)&&bo(),null;case 3:return Di(),lo(yo),lo(ho),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Pa(t)||(t.effectTag|=4),null;case 5:Mi(t),n=Ni(Ii.current);var i=t.type;if(null!==e&&null!=t.stateNode)Va(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ni(Ci.current),Pa(t)){r=t.stateNode,i=t.type;var u=t.memoizedProps;switch(r[kn]=t,r[jn]=u,i){case"iframe":case"object":case"embed":qt("load",r);break;case"video":case"audio":for(e=0;e<Ge.length;e++)qt(Ge[e],r);break;case"source":qt("error",r);break;case"img":case"image":case"link":qt("error",r),qt("load",r);break;case"form":qt("reset",r),qt("submit",r);break;case"details":qt("toggle",r);break;case"input":xe(r,u),qt("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!u.multiple},qt("invalid",r),un(n,"onChange");break;case"textarea":Ae(r,u),qt("invalid",r),un(n,"onChange")}for(var s in rn(i,u),e=null,u)if(u.hasOwnProperty(s)){var c=u[s];"children"===s?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):E.hasOwnProperty(s)&&null!=c&&un(n,s)}switch(i){case"input":we(r),ke(r,u,!0);break;case"textarea":we(r),Ne(r);break;case"select":case"option":break;default:"function"==typeof u.onClick&&(r.onclick=sn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(s=9===n.nodeType?n:n.ownerDocument,e===an&&(e=Re(i)),e===an?"script"===i?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(i,{is:r.is}):(e=s.createElement(i),"select"===i&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,i),e[kn]=t,e[jn]=r,za(e,t),t.stateNode=e,s=on(i,r),i){case"iframe":case"object":case"embed":qt("load",e),c=r;break;case"video":case"audio":for(c=0;c<Ge.length;c++)qt(Ge[c],e);c=r;break;case"source":qt("error",e),c=r;break;case"img":case"image":case"link":qt("error",e),qt("load",e),c=r;break;case"form":qt("reset",e),qt("submit",e),c=r;break;case"details":qt("toggle",e),c=r;break;case"input":xe(e,r),c=Se(e,r),qt("invalid",e),un(n,"onChange");break;case"option":c=Te(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),qt("invalid",e),un(n,"onChange");break;case"textarea":Ae(e,r),c=Ce(e,r),qt("invalid",e),un(n,"onChange");break;default:c=r}rn(i,c);var l=c;for(u in l)if(l.hasOwnProperty(u)){var f=l[u];"style"===u?tn(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&Ue(e,f):"children"===u?"string"==typeof f?("textarea"!==i||""!==f)&&$e(e,f):"number"==typeof f&&$e(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(E.hasOwnProperty(u)?null!=f&&un(n,u):null!=f&&Y(e,u,f,s))}switch(i){case"input":we(e),ke(e,r,!1);break;case"textarea":we(e),Ne(e);break;case"option":null!=r.value&&e.setAttribute("value",""+me(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Pe(e,!!r.multiple,n,!1):null!=r.defaultValue&&Pe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=sn)}bn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Wa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ni(Ii.current),Ni(Ci.current),Pa(t)?(n=t.stateNode,r=t.memoizedProps,n[kn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[kn]=t,t.stateNode=n)}return null;case 13:return lo(Ui),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Pa(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(u=t.firstEffect)?(t.firstEffect=i,i.nextEffect=u):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ui.current)?Au===Eu&&(Au=Ou):(Au!==Eu&&Au!==Ou||(Au=ku),0!==Lu&&null!==Tu&&(Ms(Tu,Cu),Us(Tu,Lu)))),(n||r)&&(t.effectTag|=4),null);case 4:return Di(),null;case 10:return ri(t),null;case 19:if(lo(Ui),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(u=r.rendering)){if(i)Ya(r,!1);else if(Au!==Eu||null!==e&&0!=(64&e.effectTag))for(u=t.child;null!==u;){if(null!==(e=$i(u))){for(t.effectTag|=64,Ya(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)u=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=u,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,u=e.dependencies,i.dependencies=null===u?null:{expirationTime:u.expirationTime,firstContext:u.firstContext,responders:u.responders}),r=r.sibling;return fo(Ui,1&Ui.current|2),t.child}u=u.sibling}}else{if(!i)if(null!==(e=$i(u))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Ya(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*zo()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Ya(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=zo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=zo(),n.sibling=null,t=Ui.current,fo(Ui,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:mo(e.type)&&bo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Di(),lo(yo),lo(ho),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Mi(e),null;case 13:return lo(Ui),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return lo(Ui),null;case 4:return Di(),null;case 10:return ri(e),null;default:return null}}function eu(e,t){return{value:e,source:t,stack:ge(t)}}za=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Va=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var u,s,c=t.stateNode;switch(Ni(Ci.current),e=null,n){case"input":a=Se(c,a),r=Se(c,r),e=[];break;case"option":a=Te(c,a),r=Te(c,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Ce(c,a),r=Ce(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=sn)}for(u in rn(n,r),n=null,a)if(!r.hasOwnProperty(u)&&a.hasOwnProperty(u)&&null!=a[u])if("style"===u)for(s in c=a[u])c.hasOwnProperty(s)&&(n||(n={}),n[s]="");else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(E.hasOwnProperty(u)?e||(e=[]):(e=e||[]).push(u,null));for(u in r){var l=r[u];if(c=null!=a?a[u]:void 0,r.hasOwnProperty(u)&&l!==c&&(null!=l||null!=c))if("style"===u)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(e||(e=[]),e.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(e=e||[]).push(u,l)):"children"===u?c===l||"string"!=typeof l&&"number"!=typeof l||(e=e||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(E.hasOwnProperty(u)?(null!=l&&un(i,u),e||c===l||(e=[])):(e=e||[]).push(u,l))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Wa=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var tu="function"==typeof WeakSet?WeakSet:Set;function nu(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ge(n)),null!==n&&ve(n.type),t=t.value,null!==e&&1===e.tag&&ve(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ru(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ss(e,t)}else t.current=null}function ou(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Yo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(a(163))}function iu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function au(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function uu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void au(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Yo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&hi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}hi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&bn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Dt(n)))))}throw Error(a(163))}function su(e,t,n){switch("function"==typeof ks&&ks(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Ko(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(e){Ss(o,e)}}e=e.next}while(e!==r)}))}break;case 1:ru(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Ss(e,t)}}(t,n);break;case 5:ru(t);break;case 4:hu(e,t,n)}}function cu(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&cu(t)}function lu(e){return 5===e.tag||3===e.tag||4===e.tag}function fu(e){e:{for(var t=e.return;null!==t;){if(lu(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&($e(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||lu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?pu(e,n,t):du(e,n,t)}function pu(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=sn));else if(4!==r&&null!==(e=e.child))for(pu(e,t,n),e=e.sibling;null!==e;)pu(e,t,n),e=e.sibling}function du(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(du(e,t,n),e=e.sibling;null!==e;)du(e,t,n),e=e.sibling}function hu(e,t,n){for(var r,o,i=t,u=!1;;){if(!u){u=i.return;e:for(;;){if(null===u)throw Error(a(160));switch(r=u.stateNode,u.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}u=u.return}u=!0}if(5===i.tag||6===i.tag){e:for(var s=e,c=i,l=n,f=c;;)if(su(s,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(s=r,c=i.stateNode,8===s.nodeType?s.parentNode.removeChild(c):s.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(su(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(u=!1)}i.sibling.return=i.return,i=i.sibling}}function yu(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void iu(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[jn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Ee(n,r),on(e,o),t=on(e,r),o=0;o<i.length;o+=2){var u=i[o],s=i[o+1];"style"===u?tn(n,s):"dangerouslySetInnerHTML"===u?Ue(n,s):"children"===u?$e(n,s):Y(n,u,s,t)}switch(e){case"input":Oe(n,r);break;case"textarea":Ie(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Pe(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Pe(n,!!r.multiple,r.defaultValue,!0):Pe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Dt(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Uu=zo()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=en("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void vu(t);case 19:return void vu(t)}throw Error(a(163))}function vu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new tu),t.forEach((function(t){var r=Es.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var gu="function"==typeof WeakMap?WeakMap:Map;function mu(e,t,n){(n=li(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fu||(Fu=!0,Bu=r),nu(e,t)},n}function bu(e,t,n){(n=li(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return nu(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===zu?zu=new Set([this]):zu.add(this),nu(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var wu,_u=Math.ceil,Su=Q.ReactCurrentDispatcher,xu=Q.ReactCurrentOwner,Eu=0,Ou=3,ku=4,ju=0,Tu=null,Pu=null,Cu=0,Au=Eu,Iu=null,Nu=1073741823,Ru=1073741823,Du=null,Lu=0,Mu=!1,Uu=0,$u=null,Fu=!1,Bu=null,zu=null,Vu=!1,Wu=null,Ku=90,qu=null,Hu=0,Zu=null,Gu=0;function Qu(){return 0!=(48&ju)?1073741821-(zo()/10|0):0!==Gu?Gu:Gu=1073741821-(zo()/10|0)}function Yu(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Vo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&ju))return Cu;if(null!==n)e=Qo(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Qo(e,150,100);break;case 97:case 96:e=Qo(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Tu&&e===Cu&&--e,e}function Ju(e,t){if(50<Hu)throw Hu=0,Zu=null,Error(a(185));if(null!==(e=Xu(e,t))){var n=Vo();1073741823===t?0!=(8&ju)&&0==(48&ju)?rs(e):(ts(e),0===ju&&Zo()):ts(e),0==(4&ju)||98!==n&&99!==n||(null===qu?qu=new Map([[e,t]]):(void 0===(n=qu.get(e))||n>t)&&qu.set(e,t))}}function Xu(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Tu===o&&(ls(t),Au===ku&&Ms(o,Cu)),Us(o,t)),o}function es(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Ls(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function ts(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ho(rs.bind(null,e));else{var t=es(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Qu();if(r=1073741823===t?99:1===t||2===t?95:0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==Do&&ko(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Ho(rs.bind(null,e)):qo(r,ns.bind(null,e),{timeout:10*(1073741821-t)-zo()}),e.callbackNode=t}}}function ns(e,t){if(Gu=0,t)return $s(e,t=Qu()),ts(e),null;var n=es(e);if(0!==n){if(t=e.callbackNode,0!=(48&ju))throw Error(a(327));if(bs(),e===Tu&&n===Cu||as(e,n),null!==Pu){var r=ju;ju|=16;for(var o=ss();;)try{ps();break}catch(t){us(e,t)}if(ni(),ju=r,Su.current=o,1===Au)throw t=Iu,as(e,n),Ms(e,n),ts(e),t;if(null===Pu)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Au,Tu=null,r){case Eu:case 1:throw Error(a(345));case 2:$s(e,2<n?2:n);break;case Ou:if(Ms(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=ys(o)),1073741823===Nu&&10<(o=Uu+500-zo())){if(Mu){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,as(e,n);break}}if(0!==(i=es(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=_n(vs.bind(null,e),o);break}vs(e);break;case ku:if(Ms(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=ys(o)),Mu&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,as(e,n);break}if(0!==(o=es(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Ru?r=10*(1073741821-Ru)-zo():1073741823===Nu?r=0:(r=10*(1073741821-Nu)-5e3,0>(r=(o=zo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_u(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=_n(vs.bind(null,e),r);break}vs(e);break;case 5:if(1073741823!==Nu&&null!==Du){i=Nu;var u=Du;if(0>=(r=0|u.busyMinDurationMs)?r=0:(o=0|u.busyDelayMs,r=(i=zo()-(10*(1073741821-i)-(0|u.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Ms(e,n),e.timeoutHandle=_n(vs.bind(null,e),r);break}}vs(e);break;default:throw Error(a(329))}if(ts(e),e.callbackNode===t)return ns.bind(null,e)}}return null}function rs(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&ju))throw Error(a(327));if(bs(),e===Tu&&t===Cu||as(e,t),null!==Pu){var n=ju;ju|=16;for(var r=ss();;)try{fs();break}catch(t){us(e,t)}if(ni(),ju=n,Su.current=r,1===Au)throw n=Iu,as(e,t),Ms(e,t),ts(e),n;if(null!==Pu)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Tu=null,vs(e),ts(e)}return null}function os(e,t){var n=ju;ju|=1;try{return e(t)}finally{0===(ju=n)&&Zo()}}function is(e,t){var n=ju;ju&=-2,ju|=8;try{return e(t)}finally{0===(ju=n)&&Zo()}}function as(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Sn(n)),null!==Pu)for(n=Pu.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&bo();break;case 3:Di(),lo(yo),lo(ho);break;case 5:Mi(r);break;case 4:Di();break;case 13:case 19:lo(Ui);break;case 10:ri(r)}n=n.return}Tu=e,Pu=Cs(e.current,null),Cu=t,Au=Eu,Iu=null,Ru=Nu=1073741823,Du=null,Lu=0,Mu=!1}function us(e,t){for(;;){try{if(ni(),Bi.current=ma,Hi)for(var n=Wi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Vi=0,qi=Ki=Wi=null,Hi=!1,null===Pu||null===Pu.return)return Au=1,Iu=t,Pu=null;e:{var o=e,i=Pu.return,a=Pu,u=t;if(t=Cu,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var s=u;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!=(1&Ui.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var h=f.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!l)}}if(p){var y=f.updateQueue;if(null===y){var v=new Set;v.add(s),f.updateQueue=v}else y.add(s);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var g=li(1073741823,null);g.tag=2,fi(a,g)}a.expirationTime=1073741823;break e}u=void 0,a=t;var m=o.pingCache;if(null===m?(m=o.pingCache=new gu,u=new Set,m.set(s,u)):void 0===(u=m.get(s))&&(u=new Set,m.set(s,u)),!u.has(a)){u.add(a);var b=xs.bind(null,o,s,a);s.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);u=Error((ve(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ge(a))}5!==Au&&(Au=2),u=eu(u,a),f=i;do{switch(f.tag){case 3:s=u,f.effectTag|=4096,f.expirationTime=t,pi(f,mu(f,s,t));break e;case 1:s=u;var w=f.type,_=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===zu||!zu.has(_)))){f.effectTag|=4096,f.expirationTime=t,pi(f,bu(f,s,t));break e}}f=f.return}while(null!==f)}Pu=hs(Pu)}catch(e){t=e;continue}break}}function ss(){var e=Su.current;return Su.current=ma,null===e?ma:e}function cs(e,t){e<Nu&&2<e&&(Nu=e),null!==t&&e<Ru&&2<e&&(Ru=e,Du=t)}function ls(e){e>Lu&&(Lu=e)}function fs(){for(;null!==Pu;)Pu=ds(Pu)}function ps(){for(;null!==Pu&&!Lo();)Pu=ds(Pu)}function ds(e){var t=wu(e.alternate,e,Cu);return e.memoizedProps=e.pendingProps,null===t&&(t=hs(e)),xu.current=null,t}function hs(e){Pu=e;do{var t=Pu.alternate;if(e=Pu.return,0==(2048&Pu.effectTag)){if(t=Ja(t,Pu,Cu),1===Cu||1!==Pu.childExpirationTime){for(var n=0,r=Pu.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}Pu.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Pu.firstEffect),null!==Pu.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Pu.firstEffect),e.lastEffect=Pu.lastEffect),1<Pu.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Pu:e.firstEffect=Pu,e.lastEffect=Pu))}else{if(null!==(t=Xa(Pu)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Pu.sibling))return t;Pu=e}while(null!==Pu);return Au===Eu&&(Au=5),null}function ys(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function vs(e){var t=Vo();return Ko(99,gs.bind(null,e,t)),null}function gs(e,t){do{bs()}while(null!==Wu);if(0!=(48&ju))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=ys(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Tu&&(Pu=Tu=null,Cu=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=ju;ju|=32,xu.current=null,gn=Kt;var u=dn();if(hn(u)){if("selectionStart"in u)var s={start:u.selectionStart,end:u.selectionEnd};else e:{var c=(s=(s=u.ownerDocument)&&s.defaultView||window).getSelection&&s.getSelection();if(c&&0!==c.rangeCount){s=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{s.nodeType,f.nodeType}catch(e){s=null;break e}var p=0,d=-1,h=-1,y=0,v=0,g=u,m=null;t:for(;;){for(var b;g!==s||0!==l&&3!==g.nodeType||(d=p+l),g!==f||0!==c&&3!==g.nodeType||(h=p+c),3===g.nodeType&&(p+=g.nodeValue.length),null!==(b=g.firstChild);)m=g,g=b;for(;;){if(g===u)break t;if(m===s&&++y===l&&(d=p),m===f&&++v===c&&(h=p),null!==(b=g.nextSibling))break;m=(g=m).parentNode}g=b}s=-1===d||-1===h?null:{start:d,end:h}}else s=null}s=s||{start:0,end:0}}else s=null;mn={activeElementDetached:null,focusedElem:u,selectionRange:s},Kt=!1,$u=o;do{try{ms()}catch(e){if(null===$u)throw Error(a(330));Ss($u,e),$u=$u.nextEffect}}while(null!==$u);$u=o;do{try{for(u=e,s=t;null!==$u;){var w=$u.effectTag;if(16&w&&$e($u.stateNode,""),128&w){var _=$u.alternate;if(null!==_){var S=_.ref;null!==S&&("function"==typeof S?S(null):S.current=null)}}switch(1038&w){case 2:fu($u),$u.effectTag&=-3;break;case 6:fu($u),$u.effectTag&=-3,yu($u.alternate,$u);break;case 1024:$u.effectTag&=-1025;break;case 1028:$u.effectTag&=-1025,yu($u.alternate,$u);break;case 4:yu($u.alternate,$u);break;case 8:hu(u,l=$u,s),cu(l)}$u=$u.nextEffect}}catch(e){if(null===$u)throw Error(a(330));Ss($u,e),$u=$u.nextEffect}}while(null!==$u);if(S=mn,_=dn(),w=S.focusedElem,s=S.selectionRange,_!==w&&w&&w.ownerDocument&&pn(w.ownerDocument.documentElement,w)){null!==s&&hn(w)&&(_=s.start,void 0===(S=s.end)&&(S=_),"selectionStart"in w?(w.selectionStart=_,w.selectionEnd=Math.min(S,w.value.length)):(S=(_=w.ownerDocument||document)&&_.defaultView||window).getSelection&&(S=S.getSelection(),l=w.textContent.length,u=Math.min(s.start,l),s=void 0===s.end?u:Math.min(s.end,l),!S.extend&&u>s&&(l=s,s=u,u=l),l=fn(w,u),f=fn(w,s),l&&f&&(1!==S.rangeCount||S.anchorNode!==l.node||S.anchorOffset!==l.offset||S.focusNode!==f.node||S.focusOffset!==f.offset)&&((_=_.createRange()).setStart(l.node,l.offset),S.removeAllRanges(),u>s?(S.addRange(_),S.extend(f.node,f.offset)):(_.setEnd(f.node,f.offset),S.addRange(_))))),_=[];for(S=w;S=S.parentNode;)1===S.nodeType&&_.push({element:S,left:S.scrollLeft,top:S.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<_.length;w++)(S=_[w]).element.scrollLeft=S.left,S.element.scrollTop=S.top}Kt=!!gn,mn=gn=null,e.current=n,$u=o;do{try{for(w=e;null!==$u;){var x=$u.effectTag;if(36&x&&uu(w,$u.alternate,$u),128&x){_=void 0;var E=$u.ref;if(null!==E){var O=$u.stateNode;$u.tag,_=O,"function"==typeof E?E(_):E.current=_}}$u=$u.nextEffect}}catch(e){if(null===$u)throw Error(a(330));Ss($u,e),$u=$u.nextEffect}}while(null!==$u);$u=null,Mo(),ju=i}else e.current=n;if(Vu)Vu=!1,Wu=e,Ku=t;else for($u=o;null!==$u;)t=$u.nextEffect,$u.nextEffect=null,$u=t;if(0===(t=e.firstPendingTime)&&(zu=null),1073741823===t?e===Zu?Hu++:(Hu=0,Zu=e):Hu=0,"function"==typeof Os&&Os(n.stateNode,r),ts(e),Fu)throw Fu=!1,e=Bu,Bu=null,e;return 0!=(8&ju)||Zo(),null}function ms(){for(;null!==$u;){var e=$u.effectTag;0!=(256&e)&&ou($u.alternate,$u),0==(512&e)||Vu||(Vu=!0,qo(97,(function(){return bs(),null}))),$u=$u.nextEffect}}function bs(){if(90!==Ku){var e=97<Ku?97:Ku;return Ku=90,Ko(e,ws)}}function ws(){if(null===Wu)return!1;var e=Wu;if(Wu=null,0!=(48&ju))throw Error(a(331));var t=ju;for(ju|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:iu(5,n),au(5,n)}}catch(t){if(null===e)throw Error(a(330));Ss(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return ju=t,Zo(),!0}function _s(e,t,n){fi(e,t=mu(e,t=eu(n,t),1073741823)),null!==(e=Xu(e,1073741823))&&ts(e)}function Ss(e,t){if(3===e.tag)_s(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){_s(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===zu||!zu.has(r))){fi(n,e=bu(n,e=eu(t,e),1073741823)),null!==(n=Xu(n,1073741823))&&ts(n);break}}n=n.return}}function xs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Tu===e&&Cu===n?Au===ku||Au===Ou&&1073741823===Nu&&zo()-Uu<500?as(e,Cu):Mu=!0:Ls(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,ts(e)))}function Es(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Yu(t=Qu(),e,null)),null!==(e=Xu(e,t))&&ts(e)}wu=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||yo.current)Ia=!0;else{if(r<n){switch(Ia=!1,t.tag){case 3:Ba(t),Ca();break;case 5:if(Li(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:mo(t.type)&&So(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,fo(Jo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?qa(e,t,n):(fo(Ui,1&Ui.current),null!==(t=Qa(e,t,n))?t.sibling:null);fo(Ui,1&Ui.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Ga(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),fo(Ui,Ui.current),!r)return null}return Qa(e,t,n)}Ia=!1}}else Ia=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=go(t,ho.current),ii(t,n),o=Qi(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mo(r)){var i=!0;So(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,si(t);var u=r.getDerivedStateFromProps;"function"==typeof u&&gi(t,r,u,e),o.updater=mi,t.stateNode=o,o._reactInternalFiber=t,Si(t,r,e,n),t=Fa(null,t,r,!0,i,n)}else t.tag=0,Na(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return Ps(e)?1:0;if(null!=e){if((e=e.$$typeof)===se)return 11;if(e===fe)return 14}return 2}(o),e=Yo(o,e),i){case 0:t=Ua(null,t,o,e,n);break e;case 1:t=$a(null,t,o,e,n);break e;case 11:t=Ra(null,t,o,e,n);break e;case 14:t=Da(null,t,o,Yo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Yo(r,o),n);case 1:return r=t.type,o=t.pendingProps,$a(e,t,r,o=t.elementType===r?o:Yo(r,o),n);case 3:if(Ba(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),di(t,r,null,n),(r=t.memoizedState.element)===o)Ca(),t=Qa(e,t,n);else{if((o=t.stateNode.hydrate)&&(xa=xn(t.stateNode.containerInfo.firstChild),Sa=t,o=Ea=!0),o)for(n=Ti(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Na(e,t,r,n),Ca();t=t.child}return t;case 5:return Li(t),null===e&&ja(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,u=o.children,wn(r,o)?u=null:null!==i&&wn(r,i)&&(t.effectTag|=16),Ma(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Na(e,t,u,n),t=t.child),t;case 6:return null===e&&ja(t),null;case 13:return qa(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ji(t,null,r,n):Na(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ra(e,t,r,o=t.elementType===r?o:Yo(r,o),n);case 7:return Na(e,t,t.pendingProps,n),t.child;case 8:case 12:return Na(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,u=t.memoizedProps,i=o.value;var s=t.type._context;if(fo(Jo,s._currentValue),s._currentValue=i,null!==u)if(s=u.value,0==(i=$r(s,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(s,i):1073741823))){if(u.children===o.children&&!yo.current){t=Qa(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var c=s.dependencies;if(null!==c){u=s.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&i)){1===s.tag&&((l=li(n,null)).tag=2,fi(s,l)),s.expirationTime<n&&(s.expirationTime=n),null!==(l=s.alternate)&&l.expirationTime<n&&(l.expirationTime=n),oi(s.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else u=10===s.tag&&s.type===t.type?null:s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===t){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}Na(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ii(t,n),r=r(o=ai(o,i.unstable_observedBits)),t.effectTag|=1,Na(e,t,r,n),t.child;case 14:return i=Yo(o=t.type,t.pendingProps),Da(e,t,o,i=Yo(o.type,i),r,n);case 15:return La(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,mo(r)?(e=!0,So(t)):e=!1,ii(t,n),wi(t,r,o),Si(t,r,o,n),Fa(null,t,r,!0,e,n);case 19:return Ga(e,t,n)}throw Error(a(156,t.tag))};var Os=null,ks=null;function js(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Ts(e,t,n,r){return new js(e,t,n,r)}function Ps(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cs(e,t){var n=e.alternate;return null===n?((n=Ts(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function As(e,t,n,r,o,i){var u=2;if(r=e,"function"==typeof e)Ps(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case ne:return Is(n.children,o,i,t);case ue:u=8,o|=7;break;case re:u=8,o|=1;break;case oe:return(e=Ts(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case ce:return(e=Ts(13,n,t,o)).type=ce,e.elementType=ce,e.expirationTime=i,e;case le:return(e=Ts(19,n,t,o)).elementType=le,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:u=10;break e;case ae:u=9;break e;case se:u=11;break e;case fe:u=14;break e;case pe:u=16,r=null;break e;case de:u=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ts(u,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Is(e,t,n,r){return(e=Ts(7,e,r,t)).expirationTime=n,e}function Ns(e,t,n){return(e=Ts(6,e,null,t)).expirationTime=n,e}function Rs(e,t,n){return(t=Ts(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ds(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Ls(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Ms(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Us(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function $s(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Fs(e,t,n,r){var o=t.current,i=Qu(),u=yi.suspense;i=Yu(i,o,u);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(mo(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(a(171))}if(1===n.tag){var c=n.type;if(mo(c)){n=_o(n,c,s);break e}}n=s}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=li(i,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),Ju(o,i),i}function Bs(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function zs(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Vs(e,t){zs(e,t),(e=e.alternate)&&zs(e,t)}function Ws(e,t,n){var r=new Ds(e,t,n=null!=n&&!0===n.hydrate),o=Ts(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,si(o),e[Tn]=r.current,n&&0!==t&&function(e,t){var n=Ye(t);Ot.forEach((function(e){dt(e,t,n)})),kt.forEach((function(e){dt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Ks(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function qs(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var u=o;o=function(){var e=Bs(a);u.call(e)}}Fs(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Ws(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var s=o;o=function(){var e=Bs(a);s.call(e)}}is((function(){Fs(t,a,e,o)}))}return Bs(a)}function Hs(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Zs(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ks(t))throw Error(a(200));return Hs(e,t,null,n)}Ws.prototype.render=function(e){Fs(e,this._internalRoot,null,null)},Ws.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Fs(null,e,null,(function(){t[Tn]=null}))},ht=function(e){if(13===e.tag){var t=Qo(Qu(),150,100);Ju(e,t),Vs(e,t)}},yt=function(e){13===e.tag&&(Ju(e,3),Vs(e,3))},vt=function(e){if(13===e.tag){var t=Qu();Ju(e,t=Yu(t,e,null)),Vs(e,t)}},T=function(e,t,n){switch(t){case"input":if(Oe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=In(r);if(!o)throw Error(a(90));_e(r),Oe(r,o)}}}break;case"textarea":Ie(e,n);break;case"select":null!=(t=n.value)&&Pe(e,!!n.multiple,t,!1)}},R=os,D=function(e,t,n,r,o){var i=ju;ju|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(ju=i)&&Zo()}},L=function(){0==(49&ju)&&(function(){if(null!==qu){var e=qu;qu=null,e.forEach((function(e,t){$s(t,e),ts(t)})),Zo()}}(),bs())},M=function(e,t){var n=ju;ju|=2;try{return e(t)}finally{0===(ju=n)&&Zo()}};var Gs={Events:[Cn,An,In,k,x,$n,function(e){rt(e,Un)},I,N,Qt,at,bs,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Os=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},ks=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(o({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Q.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Pn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gs,t.createPortal=Zs,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&ju))throw Error(a(187));var n=ju;ju|=1;try{return Ko(99,e.bind(null,t))}finally{ju=n,Zo()}},t.hydrate=function(e,t,n){if(!Ks(t))throw Error(a(200));return qs(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ks(t))throw Error(a(200));return qs(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ks(e))throw Error(a(40));return!!e._reactRootContainer&&(is((function(){qs(null,null,e,!1,(function(){e._reactRootContainer=null,e[Tn]=null}))})),!0)},t.unstable_batchedUpdates=os,t.unstable_createPortal=function(e,t){return Zs(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ks(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return qs(e,t,n,!1,r)},t.version="16.14.0"},2788:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(3975)},8447:(e,t,n)=>{"use strict";var r=n(4516),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,y=o?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function _(){}function S(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var x=S.prototype=new _;x.constructor=S,r(x,w.prototype),x.isPureReactComponent=!0;var E={current:null},O=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,n){var r,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)O.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:E.current}}function T(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,C=[];function A(e,t,n,r){if(C.length){var o=C.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function I(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>C.length&&C.push(e)}function N(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var u=!1;if(null===e)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case a:u=!0}}if(u)return n(r,e,""===t?"."+D(e,0):t),1;if(u=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s<e.length;s++){var c=t+D(o=e[s],s);u+=N(o,c,n,r)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=v&&e[v]||e["@@iterator"])?c:null))for(e=c.call(e),s=0;!(o=e.next()).done;)u+=N(o=o.value,c=t+D(o,s++),n,r);else if("object"===o)throw n=""+e,Error(g(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return u}function R(e,t,n){return null==e?0:N(e,"",t,n)}function D(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function M(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?U(e,r,n,(function(e){return e})):null!=e&&(T(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),r.push(e))}function U(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(P,"$&/")+"/"),R(e,M,t=A(t,i,r,o)),I(t)}var $={current:null};function F(){var e=$.current;if(null===e)throw Error(g(321));return e}var B={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return U(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;R(e,L,t=A(null,null,t,n)),I(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return U(e,t,null,(function(e){return e})),t},only:function(e){if(!T(e))throw Error(g(143));return e}},t.Component=w,t.Fragment=u,t.Profiler=c,t.PureComponent=S,t.StrictMode=s,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null==e)throw Error(g(267,e));var o=r({},e.props),a=e.key,u=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,s=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)O.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:u,props:o,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=j,t.createFactory=function(e){var t=j.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:y,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.14.0"},2735:(e,t,n)=>{"use strict";e.exports=n(8447)},1602:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=O(a,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?h:p,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",y={};function v(){}function g(){}function m(){}var b={};s(b,i,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,i)&&(b=_);var S=m.prototype=v.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(o,i,a,u){var s=l(e[o],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(s.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function O(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,O(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function P(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:C}}function C(){return{value:t,done:!0}}return g.prototype=m,s(S,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},x(E.prototype),s(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new E(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(S),s(S,u,"Generator"),s(S,i,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},921:(e,t,n)=>{"use strict";n.d(t,{y:()=>l});var r=n(7811),o=n(9573),i=n(2412),a=n(4002),u=n(7430);function s(e){return 0===e.length?u.y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var c=n(5769),l=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 a=this.operator,u=function(e,t,n){if(e){if(e instanceof r.L)return e;if(e[o.b])return e[o.b]()}return e||t||n?new r.L(e,t,n):new r.L(i.c)}(e,t,n);if(a?u.add(a.call(u,this.source)):u.add(this.source||c.v.useDeprecatedSynchronousErrorHandling&&!u.syncErrorThrowable?this._subscribe(u):this._trySubscribe(u)),c.v.useDeprecatedSynchronousErrorHandling&&u.syncErrorThrowable&&(u.syncErrorThrowable=!1,u.syncErrorThrown))throw u.syncErrorValue;return u},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){c.v.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),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.L?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=f(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[a.L]=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(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(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 f(e){if(e||(e=c.v.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},2412:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});var r=n(5769),o=n(1450),i={closed:!0,next:function(e){},error:function(e){if(r.v.useDeprecatedSynchronousErrorHandling)throw e;(0,o.z)(e)},complete:function(){}}},2585:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>f});var r=n(7080),o=n(921),i=n(7811),a=n(1098),u=n(7043),s=n(6362),c=n(9573),l=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return r.ZT(t,e),t}(i.L),f=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 r.ZT(t,e),t.prototype[c.b]=function(){return new l(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 u.N;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 u.N;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 u.N;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 u.N;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new u.N;return this.hasError?(e.error(this.thrownError),a.w.EMPTY):this.isStopped?(e.complete(),a.w.EMPTY):(this.observers.push(e),new s.W(this,e))},t.prototype.asObservable=function(){var e=new o.y;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(o.y),p=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return r.ZT(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.w.EMPTY},t}(f)},6362:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(7080),o=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return r.ZT(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(1098).w)},7811:(e,t,n)=>{"use strict";n.d(t,{L:()=>l});var r=n(7080),o=n(9147),i=n(2412),a=n(1098),u=n(9573),s=n(5769),c=n(1450),l=function(e){function t(n,r,o){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.c;break;case 1:if(!n){a.destination=i.c;break}if("object"==typeof n){n instanceof t?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,n,r,o)}return a}return r.ZT(t,e),t.prototype[u.b]=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.w),f=function(e){function t(t,n,r,a){var u,s=e.call(this)||this;s._parentSubscriber=t;var c=s;return(0,o.m)(n)?u=n:n&&(u=n.next,r=n.error,a=n.complete,n!==i.c&&(c=Object.create(n),(0,o.m)(c.unsubscribe)&&s.add(c.unsubscribe.bind(c)),c.unsubscribe=s.unsubscribe.bind(s))),s._context=c,s._next=u,s._error=r,s._complete=a,s}return r.ZT(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.v.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=s.v.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):(0,c.z)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;(0,c.z)(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)};s.v.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(),s.v.useDeprecatedSynchronousErrorHandling)throw e;(0,c.z)(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!s.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return s.v.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):((0,c.z)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(l)},1098:(e,t,n)=>{"use strict";n.d(t,{w:()=>u});var r=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}(),o=n(1167),i=n(9147),a=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}(),u=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,u=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,f=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,u instanceof e)u.remove(this);else if(null!==u)for(var p=0;p<u.length;++p)u[p].remove(this);if((0,i.m)(l)){c&&(this._unsubscribe=void 0);try{l.call(this)}catch(e){t=e instanceof a?s(e.errors):[e]}}if(r(f)){p=-1;for(var d=f.length;++p<d;){var h=f[p];if((0,o.K)(h))try{h.unsubscribe()}catch(e){t=t||[],e instanceof a?t=t.concat(s(e.errors)):t.push(e)}}}if(t)throw new a(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 s(e){return e.reduce((function(e,t){return e.concat(t instanceof a?t.errors:t)}),[])}},5769:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},4002:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},9573:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},7043:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},1450:(e,t,n)=>{"use strict";function r(e){setTimeout((function(){throw e}),0)}n.d(t,{z:()=>r})},7430:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{y:()=>r})},9147:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{m:()=>r})},1167:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{K:()=>r})},7080:(e,t,n)=>{"use strict";n.d(t,{ZT:()=>o});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)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}},9666:(e,t)=>{"use strict";var n,r,o,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,c=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(c,0),e}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(c,0))},r=function(e,t){s=setTimeout(e,t)},o=function(){clearTimeout(s)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var y=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var v=p.now();t.unstable_now=function(){return p.now()-v}}var g=!1,m=null,b=-1,w=5,_=0;i=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var S=new MessageChannel,x=S.port2;S.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();_=e+w;try{m(!0,e)?x.postMessage(null):(g=!1,m=null)}catch(e){throw x.postMessage(null),e}}else g=!1},n=function(e){m=e,g||(g=!0,x.postMessage(null))},r=function(e,n){b=d((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<j(o,t)))break e;e[r]=t,e[n]=o,n=r}}function O(e){return void 0===(e=e[0])?null:e}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,s=e[u];if(void 0!==a&&0>j(a,n))void 0!==s&&0>j(s,a)?(e[r]=s,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==s&&0>j(s,n)))break e;e[r]=s,e[u]=n,r=u}}}return t}return null}function j(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],P=[],C=1,A=null,I=3,N=!1,R=!1,D=!1;function L(e){for(var t=O(P);null!==t;){if(null===t.callback)k(P);else{if(!(t.startTime<=e))break;k(P),t.sortIndex=t.expirationTime,E(T,t)}t=O(P)}}function M(e){if(D=!1,L(e),!R)if(null!==O(T))R=!0,n(U);else{var t=O(P);null!==t&&r(M,t.startTime-e)}}function U(e,n){R=!1,D&&(D=!1,o()),N=!0;var a=I;try{for(L(n),A=O(T);null!==A&&(!(A.expirationTime>n)||e&&!i());){var u=A.callback;if(null!==u){A.callback=null,I=A.priorityLevel;var s=u(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?A.callback=s:A===O(T)&&k(T),L(n)}else k(T);A=O(T)}if(null!==A)var c=!0;else{var l=O(P);null!==l&&r(M,l.startTime-n),c=!1}return c}finally{A=null,I=a,N=!1}}function $(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||N||(R=!0,n(U))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return O(T)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,i,a){var u=t.unstable_now();if("object"==typeof a&&null!==a){var s=a.delay;s="number"==typeof s&&0<s?u+s:u,a="number"==typeof a.timeout?a.timeout:$(e)}else a=$(e),s=u;return e={id:C++,callback:i,priorityLevel:e,startTime:s,expirationTime:a=s+a,sortIndex:-1},s>u?(e.sortIndex=s,E(P,e),null===O(T)&&e===O(P)&&(D?o():D=!0,r(M,s-u))):(e.sortIndex=a,E(T,e),R||N||(R=!0,n(U))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();L(e);var n=O(T);return n!==A&&null!==A&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<A.expirationTime||i()},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},9146:(e,t,n)=>{"use strict";e.exports=n(9666)},3710:(e,t,n)=>{"use strict";n.d(t,{BP:()=>z,UO:()=>oe});var r=Object.freeze({__proto__:null,get start(){return $e},get ensureJQuerySupport(){return de},get setBootstrapMaxTime(){return H},get setMountMaxTime(){return Z},get setUnmountMaxTime(){return G},get setUnloadMaxTime(){return Q},get registerApplication(){return Oe},get unregisterApplication(){return je},get getMountedApps(){return Se},get getAppStatus(){return Ee},get unloadApplication(){return Te},get checkActivityFunctions(){return ke},get getAppNames(){return xe},get pathToActiveWhen(){return Ae},get navigateToUrl(){return oe},get triggerAppChange(){return De},get addErrorHandler(){return l},get removeErrorHandler(){return f},get mountRootParcel(){return z},get NOT_LOADED(){return h},get LOADING_SOURCE_CODE(){return y},get NOT_BOOTSTRAPPED(){return v},get BOOTSTRAPPING(){return g},get NOT_MOUNTED(){return m},get MOUNTING(){return b},get UPDATING(){return _},get LOAD_ERROR(){return x},get MOUNTED(){return w},get UNMOUNTING(){return S},get SKIP_BECAUSE_BROKEN(){return E}});function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,u=function(){try{var e=new a("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?a:"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},s=[];function c(e,t,n){var r=d(e,t,n);s.length?s.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function l(e){if("function"!=typeof e)throw Error(p(28,!1));s.push(e)}function f(e){if("function"!=typeof e)throw Error(p(29,!1));var t=!1;return s=s.filter((function(n){var r=n===e;return t=t||r,!r})),t}function p(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function d(e,t,n){var r,o="".concat(P(t)," '").concat(j(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(p(30,!1,t.status,j(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=j(t),t.status=n,r}var h="NOT_LOADED",y="LOADING_SOURCE_CODE",v="NOT_BOOTSTRAPPED",g="BOOTSTRAPPING",m="NOT_MOUNTED",b="MOUNTING",w="MOUNTED",_="UPDATING",S="UNMOUNTING",x="LOAD_ERROR",E="SKIP_BECAUSE_BROKEN";function O(e){return e.status===w}function k(e){try{return e.activeWhen(window.location)}catch(t){return c(t,e,E),!1}}function j(e){return e.name}function T(e){return Boolean(e.unmountThisParcel)}function P(e){return T(e)?"parcel":"application"}function C(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function A(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function I(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!A(t,(function(e){return"function"!=typeof e}))));var t}function N(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=P(e),o=j(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return R(n)?n:Promise.reject(p(15,!1,r,o,t,a))}))}),Promise.resolve())}}function R(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function D(e,t){return Promise.resolve().then((function(){return e.status!==v?e:(e.status=g,e.bootstrap?Y(e,"bootstrap").then(n).catch((function(n){if(t)throw d(n,e,E);return c(n,e,E),e})):Promise.resolve().then(n))}));function n(){return e.status=m,e}}function L(e,t){return Promise.resolve().then((function(){if(e.status!==w)return e;e.status=S;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw d(r,e,E);c(r,e,E)}))})).then((function(){return e}));function r(){return Y(e,"unmount").then((function(){e.status=m})).catch((function(n){if(t)throw d(n,e,E);c(n,e,E)}))}}))}var M=!1,U=!1;function $(e,t){return Promise.resolve().then((function(){return e.status!==m?e:(M||(window.dispatchEvent(new u("single-spa:before-first-mount")),M=!0),Y(e,"mount").then((function(){return e.status=w,U||(window.dispatchEvent(new u("single-spa:first-mount")),U=!0),e})).catch((function(n){return e.status=w,L(e,!0).then(r,r);function r(){if(t)throw d(n,e,E);return c(n,e,E),e}})))}))}var F=0,B={parcels:{}};function z(){return V.apply(B,arguments)}function V(e,t){var n=this;if(!e||"object"!==o(e)&&"function"!=typeof e)throw Error(p(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(p(3,!1,o(e.name)));if("object"!==o(t))throw Error(p(4,!1,name,o(t)));if(!t.domElement)throw Error(p(5,!1,name));var r,i=F++,a="function"==typeof e,u=a?e:function(){return Promise.resolve(e)},s={id:i,parcels:{},status:a?y:v,customProps:t,parentName:j(n),unmountThisParcel:function(){return g.then((function(){if(s.status!==w)throw Error(p(6,!1,name,s.status));return L(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=E,f(e),e}))}};n.parcels[i]=s;var c=u();if(!c||"function"!=typeof c.then)throw Error(p(7,!1));var l,f,h=(c=c.then((function(e){if(!e)throw Error(p(8,!1));var t=e.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!I(e.bootstrap))throw Error(p(9,!1,t));if(!I(e.mount))throw Error(p(10,!1,t));if(!I(e.unmount))throw Error(p(11,!1,t));if(e.update&&!I(e.update))throw Error(p(12,!1,t));var n=N(e,"bootstrap"),o=N(e,"mount"),a=N(e,"unmount");s.status=v,s.name=t,s.bootstrap=n,s.mount=o,s.unmount=a,s.timeouts=J(e.timeouts),e.update&&(s.update=N(e,"update"),r.update=function(e){return s.customProps=e,W(function(e){return Promise.resolve().then((function(){if(e.status!==w)throw Error(p(32,!1,j(e)));return e.status=_,Y(e,"update").then((function(){return e.status=w,e})).catch((function(t){throw d(t,e,E)}))}))}(s))})}))).then((function(){return D(s,!0)})),g=h.then((function(){return $(s,!0)})),b=new Promise((function(e,t){l=e,f=t}));return r={mount:function(){return W(Promise.resolve().then((function(){if(s.status!==m)throw Error(p(13,!1,name,s.status));return n.parcels[i]=s,$(s)})))},unmount:function(){return W(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:W(c),bootstrapPromise:W(h),mountPromise:W(g),unmountPromise:W(b)}}function W(e){return e.then((function(){return null}))}function K(e){var t=j(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==o(n)||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),t,n));var i=C({},n,{name:t,mountParcel:V.bind(e),singleSpa:r});return T(e)&&(i.unmountSelf=e.unmountThisParcel),i}var q={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function H(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(16,!1));q.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Z(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(17,!1));q.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function G(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(18,!1));q.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Q(e,t,n){if("number"!=typeof e||e<=0)throw Error(p(19,!1));q.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Y(e,t){var n=e.timeouts[t],r=n.warningMillis,o=P(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](K(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=p(31,!1,t,o,j(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function J(e){var t={};for(var n in q)t[n]=C({},q[n],e&&e[n]||{});return t}function X(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==h&&e.status!==x?e:(e.status=y,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(K(e));if(!R(r))throw n=!0,Error(p(33,!1,j(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==o(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!I(t.bootstrap)&&(r=35),I(t.mount)||(r=36),I(t.unmount)||(r=37);var i=P(t);if(r){var a;try{a=JSON.stringify(t)}catch(e){}return console.error(p(r,!1,i,j(e),a),t),c(void 0,e,E),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=C({},e.devtools.overlays,t.devtools.overlays)),e.status=v,e.bootstrap=N(t,"bootstrap"),e.mount=N(t,"mount"),e.unmount=N(t,"unmount"),e.unload=N(t,"unload"),e.timeouts=J(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=E:(r=x,e.loadErrorTime=(new Date).getTime()),c(t,e,r),e})));var t,n}))}var ee,te="undefined"!=typeof window,ne={hashchange:[],popstate:[]},re=["hashchange","popstate"];function oe(e){var 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(p(14,!1));t=e.currentTarget.href,e.preventDefault()}var 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 ie(e){var t=this;if(e){var n=e[0].type;re.indexOf(n)>=0&&ne[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function ae(){Le([],arguments)}function ue(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return ee&&n===o||(Fe()?window.dispatchEvent(se(window.history.state,t)):Le([])),r}}function se(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}if(te){window.addEventListener("hashchange",ae),window.addEventListener("popstate",ae);var ce=window.addEventListener,le=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0)||A(ne[e],(function(e){return e===t})))return ce.apply(this,arguments);ne[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&re.indexOf(e)>=0))return le.apply(this,arguments);ne[e]=ne[e].filter((function(e){return e!==t}))},window.history.pushState=ue(window.history.pushState,"pushState"),window.history.replaceState=ue(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=oe}function fe(e){var t=document.createElement("a");return t.href=e,t}var pe=!1;function de(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!pe){var 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)},pe=!0}}function he(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){re.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var ye={};function ve(e){return Promise.resolve().then((function(){var t=ye[j(e)];if(!t)return e;if(e.status===h)return ge(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==m&&e.status!==x)return e;var n=e.status===x?Promise.resolve():Y(e,"unload");return e.status="UNLOADING",n.then((function(){return ge(e,t),e})).catch((function(n){return function(e,t,n){delete ye[j(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,c(n,e,E),t.reject(n)}(e,t,n),e}))}))}function ge(e,t){delete ye[j(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=h,t.resolve()}function me(e,t,n,r){ye[j(e)]={app:e,resolve:n,reject:r},Object.defineProperty(ye[j(e)],"promise",{get:t})}function be(e){return ye[e]}var we=[];function _e(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return we.forEach((function(i){var a=i.status!==E&&k(i);switch(i.status){case x:a&&o-i.loadErrorTime>=200&&n.push(i);break;case h:case y:a&&n.push(i);break;case v:case m:!a&&be(j(i))?e.push(i):a&&r.push(i);break;case w:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}function Se(){return we.filter(O).map(j)}function xe(){return we.map(j)}function Ee(e){var t=A(we,(function(t){return j(t)===e}));return t?t.status:null}function Oe(e,t,n,r){var i=function(e,t,n,r){var i,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===o(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(p(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(p(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(p(20,!1));if("object"!==o(e.app)&&"function"!=typeof e.app)throw Error(p(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(p(24,!1));if(!Ce(e.customProps))throw Error(p(22,!1))}(e),a.name=e.name,a.loadApp=e.app,a.activeWhen=e.activeWhen,a.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(p(20,!1));if(!t)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!Ce(r))throw Error(p(22,!1))}(e,t,n,r),a.name=e,a.loadApp=t,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(i=a.loadApp)?function(){return Promise.resolve(i)}:i,a.customProps=function(e){return e||{}}(a.customProps),a.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Ae(e)})),function(e){return t.some((function(t){return t(e)}))}}(a.activeWhen),a}(e,t,n,r);if(-1!==xe().indexOf(i.name))throw Error(p(21,!1,i.name));we.push(C({loadErrorTime:null,status:h,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),te&&(de(),Le())}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return we.filter((function(t){return t.activeWhen(e)})).map(j)}function je(e){if(0===we.filter((function(t){return j(t)===e})).length)throw Error(p(25,!1,e));return Te(e).then((function(){var t=we.map(j).indexOf(e);we.splice(t,1)}))}function Te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(p(26,!1));var n=A(we,(function(t){return j(t)===e}));if(!n)throw Error(p(27,!1,e));var r,o=be(j(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){me(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,Pe(n,o.resolve,o.reject)):r=new Promise((function(e,t){me(n,(function(){return r}),e,t),Pe(n,e,t)})),r}function Pe(e,t,n){L(e).then(ve).then((function(){t(),setTimeout((function(){Le()}))})).catch(n)}function Ce(e){return!e||"function"==typeof e||"object"===o(e)&&null!==e&&!Array.isArray(e)}function Ae(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var Ie=!1,Ne=[],Re=te&&window.location.href;function De(){return Le()}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(Ie)return new Promise((function(e,n){Ne.push({resolve:e,reject:n,eventArguments:t})}));var n,r=_e(),o=r.appsToUnload,a=r.appsToUnmount,s=r.appsToLoad,c=r.appsToMount,l=!1,f=Re,p=Re=window.location.href;return Fe()?(Ie=!0,n=o.concat(s,a,c),v()):(n=s,y());function d(){l=!0}function y(){return Promise.resolve().then((function(){var e=s.map(X);return Promise.all(e).then(b).then((function(){return[]})).catch((function(e){throw b(),e}))}))}function v(){return Promise.resolve().then((function(){if(window.dispatchEvent(new u(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",_(!0))),window.dispatchEvent(new u("single-spa:before-routing-event",_(!0,{cancelNavigation:d}))),l)return window.dispatchEvent(new u("single-spa:before-mount-routing-event",_(!0))),g(),void oe(f);var t=o.map(ve),r=a.map(L).map((function(e){return e.then(ve)})).concat(t),i=Promise.all(r);i.then((function(){window.dispatchEvent(new u("single-spa:before-mount-routing-event",_(!0)))}));var p=s.map((function(e){return X(e).then((function(e){return Me(e,i)}))})),h=c.filter((function(e){return s.indexOf(e)<0})).map((function(e){return Me(e,i)}));return i.catch((function(e){throw b(),e})).then((function(){return b(),Promise.all(p.concat(h)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(g)}))}))}function g(){var t=Se();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new u(r,_())),window.dispatchEvent(new u("single-spa:routing-event",_()))}catch(e){setTimeout((function(){throw e}))}if(Ie=!1,Ne.length>0){var o=Ne;Ne=[],Le(o)}return t}function b(){e.forEach((function(e){ie(e.eventArguments)})),ie(t)}function _(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],u=arguments.length>1?arguments[1]:void 0,d={},y=(i(e={},w,[]),i(e,m,[]),i(e,h,[]),i(e,E,[]),e);r?(s.concat(c).forEach((function(e,t){g(e,w)})),o.forEach((function(e){g(e,h)})),a.forEach((function(e){g(e,m)}))):n.forEach((function(e){g(e)}));var v={detail:{newAppStatuses:d,appsByNewStatus:y,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:p,navigationIsCanceled:l}};return u&&C(v.detail,u),v;function g(e,t){var n=j(e);t=t||Ee(n),d[n]=t,(y[t]=y[t]||[]).push(n)}}}function Me(e,t){return k(e)?D(e).then((function(e){return t.then((function(){return k(e)?$(e):e}))})):t.then((function(){return e}))}var Ue=!1;function $e(e){var t;Ue=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,ee=t),te&&Le()}function Fe(){return Ue}te&&setTimeout((function(){Ue||console.warn(p(1,!1))}),5e3);var Be={getRawAppData:function(){return[].concat(we)},reroute:Le,NOT_LOADED:h,toLoadPromise:X,toBootstrapPromise:D,unregisterApplication:je};te&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Be)},7641:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-config"],(function(e,t){var i={};return{setters:[function(e){i.Type=e.Type,i.defineConfigSchema=e.defineConfigSchema,i.getConfig=e.getConfig,i.navigate=e.navigate,i.validators=e.validators}],execute:function(){e(function(){var e={672:function(e,t){var n,r,o;r=t,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",((n=function(e){this.message=e}).prototype=new Error).name="InvalidCharacterError",r.btoa||(r.btoa=function(e){for(var t,r,i=String(e),a=0,u=o,s="";i.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&t>>8-a%1*8)){if((r=i.charCodeAt(a+=3/4))>255)throw new n("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|r}return s}),r.atob||(r.atob=function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,a=0,u=0,s="";i=t.charAt(u++);~i&&(r=a%4?64*r+i:i,a++%4)?s+=String.fromCharCode(255&r>>(-2*a&6)):0)i=o.indexOf(i);return s})},525:function(e){(function(){var t,n,r=function(e,r,o,i){n.defer(),t.search(e).then((function(e){a(e,r).then((function(){o()}),(function(e){i(e)}))}),(function(e){i(e)}))},o=function(e){var t=n.defer(),o=[];return r(e,(function(e){e.forEach((function(e){o.push(e)}))}),(function(){t.resolve(o)}),(function(e){t.reject(e)})),t.promise},i=function(e,r){var o=n.defer();return t.search(e).then((function(e){var n={},i=[function(){o.resolve(e,n)}];function a(){i.pop()()}var u=e.data;u.entry&&u.entry.forEach((function(e){var o=e.resource,s=o.resourceType;r&&r.forEach((function(e){var r,c,l,f=e.split("."),p=f[0],d=f[1],h=o[d];if(s===p&&h){var y=h.reference;n[y]||(r=u,c=o,l=h,i.push((function(){var e,o,i,u;e=r,o=c,u=(i=l).reference,t.resolve({bundle:e,resource:o,reference:i}).then((function(e){var t=e.data||e.content;n[u]=t,a()}))})))}}))})),a()}),(function(){o.reject("Could not fetch search results")})),o.promise};function a(e,r){var o,i=e.data.entry||[],u=[];for(o=0;o<i.length;o++)u.push(i[o].resource);r(u);var s=n.defer();return t.nextPage({bundle:e.data}).then((function(e){a(e,r).then((function(e){s.resolve()}))}),(function(e){s.resolve()})),s.promise}e.exports=function(e,a){return t=e,n=a,e.drain=r,e.fetchAll=o,e.fetchAllWithReferences=i,e}}).call(this)},256:function(e,t,n){(function(){n(454);var t=n(801),r=n(921),o=n(294),i=n(821),a=n(442),u=n(856),s=n(719),c=n(29),l=n(723),f=n(249),p=n(525);e.exports=function(e,n){var d=t.Middleware,h=t.$$Attr,y=function(e){return h("method",e)},v=function(e,t){return h("headers."+e,t)},g=d(a),m=d(u(e,n)).and(g).and(o.$Basic).and(o.$Bearer).and(o.$Credentials).and(i.$JsonData).and(v("Accept",e.headers&&e.headers.Accept?e.headers.Accept:"application/json")).and(v("Content-Type",e.headers&&e.headers["Content-Type"]?e.headers["Content-Type"]:"application/json")),b=m.and(y("GET")),w=m.and(y("POST")),_=m.and(y("PUT")),S=m.and(y("DELETE")),x=m.and(y("PATCH")),E=i.Http(e,n),O=f.Path,k=O(e.baseUrl),j=k.slash(":type || :resource.resourceType"),T=j.slash("_history"),P=j.slash(":id || :resource.id"),C=P.slash("_history"),A=P.slash(":versionId || :resource.meta.versionId"),I=k.slash(":target.resourceType || :target.type").slash(":target.id").slash(":target.versionId"),N=v("Prefer","return=representation"),R=d(r.$Paging);return p({conformance:b.and(k.slash("metadata")).end(E),document:w.and(k.slash("Document")).end(E),profile:b.and(k.slash("Profile").slash(":type")).end(E),transaction:w.and(k).end(E),history:b.and(k.slash("_history")).and(R).end(E),typeHistory:b.and(T).and(R).end(E),resourceHistory:b.and(C).and(R).end(E),read:b.and(c.$WithPatient).and(P).end(E),vread:b.and(A).end(E),delete:S.and(P).and(N).end(E),create:w.and(j).and(N).end(E),validate:w.and(j.slash("_validate")).end(E),meta:{add:w.and(I.slash("$meta-add")).end(E),delete:w.and(I.slash("$meta-delete")).end(E),read:b.and(I.slash("$meta")).end(E)},search:b.and(j).and(c.$WithPatient).and(r.$SearchParams).and(R).end(E),update:_.and(P).and(N).end(E),conditionalUpdate:_.and(j).and(r.$SearchParams).and(N).end(E),conditionalDelete:S.and(j).and(r.$SearchParams).and(N).end(E),nextPage:b.and(s.$$BundleLinkUrl("next")).end(E),prevPage:b.and(s.$$BundleLinkUrl("previous")).and(s.$$BundleLinkUrl("prev")).end(E),getBundleByUrl:b.and(O(":url")).end(E),resolve:b.and(l.resolve).end(E),patch:x.and(P).and(v("Content-Type","application/json-patch+json")).end(E)},n)}}).call(this)},294:function(e,t,n){(function(){var e,r=n(801),o=n(672).btoa;t.$Basic=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.user&&e.auth.pass)return"Basic "+o(e.auth.user+":"+e.auth.pass)})),t.$Bearer=r.$$Attr("headers.Authorization",(function(e){if(e.auth&&e.auth.bearer)return"Bearer "+e.auth.bearer})),t.$Credentials=r.Middleware(r.$$Attr("credentials",(function(t){return e=t.credentials,""}))).and(r.$$Attr("credentials",(function(t){if(["same-origin","include"].indexOf(e)>-1)return e})))}).call(this)},719:function(e,t){t.$$BundleLinkUrl=function(e){return function(t){return function(n){var r=n.bundle&&(n.bundle.link||[]).filter((function(t){return t.relation&&t.relation===e}))[0];return r&&r.url&&(n.url=r.url,n.data=null),t(n)}}}},856:function(e){(function(){var t=function(e,t,n){var r=e[n];return r&&!t[n]&&(t[n]=r),e};e.exports=function(e,n){return function(r){return function(o){return t(e,o,"baseUrl"),t(e,o,"cache"),t(e,o,"auth"),t(e,o,"patient"),t(e,o,"debug"),t(e,o,"credentials"),t(e,o,"headers"),t(e,o,"agentOptions"),t(n,o,"defer"),t(n,o,"http"),r(o)}}}}).call(this)},801:function(e,t,n){(function(){var e=n(454),r=function(e){return e.and=function(t){return r((n=e,o=t,function(e){return n(o(e))}));var n,o},e.end=function(t){return e(t)},e};t.$$Simple=function(e){return function(t){return function(n){return t(e(n))}}},t.$$Attr=function(t,n){return r((function(r){return function(o){var i;return i="function"==e.type(n)?n(o):n,r(null==i&&null==i?o:function(e,t,n){for(var r=t.split("."),o=e,i=0;i<r.length-1;i++){var a=r[i];(o=e[a])||(o={},e[a]=o)}return o[r[r.length-1]]=n,e}(o,t,i))}}))};var o=function(e,t){return r((function(n){return function(r){return r[e]=t(r),n(r)}}))};t.Middleware=r,t.Attribute=o,t.Method=function(e){return o("method",(t=e,function(){return t}));var t}}).call(this)},442:function(e){e.exports=function(e){return function(t){try{return e(t)}catch(e){if(t.debug&&(console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack)),!t.defer)throw console.log("\nDEBUG: (ERROR in middleware)"),console.log(e.message),console.log(e.stack),new Error("I need adapter.defer");var n=t.defer();return n.reject(e),n.promise}}}},821:function(e,t,n){(function(){var e=n(454);t.Http=function(e,t){return function(n){n.debug&&console.log("\nDEBUG (request):",n.method,n.url,n);var r=(n.http||t.http||e.http)(n);return n.debug&&r&&r.then&&r.then((function(e){console.log("\nDEBUG: (responce)",e)})),r}},t.$JsonData=function(t){return function(n){var r,o=n.bundle||n.data||n.resource;return o&&(n.data=(r=o,"object"==e.type(r)||"array"==e.type(r)?JSON.stringify(r):r)),t(n)}}}).call(this)},29:function(e,t,n){(function(){var e=n(801),r=["Account","AllergyIntolerance","BodySite","CarePlan","Claim","ClinicalImpression","Communication","CommunicationRequest","Composition","Condition","Contract","DetectedIssue","Device","DeviceUseRequest","DeviceUseStatement","DiagnosticOrder","DiagnosticReport","DocumentManifest","DocumentReference","Encounter","EnrollmentRequest","EpisodeOfCare","FamilyMemberHistory","Flag","Goal","ImagingObjectSelection","ImagingStudy","Immunization","ImmunizationRecommendation","List","Media","MedicationAdministration","MedicationDispense","MedicationOrder","MedicationStatement","NutritionOrder","Observation","Order","Procedure","ProcedureRequest","QuestionnaireResponse","ReferralRequest","RelatedPerson","RiskAssessment","Specimen","SupplyDelivery","SupplyRequest","VisionPrescription"];t.$WithPatient=e.$$Simple((function(e){var t=e.type;return e.patient&&("Patient"===t?(e.query=e.query||{},e.query._id=e.patient,e.id=e.patient):r.indexOf(t)>=0&&(e.query=e.query||{},e.query.patient=e.patient)),e}))}).call(this)},723:function(e,t,n){(function(){var t=n(454),r=/^#(.*)/,o=function(e){var n,o,i,a,u=e.cache,s=e.reference,c=e.bundle,l=s;if(!l.reference)return null;if(l.reference.match(r))return n=l.reference,o=e.resource,i=n.match(r)[1],(a=(o.contained||[]).filter((function(e){return(e.id||e._id)==i}))[0])&&{content:a}||null;var f=t.absoluteUrl(e.baseUrl,l.reference);return(c&&c.entry||[]).filter((function(e){return e.id===f}))[0]||(null!=u?u[f]:void 0)||null};e.exports.sync=o,e.exports.resolve=function(e){return function(n){var i=o(n),a=n.reference,u=n.defer();if(i){if(!n.defer)throw new Error("I need promise constructor 'adapter.defer' in adapter");return u.resolve(i),u.promise}if(!a)throw new Error("No reference found");if(a&&a.reference.match(r))throw new Error("Contained resource not found");return n.url=t.absoluteUrl(n.baseUrl,a.reference),n.data=null,e(n)}}}).call(this)},921:function(e,t,n){(function(){var e=n(454),r=e.type,o=e.assertArray,i=(e.assertObject,e.reduceMap),a=e.identity,u={$gt:"gt",$lt:"lt",$lte:"lte",$gte:"gte",$ge:"ge",$le:"le"},s={$asc:":asc",$desc:":desc",$exact:":exact",$missing:":missing",$null:":missing",$text:":text"},c=function(e,t){if("$sort"===e)return function(e){var t,n,i,a;for(o(e),i=[],t=0,n=e.length;t<n;t++)switch(a=e[t],r(a)){case"array":i.push({param:"_sort",value:a[0],modifier:":"+a[1]});break;case"string":i.push({param:"_sort",value:a});break;default:i.push(void 0)}return i}(t);if("$has"===e)return i(t,(function(e,t){var n,o;return n=t[0],o=t[1],e.concat(function(){switch(r(o)){case"array":return o.map((function(e){return{param:"_has",value:n+"="+e}}));case"string":return[{param:"_has",value:n+"="+o}]}}())}));if("$include"===e||"$revInclude"===e)return n=e,i(t,(function(e,t){var o,i;return o=t[0],i=t[1],e.concat(function(){switch(r(i)){case"array":return i.map((function(e){return{param:"$include"===n?"_include":"_revinclude",value:o+":"+e}}));case"string":return[{param:"$include"===n?"_include":"_revinclude",value:o+":"+i}]}}())}));var n,a,l;switch(r(t)){case"object":return a=e,i(l=t,(function(e,t){var n,i,f,p;return n=t[0],p=t[1],e.concat("$and"===n?o(p).reduce((function(e,t){return e.concat(c(a,t))}),[]):"$type"===n?[]:0===n.indexOf("$")?(i={param:a},"$or"===n?i.value=p:(u[n]&&(i.operator=u[n]),s[n]&&(i.modifier=s[n]),"object"===r(p)&&p.$or?i.value=p.$or:i.value=[p]),[i]):(l.$type&&(f=":"+l.$type),c(""+a+(f||"")+"."+n,p)))}));case"string":case"number":return[{param:e,value:[t]}];case"array":return[{param:e,value:[t.join("|")]}];default:throw"could not linearizeParams "+r(t)}},l=function(e){return i(e,(function(e,t){var n,r;return n=t[0],r=t[1],e.concat(c(n,r))}))},f=function(e){var t,n,r=["_include","_revinclude","_has"];return function(){var o,i,u,s;for(s=[],o=0,i=(u=l(e)).length;o<i;o++)t=u[o],n=-1===r.indexOf(t.param)?encodeURIComponent(t.value):t.value,s.push([t.param,t.modifier,"_has"==t.param?":":"=",t.operator,n].filter(a).join(""));return s}().join("&")};t._query=l,t.query=f;var p=n(801);t.$SearchParams=p.$$Attr("url",(function(e){var t=e.url;return e.query?t+"?"+f(e.query):t})),t.$Paging=function(e){return function(t){var n=t.params||{};return t.since&&(n._since=t.since),t.count&&(n._count=t.count),t.params=n,e(t)}}}).call(this)},249:function(e,t,n){(function(){n(454);var e=n(801),r=function(t,n){var o=function(e){return n&&t.includes("target.versionId")&&!e.target.versionId?n(e):(n&&n(e)+"/"||"")+function(e,t){var n,r,o=(r=t,0==(n=e.trim()).indexOf(":")?function(e,t){for(var n,r=e.split("||").map((function(e){return e.trim().substring(1)})),o=0;o<r.length;o++){var i=(n=t,r[o].split(".").reduce((function(e,t){return"versionId"===t&&e[t]?"_history/"+e[t]:null==e||null==e?null:e[t]}),n));if(i)return i}return null}(n,r):n);if((null==o||void 0===o)&&0==e.includes("target.versionId"))throw new Error("Parameter "+e+" is required: "+JSON.stringify(t));return o}(t,e)},i=e.Attribute("url",o);return i.slash=function(e){return r(e,o)},i};t.Path=r}).call(this)},454:function(e,t,n){(function(){var e=n(651),r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;t.trim=function(e){return e?e.toString().replace(r,""):""};var o=function(e){return null==e&&void 0===e?String(e):{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"}[Object.prototype.toString.call(e)]};t.type=o,t.assertArray=function(e){if("array"!==o(e))throw"not array";return e};var i=function(e){if("object"!==o(e))throw"not object";return e};t.assertObject=i;var a=function(e,t,n){var r,o;return n||(n=[]),i(e),function(){var t;for(r in t=[],e)o=e[r],t.push([r,o]);return t}().reduce(t,n)};t.reduceMap=a,t.identity=function(e){return e};var u=function(){return Array.prototype.slice.call(arguments)};t.argsArray=u,t.mergeLists=function(){var t;return t=function(t,n){var r,o,i;for(r in o=e(!0,t),n)i=n[r],o[r]=(o[r]||[]).concat(i);return o},u.apply(null,arguments).reduce(t,{})},t.absoluteUrl=function(e,t){return t.match(/https?:\/\/./)?t:e+"/"+t},t.relativeUrl=function(e,t){return t.slice(t,e.length+1)===e+"/"?t.slice(e.length+1):t},t.resourceIdToUrl=function(e,t,n){return t=t.replace(/\/$/,""),(e=e.replace(/^\//,"")).indexOf("/")<0?t+"/"+n+"/"+e:0!==e.indexOf(t)?t+"/"+e:e};var s=function(e,t,n,r){var i;switch(o(n)){case"array":return t(n.map((function(t){return e(t,[n,r])})),r);case"object":return i=function(t,o){var i,a;return i=o[0],a=o[1],t[i]=e(a,[n].concat(r)),t},t(a(n,i,{}),r);default:return t(n,r)}};t.walk=s;var c=function(e,t,n){return t?s(c(e),e,t,n):function(t,n){return c(e,t,n)}};t.postwalk=c}).call(this)},651:function(e,t,n){!function(t){var n=function(e,t,n){var a=n[0],u=n.length;(e||"object"!==r(a))&&(a={});for(var s=0;s<u;++s){var c=n[s];if("object"===r(c))for(var l in c)if("__proto__"!==l){var f=e?o.clone(c[l]):c[l];a[l]=t?i(a[l],f):f}}return a},r=function(e){return{}.toString.call(e).slice(8,-1).toLowerCase()},o=function(e){return n(!0===e,!1,arguments)};function i(e,t){if("object"!==r(e))return t;for(var n in t)"object"===r(e[n])&&"object"===r(t[n])?e[n]=i(e[n],t[n]):e[n]=t[n];return e}o.recursive=function(e){return n(!0===e,!0,arguments)},o.clone=function(e){var t,n,i=e,a=r(e);if("array"===a)for(i=[],n=e.length,t=0;t<n;++t)i[t]=o.clone(e[t]);else if("object"===a)for(t in i={},e)i[t]=o.clone(e[t]);return i},t?e.exports=o:window.merge=o}((e=n.nmd(e))&&"object"==typeof e.exports&&e.exports)},602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},o=function(e,t,n,o){var u,s,c,l,f=t&&r(t.prototype,a)?t:a,p=Object.create(f.prototype),h=new d(o||[]);return p._invoke=(u=e,s=n,c=h,l=S,function(e,t){if(l===E)throw new Error("Generator is already running");if(l===O){if("throw"===e)throw t;return y()}for(c.method=e,c.arg=t;;){var n=c.delegate;if(n){var r=A(n,c);if(r){if(r===k)continue;return r}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(l===S)throw l=O,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);l=E;var o=i(u,s,c);if("normal"===o.type){if(l=c.done?O:x,o.arg===k)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(l=O,c.method="throw",c.arg=o.arg)}}),p},i=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},a=function(){},u=function(){},s=function(){},c=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,o,a,u){var s=i(e[r],e,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&g.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,u)}))}u(s.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},p=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},d=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(g.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:y}},y=function(){return{value:t,done:!0}},v=Object.prototype,g=v.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=o;var S="suspendedStart",x="suspendedYield",E="executing",O="completed",k={},j={};n(j,b,(function(){return this}));var T=Object.getPrototypeOf,P=T&&T(T(h([])));P&&P!==v&&g.call(P,b)&&(j=P);var C=s.prototype=a.prototype=Object.create(j);function A(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var o=i(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,k;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,k):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return u.prototype=s,n(C,"constructor",s),n(s,"constructor",u),u.displayName=n(s,_,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,n(e,_,"GeneratorFunction")),e.prototype=Object.create(C),e},e.awrap=function(e){return{__await:e}},c(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var u=new l(o(t,n,r,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},c(C),n(C,_,"Generator"),n(C,b,(function(){return this})),n(C,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(p),!e)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),k},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),k}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=i}},a={};function u(t){var n=a[t];if(void 0!==n)return n.exports;var r=a[t]={id:t,loaded:!1,exports:{}};return e[t].call(r.exports,r,r.exports,u),r.loaded=!0,r.exports}u.y=t,u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;u.g.importScripts&&(e=u.g.location+"");var t=u.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u.p=e}();var s={};return(0,u(968).s)(1),function(){"use strict";var e=function(e,t){function n(){this.constructor=e}ne(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},i=function(e){setTimeout((function(){throw e}),0)},a=function(e){return null!==e&&"object"==typeof e},c=function(e){return e.reduce((function(e,t){return e.concat(r(t,ue)?t.errors:t)}),[])},l=function(e){return e},f=function(e){return 0===e.length?l:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},p=function(e){if(e||(e=oe.Promise||Promise),!e)throw new Error("no Promise impl found");return e},d=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},h=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,u,"next",e)}function u(e){d(i,r,o,a,u,"throw",e)}a(void 0)}))}},y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},v=function(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},g=function(e){return window.openmrsBase+e},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");var n=g(e);t.headers||(t.headers={}),Pe(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;var r,o=Error();return window.fetch(n,t).then((r=h(te().mark((function e(t){var r,i;return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,Ce.getConfig)("@openmrs/esm-api");case 12:if(i=e.sent.redirectAuthFailure,!(n===g(Me)&&403===r.status||i.enabled&&i.errors.includes(r.status))){e.next=18;break}return(0,Ce.navigate)({to:i.url}),e.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new Ue(n,r,t,o)}),(function(e){throw new Ue(n,r,null,o)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new de((function(r){var o=!1;return m(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},w=function(e){return e?(t=e,new de((function(e){return t.schedule((function(){return e.complete()}))}))):Qe;var t},_=function(e){return e&&"function"==typeof e.schedule},S=function(e,t){return new de((function(n){var r=new se,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))},x=function(e,t){return t?S(e,t):new de(Ye(e))},E=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 rt(e,t))}},O=function(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),ct(l,e)},k=function(){},j=function(e,t,n){return function(r){return r.lift(new pt(e,t,n))}},T=function(e,t){return function(n){return n.lift(new ht(e,t))}},P=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},C=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){P(i,r,o,a,u,"next",e)}function u(e){P(i,r,o,a,u,"throw",e)}a(void 0)}))}},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return gt<Date.now()-6e4&&N(),vt.asObservable().pipe(O(),j(I),E((function(t){return e.includeAuthStatus?t:t.user})),T(Boolean))},I=function(e){var t,n,r,o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale;o!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",o)},N=function(){gt=Date.now(),vt.next(m(Me).then((function(e){return"object"==typeof e.data?e.data:Promise.reject()})).catch((function(){return{sessionId:"",authenticated:!1}})))},R=function(e,t){return n=e,t.privileges.find((function(e){return n===e.display}))||t.roles.find((function(e){return"System Developer"===e.display}));var n},D=function(){return new Promise((function(e,t){var n=A().subscribe((function(t){e(t),n.unsubscribe()}),t)}))},L=function(){return new Promise((function(e,t){var n=A({includeAuthStatus:!0}).subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},M=function(e,t){return mt.apply(this,arguments)},U=function(){(0,Ce.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Ce.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Ce.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Ce.validators.isUrl]},errors:{_type:Ce.Type.Array,_default:[401],_elements:{_type:Ce.Type.Number,_validators:[Ce.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Ce.Type.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."}}}),N()},$=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},F=function(e,t){return e?Fe.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){$(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},B=function(e){return function(t){return 0===e?w():t.lift(new Et(e))}},z=function(e,t,n){var r=null!=n?n:kt;return b("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(B(1)).pipe(E((function(e){return e})))},V=function(e,t){return b("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},W=function(e,t,n){return b("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},K=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},q=function(){return b("/ws/rest/v1/visittype").pipe(E((function(e){return e.data.results.map(K)}))).pipe(B(1))},H=function(e){return{uuid:e.uuid,display:e.display}},Z=function(){return b("/ws/rest/v1/location").pipe(E((function(e){return e.data.results.map(H)}))).pipe(B(1))};u.r(s),u.d(s,{OpenmrsFetchError:function(){return Ue},VisitMode:function(){return bt},VisitStatus:function(){return wt},backendDependencies:function(){return Tt},defaultVisitCustomRepresentation:function(){return kt},fetchCurrentPatient:function(){return F},fhir:function(){return Fe},fhirBaseUrl:function(){return $e},getCurrentUser:function(){return A},getLocations:function(){return Z},getLoggedInUser:function(){return D},getSessionLocation:function(){return L},getStartedVisit:function(){return jt},getVisitTypes:function(){return q},getVisitsForPatient:function(){return z},makeUrl:function(){return g},openmrsFetch:function(){return m},openmrsObservableFetch:function(){return b},refetchCurrentUser:function(){return N},saveVisit:function(){return V},sessionEndpoint:function(){return Me},setSessionLocation:function(){return M},setupApiModule:function(){return U},toLocationObject:function(){return H},toVisitTypeObject:function(){return K},updateVisit:function(){return W},userHasAccess:function(){return R}});var G,Q,Y,J,X,ee=u(602),te=u.n(ee),ne=function(e,t){return(ne=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},re=!1,oe={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,re=e},get useDeprecatedSynchronousErrorHandling(){return re}},ie={closed:!0,next:function(e){},error:function(e){if(oe.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},ae=Array.isArray||function(e){return e&&"number"==typeof e.length},ue=(G=function(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},G.prototype=Object.create(Error.prototype),G),se=function(){var e,n=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return n.prototype.unsubscribe=function(){var e;if(!this.closed){var o=this,i=o._parentOrParents,u=o._ctorUnsubscribe,s=o._unsubscribe,l=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(i,n))i.remove(this);else if(null!==i)for(var f=0;f<i.length;++f)i[f].remove(this);if(t(s)){u&&(this._unsubscribe=void 0);try{s.call(this)}catch(t){e=r(t,ue)?c(t.errors):[t]}}if(ae(l)){f=-1;for(var p=l.length;++f<p;){var d=l[f];if(a(d))try{d.unsubscribe()}catch(t){e=e||[],r(t,ue)?e=e.concat(c(t.errors)):e.push(t)}}}if(e)throw new ue(e)}},n.prototype.add=function(e){var t=e;if(!e)return n.EMPTY;switch(void 0===e?"undefined":o(e)){case"function":t=new n(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!r(t,n)){var i=t;(t=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var a=t._parentOrParents;if(null===a)t._parentOrParents=this;else if(r(a,n)){if(a===this)return t;t._parentOrParents=[a,this]}else{if(-1!==a.indexOf(this))return t;a.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[t]:u.push(t),t},n.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},n.EMPTY=((e=new n).closed=!0,e),n}(),ce="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),le=function(t){function n(e,o,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=ie;break;case 1:if(!e){a.destination=ie;break}if("object"==typeof e){r(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new fe(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new fe(a,e,o,i)}return a}return e(n,t),n.prototype[ce]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(se),fe=(Y=function(e,n,r,o){var i,a=Q.call(this)||this;a._parentSubscriber=e;var u=a;return t(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==ie&&(t((u=Object.create(n)).unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=i,a._error=r,a._complete=o,a},e(Y,Q=le),Y.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;oe.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},Y.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=oe.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):i(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;i(e)}}},Y.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)};oe.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},Y.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),oe.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},Y.prototype.__tryOrSetError=function(e,t,n){if(!oe.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return oe.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},Y.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},Y),pe="function"==typeof Symbol&&Symbol.observable||"@@observable",de=function(){var e=function(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 o=this.operator,i=function(e,t,n){if(e){if(r(e,le))return e;if(e[ce])return e[ce]()}return e||t||n?new le(e,t,n):new le(ie)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||oe.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),oe.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){oe.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&r(o,le)?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=p(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[pe]=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:f(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=p(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}(),he="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ye="object"==typeof self&&self&&self.Object===Object&&self,ve=(he||ye||Function("return this")()).Symbol,ge=Object.prototype,me=ge.hasOwnProperty,be=ge.toString,we=ve?ve.toStringTag:void 0,_e=Object.prototype.toString,Se=ve?ve.toStringTag:void 0,xe=(J=Object.getPrototypeOf,X=Object,function(e){return J(X(e))}),Ee=Function.prototype,Oe=Object.prototype,ke=Ee.toString,je=Oe.hasOwnProperty,Te=ke.call(Object),Pe=function(e){if(null==(t=e)||"object"!=typeof t||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Se&&Se in Object(e)?function(e){var t=me.call(e,we),n=e[we];try{e[we]=void 0;var r=!0}catch(e){}var o=be.call(e);return r&&(t?e[we]=n:delete e[we]),o}(e):(t=e,_e.call(t));var t}(e))return!1;var t,n=xe(e);if(null===n)return!0;var o=je.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&ke.call(o)==Te},Ce=u(824);function Ae(e,t,n){return Ae=y()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ne(o,n.prototype),o},Ae.apply(null,arguments)}function Ie(e){return(Ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Re=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)};function De(e){var t="function"==typeof Map?new Map:void 0;return De=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ae(e,arguments,Ie(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ne(r,e)},De(e)}var Le,Me="/ws/rest/v1/session",Ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ne(e,t)}(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ie(t);if(n){var o=Ie(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return v(this,e)});function i(e,t,n,a){var u;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(u=o.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return i}(De(Error)),$e="/ws/fhir2/R4",Fe=u(256)({baseUrl:$e},{http:function(e){return m(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),Be=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),ze=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.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)}}},n}(se),Ve=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(le),We=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[ce]=function(){return new Ve(this)},n.prototype.lift=function(e){var t=new Ke(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Be;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Be;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},n.prototype.complete=function(){if(this.closed)throw new Be;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},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Be;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Be;return this.hasError?(e.error(this.thrownError),se.EMPTY):this.isStopped?(e.complete(),se.EMPTY):(this.observers.push(e),new ze(this,e))},n.prototype.asObservable=function(){var e=new de;return e.source=this,e},n.create=function(e,t){return new Ke(e,t)},n}(de),Ke=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):se.EMPTY},n}(We),qe=function(t){var n=function(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r};return e(n,t),n.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},n.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},n.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},n}(function(t){var n=function(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r};return e(n,t),n.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},n.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},n.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},n.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))},n.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},n.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},n}(function(t){var n=function(e,n){return t.call(this)||this};return e(n,t),n.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},n}(se))),He=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}(),Ze=function(t){var n=function(){return null!==t&&t.apply(this,arguments)||this};return e(n,t),n}(function(t){function n(e,r){void 0===r&&(r=He.now);var o=t.call(this,e,(function(){return n.delegate&&n.delegate!==o?n.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return e(n,t),n.prototype.schedule=function(e,r,o){return void 0===r&&(r=0),n.delegate&&n.delegate!==this?n.delegate.schedule(e,r,o):t.prototype.schedule.call(this,e,r,o)},n.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}}},n}(He)),Ge=new Ze(qe),Qe=new de((function(e){return e.complete()})),Ye=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};Le||(Le={});var Je=function(){var e=function(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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return _(n)?(e.pop(),S(e,n)):x(e)}(this.value);case"E":return e=this.error,new de((function(t){return t.error(e)}));case"C":return w()}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}(),Xe=function(t){var n=function(e,n,r){void 0===r&&(r=0);var o=t.call(this,e)||this;return o.scheduler=n,o.delay=r,o};return e(n,t),n.dispatch=function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()},n.prototype.scheduleMessage=function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new et(e,this.destination)))},n.prototype._next=function(e){this.scheduleMessage(Je.createNext(e))},n.prototype._error=function(e){this.scheduleMessage(Je.createError(e)),this.unsubscribe()},n.prototype._complete=function(){this.scheduleMessage(Je.createComplete()),this.unsubscribe()},n}(le),et=function(e,t){this.notification=e,this.destination=t},tt=function(t){var n=function(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var o=t.call(this)||this;return o.scheduler=r,o._events=[],o._infiniteTimeWindow=!1,o._bufferSize=e<1?1:e,o._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(o._infiniteTimeWindow=!0,o.next=o.nextInfiniteTimeWindow):o.next=o.nextTimeWindow,o};return e(n,t),n.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},n.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new nt(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},n.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 Be;if(this.isStopped||this.hasError?t=se.EMPTY:(this.observers.push(e),t=new ze(this,e)),o&&e.add(e=new Xe(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},n.prototype._getNow=function(){return(this.scheduler||Ge).now()},n.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},n}(We),nt=function(e,t){this.time=e,this.value=t},rt=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new ot(e,this.project,this.thisArg))},e}(),ot=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.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)},n}(le),it="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",at=function(e){if(e&&"function"==typeof e[pe])return o=e,function(e){var t=o[pe]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if((t=e)&&"number"==typeof t.length&&"function"!=typeof t)return Ye(e);var t;if(function(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}(e))return r=e,function(e){return r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,i),e};if(e&&"function"==typeof e[it])return n=e,function(e){for(var t=n[it]();;){var r=void 0;try{r=t.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof t.return&&e.add((function(){t.return&&t.return()})),e};var n,r,o,u=a(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+u+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")},ut=function(t){var n=function(e){var n=t.call(this)||this;return n.parent=e,n};return e(n,t),n.prototype._next=function(e){this.parent.notifyNext(e)},n.prototype._error=function(e){this.parent.notifyError(e),this.unsubscribe()},n.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},n}(le),st=function(t){var n=function(){return null!==t&&t.apply(this,arguments)||this};return e(n,t),n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyError=function(e){this.destination.error(e)},n.prototype.notifyComplete=function(){this.destination.complete()},n}(le);function ct(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(o){return o.pipe(ct((function(n,o){return(i=e(n,o),r(i,de)?i:new de(at(i))).pipe(E((function(e,r){return t(n,e,o,r)})));var i}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new lt(e,n))})}var lt=function(){var e=function(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 ft(e,this.project,this.concurrent))},e}(),ft=function(t){var n=function(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o};return e(n,t),n.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},n.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)},n.prototype._innerSub=function(e){var t=new ut(this),n=this.destination;n.add(t);var o=function(e,t){if(!t.closed){if(r(e,de))return e.subscribe(t);var n;try{n=at(e)(t)}catch(e){t.error(e)}return n}}(e,t);o!==t&&n.add(o)},n.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},n.prototype.notifyNext=function(e){this.destination.next(e)},n.prototype.notifyComplete=function(){var e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},n}(st),pt=function(){var e=function(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n};return e.prototype.call=function(e,t){return t.subscribe(new dt(e,this.nextOrObserver,this.error,this.complete))},e}(),dt=function(n){var r=function(e,r,o,i){var a=n.call(this,e)||this;return a._tapNext=k,a._tapError=k,a._tapComplete=k,a._tapError=o||k,a._tapComplete=i||k,t(r)?(a._context=a,a._tapNext=r):r&&(a._context=r,a._tapNext=r.next||k,a._tapError=r.error||k,a._tapComplete=r.complete||k),a};return e(r,n),r.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},r.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},r.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},r}(le),ht=function(){var e=function(e,t){this.predicate=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new yt(e,this.predicate,this.thisArg))},e}(),yt=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.count=0,o};return e(n,t),n.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)},n}(le),vt=new tt(1),gt=0;function mt(){return(mt=C(te().mark((function e(t,n){return te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(Me,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:N();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var bt,wt,_t,St=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Be;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(We),xt=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),Et=function(){var e=function(e){if(this.total=e,this.total<0)throw new xt};return e.prototype.call=function(e,t){return t.subscribe(new Ot(e,this.total))},e}(),Ot=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(le),kt="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)",jt=new St(null);(_t=bt||(bt={})).NEWVISIT="startVisit",_t.EDITVISIT="editVisit",_t.LOADING="loadingVisit",function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(wt||(wt={}));var Tt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},8166:(e,t,n)=>{"use strict";n.d(t,{nF:()=>P,u4:()=>Ge,Rx:()=>Qe,Wf:()=>nt,I$:()=>Ke,Vy:()=>$e,N$:()=>A,DN:()=>C,ts:()=>Ce,JC:()=>tt,r:()=>Re,WK:()=>De,$X:()=>Ye,P9:()=>Xe,nx:()=>qe,bf:()=>k,vb:()=>j,uj:()=>T,VJ:()=>Ie,bX:()=>He,z$:()=>O,jK:()=>Le,Lq:()=>et,VF:()=>Je,ym:()=>Ze,y9:()=>Ne});var r=n(1602),o=n.n(r),i=n(921),a=n(963);const u=(0,n(6899).Z)(Object.getPrototypeOf,Object);var s=n(4897),c=Function.prototype,l=Object.prototype,f=c.toString,p=l.hasOwnProperty,d=f.call(Object);const h=function(e){if(!(0,s.Z)(e)||"[object Object]"!=(0,a.Z)(e))return!1;var t=u(e);if(null===t)return!0;var n=p.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&f.call(n)==d};var y=n(9714);function v(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){v(i,r,o,a,u,"next",e)}function u(e){v(i,r,o,a,u,"throw",e)}a(void 0)}))}}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function b(e,t,n){return b=m()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&S(o,n.prototype),o},b.apply(null,arguments)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function _(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}var x=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function E(e){var t="function"==typeof Map?new Map:void 0;return E=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return b(e,arguments,w(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),S(r,e)},E(e)}var O="/ws/rest/v1/session";function k(e){return window.openmrsBase+e}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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.");var n=k(e);t.headers||(t.headers={}),h(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;var r,i=Error();return window.fetch(n,t).then((r=g(o().mark((function e(t){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,y.getConfig)("@openmrs/esm-api");case 12:if(a=e.sent.redirectAuthFailure,!(n===k(O)&&403===r.status||a.enabled&&a.errors.includes(r.status))){e.next=18;break}return(0,y.navigate)({to:a.url}),e.abrupt("return",a.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new P(n,r,t,i)}),(function(e){throw new P(n,r,null,i)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}))}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new i.y((function(r){var o=!1;return j(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=w(t);if(n){var o=w(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function o(e,t,n,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),i.message=a.message,a.responseBody=n,a.response=t,a.stack="Stacktrace for outgoing request:\n".concat(i.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return o}(E(Error)),C="/ws/fhir2/R4",A=n(1256)({baseUrl:C},{http:function(e){return j(e.url,{method:e.method,headers:e.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:e}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:e}}))}}),I=n(7080),N=n(2585),R=n(1098),D=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return I.ZT(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}(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 I.ZT(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}(function(e){function t(t,n){return e.call(this)||this}return I.ZT(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(R.w))),L=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}(),M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I.ZT(t,e),t}(function(e){function t(n,r){void 0===r&&(r=L.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 I.ZT(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}(L)),U=new M(D),$=n(7811),F=new i.y((function(e){return e.complete()}));function B(e){return e?function(e){return new i.y((function(t){return e.schedule((function(){return t.complete()}))}))}(e):F}function z(e){return e&&"function"==typeof e.schedule}var V,W=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()}};function K(e,t){return new i.y((function(n){var r=new R.w,o=0;return r.add(t.schedule((function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}function q(e,t){return t?K(e,t):new i.y(W(e))}V||(V={});var H=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(){var e;switch(this.kind){case"N":return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return z(n)?(e.pop(),K(e,n)):q(e)}(this.value);case"E":return e=this.error,new i.y((function(t){return t.error(e)}));case"C":return B()}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}(),Z=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 I.ZT(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 G(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(H.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(H.createError(e)),this.unsubscribe()},t.prototype._complete=function(){this.scheduleMessage(H.createComplete()),this.unsubscribe()},t}($.L),G=function(){return function(e,t){this.notification=e,this.destination=t}}(),Q=n(7043),Y=n(6362),J=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 I.ZT(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 X(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 Q.N;if(this.isStopped||this.hasError?t=R.w.EMPTY:(this.observers.push(e),t=new Y.W(this,e)),o&&e.add(e=new Z(e,o)),n)for(var a=0;a<i&&!e.closed;a++)e.next(r[a]);else for(a=0;a<i&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||U).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}(N.xQ),X=function(){return function(e,t){this.time=e,this.value=t}}();function ee(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 te(e,t))}}var te=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new ne(e,this.project,this.thisArg))},e}(),ne=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 I.ZT(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}($.L),re=n(1450);function oe(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var ie=oe(),ae=n(4002),ue=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function se(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var ce=n(1167),le=function(e){if(e&&"function"==typeof e[ae.L])return r=e,function(e){var t=r[ae.L]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(ue(e))return W(e);if(se(e))return n=e,function(e){return n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,re.z),e};if(e&&"function"==typeof e[ie])return t=e,function(e){for(var n=t[ie]();;){var r=void 0;try{r=n.next()}catch(t){return e.error(t),e}if(r.done){e.complete();break}if(e.next(r.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e};var t,n,r,o=(0,ce.K)(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+o+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};var fe=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,n}return I.ZT(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}($.L),pe=($.L,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I.ZT(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}($.L));function de(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(de((function(n,r){return(o=e(n,r),o instanceof i.y?o:new i.y(le(o))).pipe(ee((function(e,o){return t(n,e,r,o)})));var o}),n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new he(e,n))})}$.L;var he=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 ye(e,this.project,this.concurrent))},e}(),ye=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 I.ZT(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 fe(this),n=this.destination;n.add(t);var r=function(e,t){if(!t.closed){if(e instanceof i.y)return e.subscribe(t);var n;try{n=le(e)(t)}catch(e){t.error(e)}return n}}(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}(pe),ve=n(7430);function ge(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),de(ve.y,e)}function me(){}var be=n(9147);function we(e,t,n){return function(r){return r.lift(new _e(e,t,n))}}var _e=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 Se(e,this.nextOrObserver,this.error,this.complete))},e}(),Se=function(e){function t(t,n,r,o){var i=e.call(this,t)||this;return i._tapNext=me,i._tapError=me,i._tapComplete=me,i._tapError=r||me,i._tapComplete=o||me,(0,be.m)(n)?(i._context=i,i._tapNext=n):n&&(i._context=n,i._tapNext=n.next||me,i._tapError=n.error||me,i._tapComplete=n.complete||me),i}return I.ZT(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}($.L);function xe(e,t){return function(n){return n.lift(new Ee(e,t))}}var Ee=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Oe(e,this.predicate,this.thisArg))},e}(),Oe=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 I.ZT(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}($.L);function ke(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function je(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ke(i,r,o,a,u,"next",e)}function u(e){ke(i,r,o,a,u,"throw",e)}a(void 0)}))}}var Te=new J(1),Pe=0;function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!1};return Pe<Date.now()-6e4&&Ie(),Te.asObservable().pipe(ge(),we(Ae),ee((function(t){return e.includeAuthStatus?t:t.user})),xe(Boolean))}function Ae(e){var t,n,r,o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale;o!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",o)}function Ie(){Pe=Date.now(),Te.next(j(O).then((function(e){return"object"==typeof e.data?e.data:Promise.reject()})).catch((function(){return{sessionId:"",authenticated:!1}})))}function Ne(e,t){return function(e,t){return t.privileges.find((function(t){return e===t.display}))}(e,t)||function(e){return e.roles.find((function(e){return"System Developer"===e.display}))}(t)}function Re(){return new Promise((function(e,t){var n=Ce().subscribe((function(t){e(t),n.unsubscribe()}),t)}))}function De(){return new Promise((function(e,t){var n=Ce({includeAuthStatus:!0}).subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))}function Le(e,t){return Me.apply(this,arguments)}function Me(){return(Me=je(o().mark((function e(t,n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(O,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:Ie();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e,t){return e?A.read(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ue(e,t,n[t])}))}return e}({type:"Patient",patient:e},t)):Promise.resolve(null)}var Fe=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return I.ZT(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 Q.N;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(N.xQ),Be=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}();function ze(e){return function(t){return 0===e?B():t.lift(new Ve(e))}}var Ve=function(){function e(e){if(this.total=e,this.total<0)throw new Be}return e.prototype.call=function(e,t){return t.subscribe(new We(e,this.total))},e}(),We=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return I.ZT(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}($.L),Ke="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,value),location:(uuid,name,display),startDatetime,stopDatetime)";function qe(e,t,n){var r=null!=n?n:Ke;return T("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(ze(1)).pipe(ee((function(e){return e})))}function He(e,t){return T("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function Ze(e,t,n){return T("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}var Ge,Qe,Ye=new Fe(null);function Je(e){return{uuid:e.uuid,display:e.display,name:e.name}}function Xe(){return T("/ws/rest/v1/visittype").pipe(ee((function(e){return e.data.results.map(Je)}))).pipe(ze(1))}function et(e){return{uuid:e.uuid,display:e.display}}function tt(){return T("/ws/rest/v1/location").pipe(ee((function(e){return e.data.results.map(et)}))).pipe(ze(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Ge||(Ge={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Qe||(Qe={}));var nt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}},6066:()=>{function e(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore}],execute:function(){t(function(){var t={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:function(e){"use strict";e.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.y=n,i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}();var a={};return(0,i(968).s)(1),function(){"use strict";var t=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(e){return e&&e.sensitive?"":"i"},r=function(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},o=function(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},u=function(t){return n=t.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):e(n,r))?t.matcher:"string"==typeof t.matcher?h(t.matcher):h(t.path);var n,r},s=function(e){return c([e])},c=function(e){var t=l(),n=e.map((function(e){return{matcher:u(e),settings:e}})),r=o(t).concat(o(n));y.setState(r,!0)},l=function(){return y.getState()},f=function(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},p=function(e,t){if(e.length>0){var n=v(e,t);if(n){for(var r=[n],o=v(e,n.settings.parent);void 0!==o;)r.push(o),o=v(e,o.settings.parent);return r.reverse()}}return[]},d=function(e){return p(l(),e)};function h(r,o,i){return e(r,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}(r,o):Array.isArray(r)?(s=o,c=i,l=r.map((function(e){return h(e,s,c).source})),new RegExp("(?:"+l.join("|")+")",n(c))):(a=o,function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,s=void 0===u||u,c=o.end,l=void 0===c||c,f=o.encode,p=void 0===f?function(e){return e}:f,d="["+t(o.endsWith||"")+"]|$",h="["+t(o.delimiter||"/#?")+"]",y=s?"^":"",v=0,g=e;v<g.length;v++){var m=g[v];if("string"==typeof m)y+=t(p(m));else{var b=t(p(m.prefix)),w=t(p(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";y+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else y+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else y+="("+m.pattern+")"+m.modifier;else y+="(?:"+b+w+")"+m.modifier}}if(l)a||(y+=h+"?"),y+=o.endsWith?"(?="+d+")":"$";else{var S=e[e.length-1],x="string"==typeof S?h.indexOf(S[S.length-1])>-1:void 0===S;a||(y+="(?:"+h+"(?="+d+"))?"),x||(y+="(?="+h+"|"+d+")")}return new RegExp(y,n(o))}(function(e,n){void 0===n&&(n={});for(var r=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[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];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=u}else{for(var a="",u=n+1;u<e.length;){var s=e.charCodeAt(u);if(!(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||95===s))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}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=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",u=[],s=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},d=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var g=h||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(u.push(l),l=""),u.push({name:y||s++,prefix:g,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var m=h||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(u.push(l),l=""),f("OPEN")){g=d();var b=f("NAME")||"",w=f("PATTERN")||"",_=d();p("CLOSE"),u.push({name:b||(w?s++:""),pattern:b&&!w?a:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else p("END")}}return u}(r,u=i),a,u));var a,u,s,c,l}i.r(a),i.d(a,{filterBreadcrumbs:function(){return p},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return d},registerBreadcrumb:function(){return s},registerBreadcrumbs:function(){return c}});var y=(0,i(685).createGlobalStore)("breadcrumbs",[]);function v(e,t){if(t)return n=t,(r=e.filter((function(e){return e.matcher.test(n)})),function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return f(e,1);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,1):void 0}}(r)||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.")}())[0]||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=v(e,n.join("/"));if(r)return r}}(e,t);var n,r}}(),a}())}}}))},9714:()=>{var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},s=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return ce(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},f=function(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)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](be(e["@@transducer/step"],e),t))},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},h=function(e,t){return function(n){if(!e(n))return t}},y=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},v=function(e){return(0,Ae.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},g=function(){return(0,Ae.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return b(g().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Ae.getGlobalStore)("config-extensions",{configs:{}})},_=function(e,t){return S(w().getState(),e,t)},S=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(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},E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},O=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){E(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||T(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.")}()},j=function(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},T=function(e,t){if(e){if("string"==typeof e)return x(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}},P=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=B(u,e,t);v(u).setState({loaded:!0,config:s})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},C=function(e,t){var n,r,o=(n=V(F(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=k(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(s)[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=k(p.value,2),y=h[0];$(h[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return O({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=k(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=g(),u=a.getState(),s={slots:O({},u.slots,i)};le(u,s)||a.setState(s)},A=function(e,t){var n=function(e,t){var n=Ue(he(e.schemas)),r=j(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=k(u.value,2);n=V([n,$e(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);Me.setState({config:n})},I=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=U(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=O({},r[c.slotName],E({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}w().setState({configs:r})},N=function(e,t){Fe(e,t);var n=Ne.getState();Ne.setState({schemas:O({},n.schemas,E({},e,t))})},R=function(e,t){Fe(e,t);var n=Ne.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ne.setState({schemas:O({},n.schemas,E({},e,t))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ne.getState();Ne.setState({providedConfigs:j(n.providedConfigs).concat([{source:t,config:e}])})},L=function(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=v(e);n(r.getState());var o=r.subscribe(n)}))},M=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Be(e,t,n);var o=ze(e,t,r);return o},U=function(e,t,n,r,o,i){var a,u,s,c,l=k(r.split("#"),1)[0],f=o.schemas[l],p=f?l:t,d=F(o,i),h=z(e,d),y=null!==(c=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=V([z(p,d),y]),g=null!=f?f:o.schemas[t];Be(g,v,p);var m=ze(g,v,o.devDefaultsAreOn);return delete m.extensionSlots,m},$=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(G(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},F=function(e,t){return j(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},B=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=z(e,F(t,n));Be(r,o,e);var i=ze(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i},z=function(e,t){return V(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},V=function(e){return _e(Ee)({},e)},W=function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];Be(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}},K=function(e,t,n){if(Z(e._elements))for(var r=0;r<t.length;r++)Be(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i,a;q("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o]),H("".concat(n,"[").concat(o,"]"),null===(a=e._elements)||void 0===a?void 0:a._validators,t[o])}},q=function(e,t,n){t&&H(e,[{Array:Oe,Boolean:ke,ConceptUuid:Ce,Number:je,Object:Pe,String:Te,UUID:Ce,PersonAttributeTypeUuid:Ce,PatientIdentifierTypeUuid:Ce}[t]],n)},H=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);if("string"==typeof s){var c="object"==typeof n?JSON.stringify(n):n;console.error("Invalid configuration value ".concat(c," for ").concat(e,": ").concat(s))}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'".'))}},Z=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},G=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},Q=function(e){var t=window.getOpenmrsSpaBase().replace(/\/$/,"");return Y(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")},Y=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},J=function(e){var t=e.to,n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=Q(t);r.startsWith(n)?(0,Ve.navigateToUrl)(r):window.location.assign(r)};i.r(a),i.d(a,{Type:function(){return pe},configExtensionStore:function(){return Le},configInternalStore:function(){return Ne},defineConfigSchema:function(){return N},defineExtensionConfigSchema:function(){return R},getConfig:function(){return L},getConfigStore:function(){return v},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Me},inRange:function(){return We},interpolateString:function(){return Y},interpolateUrl:function(){return Q},isUrl:function(){return qe},isUrlWithTemplateParameters:function(){return Ke},navigate:function(){return J},processConfig:function(){return M},provide:function(){return D},temporaryConfigStore:function(){return De},validator:function(){return h},validators:function(){return He}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return s("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!s(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)s(t=oe[n],e)&&!ae(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),se=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function ce(t,n,r,o){if(X(t,n))return!0;var i,a,u=se(t);if(u!==se(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(u){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));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 f=ue(t);if(f.length!==ue(n).length)return!1;var p=r.concat([t]),d=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!s(h,n)||!ce(n[h],t[h],p,d))return!1;l-=1}return!0}var le=r((function(e,t){return ce(e,t,[],[])}));function fe(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?fe(e[u],t,n,!0):e[u];return o};switch(se(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var pe,de,he=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():fe(e,[],[],!0)})),ye=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},ve=n((function(e){return!!ye(e)||!!e&&"object"==typeof e&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),ge=function(){var e=function(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}(),me=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,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)}))})),be=me,we="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",_e=l((function(e,t,n){if("function"==typeof e&&(e=new ge(e)),ve(n))return 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)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return p(e,t,n,"fantasy-land/reduce");if(null!=n[we])return f(e,t,n[we]());if("function"==typeof n.next)return f(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),Se=l((function(e,t,n){var r,o={};for(r in t)s(r,t)&&(o[r]=s(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)s(r,n)&&!s(r,o)&&(o[r]=n[r]);return o})),xe=l((function e(t,n,r){return Se((function(n,r,o){return d(r)&&d(o)?e(t,r,o):t(n,r,o)}),n,r)})),Ee=r((function(e,t){return xe((function(e,t,n){return n}),e,t)}));(de=pe||(pe={})).Array="Array",de.Boolean="Boolean",de.ConceptUuid="ConceptUuid",de.Number="Number",de.Object="Object",de.String="String",de.UUID="UUID",de.PersonAttributeTypeUuid="PersonAttributeTypeUuid",de.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Oe=h((function(e){return Array.isArray(e)}),"must be an array"),ke=h((function(e){return"boolean"==typeof e}),"must be a boolean"),je=h((function(e){return"number"==typeof e}),"must be a number"),Te=h((function(e){return"string"==typeof e}),"must be a string"),Pe=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ce=h((function(e){return/^[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"),Ae=i(685),Ie={providedConfigs:[],schemas:{},devDefaultsAreOn:y()},Ne=(0,Ae.createGlobalStore)("config-internal",Ie),Re=y();Ne.subscribe((function(e){var t;e.devDefaultsAreOn!=Re&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),Re=e.devDefaultsAreOn)}));var De=(0,Ae.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Le=(0,Ae.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Me=(0,Ae.createGlobalStore)("config-implementer-tools",{config:{}});function Ue(e){return e.hasOwnProperty("_default")?O({},e,{_value:e._default,_source:"default"}):G(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ue(e[n]),t}),{}):{}}function $e(e,t){return G(e)?Object.keys(e).reduce((function(n,r){return n[r]=$e(e[r],t),n}),{}):{_value:e,_source:t}}function Fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var u,s=function(o,i){var a=i.value,u=n+(n&&".")+a,s=t[a];if(!G(s))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";s.hasOwnProperty("_default")||Fe(e,s,u);var c=s._elements;if(Z(c)&&Fe(e,c,u+"._elements"),s._validators){var l=!0,f=!1,p=void 0;try{for(var d,h=s._validators[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var y=d.value;"function"!=typeof y&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(y,"."))}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}var v=s._type;v&&!Object.values(pe).includes(v)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(pe).join(", "),". ")+"Received '".concat(v,"'")),Object.keys(s).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(s))),c&&v&&![pe.Array,pe.Object].includes(v)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(v)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(c,u)}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}P(Ne.getState(),De.getState()),Ne.subscribe((function(e){return P(e,De.getState())})),De.subscribe((function(e){return P(Ne.getState(),e)})),A(Ne.getState(),De.getState()),Ne.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Ne.getState(),e)})),C(Ne.getState(),De.getState()),Ne.subscribe((function(e){return C(e,De.getState())})),De.subscribe((function(e){return C(Ne.getState(),e)})),I(Ne.getState(),Le.getState(),De.getState()),Ne.subscribe((function(e){I(e,Le.getState(),De.getState())})),Le.subscribe((function(e){I(Ne.getState(),e,De.getState())})),De.subscribe((function(e){I(Ne.getState(),Le.getState(),e)}));var Be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s],l=n+"."+s,f=e[s];e.hasOwnProperty(s)?(q(l,f._type,c),H(l,f._validators,c),G(c)?f._type===pe.Object?W(f,c,l):f.hasOwnProperty("_default")||Be(f,c,l):f._type===pe.Array&&K(f,c,l)):"extensionSlots"!==s&&console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},ze=function(e,t,n){var r=he(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,s=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var s=u._devDefault||u._default;r[i]=n?s:u._default}var c=u._elements;if(a&&Z(c))if(u._type===pe.Array){var l=a.map((function(e){return ze(c,e,n)}));r[i]=l}else if(u._type===pe.Object){var f=!0,p=!1,d=void 0;try{for(var h,y=Object.keys(a)[Symbol.iterator]();!(f=(h=y.next()).done);f=!0){var v=h.value;a[v]=ze(c,a[v],n)}}catch(e){p=!0,d=e}finally{try{f||null==y.return||y.return()}finally{if(p)throw d}}}}else if(G(u)){var g=r.hasOwnProperty(i)?a:{};G(g)&&(r[i]=ze(u,g,n))}},c=Object.keys(e)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0)s(0,u)}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return r},Ve=i(645),We=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ke=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);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((function(e){return"${"+e+"}"})).join(", "))},qe=Ke([]),He={inRange:We,isUrl:qe,isUrlWithTemplateParameters:Ke}}(),a}())}}}))},3373:(e,t,n)=>{"use strict";n.d(t,{JU:()=>o.ConfigStore,Dy:()=>r,SH:()=>xe,Tj:()=>Ee,iE:()=>ke,pR:()=>ce,Z2:()=>l,IT:()=>a,ll:()=>i,CB:()=>p,gZ:()=>f,c4:()=>s,JJ:()=>Oe,sC:()=>c,z2:()=>d});var r,o={};function i(e){var t=window.getOpenmrsSpaBase().replace(/\/$/,"");return a(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:t}).replace(/^\/\//,"/")}function a(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)}n.r(o),n.d(o,{R2:()=>se,hv:()=>oe,pR:()=>ce,Gr:()=>le,_z:()=>fe,HN:()=>pe,DK:()=>ue}),function(e){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"}(r||(r={}));var u=n(3710);function s(e){var t=e.to,n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=i(t);r.startsWith(n)?(0,u.UO)(r):window.location.assign(r)}function c(e,t){return function(n){if(!e(n))return t}}var l=function(e,t){return c((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},f=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return c((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);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((function(e){return"${"+e+"}"})).join(", "))},p=f([]),d={inRange:l,isUrl:p,isUrlWithTemplateParameters:f};function h(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function y(e){return function t(n){return 0===arguments.length||h(n)?t:e.apply(this,arguments)}}function v(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return h(n)?t:y((function(t){return e(n,t)}));default:return h(n)&&h(r)?t:h(n)?y((function(t){return e(t,r)})):h(r)?y((function(t){return e(n,t)})):e(n,r)}}}function g(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function m(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function b(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const w="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var _=Object.prototype.toString,S=function(){return"[object Arguments]"===_.call(arguments)?function(e){return"[object Arguments]"===_.call(e)}:function(e){return b("callee",e)}}();const x=S;var E=!{toString:null}.propertyIsEnumerable("toString"),O=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=function(){return arguments.propertyIsEnumerable("length")}(),j=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const T="function"!=typeof Object.keys||k?y((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=k&&x(e);for(t in e)!b(t,e)||o&&"length"===t||(r[r.length]=t);if(E)for(n=O.length-1;n>=0;)b(t=O[n],e)&&!j(r,t)&&(r[r.length]=t),n-=1;return r})):y((function(e){return Object(e)!==e?[]:Object.keys(e)})),P=y((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e,t,n,r){var o=g(e);function i(e,t){return A(e,t,n.slice(),r.slice())}return!m((function(e,t){return!m(i,t,e)}),g(t),o)}function A(e,t,n,r){if(w(e,t))return!0;var o,i,a=P(e);if(a!==P(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(i=String(o).match(/^function (\w*)/))?"":i[1]))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!w(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!w(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 u=n.length-1;u>=0;){if(n[u]===e)return r[u]===t;u-=1}switch(a){case"Map":return e.size===t.size&&C(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&C(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 s=T(e);if(s.length!==T(t).length)return!1;var c=n.concat([e]),l=r.concat([t]);for(u=s.length-1;u>=0;){var f=s[u];if(!b(f,t)||!A(t[f],e[f],c,l))return!1;u-=1}return!0}const I=v((function(e,t){return A(e,t,[],[])}));function N(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var u in t[a+1]=e,n[a+1]=o,e)o[u]=r?N(e[u],t,n,!0):e[u];return o};switch(P(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const R=y((function(e){return null!=e&&"function"==typeof e.clone?e.clone():N(e,[],[],!0)}));function D(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return h(n)?t:v((function(t,r){return e(n,t,r)}));case 2:return h(n)&&h(r)?t:h(n)?v((function(t,n){return e(t,r,n)})):h(r)?v((function(t,r){return e(n,t,r)})):y((function(t){return e(n,r,t)}));default:return h(n)&&h(r)&&h(o)?t:h(n)&&h(r)?v((function(t,n){return e(t,n,o)})):h(n)&&h(o)?v((function(t,n){return e(t,r,n)})):h(r)&&h(o)?v((function(t,r){return e(n,t,r)})):h(n)?y((function(t){return e(t,r,o)})):h(r)?y((function(t){return e(n,t,o)})):h(o)?y((function(t){return e(n,r,t)})):e(n,r,o)}}}const L=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},M=y((function(e){return!!L(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));var U=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}(),$=v((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,s,c,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 F=$;function B(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function z(e,t,n,r){return e["@@transducer/result"](n[r](F(e["@@transducer/step"],e),t))}var V="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function W(e,t,n){if("function"==typeof e&&(e=function(e){return new U(e)}(e)),M(n))return 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)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return z(e,t,n,"fantasy-land/reduce");if(null!=n[V])return B(e,t,n[V]());if("function"==typeof n.next)return B(e,t,n);if("function"==typeof n.reduce)return z(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const K=D(W);function q(e){return"[object Object]"===Object.prototype.toString.call(e)}const H=D((function(e,t,n){var r,o={};for(r in t)b(r,t)&&(o[r]=b(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)b(r,n)&&!b(r,o)&&(o[r]=n[r]);return o})),Z=D((function e(t,n,r){return H((function(n,r,o){return q(r)&&q(o)?e(t,r,o):t(n,r,o)}),n,r)})),G=v((function(e,t){return Z((function(e,t,n){return n}),e,t)}));var Q=c((function(e){return Array.isArray(e)}),"must be an array"),Y=c((function(e){return"boolean"==typeof e}),"must be a boolean"),J=c((function(e){return"number"==typeof e}),"must be a number"),X=c((function(e){return"string"==typeof e}),"must be a string"),ee=c((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),te=c((function(e){return/^[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"),ne=n(5385),re={providedConfigs:[],schemas:{},devDefaultsAreOn:ae()},oe=(0,ne.createGlobalStore)("config-internal",re),ie=ae();function ae(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}}oe.subscribe((function(e){var t;e.devDefaultsAreOn!=ie&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),ie=e.devDefaultsAreOn)}));var ue=(0,ne.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});ue.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var se=(0,ne.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ce(e){return(0,ne.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})}function le(){return(0,ne.getGlobalStore)("config-extension-slots",{slots:{}})}function fe(){return(0,ne.getGlobalStore)("config-extensions",{configs:{}})}var pe=(0,ne.createGlobalStore)("config-implementer-tools",{config:{}});function de(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 he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){he(e,t,n[t])}))}return e}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||me(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 ge(e){return function(e){if(Array.isArray(e))return de(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||me(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e,t){if(e){if("string"==typeof e)return de(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(e,t):void 0}}function be(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=Ne(u,e,t);ce(u).setState({loaded:!0,config:s})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function we(e,t){var n,r,o=(n=De(Ae(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=ve(o.value,2),u=a[0],s=a[1],c=!0,l=!1,f=void 0;try{for(var p,d=Object.entries(s)[Symbol.iterator]();!(c=(p=d.next()).done);c=!0){var h=ve(p.value,2),y=h[0];Ce(h[1],u,y)}}catch(e){l=!0,f=e}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return ye({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=ve(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=le(),u=a.getState(),s={slots:ye({},u.slots,i)};I(u,s)||a.setState(s)}function _e(e,t){var n=function(e,t){var n=Te(R(e.schemas)),r=ge(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var u,s=r[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=ve(u.value,2);n=De([n,Pe(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t);pe.setState({config:n})}function Se(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=t.mountedExtensions[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=je(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=ye({},r[c.slotName],he({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}fe().setState({configs:r})}function xe(e,t){Ie(e,t);var n=oe.getState();oe.setState({schemas:ye({},n.schemas,he({},e,t))})}function Ee(e,t){Ie(e,t);var n=oe.getState();n.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),oe.setState({schemas:ye({},n.schemas,he({},e,t))})}function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=oe.getState();oe.setState({providedConfigs:ge(n.providedConfigs).concat([{source:t,config:e}])})}function ke(e){return new Promise((function(t){var n=function(e){e.loaded&&e.config&&(t(e.config),o&&o())},r=ce(e);n(r.getState());var o=r.subscribe(n)}))}function je(e,t,n,r,o,i){var a,u,s,c,l=function(e){return ve(e.split("#"),1)[0]}(r),f=o.schemas[l],p=f?l:t,d=Ae(o,i),h=Re(e,d),y=null!==(c=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(s=u.configure)||void 0===s?void 0:s[r])&&void 0!==c?c:{},v=De([Re(p,d),y]),g=null!=f?f:o.schemas[t];Le(g,v,p);var m=Be(g,v,o.devDefaultsAreOn);return delete m.extensionSlots,m}function Te(e){return e.hasOwnProperty("_default")?ye({},e,{_value:e._default,_source:"default"}):Ve(e)?Object.keys(e).reduce((function(t,n){return t[n]=Te(e[n]),t}),{}):{}}function Pe(e,t){return Ve(e)?Object.keys(e).reduce((function(n,r){return n[r]=Pe(e[r],t),n}),{}):{_value:e,_source:t}}function Ce(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Ve(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Ae(e,t){return ge(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])}function Ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o="Please verify that you are running the latest version and, if so, alert the maintainer.",i=!0,a=!1,u=void 0;try{for(var s,c=function(i,a){var u=a.value,s=n+(n&&".")+u,c=t[u];if(!Ve(c))return console.error("".concat(e," has bad config schema definition for key '").concat(s,"'. ").concat(o)),"continue";c.hasOwnProperty("_default")||Ie(e,c,s);var l=c._elements;if(ze(l)&&Ie(e,l,s+"._elements"),c._validators){var f=!0,p=!1,d=void 0;try{for(var h,y=c._validators[Symbol.iterator]();!(f=(h=y.next()).done);f=!0){var v=h.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(s,"' ").concat(o,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){p=!0,d=e}finally{try{f||null==y.return||y.return()}finally{if(p)throw d}}}var g=c._type;g&&!Object.values(r).includes(g)&&console.error("".concat(e," has invalid type for key '").concat(s,"' ").concat(o,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(r).join(", "),". ")+"Received '".concat(g,"'")),Object.keys(c).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(s,"'. ").concat(o,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),l&&g&&![r.Array,r.Object].includes(g)&&console.error("".concat(e," has bad config schema definition for key '").concat(s,"'. ").concat(o,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(g)))},l=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(i=(s=l.next()).done);i=!0)c(l,s)}catch(e){a=!0,u=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw u}}}function Ne(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=Re(e,Ae(t,n));Le(r,o,e);var i=Be(r,o,t.devDefaultsAreOn);return delete i.extensionSlots,i}function Re(e,t){return De(t.map((function(t){return t[e]})).filter((function(e){return!!e})))}function De(e){return K(G)({},e)}be(oe.getState(),ue.getState()),oe.subscribe((function(e){return be(e,ue.getState())})),ue.subscribe((function(e){return be(oe.getState(),e)})),_e(oe.getState(),ue.getState()),oe.subscribe((function(e){return _e(e,ue.getState())})),ue.subscribe((function(e){return _e(oe.getState(),e)})),we(oe.getState(),ue.getState()),oe.subscribe((function(e){return we(e,ue.getState())})),ue.subscribe((function(e){return we(oe.getState(),e)})),Se(oe.getState(),se.getState(),ue.getState()),oe.subscribe((function(e){Se(e,se.getState(),ue.getState())})),se.subscribe((function(e){Se(oe.getState(),e,ue.getState())})),ue.subscribe((function(e){Se(oe.getState(),se.getState(),e)}));var Le=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=!0,i=!1,a=void 0;try{for(var u,s=Object.keys(t)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=u.value,l=t[c],f=n+"."+c,p=e[c];e.hasOwnProperty(c)?($e(f,p._type,l),Fe(f,p._validators,l),Ve(l)?p._type===r.Object?Me(p,l,f):p.hasOwnProperty("_default")||Le(p,l,f):p._type===r.Array&&Ue(p,l,f)):"extensionSlots"!==c&&console.error("Unknown config key '".concat(f,"' provided. Ignoring."))}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}};function Me(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=a.value,c=t[s];Le(e._elements,c,"".concat(n,".").concat(s))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}function Ue(e,t,n){if(ze(e._elements))for(var r=0;r<t.length;r++)Le(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i,a;$e("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o]),Fe("".concat(n,"[").concat(o,"]"),null===(a=e._elements)||void 0===a?void 0:a._validators,t[o])}}function $e(e,t,n){t&&Fe(e,[{Array:Q,Boolean:Y,ConceptUuid:te,Number:J,Object:ee,String:X,UUID:te,PersonAttributeTypeUuid:te,PatientIdentifierTypeUuid:te}[t]],n)}function Fe(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=(0,a.value)(n);if("string"==typeof s){var c="object"==typeof n?JSON.stringify(n):n;console.error("Invalid configuration value ".concat(c," for ").concat(e,": ").concat(s))}}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'".'))}}var Be=function(e,t,n){var o=R(t);if(!e)return o;var i=!0,a=!1,u=void 0;try{for(var s,c=function(t,i){var a=i.value,u=o[a],s=e[a];if(s&&s.hasOwnProperty("_default")){if(!o.hasOwnProperty(a)){var c=s._devDefault||s._default;o[a]=n?c:s._default}var l=s._elements;if(u&&ze(l))if(s._type===r.Array){var f=u.map((function(e){return Be(l,e,n)}));o[a]=f}else if(s._type===r.Object){var p=!0,d=!1,h=void 0;try{for(var y,v=Object.keys(u)[Symbol.iterator]();!(p=(y=v.next()).done);p=!0){var g=y.value;u[g]=Be(l,u[g],n)}}catch(e){d=!0,h=e}finally{try{p||null==v.return||v.return()}finally{if(d)throw h}}}}else if(Ve(s)){var m=o.hasOwnProperty(a)?u:{};Ve(m)&&(o[a]=Be(s,m,n))}},l=Object.keys(e)[Symbol.iterator]();!(i=(s=l.next()).done);i=!0)c(0,s)}catch(e){a=!0,u=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw u}}return o};function ze(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0}function Ve(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}},674:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:function(e){"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}();var i={};return(0,o(968).s)(1),function(){"use strict";var e=function(e){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return t},reportError:function(){return e}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},225:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-config","@openmrs/esm-state","single-spa"],(function(i,a){var u={},s={},c={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){s.createGlobalStore=e.createGlobalStore,s.getGlobalStore=e.getGlobalStore},function(e){c.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=u},685:function(e){"use strict";e.exports=s},645:function(e){"use strict";e.exports=c}},l={};function f(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,f),n.exports}f.y=a,f.d=function(e,t){for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e}();var p={};return(0,f(968).s)(1),function(){"use strict";var i=function(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])}},a=function(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])}},u=function(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=function(e){var t=this.__data__=new K(e);this.size=t.size},c=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Se;++t<n;)this.add(e[t])},l=function(e){var t=Dt.getState(),n=e(t);n!==t&&Dt.setState(n)},d=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,s=!0,c=!1,l=void 0;try{for(var f,p=u.instances[Symbol.iterator]();!(s=(f=p.next()).done);s=!0){var d=f.value;t.push({slotModuleName:d.slotModuleName,extensionModuleName:u.moduleName,slotName:d.slotName,extensionId:d.id})}}catch(e){c=!0,l=e}finally{try{s||null==p.return||p.return()}finally{if(c)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}It(Nt.configExtensionStore.getState().mountedExtensions,t)||Nt.configExtensionStore.setState({mountedExtensions:t})},h=function(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},y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},v=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},g=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(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.")}()},m=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,s=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var c=g(u.value,2),l=c[0],f=c[1],p=C(l,e,(0,Nt.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:p}}}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}It($t.getState().slots,r)||$t.setState({slots:r})},_=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},S=function(e){return g(e.split("#"),1)[0]},x=function(e,t){var n=S(t);return e.extensions[n]},E=function(e){return x(Ut.getState(),e)},O=function(e,t){l((function(n){var r=n.slots[e];return v({},n,r?{slots:v({},n.slots,y({},e,v({},r,{attachedIds:m(r.attachedIds).concat([t])})))}:{slots:v({},n.slots,y({},e,v({},_(e),{attachedIds:[t]})))})}))},k=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?v({},n,{slots:v({},n.slots,y({},e,v({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},j=function(e){l((function(t){var n=t.slots[e];return n?v({},t,{slots:v({},t.slots,y({},e,v({},n,{attachedIds:[]})))}):t}))},T=function(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return N(n,e.online,e.offline)}))},C=function(e,t,n,r){var o,i,a,u,s,c,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],s=o.order||[],c=Ut.getState().extensions,m(i).concat(m(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=T(e,s,null===(n=c[S(e)])||void 0===n?void 0:n.order,i),a=T(t,s,null===(r=c[S(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],p=!0,d=!1,h=void 0;try{for(var y,v=l[Symbol.iterator]();!(p=(y=v.next()).done);p=!0){var g=y.value,b=(0,Nt.getExtensionConfigFromStore)(r,e,g).config,w=S(g),_=t.extensions[w];f.push({id:g,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}catch(e){d=!0,h=e}finally{try{p||null==v.return||v.return()}finally{if(d)throw h}}return f},A=function(e){return C(e,Ut.getState(),(0,Nt.getExtensionSlotConfig)(e).config,Bt.getState())},I=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return N(n,e,t)},N=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},R=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},D=function(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},L=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},M=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){L(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},U=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},$=function(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return D(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},F=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=S(r),u=E(r),s=!0,c=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var f=u.load,p=u.online,d=u.offline,h=u.meta,y=u.moduleName;I(p,d)&&(f().then((function(a){var u=a.default,l=U(a,["default"]);s&&(c=(0,Kt.mountRootParcel)(o(null!=u?u:l),M({},R(p,d),i,{_meta:h,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:y},domElement:e})))})),l((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return M({},o,{extensions:M({},o.extensions,L({},a,M({},o.extensions[a],{instances:$(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return function(){s=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((function(){c&&c.unmount()})):c.unmount())}};f.r(p),f.d(p,{attach:function(){return O},checkStatus:function(){return I},checkStatusFor:function(){return N},detach:function(){return k},detachAll:function(){return j},extensionStore:function(){return qt},getAssignedExtensions:function(){return A},getConnectedExtensions:function(){return P},getCustomProps:function(){return R},getExtensionInternalStore:function(){return Lt},getExtensionNameFromId:function(){return S},getExtensionRegistration:function(){return E},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Mt},registerExtension:function(){return zt},registerExtensionSlot:function(){return Vt},renderExtension:function(){return F},reset:function(){return Wt},updateInternalExtensionStore:function(){return l}});var B=function(e,t){return e===t||e!=e&&t!=t},z=function(e,t){for(var n=e.length;n--;)if(B(e[n][0],t))return n;return-1},V=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=z(t,e);return!(n<0||(n==t.length-1?t.pop():V.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=z(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return z(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=z(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var W,K=i,q="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,H="object"==typeof self&&self&&self.Object===Object&&self,Z=q||H||Function("return this")(),G=Z.Symbol,Q=Object.prototype,Y=Q.hasOwnProperty,J=Q.toString,X=G?G.toStringTag:void 0,ee=Object.prototype.toString,te=G?G.toStringTag:void 0,ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?function(e){var t=Y.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=J.call(e);return r&&(t?e[X]=n:delete e[X]),o}(e):(t=e,ee.call(t));var t},re=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},oe=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ie=Z["__core-js_shared__"],ae=(W=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ue=Function.prototype.toString,se=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ce=/^\[object .+?Constructor\]$/,le=Function.prototype,fe=Object.prototype,pe=le.toString,de=fe.hasOwnProperty,he=RegExp("^"+pe.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ye=function(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!re(e)||(t=e,ae&&ae in t))&&(oe(e)?he:ce).test(se(e));var t}(r)?r:void 0},ve=ye(Z,"Map"),ge=ye(Object,"create"),me=Object.prototype.hasOwnProperty,be=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=ge?ge(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(ge){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return me.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return ge?void 0!==t[e]:be.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ge&&void 0===t?"__lodash_hash_undefined__":t,this};var we=a,_e=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ve||K),string:new we}},u.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return _e(this,e).get(e)},u.prototype.has=function(e){return _e(this,e).has(e)},u.prototype.set=function(e,t){var n=_e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Se=u;s.prototype.clear=function(){this.__data__=new K,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(r(n,K)){var o=n.__data__;if(!ve||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Se(o)}return n.set(e,t),this.size=n.size,this};var xe=s;c.prototype.add=c.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},c.prototype.has=function(e){return this.__data__.has(e)};var Ee=c,Oe=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},ke=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new Ee:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],y=t[f];if(r)var v=a?r(y,h,f,t,e,i):r(h,y,f,e,t,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!Oe(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p},je=Z.Uint8Array,Te=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Pe=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Ce=G?G.prototype:void 0,Ae=Ce?Ce.valueOf:void 0,Ie=Array.isArray,Ne=Object.prototype.propertyIsEnumerable,Re=Object.getOwnPropertySymbols,De=Re?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 a=e[n];t(a)&&(i[o++]=a)}return i}(Re(e),(function(t){return Ne.call(e,t)})))}:function(){return[]},Le=function(e){return null!=e&&"object"==typeof e},Me=function(e){return Le(e)&&"[object Arguments]"==ne(e)},Ue=Object.prototype,$e=Ue.hasOwnProperty,Fe=Ue.propertyIsEnumerable,Be=Me(function(){return arguments}())?Me:function(e){return Le(e)&&$e.call(e,"callee")&&!Fe.call(e,"callee")},ze=Be,Ve=t&&!t.nodeType&&t,We=Ve&&e&&!e.nodeType&&e,Ke=We&&We.exports===Ve?Z.Buffer:void 0,qe=(Ke?Ke.isBuffer:void 0)||function(){return!1},He=/^(?:0|[1-9]\d*)$/,Ze=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Qe,Ye,Je,Xe=t&&!t.nodeType&&t,et=Xe&&e&&!e.nodeType&&e,tt=et&&et.exports===Xe&&q.process,nt=function(){try{return et&&et.require&&et.require("util").types||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,ot=rt?(Qe=rt,function(e){return Qe(e)}):function(e){return Le(e)&&Ze(e.length)&&!!Ge[ne(e)]},it=Object.prototype.hasOwnProperty,at=Object.prototype,ut=(Ye=Object.keys,Je=Object,function(e){return Ye(Je(e))}),st=Object.prototype.hasOwnProperty,ct=function(e){return n=De,r=function(e){return null!=(t=e)&&Ze(t.length)&&!oe(t)?function(e,t){var n,r,i,a=Ie(e),u=!a&&ze(e),s=!a&&!u&&qe(e),c=!a&&!u&&!s&&ot(e),l=a||u||s||c,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],p=f.length;for(var d in e)!it.call(e,d)||l&&("length"==d||s&&("offset"==d||"parent"==d)||c&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||(r=p,i=void 0===(n=d)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&He.test(n))&&n>-1&&n%1==0&&n<r))||f.push(d);return f}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||at))return ut(e);var t,n,r=[];for(var o in Object(e))st.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}(t=e),Ie(t)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(t));var t,n,r},lt=Object.prototype.hasOwnProperty,ft=ye(Z,"DataView"),pt=ye(Z,"Promise"),dt=ye(Z,"Set"),ht=ye(Z,"WeakMap"),yt="[object Map]",vt="[object Promise]",gt="[object Set]",mt="[object WeakMap]",bt="[object DataView]",wt=se(ft),_t=se(ve),St=se(pt),xt=se(dt),Et=se(ht),Ot=ne;(ft&&Ot(new ft(new ArrayBuffer(1)))!=bt||ve&&Ot(new ve)!=yt||pt&&Ot(pt.resolve())!=vt||dt&&Ot(new dt)!=gt||ht&&Ot(new ht)!=mt)&&(Ot=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?se(n):"";if(r)switch(r){case wt:return bt;case _t:return yt;case St:return vt;case xt:return gt;case Et:return mt}return t});var kt=Ot,jt="[object Arguments]",Tt="[object Array]",Pt="[object Object]",Ct=Object.prototype.hasOwnProperty,At=function e(t,n,o,i,a){return t===n||(null==t||null==n||!Le(t)&&!Le(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Ie(e),s=Ie(t),c=u?Tt:kt(e),l=s?Tt:kt(t),f=(c=c==jt?Pt:c)==Pt,p=(l=l==jt?Pt:l)==Pt,d=c==l;if(d&&qe(e)){if(!qe(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new xe),u||ot(e)?ke(e,t,n,o,i,a):function(e,t,n,r,o,i,a){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 je(e),new je(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return B(+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 u=Te;case"[object Set]":var s=1&r;if(u||(u=Pe),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=ke(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Ae)return Ae.call(e)==Ae.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&Ct.call(e,"__wrapped__"),y=p&&Ct.call(t,"__wrapped__");if(h||y){var v=h?e.value():e,g=y?t.value():t;return a||(a=new xe),i(v,g,n,o,a)}}return!!d&&(a||(a=new xe),function(e,t,n,o,i,a){var u=1&n,s=ct(e),c=s.length;if(c!=ct(t).length&&!u)return!1;for(var l=c;l--;){var f=s[l];if(!(u?f in t:lt.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var y=u;++l<c;){var v=e[f=s[l]],g=t[f];if(o)var m=u?o(g,v,f,t,e,a):o(v,g,f,e,t,a);if(!(void 0===m?v===g||i(v,g,n,o,a):m)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},It=function(e,t){return At(e,t)},Nt=f(824),Rt=f(685),Dt=(0,Rt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Lt=function(){return(0,Rt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Mt=function(){return(0,Rt.getGlobalStore)("extensions",{slots:{}})};d(Dt.getState()),Dt.subscribe(d);var Ut=Lt(),$t=Mt(),Ft=(0,Nt.getExtensionSlotsConfigStore)(),Bt=(0,Nt.getExtensionsConfigStore)();Ut.subscribe((function(e){w(e,Ft.getState(),Bt.getState())})),Ft.subscribe((function(e){w(Ut.getState(),e,Bt.getState())})),Bt.subscribe((function(e){w(Ut.getState(),Ft.getState(),e)}));var zt=Ut.action((function(e,t){e.extensions[t.name]=v({},t,{instances:[]})})),Vt=Ut.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return v({},e,{slots:v({},e.slots,y({},n,v({},e.slots[n],{moduleName:t})))});var i=_(n,t);return v({},e,{slots:v({},e.slots,y({},n,i))})})),Wt=$t.action((function(){return{slots:{},extensions:{}}})),Kt=f(645),qt=Lt()}(),p}())}}}))},6856:(e,t,n)=>{"use strict";n.d(t,{pv:()=>r.AssignedExtension,x9:()=>o.CancelLoading,uP:()=>r.ConnectedExtension,uu:()=>r.ExtensionMeta,tj:()=>r.ExtensionRegistration,u_:()=>r.ExtensionSlotState,qN:()=>r.ExtensionStore,ub:()=>U,og:()=>$,lW:()=>F,h6:()=>W,Kq:()=>z,EB:()=>D,yw:()=>f,ix:()=>M,Qq:()=>K,H8:()=>S});var r={};n.r(r),n.d(r,{Co:()=>c,yw:()=>f,qO:()=>l});var o={};n.r(o),n.d(o,{H:()=>S});var i=n(9714),a=n(3202),u=n(5385),s=(0,u.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),c=function(){return(0,u.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function l(e){var t=s.getState(),n=e(t);n!==t&&s.setState(n)}var f=function(){return(0,u.getGlobalStore)("extensions",{slots:{}})};function p(e){var t=[],n=!0,r=!1,o=void 0;try{for(var u,s=Object.values(e.extensions)[Symbol.iterator]();!(n=(u=s.next()).done);n=!0){var c=u.value,l=!0,f=!1,p=void 0;try{for(var d,h=c.instances[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var y=d.value;t.push({slotModuleName:y.slotModuleName,extensionModuleName:c.moduleName,slotName:y.slotName,extensionId:y.id})}}catch(e){f=!0,p=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw p}}}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}(0,a.Z)(i.configExtensionStore.getState().mountedExtensions,t)||i.configExtensionStore.setState({mountedExtensions:t})}function d(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return h(n,e,t)}function h(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)}function y(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}}p(s.getState()),s.subscribe(p);var v=n(3710);function g(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 m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){m(e,t,n[t])}))}return e}function w(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return g(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=D(r),u=L(r),s=!0,c=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var f=u.load,p=u.online,h=u.offline,g=u.meta,S=u.moduleName;d(p,h)&&(f().then((function(a){var u=a.default,l=w(a,["default"]);s&&(c=(0,v.BP)(o(null!=u?u:l),b({},y(p,h),i,{_meta:g,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:S},domElement:e})))})),l((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return b({},o,{extensions:b({},o.extensions,m({},a,b({},o.extensions[a],{instances:_(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return function(){s=!1,c&&("MOUNTED"!==c.getStatus()?c.mountPromise.then((function(){c&&c.unmount()})):c.unmount())}}function x(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 E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||T(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 j(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"==typeof e)return x(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}c();var P=c(),C=f(),A=(0,i.getExtensionSlotsConfigStore)(),I=(0,i.getExtensionsConfigStore)();function N(e,t,n){var r={},o=!0,u=!1,s=void 0;try{for(var c,l=Object.entries(e.slots)[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var f=k(c.value,2),p=f[0],d=f[1],h=V(p,e,(0,i.getExtensionSlotConfigFromStore)(t,d.name).config,n);r[p]={moduleName:d.moduleName,assignedExtensions:h}}}catch(e){u=!0,s=e}finally{try{o||null==l.return||l.return()}finally{if(u)throw s}}(0,a.Z)(C.getState().slots,r)||C.setState({slots:r})}function R(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function D(e){return k(e.split("#"),1)[0]}function L(e){return function(e,t){var n=D(t);return e.extensions[n]}(P.getState(),e)}P.subscribe((function(e){N(e,A.getState(),I.getState())})),A.subscribe((function(e){N(P.getState(),e,I.getState())})),I.subscribe((function(e){N(P.getState(),A.getState(),e)}));var M=P.action((function(e,t){e.extensions[t.name]=O({},t,{instances:[]})}));function U(e,t){l((function(n){var r=n.slots[e];return O({},n,r?{slots:O({},n.slots,E({},e,O({},r,{attachedIds:j(r.attachedIds).concat([t])})))}:{slots:O({},n.slots,E({},e,O({},R(e),{attachedIds:[t]})))})}))}function $(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?O({},n,{slots:O({},n.slots,E({},e,O({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))}function F(e){l((function(t){var n=t.slots[e];return n?O({},t,{slots:O({},t.slots,E({},e,O({},n,{attachedIds:[]})))}):t}))}function B(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return h(n,e.online,e.offline)}))}function V(e,t,n,r){var o=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=P.getState().extensions;return j(t).concat(j(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,u=B(e,o,null===(r=i[D(e)])||void 0===r?void 0:r.order,t),s=B(n,o,null===(a=i[D(n)])||void 0===a?void 0:a.order,t);return-1===s?-1:-1===u?1:u-s}))}(n,t.slots[e].attachedIds),a=[],u=!0,s=!1,c=void 0;try{for(var l,f=o[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var p=l.value,d=(0,i.getExtensionConfigFromStore)(r,e,p).config,h=D(p),y=t.extensions[h];a.push({id:p,name:h,moduleName:y.moduleName,config:d,meta:y.meta,online:y.online,offline:y.offline})}}catch(e){s=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(s)throw c}}return a}function W(e){return V(e,P.getState(),(0,i.getExtensionSlotConfig)(e).config,I.getState())}var K=P.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return O({},e,{slots:O({},e.slots,E({},n,O({},e.slots[n],{moduleName:t})))});var i=R(n,t);return O({},e,{slots:O({},e.slots,E({},n,i))})}));C.action((function(){return{slots:{},extensions:{}}}))},3103:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(p,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(d,{detail:e}))},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(d,t),function(){return window.removeEventListener(d,t)}},u=function(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},l=function(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return u},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return s},subscribePrecacheStaticDependencies:function(){return a},subscribeToastShown:function(){return c}});var p="openmrs:connectivity-changed",d="openmrs:precache-static-dependencies",h="openmrs:notification-shown",y="openmrs:toast-shown"}(),o}())}}}))},2034:(e,t,n)=>{"use strict";n.d(t,{ac:()=>r.ConnectivityChangedEvent,hM:()=>r.PrecacheStaticDependenciesEvent,Kj:()=>r.ShowNotificationEvent,P3:()=>r.ShowToastEvent,BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>s,id:()=>p});var r={};n.r(r),n.d(r,{BW:()=>a,XS:()=>i,NQ:()=>f,dY:()=>s,id:()=>p});var o="openmrs:connectivity-changed";function i(e){var t=function(t){return e(t.detail)};return window.addEventListener(o,t),function(){return window.removeEventListener(o,t)}}function a(e){return e({online:navigator.onLine}),i(e)}var u="openmrs:precache-static-dependencies";function s(e){var t=function(t){return e(t.detail)};return window.addEventListener(u,t),function(){return window.removeEventListener(u,t)}}var c="openmrs:notification-shown",l="openmrs:toast-shown";function f(e){var t=function(t){return e(t.detail)};return window.addEventListener(c,t),function(){return window.removeEventListener(c,t)}}function p(e){var t=function(t){return e(t.detail)};return window.addEventListener(l,t),function(){return window.removeEventListener(l,t)}}},6904:(e,t,n)=>{"use strict";n.d(t,{iC:()=>r.OfflineMode,Vm:()=>r.OfflineModeResult,Cg:()=>o.QueueItemDescriptor,we:()=>o.SyncItem,Ug:()=>o.SyncProcessOptions,jp:()=>Eo,Qd:()=>xo,Gy:()=>ko,sF:()=>Jr,vm:()=>s,aA:()=>co,k1:()=>gr,TI:()=>_o,Q2:()=>bo,z7:()=>Xr,nN:()=>xr,gp:()=>Ur,a7:()=>Yr,Rz:()=>Vr,QI:()=>Br,$9:()=>zr,X2:()=>yo,dt:()=>mr,H_:()=>To,MO:()=>br});var r={};n.r(r),n.d(r,{vm:()=>s});var o={};n.r(o),n.d(o,{jp:()=>Eo,Qd:()=>xo,Gy:()=>ko,aA:()=>co,TI:()=>_o,Q2:()=>bo,X2:()=>yo,H_:()=>To});var i=n(1602),a=n.n(i),u="unavailable";function s(){return{current:u,notAvailable:!0,active:!1}}const c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,l=Object.keys,f=Array.isArray;function p(e,t){return"object"!=typeof t||l(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||c.Promise||(c.Promise=Promise);const d=Object.getPrototypeOf,h={}.hasOwnProperty;function y(e,t){return h.call(e,t)}function v(e,t){"function"==typeof t&&(t=t(d(e))),("undefined"==typeof Reflect?l:Reflect.ownKeys)(t).forEach((n=>{m(e,n,t[n])}))}const g=Object.defineProperty;function m(e,t,n,r){g(e,t,p(n&&y(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function b(e){return{from:function(t){return e.prototype=Object.create(t.prototype),m(e.prototype,"constructor",e),{extend:v.bind(null,e.prototype)}}}}const w=Object.getOwnPropertyDescriptor;function S(e,t){let n;return w(e,t)||(n=d(e))&&S(n,t)}const x=[].slice;function E(e,t,n){return x.call(e,t,n)}function O(e,t){return t(e)}function k(e){if(!e)throw new Error("Assertion Failed")}function j(e){c.setImmediate?setImmediate(e):setTimeout(e,0)}function T(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function P(e,t){if(y(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=P(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:P(u,t.substr(a+1))}}function C(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){k("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)C(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?f(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var s=e[a];s||(s=e[a]={}),C(s,u,n)}}else void 0===n?f(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function A(e){var t={};for(var n in e)y(e,n)&&(t[n]=e[n]);return t}const I=[].concat;function N(e){return I.apply([],e)}const R="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(N([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>c[e])),D=R.map((e=>c[e]));T(R,(e=>[e,!0]));let L=null;function M(e){L="undefined"!=typeof WeakMap&&new WeakMap;const t=U(e);return L=null,t}function U(e){if(!e||"object"!=typeof e)return e;let t=L&&L.get(e);if(t)return t;if(f(e)){t=[],L&&L.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(U(e[n]))}else if(D.indexOf(e.constructor)>=0)t=e;else{const n=d(e);for(var o in t=n===Object.prototype?{}:Object.create(n),L&&L.set(e,t),e)y(e,o)&&(t[o]=U(e[o]))}return t}const{toString:$}={};function F(e){return $.call(e).slice(8,-1)}const B="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",z="symbol"==typeof B?function(e){var t;return null!=e&&(t=e[B])&&t.apply(e)}:function(){return null},V={};function W(e){var t,n,r,o;if(1===arguments.length){if(f(e))return e.slice();if(this===V&&"string"==typeof e)return[e];if(o=z(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 K="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var q="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function H(e,t){q=e,Z=t}var Z=()=>!0;const G=!new Error("").stack;function Q(){if(G)try{throw Q.arguments,new Error}catch(e){return e}return new Error}function Y(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(Z).map((e=>"\n"+e)).join("")):""}var J=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],X=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(J),ee={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 te(e,t){this._e=Q(),this.name=e,this.message=t}function ne(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function re(e,t,n,r){this._e=Q(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ne(e,t)}function oe(e,t){this._e=Q(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=ne(e,t)}b(te).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Y(this._e,2))}},toString:function(){return this.name+": "+this.message}}),b(re).from(te),b(oe).from(te);var ie=X.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const ae=te;var ue=X.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Q(),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=ee[t]||n,this.inner=null)}return b(r).from(ae),e[t]=r,e}),{});ue.Syntax=SyntaxError,ue.Type=TypeError,ue.Range=RangeError;var se=J.reduce(((e,t)=>(e[t+"Error"]=ue[t],e)),{}),ce=X.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=ue[t]),e)),{});function le(){}function fe(e){return e}function pe(e,t){return null==e||e===fe?t:function(n){return t(e(n))}}function de(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function he(e,t){return e===le?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?de(r,this.onsuccess):r),o&&(this.onerror=this.onerror?de(o,this.onerror):o),void 0!==i?i:n}}function ye(e,t){return e===le?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?de(n,this.onsuccess):n),r&&(this.onerror=this.onerror?de(r,this.onerror):r)}}function ve(e,t){return e===le?t:function(n){var r=e.apply(this,arguments);p(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?de(o,this.onsuccess):o),i&&(this.onerror=this.onerror?de(i,this.onerror):i),void 0===r?void 0===a?void 0:a:p(r,a)}}function ge(e,t){return e===le?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function me(e,t){return e===le?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)}}ce.ModifyError=re,ce.DexieError=te,ce.BulkError=oe;var be={};const[we,_e,Se]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,d(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,d(t),e]})(),xe=_e&&_e.then,Ee=we&&we.constructor,Oe=!!Se;var ke=!1,je=Se?()=>{Se.then(Qe)}:c.setImmediate?setImmediate.bind(null,Qe):c.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Qe(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Qe,0)},Te=function(e,t){Me.push([e,t]),Ce&&(je(),Ce=!1)},Pe=!0,Ce=!0,Ae=[],Ie=[],Ne=null,Re=fe,De={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:wt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{wt(e[0],e[1])}catch(e){}}))}},Le=De,Me=[],Ue=0,$e=[];function Fe(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=le,this._lib=!1;var t=this._PSD=Le;if(q&&(this._stackHolder=Q(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==be)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&We(this,this._value))}this._state=null,this._value=null,++t.ref,Ve(this,e)}const Be={get:function(){var e=Le,t=at;function n(n,r){var o=!e.global&&(e!==Le||t!==at);const i=o&&!lt();var a=new Fe(((t,a)=>{qe(this,new ze(mt(n,e,o,i),mt(r,e,o,i),t,a,e))}));return q&&Ge(a,this),a}return n.prototype=be,n},set:function(e){m(this,"then",e&&e.prototype===be?Be:{get:function(){return e},set:Be.set})}};function ze(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 Ve(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&&Ye();t&&"function"==typeof t.then?Ve(e,((e,n)=>{t instanceof Fe?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Ke(e)),n&&Je()}}),We.bind(null,e))}catch(t){We(e,t)}}function We(e,t){if(Ie.push(t),null===e._state){var n=e._lib&&Ye();t=Re(t),e._state=!1,e._value=t,q&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=S(t,"stack");t._promise=e,m(t,"stack",{get:()=>ke?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){Ae.some((t=>t._value===e._value))||Ae.push(e)}(e),Ke(e),n&&Je()}}function Ke(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)qe(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Ue&&(++Ue,Te((()=>{0==--Ue&&Xe()}),[]))}function qe(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,++Ue,Te(He,[n,e,t])}else e._listeners.push(t)}function He(e,t,n){try{Ne=t;var r,o=t._value;t._state?r=e(o):(Ie.length&&(Ie=[]),r=e(o),-1===Ie.indexOf(o)&&function(e){for(var t=Ae.length;t;)if(Ae[--t]._value===e._value)return void Ae.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ne=null,0==--Ue&&Xe(),--n.psd.ref||n.psd.finalize()}}function Ze(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=Y(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return q&&((r=Y(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Ze(e._prev,t,n)),t}function Ge(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Qe(){Ye()&&Je()}function Ye(){var e=Pe;return Pe=!1,Ce=!1,e}function Je(){var e,t,n;do{for(;Me.length>0;)for(e=Me,Me=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Me.length>0);Pe=!0,Ce=!0}function Xe(){var e=Ae;Ae=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=$e.slice(0),n=t.length;n;)t[--n]()}function et(e){return new Fe(be,!1,e)}function tt(e,t){var n=Le;return function(){var r=Ye(),o=Le;try{return ht(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ht(o,!1),r&&Je()}}}v(Fe.prototype,{then:Be,_then:function(e,t){qe(this,new ze(null,null,e,t,Le))},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):et(e))):this.then(null,(e=>e&&e.name===t?n(e):et(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),et(t))))},stack:{get:function(){if(this._stack)return this._stack;try{ke=!0;var e=Ze(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{ke=!1}}},timeout:function(e,t){return e<1/0?new Fe(((n,r)=>{var o=setTimeout((()=>r(new ue.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&m(Fe.prototype,Symbol.toStringTag,"Dexie.Promise"),De.env=yt(),v(Fe,{all:function(){var e=W.apply(null,arguments).map(ft);return new Fe((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Fe.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Fe)return e;if(e&&"function"==typeof e.then)return new Fe(((t,n)=>{e.then(t,n)}));var t=new Fe(be,!0,e);return Ge(t,Ne),t},reject:et,race:function(){var e=W.apply(null,arguments).map(ft);return new Fe(((t,n)=>{e.map((e=>Fe.resolve(e).then(t,n)))}))},PSD:{get:()=>Le,set:e=>Le=e},totalEchoes:{get:()=>at},newPSD:st,usePSD:vt,scheduler:{get:()=>Te,set:e=>{Te=e}},rejectionMapper:{get:()=>Re,set:e=>{Re=e}},follow:(e,t)=>new Fe(((n,r)=>st(((t,n)=>{var r=Le;r.unhandleds=[],r.onunhandled=n,r.finalize=de((function(){!function(e){$e.push((function t(){e(),$e.splice($e.indexOf(t),1)})),++Ue,Te((()=>{0==--Ue&&Xe()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),Ee&&(Ee.allSettled&&m(Fe,"allSettled",(function(){const e=W.apply(null,arguments).map(ft);return new Fe((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Fe.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),Ee.any&&"undefined"!=typeof AggregateError&&m(Fe,"any",(function(){const e=W.apply(null,arguments).map(ft);return new Fe(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Fe.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const nt={awaits:0,echoes:0,id:0};var rt=0,ot=[],it=0,at=0,ut=0;function st(e,t,n,r){var o=Le,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ut;var a=De.env;i.env=Oe?{Promise:Fe,PromiseProp:{value:Fe,configurable:!0,writable:!0},all:Fe.all,race:Fe.race,allSettled:Fe.allSettled,any:Fe.any,resolve:Fe.resolve,reject:Fe.reject,nthen:bt(a.nthen,i),gthen:bt(a.gthen,i)}:{},t&&p(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=vt(i,e,n,r);return 0===i.ref&&i.finalize(),u}function ct(){return nt.id||(nt.id=++rt),++nt.awaits,nt.echoes+=100,nt.id}function lt(){return!!nt.awaits&&(0==--nt.awaits&&(nt.id=0),nt.echoes=100*nt.awaits,!0)}function ft(e){return nt.echoes&&e&&e.constructor===Ee?(ct(),e.then((e=>(lt(),e)),(e=>(lt(),_t(e))))):e}function pt(e){++at,nt.echoes&&0!=--nt.echoes||(nt.echoes=nt.id=0),ot.push(Le),ht(e,!0)}function dt(){var e=ot[ot.length-1];ot.pop(),ht(e,!1)}function ht(e,t){var n=Le;if((t?!nt.echoes||it++&&e===Le:!it||--it&&e===Le)||gt(t?pt.bind(null,e):dt),e!==Le&&(Le=e,n===De&&(De.env=yt()),Oe)){var r=De.env.Promise,o=e.env;_e.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 yt(){var e=c.Promise;return Oe?{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:_e.then,gthen:e.prototype.then}:{}}function vt(e,t,n,r,o){var i=Le;try{return ht(e,!0),t(n,r,o)}finally{ht(i,!1)}}function gt(e){xe.call(we,e)}function mt(e,t,n,r){return"function"!=typeof e?e:function(){var o=Le;n&&ct(),ht(t,!0);try{return e.apply(this,arguments)}finally{ht(o,!1),r&>(lt)}}}function bt(e,t){return function(n,r){return e.call(this,mt(n,t),mt(r,t))}}function wt(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("unhandledrejection",!0,!0),p(r,o)):c.CustomEvent&&p(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&c.dispatchEvent&&(dispatchEvent(r),!c.PromiseRejectionEvent&&c.onunhandledrejection))try{c.onunhandledrejection(r)}catch(e){}q&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+xe).indexOf("[native code]")&&(ct=lt=le);var _t=Fe.reject;function St(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Le.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===ie.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>St(e,t,n,r)))):_t(o)}return o._promise(t,((e,t)=>st((()=>(Le.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return _t(new ue.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return _t(new ue.DatabaseClosed);e.open().catch(le)}return e._state.dbReadyPromise.then((()=>St(e,t,n,r)))}const xt=String.fromCharCode(65535),Et="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ot=[],kt="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),jt=kt,Tt=kt,Pt=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Ct(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const At={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function It(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=M(t))[e],t)}class Nt{_trans(e,t,n){const r=this._tx||Le.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new ue.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Ye();try{return r&&r.db===this.db?r===Le.trans?r._promise(e,i,n):st((()=>r._promise(e,i,n)),{trans:r,transless:Le.transless||Le}):St(this.db,e,[this.name],i)}finally{a&&Je()}}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(f(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=l(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=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==xt)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&q&&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[a,u]=t.reduce((([t,n],o)=>{const a=r[o],u=e[o];return[t||a,t||!a?Ct(n,a&&a.multi?e=>{const t=P(e,o);return f(t)&&t.some((e=>i(u,e)))}:e=>i(u,P(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(u):n?this.filter(u):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,f(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(y(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){p(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=It(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Fe.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{C(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||f(e))return this.where(":id").equals(e).modify(t);{const n=P(e,this.schema.primKey.keyPath);if(void 0===n)return _t(new ue.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?l(t).forEach((n=>{C(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=It(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Fe.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{C(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?Fe.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:At}))).then((e=>e.numFailures?Fe.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 ue.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ue.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let u=i&&n?e.map(It(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:u,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new oe(`${this.name}.bulkAdd(): ${e} of ${a} 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 ue.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new ue.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let u=i&&n?e.map(It(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:u,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new oe(`${this.name}.bulkPut(): ${e} of ${a} 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 oe(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Rt(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)return a(e);r||(r=ge),o||(o=le);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){l(e).forEach((function(t){var n=e[t];if(f(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new ue.InvalidArgument("Invalid event config");var r=i(t,fe,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){j((function(){e.apply(null,t)}))}))}))}}))}}function Dt(e,t){return b(t).from({prototype:e}),t}function Lt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Mt(e,t){e.filter=Ct(e.filter,t)}function Ut(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Ct(r(),t()):t,e.justLimit=n&&!r}function $t(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new ue.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Ft(e,t,n){const r=$t(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 Bt(e,t,n,r){const o=e.replayFilter?Ct(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),y(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),zt(Ft(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return zt(Ft(e,r,n),Ct(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function zt(e,t,n,r){var o=tt(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=le}),(t=>{e.fail(t),n=le}))||o(e.value,e,(e=>n=e)),n()}))}))}function Vt(e,t){try{const n=Wt(e),r=Wt(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}(Kt(e),Kt(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=Vt(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Wt(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=F(e);return"ArrayBuffer"===n?"binary":n}function Kt(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class qt{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,_t.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,_t.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Ct(t.algorithm,e)}_iterate(e,t){return Bt(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&p(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Bt(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Lt(t,!0))return n.count({trans:e,query:{index:$t(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Bt(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 a="next"===this._ctx.dir?1:-1;function u(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(u)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Lt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=$t(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 Bt(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Lt(t)?Ut(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Ut(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ut(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Mt(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 Mt(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Ct(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&&Lt(t,!0)&&t.limit>0)return this._read((e=>{var n=$t(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 Mt(this._ctx,(function(e){var t=e.primaryKey.toString(),r=y(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=l(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],u=e[a];P(t,a)!==u&&(C(t,a,u),n=!0)}return n}}const a=t.table.core,{outbound:u,extractKey:s}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,f=[];let p=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;p+=e-r;for(let e of l(n))f.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((p=>{const d=[],y=[],v=u?[]:null,g=[];for(let e=0;e<f;++e){const t=p[e],n={value:M(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+e]):u||0===Vt(s(t),s(n.value))?(y.push(n.value),u&&v.push(o[l+e])):(g.push(o[l+e]),d.push(n.value)))}const m=Lt(t)&&t.limit===1/0&&("function"!=typeof e||e===Ht)&&{index:t.index,range:t.range};return Promise.resolve(d.length>0&&a.mutate({trans:n,type:"add",values:d}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);h(d.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(y.length,e))))).then((()=>(g.length>0||m&&e===Ht)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>h(g.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(f.length>0)throw new re("Error modifying one or more objects",f,p,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Lt(e)&&(e.isPrimKey&&!Tt||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 re("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Ht)}}const Ht=(e,t)=>t.value=null;function Zt(e,t){return e<t?-1:e===t?0:1}function Gt(e,t){return e>t?-1:e===t?0:1}function Qt(e,t,n){var r=e instanceof nn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Yt(e){return new e.Collection(e,(()=>tn(""))).limit(0)}function Jt(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,s=0;s<a;++s){var c=t[s];if(c!==r[s])return o(e[s],n[s])<0?e.substr(0,s)+n[s]+n.substr(s+1):o(e[s],r[s])<0?e.substr(0,s)+r[s]+n.substr(s+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[s],c)<0&&(u=s)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)}function Xt(e,t,n,r){var o,i,a,u,s,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return Qt(e,"String expected.");function p(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),a="next"===e?Zt:Gt;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),s=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}p("next");var d=new e.Collection(e,(()=>en(u[0],s[f-1]+r)));d._ondirectionchange=function(e){p(e)};var h=0;return d._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var p=i(o);if(t(p,s,h))return!0;for(var d=null,y=h;y<f;++y){var v=Jt(o,p,u[y],s[y],a,c);null===v&&null===d?h=y+1:(null===d||a(d,v)>0)&&(d=v)}return n(null!==d?function(){e.continue(d+l)}:r),!1})),d}function en(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function tn(e){return{type:1,lower:e,upper:e}}class nn{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)?Yt(this):new this.Collection(this,(()=>en(e,t,!n,!r)))}catch(e){return Qt(this,Et)}}equals(e){return null==e?Qt(this,Et):new this.Collection(this,(()=>tn(e)))}above(e){return null==e?Qt(this,Et):new this.Collection(this,(()=>en(e,void 0,!0)))}aboveOrEqual(e){return null==e?Qt(this,Et):new this.Collection(this,(()=>en(e,void 0,!1)))}below(e){return null==e?Qt(this,Et):new this.Collection(this,(()=>en(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Qt(this,Et):new this.Collection(this,(()=>en(void 0,e)))}startsWith(e){return"string"!=typeof e?Qt(this,"String expected."):this.between(e,e+xt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):Xt(this,((e,t)=>0===e.indexOf(t[0])),[e],xt)}equalsIgnoreCase(e){return Xt(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=W.apply(V,arguments);return 0===e.length?Yt(this):Xt(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=W.apply(V,arguments);return 0===e.length?Yt(this):Xt(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,xt)}anyOf(){const e=W.apply(V,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Qt(this,Et)}if(0===e.length)return Yt(this);const n=new this.Collection(this,(()=>en(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 a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=W.apply(V,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Qt(this,Et)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,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,a=this._max;if(0===e.length)return Yt(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Qt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ue.InvalidArgument);const u=!t||!1!==t.includeLowers,s=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=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]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return Qt(this,Et)}let p=0;const d=s?e=>r(e,c[p][1])>0:e=>r(e,c[p][1])>=0,h=u?e=>o(e,c[p][0])>0:e=>o(e,c[p][0])>=0;let y=d;const v=new this.Collection(this,(()=>en(c[0][0],c[c.length-1][1],!u,!s)));return v._ondirectionchange=e=>{"next"===e?(y=d,l=r):(y=h,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++p,p===c.length)return t(n),!1;return!!function(e){return!d(e)&&!h(e)}(o)||(0===this._cmp(o,c[p][1])||0===this._cmp(o,c[p][0])||t((()=>{l===r?e.continue(c[p][0]):e.continue(c[p][1])})),!1)})),v}startsWithAnyOf(){const e=W.apply(V,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Yt(this):this.inAnyRange(e.map((e=>[e,e+xt]))):Qt(this,"startsWithAnyOf() only works with strings")}}function rn(e){return tt((function(t){return on(t),e(t.target.error),!1}))}function on(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const an=Rt(null,"storagemutated");class un{_lock(){return k(!Le.global),++this._reculock,1!==this._reculock||Le.global||(Le.lockOwnerFor=this),this}_unlock(){if(k(!Le.global),0==--this._reculock)for(Le.global||(Le.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{vt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Le.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(k(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new ue.DatabaseClosed(n);case"MissingAPIError":throw new ue.MissingAPI(n.message,n);default:throw new ue.OpenFailed(n)}if(!this.active)throw new ue.TransactionInactive;return k(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=tt((t=>{on(t),this._reject(e.error)})),e.onabort=tt((t=>{on(t),this.active&&this._reject(new ue.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=tt((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&an.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return _t(new ue.ReadOnly("Transaction is readonly"));if(!this.active)return _t(new ue.TransactionInactive);if(this._locked())return new Fe(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Le])}));if(n)return st((()=>{var e=new Fe(((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 Fe(((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=Fe.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 Fe(((e,r)=>{n.then((n=>t._waitingQueue.push(tt(e.bind(null,n)))),(e=>t._waitingQueue.push(tt(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 ue.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(y(t,e))return t[e];const n=this.schema[e];if(!n)throw new ue.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 sn(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+cn(t)}}function cn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function ln(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:T(n,(e=>[e.name,e]))}}let fn=e=>{try{return e.only([[]]),fn=()=>[[]],[[]]}catch(e){return fn=()=>xt,xt}};function pn(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>P(t,e)}(e):t=>P(t,e)}function dn(e){return[].slice.call(e)}let hn=0;function yn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function vn(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=dn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=f(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:pn(t)},indexes:dn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:f(o),keyPath:o,unique:n,multiEntry:r,extractKey:pn(o)};return i[yn(o)]=a,a})),getIndexByKeyPath:e=>i[yn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[yn(t)]=a.primaryKey),a}))},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),a=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:a}){return new Promise(((u,s)=>{u=tt(u);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:p}=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===p)return u({numFailures:0,failures:{},results:[],lastResult:void 0});let d;const h=[],y=[];let v=0;const g=e=>{++v,on(e)};if("deleteRange"===n){if(4===a.type)return u({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?h.push(d=c.clear()):h.push(d=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<p;++r)h.push(d=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),d.onerror=g;else for(let t=0;t<p;++t)h.push(d=c[n](e[t])),d.onerror=g}const m=e=>{const t=e.target.result;h.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),u({numFailures:v,failures:y,results:"delete"===n?o:h.map((e=>e.result)),lastResult:t})};d.onerror=e=>{g(e),m(e)},d.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=tt(r);const i=e.objectStore(t),a=n.length,u=new Array(a);let s,c=0,l=0;const f=e=>{const t=e.target;u[t._pos]=t.result,++l===c&&r(u)},p=rn(o);for(let e=0;e<a;++e)null!=n[e]&&(s=i.get(n[e]),s._pos=e,s.onsuccess=f,s.onerror=p,++c);0===c&&r(u)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=tt(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=rn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=tt(o);const{trans:a,values:u,limit:s,query:c}=n,l=s===1/0?void 0:s,{index:f,range:p}=c,d=a.objectStore(t),h=f.isPrimaryKey?d:d.index(f.name),y=r(p);if(0===s)return o({result:[]});if(e){const e=u?h.getAll(y,l):h.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=rn(i)}else{let e=0;const t=u||!("openKeyCursor"in h)?h.openCursor(y):h.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(u?i.value:i.primaryKey),++e===s?o({result:n}):void i.continue()):o({result:n})},t.onerror=rn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((u,s)=>{u=tt(u);const{index:c,range:l}=o,f=e.objectStore(t),p=c.isPrimaryKey?f:f.index(c.name),d=i?a?"prevunique":"prev":a?"nextunique":"next",h=n||!("openKeyCursor"in p)?p.openCursor(r(l),d):p.openKeyCursor(r(l),d);h.onerror=rn(s),h.onsuccess=tt((t=>{const n=h.result;if(!n)return void u(null);n.___id=++hn,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{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=tt(s),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=tt(e),h.onerror=rn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),u=()=>{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=tt((e=>{h.onsuccess=u,u()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,u(),t},u(n)}),s)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const u=n.objectStore(t),s=o.isPrimaryKey?u:u.index(o.name),c=r(i),l=c?s.count(c):s.count();l.onsuccess=tt((t=>e(t.target.result))),l.onerror=rn(a)}))}}}(e))),u={};return a.forEach((e=>u[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!u[e])throw new Error(`Table '${e}' not found`);return u[e]},MIN_KEY:-1/0,MAX_KEY:fn(t),schema:o}}function gn({_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)}(vn(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 mn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=S(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){g(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function bn({_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 _n(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),u=Le.transless||Le;st((()=>{Le.trans=i,Le.transless=u,0===t?(l(o).forEach((e=>{xn(n,e,o[e].primKey,o[e].indexes)})),gn(e,n),Fe.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=On(0,e.idbdb,r),u=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,s=i._cfg.dbschema;kn(e,o,r),kn(e,s,r),a=e._dbSchema=s;const c=Sn(o,s);c.add.forEach((e=>{xn(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new ue.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>En(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),En(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const f=i._cfg.contentUpgrade;if(f&&i._cfg.version>t){gn(e,r),n._memoizedTables={},u=!0;let t=A(s);c.del.forEach((e=>{t[e]=o[e]})),bn(e,[e.Transaction.prototype]),mn(e,[e.Transaction.prototype],l(t),t),n.schema=t;const i=K(f);let a;i&&ct();const p=Fe.follow((()=>{if(a=f(n),a&&i){var e=lt.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Fe.resolve(a):p.then((()=>a))}})),o.push((t=>{u&&jt||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),bn(e,[e.Transaction.prototype]),mn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Fe.resolve(o.shift()(n.idbtrans)).then(e):Fe.resolve()}().then((()=>{var e,t;t=r,l(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||xn(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}function Sn(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&&!kt)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];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 xn(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=>En(o,e))),o}function En(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function On(e,t,n){const r={};return E(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=sn(cn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var u=sn(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(u)}r[e]=ln(e,i,a)})),r}function kn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+E(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 jn{_parseStoresSpec(e,t){l(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 sn(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),f(r),0===t)})),o=r.shift();if(o.multi)throw new ue.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new ue.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new ue.Schema("Index must have a name and cannot be an empty string")})),t[n]=ln(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?p(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{p(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,bn(t,[t._allTables,t,t.Transaction.prototype]),mn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],l(o),o),t._storeNames=l(o),this}upgrade(e){return this._cfg.contentUpgrade=me(this._cfg.contentUpgrade||le,e),this}}function Tn(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Gn("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Pn(e){return e&&"function"==typeof e.databases}function Cn(e){return st((function(){return Le.letThrough=!0,e()}))}function An(){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 In(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):f(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Nn(e,t,n){var r=arguments.length;if(r<2)throw new ue.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=N(o);return[e,i,n]}function Rn(e,t,n,r,o){return Fe.resolve().then((()=>{const i=Le.transless||Le,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===ie.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Rn(e,t,n,null,o)))):_t(r)}const s=K(o);let c;s&&ct();const l=Fe.follow((()=>{if(c=o.call(a,a),c)if(s){var e=lt.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=In(c))}),u);return(c&&"function"==typeof c.then?Fe.resolve(c).then((e=>a.active?e:_t(new ue.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),_t(e))))}))}function Dn(e,t,n){const r=f(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Ln={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=yn(e),u=o[r]=o[r]||[],s=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:s,extractKey:pn(e),unique:!c&&n.unique};return u.push(l),l.isPrimaryKey||i.push(l),s>1&&a(2===s?e[0]:e.slice(0,s-1),t+1,n),u.sort(((e,t)=>e.keyTail-t.keyTail)),l}const u=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[u];for(const e of r.indexes)a(e.keyPath,0,e);function s(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:Dn(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Dn(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:u,indexes:i,getIndexByKeyPath:function(e){const t=o[yn(e)];return t&&t[0]}},count:e=>n.count(s(e)),query:e=>n.query(s(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(s(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Dn(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(Dn(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 c}}}};function Mn(e,t,n,r){return n=n||{},r=r||"",l(e).forEach((o=>{if(y(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=F(i);e!==F(a)?n[r+o]=t[o]:"Object"===e?Mn(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),l(t).forEach((o=>{y(e,o)||(n[r+o]=t[o])})),n}const Un={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=Le.trans,{deleting:i,creating:a,updating:u}=o.table(t).hook;switch(e.type){case"add":if(a.fire===le)break;return o._promise("readwrite",(()=>s(e)),!0);case"put":if(a.fire===le&&u.fire===le)break;return o._promise("readwrite",(()=>s(e)),!0);case"delete":if(i.fire===le)break;return o._promise("readwrite",(()=>s(e)),!0);case"deleteRange":if(i.fire===le)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function s(e){const t=Le.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((s=>{const c=o.map(((n,o)=>{const c=s[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||C(e.values[o],r.keyPath,n))}else{const r=Mn(c,e.values[o]),i=u.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{y(t,e)?t[e]=i[e]:C(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],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&s[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>s({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}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function $n(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===Vt(t.keys[o],e[i])&&(r.push(n?M(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Fn={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=$n(e.keys,e.trans._cache,"clone"===e.cache);return t?Fe.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?M(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Bn(e){return!("from"in e)}const zn=function(e,t){if(!this){const t=new zn;return e&&"d"in e&&p(t,e),t}p(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Vn(e,t,n){const r=Vt(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Bn(e))return p(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Vt(n,e.from)<0)return o?Vn(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},qn(e);if(Vt(t,e.to)>0)return i?Vn(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},qn(e);Vt(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Vt(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Wn(e,o),i&&a&&Wn(e,i)}function Wn(e,t){Bn(t)||function e(t,{from:n,to:r,l:o,r:i}){Vn(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function Kn(e){let t=Bn(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&&Vt(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||Vt(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 qn(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=Hn(n)}e.d=Hn(e)}function Hn({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}v(zn.prototype,{add(e){return Wn(this,e),this},addKey(e){return Vn(this,e,e),this},addKeys(e){return e.forEach((e=>Vn(this,e,e))),this},[B](){return Kn(this)}});const Zn={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new zn(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:u,outbound:s}=a,c={...o,mutate:e=>{const a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),s=e=>{const n=`idb://${t}/${r}/${e}`;return u[n]||(u[n]=new zn)},c=s(""),l=s(":dels"),{type:p}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const y=e.trans._cache;return o.mutate(e).then((e=>{if(f(d)){"delete"!==p&&(d=e.results),c.addKeys(d);const t=$n(d,y);t||"add"===p||l.addKeys(d),(t||h)&&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 a=e=>t.multiEntry&&f(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),u=r&&i(r[t]);0!==Vt(o,u)&&(null!=o&&a(o),null!=u&&a(u))}))}))}(s,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>s(e.name).add(n)));return e}))}},p=({query:{index:t,range:n}})=>{var r,o;return[t,new zn(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},d={get:e=>[a,new zn(e.key)],getMany:e=>[a,(new zn).addKeys(e.keys)],count:p,query:p,openCursor:p};return l(d).forEach((e=>{c[e]=function(i){const{subscr:a}=Le;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new zn)},l=c(""),f=c(":dels"),[p,h]=d[e](i);if(c(p.name||"").add(h),!p.isPrimaryKey){if("count"!==e){const t="query"===e&&s&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(s&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(u):n.result;i.values?l.addKeys(e):f.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(f.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return f.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}f.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class Gn{constructor(e,t){this._middlewares={},this.verno=0;const n=Gn.dependencies;this._options=t={addons:Gn.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:le,dbReadyPromise:null,cancelOpen:le,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Fe((e=>{o.dbReadyResolve=e})),o.openCanceller=new Fe(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Rt(this,"populate","blocked","versionchange","close",{ready:[me,le]}),this.on.ready.subscribe=O(this.on.ready.subscribe,(e=>(t,n)=>{Gn.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Fe.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,Dt(qt.prototype,(function(e,t){this.db=i;let n=At,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,u=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.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:u!==fe?u:null}}))),this.Table=function(e){return Dt(Nt.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:Rt(null,{creating:[he,le],reading:[pe,fe],updating:[ve,le],deleting:[ye,le]})}))}(this),this.Transaction=function(e){return Dt(un.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=Rt(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 Fe(((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(),_t(e)}))}))}(this),this.Version=function(e){return Dt(jn.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Dt(nn.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 ue.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=fn(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),Ot.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Ln),this.use(Un),this.use(Zn),this.use(Fn),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new ue.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ue.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||Le.letThrough||this._vip)?e():new Fe(((e,t)=>{if(this._state.openComplete)return t(new ue.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new ue.DatabaseClosed);this.open().catch(le)}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?_t(t.dbOpenError):e));q&&(t.openCanceller._stackHolder=Q()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new ue.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,u=!1;return Fe.race([r,("undefined"==typeof navigator?Fe.resolve():An()).then((()=>new Fe(((r,i)=>{if(o(),!n)throw new ue.MissingAPI;const s=e.name,c=t.autoSchema?n.open(s):n.open(s,Math.round(10*e.verno));if(!c)throw new ue.MissingAPI;c.onerror=rn(i),c.onblocked=tt(e._fireOnBlocked),c.onupgradeneeded=tt((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=on,a.abort(),c.result.close();const e=n.deleteDatabase(s);e.onsuccess=e.onerror=tt((()=>{i(new ue.NoSuchDatabase(`Database ${s} doesnt exist`))}))}else{a.onerror=rn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;u=o<1,e._novip.idbdb=c.result,_n(e,o/10,a,i)}}),i),c.onsuccess=tt((()=>{a=null;const n=e._novip.idbdb=c.result,o=E(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=On(0,t,n);e._storeNames=E(t.objectStoreNames,0),mn(e,[e._allTables],l(r),r)}(e,n,r):(kn(e,e._dbSchema,r),function(e,t){const n=Sn(On(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.")),gn(e,r)}catch(e){}var i;Ot.push(e),n.onversionchange=tt((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=tt((t=>{e.on("close").fire(t)})),u&&function({indexedDB:e,IDBKeyRange:t},n){!Pn(e)&&"__dbnames"!==n&&Tn(e,t).put({name:n}).catch(le)}(e._deps,s),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Fe.resolve(Cn((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(me,le);return t.onReadyBeingFired=[],Fe.resolve(Cn((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),_t(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=Ot.indexOf(this);if(t>=0&&Ot.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Fe((t=>{e.dbReadyResolve=t})),e.openCanceller=new Fe(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new ue.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Fe(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=tt((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Pn(e)&&"__dbnames"!==n&&Tn(e,t).delete(n).catch(le)}(this._deps,this.name),n()})),e.onerror=rn(r),e.onblocked=this._fireOnBlocked};if(e)throw new ue.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 l(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Nn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Le.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=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||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new ue.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new ue.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new ue.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)})):_t(e)}const u=Rn.bind(null,this,i,a,r,n);return r?r._promise(i,u,"lock"):Le.trans?vt(Le.transless,(()=>this._whenReady(u))):this._whenReady(u)}table(e){if(!y(this._allTables,e))throw new ue.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Qn="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Yn{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Qn](){return this}}function Jn(e,t){return l(t).forEach((n=>{Wn(e[n]||(e[n]=new zn),t[n])})),e}let Xn;try{Xn={indexedDB:c.indexedDB||c.mozIndexedDB||c.webkitIndexedDB||c.msIndexedDB,IDBKeyRange:c.IDBKeyRange||c.webkitIDBKeyRange}}catch(c){Xn={indexedDB:null,IDBKeyRange:null}}const er=Gn;function tr(e){let t=nr;try{nr=!0,an.storagemutated.fire(e)}finally{nr=t}}v(er,{...ce,delete:e=>new er(e,{addons:[]}).delete(),exists:e=>new er(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Pn(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Tn(e,t).toCollection().primaryKeys()}(er.dependencies).then(e)}catch(e){return _t(new ue.MissingAPI)}},defineClass:()=>function(e){p(this,e)},ignoreTransaction:e=>Le.trans?vt(Le.transless,e):e(),vip:Cn,async:function(e){return function(){try{var t=In(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Fe.resolve(t)}catch(e){return _t(e)}}},spawn:function(e,t,n){try{var r=In(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Fe.resolve(r)}catch(e){return _t(e)}},currentTransaction:{get:()=>Le.trans||null},waitFor:function(e,t){const n=Fe.resolve("function"==typeof e?er.ignoreTransaction(e):e).timeout(t||6e4);return Le.trans?Le.trans.waitFor(n):n},Promise:Fe,debug:{get:()=>q,set:e=>{H(e,"dexie"===e?()=>!0:Pt)}},derive:b,extend:p,props:v,override:O,Events:Rt,on:an,liveQuery:function(e){return new Yn((t=>{const n=K(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,an.storagemutated.unsubscribe(f)}};t.start&&t.start(a);let u=!1,s=!1;function c(){return l(i).some((e=>o[e]&&function(e,t){const n=Kn(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=Kn(e);let a=i.next(o.from),u=a.value;for(;!r.done&&!a.done;){if(Vt(u.from,o.to)<=0&&Vt(u.to,o.from)>=0)return!0;Vt(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const f=e=>{Jn(o,e),c()&&p()},p=()=>{if(u||r)return;o={};const l={},d=function(t){n&&ct();const r=()=>st(e,{subscr:t,trans:null}),o=Le.trans?vt(Le.transless,r):r();return n&&o.then(lt,lt),o}(l);s||(an("storagemutated",f),s=!0),u=!0,Promise.resolve(d).then((e=>{u=!1,r||(c()?p():(o={},i=l,t.next&&t.next(e)))}),(e=>{u=!1,t.error&&t.error(e),a.unsubscribe()}))};return p(),a}))},extendObservabilitySet:Jn,getByKeyPath:P,setByKeyPath:C,delByKeyPath:function(e,t){"string"==typeof t?C(e,t,void 0):"length"in t&&[].map.call(t,(function(t){C(e,t,void 0)}))},shallowClone:A,deepClone:M,getObjectDiff:Mn,cmp:Vt,asap:j,minKey:-1/0,addons:[],connections:Ot,errnames:ie,dependencies:Xn,semVer:"3.2.1",version:"3.2.1".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),er.maxKey=fn(er.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(an("storagemutated",(e=>{if(!nr){let t;kt?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),nr=!0,dispatchEvent(t),nr=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{nr||tr(e)})));let nr=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");an("storagemutated",(t=>{nr||e.postMessage(t)})),e.onmessage=e=>{e.data&&tr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){an("storagemutated",(e=>{try{nr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&tr(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&tr(e.changedParts)}))}Fe.rejectionMapper=function(e,t){if(!e||e instanceof te||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},H(q,Pt);var rr=n(5385);function or(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 ir(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function ar(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ir(i,r,o,a,u,"next",e)}function u(e){ir(i,r,o,a,u,"throw",e)}a(void 0)}))}}function ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e){return sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sr(e)}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ur(e,t,n[t])}))}return e}function lr(e,t){return!t||"object"!==hr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fr(e,t){return fr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},fr(e,t)}function pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||yr(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 dr(e){return function(e){if(Array.isArray(e))return or(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||yr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var hr=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function yr(e,t){if(e){if("string"==typeof e)return or(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?or(e,t):void 0}}var vr=(0,rr.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function gr(){return vr}function mr(e,t){var n=vr.getState();vr.setState({handlers:cr({},n.handlers,ur({},e,t))})}function br(e){return wr.apply(this,arguments)}function wr(){return wr=ar(a().mark((function e(t){var n,r,o,i,u,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object.entries(vr.getState().handlers),r=n.map((function(e){return pr(e,1)[0]})),o=[],i=[],u={},s=new AbortController,e.next=8,_r(t,{timestamp:new Date,syncingHandlers:r,syncedHandlers:o,failedHandlers:i,errors:u,abort:function(){return s.abort(),!0}});case 8:return e.next=10,Promise.all(n.map(function(){var e=ar(a().mark((function e(n){var r,c,l,f,p;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=pr(n,2),c=r[0],l=r[1],e.prev=1,e.next=4,l.onOfflinePatientAdded({patientUuid:t,signal:s.signal});case 4:console.debug("Offline patient handler ".concat(c," successfully synchronized patient data.")),o.push(c),e.next=14;break;case 8:e.prev=8,e.t0=e.catch(1),console.error("Offline patient handler ".concat(c," failed. Error: "),e.t0),i.push(c),u[c]=null!==(p=null!==(f=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==f?f:null===e.t0||void 0===e.t0?void 0:e.t0.toString())&&void 0!==p?p:"";case 14:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()));case 10:return e.next=12,_r(t,{timestamp:new Date,syncingHandlers:[],syncedHandlers:o,failedHandlers:i,errors:u,abort:function(){return!1}});case 12:case"end":return e.stop()}}),e)}))),wr.apply(this,arguments)}function _r(e,t){return Sr.apply(this,arguments)}function Sr(){return Sr=ar(a().mark((function e(t,n){var r,o,i,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=vr.getState(),vr.setState({offlinePatientDataSyncState:cr({},r.offlinePatientDataSyncState,ur({},t,n))}),o=new Or,e.next=5,o.offlinePatientDataSyncStates.get({patientUuid:t});case 5:return i=e.sent,u={id:null==i?void 0:i.id,patientUuid:t,state:{timestamp:n.timestamp,syncedHandlers:n.syncedHandlers,failedHandlers:dr(n.failedHandlers).concat(dr(n.syncingHandlers)),errors:n.errors}},e.next=9,o.offlinePatientDataSyncStates.put(u);case 9:case"end":return e.stop()}}),e)}))),Sr.apply(this,arguments)}function xr(){return Er.apply(this,arguments)}function Er(){return Er=ar(a().mark((function e(){var t,n,r,o,i,u,s,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Or,e.next=3,t.offlinePatientDataSyncStates.toArray();case 3:for(n=e.sent,r=vr.getState().offlinePatientDataSyncState,o=!0,i=!1,u=void 0,e.prev=6,s=n[Symbol.iterator]();!(o=(c=s.next()).done);o=!0)l=c.value,r[l.patientUuid]=cr({},l.state,{syncingHandlers:[],abort:function(){return!1}});e.next=14;break;case 10:e.prev=10,e.t0=e.catch(6),i=!0,u=e.t0;case 14:e.prev=14,e.prev=15,o||null==s.return||s.return();case 17:if(e.prev=17,!i){e.next=20;break}throw u;case 20:return e.finish(17);case 21:return e.finish(14);case 22:vr.setState({offlinePatientDataSyncState:r});case 23:case"end":return e.stop()}}),e,null,[[6,10,14,22],[15,,17,21]])}))),Er.apply(this,arguments)}var Or=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fr(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=sr(t);if(n){var o=sr(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return lr(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOfflinePatientData")).version(1).stores({offlinePatientDataSyncStates:"++id,&patientUuid"}),e.offlinePatientDataSyncStates=e.table("offlinePatientDataSyncStates"),e}return o}(Gn);try{self["workbox:window:6.5.1"]&&_()}catch(f){}function kr(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 jr(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}try{self["workbox:core:6.5.1"]&&_()}catch(f){}var Tr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function Pr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var Cr=function(e,t){this.type=e,Object.assign(this,t)};function Ar(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Ir(){}var Nr={type:"SKIP_WAITING"};function Rr(e,t){if(!t)return e&&e.then?e.then(Ir):Promise.resolve()}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new Tr,r.en=new Tr,r.on=new Tr,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!Pr(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,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new Cr(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Cr("waiting",a))}),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 Cr("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 Ar(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Cr("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=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.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 Rr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),Ar(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&&Pr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Cr("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)}},i.update=function(){try{return this.fn?Rr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return Ar(this.getSW(),(function(t){return kr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&kr(this.fn.waiting,Nr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&Pr(e.scriptURL,this.sn.toString())?e:void 0},i.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 Ar(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)}},(o=[{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)}}(r.prototype,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=function(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 jr(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)?jr(e,t):void 0}}(e))){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)}(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}());function Dr(){return Promise.resolve(void 0)}function Lr(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function Mr(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Lr(i,r,o,a,u,"next",e)}function u(e){Lr(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Ur(e){return $r.apply(this,arguments)}function $r(){return($r=Mr(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dr();case 2:if(!(n=e.sent)){e.next=9;break}return e.next=6,n.messageSW(t);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={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."};case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Fr,Br="x-omrs-offline-response-body",zr="x-omrs-offline-response-status",Vr="x-omrs-offline-caching-strategy",Wr=new Uint8Array(16);function Kr(){if(!Fr&&!(Fr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fr(Wr)}const qr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Hr=function(e){return"string"==typeof e&&qr.test(e)};for(var Zr=[],Gr=0;Gr<256;++Gr)Zr.push((Gr+256).toString(16).substr(1));const Qr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Kr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Zr[e[t+0]]+Zr[e[t+1]]+Zr[e[t+2]]+Zr[e[t+3]]+"-"+Zr[e[t+4]]+Zr[e[t+5]]+"-"+Zr[e[t+6]]+Zr[e[t+7]]+"-"+Zr[e[t+8]]+Zr[e[t+9]]+"-"+Zr[e[t+10]]+Zr[e[t+11]]+Zr[e[t+12]]+Zr[e[t+13]]+Zr[e[t+14]]+Zr[e[t+15]]).toLowerCase();if(!Hr(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var Yr="OFFLINE+";function Jr(){return Yr+Qr()}function Xr(e){return e.startsWith(Yr)}var eo=n(7641);function to(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function no(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){to(i,r,o,a,u,"next",e)}function u(e){to(i,r,o,a,u,"throw",e)}a(void 0)}))}}function ro(e){return ro=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ro(e)}function oo(e,t){return!t||"object"!==ao(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function io(e,t){return io=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},io(e,t)}var ao=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var uo=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&io(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=ro(t);if(n){var o=ro(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return oo(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).version(3).stores({syncQueue:"++id,userId,type,[userId+type]"}),e.syncQueue=e.table("syncQueue"),e}return o}(Gn)),so={};function co(){return uo}function lo(){return fo.apply(this,arguments)}function fo(){return(fo=no(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,eo.getLoggedInUser)();case 2:return t=e.sent,e.abrupt("return",(null==t?void 0:t.uuid)||"*");case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function po(e,t,n,r){return ho.apply(this,arguments)}function ho(){return(ho=no(a().mark((function e(t,n,r,o){var i,u,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=uo.syncQueue,void 0===(u=o&&o.id)){e.next=5;break}return e.next=5,i.where({type:n,userId:t}).filter((function(e){return(null==e?void 0:e.descriptor.id)===u})).delete();case 5:return e.next=7,i.add({type:n,content:r,userId:t,descriptor:o||{},createdOn:new Date});case 7:return s=e.sent,e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yo(e,t,n){return vo.apply(this,arguments)}function vo(){return(vo=no(a().mark((function e(t,n,r){var o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lo();case 2:return o=e.sent,e.next=5,po(o,t,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function go(e,t){return mo.apply(this,arguments)}function mo(){return(mo=no(a().mark((function e(t,n){var r,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=uo.syncQueue,o=[],e.next=4,r.where({type:n,userId:t}).each((function(e){o.push(e.content)}));case 4:return e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bo(e){return wo.apply(this,arguments)}function wo(){return(wo=no(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lo();case 2:return n=e.sent,e.next=5,go(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _o(e){return So.apply(this,arguments)}function So(){return(So=no(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uo.syncQueue.get(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xo(e){var t;return!!(null===(t=so[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)}function Eo(e){return Oo.apply(this,arguments)}function Oo(){return(Oo=no(a().mark((function e(t){var n,r,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,_o(t);case 3:if(r=e.sent){e.next=6;break}throw new Error("No sync item with the ID ".concat(t," exists."));case 6:if(o=null===(n=so[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){e.next=9;break}throw new Error("A sync item with the ID ".concat(t,' 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 "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ko(e){return jo.apply(this,arguments)}function jo(){return(jo=no(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uo.syncQueue.delete(t);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function To(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};so[e]={type:e,dependsOn:t,process:n,options:r}}(0,rr.createGlobalStore)("offline-synchronization",{})},9883:(e,t,n)=>{"use strict";n.d(t,{w:()=>s,hj:()=>qn,g:()=>r.ExtensionData,dT:()=>O,Vz:()=>Pt,NV:()=>f,D$:()=>Ke,Ae:()=>Ve,tl:()=>ze,a$:()=>We,YV:()=>He,P3:()=>m,yn:()=>Ze,ZR:()=>tt,BL:()=>b,Y9:()=>y,Yq:()=>bt,p8:()=>w,qd:()=>wt,jf:()=>_t,mr:()=>Et,Z_:()=>kt,t$:()=>jt,h0:()=>Wn,lm:()=>ft,kP:()=>At,Oy:()=>It,oR:()=>Ft,xQ:()=>Bt,JF:()=>$n,NN:()=>Bn});var r={};n.r(r),n.d(r,{s:()=>i});var o=n(2735),i=o.createContext({moduleName:""}),a=n(9714);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var s=function(e){var t=e.to,n=e.children,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","children"]);return o.createElement("a",u({onClick:function(e){return function(e,t){e.metaKey||e.ctrlKey||e.shiftKey||0!=e.button||(e.preventDefault(),(0,a.navigate)({to:t}))}(e,t)},href:(0,a.interpolateUrl)(t)},r),n)};function c(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 l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(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.")}()}((0,o.useState)(e.getState()),2),r=n[0],i=n[1];(0,o.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var a={};return t&&(a=(0,o.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},r,a)}}var p=n(225),d=n(3103);function h(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 y(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(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.")}()}((0,o.useState)(window.navigator.onLine),2),t=e[0],n=e[1];return(0,o.useEffect)((function(){return(0,d.subscribeConnectivityChanged)((function(e){var t=e.online;return n(t)}))}),[]),t}var v=n(2891);function g(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 m(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(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.")}()}((0,o.useState)([]),2),n=t[0],r=t[1];return(0,o.useEffect)((function(){var t=function(t){var o,i,a=null!==(i=null===(o=t.slots[e])||void 0===o?void 0:o.assignedExtensions)&&void 0!==i?i:[];(0,v.isEqual)(a,n)||r(a)};return t((0,p.getExtensionStore)().getState()),(0,p.getExtensionStore)().subscribe(t)}),[e,n]),n}function b(e){var t=y(),n=m(e);return(0,o.useMemo)((function(){return(0,p.getConnectedExtensions)(n,t)}),[n,t])}function w(e){var t=(0,o.useContext)(i).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,o.useEffect)((function(){(0,p.registerExtensionSlot)(t,e)}),[]),{extensions:b(e),extensionSlotName:e,extensionSlotModuleName:t}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_(e,t,n[t])}))}return e}function E(e){return e}var O=function(e){var t=e.extensionSlotName,n=e.select,r=void 0===n?E:n,a=e.children,u=e.state,s=e.style,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["extensionSlotName","select","children","state","style"]),l=(0,o.useRef)(null),f=w(t),p=f.extensions,d=f.extensionSlotModuleName,h=(0,o.useRef)(u);(function(e,t){if(e===t)return!0;if(!e&&t)return!1;if(e&&!t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in t)||t[i]!==e[i])return!1}return!0})(h.current,u)||(h.current=u);var y=(0,o.useMemo)((function(){return t&&r(p).map((function(e){return o.createElement(i.Provider,{key:e.id,value:{moduleName:d,extension:{extensionId:e.id,extensionSlotName:t,extensionSlotModuleName:d}}},null!=a?a:o.createElement(qn,{state:h.current}))}))}),[r,p,t,h.current]);return o.createElement("div",S({ref:l,"data-extension-slot-name":t,"data-extension-slot-module-name":d,style:x({},s,{position:"relative"})},c),y)},k=n(2788);function j(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 T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(A(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(A(e)));return e}}var N=null;try{N=require("react").createContext()}catch(j){}var R={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}};function D(e){if("object"!==P(e))throw new Error("single-spa-react requires a configuration object");var t=T(T({},R),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!N&&t.React.createContext&&(N=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:L.bind(null,t),mount:M.bind(null,t),unmount:U.bind(null,t)};return t.parcelCanUpdate&&(n.update=$.bind(null,t)),n}function L(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))}function M(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=F(e,t,(function(){n(this)})),i=I(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))}function U(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))}function $(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=F(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=I(e,t)();e.ReactDOM.render(r,i)}}))}function F(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=N?e.React.createElement(N.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,T(T({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)}function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){z(e,t,n[t])}))}return e}function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e,t){if(t&&("object"===B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return H(e)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Q(e,t){return Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Q(e,t)}function Y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}var J={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},X=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),this.init(t,n)}return q(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||J,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,V({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),ee=new X,te=function(){function e(){W(this,e),this.observers={}}return q(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function ne(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function re(e){return null==e?"":""+e}function oe(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function ie(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function ae(e,t,n){var r=ie(e,t,Object);r.obj[r.k]=n}function ue(e,t){var n=ie(e,t),r=n.obj,o=n.k;if(r)return r[o]}function se(e,t,n){var r=ue(e,n);return void 0!==r?r:ue(t,n)}function ce(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):ce(e[r],t[r],n):e[r]=t[r]);return e}function le(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var fe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function pe(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return fe[e]})):e}var de="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,he=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return W(this,t),n=Z(this,G(t).call(this)),de&&te.call(H(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return Y(t,e),q(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),ue(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),ae(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var u=ue(this.data,a)||{};r?ce(u,n,o):u=V({},u,n),ae(this.data,a,u),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?V({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(te),ye={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},ve={},ge=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return W(this,t),n=Z(this,G(t).call(this)),de&&te.call(H(n)),oe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,H(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=ee.create("translator"),n}return Y(t,e),q(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==B(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),u=a.key,s=a.namespaces,c=s[s.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(f){var p=n.nsSeparator||this.options.nsSeparator;return c+p+u}return u}var d=this.resolve(e,n),h=d&&d.res,y=d&&d.usedKey||u,v=d&&d.exactUsedKey||u,g=Object.prototype.toString.apply(h),m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&m.indexOf(g)<0&&("string"!=typeof b||"[object Array]"!==g)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,n):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(i){var S="[object Array]"===g,x=S?[]:{},E=S?v:y;for(var O in h)if(Object.prototype.hasOwnProperty.call(h,O)){var k="".concat(E).concat(i).concat(O);x[O]=this.translate(k,V({},n,{joinArrays:!1,ns:s})),x[O]===k&&(x[O]=h[O])}h=x}}else if(w&&"string"==typeof b&&"[object Array]"===g)(h=h.join(b))&&(h=this.extendTranslation(h,e,n,r));else{var j=!1,T=!1,P=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),A=P?this.pluralResolver.getSuffix(l,n.count):"",I=n["defaultValue".concat(A)]||n.defaultValue;!this.isValidLookup(h)&&C&&(j=!0,h=I),this.isValidLookup(h)||(T=!0,h=u);var N=C&&I!==h&&this.options.updateMissing;if(T||j||N){if(this.logger.log(N?"updateKey":"missingKey",l,c,u,N?I:h),i){var R=this.resolve(u,V({},n,{keySeparator:!1}));R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var M=0;M<L.length;M++)D.push(L[M]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var U=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,c,t,N?r:h,N,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,c,t,N?r:h,N,n),o.emit("missingKey",e,c,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?D.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){U([e],u+t,n["defaultValue".concat(t)]||I)}))})):U(D,u,I))}h=this.extendTranslation(h,e,n,d,r),T&&h===u&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(u)),T&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(V({},n,{interpolation:V({},this.options.interpolation,n.interpolation)}));var a,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var s=e.match(this.interpolator.nestingRegexp);a=s&&s.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=V({},this.options.interpolation.defaultVariables,c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),u){var l=e.match(this.interpolator.nestingRegexp);a<(l&&l.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=ye.handle(p,e,t,this.options&&this.options.postProcessPassResolved?V({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var s=a.extractFromKey(e,u),c=s.key;n=c;var l=s.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==u.count&&"string"!=typeof u.count,p=void 0!==u.context&&"string"==typeof u.context&&""!==u.context,d=u.lngs?u.lngs:a.languageUtils.toResolveHierarchy(u.lng||a.language,u.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!ve["".concat(d[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(ve["".concat(d[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,s,l=c,d=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(d,c,n,e,u):(f&&(i=a.pluralResolver.getSuffix(n,u.count)),f&&p&&d.push(l+i),p&&d.push(l+="".concat(a.options.contextSeparator).concat(u.context)),f&&d.push(l+=i));s=d.pop();)a.isValidLookup(t)||(r=s,t=a.getResource(n,e,s,u))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(te);function me(e){return e.charAt(0).toUpperCase()+e.slice(1)}var be=function(){function e(t){W(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ee.create("languageUtils")}return q(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=me(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=me(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=me(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),we=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_e={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function Se(){var e={};return we.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:_e[t.fc]}}))})),e}var xe=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),this.languageUtils=t,this.options=n,this.logger=ee.create("pluralResolver"),this.rules=Se()}return q(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),Ee=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e),this.logger=ee.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return q(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:pe,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?le(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?le(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?le(t.nestingPrefix):t.nestingPrefixEscaped||le("$t("),this.nestingSuffix=t.nestingSuffix?le(t.nestingSuffix):t.nestingSuffixEscaped||le(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,u=this,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(u.formatSeparator)<0){var o=se(t,s,e);return u.alwaysFormat?u.format(o,void 0,n):o}var i=e.split(u.formatSeparator),a=i.shift().trim(),c=i.join(u.formatSeparator).trim();return u.format(se(t,s,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return u.escapeValue?c(u.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(p){i=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||u.useRawValueToEscape||(i=re(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=u.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=V({},i);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=V({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var s=[],c=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var l=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=l.shift(),s=l,c=!0}if((r=t(u.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=re(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=s.reduce((function(e,t){return o.format(e,t,i.lng,i)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),Oe=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return W(this,t),o=Z(this,G(t).call(this)),de&&te.call(H(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=ee.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return Y(t,e),q(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],u=[],s=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var u="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[u]=2:o.state[u]<0||(1===o.state[u]?a.indexOf(u)<0&&a.push(u):(o.state[u]=1,r=!1,a.indexOf(u)<0&&a.push(u),i.indexOf(u)<0&&i.push(u),s.indexOf(t)<0&&s.push(t)))})),r||u.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:u,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,u,s,c,l;r=n.loaded,u=i,(c=(s=ie(r,[o],Object)).obj)[l=s.k]=c[l]||[],c[l].push(u),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(u,s){u&&s&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(u,s)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,V({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(te);function ke(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===B(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===B(e[2])||"object"===B(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function je(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Te(){}var Pe=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(W(this,t),e=Z(this,G(t).call(this)),de&&te.call(H(e)),e.options=je(n),e.services={},e.logger=ee,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),Z(e,H(e));setTimeout((function(){e.init(n,r)}),0)}return e}return Y(t,e),q(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=V({},ke(),this.options,je(t)),this.format=this.options.interpolation.format,n||(n=Te),!this.options.isClone){this.modules.logger?ee.init(r(this.modules.logger),this.options):ee.init(null,this.options);var o=new be(this.options);this.store=new he(this.options.resources,this.options);var i=this.services;i.logger=ee,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new xe(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new Ee(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Oe(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new ge(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var u=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var s=["addResource","addResources","addResourceBundle","removeResourceBundle"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var c=ne(),l=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Te,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=ne();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Te),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ye.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=ne();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==B(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),u=2;u<i;u++)a[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=V({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var u=n.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=ne();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=ne();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Te,o=V({},this.options,n,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=V({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new ge(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(te);const Ce=new Pe;var Ae=o.createContext();function Ie(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,o.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,o.createElement)(Ae.Provider,{value:i},r)}function Ne(){return Ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ne.apply(this,arguments)}function Re(e){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Re(e)}function De(e,t){return!t||"object"!==Me(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Le(e,t){return Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Le(e,t)}q((function e(){W(this,e),this.usedNamespaces={}}),[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]);var Me=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var Ue=Ce.default||Ce,$e={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},Fe=function(e){(0,o.useEffect)((function(){return Ue.on("languageChanged",e.forceUpdate),function(){return Ue.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,o.useRef)(null);if(t.current)throw t.current;if(!Ue.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw Ue.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return o.createElement(o.Fragment,null,e.children)};function Be(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},$e,e);return function(e){var n;return(n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Le(e,t)}(s,n);var r,a,u=(r=s,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Re(r);if(a){var n=Re(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return De(this,e)});function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=u.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var c=s.prototype;return c.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return o.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=o.createElement(i.Provider,{value:this.state.config},o.createElement(o.Suspense,{fallback:null},t.disableTranslations?o.createElement(e,Ne({},this.props)):o.createElement(Fe,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},o.createElement(Ie,{i18n:Ue,defaultNS:t.moduleName},o.createElement(e,Ne({},this.props))))));return t.strictMode||!o.StrictMode?r:o.createElement(o.StrictMode,null,r)},s}(o.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}}function ze(e,t){return D({React:o,ReactDOM:k,rootComponent:Be(t)(e)})}function Ve(e,t){return function(){return e().then((function(e){return ze(e.default,t)}))}}function We(e,t){return function(){return Promise.resolve(ze(e,t))}}var Ke=Ve;function qe(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 He(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qe(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qe(e,t):void 0}}(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.")}()}((0,o.useState)([]),2),n=t[0],r=t[1];return(0,o.useEffect)((function(){return(0,p.getExtensionStore)().subscribe((function(t){var o,i,a=null!==(i=null===(o=t.slots[e])||void 0===o?void 0:o.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];(0,v.isEqual)(a,n)||r(a)}))}),[]),n}function Ze(e){(0,o.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])}var Ge=n(3202);function Qe(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 Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qe(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(e,t):void 0}}(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.")}()}var Xe={};function et(e){var t=(0,o.useMemo)(a.getExtensionsConfigStore,[]),n=function(e,t){var n=Je((0,o.useState)(function(e,t){return t?function(){var n=e.getState(),r=(0,a.getExtensionConfigFromStore)(n,t.extensionSlotName,t.extensionId);if(r.loaded&&r.config)return r.config}:null}(e,t)),2),r=n[0],i=n[1];return(0,o.useEffect)((function(){if(t)return e.subscribe((function(e){var n=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);n.loaded&&n.config&&!(0,Ge.Z)(n.config,r)&&i(n.config)}))}),[e,t,r]),r}(t,e);if(!n&&e){var r="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!Xe[r]&&t&&(Xe[r]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,a.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(t,e)),Xe[r]}return n||{}}function tt(){var e=(0,o.useContext)(i),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t=(0,o.useMemo)((function(){return(0,a.getConfigStore)(e)}),[e]),n=e,r=function(e){var t=Je((0,o.useState)(function(e){return function(){var t=e.getState();return t.loaded&&t.config?t.config:null}}(e)),2),n=t[0],r=t[1];return(0,o.useEffect)((function(){return null==e?void 0:e.subscribe((function(e){e.loaded&&e.config&&r(e.config)}))}),[e]),n}(t);if(!r)throw Xe[n]||(Xe[n]=function(e){return new Promise((function(t){var n=e.subscribe((function(e){e.loaded&&e.config&&(t(e.config),n())}))}))}(t)),Xe[n];return r}(t),u=et(n),s=(0,o.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ye(e,t,n[t])}))}return e}({},r,u)}),[r,u]);return s}var nt,rt=n(7641);function ot(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 it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){it(e,t,n[t])}))}return e}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(nt||(nt={}));var ut,st={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};function ct(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function lt(e,t){switch(t.type){case nt.loadPatient:return at({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case nt.newPatient:return at({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case nt.loadError:return at({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}}function ft(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ot(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ot(e,t):void 0}}(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.")}()}((0,o.useReducer)(lt,at({},st,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})),2),n=t[0],r=t[1];return(0,o.useEffect)((function(){if(n.isPendingUuid){var e=ct();r(e?{type:nt.loadPatient,patientUuid:e}:{type:nt.newPatient,patient:null})}var t=!0;return n.isLoadingPatient&&n.patientUuid&&(0,rt.fetchCurrentPatient)(n.patientUuid).then((function(e){return t&&r({patient:e.data,type:nt.newPatient})}),(function(e){return t&&r({err:e,type:nt.loadError})})),function(){t=!1}}),[n.isPendingUuid,n.isLoadingPatient,n.patientUuid]),(0,o.useEffect)((function(){var e=function(e){var t=ct();t!=n.patientUuid&&r({type:nt.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[n.patientUuid]),{isLoading:n.isPendingUuid||n.isLoadingPatient,patient:n.patient,patientUuid:null!=e?e:n.patientUuid,error:n.err}}function pt(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 dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){dt(e,t,n[t])}))}return e}function yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pt(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(e,t):void 0}}(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(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(ut||(ut={}));var vt={patient:null,isLoadingPatient:!0,err:null};function gt(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function mt(e,t){switch(t.type){case ut.loadPatient:return ht({},e,{patient:null,isLoadingPatient:!0,err:null});case ut.newPatient:return ht({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case ut.loadError:return ht({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}}function bt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gt(),t=yt((0,o.useReducer)(mt,vt),2),n=t[0],r=t[1];return(0,o.useEffect)((function(){var t=!0;return e?((0,rt.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:ut.newPatient})}),(function(e){return t&&r({err:e,type:ut.loadError})})),r({type:ut.loadPatient})):r({type:ut.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]}function wt(e){var t=b(e);return(0,o.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])}f((0,p.getExtensionInternalStore)());var _t=f((0,p.getExtensionStore)());function St(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 xt(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e}function Et(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return St(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?St(e,t):void 0}}(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.")}()}((0,o.useState)(xt),2),t=e[0],n=e[1];return(0,o.useEffect)((function(){var e=function(){n(xt())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),t}function Ot(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 kt(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ot(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ot(e,t):void 0}}(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.")}()}((0,o.useState)([]),2),t=e[0],n=e[1];return(0,o.useEffect)((function(){var e=(0,rt.getLocations)().subscribe((function(e){n(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),t}function jt(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,o.useRef)(null);return(0,o.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n}function Tt(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}var Pt=function(e){var t=e.privilege,n=e.children,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Tt(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(e,t):void 0}}(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.")}()}((0,o.useState)(null),2),i=r[0],a=r[1];return(0,o.useEffect)((function(){var e=(0,rt.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return e.unsubscribe()}}),[]),i&&(0,rt.userHasAccess)(t,i)?o.createElement(o.Fragment,null,n):null};function Ct(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 At(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ct(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(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.")}()}((0,o.useState)(null),2),t=e[0],n=e[1];return(0,o.useEffect)((function(){var e=(0,rt.getCurrentUser)({includeAuthStatus:!0}).subscribe((function(e){return n(e)}));return function(){return e.unsubscribe()}}),[n]),t}var It=At,Nt=n(5385);function Rt(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 Dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Dt(e,t,n[t])}))}return e}function Mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Rt(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}(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 Ut(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}var $t=function(e){return e};function Ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$t,n=arguments.length>2?arguments[2]:void 0,r=Mt((0,o.useState)((function(){return t(e.getState())})),2),i=r[0],a=r[1];(0,o.useEffect)((function(){return(0,Nt.subscribeTo)(e,t,a)}),[e,t]);var u={};return n&&(u=(0,o.useMemo)((function(){return Ut(e,n)}),[e,n])),Lt({},i,u)}function Bt(e,t){return Ft(e,$t,t)}function zt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Vt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Wt,Kt=function(){},qt=Kt(),Ht=Object,Zt=function(e){return e===qt},Gt=function(e){return"function"==typeof e},Qt=function(e,t){return Ht.assign({},e,t)},Yt="undefined",Jt=function(){return typeof window!=Yt},Xt=new WeakMap,en=0,tn=function(e){var t,n,r=typeof e,o=e&&e.constructor,i=o==Date;if(Ht(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=Xt.get(e))return t;if(t=++en+"~",Xt.set(e,t),o==Array){for(t="@",n=0;n<e.length;n++)t+=tn(e[n])+",";Xt.set(e,t)}if(o==Ht){t="#";for(var a=Ht.keys(e).sort();!Zt(n=a.pop());)Zt(e[n])||(t+=n+":"+tn(e[n])+",");Xt.set(e,t)}}return t},nn=!0,rn=Jt(),on=typeof document!=Yt,an=rn&&window.addEventListener?window.addEventListener.bind(window):Kt,un=on?document.addEventListener.bind(document):Kt,sn=rn&&window.removeEventListener?window.removeEventListener.bind(window):Kt,cn=on?document.removeEventListener.bind(document):Kt,ln={isOnline:function(){return nn},isVisible:function(){var e=on&&document.visibilityState;return Zt(e)||"hidden"!==e}},fn={initFocus:function(e){return un("visibilitychange",e),an("focus",e),function(){cn("visibilitychange",e),sn("focus",e)}},initReconnect:function(e){var t=function(){nn=!0,e()},n=function(){nn=!1};return an("online",t),an("offline",n),function(){sn("online",t),sn("offline",n)}}},pn=!Jt()||"Deno"in window,dn=pn?o.useEffect:o.useLayoutEffect,hn="undefined"!=typeof navigator&&navigator.connection,yn=!pn&&hn&&(["slow-2g","2g"].includes(hn.effectiveType)||hn.saveData),vn=function(e){if(Gt(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?tn(e):"",t,e?"$swr$"+e:""]},gn=new WeakMap,mn=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=gn.get(e),s=u[0],c=u[1],l=u[3],f=s[t],p=c[t];if(a&&p)for(var d=0;d<p.length;++d)p[d](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},bn=0,wn=function(){return++bn},_n=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return zt(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,s,c,l,f,p,d,h,y,v,g,m,b,w;return Vt(this,(function(_){switch(_.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!Zt((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,s=!1!==i.rollbackOnError,c=i.optimisticData,l=vn(n),f=l[0],p=l[2],!f)return[2];if(d=gn.get(t),h=d[2],e.length<3)return[2,mn(t,f,t.get(f),qt,qt,u,!0)];if(y=r,g=wn(),h[f]=[g,0],m=!Zt(c),b=t.get(f),m&&(t.set(f,c),mn(t,f,c)),Gt(y))try{y=y(t.get(f))}catch(e){v=e}return y&&Gt(y.then)?[4,y.catch((function(e){v=e}))]:[3,2];case 1:if(y=_.sent(),g!==h[f][0]){if(v)throw v;return[2,y]}v&&m&&s&&(a=!0,y=b,t.set(f,b)),_.label=2;case 2:return a&&(v||(Gt(a)&&(y=a(y,b)),t.set(f,y)),t.set(p,Qt(t.get(p),{error:v}))),h[f][1]=wn(),[4,mn(t,f,y,v,qt,u,!!a)];case 3:if(w=_.sent(),v)throw v;return[2,a?w:y]}}))}))},Sn=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},xn=function(e,t){if(!gn.has(e)){var n=Qt(fn,t),r={},o=_n.bind(qt,e),i=Kt;if(gn.set(e,[r,{},{},{},o]),!pn){var a=n.initFocus(setTimeout.bind(qt,Sn.bind(qt,r,0))),u=n.initReconnect(setTimeout.bind(qt,Sn.bind(qt,r,1)));i=function(){a&&a(),u&&u(),gn.delete(e)}}return[e,o,i]}return[e,gn.get(e)[4]]},En=xn(new Map),On=En[0],kn=En[1],jn=Qt({onLoadingSlow:Kt,onSuccess:Kt,onError:Kt,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Zt(i)&&a>i||setTimeout(r,u,o)},onDiscarded:Kt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:yn?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:yn?5e3:3e3,compare:function(e,t){return tn(e)==tn(t)},isPaused:function(){return!1},cache:On,mutate:kn,fallback:{}},ln),Tn=function(e,t){var n=Qt(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Qt(o,a))}return n},Pn=(0,o.createContext)({}),Cn=function(e){return Gt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},An=function(){return Qt(jn,(0,o.useContext)(Pn))},In=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},Nn={dedupe:!0},Rn=(Ht.defineProperty((function(e){var t=e.value,n=Tn((0,o.useContext)(Pn),t),r=t&&t.provider,i=(0,o.useState)((function(){return r?xn(r(n.cache||On),t):qt}))[0];return i&&(n.cache=i[0],n.mutate=i[1]),dn((function(){return i?i[2]:qt}),[]),(0,o.createElement)(Pn.Provider,Qt(e,{value:n}))}),"default",{value:jn}),Wt=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,s=n.revalidateOnMount,c=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,p=gn.get(r),d=p[0],h=p[1],y=p[2],v=p[3],g=vn(e),m=g[0],b=g[1],w=g[2],_=(0,o.useRef)(!1),S=(0,o.useRef)(!1),x=(0,o.useRef)(m),E=(0,o.useRef)(t),O=(0,o.useRef)(n),k=function(){return O.current},j=function(){return k().isVisible()&&k().isOnline()},T=function(e){return r.set(w,Qt(r.get(w),e))},P=r.get(m),C=Zt(a)?n.fallback[m]:a,A=Zt(P)?C:P,I=r.get(w)||{},N=I.error,R=!_.current,D=function(){return R&&!Zt(s)?s:!k().isPaused()&&(u?!Zt(A):Zt(A)||n.revalidateIfStale)},L=!(!m||!t)&&(!!I.isValidating||R&&D()),M=function(e,t){var n=(0,o.useState)({})[1],r=(0,o.useRef)(e),i=(0,o.useRef)({data:!1,error:!1,isValidating:!1}),a=(0,o.useCallback)((function(e){var o=!1,a=r.current;for(var u in e){var s=u;a[s]!==e[s]&&(a[s]=e[s],i.current[s]&&(o=!0))}o&&!t.current&&n({})}),[]);return dn((function(){r.current=e})),[r,i.current,a]}({data:A,error:N,isValidating:L},S),U=M[0],$=M[1],F=M[2],B=(0,o.useCallback)((function(e){return zt(void 0,void 0,void 0,(function(){var t,o,a,u,s,c,l,f,p,d,h,g,w;return Vt(this,(function(O){switch(O.label){case 0:if(t=E.current,!m||!t||S.current||k().isPaused())return[2,!1];u=!0,s=e||{},c=!v[m]||!s.dedupe,l=function(){return!S.current&&m===x.current&&_.current},f=function(){var e=v[m];e&&e[1]===a&&delete v[m]},p={isValidating:!1},d=function(){T({isValidating:!1}),l()&&F(p)},T({isValidating:!0}),F({isValidating:!0}),O.label=1;case 1:return O.trys.push([1,3,,4]),c&&(mn(r,m,U.current.data,U.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){u&&l()&&k().onLoadingSlow(m,n)}),n.loadingTimeout),v[m]=[t.apply(void 0,b),wn()]),w=v[m],o=w[0],a=w[1],[4,o];case 2:return o=O.sent(),c&&setTimeout(f,n.dedupingInterval),v[m]&&v[m][1]===a?(T({error:qt}),p.error=qt,h=y[m],!Zt(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(d(),c&&l()&&k().onDiscarded(m),[2,!1]):(i(U.current.data,o)?p.data=U.current.data:p.data=o,i(r.get(m),o)||r.set(m,o),c&&l()&&k().onSuccess(o,m,n),[3,4])):(c&&l()&&k().onDiscarded(m),[2,!1]);case 3:return g=O.sent(),f(),k().isPaused()||(T({error:g}),p.error=g,c&&l()&&(k().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||Gt(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&j()&&k().onErrorRetry(g,m,n,B,{retryCount:(s.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,d(),l()&&c&&mn(r,m,p.data,p.error,!1),[2,!0]}}))}))}),[m]),z=(0,o.useCallback)(_n.bind(qt,r,(function(){return x.current})),[]);if(dn((function(){E.current=t,O.current=n})),dn((function(){if(m){var e=m!==x.current,t=B.bind(qt,Nn),n=0,r=In(m,h,(function(e,t,n){F(Qt({error:t,isValidating:n},i(U.current.data,e)?qt:{data:e}))})),o=In(m,d,(function(e){if(0==e){var r=Date.now();k().revalidateOnFocus&&r>n&&j()&&(n=r+k().focusThrottleInterval,t())}else if(1==e)k().revalidateOnReconnect&&j()&&t();else if(2==e)return B()}));return S.current=!1,x.current=m,_.current=!0,e&&F({data:A,error:N,isValidating:L}),D()&&(Zt(A)||pn?t():(a=t,Jt()&&typeof window.requestAnimationFrame!=Yt?window.requestAnimationFrame(a):setTimeout(a,1))),function(){S.current=!0,r(),o()}}var a}),[m,B]),dn((function(){var e;function t(){var t=Gt(c)?c(A):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){U.current.error||!l&&!k().isVisible()||!f&&!k().isOnline()?t():B(Nn).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[c,l,f,B]),(0,o.useDebugValue)(A),u&&Zt(A)&&m)throw E.current=t,O.current=n,S.current=!1,Zt(N)?B(Nn):N;return{mutate:z,get data(){return $.data=!0,A},get error(){return $.error=!0,N},get isValidating(){return $.isValidating=!0,L}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=An(),r=Cn(e),o=r[0],i=r[1],a=r[2],u=Tn(n,a),s=Wt,c=u.use;if(c)for(var l=c.length;l-- >0;)s=c[l](s);return s(o,i||u.fetcher,u)}),Dn=n(7530),Ln=n.n(Dn),Mn=n(4332),Un=n.n(Mn);function $n(e){var t,n=Rn("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(rt.defaultVisitCustomRepresentation,"&includeInactive=false"),rt.openmrsFetch),r=n.data;return{error:n.error,mutate:n.mutate,isValidating:n.isValidating,currentVisit:null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&Ln()(e.startDatetime).isToday()})))&&void 0!==t?t:null}}function Fn(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 Bn(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Fn(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fn(e,t):void 0}}(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.")}()}((0,o.useState)([]),2),t=e[0],n=e[1];return(0,o.useEffect)((function(){var e=(0,rt.getVisitTypes)().subscribe((function(e){n(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),t}function zn(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 Vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zn(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(e,t):void 0}}(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 Wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Vn((0,o.useState)(1),2),r=n[0],i=n[1],a=(0,o.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),u=(0,o.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:u,totalPages:a,currentPage:r,paginated:e.length>t,showNextButton:r<a,showPreviousButton:r>1,goTo:function(e){i(Math.max(1,Math.min(a,e)))},goToNext:function(){r<a&&i(r+1)},goToPrevious:function(){r>1&&i(r-1)}}}function Kn(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}Ln().extend(Un());var qn=function(e){var t=e.state,n=e.wrap,r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Kn(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(e,t):void 0}}(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.")}()}((0,o.useState)(),2),a=r[0],u=r[1],s=(0,o.useContext)(i).extension,c=(0,o.useCallback)((function(e){u(e)}),[]);(0,o.useEffect)((function(){if(null!=a&&s)return(0,p.renderExtension)(a,s.extensionSlotName,s.extensionSlotModuleName,s.extensionId,void 0,t)}),[null==s?void 0:s.extensionSlotName,null==s?void 0:s.extensionId,null==s?void 0:s.extensionSlotModuleName,t,a]);var l=o.createElement("div",{ref:c,"data-extension-id":null==s?void 0:s.extensionId,style:{position:"relative"}});return s&&n?n(l,s):l}},5385:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,u=0;u<a.length;u++)a[u](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=c[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return c[e]={value:o,active:!0},o},i=function(e,n){var r=c[e];if(!r){var o=t(n);return c[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},s=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return s}});var c={}}(),o}())}}}))},1645:(e,t,n)=>{"use strict";n.d(t,{aB:()=>r.AppState,jk:()=>u,W5:()=>c,zJ:()=>s,se:()=>l});var r={};function o(e,t){for(var n in t)e[n]=t[n];return e}function i(e){var t=[];function n(e){for(var n=[],r=0;r<t.length;r++)t[r]===e?e=null:n.push(t[r]);t=n}function r(n,r,i){e=r?n:o(o({},e),n);for(var a=t,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){r(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var a=t.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}n.r(r),n.d(r,{jk:()=>u,W5:()=>c,zJ:()=>s,se:()=>l});var a={};function u(e,t){var n=a[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=i(t);return a[e]={value:r,active:!0},r}function s(e,t){var n=a[e];if(!n){var r=i(t);return a[e]={value:r,active:!1},r}return n.value}function c(){return s("app",{})}function l(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))}},2210:(e,t,n)=>{"use strict";n.d(t,{iW:()=>r.InlineNotificationType,MK:()=>r.NotificationDescriptor,fU:()=>o.ToastDescriptor,yQ:()=>o.ToastNotificationMeta,pC:()=>o.ToastType,K4:()=>A,c0:()=>b,CF:()=>x});var r={};n.r(r);var o={};n.r(o),n(2735),n(2788);var i=n(2585),a=n(9295),u=n(606),s=n(175),c=n(6575),l=n(6905),f=n(7840),p=n(9494),d=n(8396),h=Object.prototype.hasOwnProperty;const y=function(e){if(null==e)return!0;if((0,l.Z)(e)&&((0,c.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,f.Z)(e)||(0,d.Z)(e)||(0,s.Z)(e)))return!e.length;var t=(0,u.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,p.Z)(e))return!(0,a.Z)(e).length;for(var n in e)if(h.call(e,n))return!1;return!0};function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=new i.xQ,m=0;function b(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!y(t))?setTimeout((function(){g.next(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}({},e,{id:m++}))}),0):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=new i.xQ,S=0;function x(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!y(t))?setTimeout((function(){_.next(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){w(e,t,n[t])}))}return e}({},e,{id:S++}))}),0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function E(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 O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}function j(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return E(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n(225);var T=(0,n(5385).createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]});function P(e){var t=T.getState(),n=[e].concat(j(t.modalStack));T.setState(k({},t,{modalStack:n}))}function C(e){var t=T.getState(),n=t.modalStack.map((function(t){return t===e?k({},t,{state:"TO_BE_DELETED"}):t}));T.setState(k({},t,{modalStack:n}))}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=function(){var e=T.getState().modalStack.find((function(e){return e.onClose===n}));e&&C(e)};return P({state:"NEW",onClose:n,extensionId:e,props:k({extensionId:e,close:r},t)}),r}window.getComputedStyle(document.body).overflow},7968:(e,t,n)=>{const r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:(e,t,n)=>{t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a};Number.isInteger},6763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"Map")},7851:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(658).Z.Symbol},963:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7851),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.Z?r.Z.toStringTag:void 0;var s=Object.prototype.toString;var c=r.Z?r.Z.toStringTag:void 0;const l=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}(e):function(e){return s.call(e)}(e)}},9295:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9494);const o=(0,n(6899).Z)(Object.keys,Object);var i=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,r.Z)(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5852:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(3200);const o=n(658).Z["__core-js_shared__"];var i,a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";var u=n(7275),s=n(9441),c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(e){return!(!(0,u.Z)(e)||(t=e,a&&a in t))&&((0,r.Z)(e)?h:c).test((0,s.Z)(e));var t},v=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return y(n)?n:void 0}},606:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(682),o=n(658);const i=(0,r.Z)(o.Z,"DataView");var a=n(6763);const u=(0,r.Z)(o.Z,"Promise"),s=(0,r.Z)(o.Z,"Set"),c=(0,r.Z)(o.Z,"WeakMap");var l=n(963),f=n(9441),p="[object Map]",d="[object Promise]",h="[object Set]",y="[object WeakMap]",v="[object DataView]",g=(0,f.Z)(i),m=(0,f.Z)(a.Z),b=(0,f.Z)(u),w=(0,f.Z)(s),_=(0,f.Z)(c),S=l.Z;(i&&S(new i(new ArrayBuffer(1)))!=v||a.Z&&S(new a.Z)!=p||u&&S(u.resolve())!=d||s&&S(new s)!=h||c&&S(new c)!=y)&&(S=function(e){var t=(0,l.Z)(e),n="[object Object]"==t?e.constructor:void 0,r=n?(0,f.Z)(n):"";if(r)switch(r){case g:return v;case m:return p;case b:return d;case w:return h;case _:return y}return t});const x=S},9494:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=Object.prototype;const o=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},6899:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e,t){return function(n){return e(t(n))}}},658:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5852),o="object"==typeof self&&self&&self.Object===Object&&self;const i=r.Z||o||Function("return this")()},9441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>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""}},175:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(963),o=n(4897);const i=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,r.Z)(e)};var a=Object.prototype,u=a.hasOwnProperty,s=a.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(e){return(0,o.Z)(e)&&u.call(e,"callee")&&!s.call(e,"callee")};const l=c},6575:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Array.isArray},6905:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(3200),o=n(3492);const i=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,r.Z)(e)}},7840:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(658);var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=i&&i.exports===o?r.Z.Buffer:void 0;const u=(a?a.isBuffer:void 0)||function(){return!1}},3202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var i=Array.prototype.splice;function a(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])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.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))},a.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.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 u=a;var s=n(6763);const c=(0,n(682).Z)(Object,"create");var l=Object.prototype.hasOwnProperty;var f=Object.prototype.hasOwnProperty;function p(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])}}p.prototype.clear=function(){this.__data__=c?c(null):{},this.size=0},p.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},p.prototype.get=function(e){var t=this.__data__;if(c){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return l.call(t,e)?t[e]:void 0},p.prototype.has=function(e){var t=this.__data__;return c?void 0!==t[e]:f.call(t,e)},p.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=c&&void 0===t?"__lodash_hash_undefined__":t,this};const d=p,h=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 y(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])}}y.prototype.clear=function(){this.size=0,this.__data__={hash:new d,map:new(s.Z||u),string:new d}},y.prototype.delete=function(e){var t=h(this,e).delete(e);return this.size-=t?1:0,t},y.prototype.get=function(e){return h(this,e).get(e)},y.prototype.has=function(e){return h(this,e).has(e)},y.prototype.set=function(e,t){var n=h(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const v=y;function g(e){var t=this.__data__=new u(e);this.size=t.size}g.prototype.clear=function(){this.__data__=new u,this.size=0},g.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},g.prototype.get=function(e){return this.__data__.get(e)},g.prototype.has=function(e){return this.__data__.has(e)},g.prototype.set=function(e,t){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!s.Z||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new v(r)}return n.set(e,t),this.size=n.size,this};const m=g;function b(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new v;++t<n;)this.add(e[t])}b.prototype.add=b.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},b.prototype.has=function(e){return this.__data__.has(e)};const w=b,_=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},S=function(e,t,n,r,o,i){var a=1&n,u=e.length,s=t.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,d=2&n?new w:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],y=t[f];if(r)var v=a?r(y,h,f,t,e,i):r(h,y,f,e,t,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!_(t,(function(e,t){if(a=t,!d.has(a)&&(h===e||o(h,e,n,r,i)))return d.push(t);var a}))){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p};var x=n(7851);const E=n(658).Z.Uint8Array,O=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},k=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var j=x.Z?x.Z.prototype:void 0,T=j?j.valueOf:void 0;var P=n(6575);var C=Object.prototype.propertyIsEnumerable,A=Object.getOwnPropertySymbols;const I=A?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 a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(A(e),(function(t){return C.call(e,t)})))}:function(){return[]};var N=n(175),R=n(7840),D=/^(?:0|[1-9]\d*)$/;const L=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&D.test(e))&&e>-1&&e%1==0&&e<t};var M=n(8396),U=Object.prototype.hasOwnProperty;const $=function(e,t){var n=(0,P.Z)(e),r=!n&&(0,N.Z)(e),o=!n&&!r&&(0,R.Z)(e),i=!n&&!r&&!o&&(0,M.Z)(e),a=n||r||o||i,u=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=u.length;for(var c in e)!t&&!U.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||L(c,s))||u.push(c);return u};var F=n(9295),B=n(6905);const z=function(e){return(0,B.Z)(e)?$(e):(0,F.Z)(e)},V=function(e){return function(e,t,n){var r=t(e);return(0,P.Z)(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,z,I)};var W=Object.prototype.hasOwnProperty;var K=n(606),q="[object Arguments]",H="[object Array]",Z="[object Object]",G=Object.prototype.hasOwnProperty;const Q=function(e,t,n,o,i,a){var u=(0,P.Z)(e),s=(0,P.Z)(t),c=u?H:(0,K.Z)(e),l=s?H:(0,K.Z)(t),f=(c=c==q?Z:c)==Z,p=(l=l==q?Z:l)==Z,d=c==l;if(d&&(0,R.Z)(e)){if(!(0,R.Z)(t))return!1;u=!0,f=!1}if(d&&!f)return a||(a=new m),u||(0,M.Z)(e)?S(e,t,n,o,i,a):function(e,t,n,o,i,a,u){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||!a(new E(e),new E(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+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 s=O;case"[object Set]":var c=1&o;if(s||(s=k),e.size!=t.size&&!c)return!1;var l=u.get(e);if(l)return l==t;o|=2,u.set(e,t);var f=S(s(e),s(t),o,i,a,u);return u.delete(e),f;case"[object Symbol]":if(T)return T.call(e)==T.call(t)}return!1}(e,t,c,n,o,i,a);if(!(1&n)){var h=f&&G.call(e,"__wrapped__"),y=p&&G.call(t,"__wrapped__");if(h||y){var v=h?e.value():e,g=y?t.value():t;return a||(a=new m),i(v,g,n,o,a)}}return!!d&&(a||(a=new m),function(e,t,n,r,o,i){var a=1&n,u=V(e),s=u.length;if(s!=V(t).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in t:W.call(t,l)))return!1}var f=i.get(e),p=i.get(t);if(f&&p)return f==t&&p==e;var d=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<s;){var y=e[l=u[c]],v=t[l];if(r)var g=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(d=!1)}return i.delete(e),i.delete(t),d}(e,t,n,o,i,a))};var Y=n(4897);const J=function e(t,n,r,o,i){return t===n||(null==t||null==n||!(0,Y.Z)(t)&&!(0,Y.Z)(n)?t!=t&&n!=n:Q(t,n,r,o,e,i))},X=function(e,t){return J(e,t)}},3200:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(963),o=n(7275);const i=function(e){if(!(0,o.Z)(e))return!1;var t=(0,r.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},3492:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7275:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},4897:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return null!=e&&"object"==typeof e}},8396:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(963),o=n(3492),i=n(4897),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var u=n(5852),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=s&&"object"==typeof module&&module&&!module.nodeType&&module,l=c&&c.exports===s&&u.Z.process,f=function(){try{return c&&c.require&&c.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}(),p=f&&f.isTypedArray;const d=p?(h=p,function(e){return h(e)}):function(e){return(0,i.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,r.Z)(e)]};var h}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={id:t,loaded:!1,exports:{}};return e[t].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.y=t,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var o={};return(0,r(7968).s)(1),(()=>{"use strict";r.r(o),r.d(o,{AppState:()=>f.aB,AssignedExtension:()=>u.pv,CancelLoading:()=>u.x9,ConfigStore:()=>i.JU,ConfigurableLink:()=>l.w,ConnectedExtension:()=>u.uP,ConnectivityChangedEvent:()=>s.ac,Extension:()=>l.hj,ExtensionData:()=>l.g,ExtensionMeta:()=>u.uu,ExtensionRegistration:()=>u.tj,ExtensionSlot:()=>l.dT,ExtensionSlotState:()=>u.u_,ExtensionStore:()=>u.qN,InlineNotificationType:()=>p.iW,NotificationDescriptor:()=>p.MK,OfflineMode:()=>c.iC,OfflineModeResult:()=>c.Vm,OpenmrsFetchError:()=>e.nF,PrecacheStaticDependenciesEvent:()=>s.hM,QueueItemDescriptor:()=>c.Cg,ShowNotificationEvent:()=>s.Kj,ShowToastEvent:()=>s.P3,SyncItem:()=>c.we,SyncProcessOptions:()=>c.Ug,ToastDescriptor:()=>p.fU,ToastNotificationMeta:()=>p.yQ,ToastType:()=>p.pC,Type:()=>i.Dy,UserHasAccess:()=>l.Vz,VisitMode:()=>e.u4,VisitStatus:()=>e.Rx,attach:()=>u.ub,backendDependencies:()=>e.Wf,beginEditSynchronizationItem:()=>c.jp,canBeginEditSynchronizationItemsOfType:()=>c.Qd,createGlobalStore:()=>f.jk,createUseStore:()=>l.NV,defaultVisitCustomRepresentation:()=>e.I$,defineConfigSchema:()=>i.SH,defineExtensionConfigSchema:()=>i.Tj,deleteSynchronizationItem:()=>c.Gy,detach:()=>u.og,detachAll:()=>u.lW,fetchCurrentPatient:()=>e.Vy,fhir:()=>e.N$,fhirBaseUrl:()=>e.DN,generateOfflineUuid:()=>c.sF,getAppState:()=>f.W5,getAssignedExtensions:()=>u.h6,getAsyncExtensionLifecycle:()=>l.D$,getAsyncLifecycle:()=>l.Ae,getConfig:()=>i.iE,getConfigStore:()=>i.pR,getConnectedExtensions:()=>u.Kq,getCurrentOfflineMode:()=>c.vm,getCurrentUser:()=>e.ts,getExtensionNameFromId:()=>u.EB,getExtensionStore:()=>u.yw,getGlobalStore:()=>f.zJ,getLifecycle:()=>l.tl,getLocations:()=>e.JC,getLoggedInUser:()=>e.r,getOfflineDb:()=>c.aA,getOfflinePatientDataStore:()=>c.k1,getSessionLocation:()=>e.WK,getStartedVisit:()=>e.$X,getSyncLifecycle:()=>l.a$,getSynchronizationItem:()=>c.TI,getSynchronizationItems:()=>c.Q2,getVisitTypes:()=>e.P9,getVisitsForPatient:()=>e.nx,inRange:()=>i.Z2,interpolateString:()=>i.IT,interpolateUrl:()=>i.ll,isOfflineUuid:()=>c.z7,isUrl:()=>i.CB,isUrlWithTemplateParameters:()=>i.gZ,loadPersistedPatientDataSyncState:()=>c.nN,makeUrl:()=>e.bf,messageOmrsServiceWorker:()=>c.gp,navigate:()=>i.c4,offlineUuidPrefix:()=>c.a7,omrsOfflineCachingStrategyHttpHeaderName:()=>c.Rz,omrsOfflineResponseBodyHttpHeaderName:()=>c.QI,omrsOfflineResponseStatusHttpHeaderName:()=>c.$9,openmrsFetch:()=>e.vb,openmrsObservableFetch:()=>e.uj,provide:()=>i.JJ,queueSynchronizationItem:()=>c.X2,refetchCurrentUser:()=>e.VJ,registerExtension:()=>u.ix,registerExtensionSlot:()=>u.Qq,registerOfflinePatientHandler:()=>c.dt,renderExtension:()=>u.H8,saveVisit:()=>e.bX,sessionEndpoint:()=>e.z$,setSessionLocation:()=>e.jK,setupOfflineSync:()=>c.H_,showModal:()=>p.K4,showNotification:()=>p.c0,showToast:()=>p.CF,subscribeConnectivity:()=>s.BW,subscribeConnectivityChanged:()=>s.XS,subscribeNotificationShown:()=>s.NQ,subscribePrecacheStaticDependencies:()=>s.dY,subscribeTo:()=>f.se,subscribeToastShown:()=>s.id,syncOfflinePatientData:()=>c.MO,toLocationObject:()=>e.Lq,toVisitTypeObject:()=>e.VF,updateVisit:()=>e.ym,useAssignedExtensionIds:()=>l.YV,useAssignedExtensions:()=>l.P3,useBodyScrollLock:()=>l.yn,useConfig:()=>l.ZR,useConnectedExtensions:()=>l.BL,useConnectivity:()=>l.Y9,useCurrentPatient:()=>l.Yq,useExtensionSlot:()=>l.p8,useExtensionSlotMeta:()=>l.qd,useExtensionStore:()=>l.jf,useLayoutType:()=>l.mr,useLocations:()=>l.Z_,useOnClickOutside:()=>l.t$,usePagination:()=>l.h0,usePatient:()=>l.lm,useSession:()=>l.kP,useSessionUser:()=>l.Oy,useStore:()=>l.oR,useStoreWithActions:()=>l.xQ,useVisit:()=>l.JF,useVisitTypes:()=>l.NN,userHasAccess:()=>e.y9,validator:()=>i.sC,validators:()=>i.z2});var e=r(8166),t=r(6066),n={};for(const e in t)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess"].indexOf(e)<0&&(n[e]=()=>t[e]);r.d(o,n);var i=r(3373),a=r(674);n={};for(const e in a)["default","OpenmrsFetchError","VisitMode","VisitStatus","backendDependencies","defaultVisitCustomRepresentation","fetchCurrentPatient","fhir","fhirBaseUrl","getCurrentUser","getLocations","getLoggedInUser","getSessionLocation","getStartedVisit","getVisitTypes","getVisitsForPatient","makeUrl","openmrsFetch","openmrsObservableFetch","refetchCurrentUser","saveVisit","sessionEndpoint","setSessionLocation","toLocationObject","toVisitTypeObject","updateVisit","userHasAccess","ConfigStore","Type","defineConfigSchema","defineExtensionConfigSchema","getConfig","getConfigStore","inRange","interpolateString","interpolateUrl","isUrl","isUrlWithTemplateParameters","navigate","provide","validator","validators"].indexOf(e)<0&&(n[e]=()=>a[e]);r.d(o,n);var u=r(6856),s=r(2034),c=r(6904),l=r(9883),f=r(1645),p=r(2210)})(),o})())}}}));
|
|
3
3
|
//# sourceMappingURL=openmrs-esm-framework.js.map
|