????

Your IP : 3.144.48.13


Current Path : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/
Upload File :
Current File : C:/inetpub/vhost/dbadm.gdtsolutions.vn/web/js/vendor-async-862d3dfc323249e52c7d.js

/*! For license information please see ../license.txt */
(self.webpackChunk_cloudbeaver_product_default=self.webpackChunk_cloudbeaver_product_default||[]).push([[62570],{82897:(d,x,M)=>{"use strict";M.d(x,{fY:()=>Q,mh:()=>$});var E=!1;if("undefined"!=typeof window){var C={get passive(){E=!0}};window.addEventListener("testPassive",null,C),window.removeEventListener("testPassive",null,C)}var j="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),R=[],D=!1,B=-1,F=void 0,q=void 0,K=function allowTouchMove(d){return R.some((function(x){return!(!x.options.allowTouchMove||!x.options.allowTouchMove(d))}))},V=function preventDefault(d){var x=d||window.event;return!!K(x.target)||(x.touches.length>1||(x.preventDefault&&x.preventDefault(),!1))},W=function restoreOverflowSetting(){void 0!==q&&(document.body.style.paddingRight=q,q=void 0),void 0!==F&&(document.body.style.overflow=F,F=void 0)},$=function disableBodyScroll(d,x){if(d){if(!R.some((function(x){return x.targetElement===d}))){var M={targetElement:d,options:x||{}};R=[].concat(function _toConsumableArray(d){if(Array.isArray(d)){for(var x=0,M=Array(d.length);x<d.length;x++)M[x]=d[x];return M}return Array.from(d)}(R),[M]),j?(d.ontouchstart=function(d){1===d.targetTouches.length&&(B=d.targetTouches[0].clientY)},d.ontouchmove=function(x){1===x.targetTouches.length&&function handleScroll(d,x){var M=d.targetTouches[0].clientY-B;!K(d.target)&&(x&&0===x.scrollTop&&M>0||function isTargetElementTotallyScrolled(d){return!!d&&d.scrollHeight-d.scrollTop<=d.clientHeight}(x)&&M<0?V(d):d.stopPropagation())}(x,d)},D||(document.addEventListener("touchmove",V,E?{passive:!1}:void 0),D=!0)):function setOverflowHidden(d){if(void 0===q){var x=!!d&&!0===d.reserveScrollBarGap,M=window.innerWidth-document.documentElement.clientWidth;x&&M>0&&(q=document.body.style.paddingRight,document.body.style.paddingRight=M+"px")}void 0===F&&(F=document.body.style.overflow,document.body.style.overflow="hidden")}(x)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},Q=function enableBodyScroll(d){d?(R=R.filter((function(x){return x.targetElement!==d})),j?(d.ontouchstart=null,d.ontouchmove=null,D&&0===R.length&&(document.removeEventListener("touchmove",V,E?{passive:!1}:void 0),D=!1)):R.length||W()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")}},29103:function(d,x,M){d.exports=function(){"use strict";var s=function(d,x){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,x){d.__proto__=x}||function(d,x){for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&(d[M]=x[M])})(d,x)},w=function(){return(w=Object.assign||function(d){for(var x,M=1,E=arguments.length;M<E;M++)for(var C in x=arguments[M])Object.prototype.hasOwnProperty.call(x,C)&&(d[C]=x[C]);return d}).apply(this,arguments)};function i(d,x,M){if(M||2===arguments.length)for(var E,C=0,j=x.length;C<j;C++)!E&&C in x||((E=E||Array.prototype.slice.call(x,0,C))[C]=x[C]);return d.concat(E||Array.prototype.slice.call(x))}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:M.g,x=Object.keys,E=Array.isArray;function a(d,M){return"object"!=typeof M||x(M).forEach((function(x){d[x]=M[x]})),d}"undefined"==typeof Promise||d.Promise||(d.Promise=Promise);var C=Object.getPrototypeOf,j={}.hasOwnProperty;function m(d,x){return j.call(d,x)}function r(d,M){"function"==typeof M&&(M=M(C(d))),("undefined"==typeof Reflect?x:Reflect.ownKeys)(M).forEach((function(x){l(d,x,M[x])}))}var R=Object.defineProperty;function l(d,x,M,E){R(d,x,a(M&&m(M,"get")&&"function"==typeof M.get?{get:M.get,set:M.set,configurable:!0}:{value:M,configurable:!0,writable:!0},E))}function o(d){return{from:function(x){return d.prototype=Object.create(x.prototype),l(d.prototype,"constructor",d),{extend:r.bind(null,d.prototype)}}}}var D=Object.getOwnPropertyDescriptor,B=[].slice;function b(d,x,M){return B.call(d,x,M)}function p(d,x){return x(d)}function y(d){if(!d)throw new Error("Assertion Failed")}function v(x){d.setImmediate?setImmediate(x):setTimeout(x,0)}function k(d,x){if("string"==typeof x&&m(d,x))return d[x];if(!x)return d;if("string"!=typeof x){for(var M=[],E=0,C=x.length;E<C;++E){var j=k(d,x[E]);M.push(j)}return M}var R=x.indexOf(".");if(-1!==R){var D=d[x.substr(0,R)];return null==D?void 0:k(D,x.substr(R+1))}}function P(d,x,M){if(d&&void 0!==x&&(!("isFrozen"in Object)||!Object.isFrozen(d)))if("string"!=typeof x&&"length"in x){y("string"!=typeof M&&"length"in M);for(var C=0,j=x.length;C<j;++C)P(d,x[C],M[C])}else{var R,D,B=x.indexOf(".");-1!==B?(R=x.substr(0,B),""===(D=x.substr(B+1))?void 0===M?E(d)&&!isNaN(parseInt(R))?d.splice(R,1):delete d[R]:d[R]=M:P(B=(B=d[R])&&m(d,R)?B:d[R]={},D,M)):void 0===M?E(d)&&!isNaN(parseInt(x))?d.splice(x,1):delete d[x]:d[x]=M}}function g(d){var x,M={};for(x in d)m(d,x)&&(M[x]=d[x]);return M}var F=[].concat;function O(d){return F.apply([],d)}var q="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(O([8,16,32,64].map((function(d){return["Int","Uint","Float"].map((function(x){return x+d+"Array"}))})))).filter((function(x){return d[x]})),K=new Set(q.map((function(x){return d[x]}))),V=null;function S(d){return V=new WeakMap,d=function e(d){if(!d||"object"!=typeof d)return d;var x=V.get(d);if(x)return x;if(E(d)){x=[],V.set(d,x);for(var M=0,j=d.length;M<j;++M)x.push(e(d[M]))}else if(K.has(d.constructor))x=d;else{var R,D=C(d);for(R in x=D===Object.prototype?{}:Object.create(D),V.set(d,x),d)m(d,R)&&(x[R]=e(d[R]))}return x}(d),V=null,d}var W={}.toString;function A(d){return W.call(d).slice(8,-1)}var $="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Q="symbol"==typeof $?function(d){var x;return null!=d&&(x=d[$])&&x.apply(d)}:function(){return null};function T(d,x){return 0<=(x=d.indexOf(x))&&d.splice(x,1),0<=x}var Y={};function I(d){var x,M,C,j;if(1===arguments.length){if(E(d))return d.slice();if(this===Y&&"string"==typeof d)return[d];if(j=Q(d)){for(M=[];!(C=j.next()).done;)M.push(C.value);return M}if(null==d)return[d];if("number"!=typeof(x=d.length))return[d];for(M=new Array(x);x--;)M[x]=d[x];return M}for(x=arguments.length,M=new Array(x);x--;)M[x]=arguments[x];return M}var ie="undefined"!=typeof Symbol?function(d){return"AsyncFunction"===d[Symbol.toStringTag]}:function(){return!1},ae=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(ge=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"]),se={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 N(d,x){this.name=d,this.message=x}function L(d,x){return d+". Errors: "+Object.keys(x).map((function(d){return x[d].toString()})).filter((function(d,x,M){return M.indexOf(d)===x})).join("\n")}function U(d,x,M,E){this.failures=x,this.failedKeys=E,this.successCount=M,this.message=L(d,x)}function z(d,x){this.name="BulkError",this.failures=Object.keys(x).map((function(d){return x[d]})),this.failuresByPos=x,this.message=L(d,this.failures)}o(N).from(Error).extend({toString:function(){return this.name+": "+this.message}}),o(U).from(N),o(z).from(N);var ue=ae.reduce((function(d,x){return d[x]=x+"Error",d}),{}),ce=N,he=ae.reduce((function(d,x){var M=x+"Error";function t(d,E){this.name=M,d?"string"==typeof d?(this.message="".concat(d).concat(E?"\n "+E:""),this.inner=E||null):"object"==typeof d&&(this.message="".concat(d.name," ").concat(d.message),this.inner=d):(this.message=se[x]||M,this.inner=null)}return o(t).from(ce),d[x]=t,d}),{});he.Syntax=SyntaxError,he.Type=TypeError,he.Range=RangeError;var fe=ge.reduce((function(d,x){return d[x+"Error"]=he[x],d}),{}),de=ae.reduce((function(d,x){return-1===["Syntax","Type","Range"].indexOf(x)&&(d[x+"Error"]=he[x]),d}),{});function G(){}function X(d){return d}function H(d,x){return null==d||d===X?x:function(M){return x(d(M))}}function J(d,x){return function(){d.apply(this,arguments),x.apply(this,arguments)}}function Z(d,x){return d===G?x:function(){var M=d.apply(this,arguments);void 0!==M&&(arguments[0]=M);var E=this.onsuccess,C=this.onerror;this.onsuccess=null,this.onerror=null;var j=x.apply(this,arguments);return E&&(this.onsuccess=this.onsuccess?J(E,this.onsuccess):E),C&&(this.onerror=this.onerror?J(C,this.onerror):C),void 0!==j?j:M}}function ee(d,x){return d===G?x:function(){d.apply(this,arguments);var M=this.onsuccess,E=this.onerror;this.onsuccess=this.onerror=null,x.apply(this,arguments),M&&(this.onsuccess=this.onsuccess?J(M,this.onsuccess):M),E&&(this.onerror=this.onerror?J(E,this.onerror):E)}}function te(d,x){return d===G?x:function(M){var E=d.apply(this,arguments);a(M,E);var C=this.onsuccess,j=this.onerror;return this.onsuccess=null,this.onerror=null,M=x.apply(this,arguments),C&&(this.onsuccess=this.onsuccess?J(C,this.onsuccess):C),j&&(this.onerror=this.onerror?J(j,this.onerror):j),void 0===E?void 0===M?void 0:M:a(E,M)}}function ne(d,x){return d===G?x:function(){return!1!==x.apply(this,arguments)&&d.apply(this,arguments)}}function re(d,x){return d===G?x:function(){var M=d.apply(this,arguments);if(M&&"function"==typeof M.then){for(var E=this,C=arguments.length,j=new Array(C);C--;)j[C]=arguments[C];return M.then((function(){return x.apply(E,j)}))}return x.apply(this,arguments)}}de.ModifyError=U,de.DexieError=N,de.BulkError=z;var pe="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function oe(d){pe=d}var me={},ve=100,ge=(q="undefined"==typeof Promise?[]:function(){var d=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[d,C(d),d];var x=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[x,C(x),d]}(),q[0]),ye=(ae=q[1],q=q[2],ae=ae&&ae.then,ge&&ge.constructor),be=!!q,le=function(d,x){qe.push([d,x]),we&&(queueMicrotask(Se),we=!1)},xe=!0,we=!0,Me=[],Ie=[],Re=X,Be={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:G,pgp:!1,env:{},finalize:G},Fe=Be,qe=[],He=0,Xe=[];function _e(d){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var x=this._PSD=Fe;if("function"!=typeof d){if(d!==me)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Oe(this,this._value))}this._state=null,this._value=null,++x.ref,function t(d,x){try{x((function(x){if(null===d._state){if(x===d)throw new TypeError("A promise cannot be resolved with itself.");var M=d._lib&&je();x&&"function"==typeof x.then?t(d,(function(d,M){x instanceof _e?x._then(d,M):x.then(d,M)})):(d._state=!0,d._value=x,Pe(d)),M&&Ae()}}),Oe.bind(null,d))}catch(x){Oe(d,x)}}(this,d)}var Ze={get:function(){var d=Fe,x=rt;function e(M,E){var C=this,j=!d.global&&(d!==Fe||x!==rt),R=j&&!Ue(),D=new _e((function(x,D){Ee(C,new ke(Qe(M,d,j,R),Qe(E,d,j,R),x,D,d))}));return this._consoleTask&&(D._consoleTask=this._consoleTask),D}return e.prototype=me,e},set:function(d){l(this,"then",d&&d.prototype===me?Ze:{get:function(){return d},set:Ze.set})}};function ke(d,x,M,E,C){this.onFulfilled="function"==typeof d?d:null,this.onRejected="function"==typeof x?x:null,this.resolve=M,this.reject=E,this.psd=C}function Oe(d,x){var M,E;Ie.push(x),null===d._state&&(M=d._lib&&je(),x=Re(x),d._state=!1,d._value=x,E=d,Me.some((function(d){return d._value===E._value}))||Me.push(E),Pe(d),M&&Ae())}function Pe(d){var x=d._listeners;d._listeners=[];for(var M=0,E=x.length;M<E;++M)Ee(d,x[M]);var C=d._PSD;--C.ref||C.finalize(),0===He&&(++He,le((function(){0==--He&&Ce()}),[]))}function Ee(d,x){if(null!==d._state){var M=d._state?x.onFulfilled:x.onRejected;if(null===M)return(d._state?x.resolve:x.reject)(d._value);++x.psd.ref,++He,le(Ke,[M,d,x])}else d._listeners.push(x)}function Ke(d,x,M){try{var E,C=x._value;!x._state&&Ie.length&&(Ie=[]),E=pe&&x._consoleTask?x._consoleTask.run((function(){return d(C)})):d(C),x._state||-1!==Ie.indexOf(C)||function(d){for(var x=Me.length;x;)if(Me[--x]._value===d._value)return Me.splice(x,1)}(x),M.resolve(E)}catch(d){M.reject(d)}finally{0==--He&&Ce(),--M.psd.ref||M.psd.finalize()}}function Se(){$e(Be,(function(){je()&&Ae()}))}function je(){var d=xe;return we=xe=!1,d}function Ae(){var d,x,M;do{for(;0<qe.length;)for(d=qe,qe=[],M=d.length,x=0;x<M;++x){var E=d[x];E[0].apply(null,E[1])}}while(0<qe.length);we=xe=!0}function Ce(){var d=Me;Me=[],d.forEach((function(d){d._PSD.onunhandled.call(null,d._value,d)}));for(var x=Xe.slice(0),M=x.length;M;)x[--M]()}function De(d){return new _e(me,!1,d)}function Te(d,x){var M=Fe;return function(){var E=je(),C=Fe;try{return We(M,!0),d.apply(this,arguments)}catch(E){x&&x(E)}finally{We(C,!1),E&&Ae()}}}r(_e.prototype,{then:Ze,_then:function(d,x){Ee(this,new ke(null,null,d,x,Fe))},catch:function(d){if(1===arguments.length)return this.then(null,d);var x=d,M=arguments[1];return"function"==typeof x?this.then(null,(function(d){return(d instanceof x?M:De)(d)})):this.then(null,(function(d){return(d&&d.name===x?M:De)(d)}))},finally:function(d){return this.then((function(x){return _e.resolve(d()).then((function(){return x}))}),(function(x){return _e.resolve(d()).then((function(){return De(x)}))}))},timeout:function(d,x){var M=this;return d<1/0?new _e((function(E,C){var j=setTimeout((function(){return C(new he.Timeout(x))}),d);M.then(E,C).finally(clearTimeout.bind(null,j))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&l(_e.prototype,Symbol.toStringTag,"Dexie.Promise"),Be.env=Ye(),r(_e,{all:function(){var d=I.apply(null,arguments).map(ze);return new _e((function(x,M){0===d.length&&x([]);var E=d.length;d.forEach((function(C,j){return _e.resolve(C).then((function(M){d[j]=M,--E||x(d)}),M)}))}))},resolve:function(d){return d instanceof _e?d:d&&"function"==typeof d.then?new _e((function(x,M){d.then(x,M)})):new _e(me,!0,d)},reject:De,race:function(){var d=I.apply(null,arguments).map(ze);return new _e((function(x,M){d.map((function(d){return _e.resolve(d).then(x,M)}))}))},PSD:{get:function(){return Fe},set:function(d){return Fe=d}},totalEchoes:{get:function(){return rt}},newPSD:Ne,usePSD:$e,scheduler:{get:function(){return le},set:function(d){le=d}},rejectionMapper:{get:function(){return Re},set:function(d){Re=d}},follow:function(d,x){return new _e((function(M,E){return Ne((function(x,M){var E=Fe;E.unhandleds=[],E.onunhandled=M,E.finalize=J((function(){var d,E=this;d=function(){0===E.unhandleds.length?x():M(E.unhandleds[0])},Xe.push((function e(){d(),Xe.splice(Xe.indexOf(e),1)})),++He,le((function(){0==--He&&Ce()}),[])}),E.finalize),d()}),x,M,E)}))}}),ye&&(ye.allSettled&&l(_e,"allSettled",(function(){var d=I.apply(null,arguments).map(ze);return new _e((function(x){0===d.length&&x([]);var M=d.length,E=new Array(M);d.forEach((function(d,C){return _e.resolve(d).then((function(d){return E[C]={status:"fulfilled",value:d}}),(function(d){return E[C]={status:"rejected",reason:d}})).then((function(){return--M||x(E)}))}))}))})),ye.any&&"undefined"!=typeof AggregateError&&l(_e,"any",(function(){var d=I.apply(null,arguments).map(ze);return new _e((function(x,M){0===d.length&&M(new AggregateError([]));var E=d.length,C=new Array(E);d.forEach((function(d,j){return _e.resolve(d).then((function(d){return x(d)}),(function(d){C[j]=d,--E||M(new AggregateError(C))}))}))}))})));var Je={awaits:0,echoes:0,id:0},et=0,tt=[],nt=0,rt=0,ot=0;function Ne(d,x,M,E){var C=Fe,j=Object.create(C);return j.parent=C,j.ref=0,j.global=!1,j.id=++ot,Be.env,j.env=be?{Promise:_e,PromiseProp:{value:_e,configurable:!0,writable:!0},all:_e.all,race:_e.race,allSettled:_e.allSettled,any:_e.any,resolve:_e.resolve,reject:_e.reject}:{},x&&a(j,x),++C.ref,j.finalize=function(){--this.parent.ref||this.parent.finalize()},E=$e(j,d,M,E),0===j.ref&&j.finalize(),E}function Le(){return Je.id||(Je.id=++et),++Je.awaits,Je.echoes+=ve,Je.id}function Ue(){return!!Je.awaits&&(0==--Je.awaits&&(Je.id=0),Je.echoes=Je.awaits*ve,!0)}function ze(d){return Je.echoes&&d&&d.constructor===ye?(Le(),d.then((function(d){return Ue(),d}),(function(d){return Ue(),ft(d)}))):d}function Ve(){var d=tt[tt.length-1];tt.pop(),We(d,!1)}function We(x,M){var E,C=Fe;(M?!Je.echoes||nt++&&x===Fe:!nt||--nt&&x===Fe)||queueMicrotask(M?function(d){++rt,Je.echoes&&0!=--Je.echoes||(Je.echoes=Je.awaits=Je.id=0),tt.push(Fe),We(d,!0)}.bind(null,x):Ve),x!==Fe&&(Fe=x,C===Be&&(Be.env=Ye()),be&&(E=Be.env.Promise,M=x.env,(C.global||x.global)&&(Object.defineProperty(d,"Promise",M.PromiseProp),E.all=M.all,E.race=M.race,E.resolve=M.resolve,E.reject=M.reject,M.allSettled&&(E.allSettled=M.allSettled),M.any&&(E.any=M.any))))}function Ye(){var x=d.Promise;return be?{Promise:x,PromiseProp:Object.getOwnPropertyDescriptor(d,"Promise"),all:x.all,race:x.race,allSettled:x.allSettled,any:x.any,resolve:x.resolve,reject:x.reject}:{}}function $e(d,x,M,E,C){var j=Fe;try{return We(d,!0),x(M,E,C)}finally{We(j,!1)}}function Qe(d,x,M,E){return"function"!=typeof d?d:function(){var C=Fe;M&&Le(),We(x,!0);try{return d.apply(this,arguments)}finally{We(C,!1),E&&queueMicrotask(Ue)}}}function Ge(d){Promise===ye&&0===Je.echoes?0===nt?d():enqueueNativeMicroTask(d):setTimeout(d,0)}-1===(""+ae).indexOf("[native code]")&&(Le=Ue=G);var ft=_e.reject,xt=String.fromCharCode(65535),Mt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ot="String expected.",Nt=[],Lt="__dbnames",Ft="readonly",qt="readwrite";function it(d,x){return d?x?function(){return d.apply(this,arguments)&&x.apply(this,arguments)}:d:x}var Gt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function at(d){return"string"!=typeof d||/\./.test(d)?function(d){return d}:function(x){return void 0===x[d]&&d in x&&delete(x=S(x))[d],x}}function ut(){throw he.Type()}function st(d,x){try{var M=ct(d),E=ct(x);if(M!==E)return"Array"===M?1:"Array"===E?-1:"binary"===M?1:"binary"===E?-1:"string"===M?1:"string"===E?-1:"Date"===M?1:"Date"!==E?NaN:-1;switch(M){case"number":case"Date":case"string":return x<d?1:d<x?-1:0;case"binary":return function(d,x){for(var M=d.length,E=x.length,C=M<E?M:E,j=0;j<C;++j)if(d[j]!==x[j])return d[j]<x[j]?-1:1;return M===E?0:M<E?-1:1}(lt(d),lt(x));case"Array":return function(d,x){for(var M=d.length,E=x.length,C=M<E?M:E,j=0;j<C;++j){var R=st(d[j],x[j]);if(0!==R)return R}return M===E?0:M<E?-1:1}(d,x)}}catch(d){}return NaN}function ct(d){var x=typeof d;return"object"!=x?x:ArrayBuffer.isView(d)||"ArrayBuffer"===(d=A(d))?"binary":d}function lt(d){return d instanceof Uint8Array?d:ArrayBuffer.isView(d)?new Uint8Array(d.buffer,d.byteOffset,d.byteLength):new Uint8Array(d)}var dn=(ht.prototype._trans=function(d,x,M){var E=this._tx||Fe.trans,C=this.name,j=pe&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===d?"read":"write"," ").concat(this.name));function a(d,M,E){if(!E.schema[C])throw new he.NotFound("Table "+C+" not part of transaction");return x(E.idbtrans,E)}var R=je();try{var D=E&&E.db._novip===this.db._novip?E===Fe.trans?E._promise(d,a,M):Ne((function(){return E._promise(d,a,M)}),{trans:E,transless:Fe.transless||Fe}):function t(d,x,M,E){if(d.idbdb&&(d._state.openComplete||Fe.letThrough||d._vip)){var C=d._createTransaction(x,M,d._dbSchema);try{C.create(),d._state.PR1398_maxLoop=3}catch(C){return C.name===ue.InvalidState&&d.isOpen()&&0<--d._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),d.close({disableAutoOpen:!1}),d.open().then((function(){return t(d,x,M,E)}))):ft(C)}return C._promise(x,(function(d,x){return Ne((function(){return Fe.trans=C,E(d,x,C)}))})).then((function(d){if("readwrite"===x)try{C.idbtrans.commit()}catch(d){}return"readonly"===x?d:C._completion.then((function(){return d}))}))}if(d._state.openComplete)return ft(new he.DatabaseClosed(d._state.dbOpenError));if(!d._state.isBeingOpened){if(!d._state.autoOpen)return ft(new he.DatabaseClosed);d.open().catch(G)}return d._state.dbReadyPromise.then((function(){return t(d,x,M,E)}))}(this.db,d,[this.name],a);return j&&(D._consoleTask=j,D=D.catch((function(d){return console.trace(d),ft(d)}))),D}finally{R&&Ae()}},ht.prototype.get=function(d,x){var M=this;return d&&d.constructor===Object?this.where(d).first(x):null==d?ft(new he.Type("Invalid argument to Table.get()")):this._trans("readonly",(function(x){return M.core.get({trans:x,key:d}).then((function(d){return M.hook.reading.fire(d)}))})).then(x)},ht.prototype.where=function(d){if("string"==typeof d)return new this.db.WhereClause(this,d);if(E(d))return new this.db.WhereClause(this,"[".concat(d.join("+"),"]"));var M=x(d);if(1===M.length)return this.where(M[0]).equals(d[M[0]]);var C=this.schema.indexes.concat(this.schema.primKey).filter((function(d){if(d.compound&&M.every((function(x){return 0<=d.keyPath.indexOf(x)}))){for(var x=0;x<M.length;++x)if(-1===M.indexOf(d.keyPath[x]))return!1;return!0}return!1})).sort((function(d,x){return d.keyPath.length-x.keyPath.length}))[0];if(C&&this.db._maxKey!==xt){var j=C.keyPath.slice(0,M.length);return this.where(j).equals(j.map((function(x){return d[x]})))}!C&&pe&&console.warn("The query ".concat(JSON.stringify(d)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(M.join("+"),"]"));var R=this.schema.idxByName,D=this.db._deps.indexedDB;function u(d,x){return 0===D.cmp(d,x)}var B=M.reduce((function(x,M){var C=x[0],j=x[1],D=(x=R[M],d[M]);return[C||x,C||!x?it(j,x&&x.multi?function(d){return d=k(d,M),E(d)&&d.some((function(d){return u(D,d)}))}:function(d){return u(D,k(d,M))}):j]}),[null,null]);return j=B[0],B=B[1],j?this.where(j.name).equals(d[j.keyPath]).filter(B):C?this.filter(B):this.where(M).equals("")},ht.prototype.filter=function(d){return this.toCollection().and(d)},ht.prototype.count=function(d){return this.toCollection().count(d)},ht.prototype.offset=function(d){return this.toCollection().offset(d)},ht.prototype.limit=function(d){return this.toCollection().limit(d)},ht.prototype.each=function(d){return this.toCollection().each(d)},ht.prototype.toArray=function(d){return this.toCollection().toArray(d)},ht.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ht.prototype.orderBy=function(d){return new this.db.Collection(new this.db.WhereClause(this,E(d)?"[".concat(d.join("+"),"]"):d))},ht.prototype.reverse=function(){return this.toCollection().reverse()},ht.prototype.mapToClass=function(d){var x,M=this.db,E=this.name;function i(){return null!==x&&x.apply(this,arguments)||this}(this.schema.mappedClass=d).prototype instanceof ut&&(function(d,x){if("function"!=typeof x&&null!==x)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function n(){this.constructor=d}s(d,x),d.prototype=null===x?Object.create(x):(n.prototype=x.prototype,new n)}(i,x=d),Object.defineProperty(i.prototype,"db",{get:function(){return M},enumerable:!1,configurable:!0}),i.prototype.table=function(){return E},d=i);for(var j=new Set,R=d.prototype;R;R=C(R))Object.getOwnPropertyNames(R).forEach((function(d){return j.add(d)}));function u(x){if(!x)return x;var M,E=Object.create(d.prototype);for(M in x)if(!j.has(M))try{E[M]=x[M]}catch(x){}return E}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=u,this.hook("reading",u),d},ht.prototype.defineClass=function(){return this.mapToClass((function(d){a(this,d)}))},ht.prototype.add=function(d,x){var M=this,E=this.schema.primKey,C=E.auto,j=E.keyPath,R=d;return j&&C&&(R=at(j)(d)),this._trans("readwrite",(function(d){return M.core.mutate({trans:d,type:"add",keys:null!=x?[x]:null,values:[R]})})).then((function(d){return d.numFailures?_e.reject(d.failures[0]):d.lastResult})).then((function(x){if(j)try{P(d,j,x)}catch(x){}return x}))},ht.prototype.update=function(d,x){return"object"!=typeof d||E(d)?this.where(":id").equals(d).modify(x):void 0===(d=k(d,this.schema.primKey.keyPath))?ft(new he.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(d).modify(x)},ht.prototype.put=function(d,x){var M=this,E=this.schema.primKey,C=E.auto,j=E.keyPath,R=d;return j&&C&&(R=at(j)(d)),this._trans("readwrite",(function(d){return M.core.mutate({trans:d,type:"put",values:[R],keys:null!=x?[x]:null})})).then((function(d){return d.numFailures?_e.reject(d.failures[0]):d.lastResult})).then((function(x){if(j)try{P(d,j,x)}catch(x){}return x}))},ht.prototype.delete=function(d){var x=this;return this._trans("readwrite",(function(M){return x.core.mutate({trans:M,type:"delete",keys:[d]})})).then((function(d){return d.numFailures?_e.reject(d.failures[0]):void 0}))},ht.prototype.clear=function(){var d=this;return this._trans("readwrite",(function(x){return d.core.mutate({trans:x,type:"deleteRange",range:Gt})})).then((function(d){return d.numFailures?_e.reject(d.failures[0]):void 0}))},ht.prototype.bulkGet=function(d){var x=this;return this._trans("readonly",(function(M){return x.core.getMany({keys:d,trans:M}).then((function(d){return d.map((function(d){return x.hook.reading.fire(d)}))}))}))},ht.prototype.bulkAdd=function(d,x,M){var E=this,C=Array.isArray(x)?x:void 0,j=(M=M||(C?void 0:x))?M.allKeys:void 0;return this._trans("readwrite",(function(x){var M=(D=E.schema.primKey).auto;if((D=D.keyPath)&&C)throw new he.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(C&&C.length!==d.length)throw new he.InvalidArgument("Arguments objects and keys must have the same length");var R=d.length,D=D&&M?d.map(at(D)):d;return E.core.mutate({trans:x,type:"add",keys:C,values:D,wantResults:j}).then((function(d){var x=d.numFailures,M=d.results,C=d.lastResult;if(d=d.failures,0===x)return j?M:C;throw new z("".concat(E.name,".bulkAdd(): ").concat(x," of ").concat(R," operations failed"),d)}))}))},ht.prototype.bulkPut=function(d,x,M){var E=this,C=Array.isArray(x)?x:void 0,j=(M=M||(C?void 0:x))?M.allKeys:void 0;return this._trans("readwrite",(function(x){var M=(D=E.schema.primKey).auto;if((D=D.keyPath)&&C)throw new he.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(C&&C.length!==d.length)throw new he.InvalidArgument("Arguments objects and keys must have the same length");var R=d.length,D=D&&M?d.map(at(D)):d;return E.core.mutate({trans:x,type:"put",keys:C,values:D,wantResults:j}).then((function(d){var x=d.numFailures,M=d.results,C=d.lastResult;if(d=d.failures,0===x)return j?M:C;throw new z("".concat(E.name,".bulkPut(): ").concat(x," of ").concat(R," operations failed"),d)}))}))},ht.prototype.bulkUpdate=function(d){var x=this,M=this.core,E=d.map((function(d){return d.key})),C=d.map((function(d){return d.changes})),j=[];return this._trans("readwrite",(function(R){return M.getMany({trans:R,keys:E,cache:"clone"}).then((function(D){var B=[],F=[];d.forEach((function(d,M){var E=d.key,C=d.changes,R=D[M];if(R){for(var q=0,K=Object.keys(C);q<K.length;q++){var V=K[q],W=C[V];if(V===x.schema.primKey.keyPath){if(0!==st(W,E))throw new he.Constraint("Cannot update primary key in bulkUpdate()")}else P(R,V,W)}j.push(M),B.push(E),F.push(R)}}));var q=B.length;return M.mutate({trans:R,type:"put",keys:B,values:F,updates:{keys:E,changeSpecs:C}}).then((function(d){var M=d.numFailures,E=d.failures;if(0===M)return q;for(var C=0,R=Object.keys(E);C<R.length;C++){var D,B=R[C],F=j[Number(B)];null!=F&&(D=E[B],delete E[B],E[F]=D)}throw new z("".concat(x.name,".bulkUpdate(): ").concat(M," of ").concat(q," operations failed"),E)}))}))}))},ht.prototype.bulkDelete=function(d){var x=this,M=d.length;return this._trans("readwrite",(function(M){return x.core.mutate({trans:M,type:"delete",keys:d})})).then((function(d){var E=d.numFailures,C=d.lastResult;if(d=d.failures,0===E)return C;throw new z("".concat(x.name,".bulkDelete(): ").concat(E," of ").concat(M," operations failed"),d)}))},ht);function ht(){}function dt(d){function t(x,E){if(E){for(var C=arguments.length,j=new Array(C-1);--C;)j[C-1]=arguments[C];return M[x].subscribe.apply(null,j),d}if("string"==typeof x)return M[x]}var M={};t.addEventType=u;for(var C=1,j=arguments.length;C<j;++C)u(arguments[C]);return t;function u(d,C,j){if("object"!=typeof d){var R;C=C||ne;var D={subscribers:[],fire:j=j||G,subscribe:function(d){-1===D.subscribers.indexOf(d)&&(D.subscribers.push(d),D.fire=C(D.fire,d))},unsubscribe:function(d){D.subscribers=D.subscribers.filter((function(x){return x!==d})),D.fire=D.subscribers.reduce(C,j)}};return M[d]=t[d]=D}x(R=d).forEach((function(d){var x=R[d];if(E(x))u(d,R[d][0],R[d][1]);else{if("asap"!==x)throw new he.InvalidArgument("Invalid event config");var M=u(d,X,(function(){for(var d=arguments.length,x=new Array(d);d--;)x[d]=arguments[d];M.subscribers.forEach((function(d){v((function(){d.apply(null,x)}))}))}))}}))}}function pt(d,x){return o(x).from({prototype:d}),x}function yt(d,x){return!(d.filter||d.algorithm||d.or)&&(x?d.justLimit:!d.replayFilter)}function vt(d,x){d.filter=it(d.filter,x)}function mt(d,x,M){var E=d.replayFilter;d.replayFilter=E?function(){return it(E(),x())}:x,d.justLimit=M&&!E}function bt(d,x){if(d.isPrimKey)return x.primaryKey;var M=x.getIndexByKeyPath(d.index);if(!M)throw new he.Schema("KeyPath "+d.index+" on object store "+x.name+" is not indexed");return M}function gt(d,x,M){var E=bt(d,x.schema);return x.openCursor({trans:M,values:!d.keysOnly,reverse:"prev"===d.dir,unique:!!d.unique,query:{index:E,range:d.range}})}function wt(d,x,M,E){var C=d.replayFilter?it(d.filter,d.replayFilter()):d.filter;if(d.or){var j={},r=function(d,M,E){var R,D;C&&!C(M,E,(function(d){return M.stop(d)}),(function(d){return M.fail(d)}))||("[object ArrayBuffer]"==(D=""+(R=M.primaryKey))&&(D=""+new Uint8Array(R)),m(j,D)||(j[D]=!0,x(d,M,E)))};return Promise.all([d.or._iterate(r,M),_t(gt(d,E,M),d.algorithm,r,!d.keysOnly&&d.valueMapper)])}return _t(gt(d,E,M),it(d.algorithm,C),x,!d.keysOnly&&d.valueMapper)}function _t(d,x,M,E){var C=Te(E?function(d,x,C){return M(E(d),x,C)}:M);return d.then((function(d){if(d)return d.start((function(){var t=function(){return d.continue()};x&&!x(d,(function(d){return t=d}),(function(x){d.stop(x),t=G}),(function(x){d.fail(x),t=G}))||C(d.value,d,(function(d){return t=d})),t()}))}))}q=Symbol();var Sn=(kt.prototype.execute=function(d){if(void 0!==this.add){var x=this.add;if(E(x))return i(i([],E(d)?d:[],!0),x,!0).sort();if("number"==typeof x)return(Number(d)||0)+x;if("bigint"==typeof x)try{return BigInt(d)+x}catch(d){return BigInt(0)+x}throw new TypeError("Invalid term ".concat(x))}if(void 0!==this.remove){var M=this.remove;if(E(M))return E(d)?d.filter((function(d){return!M.includes(d)})).sort():[];if("number"==typeof M)return Number(d)-M;if("bigint"==typeof M)try{return BigInt(d)-M}catch(d){return BigInt(0)-M}throw new TypeError("Invalid subtrahend ".concat(M))}return(x=null===(x=this.replacePrefix)||void 0===x?void 0:x[0])&&"string"==typeof d&&d.startsWith(x)?this.replacePrefix[1]+d.substring(x.length):d},kt);function kt(d){Object.assign(this,d)}var An=(Pt.prototype._read=function(d,x){var M=this._ctx;return M.error?M.table._trans(null,ft.bind(null,M.error)):M.table._trans("readonly",d).then(x)},Pt.prototype._write=function(d){var x=this._ctx;return x.error?x.table._trans(null,ft.bind(null,x.error)):x.table._trans("readwrite",d,"locked")},Pt.prototype._addAlgorithm=function(d){var x=this._ctx;x.algorithm=it(x.algorithm,d)},Pt.prototype._iterate=function(d,x){return wt(this._ctx,d,x,this._ctx.table.core)},Pt.prototype.clone=function(d){var x=Object.create(this.constructor.prototype),M=Object.create(this._ctx);return d&&a(M,d),x._ctx=M,x},Pt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Pt.prototype.each=function(d){var x=this._ctx;return this._read((function(M){return wt(x,d,M,x.table.core)}))},Pt.prototype.count=function(d){var x=this;return this._read((function(d){var M=x._ctx,E=M.table.core;if(yt(M,!0))return E.count({trans:d,query:{index:bt(M,E.schema),range:M.range}}).then((function(d){return Math.min(d,M.limit)}));var C=0;return wt(M,(function(){return++C,!1}),d,E).then((function(){return C}))})).then(d)},Pt.prototype.sortBy=function(d,x){var M=d.split(".").reverse(),E=M[0],C=M.length-1;function o(d,x){return x?o(d[M[x]],x-1):d[E]}var j="next"===this._ctx.dir?1:-1;function u(d,x){return(d=o(d,C))<(x=o(x,C))?-j:x<d?j:0}return this.toArray((function(d){return d.sort(u)})).then(x)},Pt.prototype.toArray=function(d){var x=this;return this._read((function(d){var M=x._ctx;if("next"===M.dir&&yt(M,!0)&&0<M.limit){var E=M.valueMapper,C=bt(M,M.table.core.schema);return M.table.core.query({trans:d,limit:M.limit,values:!0,query:{index:C,range:M.range}}).then((function(d){return d=d.result,E?d.map(E):d}))}var j=[];return wt(M,(function(d){return j.push(d)}),d,M.table.core).then((function(){return j}))}),d)},Pt.prototype.offset=function(d){var x=this._ctx;return d<=0||(x.offset+=d,yt(x)?mt(x,(function(){var x=d;return function(d,M){return 0===x||(1===x?--x:M((function(){d.advance(x),x=0})),!1)}})):mt(x,(function(){var x=d;return function(){return--x<0}}))),this},Pt.prototype.limit=function(d){return this._ctx.limit=Math.min(this._ctx.limit,d),mt(this._ctx,(function(){var x=d;return function(d,M,E){return--x<=0&&M(E),0<=x}}),!0),this},Pt.prototype.until=function(d,x){return vt(this._ctx,(function(M,E,C){return!d(M.value)||(E(C),x)})),this},Pt.prototype.first=function(d){return this.limit(1).toArray((function(d){return d[0]})).then(d)},Pt.prototype.last=function(d){return this.reverse().first(d)},Pt.prototype.filter=function(d){var x;return vt(this._ctx,(function(x){return d(x.value)})),(x=this._ctx).isMatch=it(x.isMatch,d),this},Pt.prototype.and=function(d){return this.filter(d)},Pt.prototype.or=function(d){return new this.db.WhereClause(this._ctx.table,d,this)},Pt.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Pt.prototype.desc=function(){return this.reverse()},Pt.prototype.eachKey=function(d){var x=this._ctx;return x.keysOnly=!x.isMatch,this.each((function(x,M){d(M.key,M)}))},Pt.prototype.eachUniqueKey=function(d){return this._ctx.unique="unique",this.eachKey(d)},Pt.prototype.eachPrimaryKey=function(d){var x=this._ctx;return x.keysOnly=!x.isMatch,this.each((function(x,M){d(M.primaryKey,M)}))},Pt.prototype.keys=function(d){var x=this._ctx;x.keysOnly=!x.isMatch;var M=[];return this.each((function(d,x){M.push(x.key)})).then((function(){return M})).then(d)},Pt.prototype.primaryKeys=function(d){var x=this._ctx;if("next"===x.dir&&yt(x,!0)&&0<x.limit)return this._read((function(d){var M=bt(x,x.table.core.schema);return x.table.core.query({trans:d,values:!1,limit:x.limit,query:{index:M,range:x.range}})})).then((function(d){return d.result})).then(d);x.keysOnly=!x.isMatch;var M=[];return this.each((function(d,x){M.push(x.primaryKey)})).then((function(){return M})).then(d)},Pt.prototype.uniqueKeys=function(d){return this._ctx.unique="unique",this.keys(d)},Pt.prototype.firstKey=function(d){return this.limit(1).keys((function(d){return d[0]})).then(d)},Pt.prototype.lastKey=function(d){return this.reverse().firstKey(d)},Pt.prototype.distinct=function(){var d;if(!(d=(d=this._ctx).index&&d.table.schema.idxByName[d.index])||!d.multi)return this;var x={};return vt(this._ctx,(function(d){var M=d.primaryKey.toString();return d=m(x,M),x[M]=!0,!d})),this},Pt.prototype.modify=function(d){var M=this,E=this._ctx;return this._write((function(C){var j,R,D;function y(d,M){var E=M.failures;M=M.numFailures,$+=d-M;for(var C=0,j=x(E);C<j.length;C++){var R=j[C];W.push(E[R])}}D="function"==typeof d?d:(j=x(d),R=j.length,function(x){for(var M=!1,E=0;E<R;++E){var C=j[E],D=d[C],B=k(x,C);D instanceof Sn?(P(x,C,D.execute(B)),M=!0):B!==D&&(P(x,C,D),M=!0)}return M});var B=E.table.core,F=B.schema.primaryKey,q=F.outbound,K=F.extractKey,V=M.db._options.modifyChunkSize||200,W=[],$=0,Q=[];return M.clone().primaryKeys().then((function(x){function f(E){var j=Math.min(V,x.length-E);return B.getMany({trans:C,keys:x.slice(E,E+j),cache:"immutable"}).then((function(R){for(var F=[],W=[],$=q?[]:null,Q=[],Y=0;Y<j;++Y){var ie=R[Y],ae={value:S(ie),primKey:x[E+Y]};!1!==D.call(ae,ae.value,ae)&&(null==ae.value?Q.push(x[E+Y]):q||0===st(K(ie),K(ae.value))?(W.push(ae.value),q&&$.push(x[E+Y])):(Q.push(x[E+Y]),F.push(ae.value)))}return Promise.resolve(0<F.length&&B.mutate({trans:C,type:"add",values:F}).then((function(d){for(var x in d.failures)Q.splice(parseInt(x),1);y(F.length,d)}))).then((function(){return(0<W.length||M&&"object"==typeof d)&&B.mutate({trans:C,type:"put",keys:$,values:W,criteria:M,changeSpec:"function"!=typeof d&&d,isAdditionalChunk:0<E}).then((function(d){return y(W.length,d)}))})).then((function(){return(0<Q.length||M&&d===Et)&&B.mutate({trans:C,type:"delete",keys:Q,criteria:M,isAdditionalChunk:0<E}).then((function(d){return y(Q.length,d)}))})).then((function(){return x.length>E+j&&f(E+V)}))}))}var M=yt(E)&&E.limit===1/0&&("function"!=typeof d||d===Et)&&{index:E.index,range:E.range};return f(0).then((function(){if(0<W.length)throw new U("Error modifying one or more objects",W,$,Q);return x.length}))}))}))},Pt.prototype.delete=function(){var d=this._ctx,x=d.range;return yt(d)&&(d.isPrimKey||3===x.type)?this._write((function(M){var E=d.table.core.schema.primaryKey,C=x;return d.table.core.count({trans:M,query:{index:E,range:C}}).then((function(x){return d.table.core.mutate({trans:M,type:"deleteRange",range:C}).then((function(d){var M=d.failures;if(d.lastResult,d.results,d=d.numFailures)throw new U("Could not delete some values",Object.keys(M).map((function(d){return M[d]})),x-d);return x-d}))}))})):this.modify(Et)},Pt);function Pt(){}var Et=function(d,x){return x.value=null};function Kt(d,x){return d<x?-1:d===x?0:1}function St(d,x){return x<d?-1:d===x?0:1}function jt(d,x,M){return(d=d instanceof jn?new d.Collection(d):d)._ctx.error=new(M||TypeError)(x),d}function At(d){return new d.Collection(d,(function(){return Tt("")})).limit(0)}function Ct(d,x,M,E){var C,j,R,D,B,F,q,K=M.length;if(!M.every((function(d){return"string"==typeof d})))return jt(d,Ot);function t(d){C="next"===d?function(d){return d.toUpperCase()}:function(d){return d.toLowerCase()},j="next"===d?function(d){return d.toLowerCase()}:function(d){return d.toUpperCase()},R="next"===d?Kt:St;var x=M.map((function(d){return{lower:j(d),upper:C(d)}})).sort((function(d,x){return R(d.lower,x.lower)}));D=x.map((function(d){return d.upper})),B=x.map((function(d){return d.lower})),q="next"===(F=d)?"":E}t("next"),(d=new d.Collection(d,(function(){return Dt(D[0],B[K-1]+E)})))._ondirectionchange=function(d){t(d)};var V=0;return d._addAlgorithm((function(d,M,E){var C=d.key;if("string"!=typeof C)return!1;var W=j(C);if(x(W,B,V))return!0;for(var $=null,Q=V;Q<K;++Q){var Y=function(d,x,M,E,C,j){for(var R=Math.min(d.length,E.length),D=-1,B=0;B<R;++B){var F=x[B];if(F!==E[B])return C(d[B],M[B])<0?d.substr(0,B)+M[B]+M.substr(B+1):C(d[B],E[B])<0?d.substr(0,B)+E[B]+M.substr(B+1):0<=D?d.substr(0,D)+x[D]+M.substr(D+1):null;C(d[B],F)<0&&(D=B)}return R<E.length&&"next"===j?d+M.substr(d.length):R<d.length&&"prev"===j?d.substr(0,M.length):D<0?null:d.substr(0,D)+E[D]+M.substr(D+1)}(C,W,D[Q],B[Q],R,F);null===Y&&null===$?V=Q+1:(null===$||0<R($,Y))&&($=Y)}return M(null!==$?function(){d.continue($+q)}:E),!1})),d}function Dt(d,x,M,E){return{type:2,lower:d,upper:x,lowerOpen:M,upperOpen:E}}function Tt(d){return{type:1,lower:d,upper:d}}var jn=(Object.defineProperty(It.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),It.prototype.between=function(d,x,M,E){M=!1!==M,E=!0===E;try{return 0<this._cmp(d,x)||0===this._cmp(d,x)&&(M||E)&&(!M||!E)?At(this):new this.Collection(this,(function(){return Dt(d,x,!M,!E)}))}catch(d){return jt(this,Mt)}},It.prototype.equals=function(d){return null==d?jt(this,Mt):new this.Collection(this,(function(){return Tt(d)}))},It.prototype.above=function(d){return null==d?jt(this,Mt):new this.Collection(this,(function(){return Dt(d,void 0,!0)}))},It.prototype.aboveOrEqual=function(d){return null==d?jt(this,Mt):new this.Collection(this,(function(){return Dt(d,void 0,!1)}))},It.prototype.below=function(d){return null==d?jt(this,Mt):new this.Collection(this,(function(){return Dt(void 0,d,!1,!0)}))},It.prototype.belowOrEqual=function(d){return null==d?jt(this,Mt):new this.Collection(this,(function(){return Dt(void 0,d)}))},It.prototype.startsWith=function(d){return"string"!=typeof d?jt(this,Ot):this.between(d,d+xt,!0,!0)},It.prototype.startsWithIgnoreCase=function(d){return""===d?this.startsWith(d):Ct(this,(function(d,x){return 0===d.indexOf(x[0])}),[d],xt)},It.prototype.equalsIgnoreCase=function(d){return Ct(this,(function(d,x){return d===x[0]}),[d],"")},It.prototype.anyOfIgnoreCase=function(){var d=I.apply(Y,arguments);return 0===d.length?At(this):Ct(this,(function(d,x){return-1!==x.indexOf(d)}),d,"")},It.prototype.startsWithAnyOfIgnoreCase=function(){var d=I.apply(Y,arguments);return 0===d.length?At(this):Ct(this,(function(d,x){return x.some((function(x){return 0===d.indexOf(x)}))}),d,xt)},It.prototype.anyOf=function(){var d=this,x=I.apply(Y,arguments),M=this._cmp;try{x.sort(M)}catch(E){return jt(this,Mt)}if(0===x.length)return At(this);var E=new this.Collection(this,(function(){return Dt(x[0],x[x.length-1])}));E._ondirectionchange=function(E){M="next"===E?d._ascending:d._descending,x.sort(M)};var C=0;return E._addAlgorithm((function(d,E,j){for(var R=d.key;0<M(R,x[C]);)if(++C===x.length)return E(j),!1;return 0===M(R,x[C])||(E((function(){d.continue(x[C])})),!1)})),E},It.prototype.notEqual=function(d){return this.inAnyRange([[-1/0,d],[d,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},It.prototype.noneOf=function(){var d=I.apply(Y,arguments);if(0===d.length)return new this.Collection(this);try{d.sort(this._ascending)}catch(d){return jt(this,Mt)}var x=d.reduce((function(d,x){return d?d.concat([[d[d.length-1][1],x]]):[[-1/0,x]]}),null);return x.push([d[d.length-1],this.db._maxKey]),this.inAnyRange(x,{includeLowers:!1,includeUppers:!1})},It.prototype.inAnyRange=function(d,x){var M=this,E=this._cmp,C=this._ascending,j=this._descending,R=this._min,D=this._max;if(0===d.length)return At(this);if(!d.every((function(d){return void 0!==d[0]&&void 0!==d[1]&&C(d[0],d[1])<=0})))return jt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",he.InvalidArgument);var B,F=!x||!1!==x.includeLowers,q=x&&!0===x.includeUppers,K=C;function h(d,x){return K(d[0],x[0])}try{(B=d.reduce((function(d,x){for(var M=0,C=d.length;M<C;++M){var j=d[M];if(E(x[0],j[1])<0&&0<E(x[1],j[0])){j[0]=R(j[0],x[0]),j[1]=D(j[1],x[1]);break}}return M===C&&d.push(x),d}),[])).sort(h)}catch(d){return jt(this,Mt)}var V=0,W=q?function(d){return 0<C(d,B[V][1])}:function(d){return 0<=C(d,B[V][1])},$=F?function(d){return 0<j(d,B[V][0])}:function(d){return 0<=j(d,B[V][0])},Q=W;return(d=new this.Collection(this,(function(){return Dt(B[0][0],B[B.length-1][1],!F,!q)})))._ondirectionchange=function(d){K="next"===d?(Q=W,C):(Q=$,j),B.sort(h)},d._addAlgorithm((function(d,x,E){for(var j,R=d.key;Q(R);)if(++V===B.length)return x(E),!1;return!W(j=R)&&!$(j)||(0===M._cmp(R,B[V][1])||0===M._cmp(R,B[V][0])||x((function(){K===C?d.continue(B[V][0]):d.continue(B[V][1])})),!1)})),d},It.prototype.startsWithAnyOf=function(){var d=I.apply(Y,arguments);return d.every((function(d){return"string"==typeof d}))?0===d.length?At(this):this.inAnyRange(d.map((function(d){return[d,d+xt]}))):jt(this,"startsWithAnyOf() only works with strings")},It);function It(){}function Bt(d){return Te((function(x){return Rt(x),d(x.target.error),!1}))}function Rt(d){d.stopPropagation&&d.stopPropagation(),d.preventDefault&&d.preventDefault()}var Rn="storagemutated",Nn="x-storagemutated-1",Un=dt(null,Rn),Wn=(Ut.prototype._lock=function(){return y(!Fe.global),++this._reculock,1!==this._reculock||Fe.global||(Fe.lockOwnerFor=this),this},Ut.prototype._unlock=function(){if(y(!Fe.global),0==--this._reculock)for(Fe.global||(Fe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var d=this._blockedFuncs.shift();try{$e(d[1],d[0])}catch(d){}}return this},Ut.prototype._locked=function(){return this._reculock&&Fe.lockOwnerFor!==this},Ut.prototype.create=function(d){var x=this;if(!this.mode)return this;var M=this.db.idbdb,E=this.db._state.dbOpenError;if(y(!this.idbtrans),!d&&!M)switch(E&&E.name){case"DatabaseClosedError":throw new he.DatabaseClosed(E);case"MissingAPIError":throw new he.MissingAPI(E.message,E);default:throw new he.OpenFailed(E)}if(!this.active)throw new he.TransactionInactive;return y(null===this._completion._state),(d=this.idbtrans=d||(this.db.core||M).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Te((function(M){Rt(M),x._reject(d.error)})),d.onabort=Te((function(M){Rt(M),x.active&&x._reject(new he.Abort(d.error)),x.active=!1,x.on("abort").fire(M)})),d.oncomplete=Te((function(){x.active=!1,x._resolve(),"mutatedParts"in d&&Un.storagemutated.fire(d.mutatedParts)})),this},Ut.prototype._promise=function(d,x,M){var E=this;if("readwrite"===d&&"readwrite"!==this.mode)return ft(new he.ReadOnly("Transaction is readonly"));if(!this.active)return ft(new he.TransactionInactive);if(this._locked())return new _e((function(C,j){E._blockedFuncs.push([function(){E._promise(d,x,M).then(C,j)},Fe])}));if(M)return Ne((function(){var d=new _e((function(d,M){E._lock();var C=x(d,M,E);C&&C.then&&C.then(d,M)}));return d.finally((function(){return E._unlock()})),d._lib=!0,d}));var C=new _e((function(d,M){var C=x(d,M,E);C&&C.then&&C.then(d,M)}));return C._lib=!0,C},Ut.prototype._root=function(){return this.parent?this.parent._root():this},Ut.prototype.waitFor=function(d){var x,M=this._root(),E=_e.resolve(d);M._waitingFor?M._waitingFor=M._waitingFor.then((function(){return E})):(M._waitingFor=E,M._waitingQueue=[],x=M.idbtrans.objectStore(M.storeNames[0]),function e(){for(++M._spinCount;M._waitingQueue.length;)M._waitingQueue.shift()();M._waitingFor&&(x.get(-1/0).onsuccess=e)}());var C=M._waitingFor;return new _e((function(d,x){E.then((function(x){return M._waitingQueue.push(Te(d.bind(null,x)))}),(function(d){return M._waitingQueue.push(Te(x.bind(null,d)))})).finally((function(){M._waitingFor===C&&(M._waitingFor=null)}))}))},Ut.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new he.Abort))},Ut.prototype.table=function(d){var x=this._memoizedTables||(this._memoizedTables={});if(m(x,d))return x[d];var M=this.schema[d];if(!M)throw new he.NotFound("Table "+d+" not part of transaction");return(M=new this.db.Table(d,M,this)).core=this.db.core.table(d),x[d]=M},Ut);function Ut(){}function zt(d,x,M,E,C,j,R){return{name:d,keyPath:x,unique:M,multi:E,auto:C,compound:j,src:(M&&!R?"&":"")+(E?"*":"")+(C?"++":"")+Vt(x)}}function Vt(d){return"string"==typeof d?d:d?"["+[].join.call(d,"+")+"]":""}function Wt(d,x,M){return{name:d,primKey:x,indexes:M,mappedClass:null,idxByName:(E=function(d){return[d.name,d]},M.reduce((function(d,x,M){return(M=E(x,M))&&(d[M[0]]=M[1]),d}),{}))};var E}var Yt=function(d){try{return d.only([[]]),Yt=function(){return[[]]},[[]]}catch(d){return Yt=function(){return xt},xt}};function $t(d){return null==d?function(){}:"string"==typeof d?1===(x=d).split(".").length?function(d){return d[x]}:function(d){return k(d,x)}:function(x){return k(x,d)};var x}function Qt(d){return[].slice.call(d)}var Jn=0;function Xt(d){return null==d?":id":"string"==typeof d?d:"[".concat(d.join("+"),"]")}function Ht(d,x,M){function _(d){if(3===d.type)return null;if(4===d.type)throw new Error("Cannot convert never type to IDBKeyRange");var M=d.lower,E=d.upper,C=d.lowerOpen;return d=d.upperOpen,void 0===M?void 0===E?null:x.upperBound(E,!!d):void 0===E?x.lowerBound(M,!!C):x.bound(M,E,!!C,!!d)}function n(d){var x,M=d.name;return{name:M,schema:d,mutate:function(d){var x=d.trans,E=d.type,C=d.keys,j=d.values,R=d.range;return new Promise((function(d,D){d=Te(d);var B=x.objectStore(M),F=null==B.keyPath,q="put"===E||"add"===E;if(!q&&"delete"!==E&&"deleteRange"!==E)throw new Error("Invalid operation type: "+E);var K,V=(C||j||{length:1}).length;if(C&&j&&C.length!==j.length)throw new Error("Given keys array must have same length as given values array.");if(0===V)return d({numFailures:0,failures:{},results:[],lastResult:void 0});function u(d){++Q,Rt(d)}var W=[],$=[],Q=0;if("deleteRange"===E){if(4===R.type)return d({numFailures:Q,failures:$,results:[],lastResult:void 0});3===R.type?W.push(K=B.clear()):W.push(K=B.delete(_(R)))}else{var Y=(F=q?F?[j,C]:[j,null]:[C,null])[0],ie=F[1];if(q)for(var ae=0;ae<V;++ae)W.push(K=ie&&void 0!==ie[ae]?B[E](Y[ae],ie[ae]):B[E](Y[ae])),K.onerror=u;else for(ae=0;ae<V;++ae)W.push(K=B[E](Y[ae])),K.onerror=u}function p(x){x=x.target.result,W.forEach((function(d,x){return null!=d.error&&($[x]=d.error)})),d({numFailures:Q,failures:$,results:"delete"===E?C:W.map((function(d){return d.result})),lastResult:x})}K.onerror=function(d){u(d),p(d)},K.onsuccess=p}))},getMany:function(d){var x=d.trans,E=d.keys;return new Promise((function(d,C){d=Te(d);for(var j,R=x.objectStore(M),D=E.length,B=new Array(D),F=0,q=0,s=function(x){x=x.target,B[x._pos]=x.result,++q===F&&d(B)},K=Bt(C),V=0;V<D;++V)null!=E[V]&&((j=R.get(E[V]))._pos=V,j.onsuccess=s,j.onerror=K,++F);0===F&&d(B)}))},get:function(d){var x=d.trans,E=d.key;return new Promise((function(d,C){d=Te(d);var j=x.objectStore(M).get(E);j.onsuccess=function(x){return d(x.target.result)},j.onerror=Bt(C)}))},query:(x=B,function(d){return new Promise((function(E,C){E=Te(E);var j,R,D,B=d.trans,F=d.values,q=d.limit,K=d.query,V=q===1/0?void 0:q,W=K.index;if(K=K.range,B=B.objectStore(M),W=W.isPrimaryKey?B:B.index(W.name),K=_(K),0===q)return E({result:[]});x?((V=F?W.getAll(K,V):W.getAllKeys(K,V)).onsuccess=function(d){return E({result:d.target.result})},V.onerror=Bt(C)):(j=0,R=!F&&"openKeyCursor"in W?W.openKeyCursor(K):W.openCursor(K),D=[],R.onsuccess=function(d){var x=R.result;return x?(D.push(F?x.value:x.primaryKey),++j===q?E({result:D}):void x.continue()):E({result:D})},R.onerror=Bt(C))}))}),openCursor:function(d){var x=d.trans,E=d.values,C=d.query,j=d.reverse,R=d.unique;return new Promise((function(d,D){d=Te(d);var B=C.index,F=C.range,q=x.objectStore(M),K=(q=B.isPrimaryKey?q:q.index(B.name),B=j?R?"prevunique":"prev":R?"nextunique":"next",!E&&"openKeyCursor"in q?q.openKeyCursor(_(F),B):q.openCursor(_(F),B));K.onerror=Bt(D),K.onsuccess=Te((function(M){var E,C,j,R,B=K.result;B?(B.___id=++Jn,B.done=!1,E=B.continue.bind(B),C=(C=B.continuePrimaryKey)&&C.bind(B),j=B.advance.bind(B),R=function(){throw new Error("Cursor not stopped")},B.trans=x,B.stop=B.continue=B.continuePrimaryKey=B.advance=function(){throw new Error("Cursor not started")},B.fail=Te(D),B.next=function(){var d=this,x=1;return this.start((function(){return x--?d.continue():d.stop()})).then((function(){return d}))},B.start=function(d){function t(){if(K.result)try{d()}catch(d){B.fail(d)}else B.done=!0,B.start=function(){throw new Error("Cursor behind last entry")},B.stop()}var x=new Promise((function(d,x){d=Te(d),K.onerror=Bt(x),B.fail=x,B.stop=function(x){B.stop=B.continue=B.continuePrimaryKey=B.advance=R,d(x)}}));return K.onsuccess=Te((function(d){K.onsuccess=t,t()})),B.continue=E,B.continuePrimaryKey=C,B.advance=j,t(),x},d(B)):d(null)}),D)}))},count:function(d){var x=d.query,E=d.trans,C=x.index,j=x.range;return new Promise((function(d,x){var R=E.objectStore(M),D=C.isPrimaryKey?R:R.index(C.name);(D=(R=_(j))?D.count(R):D.count()).onsuccess=Te((function(x){return d(x.target.result)})),D.onerror=Bt(x)}))}}}var C,j,R,D=(j=M,R=Qt((C=d).objectStoreNames),{schema:{name:C.name,tables:R.map((function(d){return j.objectStore(d)})).map((function(d){var x=d.keyPath,M=d.autoIncrement,C=E(x),j={};return M={name:d.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:null==x,compound:C,keyPath:x,autoIncrement:M,unique:!0,extractKey:$t(x)},indexes:Qt(d.indexNames).map((function(x){return d.index(x)})).map((function(d){var x=d.name,M=d.unique,C=d.multiEntry;return d=d.keyPath,C={name:x,compound:E(d),keyPath:d,unique:M,multiEntry:C,extractKey:$t(d)},j[Xt(d)]=C})),getIndexByKeyPath:function(d){return j[Xt(d)]}},j[":id"]=M.primaryKey,null!=x&&(j[Xt(x)]=M.primaryKey),M}))},hasGetAll:0<R.length&&"getAll"in j.objectStore(R[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),B=(M=D.schema,D.hasGetAll),F=(D=M.tables.map(n),{});return D.forEach((function(d){return F[d.name]=d})),{stack:"dbcore",transaction:d.transaction.bind(d),table:function(d){if(!F[d])throw new Error("Table '".concat(d,"' not found"));return F[d]},MIN_KEY:-1/0,MAX_KEY:Yt(x),schema:M}}function Jt(d,x,M,E){var C=M.IDBKeyRange;return M.indexedDB,{dbcore:(E=Ht(x,C,E),d.dbcore.reduce((function(d,x){return x=x.create,w(w({},d),x(d))}),E))}}function Zt(d,x){var M=x.db;x=Jt(d._middlewares,M,d._deps,x),d.core=x.dbcore,d.tables.forEach((function(x){var M=x.name;d.core.schema.tables.some((function(d){return d.name===M}))&&(x.core=d.core.table(M),d[M]instanceof d.Table&&(d[M].core=x.core))}))}function en(d,x,M,E){M.forEach((function(M){var j=E[M];x.forEach((function(x){var E=function e(d,x){return D(d,x)||(d=C(d))&&e(d,x)}(x,M);(!E||"value"in E&&void 0===E.value)&&(x===d.Transaction.prototype||x instanceof d.Transaction?l(x,M,{get:function(){return this.table(M)},set:function(d){R(this,M,{value:d,writable:!0,configurable:!0,enumerable:!0})}}):x[M]=new d.Table(M,j))}))}))}function tn(d,x){x.forEach((function(x){for(var M in x)x[M]instanceof d.Table&&delete x[M]}))}function nn(d,x){return d._cfg.version-x._cfg.version}function rn(d,M,E,C){var j=d._dbSchema;E.objectStoreNames.contains("$meta")&&!j.$meta&&(j.$meta=Wt("$meta",hn("")[0],[]),d._storeNames.push("$meta"));var R=d._createTransaction("readwrite",d._storeNames,j);R.create(E),R._completion.catch(C);var D=R._reject.bind(R),B=Fe.transless||Fe;Ne((function(){return Fe.trans=R,Fe.transless=B,0!==M?(Zt(d,E),F=M,((C=R).storeNames.includes("$meta")?C.table("$meta").get("version").then((function(d){return null!=d?d:F})):_e.resolve(F)).then((function(M){return j=M,D=R,B=E,F=[],M=(C=d)._versions,q=C._dbSchema=ln(0,C.idbdb,B),0!==(M=M.filter((function(d){return d._cfg.version>=j}))).length?(M.forEach((function(d){F.push((function(){var M=q,E=d._cfg.dbschema;fn(C,M,B),fn(C,E,B),q=C._dbSchema=E;var R=an(M,E);R.add.forEach((function(d){un(B,d[0],d[1].primKey,d[1].indexes)})),R.change.forEach((function(d){if(d.recreate)throw new he.Upgrade("Not yet support for changing primary key");var x=B.objectStore(d.name);d.add.forEach((function(d){return cn(x,d)})),d.change.forEach((function(d){x.deleteIndex(d.name),cn(x,d)})),d.del.forEach((function(d){return x.deleteIndex(d)}))}));var F=d._cfg.contentUpgrade;if(F&&d._cfg.version>j){Zt(C,B),D._memoizedTables={};var K=g(E);R.del.forEach((function(d){K[d]=M[d]})),tn(C,[C.Transaction.prototype]),en(C,[C.Transaction.prototype],x(K),K),D.schema=K;var V,W=ie(F);return W&&Le(),R=_e.follow((function(){var d;(V=F(D))&&W&&(d=Ue.bind(null,null),V.then(d,d))})),V&&"function"==typeof V.then?_e.resolve(V):R.then((function(){return V}))}})),F.push((function(x){var M,E,j=d._cfg.dbschema;M=j,E=x,[].slice.call(E.db.objectStoreNames).forEach((function(d){return null==M[d]&&E.db.deleteObjectStore(d)})),tn(C,[C.Transaction.prototype]),en(C,[C.Transaction.prototype],C._storeNames,C._dbSchema),D.schema=C._dbSchema})),F.push((function(x){C.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(C.idbdb.version/10)===d._cfg.version?(C.idbdb.deleteObjectStore("$meta"),delete C._dbSchema.$meta,C._storeNames=C._storeNames.filter((function(d){return"$meta"!==d}))):x.objectStore("$meta").put(d._cfg.version,"version"))}))})),function e(){return F.length?_e.resolve(F.shift()(D.idbtrans)).then(e):_e.resolve()}().then((function(){sn(q,B)}))):_e.resolve();var C,j,D,B,F,q})).catch(D)):(x(j).forEach((function(d){un(E,d,j[d].primKey,j[d].indexes)})),Zt(d,E),void _e.follow((function(){return d.on.populate.fire(R)})).catch(D));var C,F}))}function on(d,x){sn(d._dbSchema,x),x.db.version%10!=0||x.objectStoreNames.contains("$meta")||x.db.createObjectStore("$meta").add(Math.ceil(x.db.version/10-1),"version");var M=ln(0,d.idbdb,x);fn(d,d._dbSchema,x);for(var E=0,C=an(M,d._dbSchema).change;E<C.length;E++){var j=function(d){if(d.change.length||d.recreate)return console.warn("Unable to patch indexes of table ".concat(d.name," because it has changes on the type of index or primary key.")),{value:void 0};var M=x.objectStore(d.name);d.add.forEach((function(x){pe&&console.debug("Dexie upgrade patch: Creating missing index ".concat(d.name,".").concat(x.src)),cn(M,x)}))}(C[E]);if("object"==typeof j)return j.value}}function an(d,x){var M,E={del:[],add:[],change:[]};for(M in d)x[M]||E.del.push(M);for(M in x){var C=d[M],j=x[M];if(C){var R={name:M,def:j,recreate:!1,del:[],add:[],change:[]};if(""+(C.primKey.keyPath||"")!=""+(j.primKey.keyPath||"")||C.primKey.auto!==j.primKey.auto)R.recreate=!0,E.change.push(R);else{var D=C.idxByName,B=j.idxByName,F=void 0;for(F in D)B[F]||R.del.push(F);for(F in B){var q=D[F],K=B[F];q?q.src!==K.src&&R.change.push(K):R.add.push(K)}(0<R.del.length||0<R.add.length||0<R.change.length)&&E.change.push(R)}}else E.add.push([M,j])}return E}function un(d,x,M,E){var C=d.db.createObjectStore(x,M.keyPath?{keyPath:M.keyPath,autoIncrement:M.auto}:{autoIncrement:M.auto});return E.forEach((function(d){return cn(C,d)})),C}function sn(d,M){x(d).forEach((function(x){M.db.objectStoreNames.contains(x)||(pe&&console.debug("Dexie: Creating missing table",x),un(M,x,d[x].primKey,d[x].indexes))}))}function cn(d,x){d.createIndex(x.name,x.keyPath,{unique:x.unique,multiEntry:x.multi})}function ln(d,x,M){var E={};return b(x.objectStoreNames,0).forEach((function(d){for(var x=M.objectStore(d),C=zt(Vt(D=x.keyPath),D||"",!0,!1,!!x.autoIncrement,D&&"string"!=typeof D,!0),j=[],R=0;R<x.indexNames.length;++R){var D=(B=x.index(x.indexNames[R])).keyPath,B=zt(B.name,D,!!B.unique,!!B.multiEntry,!1,D&&"string"!=typeof D,!1);j.push(B)}E[d]=Wt(d,C,j)})),E}function fn(x,M,E){for(var C=E.db.objectStoreNames,j=0;j<C.length;++j){var R=C[j],D=E.objectStore(R);x._hasGetAll="getAll"in D;for(var B=0;B<D.indexNames.length;++B){var F=D.indexNames[B],q=D.index(F).keyPath,K="string"==typeof q?q:"["+b(q).join("+")+"]";!M[R]||(q=M[R].idxByName[K])&&(q.name=F,delete M[R].idxByName[K],M[R].idxByName[F]=q)}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&d.WorkerGlobalScope&&d instanceof d.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(x._hasGetAll=!1)}function hn(d){return d.split(",").map((function(d,x){var M=(d=d.trim()).replace(/([&*]|\+\+)/g,""),C=/^\[/.test(M)?M.match(/^\[(.*)\]$/)[1].split("+"):M;return zt(M,C||null,/\&/.test(d),/\*/.test(d),/\+\+/.test(d),E(C),0===x)}))}var er=(pn.prototype._parseStoresSpec=function(d,M){x(d).forEach((function(x){if(null!==d[x]){var E=hn(d[x]),C=E.shift();if(C.unique=!0,C.multi)throw new he.Schema("Primary key cannot be multi-valued");E.forEach((function(d){if(d.auto)throw new he.Schema("Only primary key can be marked as autoIncrement (++)");if(!d.keyPath)throw new he.Schema("Index must have a name and cannot be an empty string")})),M[x]=Wt(x,C,E)}}))},pn.prototype.stores=function(d){var M=this.db;this._cfg.storesSource=this._cfg.storesSource?a(this._cfg.storesSource,d):d,d=M._versions;var E={},C={};return d.forEach((function(d){a(E,d._cfg.storesSource),C=d._cfg.dbschema={},d._parseStoresSpec(E,C)})),M._dbSchema=C,tn(M,[M._allTables,M,M.Transaction.prototype]),en(M,[M._allTables,M,M.Transaction.prototype,this._cfg.tables],x(C),C),M._storeNames=x(C),this},pn.prototype.upgrade=function(d){return this._cfg.contentUpgrade=re(this._cfg.contentUpgrade||G,d),this},pn);function pn(){}function yn(d,x){var M=d._dbNamesDB;return M||(M=d._dbNamesDB=new pr(Lt,{addons:[],indexedDB:d,IDBKeyRange:x})).version(1).stores({dbnames:"name"}),M.table("dbnames")}function vn(d){return d&&"function"==typeof d.databases}function mn(d){return Ne((function(){return Fe.letThrough=!0,d()}))}function bn(d){return!("from"in d)}var gn=function(d,x){if(!this){var M=new gn;return d&&"d"in d&&a(M,d),M}a(this,arguments.length?{d:1,from:d,to:1<arguments.length?x:d}:{d:0})};function wn(d,x,M){var E=st(x,M);if(!isNaN(E)){if(0<E)throw RangeError();if(bn(d))return a(d,{from:x,to:M,d:1});var C=d.l;if(E=d.r,st(M,d.from)<0)return C?wn(C,x,M):d.l={from:x,to:M,d:1,l:null,r:null},On(d);if(0<st(x,d.to))return E?wn(E,x,M):d.r={from:x,to:M,d:1,l:null,r:null},On(d);st(x,d.from)<0&&(d.from=x,d.l=null,d.d=E?E.d+1:1),0<st(M,d.to)&&(d.to=M,d.r=null,d.d=d.l?d.l.d+1:1),M=!d.r,C&&!d.l&&_n(d,C),E&&M&&_n(d,E)}}function _n(d,x){bn(x)||function e(d,x){var M=x.from,E=x.to,C=x.l;x=x.r,wn(d,M,E),C&&e(d,C),x&&e(d,x)}(d,x)}function xn(d,x){var M=kn(x),E=M.next();if(E.done)return!1;for(var C=E.value,j=kn(d),R=j.next(C.from),D=R.value;!E.done&&!R.done;){if(st(D.from,C.to)<=0&&0<=st(D.to,C.from))return!0;st(C.from,D.from)<0?C=(E=M.next(D.from)).value:D=(R=j.next(C.from)).value}return!1}function kn(d){var x=bn(d)?null:{s:0,n:d};return{next:function(d){for(var M=0<arguments.length;x;)switch(x.s){case 0:if(x.s=1,M)for(;x.n.l&&st(d,x.n.from)<0;)x={up:x,n:x.n.l,s:1};else for(;x.n.l;)x={up:x,n:x.n.l,s:1};case 1:if(x.s=2,!M||st(d,x.n.to)<=0)return{value:x.n,done:!1};case 2:if(x.n.r){x.s=3,x={up:x,n:x.n.r,s:0};continue}case 3:x=x.up}return{done:!0}}}}function On(d){var x,M,E=((null===(x=d.r)||void 0===x?void 0:x.d)||0)-((null===(M=d.l)||void 0===M?void 0:M.d)||0),C=1<E?"r":E<-1?"l":"";C&&(x="r"==C?"l":"r",M=w({},d),E=d[C],d.from=E.from,d.to=E.to,d[C]=E[C],M[C]=E[x],(d[x]=M).d=Pn(M)),d.d=Pn(d)}function Pn(d){var x=d.r;return d=d.l,(x?d?Math.max(x.d,d.d):x.d:d?d.d:0)+1}function En(d,M){return x(M).forEach((function(x){d[x]?_n(d[x],M[x]):d[x]=function e(d){var x,M,E={};for(x in d)m(d,x)&&(M=d[x],E[x]=!M||"object"!=typeof M||K.has(M.constructor)?M:e(M));return E}(M[x])})),d}function Kn(d,x){return d.all||x.all||Object.keys(d).some((function(M){return x[M]&&xn(x[M],d[M])}))}r(gn.prototype,((ae={add:function(d){return _n(this,d),this},addKey:function(d){return wn(this,d,d),this},addKeys:function(d){var x=this;return d.forEach((function(d){return wn(x,d,d)})),this}})[$]=function(){return kn(this)},ae));var nr={},rr={},ar=!1;function Cn(d){En(rr,d),ar||(ar=!0,setTimeout((function(){ar=!1,Dn(rr,!(rr={}))}),0))}function Dn(d,x){void 0===x&&(x=!1);var M=new Set;if(d.all)for(var E=0,C=Object.values(nr);E<C.length;E++)Tn(R=C[E],d,M,x);else for(var j in d){var R,D=/^idb\:\/\/(.*)\/(.*)\//.exec(j);D&&(j=D[1],D=D[2],(R=nr["idb://".concat(j,"/").concat(D)])&&Tn(R,d,M,x))}M.forEach((function(d){return d()}))}function Tn(d,x,M,E){for(var C=[],j=0,R=Object.entries(d.queries.query);j<R.length;j++){for(var D=R[j],B=D[0],F=[],q=0,K=D[1];q<K.length;q++){var V=K[q];Kn(x,V.obsSet)?V.subscribers.forEach((function(d){return M.add(d)})):E&&F.push(V)}E&&C.push([B,F])}if(E)for(var W=0,$=C;W<$.length;W++){var Q=$[W];B=Q[0],F=Q[1],d.queries.query[B]=F}}function qn(d){var M=d._state,E=d._deps.indexedDB;if(M.isBeingOpened||d.idbdb)return M.dbReadyPromise.then((function(){return M.dbOpenError?ft(M.dbOpenError):d}));M.isBeingOpened=!0,M.dbOpenError=null,M.openComplete=!1;var C=M.openCanceller,j=Math.round(10*d.verno),R=!1;function e(){if(M.openCanceller!==C)throw new he.DatabaseClosed("db.open() was cancelled")}function y(){return new _e((function(C,D){if(e(),!E)throw new he.MissingAPI;var B=d.name,K=M.autoSchema||!j?E.open(B):E.open(B,j);if(!K)throw new he.MissingAPI;K.onerror=Bt(D),K.onblocked=Te(d._fireOnBlocked),K.onupgradeneeded=Te((function(x){var C;F=K.transaction,M.autoSchema&&!d._options.allowEmptyDB?(K.onerror=Rt,F.abort(),K.result.close(),(C=E.deleteDatabase(B)).onsuccess=C.onerror=Te((function(){D(new he.NoSuchDatabase("Database ".concat(B," doesnt exist")))}))):(F.onerror=Bt(D),x=x.oldVersion>Math.pow(2,62)?0:x.oldVersion,q=x<1,d.idbdb=K.result,R&&on(d,F),rn(d,x/10,F,D))}),D),K.onsuccess=Te((function(){F=null;var E,D,V,W,$,Q=d.idbdb=K.result,Y=b(Q.objectStoreNames);if(0<Y.length)try{var ie=Q.transaction(1===(W=Y).length?W[0]:W,"readonly");if(M.autoSchema)D=Q,V=ie,(E=d).verno=D.version/10,V=E._dbSchema=ln(0,D,V),E._storeNames=b(D.objectStoreNames,0),en(E,[E._allTables],x(V),V);else if(fn(d,d._dbSchema,ie),(($=an(ln(0,($=d).idbdb,ie),$._dbSchema)).add.length||$.change.some((function(d){return d.add.length||d.change.length})))&&!R)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),Q.close(),j=Q.version+1,R=!0,C(y());Zt(d,ie)}catch(E){}Nt.push(d),Q.onversionchange=Te((function(x){M.vcFired=!0,d.on("versionchange").fire(x)})),Q.onclose=Te((function(x){d.on("close").fire(x)})),q&&($=d._deps,ie=B,Q=$.indexedDB,$=$.IDBKeyRange,vn(Q)||ie===Lt||yn(Q,$).put({name:ie}).catch(G)),C()}),D)})).catch((function(d){switch(null==d?void 0:d.name){case"UnknownError":if(0<M.PR1398_maxLoop)return M.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),y();break;case"VersionError":if(0<j)return j=0,y()}return _e.reject(d)}))}var D,B=M.dbReadyResolve,F=null,q=!1;return _e.race([C,("undefined"==typeof navigator?_e.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(d){function t(){return indexedDB.databases().finally(d)}D=setInterval(t,100),t()})).finally((function(){return clearInterval(D)})):Promise.resolve()).then(y)]).then((function(){return e(),M.onReadyBeingFired=[],_e.resolve(mn((function(){return d.on.ready.fire(d.vip)}))).then((function e(){if(0<M.onReadyBeingFired.length){var x=M.onReadyBeingFired.reduce(re,G);return M.onReadyBeingFired=[],_e.resolve(mn((function(){return x(d.vip)}))).then(e)}}))})).finally((function(){M.openCanceller===C&&(M.onReadyBeingFired=null,M.isBeingOpened=!1)})).catch((function(x){M.dbOpenError=x;try{F&&F.abort()}catch(x){}return C===M.openCanceller&&d._close(),ft(x)})).finally((function(){M.openComplete=!0,B()})).then((function(){var x;return q&&(x={},d.tables.forEach((function(M){M.schema.indexes.forEach((function(E){E.name&&(x["idb://".concat(d.name,"/").concat(M.name,"/").concat(E.name)]=new gn(-1/0,[[[]]]))})),x["idb://".concat(d.name,"/").concat(M.name,"/")]=x["idb://".concat(d.name,"/").concat(M.name,"/:dels")]=new gn(-1/0,[[[]]])})),Un(Rn).fire(x),Dn(x,!0)),d}))}function In(d){function e(x){return d.next(x)}var x=n(e),M=n((function(x){return d.throw(x)}));function n(d){return function(C){var j=d(C);return C=j.value,j.done?C:C&&"function"==typeof C.then?C.then(x,M):E(C)?Promise.all(C).then(x,M):x(C)}}return n(e)()}function Bn(d,x,M){for(var C=E(d)?d.slice():[d],j=0;j<M;++j)C.push(x);return C}var sr={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(d){return w(w({},d),{table:function(x){var M=d.table(x),E=M.schema,C={},j=[];function c(d,x,M){var E=Xt(d),R=C[E]=C[E]||[],D=null==d?0:"string"==typeof d?1:d.length,B=0<x;return B=w(w({},M),{name:B?"".concat(E,"(virtual-from:").concat(M.name,")"):M.name,lowLevelIndex:M,isVirtual:B,keyTail:x,keyLength:D,extractKey:$t(d),unique:!B&&M.unique}),R.push(B),B.isPrimaryKey||j.push(B),1<D&&c(2===D?d[0]:d.slice(0,D-1),x+1,M),R.sort((function(d,x){return d.keyTail-x.keyTail})),B}x=c(E.primaryKey.keyPath,0,E.primaryKey),C[":id"]=[x];for(var R=0,D=E.indexes;R<D.length;R++){var B=D[R];c(B.keyPath,0,B)}function l(x){var M,E=x.query.index;return E.isVirtual?w(w({},x),{query:{index:E.lowLevelIndex,range:(M=x.query.range,E=E.keyTail,{type:1===M.type?2:M.type,lower:Bn(M.lower,M.lowerOpen?d.MAX_KEY:d.MIN_KEY,E),lowerOpen:!0,upper:Bn(M.upper,M.upperOpen?d.MIN_KEY:d.MAX_KEY,E),upperOpen:!0})}}):x}return w(w({},M),{schema:w(w({},E),{primaryKey:x,indexes:j,getIndexByKeyPath:function(d){return(d=C[Xt(d)])&&d[0]}}),count:function(d){return M.count(l(d))},query:function(d){return M.query(l(d))},openCursor:function(x){var E=x.query.index,C=E.keyTail,j=E.isVirtual,R=E.keyLength;return j?M.openCursor(l(x)).then((function(d){return d&&o(d)})):M.openCursor(x);function o(M){return Object.create(M,{continue:{value:function(E){null!=E?M.continue(Bn(E,x.reverse?d.MAX_KEY:d.MIN_KEY,C)):x.unique?M.continue(M.key.slice(0,R).concat(x.reverse?d.MIN_KEY:d.MAX_KEY,C)):M.continue()}},continuePrimaryKey:{value:function(x,E){M.continuePrimaryKey(Bn(x,d.MAX_KEY,C),E)}},primaryKey:{get:function(){return M.primaryKey}},key:{get:function(){var d=M.key;return 1===R?d[0]:d.slice(0,R)}},value:{get:function(){return M.value}}})}}})}})}};function Fn(d,M,E,C){return E=E||{},C=C||"",x(d).forEach((function(x){var j,R,D;m(M,x)?(j=d[x],R=M[x],"object"==typeof j&&"object"==typeof R&&j&&R?(D=A(j))!==A(R)?E[C+x]=M[x]:"Object"===D?Fn(j,R,E,C+x+"."):j!==R&&(E[C+x]=M[x]):j!==R&&(E[C+x]=M[x])):E[C+x]=void 0})),x(M).forEach((function(x){m(d,x)||(E[C+x]=M[x])})),E}function Mn(d,x){return"delete"===x.type?x.keys:x.keys||x.values.map(d.extractKey)}var cr={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(d){return w(w({},d),{table:function(x){var M=d.table(x),E=M.schema.primaryKey;return w(w({},M),{mutate:function(d){var C=Fe.trans,j=C.table(x).hook,R=j.deleting,D=j.creating,B=j.updating;switch(d.type){case"add":if(D.fire===G)break;return C._promise("readwrite",(function(){return a(d)}),!0);case"put":if(D.fire===G&&B.fire===G)break;return C._promise("readwrite",(function(){return a(d)}),!0);case"delete":if(R.fire===G)break;return C._promise("readwrite",(function(){return a(d)}),!0);case"deleteRange":if(R.fire===G)break;return C._promise("readwrite",(function(){return function n(d,x,C){return M.query({trans:d,values:!1,query:{index:E,range:x},limit:C}).then((function(M){var E=M.result;return a({type:"delete",keys:E,trans:d}).then((function(M){return 0<M.numFailures?Promise.reject(M.failures[0]):E.length<C?{failures:[],numFailures:0,lastResult:void 0}:n(d,w(w({},x),{lower:E[E.length-1],lowerOpen:!0}),C)}))}))}(d.trans,d.range,1e4)}),!0)}return M.mutate(d);function a(d){var x,C,j,F=Fe.trans,q=d.keys||Mn(E,d);if(!q)throw new Error("Keys missing");return"delete"!==(d="add"===d.type||"put"===d.type?w(w({},d),{keys:q}):w({},d)).type&&(d.values=i([],d.values,!0)),d.keys&&(d.keys=i([],d.keys,!0)),x=M,j=q,("add"===(C=d).type?Promise.resolve([]):x.getMany({trans:C.trans,keys:j,cache:"immutable"})).then((function(x){var C=q.map((function(M,C){var j,q,K,V=x[C],W={onerror:null,onsuccess:null};return"delete"===d.type?R.fire.call(W,M,V,F):"add"===d.type||void 0===V?(j=D.fire.call(W,M,d.values[C],F),null==M&&null!=j&&(d.keys[C]=M=j,E.outbound||P(d.values[C],E.keyPath,M))):(j=Fn(V,d.values[C]),(q=B.fire.call(W,j,M,V,F))&&(K=d.values[C],Object.keys(q).forEach((function(d){m(K,d)?K[d]=q[d]:P(K,d,q[d])})))),W}));return M.mutate(d).then((function(M){for(var E=M.failures,j=M.results,R=M.numFailures,D=(M=M.lastResult,0);D<q.length;++D){var B=(j||q)[D],F=C[D];null==B?F.onerror&&F.onerror(E[D]):F.onsuccess&&F.onsuccess("put"===d.type&&x[D]?d.values[D]:B)}return{failures:E,results:j,numFailures:R,lastResult:M}})).catch((function(d){return C.forEach((function(x){return x.onerror&&x.onerror(d)})),Promise.reject(d)}))}))}}})}})}};function Ln(d,x,M){try{if(!x)return null;if(x.keys.length<d.length)return null;for(var E=[],C=0,j=0;C<x.keys.length&&j<d.length;++C)0===st(x.keys[C],d[j])&&(E.push(M?S(x.values[C]):x.values[C]),++j);return E.length===d.length?E:null}catch(d){return null}}var hr={stack:"dbcore",level:-1,create:function(d){return{table:function(x){var M=d.table(x);return w(w({},M),{getMany:function(d){if(!d.cache)return M.getMany(d);var x=Ln(d.keys,d.trans._cache,"clone"===d.cache);return x?_e.resolve(x):M.getMany(d).then((function(x){return d.trans._cache={keys:d.keys,values:"clone"===d.cache?S(x):x},x}))},mutate:function(d){return"add"!==d.type&&(d.trans._cache=null),M.mutate(d)}})}}}};function zn(d,x){return"readonly"===d.trans.mode&&!!d.subscr&&!d.trans.explicit&&"disabled"!==d.trans.db._options.cache&&!x.schema.primaryKey.outbound}function Vn(d,x){switch(d){case"query":return x.values&&!x.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var fr={stack:"dbcore",level:0,name:"Observability",create:function(d){var M=d.schema.name,C=new gn(d.MIN_KEY,d.MAX_KEY);return w(w({},d),{transaction:function(x,M,E){if(Fe.subscr&&"readonly"!==M)throw new he.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Fe.querier));return d.transaction(x,M,E)},table:function(j){var R=d.table(j),D=R.schema,B=D.primaryKey,F=D.indexes,q=B.extractKey,K=B.outbound,V=B.autoIncrement&&F.filter((function(d){return d.compound&&d.keyPath.includes(B.keyPath)})),W=w(w({},R),{mutate:function(d){function o(d){return d="idb://".concat(M,"/").concat(j,"/").concat(d),W[d]||(W[d]=new gn)}var x,F,q,K=d.trans,W=d.mutatedParts||(d.mutatedParts={}),$=o(""),Q=o(":dels"),Y=d.type,ie="deleteRange"===d.type?[d.range]:"delete"===d.type?[d.keys]:d.values.length<50?[Mn(B,d).filter((function(d){return d})),d.values]:[],ae=ie[0],se=ie[1];return ie=d.trans._cache,E(ae)?($.addKeys(ae),(ie="delete"===Y||ae.length===se.length?Ln(ae,ie):null)||Q.addKeys(ae),(ie||se)&&(x=o,F=ie,q=se,D.indexes.forEach((function(d){var M=x(d.name||"");function r(x){return null!=x?d.extractKey(x):null}function i(x){return d.multiEntry&&E(x)?x.forEach((function(d){return M.addKey(d)})):M.addKey(x)}(F||q).forEach((function(d,x){var M=F&&r(F[x]);0!==st(M,x=q&&r(q[x]))&&(null!=M&&i(M),null!=x&&i(x))}))})))):ae?(se={from:ae.lower,to:ae.upper},Q.add(se),$.add(se)):($.add(C),Q.add(C),D.indexes.forEach((function(d){return o(d.name).add(C)}))),R.mutate(d).then((function(x){return!ae||"add"!==d.type&&"put"!==d.type||($.addKeys(x.results),V&&V.forEach((function(M){var E=d.values.map((function(d){return M.extractKey(d)})),C=M.keyPath.findIndex((function(d){return d===B.keyPath}));x.results.forEach((function(d){return E[C]=d})),o(M.name).addKeys(E)}))),K.mutatedParts=En(K.mutatedParts||{},W),x}))}}),$=(F=function(x){x=(M=x.query).index;var M=M.range;return[x,new gn(null!==(x=M.lower)&&void 0!==x?x:d.MIN_KEY,null!==(M=M.upper)&&void 0!==M?M:d.MAX_KEY)]},{get:function(d){return[B,new gn(d.key)]},getMany:function(d){return[B,(new gn).addKeys(d.keys)]},count:F,query:F,openCursor:F});return x($).forEach((function(d){W[d]=function(x){var E=!!(V=Fe.subscr),D=zn(Fe,R)&&Vn(d,x)?x.obsSet={}:V;if(E){var r=function(d){return d="idb://".concat(M,"/").concat(j,"/").concat(d),D[d]||(D[d]=new gn)},B=r(""),F=r(":dels"),V=(E=(V=$[d](x))[0],V[1]);if(("query"===d&&E.isPrimaryKey&&!x.values?F:r(E.name||"")).add(V),!E.isPrimaryKey){if("count"!==d){var W="query"===d&&K&&x.values&&R.query(w(w({},x),{values:!1}));return R[d].apply(this,arguments).then((function(M){if("query"===d){if(K&&x.values)return W.then((function(d){return d=d.result,B.addKeys(d),M}));var E=x.values?M.result.map(q):M.result;(x.values?B:F).addKeys(E)}else if("openCursor"===d){var C=M,j=x.values;return C&&Object.create(C,{key:{get:function(){return F.addKey(C.primaryKey),C.key}},primaryKey:{get:function(){var d=C.primaryKey;return F.addKey(d),d}},value:{get:function(){return j&&B.addKey(C.primaryKey),C.value}}})}return M}))}F.add(C)}}return R[d].apply(this,arguments)}})),W}})}};function Yn(d,x,M){if(0===M.numFailures)return x;if("deleteRange"===x.type)return null;var C=x.keys?x.keys.length:"values"in x&&x.values?x.values.length:1;return M.numFailures===C?null:(x=w({},x),E(x.keys)&&(x.keys=x.keys.filter((function(d,x){return!(x in M.failures)}))),"values"in x&&E(x.values)&&(x.values=x.values.filter((function(d,x){return!(x in M.failures)}))),x)}function $n(d,x){return M=d,(void 0===(E=x).lower||(E.lowerOpen?0<st(M,E.lower):0<=st(M,E.lower)))&&(void 0===x.upper||(x.upperOpen?st(d,x.upper)<0:st(d,x.upper)<=0));var M,E}function Qn(d,x,M,C,j,R){if(!M||0===M.length)return d;var D=x.query.index,B=D.multiEntry,F=x.query.range,q=C.schema.primaryKey.extractKey,K=D.extractKey,V=(D.lowLevelIndex||D).extractKey;return M=M.reduce((function(d,M){var C=d,j="add"===M.type||"put"===M.type?M.values.filter((function(d){return d=K(d),B&&E(d)?d.some((function(d){return $n(d,F)})):$n(d,F)})).map((function(d){return d=S(d),R&&Object.freeze(d),d})):[];switch(M.type){case"add":C=d.concat(x.values?j:j.map((function(d){return q(d)})));break;case"put":var D=(new gn).addKeys(M.values.map((function(d){return q(d)})));C=d.filter((function(d){return d=x.values?q(d):d,!xn(new gn(d),D)})).concat(x.values?j:j.map((function(d){return q(d)})));break;case"delete":var V=(new gn).addKeys(M.keys);C=d.filter((function(d){return d=x.values?q(d):d,!xn(new gn(d),V)}));break;case"deleteRange":var W=M.range;C=d.filter((function(d){return!$n(q(d),W)}))}return C}),d),M===d?d:(M.sort((function(d,x){return st(V(d),V(x))||st(q(d),q(x))})),x.limit&&x.limit<1/0&&(M.length>x.limit?M.length=x.limit:d.length===x.limit&&M.length<x.limit&&(j.dirty=!0)),R?Object.freeze(M):M)}function Gn(d,x){return 0===st(d.lower,x.lower)&&0===st(d.upper,x.upper)&&!!d.lowerOpen==!!x.lowerOpen&&!!d.upperOpen==!!x.upperOpen}function Xn(d,x){return function(d,x,M,E){if(void 0===d)return void 0!==x?-1:0;if(void 0===x)return 1;if(0===(x=st(d,x))){if(M&&E)return 0;if(M)return 1;if(E)return-1}return x}(d.lower,x.lower,d.lowerOpen,x.lowerOpen)<=0&&0<=function(d,x,M,E){if(void 0===d)return void 0!==x?1:0;if(void 0===x)return-1;if(0===(x=st(d,x))){if(M&&E)return 0;if(M)return-1;if(E)return 1}return x}(d.upper,x.upper,d.upperOpen,x.upperOpen)}function Hn(d,x,M,E){d.subscribers.add(M),E.addEventListener("abort",(function(){var E,C;d.subscribers.delete(M),0===d.subscribers.size&&(E=d,C=x,setTimeout((function(){0===E.subscribers.size&&T(C,E)}),3e3))}))}var dr={stack:"dbcore",level:0,name:"Cache",create:function(d){var x=d.schema.name;return w(w({},d),{transaction:function(M,E,C){var j,R,D=d.transaction(M,E,C);return"readwrite"===E&&(R=(j=new AbortController).signal,C=function(C){return function(){if(j.abort(),"readwrite"===E){for(var R=new Set,B=0,F=M;B<F.length;B++){var q=F[B],K=nr["idb://".concat(x,"/").concat(q)];if(K){var V=d.table(q),W=K.optimisticOps.filter((function(d){return d.trans===D}));if(D._explicit&&C&&D.mutatedParts)for(var $=0,Q=Object.values(K.queries.query);$<Q.length;$++)for(var Y=0,ie=(ue=Q[$]).slice();Y<ie.length;Y++)Kn((ce=ie[Y]).obsSet,D.mutatedParts)&&(T(ue,ce),ce.subscribers.forEach((function(d){return R.add(d)})));else if(0<W.length){K.optimisticOps=K.optimisticOps.filter((function(d){return d.trans!==D}));for(var ae=0,se=Object.values(K.queries.query);ae<se.length;ae++)for(var ue,ce,he,fe=0,de=(ue=se[ae]).slice();fe<de.length;fe++)null!=(ce=de[fe]).res&&D.mutatedParts&&(C&&!ce.dirty?(he=Object.isFrozen(ce.res),he=Qn(ce.res,ce.req,W,V,ce,he),ce.dirty?(T(ue,ce),ce.subscribers.forEach((function(d){return R.add(d)}))):he!==ce.res&&(ce.res=he,ce.promise=_e.resolve({result:he}))):(ce.dirty&&T(ue,ce),ce.subscribers.forEach((function(d){return R.add(d)}))))}}}R.forEach((function(d){return d()}))}}},D.addEventListener("abort",C(!1),{signal:R}),D.addEventListener("error",C(!1),{signal:R}),D.addEventListener("complete",C(!0),{signal:R})),D},table:function(M){var E=d.table(M),C=E.schema.primaryKey;return w(w({},E),{mutate:function(d){var j=Fe.trans;if(C.outbound||"disabled"===j.db._options.cache||j.explicit)return E.mutate(d);var R=nr["idb://".concat(x,"/").concat(M)];return R?(j=E.mutate(d),"add"!==d.type&&"put"!==d.type||!(50<=d.values.length||Mn(C,d).some((function(d){return null==d})))?(R.optimisticOps.push(d),d.mutatedParts&&Cn(d.mutatedParts),j.then((function(x){0<x.numFailures&&(T(R.optimisticOps,d),(x=Yn(0,d,x))&&R.optimisticOps.push(x),d.mutatedParts&&Cn(d.mutatedParts))})),j.catch((function(){T(R.optimisticOps,d),d.mutatedParts&&Cn(d.mutatedParts)}))):j.then((function(x){var M=Yn(0,w(w({},d),{values:d.values.map((function(d,M){var E;return P(d=null!==(E=C.keyPath)&&void 0!==E&&E.includes(".")?S(d):w({},d),C.keyPath,x.results[M]),d}))}),x);R.optimisticOps.push(M),queueMicrotask((function(){return d.mutatedParts&&Cn(d.mutatedParts)}))})),j):E.mutate(d)},query:function(d){if(!zn(Fe,E)||!Vn("query",d))return E.query(d);var C="immutable"===(null===(D=Fe.trans)||void 0===D?void 0:D.db._options.cache),j=(F=Fe).requery,R=F.signal,D=function(d,x,M,E){var C=nr["idb://".concat(d,"/").concat(x)];if(!C)return[];if(!(x=C.queries[M]))return[null,!1,C,null];var j=x[(E.query?E.query.index.name:null)||""];if(!j)return[null,!1,C,null];switch(M){case"query":var R=j.find((function(d){return d.req.limit===E.limit&&d.req.values===E.values&&Gn(d.req.query.range,E.query.range)}));return R?[R,!0,C,j]:[j.find((function(d){return("limit"in d.req?d.req.limit:1/0)>=E.limit&&(!E.values||d.req.values)&&Xn(d.req.query.range,E.query.range)})),!1,C,j];case"count":return R=j.find((function(d){return Gn(d.req.query.range,E.query.range)})),[R,!!R,C,j]}}(x,M,"query",d),B=D[0],F=D[1],q=D[2],K=D[3];return B&&F?B.obsSet=d.obsSet:(F=E.query(d).then((function(d){var x=d.result;if(B&&(B.res=x),C){for(var M=0,E=x.length;M<E;++M)Object.freeze(x[M]);Object.freeze(x)}else d.result=S(x);return d})).catch((function(d){return K&&B&&T(K,B),Promise.reject(d)})),B={obsSet:d.obsSet,promise:F,subscribers:new Set,type:"query",req:d,dirty:!1},K?K.push(B):(K=[B],(q=q||(nr["idb://".concat(x,"/").concat(M)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[d.query.index.name||""]=K)),Hn(B,K,j,R),B.promise.then((function(x){return{result:Qn(x.result,d,null==q?void 0:q.optimisticOps,E,B,C)}}))}})}})}};function Zn(d,x){return new Proxy(d,{get:function(d,M,E){return"db"===M?x:Reflect.get(d,M,E)}})}var pr=(tr.prototype.version=function(d){if(isNaN(d)||d<.1)throw new he.Type("Given version is not a positive number");if(d=Math.round(10*d)/10,this.idbdb||this._state.isBeingOpened)throw new he.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,d);var x=this._versions,M=x.filter((function(x){return x._cfg.version===d}))[0];return M||(M=new this.Version(d),x.push(M),x.sort(nn),M.stores({}),this._state.autoSchema=!1,M)},tr.prototype._whenReady=function(d){var x=this;return this.idbdb&&(this._state.openComplete||Fe.letThrough||this._vip)?d():new _e((function(d,M){if(x._state.openComplete)return M(new he.DatabaseClosed(x._state.dbOpenError));if(!x._state.isBeingOpened){if(!x._state.autoOpen)return void M(new he.DatabaseClosed);x.open().catch(G)}x._state.dbReadyPromise.then(d,M)})).then(d)},tr.prototype.use=function(d){var x=d.stack,M=d.create,E=d.level,C=d.name;return C&&this.unuse({stack:x,name:C}),(d=this._middlewares[x]||(this._middlewares[x]=[])).push({stack:x,create:M,level:null==E?10:E,name:C}),d.sort((function(d,x){return d.level-x.level})),this},tr.prototype.unuse=function(d){var x=d.stack,M=d.name,E=d.create;return x&&this._middlewares[x]&&(this._middlewares[x]=this._middlewares[x].filter((function(d){return E?d.create!==E:!!M&&d.name!==M}))),this},tr.prototype.open=function(){var d=this;return $e(Be,(function(){return qn(d)}))},tr.prototype._close=function(){var d=this._state,x=Nt.indexOf(this);if(0<=x&&Nt.splice(x,1),this.idbdb){try{this.idbdb.close()}catch(x){}this.idbdb=null}d.isBeingOpened||(d.dbReadyPromise=new _e((function(x){d.dbReadyResolve=x})),d.openCanceller=new _e((function(x,M){d.cancelOpen=M})))},tr.prototype.close=function(d){var x=(void 0===d?{disableAutoOpen:!0}:d).disableAutoOpen;d=this._state,x?(d.isBeingOpened&&d.cancelOpen(new he.DatabaseClosed),this._close(),d.autoOpen=!1,d.dbOpenError=new he.DatabaseClosed):(this._close(),d.autoOpen=this._options.autoOpen||d.isBeingOpened,d.openComplete=!1,d.dbOpenError=null)},tr.prototype.delete=function(d){var x=this;void 0===d&&(d={disableAutoOpen:!0});var M=0<arguments.length&&"object"!=typeof arguments[0],E=this._state;return new _e((function(C,j){function e(){x.close(d);var M=x._deps.indexedDB.deleteDatabase(x.name);M.onsuccess=Te((function(){var d,M,E;d=x._deps,M=x.name,E=d.indexedDB,d=d.IDBKeyRange,vn(E)||M===Lt||yn(E,d).delete(M).catch(G),C()})),M.onerror=Bt(j),M.onblocked=x._fireOnBlocked}if(M)throw new he.InvalidArgument("Invalid closeOptions argument to db.delete()");E.isBeingOpened?E.dbReadyPromise.then(e):e()}))},tr.prototype.backendDB=function(){return this.idbdb},tr.prototype.isOpen=function(){return null!==this.idbdb},tr.prototype.hasBeenClosed=function(){var d=this._state.dbOpenError;return d&&"DatabaseClosed"===d.name},tr.prototype.hasFailed=function(){return null!==this._state.dbOpenError},tr.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(tr.prototype,"tables",{get:function(){var d=this;return x(this._allTables).map((function(x){return d._allTables[x]}))},enumerable:!1,configurable:!0}),tr.prototype.transaction=function(){var d=function(d,x,M){var E=arguments.length;if(E<2)throw new he.InvalidArgument("Too few arguments");for(var C=new Array(E-1);--E;)C[E-1]=arguments[E];return M=C.pop(),[d,O(C),M]}.apply(this,arguments);return this._transaction.apply(this,d)},tr.prototype._transaction=function(d,x,M){var E=this,C=Fe.trans;C&&C.db===this&&-1===d.indexOf("!")||(C=null);var j,R,D=-1!==d.indexOf("?");d=d.replace("!","").replace("?","");try{if(R=x.map((function(d){if("string"!=typeof(d=d instanceof E.Table?d.name:d))throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return d})),"r"==d||d===Ft)j=Ft;else{if("rw"!=d&&d!=qt)throw new he.InvalidArgument("Invalid transaction mode: "+d);j=qt}if(C){if(C.mode===Ft&&j===qt){if(!D)throw new he.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");C=null}C&&R.forEach((function(d){if(C&&-1===C.storeNames.indexOf(d)){if(!D)throw new he.SubTransaction("Table "+d+" not included in parent transaction.");C=null}})),D&&C&&!C.active&&(C=null)}}catch(M){return C?C._promise(null,(function(d,x){x(M)})):ft(M)}var B=function i(d,x,M,E,C){return _e.resolve().then((function(){var j=Fe.transless||Fe,R=d._createTransaction(x,M,d._dbSchema,E);if(R.explicit=!0,j={trans:R,transless:j},E)R.idbtrans=E.idbtrans;else try{R.create(),R.idbtrans._explicit=!0,d._state.PR1398_maxLoop=3}catch(j){return j.name===ue.InvalidState&&d.isOpen()&&0<--d._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),d.close({disableAutoOpen:!1}),d.open().then((function(){return i(d,x,M,null,C)}))):ft(j)}var D,B=ie(C);return B&&Le(),j=_e.follow((function(){var d;(D=C.call(R,R))&&(B?(d=Ue.bind(null,null),D.then(d,d)):"function"==typeof D.next&&"function"==typeof D.throw&&(D=In(D)))}),j),(D&&"function"==typeof D.then?_e.resolve(D).then((function(d){return R.active?d:ft(new he.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):j.then((function(){return D}))).then((function(d){return E&&R._resolve(),R._completion.then((function(){return d}))})).catch((function(d){return R._reject(d),ft(d)}))}))}.bind(null,this,j,R,C,M);return C?C._promise(j,B,"lock"):Fe.trans?$e(Fe.transless,(function(){return E._whenReady(B)})):this._whenReady(B)},tr.prototype.table=function(d){if(!m(this._allTables,d))throw new he.InvalidTable("Table ".concat(d," does not exist"));return this._allTables[d]},tr);function tr(d,x){var M=this;this._middlewares={},this.verno=0;var E=tr.dependencies;this._options=x=w({addons:tr.addons,autoOpen:!0,indexedDB:E.indexedDB,IDBKeyRange:E.IDBKeyRange,cache:"cloned"},x),this._deps={indexedDB:x.indexedDB,IDBKeyRange:x.IDBKeyRange},E=x.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var C,j,R,D,B,F={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:G,dbReadyPromise:null,cancelOpen:G,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:x.autoOpen};F.dbReadyPromise=new _e((function(d){F.dbReadyResolve=d})),F.openCanceller=new _e((function(d,x){F.cancelOpen=x})),this._state=F,this.name=d,this.on=dt(this,"populate","blocked","versionchange","close",{ready:[re,G]}),this.on.ready.subscribe=p(this.on.ready.subscribe,(function(d){return function(x,E){tr.vip((function(){var C,j=M._state;j.openComplete?(j.dbOpenError||_e.resolve().then(x),E&&d(x)):j.onReadyBeingFired?(j.onReadyBeingFired.push(x),E&&d(x)):(d(x),C=M,E||d((function e(){C.on.ready.unsubscribe(x),C.on.ready.unsubscribe(e)})))}))}})),this.Collection=(C=this,pt(An.prototype,(function(d,x){this.db=C;var M=Gt,E=null;if(x)try{M=x()}catch(d){E=d}var j=d._ctx;d=(x=j.table).hook.reading.fire,this._ctx={table:x,index:j.index,isPrimKey:!j.index||x.schema.primKey.keyPath&&j.index===x.schema.primKey.name,range:M,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:E,or:j.or,valueMapper:d!==X?d:null}}))),this.Table=(j=this,pt(dn.prototype,(function(d,x,M){this.db=j,this._tx=M,this.name=d,this.schema=x,this.hook=j._allTables[d]?j._allTables[d].hook:dt(null,{creating:[Z,G],reading:[H,X],updating:[te,G],deleting:[ee,G]})}))),this.Transaction=(R=this,pt(Wn.prototype,(function(d,x,M,E,C){var j=this;this.db=R,this.mode=d,this.storeNames=x,this.schema=M,this.chromeTransactionDurability=E,this.idbtrans=null,this.on=dt(this,"complete","error","abort"),this.parent=C||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 _e((function(d,x){j._resolve=d,j._reject=x})),this._completion.then((function(){j.active=!1,j.on.complete.fire()}),(function(d){var x=j.active;return j.active=!1,j.on.error.fire(d),j.parent?j.parent._reject(d):x&&j.idbtrans&&j.idbtrans.abort(),ft(d)}))}))),this.Version=(D=this,pt(er.prototype,(function(d){this.db=D,this._cfg={version:d,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))),this.WhereClause=(B=this,pt(jn.prototype,(function(d,x,M){if(this.db=B,this._ctx={table:d,index:":id"===x?null:x,or:M},this._cmp=this._ascending=st,this._descending=function(d,x){return st(x,d)},this._max=function(d,x){return 0<st(d,x)?d:x},this._min=function(d,x){return st(d,x)<0?d:x},this._IDBKeyRange=B._deps.IDBKeyRange,!this._IDBKeyRange)throw new he.MissingAPI}))),this.on("versionchange",(function(d){0<d.newVersion?console.warn("Another connection wants to upgrade database '".concat(M.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(M.name,"'. Closing db now to resume the delete request.")),M.close({disableAutoOpen:!1})})),this.on("blocked",(function(d){!d.newVersion||d.newVersion<d.oldVersion?console.warn("Dexie.delete('".concat(M.name,"') was blocked")):console.warn("Upgrade '".concat(M.name,"' blocked by other connection holding version ").concat(d.oldVersion/10))})),this._maxKey=Yt(x.IDBKeyRange),this._createTransaction=function(d,x,E,C){return new M.Transaction(d,x,E,M._options.chromeTransactionDurability,C)},this._fireOnBlocked=function(d){M.on("blocked").fire(d),Nt.filter((function(d){return d.name===M.name&&d!==M&&!d._state.vcFired})).map((function(x){return x.on("versionchange").fire(d)}))},this.use(hr),this.use(dr),this.use(fr),this.use(sr),this.use(cr);var q=new Proxy(this,{get:function(d,x,E){if("_vip"===x)return!0;if("table"===x)return function(d){return Zn(M.table(d),q)};var C=Reflect.get(d,x,E);return C instanceof dn?Zn(C,q):"tables"===x?C.map((function(d){return Zn(d,q)})):"_createTransaction"===x?function(){return Zn(C.apply(this,arguments),q)}:C}});this.vip=q,E.forEach((function(d){return d(M)}))}ae="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";var mr,vr=(ir.prototype.subscribe=function(d,x,M){return this._subscribe(d&&"function"!=typeof d?d:{next:d,error:x,complete:M})},ir.prototype[ae]=function(){return this},ir);function ir(d){this._subscribe=d}try{mr={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch(q){mr={indexedDB:null,IDBKeyRange:null}}function or(d){var x,M=!1,E=new vr((function(E){var C,j=ie(d),R=!1,D={},B={},F={get closed(){return R},unsubscribe:function(){R||(R=!0,C&&C.abort(),q&&Un.storagemutated.unsubscribe(f))}};E.start&&E.start(F);var q=!1,l=function(){return Ge(t)},f=function(d){En(D,d),Kn(B,D)&&l()},t=function(){var F,K,V;!R&&mr.indexedDB&&(D={},F={},C&&C.abort(),C=new AbortController,V=function(x){var M=je();try{j&&Le();var E=Ne(d,x);return E=j?E.finally(Ue):E}finally{M&&Ae()}}(K={subscr:F,signal:C.signal,requery:l,querier:d,trans:null}),Promise.resolve(V).then((function(d){M=!0,x=d,R||K.signal.aborted||(D={},function(d){for(var x in d)if(m(d,x))return;return 1}(B=F)||q||(Un(Rn,f),q=!0),Ge((function(){return!R&&E.next&&E.next(d)})))}),(function(d){M=!1,["DatabaseClosedError","AbortError"].includes(null==d?void 0:d.name)||R||Ge((function(){R||E.error&&E.error(d)}))})))};return setTimeout(l,0),F}));return E.hasValue=function(){return M},E.getValue=function(){return x},E}var gr=pr;function ur(d){var x=br;try{br=!0,Un.storagemutated.fire(d),Dn(d,!0)}finally{br=x}}r(gr,w(w({},de),{delete:function(d){return new gr(d,{addons:[]}).delete()},exists:function(d){return new gr(d,{addons:[]}).open().then((function(d){return d.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(d){try{return M=(x=gr.dependencies).indexedDB,x=x.IDBKeyRange,(vn(M)?Promise.resolve(M.databases()).then((function(d){return d.map((function(d){return d.name})).filter((function(d){return d!==Lt}))})):yn(M,x).toCollection().primaryKeys()).then(d)}catch(d){return ft(new he.MissingAPI)}var x,M},defineClass:function(){return function(d){a(this,d)}},ignoreTransaction:function(d){return Fe.trans?$e(Fe.transless,d):d()},vip:mn,async:function(d){return function(){try{var x=In(d.apply(this,arguments));return x&&"function"==typeof x.then?x:_e.resolve(x)}catch(x){return ft(x)}}},spawn:function(d,x,M){try{var E=In(d.apply(M,x||[]));return E&&"function"==typeof E.then?E:_e.resolve(E)}catch(d){return ft(d)}},currentTransaction:{get:function(){return Fe.trans||null}},waitFor:function(d,x){return x=_e.resolve("function"==typeof d?gr.ignoreTransaction(d):d).timeout(x||6e4),Fe.trans?Fe.trans.waitFor(x):x},Promise:_e,debug:{get:function(){return pe},set:function(d){oe(d)}},derive:o,extend:a,props:r,override:p,Events:dt,on:Un,liveQuery:or,extendObservabilitySet:En,getByKeyPath:k,setByKeyPath:P,delByKeyPath:function(d,x){"string"==typeof x?P(d,x,void 0):"length"in x&&[].map.call(x,(function(x){P(d,x,void 0)}))},shallowClone:g,deepClone:S,getObjectDiff:Fn,cmp:st,asap:v,minKey:-1/0,addons:[],connections:Nt,errnames:ue,dependencies:mr,cache:nr,semVer:"4.0.7",version:"4.0.7".split(".").map((function(d){return parseInt(d)})).reduce((function(d,x,M){return d+x/Math.pow(10,2*M)}))})),gr.maxKey=Yt(gr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Un(Rn,(function(d){br||(d=new CustomEvent(Nn,{detail:d}),br=!0,dispatchEvent(d),br=!1)})),addEventListener(Nn,(function(d){d=d.detail,br||ur(d)})));var yr,br=!1,lr=function(){};return"undefined"!=typeof BroadcastChannel&&((lr=function(){(yr=new BroadcastChannel(Nn)).onmessage=function(d){return d.data&&ur(d.data)}})(),"function"==typeof yr.unref&&yr.unref(),Un(Rn,(function(d){br||yr.postMessage(d)}))),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",(function(d){if(!pr.disableBfCache&&d.persisted){pe&&console.debug("Dexie: handling persisted pagehide"),null!=yr&&yr.close();for(var x=0,M=Nt;x<M.length;x++)M[x].close({disableAutoOpen:!1})}})),addEventListener("pageshow",(function(d){!pr.disableBfCache&&d.persisted&&(pe&&console.debug("Dexie: handling persisted pageshow"),lr(),ur({all:new gn(-1/0,[[]])}))}))),_e.rejectionMapper=function(d,x){return!d||d instanceof N||d instanceof TypeError||d instanceof SyntaxError||!d.name||!fe[d.name]?d:(x=new fe[d.name](x||d.message,d),"stack"in d&&l(x,"stack",{get:function(){return this.inner.stack}}),x)},oe(pe),w(pr,Object.freeze({__proto__:null,Dexie:pr,liveQuery:or,Entity:ut,cmp:st,PropModSymbol:q,PropModification:Sn,replacePrefix:function(d,x){return new Sn({replacePrefix:[d,x]})},add:function(d){return new Sn({add:d})},remove:function(d){return new Sn({remove:d})},default:pr,RangeSet:gn,mergeRanges:_n,rangesOverlap:xn}),{default:pr}),pr}()},19086:d=>{"use strict";var x=Object.prototype.hasOwnProperty,M=Object.prototype.toString,E=Object.defineProperty,C=Object.getOwnPropertyDescriptor,j=function isArray(d){return"function"==typeof Array.isArray?Array.isArray(d):"[object Array]"===M.call(d)},R=function isPlainObject(d){if(!d||"[object Object]"!==M.call(d))return!1;var E,C=x.call(d,"constructor"),j=d.constructor&&d.constructor.prototype&&x.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!C&&!j)return!1;for(E in d);return void 0===E||x.call(d,E)},D=function setProperty(d,x){E&&"__proto__"===x.name?E(d,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):d[x.name]=x.newValue},B=function getProperty(d,M){if("__proto__"===M){if(!x.call(d,M))return;if(C)return C(d,M).value}return d[M]};d.exports=function extend(){var d,x,M,E,C,F,q=arguments[0],K=1,V=arguments.length,W=!1;for("boolean"==typeof q&&(W=q,q=arguments[1]||{},K=2),(null==q||"object"!=typeof q&&"function"!=typeof q)&&(q={});K<V;++K)if(null!=(d=arguments[K]))for(x in d)M=B(q,x),q!==(E=B(d,x))&&(W&&E&&(R(E)||(C=j(E)))?(C?(C=!1,F=M&&j(M)?M:[]):F=M&&R(M)?M:{},D(q,{name:x,newValue:extend(W,F,E)})):void 0!==E&&D(q,{name:x,newValue:E}));return q}},90059:(d,x,M)=>{"use strict";M.d(x,{Z:()=>Pane});var E=M(33334),C=M(15993);function Pane(d){const x=(0,C.useRef)(null),{className:M,children:j,main:R,basis:D,style:B}=d,F=(0,C.useContext)(E.w);(0,C.useLayoutEffect)((()=>{if(!x.current)return;let d=Object.assign({flexShrink:1,flexGrow:R?0:1,flexBasis:0},B||{});R&&(F.disable?(d.flexBasis=0,x.current.style.removeProperty("min-width"),x.current.style.removeProperty("min-height"),x.current.style.removeProperty("max-width"),x.current.style.removeProperty("max-height")):(d.flexBasis=F.getMainSizeStyle(),"auto"===d.flexBasis&&D&&(d.flexBasis=D),"vertical"==F.split?(F.minSize>0&&(d.minWidth=`${F.minSize}px`),F.maxSize>0&&(d.maxWidth=`${F.maxSize}px`),F.maxSize<0&&(d.maxWidth=`calc(100% + ${F.maxSize}px)`)):(F.minSize>0&&(d.minHeight=`${F.minSize}px`),F.maxSize>0&&(d.maxHeight=`${F.maxSize}px`),F.maxSize<0&&(d.maxHeight=`calc(100% + ${F.maxSize}px)`)))),Object.assign(x.current.style,d)}));let q=F.mode;return R||"resize"===F.mode||(q="minimize"===F.mode?"maximize":"minimize"),C.createElement("div",{id:`pane-${null!=R&&R}`,className:M,"data-mode":q,ref:x},j)}},13395:(d,x,M)=>{"use strict";M.d(x,{L:()=>Resizer});var E=M(15993),C=M(33334);function Resizer(d){const{className:x,children:M,style:j}=d,R=(0,E.useContext)(C.w);return R.disable?null:E.createElement("div",{style:j,className:x,onMouseDown:R.onMouseDown,onTouchStart:R.onTouchStart,onTouchEnd:R.onTouchEnd,onClick:R.onClick,onDoubleClick:R.onDoubleClick},M)}},21381:(d,x,M)=>{"use strict";M.d(x,{B:()=>Split});var E=M(33334),C=M(15993);class Split extends C.Component{constructor(d){var x,M;super(d),this.isMainSecond=()=>{let d=!1;return C.Children.forEach(this.props.children,((x,M)=>{C.isValidElement(x)&&"main"in x.props&&M>0&&(d=!0)})),d||this.getSecondOffset()<this.getMainOffset()||this.getSecondOffset()===this.getContainerOffset()&&0===this.getSecondSize()&&0!==this.getMainSize()},this.getMainSizeStyle=()=>{switch(this.state.mode){case"minimize":return"0px";case"maximize":return"100%";default:if(-1===this.state.size)return"auto";const d=this.getContainerSize();return-1===d?`${this.state.size}px`:`${Math.min(this.state.size,d)}px`}},this.getContainerSize=()=>this.getSize(this.splitRef.current),this.getMainSize=()=>this.getSize(this.mainRef),this.getSecondSize=()=>this.getSize(this.secondRef),this.getMainOffset=()=>{if(!this.mainRef)return-1;const d=this.mainRef.getBoundingClientRect();return"vertical"===this.state.split?d.left:d.top},this.getSecondOffset=()=>{if(!this.secondRef)return-1;const d=this.secondRef.getBoundingClientRect();return"vertical"===this.state.split?d.left:d.top},this.getContainerOffset=d=>{if(!this.splitRef.current)return-1;const x=this.splitRef.current.getBoundingClientRect();return"vertical"===this.state.split?x.left+(d?x.width:0):x.top+(d?x.height:0)},this.stopResize=()=>{this.setState({isResizing:!1})},this.startResize=(d,x)=>{this.setState({isResizing:!0})},this.resize=(d,x)=>{if(!this.state.isResizing)return;const M="vertical"===this.state.split?d:x;let E=-1;E=this.isMainSecond()?this.getContainerOffset(!0)-M:M-this.getContainerOffset(),this.setSize(E,!0)},this.setDisable=d=>{var x,M;this.setState({disable:d}),null===(M=(x=this.props).onDisable)||void 0===M||M.call(x,d)},this.setSize=(d,x)=>{var M,E,C,j;let R=this.getContainerSize();if(-1===R)return;let D=d,B=this.state.mode;-1!==D&&(this.state.maxSize>-1&&D>=this.state.maxSize&&(D=this.state.maxSize),this.state.maxSize<0&&D>=R+this.state.maxSize&&(D=R+this.state.maxSize),this.state.minSize>-1&&D<=this.state.minSize&&(D=this.state.minSize)),"maximize"!==B&&D<=this.state.sticky?(x&&(D=0),B="minimize"):R<=D+this.state.sticky?(x&&(D=R),B="maximize"):B="resize";const F=x?D/R:this.state.ratio;this.setState({size:D,mode:B,ratio:F}),null===(E=(M=this.props).onResize)||void 0===E||E.call(M,D,F),null===(j=(C=this.props).onModeChange)||void 0===j||j.call(C,B)},this.setMode=d=>{var x,M;this.setState({mode:d}),null===(M=(x=this.props).onModeChange)||void 0===M||M.call(x,d)},this.handleReactStartResize=d=>{d.target===d.currentTarget&&this.onStartResize(d.nativeEvent)},this.onStartResize=d=>{let x,M;if(d instanceof MouseEvent)x=d.clientX,M=d.clientX;else{const E=d.touches[0];x=E.clientX,M=E.clientX}this.startResize(x,M)},this.handleReactEndResize=d=>{d.target===d.currentTarget&&this.onEndResize(d.nativeEvent)},this.onEndResize=d=>{this.state.isResizing&&this.stopResize()},this.onDoubleClick=d=>{var x,M;if(d.target!==d.currentTarget)return;this.setState({size:-1}),null===(M=(x=this.props).onResize)||void 0===M||M.call(x,-1,this.state.ratio)},this.onMouseMove=d=>{if(!this.state.isResizing)return;d.preventDefault();const{clientX:x,clientY:M}=d;this.resize(x,M)},this.onTouchMove=d=>{if(!this.state.isResizing)return;d.preventDefault();const{clientX:x,clientY:M}=d.touches[0];this.resize(x,M)},this.onSplitResize=()=>{-1!==this.state.size&&"resize"===this.state.mode&&this.state.keepRatio&&this.setSize(Math.round(this.state.ratio*this.getContainerSize()))},this.splitRef=C.createRef(),this.sizeObserver=new ResizeObserver((()=>{this.onSplitResize()})),this.state=Object.assign(Object.assign({},E.n),{isFixed:!!d.mode,split:d.split||"vertical",sticky:d.sticky||-1,maxSize:d.maxSize||-1,minSize:d.minSize||-1,keepRatio:!!d.keepRatio,disable:!!d.disable,size:null!==(x=d.size)&&void 0!==x?x:-1,ratio:null!==(M=d.ratio)&&void 0!==M?M:-1,mode:d.mode||"resize",isMainSecond:this.isMainSecond,getContainerSize:this.getContainerSize,getMainSize:this.getMainSize,getMainSizeStyle:this.getMainSizeStyle,setMode:this.setMode,setSize:this.setSize,setDisable:this.setDisable,onMouseDown:this.handleReactStartResize,onTouchStart:this.handleReactStartResize,onClick:this.handleReactEndResize,onTouchEnd:this.handleReactEndResize,onDoubleClick:this.onDoubleClick})}get mainRef(){var d,x;return null!==(x=null===(d=this.splitRef.current)||void 0===d?void 0:d.querySelector("#pane-true"))&&void 0!==x?x:null}get secondRef(){var d,x;return null!==(x=null===(d=this.splitRef.current)||void 0===d?void 0:d.querySelector("#pane-false"))&&void 0!==x?x:null}static getDerivedStateFromProps(d,x){var M,E,C;return d.split!==x.split||d.maxSize!==x.maxSize||d.minSize!==x.minSize||d.sticky!==x.sticky||d.keepRatio!==x.keepRatio||d.disable!==x.disable||d.mode!==x.mode||d.size!==x.size||d.ratio!==x.ratio?{split:d.split||"vertical",sticky:d.sticky||0,maxSize:d.maxSize||-1,minSize:d.minSize||-1,keepRatio:!!d.keepRatio,disable:null!==(M=d.disable)&&void 0!==M?M:x.disable,isFixed:!!d.mode,mode:d.mode||(x.isFixed?"resize":x.mode),size:null!==(E=d.size)&&void 0!==E?E:x.size,ratio:null!==(C=d.ratio)&&void 0!==C?C:x.ratio}:null}componentDidMount(){this.splitRef.current&&this.sizeObserver.observe(this.splitRef.current),document.addEventListener("mouseup",this.onEndResize),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),document.addEventListener("touchend",this.onEndResize),document.addEventListener("touchcancel",this.onEndResize)}componentWillUnmount(){this.splitRef.current&&this.sizeObserver.unobserve(this.splitRef.current),document.removeEventListener("mouseup",this.onEndResize),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onEndResize),document.removeEventListener("touchcancel",this.onEndResize)}render(){const{className:d,children:x,style:M}=this.props;return C.createElement(E.w.Provider,{value:this.state},C.createElement("div",{className:d,style:M,ref:this.splitRef},x))}getSize(d){if(!d)return-1;const x=d.getBoundingClientRect();return"vertical"===this.state.split?x.width:x.height}}},33334:(d,x,M)=>{"use strict";M.d(x,{n:()=>C,w:()=>j});var E=M(15993);const C={split:"vertical",isResizing:!1},j=(0,E.createContext)(null)},68782:d=>{var x=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,M=/\n/g,E=/^\s*/,C=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,j=/^:\s*/,R=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,D=/^[;\s]*/,B=/^\s+|\s+$/g,F="";function trim(d){return d?d.replace(B,F):F}d.exports=function(d,B){if("string"!=typeof d)throw new TypeError("First argument must be a string");if(!d)return[];B=B||{};var q=1,K=1;function updatePosition(d){var x=d.match(M);x&&(q+=x.length);var E=d.lastIndexOf("\n");K=~E?d.length-E:K+d.length}function position(){var d={line:q,column:K};return function(x){return x.position=new Position(d),whitespace(),x}}function Position(d){this.start=d,this.end={line:q,column:K},this.source=B.source}Position.prototype.content=d;var V=[];function error(x){var M=new Error(B.source+":"+q+":"+K+": "+x);if(M.reason=x,M.filename=B.source,M.line=q,M.column=K,M.source=d,!B.silent)throw M;V.push(M)}function match(x){var M=x.exec(d);if(M){var E=M[0];return updatePosition(E),d=d.slice(E.length),M}}function whitespace(){match(E)}function comments(d){var x;for(d=d||[];x=comment();)!1!==x&&d.push(x);return d}function comment(){var x=position();if("/"==d.charAt(0)&&"*"==d.charAt(1)){for(var M=2;F!=d.charAt(M)&&("*"!=d.charAt(M)||"/"!=d.charAt(M+1));)++M;if(M+=2,F===d.charAt(M-1))return error("End of comment missing");var E=d.slice(2,M-2);return K+=2,updatePosition(E),d=d.slice(M),K+=2,x({type:"comment",comment:E})}}function declaration(){var d=position(),M=match(C);if(M){if(comment(),!match(j))return error("property missing ':'");var E=match(R),B=d({type:"declaration",property:trim(M[0].replace(x,F)),value:E?trim(E[0].replace(x,F)):F});return match(D),B}}return whitespace(),function declarations(){var d,x=[];for(comments(x);d=declaration();)!1!==d&&(x.push(d),comments(x));return x}()}},82175:d=>{"use strict";var x=Object.prototype.toString;d.exports=function(d){var M;return"[object Object]"===x.call(d)&&(null===(M=Object.getPrototypeOf(d))||M===Object.getPrototypeOf({}))}},75961:(d,x,M)=>{"use strict";M.d(x,{A:()=>yi});var E=1,C=2,j=3,R=5,D=6378137,B=6356752.314,F=.0066943799901413165,q=484813681109536e-20,K=Math.PI/2,V=.16666666666666666,W=.04722222222222222,$=.022156084656084655,Q=1e-10,Y=.017453292519943295,ie=57.29577951308232,ae=Math.PI/4,se=2*Math.PI,ue=3.14159265359,ce={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const he={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var fe=/[\s_\-\/\(\)]/g;function match(d,x){if(d[x])return d[x];for(var M,E=Object.keys(d),C=x.toLowerCase().replace(fe,""),j=-1;++j<E.length;)if((M=E[j]).toLowerCase().replace(fe,"")===C)return d[M]}function projString(d){var x,M,E,C={},j=d.split("+").map((function(d){return d.trim()})).filter((function(d){return d})).reduce((function(d,x){var M=x.split("=");return M.push(!0),d[M[0].toLowerCase()]=M[1],d}),{}),R={proj:"projName",datum:"datumCode",rf:function(d){C.rf=parseFloat(d)},lat_0:function(d){C.lat0=d*Y},lat_1:function(d){C.lat1=d*Y},lat_2:function(d){C.lat2=d*Y},lat_ts:function(d){C.lat_ts=d*Y},lon_0:function(d){C.long0=d*Y},lon_1:function(d){C.long1=d*Y},lon_2:function(d){C.long2=d*Y},alpha:function(d){C.alpha=parseFloat(d)*Y},gamma:function(d){C.rectified_grid_angle=parseFloat(d)},lonc:function(d){C.longc=d*Y},x_0:function(d){C.x0=parseFloat(d)},y_0:function(d){C.y0=parseFloat(d)},k_0:function(d){C.k0=parseFloat(d)},k:function(d){C.k0=parseFloat(d)},a:function(d){C.a=parseFloat(d)},b:function(d){C.b=parseFloat(d)},r:function(d){C.a=C.b=parseFloat(d)},r_a:function(){C.R_A=!0},zone:function(d){C.zone=parseInt(d,10)},south:function(){C.utmSouth=!0},towgs84:function(d){C.datum_params=d.split(",").map((function(d){return parseFloat(d)}))},to_meter:function(d){C.to_meter=parseFloat(d)},units:function(d){C.units=d;var x=match(he,d);x&&(C.to_meter=x.to_meter)},from_greenwich:function(d){C.from_greenwich=d*Y},pm:function(d){var x=match(ce,d);C.from_greenwich=(x||parseFloat(d))*Y},nadgrids:function(d){"@null"===d?C.datumCode="none":C.nadgrids=d},axis:function(d){var x="ewnsud";3===d.length&&-1!==x.indexOf(d.substr(0,1))&&-1!==x.indexOf(d.substr(1,1))&&-1!==x.indexOf(d.substr(2,1))&&(C.axis=d)},approx:function(){C.approx=!0}};for(x in j)M=j[x],x in R?"function"==typeof(E=R[x])?E(M):C[E]=M:C[x]=M;return"string"==typeof C.datumCode&&"WGS84"!==C.datumCode&&(C.datumCode=C.datumCode.toLowerCase()),C}const de=function parseString(d){var x=new Parser(d);return x.output()};var pe=1,me=/\s/,ve=/[A-Za-z]/,ge=/[A-Za-z84_]/,ye=/[,\]]/,be=/[\d\.E\-\+]/;function Parser(d){if("string"!=typeof d)throw new Error("not a string");this.text=d.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=pe}function mapit(d,x,M){Array.isArray(x)&&(M.unshift(x),x=null);var E=x?{}:d,C=M.reduce((function(d,x){return sExpr(x,d),d}),E);x&&(d[x]=C)}function sExpr(d,x){if(Array.isArray(d)){var M=d.shift();if("PARAMETER"===M&&(M=d.shift()),1===d.length)return Array.isArray(d[0])?(x[M]={},void sExpr(d[0],x[M])):void(x[M]=d[0]);if(d.length)if("TOWGS84"!==M){if("AXIS"===M)return M in x||(x[M]=[]),void x[M].push(d);var E;switch(Array.isArray(M)||(x[M]={}),M){case"UNIT":case"PRIMEM":case"VERT_DATUM":return x[M]={name:d[0].toLowerCase(),convert:d[1]},void(3===d.length&&sExpr(d[2],x[M]));case"SPHEROID":case"ELLIPSOID":return x[M]={name:d[0],a:d[1],rf:d[2]},void(4===d.length&&sExpr(d[3],x[M]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return d[0]=["name",d[0]],void mapit(x,M,d);default:for(E=-1;++E<d.length;)if(!Array.isArray(d[E]))return sExpr(d,x[M]);return mapit(x,M,d)}}else x[M]=d;else x[M]=!0}else x[d]=!0}Parser.prototype.readCharicter=function(){var d=this.text[this.place++];if(4!==this.state)for(;me.test(d);){if(this.place>=this.text.length)return;d=this.text[this.place++]}switch(this.state){case pe:return this.neutral(d);case 2:return this.keyword(d);case 4:return this.quoted(d);case 5:return this.afterquote(d);case 3:return this.number(d);case-1:return}},Parser.prototype.afterquote=function(d){if('"'===d)return this.word+='"',void(this.state=4);if(ye.test(d))return this.word=this.word.trim(),void this.afterItem(d);throw new Error("havn't handled \""+d+'" in afterquote yet, index '+this.place)},Parser.prototype.afterItem=function(d){return","===d?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=pe)):"]"===d?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=pe,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},Parser.prototype.number=function(d){if(!be.test(d)){if(ye.test(d))return this.word=parseFloat(this.word),void this.afterItem(d);throw new Error("havn't handled \""+d+'" in number yet, index '+this.place)}this.word+=d},Parser.prototype.quoted=function(d){'"'!==d?this.word+=d:this.state=5},Parser.prototype.keyword=function(d){if(ge.test(d))this.word+=d;else{if("["===d){var x=[];return x.push(this.word),this.level++,null===this.root?this.root=x:this.currentObject.push(x),this.stack.push(this.currentObject),this.currentObject=x,void(this.state=pe)}if(!ye.test(d))throw new Error("havn't handled \""+d+'" in keyword yet, index '+this.place);this.afterItem(d)}},Parser.prototype.neutral=function(d){if(ve.test(d))return this.word=d,void(this.state=2);if('"'===d)return this.word="",void(this.state=4);if(be.test(d))return this.word=d,void(this.state=3);if(!ye.test(d))throw new Error("havn't handled \""+d+'" in neutral yet, index '+this.place);this.afterItem(d)},Parser.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var xe=.017453292519943295;function d2r(d){return d*xe}function wkt_parser(d){var x=de(d),M=x.shift(),E=x.shift();x.unshift(["name",E]),x.unshift(["type",M]);var C={};return sExpr(x,C),function cleanWKT(d){if("GEOGCS"===d.type?d.projName="longlat":"LOCAL_CS"===d.type?(d.projName="identity",d.local=!0):"object"==typeof d.PROJECTION?d.projName=Object.keys(d.PROJECTION)[0]:d.projName=d.PROJECTION,d.AXIS){for(var x="",M=0,E=d.AXIS.length;M<E;++M){var C=[d.AXIS[M][0].toLowerCase(),d.AXIS[M][1].toLowerCase()];-1!==C[0].indexOf("north")||("y"===C[0]||"lat"===C[0])&&"north"===C[1]?x+="n":-1!==C[0].indexOf("south")||("y"===C[0]||"lat"===C[0])&&"south"===C[1]?x+="s":-1!==C[0].indexOf("east")||("x"===C[0]||"lon"===C[0])&&"east"===C[1]?x+="e":-1===C[0].indexOf("west")&&("x"!==C[0]&&"lon"!==C[0]||"west"!==C[1])||(x+="w")}2===x.length&&(x+="u"),3===x.length&&(d.axis=x)}d.UNIT&&(d.units=d.UNIT.name.toLowerCase(),"metre"===d.units&&(d.units="meter"),d.UNIT.convert&&("GEOGCS"===d.type?d.DATUM&&d.DATUM.SPHEROID&&(d.to_meter=d.UNIT.convert*d.DATUM.SPHEROID.a):d.to_meter=d.UNIT.convert));var j=d.GEOGCS;function toMeter(x){return x*(d.to_meter||1)}"GEOGCS"===d.type&&(j=d),j&&(j.DATUM?d.datumCode=j.DATUM.name.toLowerCase():d.datumCode=j.name.toLowerCase(),"d_"===d.datumCode.slice(0,2)&&(d.datumCode=d.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==d.datumCode&&"new_zealand_1949"!==d.datumCode||(d.datumCode="nzgd49"),"wgs_1984"!==d.datumCode&&"world_geodetic_system_1984"!==d.datumCode||("Mercator_Auxiliary_Sphere"===d.PROJECTION&&(d.sphere=!0),d.datumCode="wgs84"),"_ferro"===d.datumCode.slice(-6)&&(d.datumCode=d.datumCode.slice(0,-6)),"_jakarta"===d.datumCode.slice(-8)&&(d.datumCode=d.datumCode.slice(0,-8)),~d.datumCode.indexOf("belge")&&(d.datumCode="rnb72"),j.DATUM&&j.DATUM.SPHEROID&&(d.ellps=j.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===d.ellps.toLowerCase().slice(0,13)&&(d.ellps="intl"),d.a=j.DATUM.SPHEROID.a,d.rf=parseFloat(j.DATUM.SPHEROID.rf,10)),j.DATUM&&j.DATUM.TOWGS84&&(d.datum_params=j.DATUM.TOWGS84),~d.datumCode.indexOf("osgb_1936")&&(d.datumCode="osgb36"),~d.datumCode.indexOf("osni_1952")&&(d.datumCode="osni52"),(~d.datumCode.indexOf("tm65")||~d.datumCode.indexOf("geodetic_datum_of_1965"))&&(d.datumCode="ire65"),"ch1903+"===d.datumCode&&(d.datumCode="ch1903"),~d.datumCode.indexOf("israel")&&(d.datumCode="isr93")),d.b&&!isFinite(d.b)&&(d.b=d.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",d2r],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",d2r],["x0","false_easting",toMeter],["y0","false_northing",toMeter],["long0","central_meridian",d2r],["lat0","latitude_of_origin",d2r],["lat0","standard_parallel_1",d2r],["lat1","standard_parallel_1",d2r],["lat2","standard_parallel_2",d2r],["azimuth","Azimuth"],["alpha","azimuth",d2r],["srsCode","name"]].forEach((function(x){return function rename(d,x){var M=x[0],E=x[1];!(M in d)&&E in d&&(d[M]=d[E],3===x.length&&(d[M]=x[2](d[M])))}(d,x)})),d.long0||!d.longc||"Albers_Conic_Equal_Area"!==d.projName&&"Lambert_Azimuthal_Equal_Area"!==d.projName||(d.long0=d.longc),d.lat_ts||!d.lat1||"Stereographic_South_Pole"!==d.projName&&"Polar Stereographic (variant B)"!==d.projName?!d.lat_ts&&d.lat0&&"Polar_Stereographic"===d.projName&&(d.lat_ts=d.lat0,d.lat0=d2r(d.lat0>0?90:-90)):(d.lat0=d2r(d.lat1>0?90:-90),d.lat_ts=d.lat1)}(C),C}function defs(d){var x=this;if(2===arguments.length){var M=arguments[1];"string"==typeof M?"+"===M.charAt(0)?defs[d]=projString(arguments[1]):defs[d]=wkt_parser(arguments[1]):defs[d]=M}else if(1===arguments.length){if(Array.isArray(d))return d.map((function(d){Array.isArray(d)?defs.apply(x,d):defs(d)}));if("string"==typeof d){if(d in defs)return defs[d]}else"EPSG"in d?defs["EPSG:"+d.EPSG]=d:"ESRI"in d?defs["ESRI:"+d.ESRI]=d:"IAU2000"in d?defs["IAU2000:"+d.IAU2000]=d:console.log(d);return}}!function global(d){d("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),d("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),d("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),d.WGS84=d["EPSG:4326"],d["EPSG:3785"]=d["EPSG:3857"],d.GOOGLE=d["EPSG:3857"],d["EPSG:900913"]=d["EPSG:3857"],d["EPSG:102113"]=d["EPSG:3857"]}(defs);const we=defs;var Me=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Ie=["3857","900913","3785","102113"];const Re=function parse(d){if(!function testObj(d){return"string"==typeof d}(d))return d;if(function testDef(d){return d in we}(d))return we[d];if(function testWKT(d){return Me.some((function(x){return d.indexOf(x)>-1}))}(d)){var x=wkt_parser(d);if(function checkMercator(d){var x=match(d,"authority");if(x){var M=match(x,"epsg");return M&&Ie.indexOf(M)>-1}}(x))return we["EPSG:3857"];var M=function checkProjStr(d){var x=match(d,"extension");if(x)return match(x,"proj4")}(x);return M?projString(M):x}return function testProj(d){return"+"===d[0]}(d)?projString(d):void 0};function extend(d,x){var M,E;if(d=d||{},!x)return d;for(E in x)void 0!==(M=x[E])&&(d[E]=M);return d}function msfnz(d,x,M){var E=d*x;return M/Math.sqrt(1-E*E)}function sign(d){return d<0?-1:1}function adjust_lon(d){return Math.abs(d)<=ue?d:d-sign(d)*se}function tsfnz(d,x,M){var E=d*M,C=.5*d;return E=Math.pow((1-E)/(1+E),C),Math.tan(.5*(K-x))/E}function phi2z(d,x){for(var M,E,C=.5*d,j=K-2*Math.atan(x),R=0;R<=15;R++)if(M=d*Math.sin(j),j+=E=K-2*Math.atan(x*Math.pow((1-M)/(1+M),C))-j,Math.abs(E)<=1e-10)return j;return-9999}function identity(d){return d}var Be=[{init:function init(){var d=this.b/this.a;this.es=1-d*d,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function forward(d){var x,M,E=d.x,C=d.y;if(C*ie>90&&C*ie<-90&&E*ie>180&&E*ie<-180)return null;if(Math.abs(Math.abs(C)-K)<=Q)return null;if(this.sphere)x=this.x0+this.a*this.k0*adjust_lon(E-this.long0),M=this.y0+this.a*this.k0*Math.log(Math.tan(ae+.5*C));else{var j=Math.sin(C),R=tsfnz(this.e,C,j);x=this.x0+this.a*this.k0*adjust_lon(E-this.long0),M=this.y0-this.a*this.k0*Math.log(R)}return d.x=x,d.y=M,d},inverse:function inverse(d){var x,M,E=d.x-this.x0,C=d.y-this.y0;if(this.sphere)M=K-2*Math.atan(Math.exp(-C/(this.a*this.k0)));else{var j=Math.exp(-C/(this.a*this.k0));if(-9999===(M=phi2z(this.e,j)))return null}return x=adjust_lon(this.long0+E/(this.a*this.k0)),d.x=x,d.y=M,d},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function longlat_init(){},forward:identity,inverse:identity,names:["longlat","identity"]}],Fe={},qe=[];function add(d,x){var M=qe.length;return d.names?(qe[M]=d,d.names.forEach((function(d){Fe[d.toLowerCase()]=M})),this):(console.log(x),!0)}const He={start:function start(){Be.forEach(add)},add,get:function get(d){if(!d)return!1;var x=d.toLowerCase();return void 0!==Fe[x]&&qe[Fe[x]]?qe[Fe[x]]:void 0}};var Xe={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Ze=Xe.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Xe.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Je={};Je.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Je.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Je.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Je.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Je.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Je.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Je.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Je.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},Je.militargeographische_institut={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},Je.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Je.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Je.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Je.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Je.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Je.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Je.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Je.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Je.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};const et=function datum(d,x,M,D,B,F,K){var V={};return V.datum_type=void 0===d||"none"===d?R:4,x&&(V.datum_params=x.map(parseFloat),0===V.datum_params[0]&&0===V.datum_params[1]&&0===V.datum_params[2]||(V.datum_type=E),V.datum_params.length>3&&(0===V.datum_params[3]&&0===V.datum_params[4]&&0===V.datum_params[5]&&0===V.datum_params[6]||(V.datum_type=C,V.datum_params[3]*=q,V.datum_params[4]*=q,V.datum_params[5]*=q,V.datum_params[6]=V.datum_params[6]/1e6+1))),K&&(V.datum_type=j,V.grids=K),V.a=M,V.b=D,V.es=B,V.ep2=F,V};var tt={};function parseNadgridString(d){if(0===d.length)return null;var x="@"===d[0];return x&&(d=d.slice(1)),"null"===d?{name:"null",mandatory:!x,grid:null,isNull:!0}:{name:d,mandatory:!x,grid:tt[d]||null,isNull:!1}}function secondsToRadians(d){return d/3600*Math.PI/180}function decodeString(d,x,M){return String.fromCharCode.apply(null,new Uint8Array(d.buffer.slice(x,M)))}function mapNodes(d){return d.map((function(d){return[secondsToRadians(d.longitudeShift),secondsToRadians(d.latitudeShift)]}))}function readGridHeader(d,x,M){return{name:decodeString(d,x+8,x+16).trim(),parent:decodeString(d,x+24,x+24+8).trim(),lowerLatitude:d.getFloat64(x+72,M),upperLatitude:d.getFloat64(x+88,M),lowerLongitude:d.getFloat64(x+104,M),upperLongitude:d.getFloat64(x+120,M),latitudeInterval:d.getFloat64(x+136,M),longitudeInterval:d.getFloat64(x+152,M),gridNodeCount:d.getInt32(x+168,M)}}function readGridNodes(d,x,M,E){for(var C=x+176,j=[],R=0;R<M.gridNodeCount;R++){var D={latitudeShift:d.getFloat32(C+16*R,E),longitudeShift:d.getFloat32(C+16*R+4,E),latitudeAccuracy:d.getFloat32(C+16*R+8,E),longitudeAccuracy:d.getFloat32(C+16*R+12,E)};j.push(D)}return j}function Projection(d,x){if(!(this instanceof Projection))return new Projection(d);x=x||function(d){if(d)throw d};var M=Re(d);if("object"==typeof M){var E=Projection.projections.get(M.projName);if(E){if(M.datumCode&&"none"!==M.datumCode){var C=match(Je,M.datumCode);C&&(M.datum_params=M.datum_params||(C.towgs84?C.towgs84.split(","):null),M.ellps=C.ellipse,M.datumName=C.datumName?C.datumName:M.datumCode)}M.k0=M.k0||1,M.axis=M.axis||"enu",M.ellps=M.ellps||"wgs84",M.lat1=M.lat1||M.lat0;var j=function sphere(d,x,M,E,C){if(!d){var j=match(Xe,E);j||(j=Ze),d=j.a,x=j.b,M=j.rf}return M&&!x&&(x=(1-1/M)*d),(0===M||Math.abs(d-x)<Q)&&(C=!0,x=d),{a:d,b:x,rf:M,sphere:C}}(M.a,M.b,M.rf,M.ellps,M.sphere),R=function eccentricity(d,x,M,E){var C=d*d,j=x*x,R=(C-j)/C,D=0;return E?(C=(d*=1-R*(V+R*(W+R*$)))*d,R=0):D=Math.sqrt(R),{es:R,e:D,ep2:(C-j)/j}}(j.a,j.b,j.rf,M.R_A),D=function getNadgrids(d){return void 0===d?null:d.split(",").map(parseNadgridString)}(M.nadgrids),B=M.datum||et(M.datumCode,M.datum_params,j.a,j.b,R.es,R.ep2,D);extend(this,M),extend(this,E),this.a=j.a,this.b=j.b,this.rf=j.rf,this.sphere=j.sphere,this.es=R.es,this.e=R.e,this.ep2=R.ep2,this.datum=B,this.init(),x(null,this)}else x(d)}else x(d)}Projection.projections=He,Projection.projections.start();const nt=Projection;function geodeticToGeocentric(d,x,M){var E,C,j,R,D=d.x,B=d.y,F=d.z?d.z:0;if(B<-K&&B>-1.001*K)B=-K;else if(B>K&&B<1.001*K)B=K;else{if(B<-K)return{x:-1/0,y:-1/0,z:d.z};if(B>K)return{x:1/0,y:1/0,z:d.z}}return D>Math.PI&&(D-=2*Math.PI),C=Math.sin(B),R=Math.cos(B),j=C*C,{x:((E=M/Math.sqrt(1-x*j))+F)*R*Math.cos(D),y:(E+F)*R*Math.sin(D),z:(E*(1-x)+F)*C}}function geocentricToGeodetic(d,x,M,E){var C,j,R,D,B,F,q,V,W,$,Q,Y,ie,ae,se,ue=1e-12,ce=d.x,he=d.y,fe=d.z?d.z:0;if(C=Math.sqrt(ce*ce+he*he),j=Math.sqrt(ce*ce+he*he+fe*fe),C/M<ue){if(ae=0,j/M<ue)return K,se=-E,{x:d.x,y:d.y,z:d.z}}else ae=Math.atan2(he,ce);R=fe/j,V=(D=C/j)*(1-x)*(B=1/Math.sqrt(1-x*(2-x)*D*D)),W=R*B,ie=0;do{ie++,F=x*(q=M/Math.sqrt(1-x*W*W))/(q+(se=C*V+fe*W-q*(1-x*W*W))),Y=(Q=R*(B=1/Math.sqrt(1-F*(2-F)*D*D)))*V-($=D*(1-F)*B)*W,V=$,W=Q}while(Y*Y>1e-24&&ie<30);return{x:ae,y:Math.atan(Q/Math.abs($)),z:se}}function checkParams(d){return d===E||d===C}function datum_transform(d,x,M){if(function compareDatums(d,x){return d.datum_type===x.datum_type&&!(d.a!==x.a||Math.abs(d.es-x.es)>5e-11)&&(d.datum_type===E?d.datum_params[0]===x.datum_params[0]&&d.datum_params[1]===x.datum_params[1]&&d.datum_params[2]===x.datum_params[2]:d.datum_type!==C||d.datum_params[0]===x.datum_params[0]&&d.datum_params[1]===x.datum_params[1]&&d.datum_params[2]===x.datum_params[2]&&d.datum_params[3]===x.datum_params[3]&&d.datum_params[4]===x.datum_params[4]&&d.datum_params[5]===x.datum_params[5]&&d.datum_params[6]===x.datum_params[6])}(d,x))return M;if(d.datum_type===R||x.datum_type===R)return M;var q=d.a,K=d.es;if(d.datum_type===j){if(0!==applyGridShift(d,!1,M))return;q=D,K=F}var V=x.a,W=x.b,$=x.es;if(x.datum_type===j&&(V=D,W=B,$=F),K===$&&q===V&&!checkParams(d.datum_type)&&!checkParams(x.datum_type))return M;if((M=geodeticToGeocentric(M,K,q),checkParams(d.datum_type)&&(M=function geocentricToWgs84(d,x,M){if(x===E)return{x:d.x+M[0],y:d.y+M[1],z:d.z+M[2]};if(x===C){var j=M[0],R=M[1],D=M[2],B=M[3],F=M[4],q=M[5],K=M[6];return{x:K*(d.x-q*d.y+F*d.z)+j,y:K*(q*d.x+d.y-B*d.z)+R,z:K*(-F*d.x+B*d.y+d.z)+D}}}(M,d.datum_type,d.datum_params)),checkParams(x.datum_type)&&(M=function geocentricFromWgs84(d,x,M){if(x===E)return{x:d.x-M[0],y:d.y-M[1],z:d.z-M[2]};if(x===C){var j=M[0],R=M[1],D=M[2],B=M[3],F=M[4],q=M[5],K=M[6],V=(d.x-j)/K,W=(d.y-R)/K,$=(d.z-D)/K;return{x:V+q*W-F*$,y:-q*V+W+B*$,z:F*V-B*W+$}}}(M,x.datum_type,x.datum_params)),M=geocentricToGeodetic(M,$,V,W),x.datum_type===j)&&0!==applyGridShift(x,!0,M))return;return M}function applyGridShift(d,x,M){if(null===d.grids||0===d.grids.length)return console.log("Grid shift grids not found"),-1;var E={x:-M.x,y:M.y},C={x:Number.NaN,y:Number.NaN},j=[];e:for(var R=0;R<d.grids.length;R++){var D=d.grids[R];if(j.push(D.name),D.isNull){C=E;break}if(D.mandatory,null!==D.grid)for(var B=D.grid.subgrids,F=0,q=B.length;F<q;F++){var K=B[F],V=(Math.abs(K.del[1])+Math.abs(K.del[0]))/1e4,W=K.ll[0]-V,$=K.ll[1]-V,Q=K.ll[0]+(K.lim[0]-1)*K.del[0]+V,Y=K.ll[1]+(K.lim[1]-1)*K.del[1]+V;if(!($>E.y||W>E.x||Y<E.y||Q<E.x)&&(C=applySubgridShift(E,x,K),!isNaN(C.x)))break e}else if(D.mandatory)return console.log("Unable to find mandatory grid '"+D.name+"'"),-1}return isNaN(C.x)?(console.log("Failed to find a grid shift table for location '"+-E.x*ie+" "+E.y*ie+" tried: '"+j+"'"),-1):(M.x=-C.x,M.y=C.y,0)}function applySubgridShift(d,x,M){var E={x:Number.NaN,y:Number.NaN};if(isNaN(d.x))return E;var C={x:d.x,y:d.y};C.x-=M.ll[0],C.y-=M.ll[1],C.x=adjust_lon(C.x-Math.PI)+Math.PI;var j=nadInterpolate(C,M);if(x){if(isNaN(j.x))return E;j.x=C.x-j.x,j.y=C.y-j.y;var R,D,B=9;do{if(D=nadInterpolate(j,M),isNaN(D.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}R={x:C.x-(D.x+j.x),y:C.y-(D.y+j.y)},j.x+=R.x,j.y+=R.y}while(B--&&Math.abs(R.x)>1e-12&&Math.abs(R.y)>1e-12);if(B<0)return console.log("Inverse grid shift iterator failed to converge."),E;E.x=adjust_lon(j.x+M.ll[0]),E.y=j.y+M.ll[1]}else isNaN(j.x)||(E.x=d.x+j.x,E.y=d.y+j.y);return E}function nadInterpolate(d,x){var M,E={x:d.x/x.del[0],y:d.y/x.del[1]},C=Math.floor(E.x),j=Math.floor(E.y),R=E.x-1*C,D=E.y-1*j,B={x:Number.NaN,y:Number.NaN};if(C<0||C>=x.lim[0])return B;if(j<0||j>=x.lim[1])return B;M=j*x.lim[0]+C;var F=x.cvs[M][0],q=x.cvs[M][1];M++;var K=x.cvs[M][0],V=x.cvs[M][1];M+=x.lim[0];var W=x.cvs[M][0],$=x.cvs[M][1];M--;var Q=x.cvs[M][0],Y=x.cvs[M][1],ie=R*D,ae=R*(1-D),se=(1-R)*(1-D),ue=(1-R)*D;return B.x=se*F+ae*K+ue*Q+ie*W,B.y=se*q+ae*V+ue*Y+ie*$,B}function adjust_axis(d,x,M){var E,C,j,R=M.x,D=M.y,B=M.z||0,F={};for(j=0;j<3;j++)if(!x||2!==j||void 0!==M.z)switch(0===j?(E=R,C=-1!=="ew".indexOf(d.axis[j])?"x":"y"):1===j?(E=D,C=-1!=="ns".indexOf(d.axis[j])?"y":"x"):(E=B,C="z"),d.axis[j]){case"e":case"n":F[C]=E;break;case"w":case"s":F[C]=-E;break;case"u":void 0!==M[C]&&(F.z=E);break;case"d":void 0!==M[C]&&(F.z=-E);break;default:return null}return F}function toPoint(d){var x={x:d[0],y:d[1]};return d.length>2&&(x.z=d[2]),d.length>3&&(x.m=d[3]),x}function checkCoord(d){if("function"==typeof Number.isFinite){if(Number.isFinite(d))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof d||d!=d||!isFinite(d))throw new TypeError("coordinates must be finite numbers")}function transform(d,x,M,R){var D,B=void 0!==(M=Array.isArray(M)?toPoint(M):{x:M.x,y:M.y,z:M.z,m:M.m}).z;if(function checkSanity(d){checkCoord(d.x),checkCoord(d.y)}(M),d.datum&&x.datum&&function checkNotWGS(d,x){return(d.datum.datum_type===E||d.datum.datum_type===C||d.datum.datum_type===j)&&"WGS84"!==x.datumCode||(x.datum.datum_type===E||x.datum.datum_type===C||x.datum.datum_type===j)&&"WGS84"!==d.datumCode}(d,x)&&(M=transform(d,D=new nt("WGS84"),M,R),d=D),R&&"enu"!==d.axis&&(M=adjust_axis(d,!1,M)),"longlat"===d.projName)M={x:M.x*Y,y:M.y*Y,z:M.z||0};else if(d.to_meter&&(M={x:M.x*d.to_meter,y:M.y*d.to_meter,z:M.z||0}),!(M=d.inverse(M)))return;if(d.from_greenwich&&(M.x+=d.from_greenwich),M=datum_transform(d.datum,x.datum,M))return x.from_greenwich&&(M={x:M.x-x.from_greenwich,y:M.y,z:M.z||0}),"longlat"===x.projName?M={x:M.x*ie,y:M.y*ie,z:M.z||0}:(M=x.forward(M),x.to_meter&&(M={x:M.x/x.to_meter,y:M.y/x.to_meter,z:M.z||0})),R&&"enu"!==x.axis?adjust_axis(x,!0,M):(M&&!B&&delete M.z,M)}var rt=nt("WGS84");function transformer(d,x,M,E){var C,j,R;return Array.isArray(M)?(C=transform(d,x,M,E)||{x:NaN,y:NaN},M.length>2?void 0!==d.name&&"geocent"===d.name||void 0!==x.name&&"geocent"===x.name?"number"==typeof C.z?[C.x,C.y,C.z].concat(M.splice(3)):[C.x,C.y,M[2]].concat(M.splice(3)):[C.x,C.y].concat(M.splice(2)):[C.x,C.y]):(j=transform(d,x,M,E),2===(R=Object.keys(M)).length||R.forEach((function(E){if(void 0!==d.name&&"geocent"===d.name||void 0!==x.name&&"geocent"===x.name){if("x"===E||"y"===E||"z"===E)return}else if("x"===E||"y"===E)return;j[E]=M[E]})),j)}function checkProj(d){return d instanceof nt?d:d.oProj?d.oProj:nt(d)}const ot=function proj4(d,x,M){d=checkProj(d);var E,C=!1;return void 0===x?(x=d,d=rt,C=!0):(void 0!==x.x||Array.isArray(x))&&(M=x,x=d,d=rt,C=!0),x=checkProj(x),M?transformer(d,x,M):(E={forward:function(M,E){return transformer(d,x,M,E)},inverse:function(M,E){return transformer(x,d,M,E)}},C&&(E.oProj=x),E)};var ft=6,xt="AJSAJS",Mt="AFAFAF",Ot=65,Nt=73,Lt=79,Ft=86,qt=90;const Gt={forward:mgrs_forward,inverse:function mgrs_inverse(d){var x=UTMtoLL(decode(d.toUpperCase()));if(x.lat&&x.lon)return[x.lon,x.lat,x.lon,x.lat];return[x.left,x.bottom,x.right,x.top]},toPoint:mgrs_toPoint};function mgrs_forward(d,x){return x=x||5,function encode(d,x){var M="00000"+d.easting,E="00000"+d.northing;return d.zoneNumber+d.zoneLetter+function get100kID(d,x,M){var E=get100kSetForZone(M),C=Math.floor(d/1e5),j=Math.floor(x/1e5)%20;return function getLetter100kID(d,x,M){var E=M-1,C=xt.charCodeAt(E),j=Mt.charCodeAt(E),R=C+d-1,D=j+x,B=!1;R>qt&&(R=R-qt+Ot-1,B=!0);(R===Nt||C<Nt&&R>Nt||(R>Nt||C<Nt)&&B)&&R++;(R===Lt||C<Lt&&R>Lt||(R>Lt||C<Lt)&&B)&&++R===Nt&&R++;R>qt&&(R=R-qt+Ot-1);D>Ft?(D=D-Ft+Ot-1,B=!0):B=!1;(D===Nt||j<Nt&&D>Nt||(D>Nt||j<Nt)&&B)&&D++;(D===Lt||j<Lt&&D>Lt||(D>Lt||j<Lt)&&B)&&++D===Nt&&D++;D>Ft&&(D=D-Ft+Ot-1);return String.fromCharCode(R)+String.fromCharCode(D)}(C,j,E)}(d.easting,d.northing,d.zoneNumber)+M.substr(M.length-5,x)+E.substr(E.length-5,x)}(function LLtoUTM(d){var x,M,E,C,j,R,D,B,F=d.lat,q=d.lon,K=6378137,V=.00669438,W=.9996,$=degToRad(F),Q=degToRad(q);B=Math.floor((q+180)/6)+1,180===q&&(B=60);F>=56&&F<64&&q>=3&&q<12&&(B=32);F>=72&&F<84&&(q>=0&&q<9?B=31:q>=9&&q<21?B=33:q>=21&&q<33?B=35:q>=33&&q<42&&(B=37));D=degToRad(6*(B-1)-180+3),x=V/(1-V),M=K/Math.sqrt(1-V*Math.sin($)*Math.sin($)),E=Math.tan($)*Math.tan($),C=x*Math.cos($)*Math.cos($),j=Math.cos($)*(Q-D),R=K*((1-V/4-3*V*V/64-5*V*V*V/256)*$-(3*V/8+3*V*V/32+45*V*V*V/1024)*Math.sin(2*$)+(15*V*V/256+45*V*V*V/1024)*Math.sin(4*$)-35*V*V*V/3072*Math.sin(6*$));var Y=W*M*(j+(1-E+C)*j*j*j/6+(5-18*E+E*E+72*C-58*x)*j*j*j*j*j/120)+5e5,ie=W*(R+M*Math.tan($)*(j*j/2+(5-E+9*C+4*C*C)*j*j*j*j/24+(61-58*E+E*E+600*C-330*x)*j*j*j*j*j*j/720));F<0&&(ie+=1e7);return{northing:Math.round(ie),easting:Math.round(Y),zoneNumber:B,zoneLetter:getLetterDesignator(F)}}({lat:d[1],lon:d[0]}),x)}function mgrs_toPoint(d){var x=UTMtoLL(decode(d.toUpperCase()));return x.lat&&x.lon?[x.lon,x.lat]:[(x.left+x.right)/2,(x.top+x.bottom)/2]}function degToRad(d){return d*(Math.PI/180)}function radToDeg(d){return d/Math.PI*180}function UTMtoLL(d){var x=d.northing,M=d.easting,E=d.zoneLetter,C=d.zoneNumber;if(C<0||C>60)return null;var j,R,D,B,F,q,K,V,W,$=.9996,Q=6378137,Y=.00669438,ie=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),ae=M-5e5,se=x;E<"N"&&(se-=1e7),K=6*(C-1)-180+3,j=.006739496752268451,W=(V=se/$/6367449.145945056)+(3*ie/2-27*ie*ie*ie/32)*Math.sin(2*V)+(21*ie*ie/16-55*ie*ie*ie*ie/32)*Math.sin(4*V)+151*ie*ie*ie/96*Math.sin(6*V),R=Q/Math.sqrt(1-Y*Math.sin(W)*Math.sin(W)),D=Math.tan(W)*Math.tan(W),B=j*Math.cos(W)*Math.cos(W),F=.99330562*Q/Math.pow(1-Y*Math.sin(W)*Math.sin(W),1.5),q=ae/(R*$);var ue=W-R*Math.tan(W)/F*(q*q/2-(5+3*D+10*B-4*B*B-9*j)*q*q*q*q/24+(61+90*D+298*B+45*D*D-1.6983531815716497-3*B*B)*q*q*q*q*q*q/720);ue=radToDeg(ue);var ce,he=(q-(1+2*D+B)*q*q*q/6+(5-2*B+28*D-3*B*B+8*j+24*D*D)*q*q*q*q*q/120)/Math.cos(W);if(he=K+radToDeg(he),d.accuracy){var fe=UTMtoLL({northing:d.northing+d.accuracy,easting:d.easting+d.accuracy,zoneLetter:d.zoneLetter,zoneNumber:d.zoneNumber});ce={top:fe.lat,right:fe.lon,bottom:ue,left:he}}else ce={lat:ue,lon:he};return ce}function getLetterDesignator(d){var x="Z";return 84>=d&&d>=72?x="X":72>d&&d>=64?x="W":64>d&&d>=56?x="V":56>d&&d>=48?x="U":48>d&&d>=40?x="T":40>d&&d>=32?x="S":32>d&&d>=24?x="R":24>d&&d>=16?x="Q":16>d&&d>=8?x="P":8>d&&d>=0?x="N":0>d&&d>=-8?x="M":-8>d&&d>=-16?x="L":-16>d&&d>=-24?x="K":-24>d&&d>=-32?x="J":-32>d&&d>=-40?x="H":-40>d&&d>=-48?x="G":-48>d&&d>=-56?x="F":-56>d&&d>=-64?x="E":-64>d&&d>=-72?x="D":-72>d&&d>=-80&&(x="C"),x}function get100kSetForZone(d){var x=d%ft;return 0===x&&(x=ft),x}function decode(d){if(d&&0===d.length)throw"MGRSPoint coverting from nothing";for(var x,M=d.length,E=null,C="",j=0;!/[A-Z]/.test(x=d.charAt(j));){if(j>=2)throw"MGRSPoint bad conversion from: "+d;C+=x,j++}var R=parseInt(C,10);if(0===j||j+3>M)throw"MGRSPoint bad conversion from: "+d;var D=d.charAt(j++);if(D<="A"||"B"===D||"Y"===D||D>="Z"||"I"===D||"O"===D)throw"MGRSPoint zone letter "+D+" not handled: "+d;E=d.substring(j,j+=2);for(var B=get100kSetForZone(R),F=function getEastingFromChar(d,x){var M=xt.charCodeAt(x-1),E=1e5,C=!1;for(;M!==d.charCodeAt(0);){if(++M===Nt&&M++,M===Lt&&M++,M>qt){if(C)throw"Bad character: "+d;M=Ot,C=!0}E+=1e5}return E}(E.charAt(0),B),q=function getNorthingFromChar(d,x){if(d>"V")throw"MGRSPoint given invalid Northing "+d;var M=Mt.charCodeAt(x-1),E=0,C=!1;for(;M!==d.charCodeAt(0);){if(++M===Nt&&M++,M===Lt&&M++,M>Ft){if(C)throw"Bad character: "+d;M=Ot,C=!0}E+=1e5}return E}(E.charAt(1),B);q<getMinNorthing(D);)q+=2e6;var K=M-j;if(K%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+d;var V,W,$,Q=K/2,Y=0,ie=0;return Q>0&&(V=1e5/Math.pow(10,Q),W=d.substring(j,j+Q),Y=parseFloat(W)*V,$=d.substring(j+Q),ie=parseFloat($)*V),{easting:Y+F,northing:ie+q,zoneLetter:D,zoneNumber:R,accuracy:V}}function getMinNorthing(d){var x;switch(d){case"C":x=11e5;break;case"D":x=2e6;break;case"E":x=28e5;break;case"F":x=37e5;break;case"G":x=46e5;break;case"H":x=55e5;break;case"J":x=64e5;break;case"K":x=73e5;break;case"L":x=82e5;break;case"M":x=91e5;break;case"N":x=0;break;case"P":x=8e5;break;case"Q":x=17e5;break;case"R":x=26e5;break;case"S":x=35e5;break;case"T":x=44e5;break;case"U":x=53e5;break;case"V":x=62e5;break;case"W":x=7e6;break;case"X":x=79e5;break;default:x=-1}if(x>=0)return x;throw"Invalid zone letter: "+d}function Point(d,x,M){if(!(this instanceof Point))return new Point(d,x,M);if(Array.isArray(d))this.x=d[0],this.y=d[1],this.z=d[2]||0;else if("object"==typeof d)this.x=d.x,this.y=d.y,this.z=d.z||0;else if("string"==typeof d&&void 0===x){var E=d.split(",");this.x=parseFloat(E[0],10),this.y=parseFloat(E[1],10),this.z=parseFloat(E[2],10)||0}else this.x=d,this.y=x,this.z=M||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Point.fromMGRS=function(d){return new Point(mgrs_toPoint(d))},Point.prototype.toMGRS=function(d){return mgrs_forward([this.x,this.y],d)};const dn=Point;var Sn=1,An=.25,jn=.046875,Rn=.01953125,Nn=.01068115234375,Un=.75,Wn=.46875,Jn=.013020833333333334,er=.007120768229166667,nr=.3645833333333333,rr=.005696614583333333,ar=.3076171875;function pj_enfn(d){var x=[];x[0]=Sn-d*(An+d*(jn+d*(Rn+d*Nn))),x[1]=d*(Un-d*(jn+d*(Rn+d*Nn)));var M=d*d;return x[2]=M*(Wn-d*(Jn+d*er)),M*=d,x[3]=M*(nr-d*rr),x[4]=M*d*ar,x}function pj_mlfn(d,x,M,E){return M*=x,x*=x,E[0]*d-M*(E[1]+x*(E[2]+x*(E[3]+x*E[4])))}var sr=20;function pj_inv_mlfn(d,x,M){for(var E=1/(1-x),C=d,j=sr;j;--j){var R=Math.sin(C),D=1-x*R*R;if(C-=D=(pj_mlfn(C,R,Math.cos(C),M)-d)*(D*Math.sqrt(D))*E,Math.abs(D)<Q)return C}return C}const cr={init:function tmerc_init(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=pj_enfn(this.es),this.ml0=pj_mlfn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function tmerc_forward(d){var x,M,E,C=d.x,j=d.y,R=adjust_lon(C-this.long0),D=Math.sin(j),B=Math.cos(j);if(this.es){var F=B*R,q=Math.pow(F,2),K=this.ep2*Math.pow(B,2),V=Math.pow(K,2),W=Math.abs(B)>Q?Math.tan(j):0,$=Math.pow(W,2),Y=Math.pow($,2);x=1-this.es*Math.pow(D,2),F/=Math.sqrt(x);var ie=pj_mlfn(j,D,B,this.en);M=this.a*(this.k0*F*(1+q/6*(1-$+K+q/20*(5-18*$+Y+14*K-58*$*K+q/42*(61+179*Y-Y*$-479*$)))))+this.x0,E=this.a*(this.k0*(ie-this.ml0+D*R*F/2*(1+q/12*(5-$+9*K+4*V+q/30*(61+Y-58*$+270*K-330*$*K+q/56*(1385+543*Y-Y*$-3111*$))))))+this.y0}else{var ae=B*Math.sin(R);if(Math.abs(Math.abs(ae)-1)<Q)return 93;if(M=.5*this.a*this.k0*Math.log((1+ae)/(1-ae))+this.x0,E=B*Math.cos(R)/Math.sqrt(1-Math.pow(ae,2)),(ae=Math.abs(E))>=1){if(ae-1>Q)return 93;E=0}else E=Math.acos(E);j<0&&(E=-E),E=this.a*this.k0*(E-this.lat0)+this.y0}return d.x=M,d.y=E,d},inverse:function tmerc_inverse(d){var x,M,E,C,j=(d.x-this.x0)*(1/this.a),R=(d.y-this.y0)*(1/this.a);if(this.es)if(M=pj_inv_mlfn(x=this.ml0+R/this.k0,this.es,this.en),Math.abs(M)<K){var D=Math.sin(M),B=Math.cos(M),F=Math.abs(B)>Q?Math.tan(M):0,q=this.ep2*Math.pow(B,2),V=Math.pow(q,2),W=Math.pow(F,2),$=Math.pow(W,2);x=1-this.es*Math.pow(D,2);var Y=j*Math.sqrt(x)/this.k0,ie=Math.pow(Y,2);E=M-(x*=F)*ie/(1-this.es)*.5*(1-ie/12*(5+3*W-9*q*W+q-4*V-ie/30*(61+90*W-252*q*W+45*$+46*q-ie/56*(1385+3633*W+4095*$+1574*$*W)))),C=adjust_lon(this.long0+Y*(1-ie/6*(1+2*W+q-ie/20*(5+28*W+24*$+8*q*W+6*q-ie/42*(61+662*W+1320*$+720*$*W))))/B)}else E=K*sign(R),C=0;else{var ae=Math.exp(j/this.k0),se=.5*(ae-1/ae),ue=this.lat0+R/this.k0,ce=Math.cos(ue);x=Math.sqrt((1-Math.pow(ce,2))/(1+Math.pow(se,2))),E=Math.asin(x),R<0&&(E=-E),C=0===se&&0===ce?0:adjust_lon(Math.atan2(se,ce)+this.long0)}return d.x=C,d.y=E,d},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function sinh(d){var x=Math.exp(d);return x=(x-1/x)/2}function hypot(d,x){d=Math.abs(d),x=Math.abs(x);var M=Math.max(d,x),E=Math.min(d,x)/(M||1);return M*Math.sqrt(1+Math.pow(E,2))}function asinhy(d){var x=Math.abs(d);return x=function log1py(d){var x=1+d,M=x-1;return 0===M?d:d*Math.log(x)/M}(x*(1+x/(hypot(1,x)+1))),d<0?-x:x}function gatg(d,x){for(var M,E=2*Math.cos(2*x),C=d.length-1,j=d[C],R=0;--C>=0;)M=E*j-R+d[C],R=j,j=M;return x+M*Math.sin(2*x)}function clens_cmplx(d,x,M){for(var E,C,j=Math.sin(x),R=Math.cos(x),D=sinh(M),B=function cosh(d){var x=Math.exp(d);return(x+1/x)/2}(M),F=2*R*B,q=-2*j*D,K=d.length-1,V=d[K],W=0,$=0,Q=0;--K>=0;)E=$,C=W,V=F*($=V)-E-q*(W=Q)+d[K],Q=q*$-C+F*W;return[(F=j*B)*V-(q=R*D)*Q,F*Q+q*V]}const hr={init:function etmerc_init(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(cr.init.apply(this),this.forward=cr.forward,this.inverse=cr.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var d=this.es/(1+Math.sqrt(1-this.es)),x=d/(2-d),M=x;this.cgb[0]=x*(2+x*(-2/3+x*(x*(116/45+x*(26/45+x*(-2854/675)))-2))),this.cbg[0]=x*(x*(2/3+x*(4/3+x*(-82/45+x*(32/45+x*(4642/4725)))))-2),M*=x,this.cgb[1]=M*(7/3+x*(x*(-227/45+x*(2704/315+x*(2323/945)))-1.6)),this.cbg[1]=M*(5/3+x*(-16/15+x*(-13/9+x*(904/315+x*(-1522/945))))),M*=x,this.cgb[2]=M*(56/15+x*(-136/35+x*(-1262/105+x*(73814/2835)))),this.cbg[2]=M*(-26/15+x*(34/21+x*(1.6+x*(-12686/2835)))),M*=x,this.cgb[3]=M*(4279/630+x*(-332/35+x*(-399572/14175))),this.cbg[3]=M*(1237/630+x*(x*(-24832/14175)-2.4)),M*=x,this.cgb[4]=M*(4174/315+x*(-144838/6237)),this.cbg[4]=M*(-734/315+x*(109598/31185)),M*=x,this.cgb[5]=M*(601676/22275),this.cbg[5]=M*(444337/155925),M=Math.pow(x,2),this.Qn=this.k0/(1+x)*(1+M*(1/4+M*(1/64+M/256))),this.utg[0]=x*(x*(2/3+x*(-37/96+x*(1/360+x*(81/512+x*(-96199/604800)))))-.5),this.gtu[0]=x*(.5+x*(-2/3+x*(5/16+x*(41/180+x*(-127/288+x*(7891/37800)))))),this.utg[1]=M*(-1/48+x*(-1/15+x*(437/1440+x*(-46/105+x*(1118711/3870720))))),this.gtu[1]=M*(13/48+x*(x*(557/1440+x*(281/630+x*(-1983433/1935360)))-.6)),M*=x,this.utg[2]=M*(-17/480+x*(37/840+x*(209/4480+x*(-5569/90720)))),this.gtu[2]=M*(61/240+x*(-103/140+x*(15061/26880+x*(167603/181440)))),M*=x,this.utg[3]=M*(-4397/161280+x*(11/504+x*(830251/7257600))),this.gtu[3]=M*(49561/161280+x*(-179/168+x*(6601661/7257600))),M*=x,this.utg[4]=M*(-4583/161280+x*(108847/3991680)),this.gtu[4]=M*(34729/80640+x*(-3418889/1995840)),M*=x,this.utg[5]=M*(-20648693/638668800),this.gtu[5]=.6650675310896665*M;var E=gatg(this.cbg,this.lat0);this.Zb=-this.Qn*(E+function clens(d,x){for(var M,E=2*Math.cos(x),C=d.length-1,j=d[C],R=0;--C>=0;)M=E*j-R+d[C],R=j,j=M;return Math.sin(x)*M}(this.gtu,2*E))},forward:function etmerc_forward(d){var x=adjust_lon(d.x-this.long0),M=d.y;M=gatg(this.cbg,M);var E=Math.sin(M),C=Math.cos(M),j=Math.sin(x),R=Math.cos(x);M=Math.atan2(E,R*C),x=Math.atan2(j*C,hypot(E,C*R)),x=asinhy(Math.tan(x));var D,B,F=clens_cmplx(this.gtu,2*M,2*x);return M+=F[0],x+=F[1],Math.abs(x)<=2.623395162778?(D=this.a*(this.Qn*x)+this.x0,B=this.a*(this.Qn*M+this.Zb)+this.y0):(D=1/0,B=1/0),d.x=D,d.y=B,d},inverse:function etmerc_inverse(d){var x,M,E=(d.x-this.x0)*(1/this.a),C=(d.y-this.y0)*(1/this.a);if(C=(C-this.Zb)/this.Qn,E/=this.Qn,Math.abs(E)<=2.623395162778){var j=clens_cmplx(this.utg,2*C,2*E);C+=j[0],E+=j[1],E=Math.atan(sinh(E));var R=Math.sin(C),D=Math.cos(C),B=Math.sin(E),F=Math.cos(E);C=Math.atan2(R*F,hypot(B,F*D)),x=adjust_lon((E=Math.atan2(B,F*D))+this.long0),M=gatg(this.cgb,C)}else x=1/0,M=1/0;return d.x=x,d.y=M,d},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};const fr={init:function utm_init(){var d=function adjust_zone(d,x){if(void 0===d){if((d=Math.floor(30*(adjust_lon(x)+Math.PI)/Math.PI)+1)<0)return 0;if(d>60)return 60}return d}(this.zone,this.long0);if(void 0===d)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(d)-183)*Y,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,hr.init.apply(this),this.forward=hr.forward,this.inverse=hr.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function srat(d,x){return Math.pow((1-d)/(1+d),x)}const dr={init:function gauss_init(){var d=Math.sin(this.lat0),x=Math.cos(this.lat0);x*=x,this.rc=Math.sqrt(1-this.es)/(1-this.es*d*d),this.C=Math.sqrt(1+this.es*x*x/(1-this.es)),this.phic0=Math.asin(d/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ae)/(Math.pow(Math.tan(.5*this.lat0+ae),this.C)*srat(this.e*d,this.ratexp))},forward:function gauss_forward(d){var x=d.x,M=d.y;return d.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*M+ae),this.C)*srat(this.e*Math.sin(M),this.ratexp))-K,d.x=this.C*x,d},inverse:function gauss_inverse(d){for(var x=d.x/this.C,M=d.y,E=Math.pow(Math.tan(.5*M+ae)/this.K,1/this.C),C=20;C>0&&(M=2*Math.atan(E*srat(this.e*Math.sin(d.y),-.5*this.e))-K,!(Math.abs(M-d.y)<1e-14));--C)d.y=M;return C?(d.x=x,d.y=M,d):null},names:["gauss"]};const pr={init:function sterea_init(){dr.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function sterea_forward(d){var x,M,E,C;return d.x=adjust_lon(d.x-this.long0),dr.forward.apply(this,[d]),x=Math.sin(d.y),M=Math.cos(d.y),E=Math.cos(d.x),C=this.k0*this.R2/(1+this.sinc0*x+this.cosc0*M*E),d.x=C*M*Math.sin(d.x),d.y=C*(this.cosc0*x-this.sinc0*M*E),d.x=this.a*d.x+this.x0,d.y=this.a*d.y+this.y0,d},inverse:function sterea_inverse(d){var x,M,E,C,j;if(d.x=(d.x-this.x0)/this.a,d.y=(d.y-this.y0)/this.a,d.x/=this.k0,d.y/=this.k0,j=hypot(d.x,d.y)){var R=2*Math.atan2(j,this.R2);x=Math.sin(R),M=Math.cos(R),C=Math.asin(M*this.sinc0+d.y*x*this.cosc0/j),E=Math.atan2(d.x*x,j*this.cosc0*M-d.y*this.sinc0*x)}else C=this.phic0,E=0;return d.x=E,d.y=C,dr.inverse.apply(this,[d]),d.x=adjust_lon(d.x+this.long0),d},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};const mr={init:function stere_init(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Q&&(this.k0=.5*(1+sign(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Q&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Q&&Math.abs(Math.cos(this.lat_ts))>Q&&(this.k0=.5*this.cons*msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/tsfnz(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=msfnz(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-K,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function stere_forward(d){var x,M,E,C,j,R,D=d.x,B=d.y,F=Math.sin(B),q=Math.cos(B),V=adjust_lon(D-this.long0);return Math.abs(Math.abs(D-this.long0)-Math.PI)<=Q&&Math.abs(B+this.lat0)<=Q?(d.x=NaN,d.y=NaN,d):this.sphere?(x=2*this.k0/(1+this.sinlat0*F+this.coslat0*q*Math.cos(V)),d.x=this.a*x*q*Math.sin(V)+this.x0,d.y=this.a*x*(this.coslat0*F-this.sinlat0*q*Math.cos(V))+this.y0,d):(M=2*Math.atan(this.ssfn_(B,F,this.e))-K,C=Math.cos(M),E=Math.sin(M),Math.abs(this.coslat0)<=Q?(j=tsfnz(this.e,B*this.con,this.con*F),R=2*this.a*this.k0*j/this.cons,d.x=this.x0+R*Math.sin(D-this.long0),d.y=this.y0-this.con*R*Math.cos(D-this.long0),d):(Math.abs(this.sinlat0)<Q?(x=2*this.a*this.k0/(1+C*Math.cos(V)),d.y=x*E):(x=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*E+this.cosX0*C*Math.cos(V))),d.y=x*(this.cosX0*E-this.sinX0*C*Math.cos(V))+this.y0),d.x=x*C*Math.sin(V)+this.x0,d))},inverse:function stere_inverse(d){var x,M,E,C,j;d.x-=this.x0,d.y-=this.y0;var R=Math.sqrt(d.x*d.x+d.y*d.y);if(this.sphere){var D=2*Math.atan(R/(2*this.a*this.k0));return x=this.long0,M=this.lat0,R<=Q?(d.x=x,d.y=M,d):(M=Math.asin(Math.cos(D)*this.sinlat0+d.y*Math.sin(D)*this.coslat0/R),x=Math.abs(this.coslat0)<Q?this.lat0>0?adjust_lon(this.long0+Math.atan2(d.x,-1*d.y)):adjust_lon(this.long0+Math.atan2(d.x,d.y)):adjust_lon(this.long0+Math.atan2(d.x*Math.sin(D),R*this.coslat0*Math.cos(D)-d.y*this.sinlat0*Math.sin(D))),d.x=x,d.y=M,d)}if(Math.abs(this.coslat0)<=Q){if(R<=Q)return M=this.lat0,x=this.long0,d.x=x,d.y=M,d;d.x*=this.con,d.y*=this.con,E=R*this.cons/(2*this.a*this.k0),M=this.con*phi2z(this.e,E),x=this.con*adjust_lon(this.con*this.long0+Math.atan2(d.x,-1*d.y))}else C=2*Math.atan(R*this.cosX0/(2*this.a*this.k0*this.ms1)),x=this.long0,R<=Q?j=this.X0:(j=Math.asin(Math.cos(C)*this.sinX0+d.y*Math.sin(C)*this.cosX0/R),x=adjust_lon(this.long0+Math.atan2(d.x*Math.sin(C),R*this.cosX0*Math.cos(C)-d.y*this.sinX0*Math.sin(C)))),M=-1*phi2z(this.e,Math.tan(.5*(K+j)));return d.x=x,d.y=M,d},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function ssfn_(d,x,M){return x*=M,Math.tan(.5*(K+d))*Math.pow((1-x)/(1+x),.5*M)}};const vr={init:function somerc_init(){var d=this.lat0;this.lambda0=this.long0;var x=Math.sin(d),M=this.a,E=1/this.rf,C=2*E-Math.pow(E,2),j=this.e=Math.sqrt(C);this.R=this.k0*M*Math.sqrt(1-C)/(1-C*Math.pow(x,2)),this.alpha=Math.sqrt(1+C/(1-C)*Math.pow(Math.cos(d),4)),this.b0=Math.asin(x/this.alpha);var R=Math.log(Math.tan(Math.PI/4+this.b0/2)),D=Math.log(Math.tan(Math.PI/4+d/2)),B=Math.log((1+j*x)/(1-j*x));this.K=R-this.alpha*D+this.alpha*j/2*B},forward:function somerc_forward(d){var x=Math.log(Math.tan(Math.PI/4-d.y/2)),M=this.e/2*Math.log((1+this.e*Math.sin(d.y))/(1-this.e*Math.sin(d.y))),E=-this.alpha*(x+M)+this.K,C=2*(Math.atan(Math.exp(E))-Math.PI/4),j=this.alpha*(d.x-this.lambda0),R=Math.atan(Math.sin(j)/(Math.sin(this.b0)*Math.tan(C)+Math.cos(this.b0)*Math.cos(j))),D=Math.asin(Math.cos(this.b0)*Math.sin(C)-Math.sin(this.b0)*Math.cos(C)*Math.cos(j));return d.y=this.R/2*Math.log((1+Math.sin(D))/(1-Math.sin(D)))+this.y0,d.x=this.R*R+this.x0,d},inverse:function somerc_inverse(d){for(var x=d.x-this.x0,M=d.y-this.y0,E=x/this.R,C=2*(Math.atan(Math.exp(M/this.R))-Math.PI/4),j=Math.asin(Math.cos(this.b0)*Math.sin(C)+Math.sin(this.b0)*Math.cos(C)*Math.cos(E)),R=Math.atan(Math.sin(E)/(Math.cos(this.b0)*Math.cos(E)-Math.sin(this.b0)*Math.tan(C))),D=this.lambda0+R/this.alpha,B=0,F=j,q=-1e3,K=0;Math.abs(F-q)>1e-7;){if(++K>20)return;B=1/this.alpha*(Math.log(Math.tan(Math.PI/4+j/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(F))/2)),q=F,F=2*Math.atan(Math.exp(B))-Math.PI/2}return d.x=D,d.y=F,d},names:["somerc"]};var gr=1e-7;const yr={init:function omerc_init(){var d,x,M,E,C,j,R,D,B,F,q,V=0,W=0,$=0,ie=0,ue=0,ce=0,he=0;this.no_off=function isTypeA(d){var x="object"==typeof d.PROJECTION?Object.keys(d.PROJECTION)[0]:d.PROJECTION;return"no_uoff"in d||"no_off"in d||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(x)}(this),this.no_rot="no_rot"in this;var fe=!1;"alpha"in this&&(fe=!0);var de=!1;if("rectified_grid_angle"in this&&(de=!0),fe&&(he=this.alpha),de&&(V=this.rectified_grid_angle*Y),fe||de)W=this.longc;else if($=this.long1,ue=this.lat1,ie=this.long2,ce=this.lat2,Math.abs(ue-ce)<=gr||(d=Math.abs(ue))<=gr||Math.abs(d-K)<=gr||Math.abs(Math.abs(this.lat0)-K)<=gr||Math.abs(Math.abs(ce)-K)<=gr)throw new Error;var pe=1-this.es;x=Math.sqrt(pe),Math.abs(this.lat0)>Q?(D=Math.sin(this.lat0),M=Math.cos(this.lat0),d=1-this.es*D*D,this.B=M*M,this.B=Math.sqrt(1+this.es*this.B*this.B/pe),this.A=this.B*this.k0*x/d,(C=(E=this.B*x/(M*Math.sqrt(d)))*E-1)<=0?C=0:(C=Math.sqrt(C),this.lat0<0&&(C=-C)),this.E=C+=E,this.E*=Math.pow(tsfnz(this.e,this.lat0,D),this.B)):(this.B=1/x,this.A=this.k0,this.E=E=C=1),fe||de?(fe?(q=Math.asin(Math.sin(he)/E),de||(V=he)):(q=V,he=Math.asin(E*Math.sin(q))),this.lam0=W-Math.asin(.5*(C-1/C)*Math.tan(q))/this.B):(j=Math.pow(tsfnz(this.e,ue,Math.sin(ue)),this.B),R=Math.pow(tsfnz(this.e,ce,Math.sin(ce)),this.B),C=this.E/j,B=(R-j)/(R+j),F=((F=this.E*this.E)-R*j)/(F+R*j),(d=$-ie)<-Math.pi?ie-=se:d>Math.pi&&(ie+=se),this.lam0=adjust_lon(.5*($+ie)-Math.atan(F*Math.tan(.5*this.B*($-ie))/B)/this.B),q=Math.atan(2*Math.sin(this.B*adjust_lon($-this.lam0))/(C-1/C)),V=he=Math.asin(E*Math.sin(q))),this.singam=Math.sin(q),this.cosgam=Math.cos(q),this.sinrot=Math.sin(V),this.cosrot=Math.cos(V),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(E*E-1)/Math.cos(he))),this.lat0<0&&(this.u_0=-this.u_0)),C=.5*q,this.v_pole_n=this.ArB*Math.log(Math.tan(ae-C)),this.v_pole_s=this.ArB*Math.log(Math.tan(ae+C))},forward:function omerc_forward(d){var x,M,E,C,j,R,D,B,F={};if(d.x=d.x-this.lam0,Math.abs(Math.abs(d.y)-K)>Q){if(x=.5*((j=this.E/Math.pow(tsfnz(this.e,d.y,Math.sin(d.y)),this.B))-(R=1/j)),M=.5*(j+R),C=Math.sin(this.B*d.x),E=(x*this.singam-C*this.cosgam)/M,Math.abs(Math.abs(E)-1)<Q)throw new Error;B=.5*this.ArB*Math.log((1-E)/(1+E)),R=Math.cos(this.B*d.x),D=Math.abs(R)<gr?this.A*d.x:this.ArB*Math.atan2(x*this.cosgam+C*this.singam,R)}else B=d.y>0?this.v_pole_n:this.v_pole_s,D=this.ArB*d.y;return this.no_rot?(F.x=D,F.y=B):(D-=this.u_0,F.x=B*this.cosrot+D*this.sinrot,F.y=D*this.cosrot-B*this.sinrot),F.x=this.a*F.x+this.x0,F.y=this.a*F.y+this.y0,F},inverse:function omerc_inverse(d){var x,M,E,C,j,R,D,B={};if(d.x=(d.x-this.x0)*(1/this.a),d.y=(d.y-this.y0)*(1/this.a),this.no_rot?(M=d.y,x=d.x):(M=d.x*this.cosrot-d.y*this.sinrot,x=d.y*this.cosrot+d.x*this.sinrot+this.u_0),C=.5*((E=Math.exp(-this.BrA*M))-1/E),j=.5*(E+1/E),D=((R=Math.sin(this.BrA*x))*this.cosgam+C*this.singam)/j,Math.abs(Math.abs(D)-1)<Q)B.x=0,B.y=D<0?-K:K;else{if(B.y=this.E/Math.sqrt((1+D)/(1-D)),B.y=phi2z(this.e,Math.pow(B.y,1/this.B)),B.y===1/0)throw new Error;B.x=-this.rB*Math.atan2(C*this.cosgam-R*this.singam,Math.cos(this.BrA*x))}return B.x+=this.lam0,B},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};const br={init:function lcc_init(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Q)){var d=this.b/this.a;this.e=Math.sqrt(1-d*d);var x=Math.sin(this.lat1),M=Math.cos(this.lat1),E=msfnz(this.e,x,M),C=tsfnz(this.e,this.lat1,x),j=Math.sin(this.lat2),R=Math.cos(this.lat2),D=msfnz(this.e,j,R),B=tsfnz(this.e,this.lat2,j),F=tsfnz(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Q?this.ns=Math.log(E/D)/Math.log(C/B):this.ns=x,isNaN(this.ns)&&(this.ns=x),this.f0=E/(this.ns*Math.pow(C,this.ns)),this.rh=this.a*this.f0*Math.pow(F,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function lcc_forward(d){var x=d.x,M=d.y;Math.abs(2*Math.abs(M)-Math.PI)<=Q&&(M=sign(M)*(K-2*Q));var E,C,j=Math.abs(Math.abs(M)-K);if(j>Q)E=tsfnz(this.e,M,Math.sin(M)),C=this.a*this.f0*Math.pow(E,this.ns);else{if((j=M*this.ns)<=0)return null;C=0}var R=this.ns*adjust_lon(x-this.long0);return d.x=this.k0*(C*Math.sin(R))+this.x0,d.y=this.k0*(this.rh-C*Math.cos(R))+this.y0,d},inverse:function lcc_inverse(d){var x,M,E,C,j,R=(d.x-this.x0)/this.k0,D=this.rh-(d.y-this.y0)/this.k0;this.ns>0?(x=Math.sqrt(R*R+D*D),M=1):(x=-Math.sqrt(R*R+D*D),M=-1);var B=0;if(0!==x&&(B=Math.atan2(M*R,M*D)),0!==x||this.ns>0){if(M=1/this.ns,E=Math.pow(x/(this.a*this.f0),M),-9999===(C=phi2z(this.e,E)))return null}else C=-K;return j=adjust_lon(B/this.ns+this.long0),d.x=j,d.y=C,d},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};const _r={init:function krovak_init(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function krovak_forward(d){var x,M,E,C,j,R,D,B=d.x,F=d.y,q=adjust_lon(B-this.long0);return x=Math.pow((1+this.e*Math.sin(F))/(1-this.e*Math.sin(F)),this.alfa*this.e/2),M=2*(Math.atan(this.k*Math.pow(Math.tan(F/2+this.s45),this.alfa)/x)-this.s45),E=-q*this.alfa,C=Math.asin(Math.cos(this.ad)*Math.sin(M)+Math.sin(this.ad)*Math.cos(M)*Math.cos(E)),j=Math.asin(Math.cos(M)*Math.sin(E)/Math.cos(C)),R=this.n*j,D=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(C/2+this.s45),this.n),d.y=D*Math.cos(R)/1,d.x=D*Math.sin(R)/1,this.czech||(d.y*=-1,d.x*=-1),d},inverse:function krovak_inverse(d){var x,M,E,C,j,R,D,B=d.x;d.x=d.y,d.y=B,this.czech||(d.y*=-1,d.x*=-1),j=Math.sqrt(d.x*d.x+d.y*d.y),C=Math.atan2(d.y,d.x)/Math.sin(this.s0),E=2*(Math.atan(Math.pow(this.ro0/j,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),x=Math.asin(Math.cos(this.ad)*Math.sin(E)-Math.sin(this.ad)*Math.cos(E)*Math.cos(C)),M=Math.asin(Math.cos(E)*Math.sin(C)/Math.cos(x)),d.x=this.long0-M/this.alfa,R=x,D=0;var F=0;do{d.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(x/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(R))/(1-this.e*Math.sin(R)),this.e/2))-this.s45),Math.abs(R-d.y)<1e-10&&(D=1),R=d.y,F+=1}while(0===D&&F<15);return F>=15?null:d},names:["Krovak","krovak"]};function mlfn(d,x,M,E,C){return d*C-x*Math.sin(2*C)+M*Math.sin(4*C)-E*Math.sin(6*C)}function e0fn(d){return 1-.25*d*(1+d/16*(3+1.25*d))}function e1fn(d){return.375*d*(1+.25*d*(1+.46875*d))}function e2fn(d){return.05859375*d*d*(1+.75*d)}function e3fn(d){return d*d*d*(35/3072)}function gN(d,x,M){var E=x*M;return d/Math.sqrt(1-E*E)}function adjust_lat(d){return Math.abs(d)<K?d:d-sign(d)*Math.PI}function imlfn(d,x,M,E,C){var j,R;j=d/x;for(var D=0;D<15;D++)if(j+=R=(d-(x*j-M*Math.sin(2*j)+E*Math.sin(4*j)-C*Math.sin(6*j)))/(x-2*M*Math.cos(2*j)+4*E*Math.cos(4*j)-6*C*Math.cos(6*j)),Math.abs(R)<=1e-10)return j;return NaN}const xr={init:function cass_init(){this.sphere||(this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function cass_forward(d){var x,M,E=d.x,C=d.y;if(E=adjust_lon(E-this.long0),this.sphere)x=this.a*Math.asin(Math.cos(C)*Math.sin(E)),M=this.a*(Math.atan2(Math.tan(C),Math.cos(E))-this.lat0);else{var j=Math.sin(C),R=Math.cos(C),D=gN(this.a,this.e,j),B=Math.tan(C)*Math.tan(C),F=E*Math.cos(C),q=F*F,K=this.es*R*R/(1-this.es);x=D*F*(1-q*B*(1/6-(8-B+8*K)*q/120)),M=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,C)-this.ml0+D*j/R*q*(.5+(5-B+6*K)*q/24)}return d.x=x+this.x0,d.y=M+this.y0,d},inverse:function cass_inverse(d){d.x-=this.x0,d.y-=this.y0;var x,M,E=d.x/this.a,C=d.y/this.a;if(this.sphere){var j=C+this.lat0;x=Math.asin(Math.sin(j)*Math.cos(E)),M=Math.atan2(Math.tan(E),Math.cos(j))}else{var R=imlfn(this.ml0/this.a+C,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(R)-K)<=Q)return d.x=this.long0,d.y=K,C<0&&(d.y*=-1),d;var D=gN(this.a,this.e,Math.sin(R)),B=D*D*D/this.a/this.a*(1-this.es),F=Math.pow(Math.tan(R),2),q=E*this.a/D,V=q*q;x=R-D*Math.tan(R)/B*q*q*(.5-(1+3*F)*q*q/24),M=q*(1-V*(F/3+(1+3*F)*F*V/15))/Math.cos(R)}return d.x=adjust_lon(M+this.long0),d.y=adjust_lat(x),d},names:["Cassini","Cassini_Soldner","cass"]};function qsfnz(d,x){var M;return d>1e-7?(1-d*d)*(x/(1-(M=d*x)*M)-.5/d*Math.log((1-M)/(1+M))):2*x}var wr=.3333333333333333,kr=.17222222222222222,Mr=.10257936507936508,Sr=.06388888888888888,Er=.0664021164021164,Cr=.016415012942191543;const Pr={init:function laea_init(){var d,x=Math.abs(this.lat0);if(Math.abs(x-K)<Q?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(x)<Q?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=qsfnz(this.e,1),this.mmf=.5/(1-this.es),this.apa=function authset(d){var x,M=[];return M[0]=d*wr,x=d*d,M[0]+=x*kr,M[1]=x*Sr,x*=d,M[0]+=x*Mr,M[1]+=x*Er,M[2]=x*Cr,M}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),d=Math.sin(this.lat0),this.sinb1=qsfnz(this.e,d)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*d*d)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function laea_forward(d){var x,M,E,C,j,R,D,B,F,q,V=d.x,W=d.y;if(V=adjust_lon(V-this.long0),this.sphere){if(j=Math.sin(W),q=Math.cos(W),E=Math.cos(V),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((M=this.mode===this.EQUIT?1+q*E:1+this.sinph0*j+this.cosph0*q*E)<=Q)return null;x=(M=Math.sqrt(2/M))*q*Math.sin(V),M*=this.mode===this.EQUIT?j:this.cosph0*j-this.sinph0*q*E}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(E=-E),Math.abs(W+this.lat0)<Q)return null;M=ae-.5*W,x=(M=2*(this.mode===this.S_POLE?Math.cos(M):Math.sin(M)))*Math.sin(V),M*=E}}else{switch(D=0,B=0,F=0,E=Math.cos(V),C=Math.sin(V),j=Math.sin(W),R=qsfnz(this.e,j),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(D=R/this.qp,B=Math.sqrt(1-D*D)),this.mode){case this.OBLIQ:F=1+this.sinb1*D+this.cosb1*B*E;break;case this.EQUIT:F=1+B*E;break;case this.N_POLE:F=K+W,R=this.qp-R;break;case this.S_POLE:F=W-K,R=this.qp+R}if(Math.abs(F)<Q)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:F=Math.sqrt(2/F),M=this.mode===this.OBLIQ?this.ymf*F*(this.cosb1*D-this.sinb1*B*E):(F=Math.sqrt(2/(1+B*E)))*D*this.ymf,x=this.xmf*F*B*C;break;case this.N_POLE:case this.S_POLE:R>=0?(x=(F=Math.sqrt(R))*C,M=E*(this.mode===this.S_POLE?F:-F)):x=M=0}}return d.x=this.a*x+this.x0,d.y=this.a*M+this.y0,d},inverse:function laea_inverse(d){d.x-=this.x0,d.y-=this.y0;var x,M,E,C,j,R,D,B=d.x/this.a,F=d.y/this.a;if(this.sphere){var q,V=0,W=0;if((M=.5*(q=Math.sqrt(B*B+F*F)))>1)return null;switch(M=2*Math.asin(M),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(W=Math.sin(M),V=Math.cos(M)),this.mode){case this.EQUIT:M=Math.abs(q)<=Q?0:Math.asin(F*W/q),B*=W,F=V*q;break;case this.OBLIQ:M=Math.abs(q)<=Q?this.lat0:Math.asin(V*this.sinph0+F*W*this.cosph0/q),B*=W*this.cosph0,F=(V-Math.sin(M)*this.sinph0)*q;break;case this.N_POLE:F=-F,M=K-M;break;case this.S_POLE:M-=K}x=0!==F||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(B,F):0}else{if(D=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(B/=this.dd,F*=this.dd,(R=Math.sqrt(B*B+F*F))<Q)return d.x=this.long0,d.y=this.lat0,d;C=2*Math.asin(.5*R/this.rq),E=Math.cos(C),B*=C=Math.sin(C),this.mode===this.OBLIQ?(D=E*this.sinb1+F*C*this.cosb1/R,j=this.qp*D,F=R*this.cosb1*E-F*this.sinb1*C):(D=F*C/R,j=this.qp*D,F=R*E)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(F=-F),!(j=B*B+F*F))return d.x=this.long0,d.y=this.lat0,d;D=1-j/this.qp,this.mode===this.S_POLE&&(D=-D)}x=Math.atan2(B,F),M=function authlat(d,x){var M=d+d;return d+x[0]*Math.sin(M)+x[1]*Math.sin(M+M)+x[2]*Math.sin(M+M+M)}(Math.asin(D),this.apa)}return d.x=adjust_lon(this.long0+x),d.y=M,d},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function asinz(d){return Math.abs(d)>1&&(d=d>1?1:-1),Math.asin(d)}const Or={init:function aea_init(){Math.abs(this.lat1+this.lat2)<Q||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=msfnz(this.e3,this.sin_po,this.cos_po),this.qs1=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=msfnz(this.e3,this.sin_po,this.cos_po),this.qs2=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qsfnz(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Q?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function aea_forward(d){var x=d.x,M=d.y;this.sin_phi=Math.sin(M),this.cos_phi=Math.cos(M);var E=qsfnz(this.e3,this.sin_phi),C=this.a*Math.sqrt(this.c-this.ns0*E)/this.ns0,j=this.ns0*adjust_lon(x-this.long0),R=C*Math.sin(j)+this.x0,D=this.rh-C*Math.cos(j)+this.y0;return d.x=R,d.y=D,d},inverse:function aea_inverse(d){var x,M,E,C,j,R;return d.x-=this.x0,d.y=this.rh-d.y+this.y0,this.ns0>=0?(x=Math.sqrt(d.x*d.x+d.y*d.y),E=1):(x=-Math.sqrt(d.x*d.x+d.y*d.y),E=-1),C=0,0!==x&&(C=Math.atan2(E*d.x,E*d.y)),E=x*this.ns0/this.a,this.sphere?R=Math.asin((this.c-E*E)/(2*this.ns0)):(M=(this.c-E*E)/this.ns0,R=this.phi1z(this.e3,M)),j=adjust_lon(C/this.ns0+this.long0),d.x=j,d.y=R,d},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function phi1z(d,x){var M,E,C,j,R=asinz(.5*x);if(d<Q)return R;for(var D=d*d,B=1;B<=25;B++)if(R+=j=.5*(C=1-(E=d*(M=Math.sin(R)))*E)*C/Math.cos(R)*(x/(1-D)-M/C+.5/d*Math.log((1-E)/(1+E))),Math.abs(j)<=1e-7)return R;return null}};const Ir={init:function gnom_init(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function gnom_forward(d){var x,M,E,C,j,R,D,B=d.x,F=d.y;return E=adjust_lon(B-this.long0),x=Math.sin(F),M=Math.cos(F),C=Math.cos(E),1,(j=this.sin_p14*x+this.cos_p14*M*C)>0||Math.abs(j)<=Q?(R=this.x0+1*this.a*M*Math.sin(E)/j,D=this.y0+1*this.a*(this.cos_p14*x-this.sin_p14*M*C)/j):(R=this.x0+this.infinity_dist*M*Math.sin(E),D=this.y0+this.infinity_dist*(this.cos_p14*x-this.sin_p14*M*C)),d.x=R,d.y=D,d},inverse:function gnom_inverse(d){var x,M,E,C,j,R;return d.x=(d.x-this.x0)/this.a,d.y=(d.y-this.y0)/this.a,d.x/=this.k0,d.y/=this.k0,(x=Math.sqrt(d.x*d.x+d.y*d.y))?(C=Math.atan2(x,this.rc),M=Math.sin(C),R=asinz((E=Math.cos(C))*this.sin_p14+d.y*M*this.cos_p14/x),j=Math.atan2(d.x*M,x*this.cos_p14*E-d.y*this.sin_p14*M),j=adjust_lon(this.long0+j)):(R=this.phic0,j=0),d.x=j,d.y=R,d},names:["gnom"]};const Ar={init:function cea_init(){this.sphere||(this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function cea_forward(d){var x,M,E=d.x,C=d.y,j=adjust_lon(E-this.long0);if(this.sphere)x=this.x0+this.a*j*Math.cos(this.lat_ts),M=this.y0+this.a*Math.sin(C)/Math.cos(this.lat_ts);else{var R=qsfnz(this.e,Math.sin(C));x=this.x0+this.a*this.k0*j,M=this.y0+this.a*R*.5/this.k0}return d.x=x,d.y=M,d},inverse:function cea_inverse(d){var x,M;return d.x-=this.x0,d.y-=this.y0,this.sphere?(x=adjust_lon(this.long0+d.x/this.a/Math.cos(this.lat_ts)),M=Math.asin(d.y/this.a*Math.cos(this.lat_ts))):(M=function iqsfnz(d,x){var M=1-(1-d*d)/(2*d)*Math.log((1-d)/(1+d));if(Math.abs(Math.abs(x)-M)<1e-6)return x<0?-1*K:K;for(var E,C,j,R,D=Math.asin(.5*x),B=0;B<30;B++)if(C=Math.sin(D),j=Math.cos(D),R=d*C,D+=E=Math.pow(1-R*R,2)/(2*j)*(x/(1-d*d)-C/(1-R*R)+.5/d*Math.log((1-R)/(1+R))),Math.abs(E)<=1e-10)return D;return NaN}(this.e,2*d.y*this.k0/this.a),x=adjust_lon(this.long0+d.x/(this.a*this.k0))),d.x=x,d.y=M,d},names:["cea"]};const Tr={init:function eqc_init(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function eqc_forward(d){var x=d.x,M=d.y,E=adjust_lon(x-this.long0),C=adjust_lat(M-this.lat0);return d.x=this.x0+this.a*E*this.rc,d.y=this.y0+this.a*C,d},inverse:function eqc_inverse(d){var x=d.x,M=d.y;return d.x=adjust_lon(this.long0+(x-this.x0)/(this.a*this.rc)),d.y=adjust_lat(this.lat0+(M-this.y0)/this.a),d},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};const jr={init:function poly_init(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function poly_forward(d){var x,M,E,C=d.x,j=d.y,R=adjust_lon(C-this.long0);if(E=R*Math.sin(j),this.sphere)Math.abs(j)<=Q?(x=this.a*R,M=-1*this.a*this.lat0):(x=this.a*Math.sin(E)/Math.tan(j),M=this.a*(adjust_lat(j-this.lat0)+(1-Math.cos(E))/Math.tan(j)));else if(Math.abs(j)<=Q)x=this.a*R,M=-1*this.ml0;else{var D=gN(this.a,this.e,Math.sin(j))/Math.tan(j);x=D*Math.sin(E),M=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,j)-this.ml0+D*(1-Math.cos(E))}return d.x=x+this.x0,d.y=M+this.y0,d},inverse:function poly_inverse(d){var x,M,E,C,j,R,D,B,F;if(E=d.x-this.x0,C=d.y-this.y0,this.sphere)if(Math.abs(C+this.a*this.lat0)<=Q)x=adjust_lon(E/this.a+this.long0),M=0;else{var q;for(R=this.lat0+C/this.a,D=E*E/this.a/this.a+R*R,B=R,j=20;j;--j)if(B+=F=-1*(R*(B*(q=Math.tan(B))+1)-B-.5*(B*B+D)*q)/((B-R)/q-1),Math.abs(F)<=Q){M=B;break}x=adjust_lon(this.long0+Math.asin(E*Math.tan(B)/this.a)/Math.sin(M))}else if(Math.abs(C+this.ml0)<=Q)M=0,x=adjust_lon(this.long0+E/this.a);else{var K,V,W,$,Y;for(R=(this.ml0+C)/this.a,D=E*E/this.a/this.a+R*R,B=R,j=20;j;--j)if(Y=this.e*Math.sin(B),K=Math.sqrt(1-Y*Y)*Math.tan(B),V=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,B),W=this.e0-2*this.e1*Math.cos(2*B)+4*this.e2*Math.cos(4*B)-6*this.e3*Math.cos(6*B),B-=F=(R*(K*($=V/this.a)+1)-$-.5*K*($*$+D))/(this.es*Math.sin(2*B)*($*$+D-2*R*$)/(4*K)+(R-$)*(K*W-2/Math.sin(2*B))-W),Math.abs(F)<=Q){M=B;break}K=Math.sqrt(1-this.es*Math.pow(Math.sin(M),2))*Math.tan(M),x=adjust_lon(this.long0+Math.asin(E*K/this.a)/Math.sin(M))}return d.x=x,d.y=M,d},names:["Polyconic","poly"]};const Rr={init:function nzmg_init(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function nzmg_forward(d){var x,M=d.x,E=d.y-this.lat0,C=M-this.long0,j=E/q*1e-5,R=C,D=1,B=0;for(x=1;x<=10;x++)D*=j,B+=this.A[x]*D;var F,K=B,V=R,W=1,$=0,Q=0,Y=0;for(x=1;x<=6;x++)F=$*K+W*V,W=W*K-$*V,$=F,Q=Q+this.B_re[x]*W-this.B_im[x]*$,Y=Y+this.B_im[x]*W+this.B_re[x]*$;return d.x=Y*this.a+this.x0,d.y=Q*this.a+this.y0,d},inverse:function nzmg_inverse(d){var x,M,E=d.x,C=d.y,j=E-this.x0,R=(C-this.y0)/this.a,D=j/this.a,B=1,F=0,K=0,V=0;for(x=1;x<=6;x++)M=F*R+B*D,B=B*R-F*D,F=M,K=K+this.C_re[x]*B-this.C_im[x]*F,V=V+this.C_im[x]*B+this.C_re[x]*F;for(var W=0;W<this.iterations;W++){var $,Q=K,Y=V,ie=R,ae=D;for(x=2;x<=6;x++)$=Y*K+Q*V,Q=Q*K-Y*V,Y=$,ie+=(x-1)*(this.B_re[x]*Q-this.B_im[x]*Y),ae+=(x-1)*(this.B_im[x]*Q+this.B_re[x]*Y);Q=1,Y=0;var se=this.B_re[1],ue=this.B_im[1];for(x=2;x<=6;x++)$=Y*K+Q*V,Q=Q*K-Y*V,Y=$,se+=x*(this.B_re[x]*Q-this.B_im[x]*Y),ue+=x*(this.B_im[x]*Q+this.B_re[x]*Y);var ce=se*se+ue*ue;K=(ie*se+ae*ue)/ce,V=(ae*se-ie*ue)/ce}var he=K,fe=V,de=1,pe=0;for(x=1;x<=9;x++)de*=he,pe+=this.D[x]*de;var me=this.lat0+pe*q*1e5,ve=this.long0+fe;return d.x=ve,d.y=me,d},names:["New_Zealand_Map_Grid","nzmg"]};const Dr={init:function mill_init(){},forward:function mill_forward(d){var x=d.x,M=d.y,E=adjust_lon(x-this.long0),C=this.x0+this.a*E,j=this.y0+this.a*Math.log(Math.tan(Math.PI/4+M/2.5))*1.25;return d.x=C,d.y=j,d},inverse:function mill_inverse(d){d.x-=this.x0,d.y-=this.y0;var x=adjust_lon(this.long0+d.x/this.a),M=2.5*(Math.atan(Math.exp(.8*d.y/this.a))-Math.PI/4);return d.x=x,d.y=M,d},names:["Miller_Cylindrical","mill"]};const Nr={init:function sinu_init(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=pj_enfn(this.es)},forward:function sinu_forward(d){var x,M,E=d.x,C=d.y;if(E=adjust_lon(E-this.long0),this.sphere){if(this.m)for(var j=this.n*Math.sin(C),R=20;R;--R){var D=(this.m*C+Math.sin(C)-j)/(this.m+Math.cos(C));if(C-=D,Math.abs(D)<Q)break}else C=1!==this.n?Math.asin(this.n*Math.sin(C)):C;x=this.a*this.C_x*E*(this.m+Math.cos(C)),M=this.a*this.C_y*C}else{var B=Math.sin(C),F=Math.cos(C);M=this.a*pj_mlfn(C,B,F,this.en),x=this.a*E*F/Math.sqrt(1-this.es*B*B)}return d.x=x,d.y=M,d},inverse:function sinu_inverse(d){var x,M,E;return d.x-=this.x0,M=d.x/this.a,d.y-=this.y0,x=d.y/this.a,this.sphere?(x/=this.C_y,M/=this.C_x*(this.m+Math.cos(x)),this.m?x=asinz((this.m*x+Math.sin(x))/this.n):1!==this.n&&(x=asinz(Math.sin(x)/this.n)),M=adjust_lon(M+this.long0),x=adjust_lat(x)):(x=pj_inv_mlfn(d.y/this.a,this.es,this.en),(E=Math.abs(x))<K?(E=Math.sin(x),M=adjust_lon(this.long0+d.x*Math.sqrt(1-this.es*E*E)/(this.a*Math.cos(x)))):E-Q<K&&(M=this.long0)),d.x=M,d.y=x,d},names:["Sinusoidal","sinu"]};const Lr={init:function moll_init(){},forward:function moll_forward(d){for(var x=d.x,M=d.y,E=adjust_lon(x-this.long0),C=M,j=Math.PI*Math.sin(M);;){var R=-(C+Math.sin(C)-j)/(1+Math.cos(C));if(C+=R,Math.abs(R)<Q)break}C/=2,Math.PI/2-Math.abs(M)<Q&&(E=0);var D=.900316316158*this.a*E*Math.cos(C)+this.x0,B=1.4142135623731*this.a*Math.sin(C)+this.y0;return d.x=D,d.y=B,d},inverse:function moll_inverse(d){var x,M;d.x-=this.x0,d.y-=this.y0,M=d.y/(1.4142135623731*this.a),Math.abs(M)>.999999999999&&(M=.999999999999),x=Math.asin(M);var E=adjust_lon(this.long0+d.x/(.900316316158*this.a*Math.cos(x)));E<-Math.PI&&(E=-Math.PI),E>Math.PI&&(E=Math.PI),M=(2*x+Math.sin(2*x))/Math.PI,Math.abs(M)>1&&(M=1);var C=Math.asin(M);return d.x=E,d.y=C,d},names:["Mollweide","moll"]};const zr={init:function eqdc_init(){Math.abs(this.lat1+this.lat2)<Q||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=msfnz(this.e,this.sinphi,this.cosphi),this.ml1=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Q?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=msfnz(this.e,this.sinphi,this.cosphi),this.ml2=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function eqdc_forward(d){var x,M=d.x,E=d.y;if(this.sphere)x=this.a*(this.g-E);else{var C=mlfn(this.e0,this.e1,this.e2,this.e3,E);x=this.a*(this.g-C)}var j=this.ns*adjust_lon(M-this.long0),R=this.x0+x*Math.sin(j),D=this.y0+this.rh-x*Math.cos(j);return d.x=R,d.y=D,d},inverse:function eqdc_inverse(d){var x,M,E,C;d.x-=this.x0,d.y=this.rh-d.y+this.y0,this.ns>=0?(M=Math.sqrt(d.x*d.x+d.y*d.y),x=1):(M=-Math.sqrt(d.x*d.x+d.y*d.y),x=-1);var j=0;return 0!==M&&(j=Math.atan2(x*d.x,x*d.y)),this.sphere?(C=adjust_lon(this.long0+j/this.ns),E=adjust_lat(this.g-M/this.a),d.x=C,d.y=E,d):(E=imlfn(this.g-M/this.a,this.e0,this.e1,this.e2,this.e3),C=adjust_lon(this.long0+j/this.ns),d.x=C,d.y=E,d)},names:["Equidistant_Conic","eqdc"]};const Br={init:function vandg_init(){this.R=this.a},forward:function vandg_forward(d){var x,M,E=d.x,C=d.y,j=adjust_lon(E-this.long0);Math.abs(C)<=Q&&(x=this.x0+this.R*j,M=this.y0);var R=asinz(2*Math.abs(C/Math.PI));(Math.abs(j)<=Q||Math.abs(Math.abs(C)-K)<=Q)&&(x=this.x0,M=C>=0?this.y0+Math.PI*this.R*Math.tan(.5*R):this.y0+Math.PI*this.R*-Math.tan(.5*R));var D=.5*Math.abs(Math.PI/j-j/Math.PI),B=D*D,F=Math.sin(R),q=Math.cos(R),V=q/(F+q-1),W=V*V,$=V*(2/F-1),Y=$*$,ie=Math.PI*this.R*(D*(V-Y)+Math.sqrt(B*(V-Y)*(V-Y)-(Y+B)*(W-Y)))/(Y+B);j<0&&(ie=-ie),x=this.x0+ie;var ae=B+V;return ie=Math.PI*this.R*($*ae-D*Math.sqrt((Y+B)*(B+1)-ae*ae))/(Y+B),M=C>=0?this.y0+ie:this.y0-ie,d.x=x,d.y=M,d},inverse:function vandg_inverse(d){var x,M,E,C,j,R,D,B,F,q,K,V;return d.x-=this.x0,d.y-=this.y0,K=Math.PI*this.R,j=(E=d.x/K)*E+(C=d.y/K)*C,K=3*(C*C/(B=-2*(R=-Math.abs(C)*(1+j))+1+2*C*C+j*j)+(2*(D=R-2*C*C+E*E)*D*D/B/B/B-9*R*D/B/B)/27)/(F=(R-D*D/3/B)/B)/(q=2*Math.sqrt(-F/3)),Math.abs(K)>1&&(K=K>=0?1:-1),V=Math.acos(K)/3,M=d.y>=0?(-q*Math.cos(V+Math.PI/3)-D/3/B)*Math.PI:-(-q*Math.cos(V+Math.PI/3)-D/3/B)*Math.PI,x=Math.abs(E)<Q?this.long0:adjust_lon(this.long0+Math.PI*(j-1+Math.sqrt(1+2*(E*E-C*C)+j*j))/2/E),d.x=x,d.y=M,d},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};const Fr={init:function aeqd_init(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function aeqd_forward(d){var x,M,E,C,j,R,D,B,F,q,V,W,$,Y,ie,ae,se,ue,ce,he,fe,de,pe=d.x,me=d.y,ve=Math.sin(d.y),ge=Math.cos(d.y),ye=adjust_lon(pe-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Q?(d.x=this.x0+this.a*(K-me)*Math.sin(ye),d.y=this.y0-this.a*(K-me)*Math.cos(ye),d):Math.abs(this.sin_p12+1)<=Q?(d.x=this.x0+this.a*(K+me)*Math.sin(ye),d.y=this.y0+this.a*(K+me)*Math.cos(ye),d):(ue=this.sin_p12*ve+this.cos_p12*ge*Math.cos(ye),se=(ae=Math.acos(ue))?ae/Math.sin(ae):1,d.x=this.x0+this.a*se*ge*Math.sin(ye),d.y=this.y0+this.a*se*(this.cos_p12*ve-this.sin_p12*ge*Math.cos(ye)),d):(x=e0fn(this.es),M=e1fn(this.es),E=e2fn(this.es),C=e3fn(this.es),Math.abs(this.sin_p12-1)<=Q?(j=this.a*mlfn(x,M,E,C,K),R=this.a*mlfn(x,M,E,C,me),d.x=this.x0+(j-R)*Math.sin(ye),d.y=this.y0-(j-R)*Math.cos(ye),d):Math.abs(this.sin_p12+1)<=Q?(j=this.a*mlfn(x,M,E,C,K),R=this.a*mlfn(x,M,E,C,me),d.x=this.x0+(j+R)*Math.sin(ye),d.y=this.y0+(j+R)*Math.cos(ye),d):(D=ve/ge,B=gN(this.a,this.e,this.sin_p12),F=gN(this.a,this.e,ve),q=Math.atan((1-this.es)*D+this.es*B*this.sin_p12/(F*ge)),ce=0===(V=Math.atan2(Math.sin(ye),this.cos_p12*Math.tan(q)-this.sin_p12*Math.cos(ye)))?Math.asin(this.cos_p12*Math.sin(q)-this.sin_p12*Math.cos(q)):Math.abs(Math.abs(V)-Math.PI)<=Q?-Math.asin(this.cos_p12*Math.sin(q)-this.sin_p12*Math.cos(q)):Math.asin(Math.sin(ye)*Math.cos(q)/Math.sin(V)),W=this.e*this.sin_p12/Math.sqrt(1-this.es),ae=B*ce*(1-(he=ce*ce)*(ie=($=this.e*this.cos_p12*Math.cos(V)/Math.sqrt(1-this.es))*$)*(1-ie)/6+(fe=he*ce)/8*(Y=W*$)*(1-2*ie)+(de=fe*ce)/120*(ie*(4-7*ie)-3*W*W*(1-7*ie))-de*ce/48*Y),d.x=this.x0+ae*Math.sin(V),d.y=this.y0+ae*Math.cos(V),d))},inverse:function aeqd_inverse(d){var x,M,E,C,j,R,D,B,F,q,V,W,$,Y,ie,ae,se,ue,ce,he,fe,de,pe;if(d.x-=this.x0,d.y-=this.y0,this.sphere){if((x=Math.sqrt(d.x*d.x+d.y*d.y))>2*K*this.a)return;return M=x/this.a,E=Math.sin(M),C=Math.cos(M),j=this.long0,Math.abs(x)<=Q?R=this.lat0:(R=asinz(C*this.sin_p12+d.y*E*this.cos_p12/x),D=Math.abs(this.lat0)-K,j=Math.abs(D)<=Q?this.lat0>=0?adjust_lon(this.long0+Math.atan2(d.x,-d.y)):adjust_lon(this.long0-Math.atan2(-d.x,d.y)):adjust_lon(this.long0+Math.atan2(d.x*E,x*this.cos_p12*C-d.y*this.sin_p12*E))),d.x=j,d.y=R,d}return B=e0fn(this.es),F=e1fn(this.es),q=e2fn(this.es),V=e3fn(this.es),Math.abs(this.sin_p12-1)<=Q?(R=imlfn(((W=this.a*mlfn(B,F,q,V,K))-(x=Math.sqrt(d.x*d.x+d.y*d.y)))/this.a,B,F,q,V),j=adjust_lon(this.long0+Math.atan2(d.x,-1*d.y)),d.x=j,d.y=R,d):Math.abs(this.sin_p12+1)<=Q?(W=this.a*mlfn(B,F,q,V,K),R=imlfn(((x=Math.sqrt(d.x*d.x+d.y*d.y))-W)/this.a,B,F,q,V),j=adjust_lon(this.long0+Math.atan2(d.x,d.y)),d.x=j,d.y=R,d):(x=Math.sqrt(d.x*d.x+d.y*d.y),ie=Math.atan2(d.x,d.y),$=gN(this.a,this.e,this.sin_p12),ae=Math.cos(ie),ue=-(se=this.e*this.cos_p12*ae)*se/(1-this.es),ce=3*this.es*(1-ue)*this.sin_p12*this.cos_p12*ae/(1-this.es),de=1-ue*(fe=(he=x/$)-ue*(1+ue)*Math.pow(he,3)/6-ce*(1+3*ue)*Math.pow(he,4)/24)*fe/2-he*fe*fe*fe/6,Y=Math.asin(this.sin_p12*Math.cos(fe)+this.cos_p12*Math.sin(fe)*ae),j=adjust_lon(this.long0+Math.asin(Math.sin(ie)*Math.sin(fe)/Math.cos(Y))),pe=Math.sin(Y),R=Math.atan2((pe-this.es*de*this.sin_p12)*Math.tan(Y),pe*(1-this.es)),d.x=j,d.y=R,d)},names:["Azimuthal_Equidistant","aeqd"]};const qr={init:function ortho_init(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function ortho_forward(d){var x,M,E,C,j,R,D,B=d.x,F=d.y;return E=adjust_lon(B-this.long0),x=Math.sin(F),M=Math.cos(F),C=Math.cos(E),1,((j=this.sin_p14*x+this.cos_p14*M*C)>0||Math.abs(j)<=Q)&&(R=1*this.a*M*Math.sin(E),D=this.y0+1*this.a*(this.cos_p14*x-this.sin_p14*M*C)),d.x=R,d.y=D,d},inverse:function ortho_inverse(d){var x,M,E,C,j,R,D;return d.x-=this.x0,d.y-=this.y0,M=asinz((x=Math.sqrt(d.x*d.x+d.y*d.y))/this.a),E=Math.sin(M),C=Math.cos(M),R=this.long0,Math.abs(x)<=Q?(D=this.lat0,d.x=R,d.y=D,d):(D=asinz(C*this.sin_p14+d.y*E*this.cos_p14/x),j=Math.abs(this.lat0)-K,Math.abs(j)<=Q?(R=this.lat0>=0?adjust_lon(this.long0+Math.atan2(d.x,-d.y)):adjust_lon(this.long0-Math.atan2(-d.x,d.y)),d.x=R,d.y=D,d):(R=adjust_lon(this.long0+Math.atan2(d.x*E,x*this.cos_p14*C-d.y*this.sin_p14*E)),d.x=R,d.y=D,d))},names:["ortho"]};var Kr=1,Hr=2,Ur=3,Vr=4,Gr=5,Wr=6,$r={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function qsc_fwd_equat_face_theta(d,x,M,E){var C;return d<Q?(E.value=$r.AREA_0,C=0):(C=Math.atan2(x,M),Math.abs(C)<=ae?E.value=$r.AREA_0:C>ae&&C<=K+ae?(E.value=$r.AREA_1,C-=K):C>K+ae||C<=-(K+ae)?(E.value=$r.AREA_2,C=C>=0?C-ue:C+ue):(E.value=$r.AREA_3,C+=K)),C}function qsc_shift_lon_origin(d,x){var M=d+x;return M<-ue?M+=se:M>+ue&&(M-=se),M}const Qr={init:function qsc_init(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=K-ae/2?this.face=Gr:this.lat0<=-(K-ae/2)?this.face=Wr:Math.abs(this.long0)<=ae?this.face=Kr:Math.abs(this.long0)<=K+ae?this.face=this.long0>0?Hr:Vr:this.face=Ur,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function qsc_forward(d){var x,M,E,C,j,R,D={x:0,y:0},B={value:0};if(d.x-=this.long0,x=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(d.y)):d.y,M=d.x,this.face===Gr)C=K-x,M>=ae&&M<=K+ae?(B.value=$r.AREA_0,E=M-K):M>K+ae||M<=-(K+ae)?(B.value=$r.AREA_1,E=M>0?M-ue:M+ue):M>-(K+ae)&&M<=-ae?(B.value=$r.AREA_2,E=M+K):(B.value=$r.AREA_3,E=M);else if(this.face===Wr)C=K+x,M>=ae&&M<=K+ae?(B.value=$r.AREA_0,E=-M+K):M<ae&&M>=-ae?(B.value=$r.AREA_1,E=-M):M<-ae&&M>=-(K+ae)?(B.value=$r.AREA_2,E=-M-K):(B.value=$r.AREA_3,E=M>0?-M+ue:-M-ue);else{var F,q,V,W,$,Q;this.face===Hr?M=qsc_shift_lon_origin(M,+K):this.face===Ur?M=qsc_shift_lon_origin(M,+ue):this.face===Vr&&(M=qsc_shift_lon_origin(M,-K)),W=Math.sin(x),$=Math.cos(x),Q=Math.sin(M),F=$*Math.cos(M),q=$*Q,V=W,this.face===Kr?E=qsc_fwd_equat_face_theta(C=Math.acos(F),V,q,B):this.face===Hr?E=qsc_fwd_equat_face_theta(C=Math.acos(q),V,-F,B):this.face===Ur?E=qsc_fwd_equat_face_theta(C=Math.acos(-F),V,-q,B):this.face===Vr?E=qsc_fwd_equat_face_theta(C=Math.acos(-q),V,F,B):(C=E=0,B.value=$r.AREA_0)}return R=Math.atan(12/ue*(E+Math.acos(Math.sin(E)*Math.cos(ae))-K)),j=Math.sqrt((1-Math.cos(C))/(Math.cos(R)*Math.cos(R))/(1-Math.cos(Math.atan(1/Math.cos(E))))),B.value===$r.AREA_1?R+=K:B.value===$r.AREA_2?R+=ue:B.value===$r.AREA_3&&(R+=1.5*ue),D.x=j*Math.cos(R),D.y=j*Math.sin(R),D.x=D.x*this.a+this.x0,D.y=D.y*this.a+this.y0,d.x=D.x,d.y=D.y,d},inverse:function qsc_inverse(d){var x,M,E,C,j,R,D,B,F,q,V,W,$={lam:0,phi:0},Q={value:0};if(d.x=(d.x-this.x0)/this.a,d.y=(d.y-this.y0)/this.a,M=Math.atan(Math.sqrt(d.x*d.x+d.y*d.y)),x=Math.atan2(d.y,d.x),d.x>=0&&d.x>=Math.abs(d.y)?Q.value=$r.AREA_0:d.y>=0&&d.y>=Math.abs(d.x)?(Q.value=$r.AREA_1,x-=K):d.x<0&&-d.x>=Math.abs(d.y)?(Q.value=$r.AREA_2,x=x<0?x+ue:x-ue):(Q.value=$r.AREA_3,x+=K),F=ue/12*Math.tan(x),j=Math.sin(F)/(Math.cos(F)-1/Math.sqrt(2)),R=Math.atan(j),(D=1-(E=Math.cos(x))*E*(C=Math.tan(M))*C*(1-Math.cos(Math.atan(1/Math.cos(R)))))<-1?D=-1:D>1&&(D=1),this.face===Gr)B=Math.acos(D),$.phi=K-B,Q.value===$r.AREA_0?$.lam=R+K:Q.value===$r.AREA_1?$.lam=R<0?R+ue:R-ue:Q.value===$r.AREA_2?$.lam=R-K:$.lam=R;else if(this.face===Wr)B=Math.acos(D),$.phi=B-K,Q.value===$r.AREA_0?$.lam=-R+K:Q.value===$r.AREA_1?$.lam=-R:Q.value===$r.AREA_2?$.lam=-R-K:$.lam=R<0?-R-ue:-R+ue;else{var Y,ie,ae;F=(Y=D)*Y,ie=(F+=(ae=F>=1?0:Math.sqrt(1-F)*Math.sin(R))*ae)>=1?0:Math.sqrt(1-F),Q.value===$r.AREA_1?(F=ie,ie=-ae,ae=F):Q.value===$r.AREA_2?(ie=-ie,ae=-ae):Q.value===$r.AREA_3&&(F=ie,ie=ae,ae=-F),this.face===Hr?(F=Y,Y=-ie,ie=F):this.face===Ur?(Y=-Y,ie=-ie):this.face===Vr&&(F=Y,Y=ie,ie=-F),$.phi=Math.acos(-ae)-K,$.lam=Math.atan2(ie,Y),this.face===Hr?$.lam=qsc_shift_lon_origin($.lam,-K):this.face===Ur?$.lam=qsc_shift_lon_origin($.lam,-ue):this.face===Vr&&($.lam=qsc_shift_lon_origin($.lam,+K))}return 0!==this.es&&(q=$.phi<0?1:0,V=Math.tan($.phi),W=this.b/Math.sqrt(V*V+this.one_minus_f_squared),$.phi=Math.atan(Math.sqrt(this.a*this.a-W*W)/(this.one_minus_f*W)),q&&($.phi=-$.phi)),$.lam+=this.long0,d.x=$.lam,d.y=$.phi,d},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Xr=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Yr=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Zr=.8487,Jr=1.3523,ei=ie/5,ti=1/ei,ni=18,poly3_val=function(d,x){return d[0]+x*(d[1]+x*(d[2]+x*d[3]))};const ri={init:function robin_init(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function robin_forward(d){var x=adjust_lon(d.x-this.long0),M=Math.abs(d.y),E=Math.floor(M*ei);E<0?E=0:E>=ni&&(E=17);var C={x:poly3_val(Xr[E],M=ie*(M-ti*E))*x,y:poly3_val(Yr[E],M)};return d.y<0&&(C.y=-C.y),C.x=C.x*this.a*Zr+this.x0,C.y=C.y*this.a*Jr+this.y0,C},inverse:function robin_inverse(d){var x={x:(d.x-this.x0)/(this.a*Zr),y:Math.abs(d.y-this.y0)/(this.a*Jr)};if(x.y>=1)x.x/=Xr[18][0],x.y=d.y<0?-K:K;else{var M=Math.floor(x.y*ni);for(M<0?M=0:M>=ni&&(M=17);;)if(Yr[M][0]>x.y)--M;else{if(!(Yr[M+1][0]<=x.y))break;++M}var E=Yr[M],C=5*(x.y-E[0])/(Yr[M+1][0]-E[0]);C=function newton_rapshon(d,x,M,E){for(var C=x;E;--E){var j=d(C);if(C-=j,Math.abs(j)<M)break}return C}((function(d){return(poly3_val(E,d)-x.y)/function(d,x){return d[1]+x*(2*d[2]+3*x*d[3])}(E,d)}),C,Q,100),x.x/=poly3_val(Xr[M],C),x.y=(5*M+C)*Y,d.y<0&&(x.y=-x.y)}return x.x=adjust_lon(x.x+this.long0),x},names:["Robinson","robin"]};const ii={init:function geocent_init(){this.name="geocent"},forward:function geocent_forward(d){return geodeticToGeocentric(d,this.es,this.a)},inverse:function geocent_inverse(d){return geocentricToGeodetic(d,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var ai=0,oi=1,si=2,ui=3,li={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const ci={init:function tpers_init(){if(Object.keys(li).forEach(function(d){if(void 0===this[d])this[d]=li[d].def;else{if(li[d].num&&isNaN(this[d]))throw new Error("Invalid parameter value, must be numeric "+d+" = "+this[d]);li[d].num&&(this[d]=parseFloat(this[d]))}li[d].degrees&&(this[d]=this[d]*Y)}.bind(this)),Math.abs(Math.abs(this.lat0)-K)<Q?this.mode=this.lat0<0?oi:ai:Math.abs(this.lat0)<Q?this.mode=si:(this.mode=ui,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var d=this.tilt,x=this.azi;this.cg=Math.cos(x),this.sg=Math.sin(x),this.cw=Math.cos(d),this.sw=Math.sin(d)},forward:function tpers_forward(d){d.x-=this.long0;var x,M,E,C,j=Math.sin(d.y),R=Math.cos(d.y),D=Math.cos(d.x);switch(this.mode){case ui:M=this.sinph0*j+this.cosph0*R*D;break;case si:M=R*D;break;case oi:M=-j;break;case ai:M=j}switch(x=(M=this.pn1/(this.p-M))*R*Math.sin(d.x),this.mode){case ui:M*=this.cosph0*j-this.sinph0*R*D;break;case si:M*=j;break;case ai:M*=-R*D;break;case oi:M*=R*D}return C=1/((E=M*this.cg+x*this.sg)*this.sw*this.h1+this.cw),x=(x*this.cg-M*this.sg)*this.cw*C,M=E*C,d.x=x*this.a,d.y=M*this.a,d},inverse:function tpers_inverse(d){d.x/=this.a,d.y/=this.a;var x,M,E,C={x:d.x,y:d.y};E=1/(this.pn1-d.y*this.sw),x=this.pn1*d.x*E,M=this.pn1*d.y*this.cw*E,d.x=x*this.cg+M*this.sg,d.y=M*this.cg-x*this.sg;var j=hypot(d.x,d.y);if(Math.abs(j)<Q)C.x=0,C.y=d.y;else{var R,D;switch(D=1-j*j*this.pfact,D=(this.p-Math.sqrt(D))/(this.pn1/j+j/this.pn1),R=Math.sqrt(1-D*D),this.mode){case ui:C.y=Math.asin(R*this.sinph0+d.y*D*this.cosph0/j),d.y=(R-this.sinph0*Math.sin(C.y))*j,d.x*=D*this.cosph0;break;case si:C.y=Math.asin(d.y*D/j),d.y=R*j,d.x*=D;break;case ai:C.y=Math.asin(R),d.y=-d.y;break;case oi:C.y=-Math.asin(R)}C.x=Math.atan2(d.x,d.y)}return d.x=C.x+this.long0,d.y=C.y,d},names:["Tilted_Perspective","tpers"]};const hi={init:function geos_init(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var d=1-this.es,x=1/d;this.radius_p=Math.sqrt(d),this.radius_p2=d,this.radius_p_inv2=x,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function geos_forward(d){var x,M,E,C,j=d.x,R=d.y;if(j-=this.long0,"ellipse"===this.shape){R=Math.atan(this.radius_p2*Math.tan(R));var D=this.radius_p/hypot(this.radius_p*Math.cos(R),Math.sin(R));if(M=D*Math.cos(j)*Math.cos(R),E=D*Math.sin(j)*Math.cos(R),C=D*Math.sin(R),(this.radius_g-M)*M-E*E-C*C*this.radius_p_inv2<0)return d.x=Number.NaN,d.y=Number.NaN,d;x=this.radius_g-M,this.flip_axis?(d.x=this.radius_g_1*Math.atan(E/hypot(C,x)),d.y=this.radius_g_1*Math.atan(C/x)):(d.x=this.radius_g_1*Math.atan(E/x),d.y=this.radius_g_1*Math.atan(C/hypot(E,x)))}else"sphere"===this.shape&&(x=Math.cos(R),M=Math.cos(j)*x,E=Math.sin(j)*x,C=Math.sin(R),x=this.radius_g-M,this.flip_axis?(d.x=this.radius_g_1*Math.atan(E/hypot(C,x)),d.y=this.radius_g_1*Math.atan(C/x)):(d.x=this.radius_g_1*Math.atan(E/x),d.y=this.radius_g_1*Math.atan(C/hypot(E,x))));return d.x=d.x*this.a,d.y=d.y*this.a,d},inverse:function geos_inverse(d){var x,M,E,C,j=-1,R=0,D=0;if(d.x=d.x/this.a,d.y=d.y/this.a,"ellipse"===this.shape){this.flip_axis?(D=Math.tan(d.y/this.radius_g_1),R=Math.tan(d.x/this.radius_g_1)*hypot(1,D)):(R=Math.tan(d.x/this.radius_g_1),D=Math.tan(d.y/this.radius_g_1)*hypot(1,R));var B=D/this.radius_p;if(x=R*R+B*B+j*j,(E=(M=2*this.radius_g*j)*M-4*x*this.C)<0)return d.x=Number.NaN,d.y=Number.NaN,d;C=(-M-Math.sqrt(E))/(2*x),j=this.radius_g+C*j,R*=C,D*=C,d.x=Math.atan2(R,j),d.y=Math.atan(D*Math.cos(d.x)/j),d.y=Math.atan(this.radius_p_inv2*Math.tan(d.y))}else if("sphere"===this.shape){if(this.flip_axis?(D=Math.tan(d.y/this.radius_g_1),R=Math.tan(d.x/this.radius_g_1)*Math.sqrt(1+D*D)):(R=Math.tan(d.x/this.radius_g_1),D=Math.tan(d.y/this.radius_g_1)*Math.sqrt(1+R*R)),x=R*R+D*D+j*j,(E=(M=2*this.radius_g*j)*M-4*x*this.C)<0)return d.x=Number.NaN,d.y=Number.NaN,d;C=(-M-Math.sqrt(E))/(2*x),j=this.radius_g+C*j,R*=C,D*=C,d.x=Math.atan2(R,j),d.y=Math.atan(D*Math.cos(d.x)/j)}return d.x=d.x+this.long0,d},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var fi=1.340264,di=-.081106,pi=893e-6,mi=.003796,vi=Math.sqrt(3)/2;const gi={init:function eqearth_init(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function eqearth_forward(d){var x=adjust_lon(d.x-this.long0),M=d.y,E=Math.asin(vi*Math.sin(M)),C=E*E,j=C*C*C;return d.x=x*Math.cos(E)/(vi*(fi+3*di*C+j*(7*pi+9*mi*C))),d.y=E*(fi+di*C+j*(pi+mi*C)),d.x=this.a*d.x+this.x0,d.y=this.a*d.y+this.y0,d},inverse:function eqearth_inverse(d){d.x=(d.x-this.x0)/this.a,d.y=(d.y-this.y0)/this.a;var x,M,E,C,j=d.y;for(C=0;C<12&&(j-=E=(j*(fi+di*(x=j*j)+(M=x*x*x)*(pi+mi*x))-d.y)/(fi+3*di*x+M*(7*pi+9*mi*x)),!(Math.abs(E)<1e-9));++C);return M=(x=j*j)*x*x,d.x=vi*d.x*(fi+3*di*x+M*(7*pi+9*mi*x))/Math.cos(j),d.y=Math.asin(Math.sin(j)/vi),d.x=adjust_lon(d.x+this.long0),d},names:["eqearth","Equal Earth","Equal_Earth"]};ot.defaultDatum="WGS84",ot.Proj=nt,ot.WGS84=new ot.Proj("WGS84"),ot.Point=dn,ot.toPoint=toPoint,ot.defs=we,ot.nadgrid=function nadgrid(d,x){var M=new DataView(x),E=function detectLittleEndian(d){var x=d.getInt32(8,!1);if(11===x)return!1;x=d.getInt32(8,!0),11!==x&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(M),C=function readHeader(d,x){return{nFields:d.getInt32(8,x),nSubgridFields:d.getInt32(24,x),nSubgrids:d.getInt32(40,x),shiftType:decodeString(d,56,64).trim(),fromSemiMajorAxis:d.getFloat64(120,x),fromSemiMinorAxis:d.getFloat64(136,x),toSemiMajorAxis:d.getFloat64(152,x),toSemiMinorAxis:d.getFloat64(168,x)}}(M,E),j=function readSubgrids(d,x,M){for(var E=176,C=[],j=0;j<x.nSubgrids;j++){var R=readGridHeader(d,E,M),D=readGridNodes(d,E,R,M),B=Math.round(1+(R.upperLongitude-R.lowerLongitude)/R.longitudeInterval),F=Math.round(1+(R.upperLatitude-R.lowerLatitude)/R.latitudeInterval);C.push({ll:[secondsToRadians(R.lowerLongitude),secondsToRadians(R.lowerLatitude)],del:[secondsToRadians(R.longitudeInterval),secondsToRadians(R.latitudeInterval)],lim:[B,F],count:R.gridNodeCount,cvs:mapNodes(D)}),E+=176+16*R.gridNodeCount}return C}(M,C,E),R={header:C,subgrids:j};return tt[d]=R,R},ot.transform=transform,ot.mgrs=Gt,ot.version="__VERSION__",function proj4_projs(d){d.Proj.projections.add(cr),d.Proj.projections.add(hr),d.Proj.projections.add(fr),d.Proj.projections.add(pr),d.Proj.projections.add(mr),d.Proj.projections.add(vr),d.Proj.projections.add(yr),d.Proj.projections.add(br),d.Proj.projections.add(_r),d.Proj.projections.add(xr),d.Proj.projections.add(Pr),d.Proj.projections.add(Or),d.Proj.projections.add(Ir),d.Proj.projections.add(Ar),d.Proj.projections.add(Tr),d.Proj.projections.add(jr),d.Proj.projections.add(Rr),d.Proj.projections.add(Dr),d.Proj.projections.add(Nr),d.Proj.projections.add(Lr),d.Proj.projections.add(zr),d.Proj.projections.add(Br),d.Proj.projections.add(Fr),d.Proj.projections.add(qr),d.Proj.projections.add(Qr),d.Proj.projections.add(ri),d.Proj.projections.add(ii),d.Proj.projections.add(ci),d.Proj.projections.add(hi),d.Proj.projections.add(gi)}(ot);const yi=ot},63025:(d,x,M)=>{"use strict";var E=M(75368);x.H=E.createRoot,E.hydrateRoot},20252:d=>{var x="undefined"!=typeof Element,M="function"==typeof Map,E="function"==typeof Set,C="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function equal(d,j){if(d===j)return!0;if(d&&j&&"object"==typeof d&&"object"==typeof j){if(d.constructor!==j.constructor)return!1;var R,D,B,F;if(Array.isArray(d)){if((R=d.length)!=j.length)return!1;for(D=R;0!=D--;)if(!equal(d[D],j[D]))return!1;return!0}if(M&&d instanceof Map&&j instanceof Map){if(d.size!==j.size)return!1;for(F=d.entries();!(D=F.next()).done;)if(!j.has(D.value[0]))return!1;for(F=d.entries();!(D=F.next()).done;)if(!equal(D.value[1],j.get(D.value[0])))return!1;return!0}if(E&&d instanceof Set&&j instanceof Set){if(d.size!==j.size)return!1;for(F=d.entries();!(D=F.next()).done;)if(!j.has(D.value[0]))return!1;return!0}if(C&&ArrayBuffer.isView(d)&&ArrayBuffer.isView(j)){if((R=d.length)!=j.length)return!1;for(D=R;0!=D--;)if(d[D]!==j[D])return!1;return!0}if(d.constructor===RegExp)return d.source===j.source&&d.flags===j.flags;if(d.valueOf!==Object.prototype.valueOf&&"function"==typeof d.valueOf&&"function"==typeof j.valueOf)return d.valueOf()===j.valueOf();if(d.toString!==Object.prototype.toString&&"function"==typeof d.toString&&"function"==typeof j.toString)return d.toString()===j.toString();if((R=(B=Object.keys(d)).length)!==Object.keys(j).length)return!1;for(D=R;0!=D--;)if(!Object.prototype.hasOwnProperty.call(j,B[D]))return!1;if(x&&d instanceof Element)return!1;for(D=R;0!=D--;)if(("_owner"!==B[D]&&"__v"!==B[D]&&"__o"!==B[D]||!d.$$typeof)&&!equal(d[B[D]],j[B[D]]))return!1;return!0}return d!=d&&j!=j}d.exports=function isEqual(d,x){try{return equal(d,x)}catch(d){if((d.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw d}}},87930:(d,x,M)=>{"use strict";M.d(x,{vC:()=>useHotkeys});var E=M(15993);M(41773);function _extends(){return _extends=Object.assign?Object.assign.bind():function(d){for(var x=1;x<arguments.length;x++){var M=arguments[x];for(var E in M)Object.prototype.hasOwnProperty.call(M,E)&&(d[E]=M[E])}return d},_extends.apply(this,arguments)}var C=["shift","alt","meta","mod","ctrl"],j={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function mapKey(d){return(j[d]||d).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function parseKeysHookInput(d,x){return void 0===x&&(x=","),d.split(x)}function parseHotkey(d,x,M){void 0===x&&(x="+");var E=d.toLocaleLowerCase().split(x).map((function(d){return mapKey(d)}));return _extends({},{alt:E.includes("alt"),ctrl:E.includes("ctrl")||E.includes("control"),shift:E.includes("shift"),meta:E.includes("meta"),mod:E.includes("mod")},{keys:E.filter((function(d){return!C.includes(d)})),description:M})}"undefined"!=typeof document&&(document.addEventListener("keydown",(function(d){void 0!==d.key&&pushToCurrentlyPressedKeys([mapKey(d.key),mapKey(d.code)])})),document.addEventListener("keyup",(function(d){void 0!==d.key&&removeFromCurrentlyPressedKeys([mapKey(d.key),mapKey(d.code)])}))),"undefined"!=typeof window&&window.addEventListener("blur",(function(){R.clear()}));var R=new Set;function isReadonlyArray(d){return Array.isArray(d)}function pushToCurrentlyPressedKeys(d){var x=Array.isArray(d)?d:[d];R.has("meta")&&R.forEach((function(d){return!function isHotkeyModifier(d){return C.includes(d)}(d)&&R.delete(d.toLowerCase())})),x.forEach((function(d){return R.add(d.toLowerCase())}))}function removeFromCurrentlyPressedKeys(d){var x=Array.isArray(d)?d:[d];"meta"===d?R.clear():x.forEach((function(d){return R.delete(d.toLowerCase())}))}function isHotkeyEnabledOnTag(d,x){var M=d.target;void 0===x&&(x=!1);var E=M&&M.tagName;return isReadonlyArray(x)?Boolean(E&&x&&x.some((function(d){return d.toLowerCase()===E.toLowerCase()}))):Boolean(E&&x&&!0===x)}var D=function isHotkeyMatchingKeyboardEvent(d,x,M){void 0===M&&(M=!1);var E=x.alt,C=x.meta,j=x.mod,D=x.shift,B=x.ctrl,F=x.keys,q=d.key,K=d.code,V=d.ctrlKey,W=d.metaKey,$=d.shiftKey,Q=d.altKey,Y=mapKey(K),ie=q.toLowerCase();if(!(null!=F&&F.includes(Y)||null!=F&&F.includes(ie)||["ctrl","control","unknown","meta","alt","shift","os"].includes(Y)))return!1;if(!M){if(E===!Q&&"alt"!==ie)return!1;if(D===!$&&"shift"!==ie)return!1;if(j){if(!W&&!V)return!1}else{if(C===!W&&"meta"!==ie&&"os"!==ie)return!1;if(B===!V&&"ctrl"!==ie&&"control"!==ie)return!1}}return!(!F||1!==F.length||!F.includes(ie)&&!F.includes(Y))||(F?function isHotkeyPressed(d,x){return void 0===x&&(x=","),(isReadonlyArray(d)?d:d.split(x)).every((function(d){return R.has(d.trim().toLowerCase())}))}(F):!F)},B=(0,E.createContext)(void 0),F=function useBoundHotkeysProxy(){return(0,E.useContext)(B)};function deepEqual(d,x){return d&&x&&"object"==typeof d&&"object"==typeof x?Object.keys(d).length===Object.keys(x).length&&Object.keys(d).reduce((function(M,E){return M&&deepEqual(d[E],x[E])}),!0):d===x}var q=(0,E.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function toggleScope(){},enableScope:function enableScope(){},disableScope:function disableScope(){}}),K=function useHotkeysContext(){return(0,E.useContext)(q)};var V=function stopPropagation(d){d.stopPropagation(),d.preventDefault(),d.stopImmediatePropagation()},W="undefined"!=typeof window?E.useLayoutEffect:E.useEffect;function useHotkeys(d,x,M,C){var j=(0,E.useRef)(null),R=(0,E.useRef)(!1),B=M instanceof Array?C instanceof Array?void 0:C:M,q=isReadonlyArray(d)?d.join(null==B?void 0:B.splitKey):d,$=M instanceof Array?M:C instanceof Array?C:void 0,Q=(0,E.useCallback)(x,null!=$?$:[]),Y=(0,E.useRef)(Q);Y.current=$?Q:x;var ie=function useDeepEqualMemo(d){var x=(0,E.useRef)(void 0);return deepEqual(x.current,d)||(x.current=d),x.current}(B),ae=K().enabledScopes,se=F();return W((function(){if(!1!==(null==ie?void 0:ie.enabled)&&function isScopeActive(d,x){return 0===d.length&&x?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):!x||d.some((function(d){return x.includes(d)}))||d.includes("*")}(ae,null==ie?void 0:ie.scopes)){var d=function listener(d,x){var M;if(void 0===x&&(x=!1),!function isKeyboardEventTriggeredByInput(d){return isHotkeyEnabledOnTag(d,["input","textarea","select"])}(d)||isHotkeyEnabledOnTag(d,null==ie?void 0:ie.enableOnFormTags)){if(null!==j.current){var E=j.current.getRootNode();if((E instanceof Document||E instanceof ShadowRoot)&&E.activeElement!==j.current&&!j.current.contains(E.activeElement))return void V(d)}(null==(M=d.target)||!M.isContentEditable||null!=ie&&ie.enableOnContentEditable)&&parseKeysHookInput(q,null==ie?void 0:ie.splitKey).forEach((function(M){var E,C=parseHotkey(M,null==ie?void 0:ie.combinationKey);if(D(d,C,null==ie?void 0:ie.ignoreModifiers)||null!=(E=C.keys)&&E.includes("*")){if(null!=ie&&null!=ie.ignoreEventWhen&&ie.ignoreEventWhen(d))return;if(x&&R.current)return;if(function maybePreventDefault(d,x,M){("function"==typeof M&&M(d,x)||!0===M)&&d.preventDefault()}(d,C,null==ie?void 0:ie.preventDefault),!function isHotkeyEnabled(d,x,M){return"function"==typeof M?M(d,x):!0===M||void 0===M}(d,C,null==ie?void 0:ie.enabled))return void V(d);Y.current(d,C),x||(R.current=!0)}}))}},x=function handleKeyDown(x){void 0!==x.key&&(pushToCurrentlyPressedKeys(mapKey(x.code)),(void 0===(null==ie?void 0:ie.keydown)&&!0!==(null==ie?void 0:ie.keyup)||null!=ie&&ie.keydown)&&d(x))},M=function handleKeyUp(x){void 0!==x.key&&(removeFromCurrentlyPressedKeys(mapKey(x.code)),R.current=!1,null!=ie&&ie.keyup&&d(x,!0))},E=j.current||(null==B?void 0:B.document)||document;return E.addEventListener("keyup",M),E.addEventListener("keydown",x),se&&parseKeysHookInput(q,null==ie?void 0:ie.splitKey).forEach((function(d){return se.addHotkey(parseHotkey(d,null==ie?void 0:ie.combinationKey,null==ie?void 0:ie.description))})),function(){E.removeEventListener("keyup",M),E.removeEventListener("keydown",x),se&&parseKeysHookInput(q,null==ie?void 0:ie.splitKey).forEach((function(d){return se.removeHotkey(parseHotkey(d,null==ie?void 0:ie.combinationKey,null==ie?void 0:ie.description))}))}}}),[q,ie,ae]),j}},96231:(d,x,M)=>{"use strict";M.d(x,{E:()=>K});var E=M(15993),C=M(75368),j=M(29407),R=M(20252),D=M.n(R),B=function fromEntries(d){return d.reduce((function(d,x){var M=x[0],E=x[1];return d[M]=E,d}),{})},F="undefined"!=typeof window&&window.document&&window.document.createElement?E.useLayoutEffect:E.useEffect,q=[],K=function usePopper(d,x,M){void 0===M&&(M={});var R=E.useRef(null),K={onFirstUpdate:M.onFirstUpdate,placement:M.placement||"bottom",strategy:M.strategy||"absolute",modifiers:M.modifiers||q},V=E.useState({styles:{popper:{position:K.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),W=V[0],$=V[1],Q=E.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function fn(d){var x=d.state,M=Object.keys(x.elements);C.flushSync((function(){$({styles:B(M.map((function(d){return[d,x.styles[d]||{}]}))),attributes:B(M.map((function(d){return[d,x.attributes[d]]})))})}))},requires:["computeStyles"]}}),[]),Y=E.useMemo((function(){var d={onFirstUpdate:K.onFirstUpdate,placement:K.placement,strategy:K.strategy,modifiers:[].concat(K.modifiers,[Q,{name:"applyStyles",enabled:!1}])};return D()(R.current,d)?R.current||d:(R.current=d,d)}),[K.onFirstUpdate,K.placement,K.strategy,K.modifiers,Q]),ie=E.useRef();return F((function(){ie.current&&ie.current.setOptions(Y)}),[Y]),F((function(){if(null!=d&&null!=x){var E=(M.createPopper||j.n4)(d,x,Y);return ie.current=E,function(){E.destroy(),ie.current=null}}}),[d,x,M.createPopper]),{state:ie.current?ie.current.state:null,styles:W.styles,attributes:W.attributes,update:ie.current?ie.current.update:null,forceUpdate:ie.current?ie.current.forceUpdate:null}}},25185:(d,x,M)=>{"use strict";M.d(x,{r:()=>E});var E=(0,M(15993).createContext)({})},95393:(d,x,M)=>{"use strict";function _defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}function ownKeys(d,x){var M=Object.keys(d);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(d);x&&(E=E.filter((function(x){return Object.getOwnPropertyDescriptor(d,x).enumerable}))),M.push.apply(M,E)}return M}function _objectSpread2(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{};x%2?ownKeys(Object(M),!0).forEach((function(x){_defineProperty(d,x,M[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(M)):ownKeys(Object(M)).forEach((function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(M,x))}))}return d}function _objectWithoutPropertiesLoose(d,x){if(null==d)return{};var M,E,C={},j=Object.keys(d);for(E=0;E<j.length;E++)M=j[E],x.indexOf(M)>=0||(C[M]=d[M]);return C}function _arrayLikeToArray(d,x){(null==x||x>d.length)&&(x=d.length);for(var M=0,E=new Array(x);M<x;M++)E[M]=d[M];return E}function _createForOfIteratorHelperLoose(d,x){var M;if("undefined"==typeof Symbol||null==d[Symbol.iterator]){if(Array.isArray(d)||(M=function _unsupportedIterableToArray(d,x){if(d){if("string"==typeof d)return _arrayLikeToArray(d,x);var M=Object.prototype.toString.call(d).slice(8,-1);return"Object"===M&&d.constructor&&(M=d.constructor.name),"Map"===M||"Set"===M?Array.from(d):"Arguments"===M||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?_arrayLikeToArray(d,x):void 0}}(d))||x&&d&&"number"==typeof d.length){M&&(d=M);var E=0;return function(){return E>=d.length?{done:!0}:{done:!1,value:d[E++]}}}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(M=d[Symbol.iterator]()).next.bind(M)}M.d(x,{_:()=>_objectSpread2,a:()=>_objectWithoutPropertiesLoose,b:()=>_createForOfIteratorHelperLoose})},26762:(d,x,M)=>{"use strict";M.d(x,{a:()=>createComponent});var E=M(15993),C=M(95393),j=M(36008),R=M(87717),D=M(71592);function isPlainObject(d){var x;if(!(0,D.G)(d))return!1;var M=Object.getPrototypeOf(d);return null==M||(null===(x=M.constructor)||void 0===x?void 0:x.toString())===Object.toString()}function __deprecatedSplitProps(d,x){for(var M={},E={},C=0,j=Object.keys(d);C<j.length;C++){var R=j[C];x.indexOf(R)>=0?M[R]=d[R]:E[R]=d[R]}return[M,E]}function splitProps(d,x){if(void 0===x&&(x=[]),!isPlainObject(d.state))return __deprecatedSplitProps(d,x);var M=__deprecatedSplitProps(d,[].concat(x,["state"])),E=M[0],C=M[1],j=E.state,D=(0,R._)(E,["state"]);return[(0,R.a)((0,R.a)({},j),D),C]}var B=M(68799);function normalizePropsAreEqual(d){return"normalizePropsAreEqualInner"===d.name?d:function normalizePropsAreEqualInner(x,M){return isPlainObject(x.state)&&isPlainObject(M.state)?d((0,R.a)((0,R.a)({},x.state),x),(0,R.a)((0,R.a)({},M.state),M)):d(x,M)}}function createComponent(d){var x=d.as,M=d.useHook,R=d.memo,D=d.propsAreEqual,F=void 0===D?null==M?void 0:M.unstable_propsAreEqual:D,q=d.keys,K=void 0===q?(null==M?void 0:M.__keys)||[]:q,V=d.useCreateElement,W=void 0===V?j.U:V,$=function Comp(d,E){var j=d.as,R=void 0===j?x:j,D=(0,C.a)(d,["as"]);if(M){var B,F=splitProps(D,K),q=F[0],V=F[1],$=M(q,(0,C._)({ref:E},V)),Q=$.wrapElement,Y=(0,C.a)($,["wrapElement"]),ie=(null===(B=R.render)||void 0===B?void 0:B.__keys)||R.__keys,ae=ie&&splitProps(D,ie)[0],se=ae?(0,C._)((0,C._)({},Y),ae):Y,ue=W(R,se);return Q?Q(ue):ue}return W(R,(0,C._)({ref:E},D))};return $=function forwardRef(d){return(0,E.forwardRef)(d)}($),R&&($=function memo(d,x){return(0,E.memo)(d,x)}($,F&&normalizePropsAreEqual(F))),$.__keys=K,$.unstable_propsAreEqual=normalizePropsAreEqual(F||B.b),$}},75341:(d,x,M)=>{"use strict";M.d(x,{a:()=>createHook});var E=M(15993),C=M(25185);function useToken(d,x){(0,E.useDebugValue)(d);var M=(0,E.useContext)(C.r);return null!=M[d]?M[d]:x}var j=M(95393);var R=M(68799);function createHook(d){var x,M,C=function toArray(d){return Array.isArray(d)?d:void 0!==d?[d]:[]}(d.compose),D=function __useOptions(x,M){if(d.useOptions&&(x=d.useOptions(x,M)),d.name&&(x=function useOptions(d,x,M){void 0===x&&(x={}),void 0===M&&(M={});var C="use"+d+"Options";(0,E.useDebugValue)(C);var R=useToken(C);return R?(0,j._)((0,j._)({},x),R(x,M)):x}(d.name,x,M)),d.compose)for(var R,D=(0,j.b)(C);!(R=D()).done;){x=R.value.__useOptions(x,M)}return x},B=function useHook(x,M,R){if(void 0===x&&(x={}),void 0===M&&(M={}),void 0===R&&(R=!1),R||(x=D(x,M)),d.useProps&&(M=d.useProps(x,M)),d.name&&(M=function useProps(d,x,M){void 0===x&&(x={}),void 0===M&&(M={});var C="use"+d+"Props";(0,E.useDebugValue)(C);var j=useToken(C);return j?j(x,M):M}(d.name,x,M)),d.compose)if(d.useComposeOptions&&(x=d.useComposeOptions(x,M)),d.useComposeProps)M=d.useComposeProps(x,M);else for(var B,F=(0,j.b)(C);!(B=F()).done;){M=(0,B.value)(x,M,!0)}var q={},K=M||{};for(var V in K)void 0!==K[V]&&(q[V]=K[V]);return q};B.__useOptions=D;var F=C.reduce((function(d,x){return d.push.apply(d,x.__keys||[]),d}),[]);return B.__keys=[].concat(F,(null===(x=d.useState)||void 0===x?void 0:x.__keys)||[],d.keys||[]),B.unstable_propsAreEqual=d.propsAreEqual||(null===(M=C[0])||void 0===M?void 0:M.unstable_propsAreEqual)||R.b,B}},36008:(d,x,M)=>{"use strict";M.d(x,{U:()=>R});var E=M(15993),C=M(25185),j=M(95393);var R=function useCreateElement(d,x,M){void 0===M&&(M=x.children);var R=(0,E.useContext)(C.r);if(R.useCreateElement)return R.useCreateElement(d,x,M);if("string"==typeof d&&function isRenderProp(d){return"function"==typeof d}(M)){x.children;return M((0,j.a)(x,["children"]))}return(0,E.createElement)(d,x,M)}},87717:(d,x,M)=>{"use strict";function _defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}function ownKeys(d,x){var M=Object.keys(d);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(d);x&&(E=E.filter((function(x){return Object.getOwnPropertyDescriptor(d,x).enumerable}))),M.push.apply(M,E)}return M}function _objectSpread2(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{};x%2?ownKeys(Object(M),!0).forEach((function(x){_defineProperty(d,x,M[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(M)):ownKeys(Object(M)).forEach((function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(M,x))}))}return d}function _objectWithoutPropertiesLoose(d,x){if(null==d)return{};var M,E,C={},j=Object.keys(d);for(E=0;E<j.length;E++)M=j[E],x.indexOf(M)>=0||(C[M]=d[M]);return C}M.d(x,{_:()=>_objectWithoutPropertiesLoose,a:()=>_objectSpread2})},67804:(d,x,M)=>{"use strict";M.d(x,{S:()=>C});var E=M(41307);var C=function checkIsBrowser(){var d=(0,E.z)();return Boolean(void 0!==d&&d.document&&d.document.createElement)}()},40820:(d,x,M)=>{"use strict";M.d(x,{k:()=>closest});var E=M(50778);function closest(d,x){if("closest"in d)return d.closest(x);do{if((0,E.c)(d,x))return d;d=d.parentElement||d.parentNode}while(null!==d&&1===d.nodeType);return null}},99806:(d,x,M)=>{"use strict";function contains(d,x){return d===x||d.contains(x)}M.d(x,{g:()=>contains})},90479:(d,x,M)=>{"use strict";M.d(x,{l:()=>createEvent});var E=M(90522);function createEvent(d,x,M){if("function"==typeof Event)return new Event(x,M);var C=(0,E.Y)(d).createEvent("Event");return C.initEvent(x,null==M?void 0:M.bubbles,null==M?void 0:M.cancelable),C}},4943:(d,x,M)=>{"use strict";M.d(x,{p:()=>isUA});var E=M(67804);function isUA(d){return!!E.S&&-1!==window.navigator.userAgent.indexOf(d)}},12354:(d,x,M)=>{"use strict";M.d(x,{z:()=>ensureFocus});var E=M(69501);function hasFocus(d){var x=(0,E.b)(d);if(!x)return!1;if(x===d)return!0;var M=x.getAttribute("aria-activedescendant");return!!M&&M===d.id}function ensureFocus(d,x){var M=void 0===x?{}:x,E=M.preventScroll,C=M.isActive,j=void 0===C?hasFocus:C;return j(d)?-1:(d.focus({preventScroll:E}),j(d)?-1:requestAnimationFrame((function(){d.focus({preventScroll:E})})))}},69501:(d,x,M)=>{"use strict";M.d(x,{b:()=>getActiveElement});var E=M(90522);function getActiveElement(d){var x=(0,E.Y)(d).activeElement;return null!=x&&x.nodeName?x:null}},90522:(d,x,M)=>{"use strict";function getDocument(d){return d?d.ownerDocument||d:document}M.d(x,{Y:()=>getDocument})},83874:(d,x,M)=>{"use strict";M.d(x,{m:()=>getNextActiveElementOnBlur});var E=M(67804),C=M(69501),j=E.S&&"msCrypto"in window;function getNextActiveElementOnBlur(d){return j?(0,C.b)(d.currentTarget):d.relatedTarget}},41307:(d,x,M)=>{"use strict";M.d(x,{z:()=>getWindow});var E,C=M(90522);try{E=window}catch(d){}function getWindow(d){return d&&(0,C.Y)(d).defaultView||E}},56912:(d,x,M)=>{"use strict";M.d(x,{o:()=>hasFocusWithin});var E=M(69501),C=M(99806);function hasFocusWithin(d){var x=(0,E.b)(d);if(!x)return!1;if((0,C.g)(d,x))return!0;var M=x.getAttribute("aria-activedescendant");return!!M&&(M===d.id||!!d.querySelector("#"+M))}},93839:(d,x,M)=>{"use strict";M.d(x,{B:()=>isButton});var E=["button","color","file","image","reset","submit"];function isButton(d){if("BUTTON"===d.tagName)return!0;if("INPUT"===d.tagName){var x=d;return-1!==E.indexOf(x.type)}return!1}},71592:(d,x,M)=>{"use strict";function isObject(d){return"object"==typeof d&&null!=d}M.d(x,{G:()=>isObject})},50473:(d,x,M)=>{"use strict";M.d(x,{h:()=>isPortalEvent});var E=M(99806);function isPortalEvent(d){return!(0,E.g)(d.currentTarget,d.target)}},87124:(d,x,M)=>{"use strict";function isSelfTarget(d){return d.target===d.currentTarget}M.d(x,{u:()=>isSelfTarget})},50778:(d,x,M)=>{"use strict";function matches(d,x){return"matches"in d?d.matches(x):"msMatchesSelector"in d?d.msMatchesSelector(x):d.webkitMatchesSelector(x)}M.d(x,{c:()=>matches})},73734:(d,x,M)=>{"use strict";function removeIndexFromArray(d,x){return-1===x?d:[].concat(d.slice(0,x),d.slice(x+1))}M.d(x,{w:()=>removeIndexFromArray})},83675:(d,x,M)=>{"use strict";M.d(x,{B:()=>removeItemFromArray});var E=M(73734);function removeItemFromArray(d,x){var M=d.indexOf(x);return(0,E.w)(d,M)}},68799:(d,x,M)=>{"use strict";function shallowEqual(d,x){if(d===x)return!0;if(!d)return!1;if(!x)return!1;if("object"!=typeof d)return!1;if("object"!=typeof x)return!1;var M=Object.keys(d),E=Object.keys(x),C=M.length;if(E.length!==C)return!1;for(var j=0,R=M;j<R.length;j++){var D=R[j];if(d[D]!==x[D])return!1}return!0}M.d(x,{b:()=>shallowEqual})},73028:(d,x,M)=>{"use strict";M.d(x,{AO:()=>isTabbable,BT:()=>getLastTabbableIn,LC:()=>getFirstTabbableIn,tp:()=>isFocusable});var E=M(50778),C="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function isFocusable(d){return(0,E.c)(d,C)&&function isVisible(d){var x=d;return x.offsetWidth>0||x.offsetHeight>0||d.getClientRects().length>0}(d)}function isTabbable(d){return isFocusable(d)&&!function hasNegativeTabIndex(d){return parseInt(d.getAttribute("tabindex")||"0",10)<0}(d)}function getAllTabbableIn(d,x){var M=Array.from(d.querySelectorAll(C)),E=M.filter(isTabbable);return isTabbable(d)&&E.unshift(d),!E.length&&x?M:E}function getFirstTabbableIn(d,x){return getAllTabbableIn(d,x)[0]||null}function getLastTabbableIn(d,x){var M=getAllTabbableIn(d,x);return M[M.length-1]||null}},37651:(d,x,M)=>{"use strict";M.d(x,{N:()=>useForkRef});var E=M(15993);function setRef(d,x){void 0===x&&(x=null),d&&("function"==typeof d?d(x):d.current=x)}function useForkRef(d,x){return(0,E.useMemo)((function(){return null==d&&null==x?null:function(M){setRef(d,M),setRef(x,M)}}),[d,x])}},30168:(d,x,M)=>{"use strict";M.d(x,{o:()=>C});var E=M(15993),C=M(67804).S?E.useLayoutEffect:E.useEffect},6749:(d,x,M)=>{"use strict";M.d(x,{h:()=>useLiveRef});var E=M(15993),C=M(30168);function useLiveRef(d){var x=(0,E.useRef)(d);return(0,C.o)((function(){x.current=d})),x}},25671:(d,x,M)=>{"use strict";M.d(x,{N:()=>useSealedState});var E=M(15993);function useSealedState(d){return(0,E.useState)(d)[0]}},85148:(d,x,M)=>{"use strict";M(15993)},95726:(d,x,M)=>{"use strict";M.d(x,{$:()=>K,s:()=>q});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=M(93839),F=(M(85148),M(88720)),q=(0,j.a)({name:"Button",compose:F.I,keys:[],useProps:function useProps(d,x){var M=x.ref,C=(0,E._)(x,["ref"]),j=(0,R.useRef)(null),F=(0,R.useState)(void 0),q=F[0],K=F[1],V=(0,R.useState)("button"),W=V[0],$=V[1];return(0,R.useEffect)((function(){var d=j.current;d&&((0,B.B)(d)||("A"!==d.tagName&&K("button"),$(void 0)))}),[]),(0,E.a)({ref:(0,D.N)(j,M),role:q,type:W},C)}}),K=(0,C.a)({as:"button",memo:!0,useHook:q})},88720:(d,x,M)=>{"use strict";M.d(x,{D:()=>V,I:()=>K});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(93839),B=(M(85148),M(6749)),F=M(87124),q=M(15636);var K=(0,j.a)({name:"Clickable",compose:q.b,keys:["unstable_clickOnEnter","unstable_clickOnSpace"],useOptions:function useOptions(d){var x=d.unstable_clickOnEnter,M=void 0===x||x,C=d.unstable_clickOnSpace,j=void 0===C||C,R=(0,E._)(d,["unstable_clickOnEnter","unstable_clickOnSpace"]);return(0,E.a)({unstable_clickOnEnter:M,unstable_clickOnSpace:j},R)},useProps:function useProps(d,x){var M=x.onKeyDown,C=x.onKeyUp,j=(0,E._)(x,["onKeyDown","onKeyUp"]),q=(0,R.useState)(!1),K=q[0],V=q[1],W=(0,B.h)(M),$=(0,B.h)(C),Q=(0,R.useCallback)((function(x){var M;if(null===(M=W.current)||void 0===M||M.call(W,x),!x.defaultPrevented&&!d.disabled&&!x.metaKey&&(0,F.u)(x)){var E=d.unstable_clickOnEnter&&"Enter"===x.key,C=d.unstable_clickOnSpace&&" "===x.key;if(E||C){if(function isNativeClick(d){var x=d.currentTarget;return!!d.isTrusted&&((0,D.B)(x)||"INPUT"===x.tagName||"TEXTAREA"===x.tagName||"A"===x.tagName||"SELECT"===x.tagName)}(x))return;x.preventDefault(),E?x.currentTarget.click():C&&V(!0)}}}),[d.disabled,d.unstable_clickOnEnter,d.unstable_clickOnSpace]),Y=(0,R.useCallback)((function(x){var M;if(null===(M=$.current)||void 0===M||M.call($,x),!x.defaultPrevented&&!d.disabled&&!x.metaKey){var E=d.unstable_clickOnSpace&&" "===x.key;K&&E&&(V(!1),x.currentTarget.click())}}),[d.disabled,d.unstable_clickOnSpace,K]);return(0,E.a)({"data-active":K||void 0,onKeyDown:Q,onKeyUp:Y},j)}}),V=(0,C.a)({as:"button",memo:!0,useHook:K})},99428:(d,x,M)=>{"use strict";M.d(x,{T:()=>pe});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=(M(85148),M(6749)),F=M(87124),q=M(40786),K=M(15636),V=M(36008),W=M(90522),$=M(87717),Q=M(90479);function createFocusEvent(d,x,M){return void 0===M&&(M={}),"function"==typeof FocusEvent?new FocusEvent(x,M):(0,Q.l)(d,x,M)}function fireBlurEvent(d,x){var M=createFocusEvent(d,"blur",x),E=d.dispatchEvent(M),C=(0,$.a)((0,$.a)({},x),{},{bubbles:!0});return d.dispatchEvent(createFocusEvent(d,"focusout",C)),E}var Y=M(41307);function fireKeyboardEvent(d,x,M){return d.dispatchEvent(function createKeyboardEvent(d,x,M){if(void 0===M&&(M={}),"function"==typeof KeyboardEvent)return new KeyboardEvent(x,M);var E=(0,W.Y)(d).createEvent("KeyboardEvent");return E.initKeyboardEvent(x,M.bubbles,M.cancelable,(0,Y.z)(d),M.key,M.location,M.ctrlKey,M.altKey,M.shiftKey,M.metaKey),E}(d,x,M))}var ie=M(67804),ae=M(83874),se=M(42521),ue=M(40422),ce=M(88415),he=M(97980),fe=M(63246),de=ie.S&&"msCrypto"in window;function useKeyboardEventProxy(d,x,M){var E=(0,B.h)(M);return(0,R.useCallback)((function(M){var C;if(null===(C=E.current)||void 0===C||C.call(E,M),!M.defaultPrevented&&d&&function canProxyKeyboardEvent(d){return!!(0,F.u)(d)&&!d.metaKey&&"Tab"!==d.key}(M)){var j=null==x?void 0:x.ref.current;j&&(fireKeyboardEvent(j,M.type,M)||M.preventDefault(),M.currentTarget.contains(j)&&M.stopPropagation())}}),[d,x])}function isItem(d,x){return null==d?void 0:d.some((function(d){return!!x&&d.ref.current===x}))}var pe=(0,j.a)({name:"Composite",compose:[K.b],keys:he.C,useOptions:function useOptions(d){return(0,E.a)((0,E.a)({},d),{},{currentId:(0,ue.g)(d)})},useProps:function useProps(d,x){var M=x.ref,C=x.onFocusCapture,j=x.onFocus,q=x.onBlurCapture,K=x.onKeyDown,V=x.onKeyDownCapture,$=x.onKeyUpCapture,Q=(0,E._)(x,["ref","onFocusCapture","onFocus","onBlurCapture","onKeyDown","onKeyDownCapture","onKeyUpCapture"]),Y=(0,R.useRef)(null),ie=(0,ce.f)(d.items,d.currentId),he=(0,R.useRef)(null),pe=(0,B.h)(C),me=(0,B.h)(j),ve=(0,B.h)(q),ge=(0,B.h)(K),ye=function useScheduleUserFocus(d){var x=(0,B.h)(d),M=(0,R.useReducer)((function(d){return d+1}),0),E=M[0],C=M[1];return(0,R.useEffect)((function(){var d,M=null===(d=x.current)||void 0===d?void 0:d.ref.current;E&&M&&(0,fe.u)(M)}),[E]),C}(ie),be=de?function useActiveElementRef(d){var x=(0,R.useRef)(null);return(0,R.useEffect)((function(){var M=(0,W.Y)(d.current),E=function onFocus(d){var M=d.target;x.current=M};return M.addEventListener("focus",E,!0),function(){M.removeEventListener("focus",E,!0)}}),[]),x}(Y):void 0;(0,R.useEffect)((function(){var x=Y.current;d.unstable_moves&&!ie&&(null==x||x.focus())}),[d.unstable_moves,ie]);var xe=useKeyboardEventProxy(d.unstable_virtual,ie,V),we=useKeyboardEventProxy(d.unstable_virtual,ie,$),Me=(0,R.useCallback)((function(x){var M;if(null===(M=pe.current)||void 0===M||M.call(pe,x),!x.defaultPrevented&&d.unstable_virtual){var E=(null==be?void 0:be.current)||x.relatedTarget,C=isItem(d.items,E);(0,F.u)(x)&&C&&(x.stopPropagation(),he.current=E)}}),[d.unstable_virtual,d.items]),Ie=(0,R.useCallback)((function(x){var M;if(null===(M=me.current)||void 0===M||M.call(me,x),!x.defaultPrevented)if(d.unstable_virtual)(0,F.u)(x)&&ye();else if((0,F.u)(x)){var E;null===(E=d.setCurrentId)||void 0===E||E.call(d,null)}}),[d.unstable_virtual,d.setCurrentId]),Re=(0,R.useCallback)((function(x){var M;if(null===(M=ve.current)||void 0===M||M.call(ve,x),!x.defaultPrevented&&d.unstable_virtual){var E=(null==ie?void 0:ie.ref.current)||null,C=(0,ae.m)(x),j=isItem(d.items,C);if((0,F.u)(x)&&j)C===E?he.current&&he.current!==C&&fireBlurEvent(he.current,x):E&&fireBlurEvent(E,x),x.stopPropagation();else!isItem(d.items,x.target)&&E&&fireBlurEvent(E,x)}}),[d.unstable_virtual,d.items,ie]),Be=(0,R.useCallback)((function(x){var M,E;if(null===(M=ge.current)||void 0===M||M.call(ge,x),!x.defaultPrevented&&null===d.currentId&&(0,F.u)(x)){var C="horizontal"!==d.orientation,j="vertical"!==d.orientation,R=!(null===(E=d.groups)||void 0===E||!E.length),D={ArrowUp:(R||C)&&function up(){if(R){var x,M=function findFirstEnabledItemInTheLastRow(d){return(0,ue.f)((0,se.f)((0,se.r)((0,se.g)(d))))}(d.items);if(null!=M&&M.id)null===(x=d.move)||void 0===x||x.call(d,M.id)}else{var E;null===(E=d.last)||void 0===E||E.call(d)}},ArrowRight:(R||j)&&d.first,ArrowDown:(R||C)&&d.first,ArrowLeft:(R||j)&&d.last,Home:d.first,End:d.last,PageUp:d.first,PageDown:d.last}[x.key];D&&(x.preventDefault(),D())}}),[d.currentId,d.orientation,d.groups,d.items,d.move,d.last,d.first]);return(0,E.a)({ref:(0,D.N)(Y,M),id:d.baseId,onFocus:Ie,onFocusCapture:Me,onBlurCapture:Re,onKeyDownCapture:xe,onKeyDown:Be,onKeyUpCapture:we,"aria-activedescendant":d.unstable_virtual&&(null==ie?void 0:ie.id)||void 0},Q)},useComposeProps:function useComposeProps(d,x){x=(0,q.I)(d,x,!0);var M=(0,K.b)(d,x,!0);return d.unstable_virtual||null===d.currentId?(0,E.a)({tabIndex:0},M):(0,E.a)((0,E.a)({},x),{},{ref:M.ref})}});(0,C.a)({as:"div",useHook:pe,useCreateElement:function useCreateElement$1(d,x,M){return(0,V.U)(d,x,M)}})},24469:(d,x,M)=>{"use strict";M.d(x,{k:()=>ue});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=(M(85148),M(6749)),F=M(87124),q=M(56912),K=M(50473),V=M(88720),W=M(90522),$=M(40422),Q=M(97980),Y=M(63246);function isTextField(d){try{var x=d instanceof HTMLInputElement&&null!==d.selectionStart,M="TEXTAREA"===d.tagName,E="true"===d.contentEditable;return x||M||E||!1}catch(d){return!1}}var ie=M(12354),ae=M(97e3),se=M(90479);function setTextFieldValue(d,x){if(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement){var M,E=Object.getPrototypeOf(d),C=null===(M=Object.getOwnPropertyDescriptor(E,"value"))||void 0===M?void 0:M.set;C&&(C.call(d,x),function fireEvent(d,x,M){return d.dispatchEvent((0,se.l)(d,x,M))}(d,"input",{bubbles:!0}))}}function getWidget(d){return d.querySelector("[data-composite-item-widget]")}var ue=(0,j.a)({name:"CompositeItem",compose:[V.I,ae.W],keys:Q.b,propsAreEqual:function propsAreEqual(d,x){if(!x.id||d.id!==x.id)return V.I.unstable_propsAreEqual(d,x);var M=d.currentId,C=d.unstable_moves,j=(0,E._)(d,["currentId","unstable_moves"]),R=x.currentId,D=x.unstable_moves,B=(0,E._)(x,["currentId","unstable_moves"]);if(R!==M){if(x.id===R||x.id===M)return!1}else if(C!==D)return!1;return V.I.unstable_propsAreEqual(j,B)},useOptions:function useOptions(d){return(0,E.a)((0,E.a)({},d),{},{id:d.id,currentId:(0,$.g)(d),unstable_clickOnSpace:!d.unstable_hasActiveWidget&&d.unstable_clickOnSpace})},useProps:function useProps(d,x){var M,C=x.ref,j=x.tabIndex,V=void 0===j?0:j,$=x.onMouseDown,Q=x.onFocus,ae=x.onBlurCapture,se=x.onKeyDown,ue=x.onClick,ce=(0,E._)(x,["ref","tabIndex","onMouseDown","onFocus","onBlurCapture","onKeyDown","onClick"]),he=(0,R.useRef)(null),fe=d.id,de=d.disabled&&!d.focusable,pe=d.currentId===fe,me=(0,B.h)(pe),ve=(0,R.useRef)(!1),ge=function useItem(d){return(0,R.useMemo)((function(){var x;return null===(x=d.items)||void 0===x?void 0:x.find((function(x){return d.id&&x.id===d.id}))}),[d.items,d.id])}(d),ye=(0,B.h)($),be=(0,B.h)(Q),xe=(0,B.h)(ae),we=(0,B.h)(se),Me=(0,B.h)(ue),Ie=!d.unstable_virtual&&!d.unstable_hasActiveWidget&&pe||!(null!==(M=d.items)&&void 0!==M&&M.length);(0,R.useEffect)((function(){var x;if(fe)return null===(x=d.registerItem)||void 0===x||x.call(d,{id:fe,ref:he,disabled:!!de}),function(){var x;null===(x=d.unregisterItem)||void 0===x||x.call(d,fe)}}),[fe,de,d.registerItem,d.unregisterItem]),(0,R.useEffect)((function(){var x=he.current;x&&d.unstable_moves&&me.current&&(0,Y.u)(x)}),[d.unstable_moves]);var Re=(0,R.useCallback)((function(d){var x;null===(x=ye.current)||void 0===x||x.call(ye,d),(0,Y.s)(d.currentTarget,!0)}),[]),Be=(0,R.useCallback)((function(x){var M,C,j=(0,Y.h)(x.currentTarget);if((0,Y.s)(x.currentTarget,!1),null===(M=be.current)||void 0===M||M.call(be,x),!x.defaultPrevented&&!(0,K.h)(x)&&fe&&!function targetIsAnotherItem(d,x){if((0,F.u)(d))return!1;for(var M,C=(0,E.b)(x);!(M=C()).done;)if(M.value.ref.current===d.target)return!0;return!1}(x,d.items)&&(null===(C=d.setCurrentId)||void 0===C||C.call(d,fe),j&&d.unstable_virtual&&d.baseId&&(0,F.u)(x))){var R=x.target,D=(0,W.Y)(R).getElementById(d.baseId);D&&(ve.current=!0,(0,ie.z)(D))}}),[fe,d.items,d.setCurrentId,d.unstable_virtual,d.baseId]),Fe=(0,R.useCallback)((function(x){var M;null===(M=xe.current)||void 0===M||M.call(xe,x),x.defaultPrevented||d.unstable_virtual&&ve.current&&(ve.current=!1,x.preventDefault(),x.stopPropagation())}),[d.unstable_virtual]),qe=(0,R.useCallback)((function(x){var M;if((0,F.u)(x)){var E="horizontal"!==d.orientation,C="vertical"!==d.orientation,j=!(null==ge||!ge.groupId),R={ArrowUp:(j||E)&&d.up,ArrowRight:(j||C)&&d.next,ArrowDown:(j||E)&&d.down,ArrowLeft:(j||C)&&d.previous,Home:function Home(){var M,E;!j||x.ctrlKey?null===(M=d.first)||void 0===M||M.call(d):null===(E=d.previous)||void 0===E||E.call(d,!0)},End:function End(){var M,E;!j||x.ctrlKey?null===(M=d.last)||void 0===M||M.call(d):null===(E=d.next)||void 0===E||E.call(d,!0)},PageUp:function PageUp(){var x,M;j?null===(x=d.up)||void 0===x||x.call(d,!0):null===(M=d.first)||void 0===M||M.call(d)},PageDown:function PageDown(){var x,M;j?null===(x=d.down)||void 0===x||x.call(d,!0):null===(M=d.last)||void 0===M||M.call(d)}}[x.key];if(R)return x.preventDefault(),void R();if(null===(M=we.current)||void 0===M||M.call(we,x),!x.defaultPrevented)if(1===x.key.length&&" "!==x.key){var D=getWidget(x.currentTarget);D&&isTextField(D)&&(D.focus(),setTextFieldValue(D,""))}else if("Delete"===x.key||"Backspace"===x.key){var B=getWidget(x.currentTarget);B&&isTextField(B)&&(x.preventDefault(),setTextFieldValue(B,""))}}}),[d.orientation,ge,d.up,d.next,d.down,d.previous,d.first,d.last]),He=(0,R.useCallback)((function(d){var x;if(null===(x=Me.current)||void 0===x||x.call(Me,d),!d.defaultPrevented){var M=getWidget(d.currentTarget);M&&!(0,q.o)(M)&&M.focus()}}),[]);return(0,E.a)({ref:(0,D.N)(he,C),id:fe,tabIndex:Ie?V:-1,"aria-selected":!(!d.unstable_virtual||!pe)||void 0,onMouseDown:Re,onFocus:Be,onBlurCapture:Fe,onKeyDown:qe,onClick:He},ce)}});(0,C.a)({as:"button",memo:!0,useHook:ue})},74839:(d,x,M)=>{"use strict";M.d(x,{A:()=>useCompositeState});var E=M(11657),C=M(15993),j=M(30168),R=M(25671),D=M(90522),B=M(42521),F=M(40422),q=M(88415);function applyState(d,x){return function isUpdater(d){return"function"==typeof d}(d)?d(x):d}var K=M(16459);function isElementPreceding(d,x){return Boolean(x.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_PRECEDING)}function findDOMIndex(d,x){return d.findIndex((function(d){return!(!d.ref.current||!x.ref.current)&&isElementPreceding(x.ref.current,d.ref.current)}))}function getMaxLength(d){for(var x,M=0,C=(0,E.b)(d);!(x=C()).done;){var j=x.value.length;j>M&&(M=j)}return M}function verticalizeItems(d){for(var x=(0,B.g)(d),M=getMaxLength(x),C=[],j=0;j<M;j+=1)for(var R,D=(0,E.b)(x);!(R=D()).done;){var F=R.value;F[j]&&C.push((0,E.a)((0,E.a)({},F[j]),{},{groupId:F[j].groupId?""+j:void 0}))}return C}function fillGroups(d,x,M){for(var C,j=getMaxLength(d),R=(0,E.b)(d);!(C=R()).done;)for(var D=C.value,B=0;B<j;B+=1){var q=D[B];if(!q||M&&q.disabled){var K=0===B&&M?(0,F.f)(D):D[B-1];D[B]=K&&x!==(null==K?void 0:K.id)&&M?K:{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},groupId:null==K?void 0:K.groupId}}}return d}var V={id:null,ref:{current:null}};function getItemsInGroup(d,x){return d.filter((function(d){return d.groupId===x}))}var W={horizontal:"vertical",vertical:"horizontal"};function addItemAtIndex(d,x,M){return M in d?[].concat(d.slice(0,M),[x],d.slice(M)):[].concat(d,[x])}function sortBasedOnDOMPosition(d){var x=d.map((function(d,x){return[x,d]})),M=!1;return x.sort((function(d,x){var E=d[0],C=d[1],j=x[0],R=x[1],D=C.ref.current,B=R.ref.current;return D&&B?isElementPreceding(D,B)?(E>j&&(M=!0),-1):(E<j&&(M=!0),1):0})),M?x.map((function(d){d[0];return d[1]})):d}function setItemsBasedOnDOMPosition(d,x){var M=sortBasedOnDOMPosition(d);d!==M&&x(M)}function useIntersectionObserver(d,x){var M=(0,C.useRef)([]);(0,C.useEffect)((function(){for(var C,j=function getCommonParent(d){for(var x,M=d[0],E=d.slice(1),C=null==M||null===(x=M.ref.current)||void 0===x?void 0:x.parentElement,j=function _loop(){var d=C;if(E.every((function(x){return d.contains(x.ref.current)})))return{v:C};C=C.parentElement};C;){var R=j();if("object"==typeof R)return R.v}return(0,D.Y)(C).body}(d),R=new IntersectionObserver((function callback(){!!M.current.length&&setItemsBasedOnDOMPosition(d,x),M.current=d}),{root:j}),B=(0,E.b)(d);!(C=B()).done;){var F=C.value;F.ref.current&&R.observe(F.ref.current)}return function(){R.disconnect()}}),[d])}function useSortBasedOnDOMPosition(d,x){"function"==typeof IntersectionObserver?useIntersectionObserver(d,x):function useTimeoutObserver(d,x){(0,C.useEffect)((function(){var M=setTimeout((function callback(){return setItemsBasedOnDOMPosition(d,x)}),250);return function(){return clearTimeout(M)}}))}(d,x)}function reducer(d,x){var M=d.unstable_virtual,C=d.rtl,j=d.orientation,R=d.items,D=d.groups,K=d.currentId,$=d.loop,Q=d.wrap,Y=d.pastIds,ie=d.shift,ae=d.unstable_moves,se=d.unstable_includesBaseElement,ue=d.initialVirtual,ce=d.initialRTL,he=d.initialOrientation,fe=d.initialCurrentId,de=d.initialLoop,pe=d.initialWrap,me=d.initialShift,ve=d.hasSetCurrentId;switch(x.type){case"registerGroup":var ge=x.group;if(0===D.length)return(0,E.a)((0,E.a)({},d),{},{groups:[ge]});var ye=findDOMIndex(D,ge);return(0,E.a)((0,E.a)({},d),{},{groups:addItemAtIndex(D,ge,ye)});case"unregisterGroup":var be=x.id,xe=D.filter((function(d){return d.id!==be}));return xe.length===D.length?d:(0,E.a)((0,E.a)({},d),{},{groups:xe});case"registerItem":var we,Me=x.item,Ie=D.find((function(d){var x;return null===(x=d.ref.current)||void 0===x?void 0:x.contains(Me.ref.current)})),Re=(0,E.a)({groupId:null==Ie?void 0:Ie.id},Me),Be=findDOMIndex(R,Re),Fe=(0,E.a)((0,E.a)({},d),{},{items:addItemAtIndex(R,Re,Be)});return ve||ae||void 0!==fe?Fe:(0,E.a)((0,E.a)({},Fe),{},{currentId:null===(we=(0,F.f)(Fe.items))||void 0===we?void 0:we.id});case"unregisterItem":var qe=x.id,He=R.filter((function(d){return d.id!==qe}));if(He.length===R.length)return d;var Xe=Y.filter((function(d){return d!==qe})),Ze=(0,E.a)((0,E.a)({},d),{},{pastIds:Xe,items:He});if(K&&K===qe){var Je=se?null:(0,F.g)((0,E.a)((0,E.a)({},Ze),{},{currentId:Xe[0]}));return(0,E.a)((0,E.a)({},Ze),{},{currentId:Je})}return Ze;case"move":var et=x.id;if(void 0===et)return d;var tt=Y.filter((function(d){return d!==K&&d!==et})),nt=K?[K].concat(tt):tt,rt=(0,E.a)((0,E.a)({},d),{},{pastIds:nt});if(null===et)return(0,E.a)((0,E.a)({},rt),{},{unstable_moves:ae+1,currentId:(0,F.g)(rt,et)});var ot=(0,q.f)(R,et);return(0,E.a)((0,E.a)({},rt),{},{unstable_moves:ot?ae+1:ae,currentId:(0,F.g)(rt,null==ot?void 0:ot.id)});case"next":if(null==K)return reducer(d,(0,E.a)((0,E.a)({},x),{},{type:"first"}));var ft=C&&"vertical"!==j,xt=ft?(0,B.r)(R):R,Mt=xt.find((function(d){return d.id===K}));if(!Mt)return reducer(d,(0,E.a)((0,E.a)({},x),{},{type:"first"}));var Ot=!!Mt.groupId,Nt=xt.indexOf(Mt),Lt=xt.slice(Nt+1),Ft=getItemsInGroup(Lt,Mt.groupId);if(x.allTheWay){var qt=(0,F.f)(ft?getItemsInGroup(xt,Mt.groupId):(0,B.r)(Ft));return reducer(d,(0,E.a)((0,E.a)({},x),{},{type:"move",id:null==qt?void 0:qt.id}))}var Gt=function getOppositeOrientation(d){return d&&W[d]}(Ot?j||"horizontal":j),dn=$&&$!==Gt,Sn=Ot&&Q&&Q!==Gt,An=x.hasNullItem||!Ot&&dn&&se;if(dn){var jn=function placeItemsAfter(d,x,M){var E=d.findIndex((function(d){return d.id===x}));return[].concat(d.slice(E+1),M?[V]:[],d.slice(0,E))}(Sn&&!An?xt:getItemsInGroup(xt,Mt.groupId),K,An),Rn=(0,F.f)(jn,K);return reducer(d,(0,E.a)((0,E.a)({},x),{},{type:"move",id:null==Rn?void 0:Rn.id}))}if(Sn){var Nn=(0,F.f)(An?Ft:Lt,K),Un=An?(null==Nn?void 0:Nn.id)||null:null==Nn?void 0:Nn.id;return reducer(d,(0,E.a)((0,E.a)({},x),{},{type:"move",id:Un}))}var Wn=(0,F.f)(Ft,K);return reducer(d,!Wn&&An?(0,E.a)((0,E.a)({},x),{},{type:"move",id:null}):(0,E.a)((0,E.a)({},x),{},{type:"move",id:null==Wn?void 0:Wn.id}));case"previous":var Jn=!!!D.length&&se,er=reducer((0,E.a)((0,E.a)({},d),{},{items:(0,B.r)(R)}),(0,E.a)((0,E.a)({},x),{},{type:"next",hasNullItem:Jn}));return(0,E.a)((0,E.a)({},er),{},{items:R});case"down":var nr=ie&&!x.allTheWay,rr=verticalizeItems((0,B.f)(fillGroups((0,B.g)(R),K,nr))),ar=$&&"horizontal"!==$&&se,sr=reducer((0,E.a)((0,E.a)({},d),{},{orientation:"vertical",items:rr}),(0,E.a)((0,E.a)({},x),{},{type:"next",hasNullItem:ar}));return(0,E.a)((0,E.a)({},sr),{},{orientation:j,items:R});case"up":var cr=ie&&!x.allTheWay,hr=verticalizeItems((0,B.r)((0,B.f)(fillGroups((0,B.g)(R),K,cr)))),fr=se,dr=reducer((0,E.a)((0,E.a)({},d),{},{orientation:"vertical",items:hr}),(0,E.a)((0,E.a)({},x),{},{type:"next",hasNullItem:fr}));return(0,E.a)((0,E.a)({},dr),{},{orientation:j,items:R});case"first":var pr=(0,F.f)(R);return reducer(d,(0,E.a)((0,E.a)({},x),{},{type:"move",id:null==pr?void 0:pr.id}));case"last":var mr=reducer((0,E.a)((0,E.a)({},d),{},{items:(0,B.r)(R)}),(0,E.a)((0,E.a)({},x),{},{type:"first"}));return(0,E.a)((0,E.a)({},mr),{},{items:R});case"sort":return(0,E.a)((0,E.a)({},d),{},{items:sortBasedOnDOMPosition(R),groups:sortBasedOnDOMPosition(D)});case"setVirtual":return(0,E.a)((0,E.a)({},d),{},{unstable_virtual:applyState(x.virtual,M)});case"setRTL":return(0,E.a)((0,E.a)({},d),{},{rtl:applyState(x.rtl,C)});case"setOrientation":return(0,E.a)((0,E.a)({},d),{},{orientation:applyState(x.orientation,j)});case"setCurrentId":var vr=(0,F.g)((0,E.a)((0,E.a)({},d),{},{currentId:applyState(x.currentId,K)}));return(0,E.a)((0,E.a)({},d),{},{currentId:vr,hasSetCurrentId:!0});case"setLoop":return(0,E.a)((0,E.a)({},d),{},{loop:applyState(x.loop,$)});case"setWrap":return(0,E.a)((0,E.a)({},d),{},{wrap:applyState(x.wrap,Q)});case"setShift":return(0,E.a)((0,E.a)({},d),{},{shift:applyState(x.shift,ie)});case"setIncludesBaseElement":return(0,E.a)((0,E.a)({},d),{},{unstable_includesBaseElement:applyState(x.includesBaseElement,se)});case"reset":return(0,E.a)((0,E.a)({},d),{},{unstable_virtual:ue,rtl:ce,orientation:he,currentId:(0,F.g)((0,E.a)((0,E.a)({},d),{},{currentId:fe})),loop:de,wrap:pe,shift:me,unstable_moves:0,pastIds:[]});case"setItems":return(0,E.a)((0,E.a)({},d),{},{items:x.items});default:throw new Error}}function useAction(d){return(0,C.useCallback)(d,[])}function useCompositeState(d){void 0===d&&(d={});var x=(0,R.N)(d),M=x.unstable_virtual,D=void 0!==M&&M,B=x.rtl,F=void 0!==B&&B,q=x.orientation,V=x.currentId,W=x.loop,$=void 0!==W&&W,Q=x.wrap,Y=void 0!==Q&&Q,ie=x.shift,ae=void 0!==ie&&ie,se=x.unstable_includesBaseElement,ue=(0,E._)(x,["unstable_virtual","rtl","orientation","currentId","loop","wrap","shift","unstable_includesBaseElement"]),ce=(0,K.t)(ue),he=(0,C.useReducer)(reducer,{unstable_virtual:D,rtl:F,orientation:q,items:[],groups:[],currentId:V,loop:$,wrap:Y,shift:ae,unstable_moves:0,pastIds:[],unstable_includesBaseElement:null!=se?se:null===V,initialVirtual:D,initialRTL:F,initialOrientation:q,initialCurrentId:V,initialLoop:$,initialWrap:Y,initialShift:ae}),fe=he[0],de=(fe.pastIds,fe.initialVirtual,fe.initialRTL,fe.initialOrientation,fe.initialCurrentId,fe.initialLoop,fe.initialWrap,fe.initialShift,fe.hasSetCurrentId,(0,E._)(fe,["pastIds","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","initialShift","hasSetCurrentId"])),pe=he[1],me=(0,C.useState)(!1),ve=me[0],ge=me[1],ye=function useIsUnmountedRef(){var d=(0,C.useRef)(!1);return(0,j.o)((function(){return function(){d.current=!0}}),[]),d}(),be=(0,C.useCallback)((function(d){return pe({type:"setItems",items:d})}),[]);return useSortBasedOnDOMPosition(de.items,be),(0,E.a)((0,E.a)((0,E.a)({},ce),de),{},{unstable_hasActiveWidget:ve,unstable_setHasActiveWidget:ge,registerItem:useAction((function(d){ye.current||pe({type:"registerItem",item:d})})),unregisterItem:useAction((function(d){ye.current||pe({type:"unregisterItem",id:d})})),registerGroup:useAction((function(d){ye.current||pe({type:"registerGroup",group:d})})),unregisterGroup:useAction((function(d){ye.current||pe({type:"unregisterGroup",id:d})})),move:useAction((function(d){return pe({type:"move",id:d})})),next:useAction((function(d){return pe({type:"next",allTheWay:d})})),previous:useAction((function(d){return pe({type:"previous",allTheWay:d})})),up:useAction((function(d){return pe({type:"up",allTheWay:d})})),down:useAction((function(d){return pe({type:"down",allTheWay:d})})),first:useAction((function(){return pe({type:"first"})})),last:useAction((function(){return pe({type:"last"})})),sort:useAction((function(){return pe({type:"sort"})})),unstable_setVirtual:useAction((function(d){return pe({type:"setVirtual",virtual:d})})),setRTL:useAction((function(d){return pe({type:"setRTL",rtl:d})})),setOrientation:useAction((function(d){return pe({type:"setOrientation",orientation:d})})),setCurrentId:useAction((function(d){return pe({type:"setCurrentId",currentId:d})})),setLoop:useAction((function(d){return pe({type:"setLoop",loop:d})})),setWrap:useAction((function(d){return pe({type:"setWrap",wrap:d})})),setShift:useAction((function(d){return pe({type:"setShift",shift:d})})),unstable_setIncludesBaseElement:useAction((function(d){return pe({type:"setIncludesBaseElement",includesBaseElement:d})})),reset:useAction((function(){return pe({type:"reset"})}))})}},64458:(d,x,M)=>{"use strict";M.d(x,{l:()=>xe,s:()=>be});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=M(93839),F=(M(85148),M(6749)),q=M(30168),K=M(56912),V=M(73028);function useUpdateEffect(d,x){var M=(0,R.useRef)(!1);(0,R.useEffect)((function(){if(M.current)return d();M.current=!0}),x)}var W=M(36008),$=M(90522),Q=M(83874),Y=M(12354),ie=M(55119),ae=(M(75368),M(10842)),se=M(83675),ue=M(17781),ce=M(82897),he=M(40820),fe=M(69501),de=M(99806),pe=M(92375),me=M(71592);var ve=M(96233);function removeFromDOM(d){null!=d.parentNode&&d.parentNode.removeChild(d)}var ge="__reakit-focus-trap";function useFocusTrap(d,x,M){var E=function usePortalRef(d,x){var M=(0,R.useRef)(null);return(0,R.useEffect)((function(){var E=d.current;E&&x.visible&&(M.current=(0,he.k)(E,ae.Z.__selector))}),[d,x.visible]),M}(d,M),C=M.visible&&M.modal,j=(0,R.useRef)(null),D=(0,R.useRef)(null);(0,R.useEffect)((function(){if(C){var d=E.current;if(d){if(!j.current){var x=(0,$.Y)(d);j.current=x.createElement("div"),j.current.className=ge,j.current.tabIndex=0,j.current.style.position="fixed",j.current.setAttribute("aria-hidden","true")}return D.current||(D.current=j.current.cloneNode()),d.insertAdjacentElement("beforebegin",j.current),d.insertAdjacentElement("afterend",D.current),function(){j.current&&removeFromDOM(j.current),D.current&&removeFromDOM(D.current)}}}}),[E,C]),(0,R.useEffect)((function(){var M=j.current,E=D.current;if(C&&M&&E){var R=function handleFocus(M){var C=d.current;if(C&&!x.length){M.preventDefault();var j=M.target===E?(0,V.LC)(C):(0,V.BT)(C);j?j.focus():C.focus()}};return M.addEventListener("focus",R),E.addEventListener("focus",R),function(){M.removeEventListener("focus",R),E.removeEventListener("focus",R)}}}),[d,x,C])}function useFocusOnHide(d,x,M){var E=M.unstable_autoFocusOnHide&&!M.visible,C=!(!M.animated||!M.animating);useUpdateEffect((function(){var j;if(E&&!C&&!function hidByFocusingAnotherElement(d){var x=d.current;if(!x)return!1;var M=(0,fe.b)(x);return!(!M||(0,de.g)(x,M)||!(0,V.AO)(M)&&"true"!==M.getAttribute("data-dialog"))}(d)){var R=(null===(j=M.unstable_finalFocusRef)||void 0===j?void 0:j.current)||x.current;if(R){if(R.id){var D=(0,$.Y)(R).querySelector("[aria-activedescendant='"+R.id+"']");if(D)return void(0,Y.z)(D)}(0,Y.z)(R)}else;}}),[E,C,d,x])}var ye=(0,R.createContext)({});function useEventListenerOutside(d,x,M,E,C,j,D){var B=(0,F.h)(C);(0,R.useEffect)((function(){if(j){var C=function onEvent(E){if(B.current){var C=d.current,j=x.current,R=E.target;C&&function isInDocument(d){var x=(0,$.Y)(d);return"HTML"===d.tagName||(0,de.g)(x.body,d)}(R)&&((0,de.g)(C,R)||j&&function isDisclosure(d,x){return(0,de.g)(x,d)}(R,j)||function isFocusTrap(d){var x;return null===(x=d.classList)||void 0===x?void 0:x.contains(ge)}(R)||M.some(function dialogContains(d){return function(x){var M=x.current;if(!M)return!1;if((0,de.g)(M,d))return!0;var E=(0,$.Y)(M).querySelector('[data-dialog-ref="'+M.id+'"]');return!!E&&(0,de.g)(E,d)}}(R))||B.current(E))}},R=(0,$.Y)(d.current);return R.addEventListener(E,C,D),function(){return R.removeEventListener(E,C,D)}}}),[d,x,M,E,j,B])}function useHideOnClickOutside(d,x,M,E){var C=function useMouseDownRef(d,x){var M=(0,R.useRef)();return(0,R.useEffect)((function(){if(x.visible&&x.hideOnClickOutside){var E=(0,$.Y)(d.current),C=function onMouseDown(d){M.current=d.target};return E.addEventListener("mousedown",C),function(){return E.removeEventListener("mousedown",C)}}}),[x.visible,x.hideOnClickOutside,d]),M}(d,E);useEventListenerOutside(d,x,M,"click",(function(d){var x;C.current===d.target&&(null===(x=E.hide)||void 0===x||x.call(E))}),E.visible&&E.hideOnClickOutside),useEventListenerOutside(d,x,M,"focusin",(function(x){var M,C=(0,$.Y)(d.current);x.target!==C&&x.target!==C.body&&(null===(M=E.hide)||void 0===M||M.call(E))}),E.visible&&E.hideOnClickOutside)}function useFocusOnChildUnmount(d,x){(0,R.useEffect)((function(){var M=d.current;if(x.visible&&M){var E=new MutationObserver((function(d){if(d[0].target===M){var x=(0,$.Y)(M),E=(0,fe.b)(M);(E===x.body||function isEmpty(d){return Array.isArray(d)?!d.length:(0,me.G)(d)?!Object.keys(d).length:null==d||""===d}(E))&&M.focus()}}));return E.observe(M,{childList:!0,subtree:!0}),function(){E.disconnect()}}}),[x.visible,d])}function isActualElement(d){return d&&d.tagName&&"HTML"!==d.tagName&&d!==(0,$.Y)(d).body}var be=(0,j.a)({name:"Dialog",compose:ie.a,keys:ve.D,useOptions:function useOptions(d){var x=d.modal,M=void 0===x||x,C=d.hideOnEsc,j=void 0===C||C,R=d.hideOnClickOutside,D=void 0===R||R,B=d.preventBodyScroll,F=void 0===B?M:B,q=d.unstable_autoFocusOnShow,K=void 0===q||q,V=d.unstable_autoFocusOnHide,W=void 0===V||V,$=d.unstable_orphan,Q=(0,E._)(d,["modal","hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_autoFocusOnShow","unstable_autoFocusOnHide","unstable_orphan"]);return(0,E.a)({modal:M,hideOnEsc:j,hideOnClickOutside:D,preventBodyScroll:M&&F,unstable_autoFocusOnShow:K,unstable_autoFocusOnHide:W,unstable_orphan:M&&$},Q)},useProps:function useProps(d,x){var M=x.ref,C=x.onKeyDown,j=x.onBlur,W=x.wrapElement,ie=x.tabIndex,he=(0,E._)(x,["ref","onKeyDown","onBlur","wrapElement","tabIndex"]),de=(0,R.useRef)(null),me=(0,R.useContext)(pe.D),ve=me&&me===d.baseId,ge=function useDisclosureRef(d,x){var M=(0,R.useRef)(null),E=!(!x.animated||!x.animating);return(0,R.useEffect)((function(){if(!x.visible&&!E){var C=function onFocus(d){var E=d.target;"focus"in E&&(M.current=E,x.unstable_disclosureRef&&(x.unstable_disclosureRef.current=E))},j=(0,$.Y)(d.current);return j.addEventListener("focusin",C),function(){return j.removeEventListener("focusin",C)}}}),[x.visible,E,x.unstable_disclosureRef,d]),(0,R.useEffect)((function(){var d;if(x.visible&&!E){var C=function onMouseDown(d){var x=d.currentTarget;(0,B.B)(x)&&(d.preventDefault(),x.focus())},j=(null===(d=x.unstable_disclosureRef)||void 0===d?void 0:d.current)||M.current;return null==j||j.addEventListener("mousedown",C),function(){return null==j?void 0:j.removeEventListener("mousedown",C)}}}),[x.visible,E,x.unstable_disclosureRef]),x.unstable_disclosureRef||M}(de,d),be=(0,F.h)(C),xe=(0,F.h)(j),we=function useFocusOnBlur(d,x){var M=(0,R.useReducer)((function(d){return d+1}),0),E=M[0],C=M[1];return(0,q.o)((function(){var M=d.current;x.visible&&E&&(isActualElement((0,fe.b)(M))||null==M||M.focus())}),[E,d]),(0,R.useCallback)((function(d){x.visible&&(isActualElement((0,Q.m)(d))||C())}),[x.visible])}(de,d),Me=function useNestedDialogs(d,x){var M=(0,R.useContext)(ye),E=(0,R.useState)([]),C=E[0],j=E[1],D=(0,R.useState)(C),B=D[0],F=D[1],q=(0,R.useCallback)((function(d){var x;null===(x=M.addDialog)||void 0===x||x.call(M,d),j((function(x){return[].concat(x,[d])}))}),[M.addDialog]),K=(0,R.useCallback)((function(d){var x;null===(x=M.removeDialog)||void 0===x||x.call(M,d),j((function(x){return(0,se.B)(x,d)}))}),[M.removeDialog]),V=(0,R.useCallback)((function(d){var x;null===(x=M.showDialog)||void 0===x||x.call(M,d),F((function(x){return[].concat(x,[d])}))}),[M.showDialog]),W=(0,R.useCallback)((function(d){var x;null===(x=M.hideDialog)||void 0===x||x.call(M,d),F((function(x){return(0,se.B)(x,d)}))}),[M.hideDialog]);(0,R.useEffect)((function(){var E;if(!x.unstable_orphan)return null===(E=M.addDialog)||void 0===E||E.call(M,d),function(){var x;null===(x=M.removeDialog)||void 0===x||x.call(M,d)}}),[x.unstable_orphan,M.addDialog,d,M.removeDialog]),(0,R.useEffect)((function(){var E;if(!x.unstable_orphan&&x.modal&&x.visible)return null===(E=M.showDialog)||void 0===E||E.call(M,d),function(){var x;null===(x=M.hideDialog)||void 0===x||x.call(M,d)}}),[x.unstable_orphan,x.modal,x.visible,M.showDialog,d,M.hideDialog]),(0,R.useEffect)((function(){var d;!1===M.visible&&x.visible&&!x.unstable_orphan&&(null===(d=x.hide)||void 0===d||d.call(x))}),[M.visible,x.visible,x.hide,x.unstable_orphan]);var $=(0,R.useMemo)((function(){return{visible:x.visible,addDialog:q,removeDialog:K,showDialog:V,hideDialog:W}}),[x.visible,q,K,V,W]);return{dialogs:C,visibleModals:B,wrap:(0,R.useCallback)((function(d){return(0,R.createElement)(ye.Provider,{value:$},d)}),[$])}}(de,d),Ie=Me.dialogs,Re=Me.visibleModals,Be=Me.wrap,Fe=!(!d.modal||Re.length)||void 0;!function usePreventBodyScroll(d,x){var M=Boolean(x.preventBodyScroll&&x.visible);(0,R.useEffect)((function(){var x=d.current;if(x&&M)return(0,ce.mh)(x,{reserveScrollBarGap:!0}),function(){return(0,ce.fY)(x)}}),[d,M])}(de,d),useFocusTrap(de,Re,d),useFocusOnChildUnmount(de,d),function useFocusOnShow(d,x,M){var E=M.unstable_initialFocusRef,C=M.visible&&M.unstable_autoFocusOnShow,j=!(!M.animated||!M.animating);useUpdateEffect((function(){var M=d.current;if(C&&M&&!j&&!x.some((function(d){return d.current&&!d.current.hidden})))if(null!=E&&E.current)E.current.focus({preventScroll:!0});else{var R=(0,V.LC)(M,!0),D=function isActive(){return(0,K.o)(M)};R?(0,Y.z)(R,{preventScroll:!0,isActive:D}):(0,Y.z)(M,{preventScroll:!0,isActive:D})}}),[d,C,j,x,E])}(de,Ie,d),useFocusOnHide(de,ge,d),useHideOnClickOutside(de,ge,Ie,d),function useDisableHoverOutside(d,x,M){var E=function useEvent(E){return useEventListenerOutside(d,{current:null},x,E,(function(d){d.stopPropagation(),d.preventDefault()}),M.visible&&M.modal,!0)};E("mouseover"),E("mousemove"),E("mouseout")}(de,Ie,d);var qe=(0,R.useCallback)((function(x){var M;null===(M=be.current)||void 0===M||M.call(be,x),x.defaultPrevented||"Escape"===x.key&&d.hideOnEsc&&d.hide&&(x.stopPropagation(),d.hide())}),[d.hideOnEsc,d.hide]),He=(0,R.useCallback)((function(d){var x;null===(x=xe.current)||void 0===x||x.call(xe,d),we(d)}),[we]),Xe=(0,R.useCallback)((function(x){return x=Be(x),d.modal&&!ve&&(x=(0,R.createElement)(ae.Z,null,x)),W&&(x=W(x)),(0,R.createElement)(ue.M.Provider,{value:null},x)}),[Be,d.modal,ve,W]);return(0,E.a)({ref:(0,D.N)(de,M),role:"dialog",tabIndex:null!=ie?ie:-1,"aria-modal":Fe,"data-dialog":!0,onKeyDown:qe,onBlur:He,wrapElement:Xe},he)}}),xe=(0,C.a)({as:"div",useHook:be,useCreateElement:function useCreateElement$1(d,x,M){return(0,W.U)(d,x,M)}})},74496:(d,x,M)=>{"use strict";M.d(x,{X:()=>V});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(55119),B=(M(75368),M(10842)),F=M(92375),q=M(96233),K=(0,j.a)({name:"DialogBackdrop",compose:D.a,keys:q.a,useOptions:function useOptions(d){var x=d.modal,M=void 0===x||x,C=(0,E._)(d,["modal"]);return(0,E.a)({modal:M},C)},useProps:function useProps(d,x){var M=x.wrapElement,C=(0,E._)(x,["wrapElement"]),j=(0,R.useCallback)((function(x){return d.modal&&(x=(0,R.createElement)(B.Z,null,(0,R.createElement)(F.D.Provider,{value:d.baseId},x))),M?M(x):x}),[d.modal,M]);return(0,E.a)({id:void 0,"data-dialog-ref":d.baseId,wrapElement:j},C)}}),V=(0,C.a)({as:"div",memo:!0,useHook:K})},3341:(d,x,M)=>{"use strict";M.d(x,{p:()=>useDialogState});var E=M(11657),C=M(15993),j=(M(85148),M(25671)),R=M(62703);function useDialogState(d){void 0===d&&(d={});var x=(0,j.N)(d),M=x.modal,D=void 0===M||M,B=(0,E._)(x,["modal"]),F=(0,R.E)(B),q=(0,C.useState)(D),K=q[0],V=q[1],W=(0,C.useRef)(null);return(0,E.a)((0,E.a)({},F),{},{modal:K,setModal:V,unstable_disclosureRef:W})}},92375:(d,x,M)=>{"use strict";M.d(x,{D:()=>E});var E=(0,M(15993).createContext)(void 0)},1692:(d,x,M)=>{"use strict";M.d(x,{E:()=>K,j:()=>q});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=(M(85148),M(6749)),B=M(95726),F=M(40491),q=(0,j.a)({name:"Disclosure",compose:B.s,keys:F.D,useProps:function useProps(d,x){var M=x.onClick,C=x["aria-controls"],j=(0,E._)(x,["onClick","aria-controls"]),B=(0,D.h)(M),F=C?C+" "+d.baseId:d.baseId,q=(0,R.useCallback)((function(x){var M,E;null===(M=B.current)||void 0===M||M.call(B,x),x.defaultPrevented||null===(E=d.toggle)||void 0===E||E.call(d)}),[d.toggle]);return(0,E.a)({"aria-expanded":!!d.visible,"aria-controls":F,onClick:q},j)}}),K=(0,C.a)({as:"button",memo:!0,useHook:q})},55119:(d,x,M)=>{"use strict";M.d(x,{L:()=>V,a:()=>K});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(6749),B=M(87124),F=M(40786),q=M(40491),K=(0,j.a)({name:"DisclosureContent",compose:F.I,keys:q.a,useProps:function useProps(d,x){var M=x.onTransitionEnd,C=x.onAnimationEnd,j=x.style,F=(0,E._)(x,["onTransitionEnd","onAnimationEnd","style"]),q=d.animated&&d.animating,K=(0,R.useState)(null),V=K[0],W=K[1],$=!d.visible&&!q,Q=$?(0,E.a)({display:"none"},j):j,Y=(0,D.h)(M),ie=(0,D.h)(C),ae=(0,R.useRef)(0);(0,R.useEffect)((function(){if(d.animated)return ae.current=window.requestAnimationFrame((function(){ae.current=window.requestAnimationFrame((function(){d.visible?W("enter"):W(q?"leave":null)}))})),function(){return window.cancelAnimationFrame(ae.current)}}),[d.animated,d.visible,q]);var se=(0,R.useCallback)((function(x){var M;(0,B.u)(x)&&(q&&!0===d.animated&&(null===(M=d.stopAnimation)||void 0===M||M.call(d)))}),[d.animated,q,d.stopAnimation]),ue=(0,R.useCallback)((function(d){var x;null===(x=Y.current)||void 0===x||x.call(Y,d),se(d)}),[se]),ce=(0,R.useCallback)((function(d){var x;null===(x=ie.current)||void 0===x||x.call(ie,d),se(d)}),[se]);return(0,E.a)({id:d.baseId,"data-enter":"enter"===V?"":void 0,"data-leave":"leave"===V?"":void 0,onTransitionEnd:ue,onAnimationEnd:ce,hidden:$,style:Q},F)}}),V=(0,C.a)({as:"div",useHook:K})},62703:(d,x,M)=>{"use strict";M.d(x,{E:()=>useDisclosureState});var E=M(11657),C=M(15993),j=(M(85148),M(30168)),R=M(25671),D=M(16459);function useDisclosureState(d){void 0===d&&(d={});var x=(0,R.N)(d),M=x.visible,B=void 0!==M&&M,F=x.animated,q=void 0!==F&&F,K=(0,E._)(x,["visible","animated"]),V=(0,D.t)(K),W=(0,C.useState)(B),$=W[0],Q=W[1],Y=(0,C.useState)(q),ie=Y[0],ae=Y[1],se=(0,C.useState)(!1),ue=se[0],ce=se[1],he=function useLastValue(d){var x=(0,C.useRef)(null);return(0,j.o)((function(){x.current=d}),[d]),x}($),fe=null!=he.current&&he.current!==$;ie&&!ue&&fe&&ce(!0),(0,C.useEffect)((function(){if("number"==typeof ie&&ue){var d=setTimeout((function(){return ce(!1)}),ie);return function(){clearTimeout(d)}}return function(){}}),[ie,ue]);var de=(0,C.useCallback)((function(){return Q(!0)}),[]),pe=(0,C.useCallback)((function(){return Q(!1)}),[]),me=(0,C.useCallback)((function(){return Q((function(d){return!d}))}),[]),ve=(0,C.useCallback)((function(){return ce(!1)}),[]);return(0,E.a)((0,E.a)({},V),{},{visible:$,animated:ie,animating:ue,show:de,hide:pe,toggle:me,setVisible:Q,setAnimated:ae,stopAnimation:ve})}},97e3:(d,x,M)=>{"use strict";M.d(x,{W:()=>F});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(30757),B=[].concat(["baseId","unstable_idCountRef","setBaseId"],["id"]),F=(0,j.a)({keys:B,useOptions:function useOptions(d,x){var M=(0,R.useContext)(D.M),C=(0,R.useState)((function(){return d.unstable_idCountRef?(d.unstable_idCountRef.current+=1,"-"+d.unstable_idCountRef.current):d.baseId?"-"+M(""):""}))[0],j=(0,R.useMemo)((function(){return d.baseId||M()}),[d.baseId,M]),B=x.id||d.id||""+j+C;return(0,E.a)((0,E.a)({},d),{},{id:B})},useProps:function useProps(d,x){return(0,E.a)({id:d.id},x)}});(0,C.a)({as:"div",useHook:F})},30757:(d,x,M)=>{"use strict";M.d(x,{M:()=>C});var E=M(15993);function generateRandomString(d){return void 0===d&&(d="id"),(d?d+"-":"")+Math.random().toString(32).substr(2,6)}var C=(0,E.createContext)(generateRandomString)},16459:(d,x,M)=>{"use strict";M.d(x,{t:()=>unstable_useIdState});var E=M(15993),C=M(25671),j=M(30757);function unstable_useIdState(d){void 0===d&&(d={});var x=(0,C.N)(d).baseId,M=(0,E.useContext)(j.M),R=(0,E.useRef)(0),D=(0,E.useState)((function(){return x||M()}));return{baseId:D[0],setBaseId:D[1],unstable_idCountRef:R}}},52583:(d,x,M)=>{"use strict";M.d(x,{W:()=>ue});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=(M(85148),M(6749)),B=M(50473),F=M(36008),q=(M(75368),M(17781)),K=(M(82897),M(37651)),V=M(64458),W=M(72297),$=(0,j.a)({name:"Popover",compose:V.s,keys:W.P,useOptions:function useOptions(d){var x=d.modal,M=void 0!==x&&x,C=(0,E._)(d,["modal"]);return(0,E.a)({modal:M},C)},useProps:function useProps(d,x){var M=x.ref,C=x.style,j=(0,E._)(x,["ref","style"]);return(0,E.a)({ref:(0,K.N)(d.unstable_popoverRef,M),style:(0,E.a)((0,E.a)({},d.unstable_popoverStyles),C)},j)}}),Q=((0,C.a)({as:"div",useHook:$,useCreateElement:function useCreateElement$1(d,x,M){return(0,F.U)(d,x,M)}}),M(99428)),Y=M(40820),ie=M(65638);var ae=(0,j.a)({name:"MenuBar",compose:Q.T,keys:ie.b,useProps:function useProps(d,x){var M=x.ref,C=x.wrapElement,j=x.role,D=void 0===j?"menubar":j,B=(0,E._)(x,["ref","wrapElement","role"]),F=(0,R.useRef)(null),V=(0,q.u)(F,D,d);!function useShortcuts(d,x,M){var E=x.items,C=void 0===E?[]:E,j=x.move;void 0===M&&(M=500);var D=(0,R.useState)(""),B=D[0],F=D[1];(0,R.useEffect)((function(){if(B){var d=setTimeout((function(){return F("")}),M),x=C.find((function(d){return Boolean(d.ref.current&&d.ref.current.textContent&&d.ref.current.textContent.toLowerCase().startsWith(B))}));return x&&j(x.id),function(){return clearTimeout(d)}}}),[B,C,j,M]),(0,R.useEffect)((function(){var x=d.current;if(x){var M=function onKeyDown(d){var M;if(!(d.key.length>1||d.shiftKey||d.metaKey||d.ctrlKey||d.altKey)){var E=d.target,C=null===(M=E.getAttribute)||void 0===M?void 0:M.call(E,"role"),j=E===x,R=C&&-1!==C.indexOf("menuitem")&&(0,Y.k)(E,"[role=menu],[role=menubar]")===x;(j||R)&&/^[a-z0-9_-]$/i.test(d.key)&&(d.stopPropagation(),d.preventDefault(),F((function(x){return""+x+d.key})))}};return x.addEventListener("keydown",M),function(){return x.removeEventListener("keydown",M)}}}),[d,F])}(F,d);var W=(0,R.useCallback)((function(d){return d=V(d),C?C(d):d}),[V,C]);return(0,E.a)({ref:(0,K.N)(F,M),role:D,"aria-orientation":d.orientation,wrapElement:W},B)}});(0,C.a)({as:"div",useHook:ae,useCreateElement:function useCreateElement$1(d,x,M){return(0,F.U)(d,x,M)}});var se=(0,j.a)({name:"Menu",compose:[ae,$],keys:ie.M,useOptions:function useOptions(d){var x=(0,R.useContext)(q.M),M="menubar"===(null==x?void 0:x.role);return(0,E.a)((0,E.a)({unstable_autoFocusOnHide:!M,modal:!1},d),{},{unstable_autoFocusOnShow:!1,hideOnEsc:!1})},useProps:function useProps(d,x){for(var M=x.onKeyDown,C=(0,E._)(x,["onKeyDown"]),j=(0,D.h)(M),F=(0,R.useContext)(q.M),K=!!F,V=F;V&&"menubar"!==V.role;)V=V.parent;var W=V||{},$=W.next,Q=W.previous,Y="horizontal"===W.orientation,ie=function usePlacementDir(d){return(0,R.useMemo)((function(){var x;return null==d||null===(x=d.split("-"))||void 0===x?void 0:x[0]}),[d])}(d.placement),ae=(0,R.useCallback)((function(x){var M,E;if(null===(M=j.current)||void 0===M||M.call(j,x),!x.defaultPrevented)if("Escape"===x.key)K||x.stopPropagation(),null===(E=d.hide)||void 0===E||E.call(d);else if(K&&!(0,B.h)(x)){var C={ArrowRight:Y&&"left"!==ie?$:"left"===ie&&d.hide,ArrowLeft:Y&&"right"!==ie?Q:"right"===ie&&d.hide}[x.key];C&&(x.preventDefault(),K&&x.stopPropagation(),C())}}),[K,Y,$,Q,ie,d.hide]);return(0,E.a)({role:"menu",onKeyDown:ae},C)}}),ue=(0,C.a)({as:"div",useHook:se,useCreateElement:function useCreateElement$1(d,x,M){return(0,F.U)(d,x,M)}})},76824:(d,x,M)=>{"use strict";M.d(x,{I:()=>ce});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=(M(85148),M(6749)),F=M(56912),q=M(17781),K=M(65638),V=M(72297),W=M(30168),$=M(96233),Q=M(1692),Y=(0,j.a)({name:"DialogDisclosure",compose:Q.j,keys:$.b,useProps:function useProps(d,x){var M=x.ref,C=x.onClick,j=(0,E._)(x,["ref","onClick"]),F=(0,R.useRef)(null),q=(0,B.h)(C),K=(0,R.useState)(!1),V=K[0],$=K[1],Q=d.unstable_disclosureRef;(0,W.o)((function(){var x=F.current;Q&&!Q.current&&(Q.current=x);var M=!(null!=Q&&Q.current)||Q.current===x;$(!!d.visible&&M)}),[d.visible,Q]);var Y=(0,R.useCallback)((function(d){var x;null===(x=q.current)||void 0===x||x.call(q,d),d.defaultPrevented||Q&&(Q.current=d.currentTarget)}),[Q]);return(0,E.a)({ref:(0,D.N)(F,M),"aria-haspopup":"dialog","aria-expanded":V,onClick:Y},j)}}),ie=((0,C.a)({as:"button",memo:!0,useHook:Y}),(0,j.a)({name:"PopoverDisclosure",compose:Y,keys:V.c,useProps:function useProps(d,x){var M=x.ref,C=(0,E._)(x,["ref"]);return(0,E.a)({ref:(0,D.N)(d.unstable_referenceRef,M)},C)}})),ae=((0,C.a)({as:"button",memo:!0,useHook:ie}),M(76735)),se=function noop(){},ue=(0,j.a)({name:"MenuButton",compose:ie,keys:K.c,propsAreEqual:function propsAreEqual(d,x){d.unstable_popoverStyles,d.unstable_arrowStyles,d.currentId,d.unstable_moves;var M=(0,E._)(d,["unstable_popoverStyles","unstable_arrowStyles","currentId","unstable_moves"]),C=(x.unstable_popoverStyles,x.unstable_arrowStyles,x.currentId,x.unstable_moves,(0,E._)(x,["unstable_popoverStyles","unstable_arrowStyles","currentId","unstable_moves"]));return ie.unstable_propsAreEqual(M,C)},useProps:function useProps(d,x){var M=x.ref,C=x.onClick,j=x.onKeyDown,K=x.onFocus,V=x.onMouseEnter,W=x.onMouseDown,$=(0,E._)(x,["ref","onClick","onKeyDown","onFocus","onMouseEnter","onMouseDown"]),Q=(0,R.useContext)(q.M),Y=(0,R.useRef)(null),ie=(0,R.useRef)(!1),se=d.placement.split("-")[0],ue=!!Q,ce="menubar"===(null==Q?void 0:Q.role),he=d.disabled||$["aria-disabled"],fe=(0,B.h)(C),de=(0,B.h)(j),pe=(0,B.h)(K),me=(0,B.h)(V),ve=(0,B.h)(W),ge=(0,R.useCallback)((function(x){var M,E;if("Escape"===x.key)null===(E=d.hide)||void 0===E||E.call(d);else if(!he){var C,j=d.first&&function(){return setTimeout(d.first)},R=d.last&&function(){return setTimeout(d.last)},D={Enter:j," ":j,ArrowUp:("top"===se||"bottom"===se)&&R,ArrowRight:"right"===se&&j,ArrowDown:("bottom"===se||"top"===se)&&j,ArrowLeft:"left"===se&&j}[x.key];if(D)return x.preventDefault(),x.stopPropagation(),null===(C=d.show)||void 0===C||C.call(d),void D()}null===(M=de.current)||void 0===M||M.call(de,x)}),[he,d.hide,d.first,d.last,se,d.show]),ye=(0,R.useCallback)((function(x){var M;if(null===(M=me.current)||void 0===M||M.call(me,x),!x.defaultPrevented&&Q){var E=x.currentTarget;ce?(0,ae.f)(Q.children)&&E.focus():setTimeout((function(){var x;(0,F.o)(E)&&(null===(x=d.show)||void 0===x||x.call(d))}),200)}}),[Q,ce,d.show]),be=(0,R.useCallback)((function(d){var x;ie.current=!0,null===(x=ve.current)||void 0===x||x.call(ve,d)}),[]),xe=(0,R.useCallback)((function(x){var M,E;(null===(M=pe.current)||void 0===M||M.call(pe,x),x.defaultPrevented)||(he||ce&&!ie.current&&(null===(E=d.show)||void 0===E||E.call(d)))}),[ce,he,d.show]),we=(0,R.useCallback)((function(x){var M;if(null===(M=fe.current)||void 0===M||M.call(fe,x),!x.defaultPrevented){var E,C,j;if(ue&&!ce)null===(E=d.show)||void 0===E||E.call(d);else if(null===(C=d.toggle)||void 0===C||C.call(d),ie.current&&!ce&&!d.visible)null===(j=d.move)||void 0===j||j.call(d,null);ie.current=!1}}),[ue,ce,d.show,d.toggle,d.visible,d.move]);return(0,E.a)({ref:(0,D.N)(Y,M),"aria-haspopup":"menu",onKeyDown:ge,onMouseEnter:ye,onMouseDown:be,onFocus:xe,onClick:we},$)},useComposeOptions:function useComposeOptions(d){return(0,E.a)((0,E.a)({},d),{},{toggle:se})}}),ce=(0,C.a)({as:"button",memo:!0,useHook:ue})},7687:(d,x,M)=>{"use strict";M.d(x,{D:()=>Q,O:()=>$});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=(M(85148),M(6749)),B=M(56912),F=M(24469),q=M(17781),K=M(99806),V=M(65638),W=M(76735);function getTriangleArea(d,x,M){return Math.abs((d.x*(x.y-M.y)+x.x*(M.y-d.y)+M.x*(d.y-x.y))/2)}function useTransitToSubmenu(d,x){var M=(0,D.h)(x),E=(0,R.useRef)(null),C=(0,R.useRef)(null),j=(0,R.useRef)(null),B=(0,R.useRef)(0),F=(0,R.useRef)(0),q=(0,R.useCallback)((function(x){if(null!=d&&d.children.length){C.current=null,j.current=null;var M=(0,W.f)(d.children);if(M){var E=function getSubmenuAnchorPoints(d,x){var M=x.getBoundingClientRect(),E=M.top,C=M.right,j=M.bottom,R=M.left,D=R>d.clientX?R:C;return[{x:D,y:E},{x:D,y:j}]}(x,M);C.current=E[0],j.current=E[1]}}}),[null==d?void 0:d.children]),K=(0,R.useCallback)((function(d){var x=B.current!==d.clientX||F.current!==d.clientY;if(d.isTrusted&&!x)return!0;var M=Math.abs(B.current-d.clientX);B.current=d.clientX,F.current=d.clientY;var R=function hasAnchorPoints(){return C.current&&j.current};return"mouseleave"!==d.type||R()||q(d),!!R()&&(M&&E.current&&function isPointInTriangle(d,x,M,E){return getTriangleArea(x,M,E)===getTriangleArea(d,M,E)+getTriangleArea(x,d,E)+getTriangleArea(x,M,d)}({x:d.clientX,y:d.clientY},E.current,C.current,j.current))}),[q]);return{onMouseEnter:(0,R.useCallback)((function(x){var C;null===(C=M.current)||void 0===C||C.call(M,x),x.defaultPrevented||"menubar"!==(null==d?void 0:d.role)&&(E.current={x:x.clientX,y:x.clientY},q(x))}),[null==d?void 0:d.role,q]),isMouseInTransitToSubmenu:K}}function getMouseDestination(d){var x=d.relatedTarget;return(null==x?void 0:x.nodeType)===Node.ELEMENT_NODE?d.relatedTarget:d.toElement||null}var $=(0,j.a)({name:"MenuItem",compose:F.k,keys:V.e,propsAreEqual:function propsAreEqual(d,x){d.unstable_popoverStyles,d.unstable_arrowStyles,d.visible;var M=(0,E._)(d,["unstable_popoverStyles","unstable_arrowStyles","visible"]),C=(x.unstable_popoverStyles,x.unstable_arrowStyles,x.visible,(0,E._)(x,["unstable_popoverStyles","unstable_arrowStyles","visible"]));return F.k.unstable_propsAreEqual(M,C)},useProps:function useProps(d,x){var M=x.onMouseEnter,C=x.onMouseMove,j=x.onMouseLeave,F=(0,E._)(x,["onMouseEnter","onMouseMove","onMouseLeave"]),V=(0,R.useContext)(q.M),$=(0,D.h)(C),Q=(0,D.h)(j),Y=useTransitToSubmenu(V,M),ie=Y.onMouseEnter,ae=Y.isMouseInTransitToSubmenu,se=(0,R.useCallback)((function(x){var M,E;null===(M=$.current)||void 0===M||M.call($,x),x.defaultPrevented||"menubar"!==(null==V?void 0:V.role)&&(ae(x)||(0,B.o)(x.currentTarget)||null===(E=d.move)||void 0===E||E.call(d,x.currentTarget.id))}),[d.move]),ue=(0,R.useCallback)((function(x){var M;if(null===(M=Q.current)||void 0===M||M.call(Q,x),!(x.defaultPrevented||"menubar"===(null==V?void 0:V.role)||function hoveringInside(d){var x=getMouseDestination(d);return!!x&&(0,K.g)(d.currentTarget,x)}(x)||function hoveringExpandedMenu(d,x){if(null==x||!x.length)return!1;var M=getMouseDestination(d);if(!M)return!1;var E=(0,W.f)(x);return E&&(0,K.g)(E,M)}(x,null==V?void 0:V.children)||function hoveringAnotherMenuItem(d,x){var M=getMouseDestination(d);return!!M&&(null==x?void 0:x.some((function(d){return d.ref.current&&(0,K.g)(d.ref.current,M)})))}(x,d.items))){var E;if(ae(x))return;null===(E=d.move)||void 0===E||E.call(d,null)}}),[null==V?void 0:V.role,null==V?void 0:V.children,d.items,d.move]);return(0,E.a)({role:"menuitem",onMouseEnter:ie,onMouseMove:se,onMouseLeave:ue},F)}}),Q=(0,C.a)({as:"button",memo:!0,useHook:$})},80507:(d,x,M)=>{"use strict";M.d(x,{K:()=>ie});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=(M(85148),M(37651)),B=M(6749),F=M(88720),q=M(73734),K=M(90479),V=[].concat(["state","setState"],["value","checked"]);function getChecked(d){return void 0!==d.checked?d.checked:void 0===d.value?!!d.state:-1!==(Array.isArray(d.state)?d.state:[]).indexOf(d.value)}var W=(0,j.a)({name:"Checkbox",compose:F.I,keys:V,useOptions:function useOptions(d,x){var M=x.value,C=x.checked,j=d.unstable_clickOnEnter,R=void 0!==j&&j,D=(0,E._)(d,["unstable_clickOnEnter"]);return(0,E.a)({unstable_clickOnEnter:R,value:M,checked:getChecked((0,E.a)({checked:C},D))},D)},useProps:function useProps(d,x){var M=x.ref,C=x.onChange,j=x.onClick,F=(0,E._)(x,["ref","onChange","onClick"]),V=(0,R.useRef)(null),W=(0,R.useState)(!0),$=W[0],Q=W[1],Y=(0,B.h)(C),ie=(0,B.h)(j);(0,R.useEffect)((function(){var d=V.current;d&&("INPUT"===d.tagName&&"checkbox"===d.type||Q(!1))}),[]),function useIndeterminateState(d,x){(0,R.useEffect)((function(){var M=d.current;M&&("indeterminate"===x.state?M.indeterminate=!0:M.indeterminate&&(M.indeterminate=!1))}),[x.state,d])}(V,d);var ae=(0,R.useCallback)((function(x){var M=x.currentTarget;if(d.disabled)return x.stopPropagation(),void x.preventDefault();if(Y.current&&($||(M.checked=!M.checked),Y.current(x)),d.setState)if(void 0===d.value)d.setState(!d.checked);else{var E=Array.isArray(d.state)?d.state:[],C=E.indexOf(d.value);-1===C?d.setState([].concat(E,[d.value])):d.setState((0,q.w)(E,C))}}),[d.disabled,$,d.setState,d.value,d.checked,d.state]),se=(0,R.useCallback)((function(d){var x;null===(x=ie.current)||void 0===x||x.call(ie,d),d.defaultPrevented||$||function fireChange(d,x){var M=(0,K.l)(d,"change");Object.defineProperties(M,{type:{value:"change"},target:{value:d},currentTarget:{value:d}}),null==x||x(M)}(d.currentTarget,ae)}),[$,ae]);return(0,E.a)({ref:(0,D.N)(V,M),role:$?void 0:"checkbox",type:$?"checkbox":void 0,value:$?d.value:void 0,checked:d.checked,"aria-checked":"indeterminate"===d.state?"mixed":d.checked,onChange:ae,onClick:se},F)}}),$=((0,C.a)({as:"input",memo:!0,useHook:W}),M(65638)),Q=M(7687),Y=(0,j.a)({name:"MenuItemCheckbox",compose:[Q.O,W],keys:$.f,propsAreEqual:function propsAreEqual(d,x){if(d.name!==x.name)return Q.O.unstable_propsAreEqual(d,x);var M=d.unstable_values,C=(0,E._)(d,["unstable_values"]),j=x.unstable_values,R=(0,E._)(x,["unstable_values"]);return M[x.name]===j[x.name]&&Q.O.unstable_propsAreEqual(C,R)},useOptions:function useOptions(d){var x=(0,R.useCallback)((function(x){return d.unstable_setValue(d.name,x)}),[d.unstable_setValue,d.name]);return(0,E.a)((0,E.a)({},d),{},{state:d.unstable_values[d.name],setState:x})},useProps:function useProps(d,x){return(0,E.a)({role:"menuitemcheckbox",name:d.name},x)}}),ie=(0,C.a)({as:"button",memo:!0,useHook:Y})},37801:(d,x,M)=>{"use strict";M.d(x,{s:()=>ie});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=(M(85148),M(37651)),B=M(6749),F=M(90479),q=M(24469),K=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","state","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","setState"],V=[].concat(K,["value","checked","unstable_checkOnFocus"]);function getChecked(d){return void 0!==d.checked?d.checked:void 0!==d.value&&d.state===d.value}function fireChange(d,x){var M=(0,F.l)(d,"change");Object.defineProperties(M,{type:{value:"change"},target:{value:d},currentTarget:{value:d}}),null==x||x(M)}var W=(0,j.a)({name:"Radio",compose:q.k,keys:V,useOptions:function useOptions(d,x){var M,C=x.value,j=x.checked,R=d.unstable_clickOnEnter,D=void 0!==R&&R,B=d.unstable_checkOnFocus,F=void 0===B||B,q=(0,E._)(d,["unstable_clickOnEnter","unstable_checkOnFocus"]);return(0,E.a)((0,E.a)({checked:j,unstable_clickOnEnter:D,unstable_checkOnFocus:F},q),{},{value:null!=(M=q.value)?M:C})},useProps:function useProps(d,x){var M=x.ref,C=x.onChange,j=x.onClick,F=(0,E._)(x,["ref","onChange","onClick"]),q=(0,R.useRef)(null),K=(0,R.useState)(!0),V=K[0],W=K[1],$=getChecked(d),Q=(0,B.h)(d.currentId===d.id),Y=(0,B.h)(C),ie=(0,B.h)(j);!function useInitialChecked(d){var x=(0,R.useState)((function(){return getChecked(d)}))[0],M=(0,R.useState)(d.currentId)[0],E=d.id,C=d.setCurrentId;(0,R.useEffect)((function(){x&&E&&M!==E&&(null==C||C(E))}),[x,E,C,M])}(d),(0,R.useEffect)((function(){var d=q.current;d&&("INPUT"===d.tagName&&"radio"===d.type||W(!1))}),[]);var ae=(0,R.useCallback)((function(x){var M,E;null===(M=Y.current)||void 0===M||M.call(Y,x),x.defaultPrevented||d.disabled||null===(E=d.setState)||void 0===E||E.call(d,d.value)}),[d.disabled,d.setState,d.value]),se=(0,R.useCallback)((function(d){var x;null===(x=ie.current)||void 0===x||x.call(ie,d),d.defaultPrevented||V||fireChange(d.currentTarget,ae)}),[ae,V]);return(0,R.useEffect)((function(){var x=q.current;x&&d.unstable_moves&&Q.current&&d.unstable_checkOnFocus&&fireChange(x,ae)}),[d.unstable_moves,d.unstable_checkOnFocus,ae]),(0,E.a)({ref:(0,D.N)(q,M),role:V?void 0:"radio",type:V?"radio":void 0,value:V?d.value:void 0,name:V?d.baseId:void 0,"aria-checked":$,checked:$,onChange:ae,onClick:se},F)}}),$=((0,C.a)({as:"input",memo:!0,useHook:W}),M(65638)),Q=M(7687),Y=(0,j.a)({name:"MenuItemRadio",compose:[Q.O,W],keys:$.g,propsAreEqual:function propsAreEqual(d,x){if(d.name!==x.name)return Q.O.unstable_propsAreEqual(d,x);var M=d.unstable_values,C=(0,E._)(d,["unstable_values"]),j=x.unstable_values,R=(0,E._)(x,["unstable_values"]);return M[x.name]===j[x.name]&&Q.O.unstable_propsAreEqual(C,R)},useOptions:function useOptions(d){var x=(0,R.useCallback)((function(x){return d.unstable_setValue(d.name,x)}),[d.unstable_setValue,d.name]);return(0,E.a)((0,E.a)({},d),{},{unstable_checkOnFocus:!1,state:d.unstable_values[d.name],setState:x})},useProps:function useProps(d,x){return(0,E.a)({role:"menuitemradio"},x)}}),ie=(0,C.a)({as:"button",memo:!0,useHook:Y})},49670:(d,x,M)=>{"use strict";M.d(x,{b:()=>q});var E=M(11657),C=M(26762),j=M(75341),R=M(65638),D=M(40786),B=(0,j.a)({name:"Separator",compose:D.I,keys:["orientation"],useOptions:function useOptions(d){var x=d.orientation,M=void 0===x?"horizontal":x,C=(0,E._)(d,["orientation"]);return(0,E.a)({orientation:M},C)},useProps:function useProps(d,x){return(0,E.a)({role:"separator","aria-orientation":d.orientation},x)}}),F=((0,C.a)({as:"hr",memo:!0,useHook:B}),(0,j.a)({name:"MenuSeparator",compose:B,keys:R.h,useOptions:function useOptions(d){var x=d.orientation,M=void 0===x?"vertical":x,C=(0,E._)(d,["orientation"]);return(0,E.a)({orientation:"vertical"===M?"horizontal":"vertical"},C)}})),q=(0,C.a)({as:"hr",memo:!0,useHook:F})},51579:(d,x,M)=>{"use strict";M.d(x,{E:()=>useMenuState});var E=M(11657),C=M(15993),j=(M(85148),M(25671)),R=M(68799),D=M(30168),B=M(4943),F=M(29407),q=M(3341),K=(0,B.p)("Mac")&&!(0,B.p)("Chrome")&&(0,B.p)("Safari");function applyStyles(d){return function(x){return d&&!(0,R.b)(x,d)?d:x}}var V=M(17781),W=M(74839);function useMenuState(d){void 0===d&&(d={});var x=(0,C.useContext)(V.M),M=(0,j.N)(d),R=M.orientation,B=void 0===R?"vertical":R,$=M.gutter,Q=void 0===$?0:$,Y=(0,E._)(M,["orientation","gutter"]),ie=Y.placement||(x&&"vertical"===x.orientation?"right-start":"bottom-start"),ae=function useMenuBarState(d){void 0===d&&(d={});var x=(0,j.N)(d),M=x.orientation,R=void 0===M?"horizontal":M,D=x.unstable_values,B=void 0===D?{}:D,F=(0,E._)(x,["orientation","unstable_values"]),q=(0,C.useState)(B),K=q[0],V=q[1],$=(0,W.A)((0,E.a)((0,E.a)({},F),{},{orientation:R}));return(0,E.a)((0,E.a)({},$),{},{unstable_values:K,unstable_setValue:(0,C.useCallback)((function(d,x){V((function(M){var C;return(0,E.a)((0,E.a)({},M),{},((C={})[d]="function"==typeof x?x(M):x,C))}))}),[])})}((0,E.a)((0,E.a)({},Y),{},{orientation:B})),se=function usePopoverState(d){void 0===d&&(d={});var x=(0,j.N)(d),M=x.gutter,R=void 0===M?12:M,B=x.placement,V=void 0===B?"bottom":B,W=x.unstable_flip,$=void 0===W||W,Q=x.unstable_offset,Y=x.unstable_preventOverflow,ie=void 0===Y||Y,ae=x.unstable_fixed,se=void 0!==ae&&ae,ue=x.modal,ce=void 0!==ue&&ue,he=(0,E._)(x,["gutter","placement","unstable_flip","unstable_offset","unstable_preventOverflow","unstable_fixed","modal"]),fe=(0,C.useRef)(null),de=(0,C.useRef)(null),pe=(0,C.useRef)(null),me=(0,C.useRef)(null),ve=(0,C.useState)(V),ge=ve[0],ye=ve[1],be=(0,C.useState)(V),xe=be[0],we=be[1],Me=(0,C.useState)(Q||[0,R])[0],Ie=(0,C.useState)({position:"fixed",left:"100%",top:"100%"}),Re=Ie[0],Be=Ie[1],Fe=(0,C.useState)({}),qe=Fe[0],He=Fe[1],Xe=(0,q.p)((0,E.a)({modal:ce},he)),Ze=(0,C.useCallback)((function(){return!!fe.current&&(fe.current.forceUpdate(),!0)}),[]),Je=(0,C.useCallback)((function(d){d.placement&&we(d.placement),d.styles&&(Be(applyStyles(d.styles.popper)),me.current&&He(applyStyles(d.styles.arrow)))}),[]);return(0,D.o)((function(){return de.current&&pe.current&&(fe.current=(0,F.n4)(de.current,pe.current,{placement:ge,strategy:se?"fixed":"absolute",onFirstUpdate:K?Je:void 0,modifiers:[{name:"eventListeners",enabled:Xe.visible},{name:"applyStyles",enabled:!1},{name:"flip",enabled:$,options:{padding:8}},{name:"offset",options:{offset:Me}},{name:"preventOverflow",enabled:ie,options:{tetherOffset:function tetherOffset(){var d;return(null===(d=me.current)||void 0===d?void 0:d.clientWidth)||0}}},{name:"arrow",enabled:!!me.current,options:{element:me.current}},{name:"updateState",phase:"write",requires:["computeStyles"],enabled:Xe.visible&&!0,fn:function fn(d){var x=d.state;return Je(x)}}]})),function(){fe.current&&(fe.current.destroy(),fe.current=null)}}),[ge,se,Xe.visible,$,Me,ie]),(0,C.useEffect)((function(){if(Xe.visible){var d=window.requestAnimationFrame((function(){var d;null===(d=fe.current)||void 0===d||d.forceUpdate()}));return function(){window.cancelAnimationFrame(d)}}}),[Xe.visible]),(0,E.a)((0,E.a)({},Xe),{},{unstable_referenceRef:de,unstable_popoverRef:pe,unstable_arrowRef:me,unstable_popoverStyles:Re,unstable_arrowStyles:qe,unstable_update:Ze,unstable_originalPlacement:ge,placement:xe,place:ye})}((0,E.a)((0,E.a)({},Y),{},{placement:ie,gutter:Q}));return(0,C.useEffect)((function(){se.visible||ae.reset()}),[se.visible,ae.reset]),(0,E.a)((0,E.a)({},ae),se)}},17781:(d,x,M)=>{"use strict";M.d(x,{M:()=>j,u:()=>useMenuContext});var E=M(15993),C=M(83675),j=(0,E.createContext)(null);function useMenuContext(d,x,M){var R="unstable_orphan"in M&&M.unstable_orphan,D=(0,E.useContext)(j),B=(0,E.useState)([]),F=B[0],q=B[1],K=D||{},V=K.addChild,W=K.removeChild,$=(0,E.useCallback)((function(d){return q((function(x){return[].concat(x,[d])}))}),[]),Q=(0,E.useCallback)((function(d){return q((function(x){return(0,C.B)(x,d)}))}),[]);(0,E.useEffect)((function(){if(V&&!R)return V(d),function(){null==W||W(d)}}),[d,V,W,R]);var Y=(0,E.useMemo)((function(){return{orientation:M.orientation,next:M.next,previous:M.previous,ref:d,role:x,parent:D,children:F,addChild:$,removeChild:Q}}),[M.orientation,M.next,M.previous,d,x,D,F,$,Q]);return(0,E.useCallback)((function(d){return(0,E.createElement)(j.Provider,{value:Y},d)}),[Y])}},10842:(d,x,M)=>{"use strict";M.d(x,{Z:()=>Portal});var E=M(15993),C=M(30168),j=M(67804),R=M(75368);function getBodyElement(){return j.S?document.body:null}var D=(0,E.createContext)(getBodyElement());function Portal(d){var x=d.children,M=(0,E.useContext)(D)||getBodyElement(),B=(0,E.useState)((function(){if(j.S){var d=document.createElement("div");return d.className=Portal.__className,d}return null}))[0];return(0,C.o)((function(){if(B&&M)return M.appendChild(B),function(){M.removeChild(B)}}),[B,M]),B?(0,R.createPortal)((0,E.createElement)(D.Provider,{value:B},x),B):null}Portal.__className="__reakit-portal",Portal.__selector="."+Portal.__className},40786:(d,x,M)=>{"use strict";M.d(x,{I:()=>D});var E=M(11657),C=M(26762),j=M(75341),R=M(68799),D=(0,j.a)({name:"Role",keys:["unstable_system"],propsAreEqual:function propsAreEqual(d,x){var M=d.unstable_system,C=(0,E._)(d,["unstable_system"]),j=x.unstable_system,D=(0,E._)(x,["unstable_system"]);return!(M!==j&&!(0,R.b)(M,j))&&(0,R.b)(C,D)}});(0,C.a)({as:"div",useHook:D})},95876:(d,x,M)=>{"use strict";M.d(x,{o:()=>K});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=(M(85148),M(6749)),B=M(24469),F=M(71763);var q=(0,j.a)({name:"Tab",compose:B.k,keys:F.T,useOptions:function useOptions(d){var x=d.focusable,M=void 0===x||x,C=(0,E._)(d,["focusable"]);return(0,E.a)({focusable:M},C)},useProps:function useProps(d,x){var M=x.onClick,C=x.onFocus,j=(0,E._)(x,["onClick","onFocus"]),B=d.selectedId===d.id,F=function useTabPanelId(d){return(0,R.useMemo)((function(){var x,M;return(null===(x=d.panels)||void 0===x||null===(M=x.find((function(x){return x.groupId===d.id})))||void 0===M?void 0:M.id)||void 0}),[d.panels,d.id])}(d),q=(0,D.h)(M),K=(0,D.h)(C),V=(0,R.useCallback)((function(x){var M,E;null===(M=q.current)||void 0===M||M.call(q,x),x.defaultPrevented||d.disabled||d.id&&(B||null===(E=d.select)||void 0===E||E.call(d,d.id))}),[d.disabled,B,d.select,d.id]),W=(0,R.useCallback)((function(x){var M,E;null===(M=K.current)||void 0===M||M.call(K,x),x.defaultPrevented||d.disabled||d.manual||d.id&&(B||null===(E=d.select)||void 0===E||E.call(d,d.id))}),[d.id,d.disabled,d.manual,B,d.select]);return(0,E.a)({role:"tab","aria-selected":B,"aria-controls":F,onClick:V,onFocus:W},j)}}),K=(0,C.a)({as:"button",memo:!0,useHook:q})},93708:(d,x,M)=>{"use strict";M.d(x,{w:()=>q});var E=M(11657),C=M(26762),j=M(75341),R=(M(15993),M(85148),M(36008)),D=M(99428),B=M(71763),F=(0,j.a)({name:"TabList",compose:D.T,keys:B.a,useProps:function useProps(d,x){return(0,E.a)({role:"tablist","aria-orientation":d.orientation},x)}}),q=(0,C.a)({as:"div",useHook:F,useCreateElement:function useCreateElement$1(d,x,M){return(0,R.U)(d,x,M)}})},79244:(d,x,M)=>{"use strict";M.d(x,{K:()=>V});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=M(97e3),F=M(55119),q=M(71763);function getTabId(d){var x,M,E=null===(x=d.panels)||void 0===x?void 0:x.find((function(x){return x.id===d.id})),C=d.tabId||(null==E?void 0:E.groupId);if(C||!E||!d.panels||!d.items)return C;var j=function getPanelIndex(d,x){return d.filter((function(d){return!d.groupId})).indexOf(x)}(d.panels,E),R=function getTabsWithoutPanel(d,x){var M=x.map((function(d){return d.groupId})).filter(Boolean);return d.filter((function(d){return-1===M.indexOf(d.id||void 0)}))}(d.items,d.panels);return(null===(M=R[j])||void 0===M?void 0:M.id)||void 0}var K=(0,j.a)({name:"TabPanel",compose:[B.W,F.a],keys:q.b,useProps:function useProps(d,x){var M=x.ref,C=(0,E._)(x,["ref"]),j=(0,R.useRef)(null),B=getTabId(d),F=d.id,q=d.registerPanel,K=d.unregisterPanel;return(0,R.useEffect)((function(){if(F)return null==q||q({id:F,ref:j,groupId:B}),function(){null==K||K(F)}}),[B,F,q,K]),(0,E.a)({ref:(0,D.N)(j,M),role:"tabpanel",tabIndex:0,"aria-labelledby":B},C)},useComposeOptions:function useComposeOptions(d){var x=getTabId(d);return(0,E.a)({visible:!!x&&d.selectedId===x},d)}}),V=(0,C.a)({as:"div",useHook:K})},96436:(d,x,M)=>{"use strict";M.d(x,{i:()=>useTabState});var E=M(11657),C=M(15993),j=M(25671),R=M(74839);function useTabState(d){void 0===d&&(d={});var x=(0,j.N)(d),M=x.selectedId,D=x.loop,B=void 0===D||D,F=x.manual,q=void 0!==F&&F,K=(0,E._)(x,["selectedId","loop","manual"]),V=(0,R.A)((0,E.a)({loop:B,currentId:M},K)),W=(0,R.A)(),$=(0,C.useState)(M),Q=$[0],Y=$[1],ie=(0,C.useCallback)((function(d){V.move(d),Y(d)}),[V.move]);return(0,C.useEffect)((function(){null!==Q&&(V.items.find((function(d){return d.id===Q}))||V.currentId&&Y(V.currentId))}),[Q,V.items,V.currentId]),(0,E.a)((0,E.a)({},V),{},{selectedId:Q,panels:W.items,manual:q,select:ie,setSelectedId:Y,registerPanel:(0,C.useCallback)((function(d){return W.registerItem(d)}),[W.registerItem]),unregisterPanel:(0,C.useCallback)((function(d){return W.unregisterItem(d)}),[W.unregisterItem])})}},15636:(d,x,M)=>{"use strict";M.d(x,{b:()=>ie});var E=M(11657),C=M(26762),j=M(75341),R=M(15993),D=M(37651),B=M(93839),F=(M(85148),M(6749)),q=M(30168),K=M(56912),V=M(50473),W=M(4943),$=M(73028),Q=M(40786),Y=(0,W.p)("Mac")&&!(0,W.p)("Chrome")&&((0,W.p)("Safari")||(0,W.p)("Firefox"));function focusIfNeeded(d){!(0,K.o)(d)&&(0,$.tp)(d)&&d.focus()}function getTabIndex(d,x,M,E){return d?x&&!M?-1:void 0:x?E:E||0}function useDisableEvent(d,x){return(0,R.useCallback)((function(M){var E;null===(E=d.current)||void 0===E||E.call(d,M),M.defaultPrevented||x&&(M.stopPropagation(),M.preventDefault())}),[d,x])}var ie=(0,j.a)({name:"Tabbable",compose:Q.I,keys:["disabled","focusable"],useOptions:function useOptions(d,x){var M=x.disabled;return(0,E.a)({disabled:M},d)},useProps:function useProps(d,x){var M=x.ref,C=x.tabIndex,j=x.onClickCapture,K=x.onMouseDownCapture,W=x.onMouseDown,$=x.onKeyPressCapture,Q=x.style,ie=(0,E._)(x,["ref","tabIndex","onClickCapture","onMouseDownCapture","onMouseDown","onKeyPressCapture","style"]),ae=(0,R.useRef)(null),se=(0,F.h)(j),ue=(0,F.h)(K),ce=(0,F.h)(W),he=(0,F.h)($),fe=!!d.disabled&&!d.focusable,de=(0,R.useState)(!0),pe=de[0],me=de[1],ve=(0,R.useState)(!0),ge=ve[0],ye=ve[1],be=d.disabled?(0,E.a)({pointerEvents:"none"},Q):Q;(0,q.o)((function(){var d=ae.current;d&&(function isNativeTabbable(d){return["BUTTON","INPUT","SELECT","TEXTAREA","A"].includes(d.tagName)}(d)||me(!1),function supportsDisabledAttribute(d){return["BUTTON","INPUT","SELECT","TEXTAREA"].includes(d.tagName)}(d)||ye(!1))}),[]);var xe=useDisableEvent(se,d.disabled),we=useDisableEvent(ue,d.disabled),Me=useDisableEvent(he,d.disabled),Ie=(0,R.useCallback)((function(d){var x;null===(x=ce.current)||void 0===x||x.call(ce,d);var M=d.currentTarget;if(!d.defaultPrevented&&Y&&!(0,V.h)(d)&&(0,B.B)(M)){var E=requestAnimationFrame((function(){M.removeEventListener("mouseup",C,!0),focusIfNeeded(M)})),C=function focusImmediately(){cancelAnimationFrame(E),focusIfNeeded(M)};M.addEventListener("mouseup",C,{once:!0,capture:!0})}}),[]);return(0,E.a)({ref:(0,D.N)(ae,M),style:be,tabIndex:getTabIndex(fe,pe,ge,C),disabled:!(!fe||!ge)||void 0,"aria-disabled":!!d.disabled||void 0,onClickCapture:xe,onMouseDownCapture:we,onMouseDown:Ie,onKeyPressCapture:Me},ie)}});(0,C.a)({as:"div",useHook:ie})},72297:(d,x,M)=>{"use strict";M.d(x,{P:()=>E,c:()=>C});var E=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place"],C=([].concat(E,["size"]),E)},71763:(d,x,M)=>{"use strict";M.d(x,{T:()=>E,a:()=>C,b:()=>j});var E=["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","selectedId","panels","manual","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","select","setSelectedId","registerPanel","unregisterPanel"],C=E,j=[].concat(C,["tabId"])},97980:(d,x,M)=>{"use strict";M.d(x,{C:()=>E,b:()=>C});var E=["baseId","unstable_idCountRef","setBaseId","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget"],C=E},40491:(d,x,M)=>{"use strict";M.d(x,{D:()=>E,a:()=>C});var E=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation"],C=E},96233:(d,x,M)=>{"use strict";M.d(x,{D:()=>C,a:()=>j,b:()=>R});var E=["baseId","unstable_idCountRef","visible","animated","animating","setBaseId","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal"],C=[].concat(E,["hideOnEsc","hideOnClickOutside","preventBodyScroll","unstable_initialFocusRef","unstable_finalFocusRef","unstable_orphan","unstable_autoFocusOnShow","unstable_autoFocusOnHide"]),j=E,R=E},65638:(d,x,M)=>{"use strict";M.d(x,{M:()=>E,b:()=>C,c:()=>j,e:()=>R,f:()=>D,g:()=>B,h:()=>F});var E=[].concat(["baseId","unstable_idCountRef","unstable_virtual","rtl","orientation","items","groups","currentId","loop","wrap","shift","unstable_moves","unstable_hasActiveWidget","unstable_includesBaseElement","unstable_values","setBaseId","registerItem","unregisterItem","registerGroup","unregisterGroup","move","next","previous","up","down","first","last","sort","unstable_setVirtual","setRTL","setOrientation","setCurrentId","setLoop","setWrap","setShift","reset","unstable_setIncludesBaseElement","unstable_setHasActiveWidget","unstable_setValue"],["visible","animated","animating","show","hide","toggle","setVisible","setAnimated","stopAnimation","modal","unstable_disclosureRef","setModal","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_originalPlacement","unstable_update","placement","place"]),C=E,j=C,R=j,D=[].concat(R,["name"]),B=D,F=R},11657:(d,x,M)=>{"use strict";function _defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}function ownKeys(d,x){var M=Object.keys(d);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(d);x&&(E=E.filter((function(x){return Object.getOwnPropertyDescriptor(d,x).enumerable}))),M.push.apply(M,E)}return M}function _objectSpread2(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{};x%2?ownKeys(Object(M),!0).forEach((function(x){_defineProperty(d,x,M[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(M)):ownKeys(Object(M)).forEach((function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(M,x))}))}return d}function _objectWithoutPropertiesLoose(d,x){if(null==d)return{};var M,E,C={},j=Object.keys(d);for(E=0;E<j.length;E++)M=j[E],x.indexOf(M)>=0||(C[M]=d[M]);return C}function _arrayLikeToArray(d,x){(null==x||x>d.length)&&(x=d.length);for(var M=0,E=new Array(x);M<x;M++)E[M]=d[M];return E}function _createForOfIteratorHelperLoose(d,x){var M;if("undefined"==typeof Symbol||null==d[Symbol.iterator]){if(Array.isArray(d)||(M=function _unsupportedIterableToArray(d,x){if(d){if("string"==typeof d)return _arrayLikeToArray(d,x);var M=Object.prototype.toString.call(d).slice(8,-1);return"Object"===M&&d.constructor&&(M=d.constructor.name),"Map"===M||"Set"===M?Array.from(d):"Arguments"===M||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?_arrayLikeToArray(d,x):void 0}}(d))||x&&d&&"number"==typeof d.length){M&&(d=M);var E=0;return function(){return E>=d.length?{done:!0}:{done:!1,value:d[E++]}}}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(M=d[Symbol.iterator]()).next.bind(M)}M.d(x,{_:()=>_objectWithoutPropertiesLoose,a:()=>_objectSpread2,b:()=>_createForOfIteratorHelperLoose})},88415:(d,x,M)=>{"use strict";function findEnabledItemById(d,x){if(x)return null==d?void 0:d.find((function(d){return d.id===x&&!d.disabled}))}M.d(x,{f:()=>findEnabledItemById})},76735:(d,x,M)=>{"use strict";function findVisibleSubmenu(d){var x=null==d?void 0:d.find((function(d){return d.current&&!d.current.hidden}));return null==x?void 0:x.current}M.d(x,{f:()=>findVisibleSubmenu})},40422:(d,x,M)=>{"use strict";function findFirstEnabledItem(d,x){return x?d.find((function(d){return!d.disabled&&d.id!==x})):d.find((function(d){return!d.disabled}))}function getCurrentId(d,x){var M;return x||null===x?x:d.currentId||null===d.currentId?d.currentId:null===(M=findFirstEnabledItem(d.items||[]))||void 0===M?void 0:M.id}M.d(x,{f:()=>findFirstEnabledItem,g:()=>getCurrentId})},42521:(d,x,M)=>{"use strict";M.d(x,{f:()=>flatten,g:()=>groupItems,r:()=>reverse});var E=M(11657);function groupItems(d){for(var x,M=[[]],C=function _loop(){var d=x.value,E=M.find((function(x){return!x[0]||x[0].groupId===d.groupId}));E?E.push(d):M.push([d])},j=(0,E.b)(d);!(x=j()).done;)C();return M}function flatten(d){for(var x,M=[],C=(0,E.b)(d);!(x=C()).done;){var j=x.value;M.push.apply(M,j)}return M}function reverse(d){return d.slice().reverse()}},63246:(d,x,M)=>{"use strict";function userFocus(d){d.userFocus=!0,d.focus(),d.userFocus=!1}function hasUserFocus(d){return!!d.userFocus}function setUserFocus(d,x){d.userFocus=x}M.d(x,{h:()=>hasUserFocus,s:()=>setUserFocus,u:()=>userFocus})},8516:function(d,x,M){"use strict";var E=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(x,"__esModule",{value:!0});var C=E(M(68782));x.default=function StyleToObject(d,x){var M=null;if(!d||"string"!=typeof d)return M;var E=(0,C.default)(d),j="function"==typeof x;return E.forEach((function(d){if("declaration"===d.type){var E=d.property,C=d.value;j?x(E,C,d):C&&((M=M||{})[E]=C)}})),M}},91026:(d,x,M)=>{"use strict";const{asciiLowercase:E,solelyContainsHTTPTokenCodePoints:C,soleyContainsHTTPQuotedStringTokenCodePoints:j}=M(60627);d.exports=class MIMETypeParameters{constructor(d){this._map=d}get size(){return this._map.size}get(d){return d=E(String(d)),this._map.get(d)}has(d){return d=E(String(d)),this._map.has(d)}set(d,x){if(d=E(String(d)),x=String(x),!C(d))throw new Error(`Invalid MIME type parameter name "${d}": only HTTP token code points are valid.`);if(!j(x))throw new Error(`Invalid MIME type parameter value "${x}": only HTTP quoted-string token code points are valid.`);return this._map.set(d,x)}clear(){this._map.clear()}delete(d){return d=E(String(d)),this._map.delete(d)}forEach(d,x){this._map.forEach(d,x)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}},41949:(d,x,M)=>{"use strict";const E=M(91026),C=M(33995),j=M(14140),{asciiLowercase:R,solelyContainsHTTPTokenCodePoints:D}=M(60627);d.exports=class MIMEType{constructor(d){d=String(d);const x=C(d);if(null===x)throw new Error(`Could not parse MIME type string "${d}"`);this._type=x.type,this._subtype=x.subtype,this._parameters=new E(x.parameters)}static parse(d){try{return new this(d)}catch(d){return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(d){if(0===(d=R(String(d))).length)throw new Error("Invalid type: must be a non-empty string");if(!D(d))throw new Error(`Invalid type ${d}: must contain only HTTP token code points`);this._type=d}get subtype(){return this._subtype}set subtype(d){if(0===(d=R(String(d))).length)throw new Error("Invalid subtype: must be a non-empty string");if(!D(d))throw new Error(`Invalid subtype ${d}: must contain only HTTP token code points`);this._subtype=d}get parameters(){return this._parameters}toString(){return j(this)}isJavaScript({prohibitParameters:d=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!d||0===this._parameters.size;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!d||0===this._parameters.size;default:return!1}default:return!1}}isXML(){return"xml"===this._subtype&&("text"===this._type||"application"===this._type)||this._subtype.endsWith("+xml")}isHTML(){return"html"===this._subtype&&"text"===this._type}}},33995:(d,x,M)=>{"use strict";const{removeLeadingAndTrailingHTTPWhitespace:E,removeTrailingHTTPWhitespace:C,isHTTPWhitespaceChar:j,solelyContainsHTTPTokenCodePoints:R,soleyContainsHTTPQuotedStringTokenCodePoints:D,asciiLowercase:B,collectAnHTTPQuotedString:F}=M(60627);d.exports=d=>{d=E(d);let x=0,M="";for(;x<d.length&&"/"!==d[x];)M+=d[x],++x;if(0===M.length||!R(M))return null;if(x>=d.length)return null;++x;let q="";for(;x<d.length&&";"!==d[x];)q+=d[x],++x;if(q=C(q),0===q.length||!R(q))return null;const K={type:B(M),subtype:B(q),parameters:new Map};for(;x<d.length;){for(++x;j(d[x]);)++x;let M="";for(;x<d.length&&";"!==d[x]&&"="!==d[x];)M+=d[x],++x;if(M=B(M),x<d.length){if(";"===d[x])continue;++x}let E=null;if('"'===d[x])for([E,x]=F(d,x);x<d.length&&";"!==d[x];)++x;else{for(E="";x<d.length&&";"!==d[x];)E+=d[x],++x;if(E=C(E),""===E)continue}M.length>0&&R(M)&&D(E)&&!K.parameters.has(M)&&K.parameters.set(M,E)}return K}},14140:(d,x,M)=>{"use strict";const{solelyContainsHTTPTokenCodePoints:E}=M(60627);d.exports=d=>{let x=`${d.type}/${d.subtype}`;if(0===d.parameters.size)return x;for(let[M,C]of d.parameters)x+=";",x+=M,x+="=",E(C)&&0!==C.length||(C=C.replace(/(["\\])/gu,"\\$1"),C=`"${C}"`),x+=C;return x}},60627:(d,x)=>{"use strict";x.removeLeadingAndTrailingHTTPWhitespace=d=>d.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,""),x.removeTrailingHTTPWhitespace=d=>d.replace(/[ \t\n\r]+$/u,""),x.isHTTPWhitespaceChar=d=>" "===d||"\t"===d||"\n"===d||"\r"===d,x.solelyContainsHTTPTokenCodePoints=d=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(d),x.soleyContainsHTTPQuotedStringTokenCodePoints=d=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(d),x.asciiLowercase=d=>d.replace(/[A-Z]/gu,(d=>d.toLowerCase())),x.collectAnHTTPQuotedString=(d,x)=>{let M="";for(x++;;){for(;x<d.length&&'"'!==d[x]&&"\\"!==d[x];)M+=d[x],++x;if(x>=d.length)break;const E=d[x];if(++x,"\\"!==E)break;if(x>=d.length){M+="\\";break}M+=d[x],++x}return[M,x]}},25203:(d,x,M)=>{"use strict";function invariant(d,x,...M){if(function isProduction(){return"undefined"!=typeof process&&!0}()&&void 0===x)throw new Error("invariant requires an error message argument");if(!d){let d;if(void 0===x)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let E=0;d=new Error(x.replace(/%s/g,(function(){return M[E++]}))),d.name="Invariant Violation"}throw d.framesToPop=1,d}}M.d(x,{V:()=>invariant})},27479:(d,x,M)=>{"use strict";function shallowEqual(d,x,M,E){let C=M?M.call(E,d,x):void 0;if(void 0!==C)return!!C;if(d===x)return!0;if("object"!=typeof d||!d||"object"!=typeof x||!x)return!1;const j=Object.keys(d),R=Object.keys(x);if(j.length!==R.length)return!1;const D=Object.prototype.hasOwnProperty.bind(x);for(let R=0;R<j.length;R++){const B=j[R];if(!D(B))return!1;const F=d[B],q=x[B];if(C=M?M.call(E,F,q,B):void 0,!1===C||void 0===C&&F!==q)return!1}return!0}M.d(x,{b:()=>shallowEqual})},82627:(d,x,M)=>{"use strict";M.d(x,{B7:()=>createContainerComponent,KU:()=>createLeafComponent});var E=M(15993),C=(M(75368),M(25751));function createContainerComponent(d){function ContainerComponent(x,M){const{instance:j,context:R}=d(x).current;return(0,E.useImperativeHandle)(M,(()=>j)),null==x.children?null:E.createElement(C.hL,{value:R},x.children)}return(0,E.forwardRef)(ContainerComponent)}function createLeafComponent(d){function LeafComponent(x,M){const{instance:C}=d(x).current;return(0,E.useImperativeHandle)(M,(()=>C)),null}return(0,E.forwardRef)(LeafComponent)}},25751:(d,x,M)=>{"use strict";M.d(x,{U$:()=>useLeafletContext,W4:()=>extendContext,fB:()=>createLeafletContext,hL:()=>R});var E=M(15993);const C=1;function createLeafletContext(d){return Object.freeze({__version:C,map:d})}function extendContext(d,x){return Object.freeze({...d,...x})}const j=(0,E.createContext)(null),R=j.Provider;function useLeafletContext(){const d=(0,E.useContext)(j);if(null==d)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return d}},23757:(d,x,M)=>{"use strict";M.d(x,{T:()=>createControlHook});var E=M(15993),C=M(25751);function createControlHook(d){return function useLeafletControl(x){const M=(0,C.U$)(),j=d(x,M),{instance:R}=j.current,D=(0,E.useRef)(x.position),{position:B}=x;return(0,E.useEffect)((function addControl(){return R.addTo(M.map),function removeControl(){R.remove()}}),[M.map,R]),(0,E.useEffect)((function updateControl(){null!=B&&B!==D.current&&(R.setPosition(B),D.current=B)}),[R,B]),j}}},88635:(d,x,M)=>{"use strict";M.d(x,{K:()=>createElementHook,Q:()=>createElementObject});var E=M(15993);function createElementObject(d,x,M){return Object.freeze({instance:d,context:x,container:M})}function createElementHook(d,x){return null==x?function useImmutableLeafletElement(x,M){const C=(0,E.useRef)();return C.current||(C.current=d(x,M)),C}:function useMutableLeafletElement(M,C){const j=(0,E.useRef)();j.current||(j.current=d(M,C));const R=(0,E.useRef)(M),{instance:D}=j.current;return(0,E.useEffect)((function updateElementProps(){R.current!==M&&(x(D,M,R.current),R.current=M)}),[D,M,C]),j}}},14651:(d,x,M)=>{"use strict";M.d(x,{Lt:()=>createPathComponent,X3:()=>createTileLayerComponent});var E=M(82627),C=M(88635),j=M(15993);var R=M(25751);function useEventHandlers(d,x){const M=(0,j.useRef)();(0,j.useEffect)((function addEventHandlers(){return null!=x&&d.instance.on(x),M.current=x,function removeEventHandlers(){null!=M.current&&d.instance.off(M.current),M.current=null}}),[d,x])}var D=M(65476);function useLayerLifecycle(d,x){(0,j.useEffect)((function addLayer(){return(x.layerContainer??x.map).addLayer(d.instance),function removeLayer(){x.layerContainer?.removeLayer(d.instance),x.map.removeLayer(d.instance)}}),[x,d])}function layer_createLayerHook(d){return function useLayer(x){const M=(0,R.U$)(),E=d((0,D.P)(x,M),M);return function useAttribution(d,x){const M=(0,j.useRef)(x);(0,j.useEffect)((function updateAttribution(){x!==M.current&&null!=d.attributionControl&&(null!=M.current&&d.attributionControl.removeAttribution(M.current),null!=x&&d.attributionControl.addAttribution(x)),M.current=x}),[d,x])}(M.map,x.attribution),useEventHandlers(E.current,x.eventHandlers),useLayerLifecycle(E.current,M),E}}function createPathHook(d){return function usePath(x){const M=(0,R.U$)(),E=d((0,D.P)(x,M),M);return useEventHandlers(E.current,x.eventHandlers),useLayerLifecycle(E.current,M),function usePathOptions(d,x){const M=(0,j.useRef)();(0,j.useEffect)((function updatePathOptions(){if(x.pathOptions!==M.current){const E=x.pathOptions??{};d.instance.setStyle(E),M.current=E}}),[d,x])}(E.current,x),E}}function createPathComponent(d,x){const M=createPathHook((0,C.K)(d,x));return(0,E.B7)(M)}function createTileLayerComponent(d,x){const M=layer_createLayerHook((0,C.K)(d,x));return(0,E.KU)(M)}},95758:(d,x,M)=>{"use strict";function updateGridLayer(d,x,M){const{opacity:E,zIndex:C}=x;null!=E&&E!==M.opacity&&d.setOpacity(E),null!=C&&C!==M.zIndex&&d.setZIndex(C)}M.d(x,{X:()=>updateGridLayer})},65476:(d,x,M)=>{"use strict";function withPane(d,x){const M=d.pane??x.pane;return M?{...d,pane:M}:d}M.d(x,{P:()=>withPane})},95607:(d,x,M)=>{"use strict";function crelt(){var d=arguments[0];"string"==typeof d&&(d=document.createElement(d));var x=1,M=arguments[1];if(M&&"object"==typeof M&&null==M.nodeType&&!Array.isArray(M)){for(var E in M)if(Object.prototype.hasOwnProperty.call(M,E)){var C=M[E];"string"==typeof C?d.setAttribute(E,C):null!=C&&(d[E]=C)}x++}for(;x<arguments.length;x++)add(d,arguments[x]);return d}function add(d,x){if("string"==typeof x)d.appendChild(document.createTextNode(x));else if(null==x);else if(null!=x.nodeType)d.appendChild(x);else{if(!Array.isArray(x))throw new RangeError("Unsupported child node: "+x);for(var M=0;M<x.length;M++)add(d,x[M])}}M.d(x,{A:()=>crelt})},12002:(d,x,M)=>{"use strict";function ok(){}function unreachable(){}M.d(x,{HB:()=>unreachable,ok:()=>ok})},17314:(d,x,M)=>{"use strict";M.d(x,{Ay:()=>ie});var E=M(29103);const C=Symbol.for("Dexie"),j=globalThis[C]||(globalThis[C]=E);if(E.semVer!==j.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${E.semVer} and ${j.semVer}`);const{liveQuery:R,mergeRanges:D,rangesOverlap:B,RangeSet:F,cmp:q,Entity:K,PropModSymbol:V,PropModification:W,replacePrefix:$,add:Q,remove:Y}=j,ie=j},56141:(d,x,M)=>{"use strict";function formatProdErrorMessage(d){return"Minified Redux error #"+d+"; visit https://redux.js.org/Errors?code="+d+" for the full message or use the non-minified dev environment for full errors. "}M.d(x,{b:()=>createDragDropManager});var E="function"==typeof Symbol&&Symbol.observable||"@@observable",C=function randomString(){return Math.random().toString(36).substring(7).split("").join(".")},j={INIT:"@@redux/INIT"+C(),REPLACE:"@@redux/REPLACE"+C(),PROBE_UNKNOWN_ACTION:function PROBE_UNKNOWN_ACTION(){return"@@redux/PROBE_UNKNOWN_ACTION"+C()}};function isPlainObject(d){if("object"!=typeof d||null===d)return!1;for(var x=d;null!==Object.getPrototypeOf(x);)x=Object.getPrototypeOf(x);return Object.getPrototypeOf(d)===x}function createStore(d,x,M){var C;if("function"==typeof x&&"function"==typeof M||"function"==typeof M&&"function"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if("function"==typeof x&&void 0===M&&(M=x,x=void 0),void 0!==M){if("function"!=typeof M)throw new Error(formatProdErrorMessage(1));return M(createStore)(d,x)}if("function"!=typeof d)throw new Error(formatProdErrorMessage(2));var R=d,D=x,B=[],F=B,q=!1;function ensureCanMutateNextListeners(){F===B&&(F=B.slice())}function getState(){if(q)throw new Error(formatProdErrorMessage(3));return D}function subscribe(d){if("function"!=typeof d)throw new Error(formatProdErrorMessage(4));if(q)throw new Error(formatProdErrorMessage(5));var x=!0;return ensureCanMutateNextListeners(),F.push(d),function unsubscribe(){if(x){if(q)throw new Error(formatProdErrorMessage(6));x=!1,ensureCanMutateNextListeners();var M=F.indexOf(d);F.splice(M,1),B=null}}}function dispatch(d){if(!isPlainObject(d))throw new Error(formatProdErrorMessage(7));if(void 0===d.type)throw new Error(formatProdErrorMessage(8));if(q)throw new Error(formatProdErrorMessage(9));try{q=!0,D=R(D,d)}finally{q=!1}for(var x=B=F,M=0;M<x.length;M++){(0,x[M])()}return d}return dispatch({type:j.INIT}),(C={dispatch,subscribe,getState,replaceReducer:function replaceReducer(d){if("function"!=typeof d)throw new Error(formatProdErrorMessage(10));R=d,dispatch({type:j.REPLACE})}})[E]=function observable(){var d,x=subscribe;return(d={subscribe:function subscribe(d){if("object"!=typeof d||null===d)throw new Error(formatProdErrorMessage(11));function observeState(){d.next&&d.next(getState())}return observeState(),{unsubscribe:x(observeState)}}})[E]=function(){return this},d},C}var R=M(25203);function isObject(d){return"object"==typeof d}const D="dnd-core/INIT_COORDS",B="dnd-core/BEGIN_DRAG",F="dnd-core/PUBLISH_DRAG_SOURCE",q="dnd-core/HOVER",K="dnd-core/DROP",V="dnd-core/END_DRAG";function setClientOffset(d,x){return{type:D,payload:{sourceClientOffset:x||null,clientOffset:d||null}}}const W={type:D,payload:{clientOffset:null,sourceClientOffset:null}};function createBeginDrag(d){return function beginDrag(x=[],M={publishSource:!0}){const{publishSource:E=!0,clientOffset:C,getSourceClientOffset:j}=M,D=d.getMonitor(),F=d.getRegistry();d.dispatch(setClientOffset(C)),function verifyInvariants(d,x,M){(0,R.V)(!x.isDragging(),"Cannot call beginDrag while dragging."),d.forEach((function(d){(0,R.V)(M.getSource(d),"Expected sourceIds to be registered.")}))}(x,D,F);const q=function getDraggableSource(d,x){let M=null;for(let E=d.length-1;E>=0;E--)if(x.canDragSource(d[E])){M=d[E];break}return M}(x,D);if(null==q)return void d.dispatch(W);let K=null;if(C){if(!j)throw new Error("getSourceClientOffset must be defined");!function verifyGetSourceClientOffsetIsFunction(d){(0,R.V)("function"==typeof d,"When clientOffset is provided, getSourceClientOffset must be a function.")}(j),K=j(q)}d.dispatch(setClientOffset(C,K));const V=F.getSource(q).beginDrag(D,q);if(null==V)return;!function verifyItemIsObject(d){(0,R.V)(isObject(d),"Item must be an object.")}(V),F.pinSource(q);const $=F.getSourceType(q);return{type:B,payload:{itemType:$,item:V,sourceId:q,clientOffset:C||null,sourceClientOffset:K||null,isSourcePublic:!!E}}}}function _defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}function drop_objectSpread(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{},E=Object.keys(M);"function"==typeof Object.getOwnPropertySymbols&&(E=E.concat(Object.getOwnPropertySymbols(M).filter((function(d){return Object.getOwnPropertyDescriptor(M,d).enumerable})))),E.forEach((function(x){_defineProperty(d,x,M[x])}))}return d}function createDrop(d){return function drop(x={}){const M=d.getMonitor(),E=d.getRegistry();!function drop_verifyInvariants(d){(0,R.V)(d.isDragging(),"Cannot call drop while not dragging."),(0,R.V)(!d.didDrop(),"Cannot call drop twice during one drag operation.")}(M);const C=function getDroppableTargets(d){const x=d.getTargetIds().filter(d.canDropOnTarget,d);return x.reverse(),x}(M);C.forEach(((C,j)=>{const D=function determineDropResult(d,x,M,E){const C=M.getTarget(d);let j=C?C.drop(E,d):void 0;(function verifyDropResultType(d){(0,R.V)(void 0===d||isObject(d),"Drop result must either be an object or undefined.")})(j),void 0===j&&(j=0===x?{}:E.getDropResult());return j}(C,j,E,M),B={type:K,payload:{dropResult:drop_objectSpread({},x,D)}};d.dispatch(B)}))}}function createEndDrag(d){return function endDrag(){const x=d.getMonitor(),M=d.getRegistry();!function verifyIsDragging(d){(0,R.V)(d.isDragging(),"Cannot call endDrag while not dragging.")}(x);const E=x.getSourceId();if(null!=E){M.getSource(E,!0).endDrag(x,E),M.unpinSource()}return{type:V}}}function matchesType(d,x){return null===x?null===d:Array.isArray(d)?d.some((d=>d===x)):d===x}function createHover(d){return function hover(x,{clientOffset:M}={}){!function verifyTargetIdsIsArray(d){(0,R.V)(Array.isArray(d),"Expected targetIds to be an array.")}(x);const E=x.slice(0),C=d.getMonitor(),j=d.getRegistry();return function removeNonMatchingTargetIds(d,x,M){for(let E=d.length-1;E>=0;E--){const C=d[E];matchesType(x.getTargetType(C),M)||d.splice(E,1)}}(E,j,C.getItemType()),function checkInvariants(d,x,M){(0,R.V)(x.isDragging(),"Cannot call hover while not dragging."),(0,R.V)(!x.didDrop(),"Cannot call hover after drop.");for(let x=0;x<d.length;x++){const E=d[x];(0,R.V)(d.lastIndexOf(E)===x,"Expected targetIds to be unique in the passed array.");const C=M.getTarget(E);(0,R.V)(C,"Expected targetIds to be registered.")}}(E,C,j),function hoverAllTargets(d,x,M){d.forEach((function(d){M.getTarget(d).hover(x,d)}))}(E,C,j),{type:q,payload:{targetIds:E,clientOffset:M||null}}}}function createPublishDragSource(d){return function publishDragSource(){if(d.getMonitor().isDragging())return{type:F}}}class DragDropManagerImpl{receiveBackend(d){this.backend=d}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const d=this,{dispatch:x}=this.store;const M=function createDragDropActions(d){return{beginDrag:createBeginDrag(d),publishDragSource:createPublishDragSource(d),hover:createHover(d),drop:createDrop(d),endDrag:createEndDrag(d)}}(this);return Object.keys(M).reduce(((E,C)=>{const j=M[C];return E[C]=function bindActionCreator(M){return(...E)=>{const C=M.apply(d,E);void 0!==C&&x(C)}}(j),E}),{})}dispatch(d){this.store.dispatch(d)}constructor(d,x){this.isSetUp=!1,this.handleRefCountChange=()=>{const d=this.store.getState().refCount>0;this.backend&&(d&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!d&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=d,this.monitor=x,d.subscribe(this.handleRefCountChange)}}function subtract(d,x){return{x:d.x-x.x,y:d.y-x.y}}const $=[],Q=[];$.__IS_NONE__=!0,Q.__IS_ALL__=!0;class DragDropMonitorImpl{subscribeToStateChange(d,x={}){const{handlerIds:M}=x;(0,R.V)("function"==typeof d,"listener must be a function."),(0,R.V)(void 0===M||Array.isArray(M),"handlerIds, when specified, must be an array of strings.");let E=this.store.getState().stateId;return this.store.subscribe((()=>{const x=this.store.getState(),C=x.stateId;try{const j=C===E||C===E+1&&!function areDirty(d,x){return d!==$&&(d===Q||void 0===x||function intersection(d,x){return d.filter((d=>x.indexOf(d)>-1))}(x,d).length>0)}(x.dirtyHandlerIds,M);j||d()}finally{E=C}}))}subscribeToOffsetChange(d){(0,R.V)("function"==typeof d,"listener must be a function.");let x=this.store.getState().dragOffset;return this.store.subscribe((()=>{const M=this.store.getState().dragOffset;M!==x&&(x=M,d())}))}canDragSource(d){if(!d)return!1;const x=this.registry.getSource(d);return(0,R.V)(x,`Expected to find a valid source. sourceId=${d}`),!this.isDragging()&&x.canDrag(this,d)}canDropOnTarget(d){if(!d)return!1;const x=this.registry.getTarget(d);if((0,R.V)(x,`Expected to find a valid target. targetId=${d}`),!this.isDragging()||this.didDrop())return!1;return matchesType(this.registry.getTargetType(d),this.getItemType())&&x.canDrop(this,d)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(d){if(!d)return!1;const x=this.registry.getSource(d,!0);if((0,R.V)(x,`Expected to find a valid source. sourceId=${d}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(d)===this.getItemType()&&x.isDragging(this,d)}isOverTarget(d,x={shallow:!1}){if(!d)return!1;const{shallow:M}=x;if(!this.isDragging())return!1;const E=this.registry.getTargetType(d),C=this.getItemType();if(C&&!matchesType(E,C))return!1;const j=this.getTargetIds();if(!j.length)return!1;const R=j.indexOf(d);return M?R===j.length-1:R>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function getSourceClientOffset(d){const{clientOffset:x,initialClientOffset:M,initialSourceClientOffset:E}=d;return x&&M&&E?subtract(function add(d,x){return{x:d.x+x.x,y:d.y+x.y}}(x,E),M):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function getDifferenceFromInitialOffset(d){const{clientOffset:x,initialClientOffset:M}=d;return x&&M?subtract(x,M):null}(this.store.getState().dragOffset)}constructor(d,x){this.store=d,this.registry=x}}const Y="undefined"!=typeof global?global:self,ie=Y.MutationObserver||Y.WebKitMutationObserver;function makeRequestCallFromTimer(d){return function requestCall(){const x=setTimeout(handleTimer,0),M=setInterval(handleTimer,50);function handleTimer(){clearTimeout(x),clearInterval(M),d()}}}const ae="function"==typeof ie?function makeRequestCallFromMutationObserver(d){let x=1;const M=new ie(d),E=document.createTextNode("");return M.observe(E,{characterData:!0}),function requestCall(){x=-x,E.data=x}}:makeRequestCallFromTimer;class RawTask{call(){try{this.task&&this.task()}catch(d){this.onError(d)}finally{this.task=null,this.release(this)}}constructor(d,x){this.onError=d,this.release=x,this.task=null}}const se=new class AsapQueue{enqueueTask(d){const{queue:x,requestFlush:M}=this;x.length||(M(),this.flushing=!0),x[x.length]=d}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:d}=this;for(;this.index<d.length;){const x=this.index;if(this.index++,d[x].call(),this.index>this.capacity){for(let x=0,M=d.length-this.index;x<M;x++)d[x]=d[x+this.index];d.length-=this.index,this.index=0}}d.length=0,this.index=0,this.flushing=!1},this.registerPendingError=d=>{this.pendingErrors.push(d),this.requestErrorThrow()},this.requestFlush=ae(this.flush),this.requestErrorThrow=makeRequestCallFromTimer((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},ue=new class TaskFactory{create(d){const x=this.freeTasks,M=x.length?x.pop():new RawTask(this.onError,(d=>x[x.length]=d));return M.task=d,M}constructor(d){this.onError=d,this.freeTasks=[]}}(se.registerPendingError);const ce="dnd-core/ADD_SOURCE",he="dnd-core/ADD_TARGET",fe="dnd-core/REMOVE_SOURCE",de="dnd-core/REMOVE_TARGET";function validateType(d,x){x&&Array.isArray(d)?d.forEach((d=>validateType(d,!1))):(0,R.V)("string"==typeof d||"symbol"==typeof d,x?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var pe;!function(d){d.SOURCE="SOURCE",d.TARGET="TARGET"}(pe||(pe={}));let me=0;function getNextHandlerId(d){const x=function getNextUniqueId(){return me++}().toString();switch(d){case pe.SOURCE:return`S${x}`;case pe.TARGET:return`T${x}`;default:throw new Error(`Unknown Handler Role: ${d}`)}}function parseRoleFromHandlerId(d){switch(d[0]){case"S":return pe.SOURCE;case"T":return pe.TARGET;default:throw new Error(`Cannot parse handler ID: ${d}`)}}function mapContainsValue(d,x){const M=d.entries();let E=!1;do{const{done:d,value:[,C]}=M.next();if(C===x)return!0;E=!!d}while(!E);return!1}class HandlerRegistryImpl{addSource(d,x){validateType(d),function validateSourceContract(d){(0,R.V)("function"==typeof d.canDrag,"Expected canDrag to be a function."),(0,R.V)("function"==typeof d.beginDrag,"Expected beginDrag to be a function."),(0,R.V)("function"==typeof d.endDrag,"Expected endDrag to be a function.")}(x);const M=this.addHandler(pe.SOURCE,d,x);return this.store.dispatch(function addSource(d){return{type:ce,payload:{sourceId:d}}}(M)),M}addTarget(d,x){validateType(d,!0),function validateTargetContract(d){(0,R.V)("function"==typeof d.canDrop,"Expected canDrop to be a function."),(0,R.V)("function"==typeof d.hover,"Expected hover to be a function."),(0,R.V)("function"==typeof d.drop,"Expected beginDrag to be a function.")}(x);const M=this.addHandler(pe.TARGET,d,x);return this.store.dispatch(function addTarget(d){return{type:he,payload:{targetId:d}}}(M)),M}containsHandler(d){return mapContainsValue(this.dragSources,d)||mapContainsValue(this.dropTargets,d)}getSource(d,x=!1){(0,R.V)(this.isSourceId(d),"Expected a valid source ID.");return x&&d===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(d)}getTarget(d){return(0,R.V)(this.isTargetId(d),"Expected a valid target ID."),this.dropTargets.get(d)}getSourceType(d){return(0,R.V)(this.isSourceId(d),"Expected a valid source ID."),this.types.get(d)}getTargetType(d){return(0,R.V)(this.isTargetId(d),"Expected a valid target ID."),this.types.get(d)}isSourceId(d){return parseRoleFromHandlerId(d)===pe.SOURCE}isTargetId(d){return parseRoleFromHandlerId(d)===pe.TARGET}removeSource(d){(0,R.V)(this.getSource(d),"Expected an existing source."),this.store.dispatch(function removeSource(d){return{type:fe,payload:{sourceId:d}}}(d)),function asap(d){se.enqueueTask(ue.create(d))}((()=>{this.dragSources.delete(d),this.types.delete(d)}))}removeTarget(d){(0,R.V)(this.getTarget(d),"Expected an existing target."),this.store.dispatch(function removeTarget(d){return{type:de,payload:{targetId:d}}}(d)),this.dropTargets.delete(d),this.types.delete(d)}pinSource(d){const x=this.getSource(d);(0,R.V)(x,"Expected an existing source."),this.pinnedSourceId=d,this.pinnedSource=x}unpinSource(){(0,R.V)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(d,x,M){const E=getNextHandlerId(d);return this.types.set(E,x),d===pe.SOURCE?this.dragSources.set(E,M):d===pe.TARGET&&this.dropTargets.set(E,M),E}constructor(d){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=d}}const strictEquality=(d,x)=>d===x;function reduce(d=$,x){switch(x.type){case q:break;case ce:case he:case de:case fe:return $;default:return Q}const{targetIds:M=[],prevTargetIds:E=[]}=x.payload,C=function xor(d,x){const M=new Map,insertItem=d=>{M.set(d,M.has(d)?M.get(d)+1:1)};d.forEach(insertItem),x.forEach(insertItem);const E=[];return M.forEach(((d,x)=>{1===d&&E.push(x)})),E}(M,E);if(!(C.length>0||!function areArraysEqual(d,x,M=strictEquality){if(d.length!==x.length)return!1;for(let E=0;E<d.length;++E)if(!M(d[E],x[E]))return!1;return!0}(M,E)))return $;const j=E[E.length-1],R=M[M.length-1];return j!==R&&(j&&C.push(j),R&&C.push(R)),C}function dragOffset_defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}const ve={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function dragOffset_reduce(d=ve,x){const{payload:M}=x;switch(x.type){case D:case B:return{initialSourceClientOffset:M.sourceClientOffset,initialClientOffset:M.clientOffset,clientOffset:M.clientOffset};case q:return function areCoordsEqual(d,x){return!d&&!x||!(!d||!x)&&d.x===x.x&&d.y===x.y}(d.clientOffset,M.clientOffset)?d:function dragOffset_objectSpread(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{},E=Object.keys(M);"function"==typeof Object.getOwnPropertySymbols&&(E=E.concat(Object.getOwnPropertySymbols(M).filter((function(d){return Object.getOwnPropertyDescriptor(M,d).enumerable})))),E.forEach((function(x){dragOffset_defineProperty(d,x,M[x])}))}return d}({},d,{clientOffset:M.clientOffset});case V:case K:return ve;default:return d}}function dragOperation_defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}function dragOperation_objectSpread(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{},E=Object.keys(M);"function"==typeof Object.getOwnPropertySymbols&&(E=E.concat(Object.getOwnPropertySymbols(M).filter((function(d){return Object.getOwnPropertyDescriptor(M,d).enumerable})))),E.forEach((function(x){dragOperation_defineProperty(d,x,M[x])}))}return d}const ge={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function dragOperation_reduce(d=ge,x){const{payload:M}=x;switch(x.type){case B:return dragOperation_objectSpread({},d,{itemType:M.itemType,item:M.item,sourceId:M.sourceId,isSourcePublic:M.isSourcePublic,dropResult:null,didDrop:!1});case F:return dragOperation_objectSpread({},d,{isSourcePublic:!0});case q:return dragOperation_objectSpread({},d,{targetIds:M.targetIds});case de:return-1===d.targetIds.indexOf(M.targetId)?d:dragOperation_objectSpread({},d,{targetIds:(E=d.targetIds,C=M.targetId,E.filter((d=>d!==C)))});case K:return dragOperation_objectSpread({},d,{dropResult:M.dropResult,didDrop:!0,targetIds:[]});case V:return dragOperation_objectSpread({},d,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return d}var E,C}function refCount_reduce(d=0,x){switch(x.type){case ce:case he:return d+1;case fe:case de:return d-1;default:return d}}function stateId_reduce(d=0){return d+1}function reducers_defineProperty(d,x,M){return x in d?Object.defineProperty(d,x,{value:M,enumerable:!0,configurable:!0,writable:!0}):d[x]=M,d}function reducers_objectSpread(d){for(var x=1;x<arguments.length;x++){var M=null!=arguments[x]?arguments[x]:{},E=Object.keys(M);"function"==typeof Object.getOwnPropertySymbols&&(E=E.concat(Object.getOwnPropertySymbols(M).filter((function(d){return Object.getOwnPropertyDescriptor(M,d).enumerable})))),E.forEach((function(x){reducers_defineProperty(d,x,M[x])}))}return d}function reducers_reduce(d={},x){return{dirtyHandlerIds:reduce(d.dirtyHandlerIds,{type:x.type,payload:reducers_objectSpread({},x.payload,{prevTargetIds:(M=d,E="dragOperation.targetIds",C=[],E.split(".").reduce(((d,x)=>d&&d[x]?d[x]:C||null),M))})}),dragOffset:dragOffset_reduce(d.dragOffset,x),refCount:refCount_reduce(d.refCount,x),dragOperation:dragOperation_reduce(d.dragOperation,x),stateId:stateId_reduce(d.stateId)};var M,E,C}function createDragDropManager(d,x=void 0,M={},E=!1){const C=function makeStoreInstance(d){const x="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return createStore(reducers_reduce,d&&x&&x({name:"dnd-core",instanceId:"dnd-core"}))}(E),j=new DragDropMonitorImpl(C,new HandlerRegistryImpl(C)),R=new DragDropManagerImpl(C,j),D=d(R,x,M);return R.receiveBackend(D),R}},54552:(d,x,M)=>{"use strict";M.d(x,{H:()=>toJsxRuntime});var E={};M.r(E),M.d(E,{boolean:()=>q,booleanish:()=>K,commaOrSpaceSeparated:()=>Y,commaSeparated:()=>Q,number:()=>W,overloadedBoolean:()=>V,spaceSeparated:()=>$});var C=M(12002);const j=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,D={};function lib_name(d,x){return((x||D).jsx?R:j).test(d)}const B=/[ \t\n\f\r]/g;function empty(d){return""===d.replace(B,"")}class Schema{constructor(d,x,M){this.property=d,this.normal=x,M&&(this.space=M)}}function merge(d,x){const M={},E={};let C=-1;for(;++C<d.length;)Object.assign(M,d[C].property),Object.assign(E,d[C].normal);return new Schema(M,E,x)}function normalize(d){return d.toLowerCase()}Schema.prototype.property={},Schema.prototype.normal={},Schema.prototype.space=null;class Info{constructor(d,x){this.property=d,this.attribute=x}}Info.prototype.space=null,Info.prototype.boolean=!1,Info.prototype.booleanish=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.number=!1,Info.prototype.commaSeparated=!1,Info.prototype.spaceSeparated=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.mustUseProperty=!1,Info.prototype.defined=!1;let F=0;const q=increment(),K=increment(),V=increment(),W=increment(),$=increment(),Q=increment(),Y=increment();function increment(){return 2**++F}const ie=Object.keys(E);class DefinedInfo extends Info{constructor(d,x,M,C){let j=-1;if(super(d,x),mark(this,"space",C),"number"==typeof M)for(;++j<ie.length;){const d=ie[j];mark(this,ie[j],(M&E[d])===E[d])}}}function mark(d,x,M){M&&(d[x]=M)}DefinedInfo.prototype.defined=!0;const ae={}.hasOwnProperty;function create(d){const x={},M={};let E;for(E in d.properties)if(ae.call(d.properties,E)){const C=d.properties[E],j=new DefinedInfo(E,d.transform(d.attributes||{},E),C,d.space);d.mustUseProperty&&d.mustUseProperty.includes(E)&&(j.mustUseProperty=!0),x[E]=j,M[normalize(E)]=E,M[normalize(j.attribute)]=E}return new Schema(x,M,d.space)}const se=create({space:"xlink",transform:(d,x)=>"xlink:"+x.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),ue=create({space:"xml",transform:(d,x)=>"xml:"+x.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(d,x){return x in d?d[x]:x}function caseInsensitiveTransform(d,x){return caseSensitiveTransform(d,x.toLowerCase())}const ce=create({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),he=create({transform:(d,x)=>"role"===x?x:"aria-"+x.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:$,ariaCurrent:null,ariaDescribedBy:$,ariaDetails:null,ariaDisabled:K,ariaDropEffect:$,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:$,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$,ariaLevel:W,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:$,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:$,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:K,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null}}),fe=create({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Q,acceptCharset:$,accessKey:$,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:$,autoFocus:q,autoPlay:q,blocking:$,capture:null,charSet:null,checked:q,cite:null,className:$,cols:W,colSpan:null,content:null,contentEditable:K,controls:q,controlsList:$,coords:W|Q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:V,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:$,height:W,hidden:q,high:W,href:null,hrefLang:null,htmlFor:$,httpEquiv:$,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:$,itemRef:$,itemScope:q,itemType:$,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:W,pattern:null,ping:$,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:$,required:q,reversed:q,rows:W,rowSpan:W,sandbox:$,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:K,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:W,security:null,unselectable:null}}),de=create({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:Y,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:$,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Q,g2:Q,glyphName:Q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:Y,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Y,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Y,rev:Y,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Y,requiredFeatures:Y,requiredFonts:Y,requiredFormats:Y,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:Y,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Y,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Y,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pe=merge([ue,se,ce,he,fe],"html"),me=merge([ue,se,ce,he,de],"svg"),ve=/^data[-\w.:]+$/i,ge=/-[a-z]/g,ye=/[A-Z]/g;function kebab(d){return"-"+d.toLowerCase()}function camelcase(d){return d.charAt(1).toUpperCase()}const be={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var xe=M(8516);const we=xe.default||xe;var Me=M(54243),Ie=M(75737);const Re={}.hasOwnProperty,Be=new Map,Fe=/[A-Z]/g,qe=/-([a-z])/g,He=new Set(["table","tbody","thead","tfoot","tr"]),Xe=new Set(["td","th"]),Ze="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function toJsxRuntime(d,x){if(!x||void 0===x.Fragment)throw new TypeError("Expected `Fragment` in options");const M=x.filePath||void 0;let E;if(x.development){if("function"!=typeof x.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");E=function developmentCreate(d,x){return create;function create(M,E,C,j){const R=Array.isArray(C.children),D=(0,Me.PW)(M);return x(E,C,j,R,{columnNumber:D?D.column-1:void 0,fileName:d,lineNumber:D?D.line:void 0},void 0)}}(M,x.jsxDEV)}else{if("function"!=typeof x.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof x.jsxs)throw new TypeError("Expected `jsxs` in production options");E=function productionCreate(d,x,M){return create;function create(d,E,C,j){const R=Array.isArray(C.children)?M:x;return j?R(E,C,j):R(E,C)}}(0,x.jsx,x.jsxs)}const C={Fragment:x.Fragment,ancestors:[],components:x.components||{},create:E,elementAttributeNameCase:x.elementAttributeNameCase||"react",evaluater:x.createEvaluater?x.createEvaluater():void 0,filePath:M,ignoreInvalidStyle:x.ignoreInvalidStyle||!1,passKeys:!1!==x.passKeys,passNode:x.passNode||!1,schema:"svg"===x.space?me:pe,stylePropertyNameCase:x.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==x.tableCellAlignToStyle},j=one(C,d,void 0);return j&&"string"!=typeof j?j:C.create(d,C.Fragment,{children:j||void 0},void 0)}function one(d,x,M){return"element"===x.type?function lib_element(d,x,M){const E=d.schema;let C=E;"svg"===x.tagName.toLowerCase()&&"html"===E.space&&(C=me,d.schema=C);d.ancestors.push(x);const j=findComponentFromName(d,x.tagName,!1),R=function createElementProps(d,x){const M={};let E,C;for(C in x.properties)if("children"!==C&&Re.call(x.properties,C)){const j=createProperty(d,C,x.properties[C]);if(j){const[C,R]=j;d.tableCellAlignToStyle&&"align"===C&&"string"==typeof R&&Xe.has(x.tagName)?E=R:M[C]=R}}if(E){(M.style||(M.style={}))["css"===d.stylePropertyNameCase?"text-align":"textAlign"]=E}return M}(d,x);let D=createChildren(d,x);He.has(x.tagName)&&(D=D.filter((function(d){return"string"!=typeof d||!function whitespace(d){return"object"==typeof d?"text"===d.type&&empty(d.value):empty(d)}(d)})));return addNode(d,R,j,x),addChildren(R,D),d.ancestors.pop(),d.schema=E,d.create(x,j,R,M)}(d,x,M):"mdxFlowExpression"===x.type||"mdxTextExpression"===x.type?function mdxExpression(d,x){if(x.data&&x.data.estree&&d.evaluater){const M=x.data.estree.body[0];return(0,C.ok)("ExpressionStatement"===M.type),d.evaluater.evaluateExpression(M.expression)}crashEstree(d,x.position)}(d,x):"mdxJsxFlowElement"===x.type||"mdxJsxTextElement"===x.type?function mdxJsxElement(d,x,M){const E=d.schema;let j=E;"svg"===x.name&&"html"===E.space&&(j=me,d.schema=j);d.ancestors.push(x);const R=null===x.name?d.Fragment:findComponentFromName(d,x.name,!0),D=function createJsxElementProps(d,x){const M={};for(const E of x.attributes)if("mdxJsxExpressionAttribute"===E.type)if(E.data&&E.data.estree&&d.evaluater){const x=E.data.estree.body[0];(0,C.ok)("ExpressionStatement"===x.type);const j=x.expression;(0,C.ok)("ObjectExpression"===j.type);const R=j.properties[0];(0,C.ok)("SpreadElement"===R.type),Object.assign(M,d.evaluater.evaluateExpression(R.argument))}else crashEstree(d,x.position);else{const j=E.name;let R;if(E.value&&"object"==typeof E.value)if(E.value.data&&E.value.data.estree&&d.evaluater){const x=E.value.data.estree.body[0];(0,C.ok)("ExpressionStatement"===x.type),R=d.evaluater.evaluateExpression(x.expression)}else crashEstree(d,x.position);else R=null===E.value||E.value;M[j]=R}return M}(d,x),B=createChildren(d,x);return addNode(d,D,R,x),addChildren(D,B),d.ancestors.pop(),d.schema=E,d.create(x,R,D,M)}(d,x,M):"mdxjsEsm"===x.type?function mdxEsm(d,x){if(x.data&&x.data.estree&&d.evaluater)return d.evaluater.evaluateProgram(x.data.estree);crashEstree(d,x.position)}(d,x):"root"===x.type?function root(d,x,M){const E={};return addChildren(E,createChildren(d,x)),d.create(x,d.Fragment,E,M)}(d,x,M):"text"===x.type?function lib_text(d,x){return x.value}(0,x):void 0}function addNode(d,x,M,E){"string"!=typeof M&&M!==d.Fragment&&d.passNode&&(x.node=E)}function addChildren(d,x){if(x.length>0){const M=x.length>1?x:x[0];M&&(d.children=M)}}function createChildren(d,x){const M=[];let E=-1;const C=d.passKeys?new Map:Be;for(;++E<x.children.length;){const j=x.children[E];let R;if(d.passKeys){const d="element"===j.type?j.tagName:"mdxJsxFlowElement"===j.type||"mdxJsxTextElement"===j.type?j.name:void 0;if(d){const x=C.get(d)||0;R=d+"-"+x,C.set(d,x+1)}}const D=one(d,j,R);void 0!==D&&M.push(D)}return M}function createProperty(d,x,M){const E=function find(d,x){const M=normalize(x);let E=x,C=Info;if(M in d.normal)return d.property[d.normal[M]];if(M.length>4&&"data"===M.slice(0,4)&&ve.test(x)){if("-"===x.charAt(4)){const d=x.slice(5).replace(ge,camelcase);E="data"+d.charAt(0).toUpperCase()+d.slice(1)}else{const d=x.slice(4);if(!ge.test(d)){let M=d.replace(ye,kebab);"-"!==M.charAt(0)&&(M="-"+M),x="data"+M}}C=DefinedInfo}return new C(E,x)}(d.schema,x);if(!(null==M||"number"==typeof M&&Number.isNaN(M))){if(Array.isArray(M)&&(M=E.commaSeparated?function stringify(d,x){const M=x||{};return(""===d[d.length-1]?[...d,""]:d).join((M.padRight?" ":"")+","+(!1===M.padLeft?"":" ")).trim()}(M):function space_separated_tokens_stringify(d){return d.join(" ").trim()}(M)),"style"===E.property){let x="object"==typeof M?M:function parseStyle(d,x){const M={};try{we(x,replacer)}catch(x){if(!d.ignoreInvalidStyle){const M=x,E=new Ie.o("Cannot parse `style` attribute",{ancestors:d.ancestors,cause:M,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw E.file=d.filePath||void 0,E.url=Ze+"#cannot-parse-style-attribute",E}}return M;function replacer(d,x){let E=d;"--"!==E.slice(0,2)&&("-ms-"===E.slice(0,4)&&(E="ms-"+E.slice(4)),E=E.replace(qe,toCamel)),M[E]=x}}(d,String(M));return"css"===d.stylePropertyNameCase&&(x=function transformStylesToCssCasing(d){const x={};let M;for(M in d)Re.call(d,M)&&(x[transformStyleToCssCasing(M)]=d[M]);return x}(x)),["style",x]}return["react"===d.elementAttributeNameCase&&E.space?be[E.property]||E.property:E.attribute,M]}}function findComponentFromName(d,x,M){let E;if(M)if(x.includes(".")){const d=x.split(".");let M,j=-1;for(;++j<d.length;){const x=lib_name(d[j])?{type:"Identifier",name:d[j]}:{type:"Literal",value:d[j]};M=M?{type:"MemberExpression",object:M,property:x,computed:Boolean(j&&"Literal"===x.type),optional:!1}:x}(0,C.ok)(M,"always a result"),E=M}else E=lib_name(x)&&!/^[a-z]/.test(x)?{type:"Identifier",name:x}:{type:"Literal",value:x};else E={type:"Literal",value:x};if("Literal"===E.type){const x=E.value;return Re.call(d.components,x)?d.components[x]:x}if(d.evaluater)return d.evaluater.evaluateExpression(E);crashEstree(d)}function crashEstree(d,x){const M=new Ie.o("Cannot handle MDX estrees without `createEvaluater`",{ancestors:d.ancestors,place:x,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw M.file=d.filePath||void 0,M.url=Ze+"#cannot-handle-mdx-estrees-without-createevaluater",M}function transformStyleToCssCasing(d){let x=d.replace(Fe,toDash);return"ms-"===x.slice(0,3)&&(x="-"+x),x}function toCamel(d,x){return x.toUpperCase()}function toDash(d){return"-"+d.toLowerCase()}},24326:(d,x,M)=>{"use strict";M.d(x,{$:()=>E});const E={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]}},47159:(d,x,M)=>{"use strict";M.d(x,{BM:()=>R,CW:()=>E,Ee:()=>markdownLineEndingOrSpace,HP:()=>markdownLineEnding,JQ:()=>asciiControl,Ny:()=>q,On:()=>markdownSpace,cx:()=>j,es:()=>F,lV:()=>C,ok:()=>D,ol:()=>B});const E=regexCheck(/[A-Za-z]/),C=regexCheck(/[\dA-Za-z]/),j=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(d){return null!==d&&(d<32||127===d)}const R=regexCheck(/\d/),D=regexCheck(/[\dA-Fa-f]/),B=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(d){return null!==d&&d<-2}function markdownLineEndingOrSpace(d){return null!==d&&(d<0||32===d)}function markdownSpace(d){return-2===d||-1===d||32===d}const F=regexCheck(/\p{P}|\p{S}/u),q=regexCheck(/\s/);function regexCheck(d){return function check(x){return null!==x&&x>-1&&d.test(String.fromCharCode(x))}}},19068:(d,x,M)=>{"use strict";M.d(x,{A:()=>remarkParse});var E={};M.r(E),M.d(E,{attentionMarkers:()=>dn,contentInitial:()=>Ot,disable:()=>Sn,document:()=>Mt,flow:()=>Lt,flowInitial:()=>Nt,insideSpan:()=>Gt,string:()=>Ft,text:()=>qt});const C={};function one(d,x,M){if(function node(d){return Boolean(d&&"object"==typeof d)}(d)){if("value"in d)return"html"!==d.type||M?d.value:"";if(x&&"alt"in d&&d.alt)return d.alt;if("children"in d)return lib_all(d.children,x,M)}return Array.isArray(d)?lib_all(d,x,M):""}function lib_all(d,x,M){const E=[];let C=-1;for(;++C<d.length;)E[C]=one(d[C],x,M);return E.join("")}function splice(d,x,M,E){const C=d.length;let j,R=0;if(x=x<0?-x>C?0:C+x:x>C?C:x,M=M>0?M:0,E.length<1e4)j=Array.from(E),j.unshift(x,M),d.splice(...j);else for(M&&d.splice(x,M);R<E.length;)j=E.slice(R,R+1e4),j.unshift(x,0),d.splice(...j),R+=1e4,x+=1e4}function push(d,x){return d.length>0?(splice(d,d.length,0,x),d):x}class SpliceBuffer{constructor(d){this.left=d?[...d]:[],this.right=[]}get(d){if(d<0||d>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+d+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return d<this.left.length?this.left[d]:this.right[this.right.length-d+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(d,x){const M=null==x?Number.POSITIVE_INFINITY:x;return M<this.left.length?this.left.slice(d,M):d>this.left.length?this.right.slice(this.right.length-M+this.left.length,this.right.length-d+this.left.length).reverse():this.left.slice(d).concat(this.right.slice(this.right.length-M+this.left.length).reverse())}splice(d,x,M){const E=x||0;this.setCursor(Math.trunc(d));const C=this.right.splice(this.right.length-E,Number.POSITIVE_INFINITY);return M&&chunkedPush(this.left,M),C.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(d){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(d)}pushMany(d){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,d)}unshift(d){this.setCursor(0),this.right.push(d)}unshiftMany(d){this.setCursor(0),chunkedPush(this.right,d.reverse())}setCursor(d){if(!(d===this.left.length||d>this.left.length&&0===this.right.length||d<0&&0===this.left.length))if(d<this.left.length){const x=this.left.splice(d,Number.POSITIVE_INFINITY);chunkedPush(this.right,x.reverse())}else{const x=this.right.splice(this.left.length+this.right.length-d,Number.POSITIVE_INFINITY);chunkedPush(this.left,x.reverse())}}}function chunkedPush(d,x){let M=0;if(x.length<1e4)d.push(...x);else for(;M<x.length;)d.push(...x.slice(M,M+1e4)),M+=1e4}function subtokenize(d){const x={};let M,E,C,j,R,D,B,F=-1;const q=new SpliceBuffer(d);for(;++F<q.length;){for(;F in x;)F=x[F];if(M=q.get(F),F&&"chunkFlow"===M[1].type&&"listItemPrefix"===q.get(F-1)[1].type&&(D=M[1]._tokenizer.events,C=0,C<D.length&&"lineEndingBlank"===D[C][1].type&&(C+=2),C<D.length&&"content"===D[C][1].type))for(;++C<D.length&&"content"!==D[C][1].type;)"chunkText"===D[C][1].type&&(D[C][1]._isInFirstContentOfListItem=!0,C++);if("enter"===M[0])M[1].contentType&&(Object.assign(x,subcontent(q,F)),F=x[F],B=!0);else if(M[1]._container){for(C=F,E=void 0;C--&&(j=q.get(C),"lineEnding"===j[1].type||"lineEndingBlank"===j[1].type);)"enter"===j[0]&&(E&&(q.get(E)[1].type="lineEndingBlank"),j[1].type="lineEnding",E=C);E&&(M[1].end=Object.assign({},q.get(E)[1].start),R=q.slice(E,F),R.unshift(M),q.splice(E,F-E+1,R))}}return splice(d,0,Number.POSITIVE_INFINITY,q.slice(0)),!B}function subcontent(d,x){const M=d.get(x)[1],E=d.get(x)[2];let C=x-1;const j=[],R=M._tokenizer||E.parser[M.contentType](M.start),D=R.events,B=[],F={};let q,K,V=-1,W=M,$=0,Q=0;const Y=[Q];for(;W;){for(;d.get(++C)[1]!==W;);j.push(C),W._tokenizer||(q=E.sliceStream(W),W.next||q.push(null),K&&R.defineSkip(W.start),W._isInFirstContentOfListItem&&(R._gfmTasklistFirstContentOfListItem=!0),R.write(q),W._isInFirstContentOfListItem&&(R._gfmTasklistFirstContentOfListItem=void 0)),K=W,W=W.next}for(W=M;++V<D.length;)"exit"===D[V][0]&&"enter"===D[V-1][0]&&D[V][1].type===D[V-1][1].type&&D[V][1].start.line!==D[V][1].end.line&&(Q=V+1,Y.push(Q),W._tokenizer=void 0,W.previous=void 0,W=W.next);for(R.events=[],W?(W._tokenizer=void 0,W.previous=void 0):Y.pop(),V=Y.length;V--;){const x=D.slice(Y[V],Y[V+1]),M=j.pop();B.push([M,M+x.length-1]),d.splice(M,2,x)}for(B.reverse(),V=-1;++V<B.length;)F[$+B[V][0]]=$+B[V][1],$+=B[V][1]-B[V][0]-1;return F}const j={}.hasOwnProperty;function syntaxExtension(d,x){let M;for(M in x){const E=(j.call(d,M)?d[M]:void 0)||(d[M]={}),C=x[M];let R;if(C)for(R in C){j.call(E,R)||(E[R]=[]);const d=C[R];constructs(E[R],Array.isArray(d)?d:d?[d]:[])}}}function constructs(d,x){let M=-1;const E=[];for(;++M<x.length;)("after"===x[M].add?d:E).push(x[M]);splice(d,0,0,E)}var R=M(47159);function factorySpace(d,x,M,E){const C=E?E-1:Number.POSITIVE_INFINITY;let j=0;return function start(E){if((0,R.On)(E))return d.enter(M),prefix(E);return x(E)};function prefix(E){return(0,R.On)(E)&&j++<C?(d.consume(E),prefix):(d.exit(M),x(E))}}const D={tokenize:function initializeContent(d){const x=d.attempt(this.parser.constructs.contentInitial,(function afterContentStartConstruct(M){if(null===M)return void d.consume(M);return d.enter("lineEnding"),d.consume(M),d.exit("lineEnding"),factorySpace(d,x,"linePrefix")}),(function paragraphInitial(x){return d.enter("paragraph"),lineStart(x)}));let M;return x;function lineStart(x){const E=d.enter("chunkText",{contentType:"text",previous:M});return M&&(M.next=E),M=E,data(x)}function data(x){return null===x?(d.exit("chunkText"),d.exit("paragraph"),void d.consume(x)):(0,R.HP)(x)?(d.consume(x),d.exit("chunkText"),lineStart):(d.consume(x),data)}}};const B={tokenize:function initializeDocument(d){const x=this,M=[];let E,C,j,D=0;return start;function start(E){if(D<M.length){const C=M[D];return x.containerState=C[1],d.attempt(C[0].continuation,documentContinue,checkNewContainers)(E)}return checkNewContainers(E)}function documentContinue(d){if(D++,x.containerState._closeFlow){x.containerState._closeFlow=void 0,E&&closeFlow();const M=x.events.length;let C,j=M;for(;j--;)if("exit"===x.events[j][0]&&"chunkFlow"===x.events[j][1].type){C=x.events[j][1].end;break}exitContainers(D);let R=M;for(;R<x.events.length;)x.events[R][1].end=Object.assign({},C),R++;return splice(x.events,j+1,0,x.events.slice(M)),x.events.length=R,checkNewContainers(d)}return start(d)}function checkNewContainers(C){if(D===M.length){if(!E)return documentContinued(C);if(E.currentConstruct&&E.currentConstruct.concrete)return flowStart(C);x.interrupt=Boolean(E.currentConstruct&&!E._gfmTableDynamicInterruptHack)}return x.containerState={},d.check(F,thereIsANewContainer,thereIsNoNewContainer)(C)}function thereIsANewContainer(d){return E&&closeFlow(),exitContainers(D),documentContinued(d)}function thereIsNoNewContainer(d){return x.parser.lazy[x.now().line]=D!==M.length,j=x.now().offset,flowStart(d)}function documentContinued(M){return x.containerState={},d.attempt(F,containerContinue,flowStart)(M)}function containerContinue(d){return D++,M.push([x.currentConstruct,x.containerState]),documentContinued(d)}function flowStart(M){return null===M?(E&&closeFlow(),exitContainers(0),void d.consume(M)):(E=E||x.parser.flow(x.now()),d.enter("chunkFlow",{contentType:"flow",previous:C,_tokenizer:E}),flowContinue(M))}function flowContinue(M){return null===M?(writeToChild(d.exit("chunkFlow"),!0),exitContainers(0),void d.consume(M)):(0,R.HP)(M)?(d.consume(M),writeToChild(d.exit("chunkFlow")),D=0,x.interrupt=void 0,start):(d.consume(M),flowContinue)}function writeToChild(d,M){const R=x.sliceStream(d);if(M&&R.push(null),d.previous=C,C&&(C.next=d),C=d,E.defineSkip(d.start),E.write(R),x.parser.lazy[d.start.line]){let d=E.events.length;for(;d--;)if(E.events[d][1].start.offset<j&&(!E.events[d][1].end||E.events[d][1].end.offset>j))return;const M=x.events.length;let C,R,B=M;for(;B--;)if("exit"===x.events[B][0]&&"chunkFlow"===x.events[B][1].type){if(C){R=x.events[B][1].end;break}C=!0}for(exitContainers(D),d=M;d<x.events.length;)x.events[d][1].end=Object.assign({},R),d++;splice(x.events,B+1,0,x.events.slice(M)),x.events.length=d}}function exitContainers(E){let C=M.length;for(;C-- >E;){const E=M[C];x.containerState=E[1],E[0].exit.call(x,d)}M.length=E}function closeFlow(){E.write([null]),C=void 0,E=void 0,x.containerState._closeFlow=void 0}}},F={tokenize:function tokenizeContainer(d,x,M){return factorySpace(d,d.attempt(this.parser.constructs.document,x,M),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const q={tokenize:function tokenizeBlankLine(d,x,M){return function start(x){return(0,R.On)(x)?factorySpace(d,after,"linePrefix")(x):after(x)};function after(d){return null===d||(0,R.HP)(d)?x(d):M(d)}},partial:!0};const K={tokenize:function tokenizeContent(d,x){let M;return function chunkStart(x){return d.enter("content"),M=d.enter("chunkContent",{contentType:"content"}),chunkInside(x)};function chunkInside(x){return null===x?contentEnd(x):(0,R.HP)(x)?d.check(V,contentContinue,contentEnd)(x):(d.consume(x),chunkInside)}function contentEnd(M){return d.exit("chunkContent"),d.exit("content"),x(M)}function contentContinue(x){return d.consume(x),d.exit("chunkContent"),M.next=d.enter("chunkContent",{contentType:"content",previous:M}),M=M.next,chunkInside}},resolve:function resolveContent(d){return subtokenize(d),d}},V={tokenize:function tokenizeContinuation(d,x,M){const E=this;return function startLookahead(x){return d.exit("chunkContent"),d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),factorySpace(d,prefixed,"linePrefix")};function prefixed(C){if(null===C||(0,R.HP)(C))return M(C);const j=E.events[E.events.length-1];return!E.parser.constructs.disable.null.includes("codeIndented")&&j&&"linePrefix"===j[1].type&&j[2].sliceSerialize(j[1],!0).length>=4?x(C):d.interrupt(E.parser.constructs.flow,M,x)(C)}},partial:!0};const W={tokenize:function initializeFlow(d){const x=this,M=d.attempt(q,(function atBlankEnding(E){if(null===E)return void d.consume(E);return d.enter("lineEndingBlank"),d.consume(E),d.exit("lineEndingBlank"),x.currentConstruct=void 0,M}),d.attempt(this.parser.constructs.flowInitial,afterConstruct,factorySpace(d,d.attempt(this.parser.constructs.flow,afterConstruct,d.attempt(K,afterConstruct)),"linePrefix")));return M;function afterConstruct(E){if(null!==E)return d.enter("lineEnding"),d.consume(E),d.exit("lineEnding"),x.currentConstruct=void 0,M;d.consume(E)}}};const $={resolveAll:createResolver()},Q=initializeFactory("string"),Y=initializeFactory("text");function initializeFactory(d){return{tokenize:function initializeText(x){const M=this,E=this.parser.constructs[d],C=x.attempt(E,start,notText);return start;function start(d){return atBreak(d)?C(d):notText(d)}function notText(d){if(null!==d)return x.enter("data"),x.consume(d),data;x.consume(d)}function data(d){return atBreak(d)?(x.exit("data"),C(d)):(x.consume(d),data)}function atBreak(d){if(null===d)return!0;const x=E[d];let C=-1;if(x)for(;++C<x.length;){const d=x[C];if(!d.previous||d.previous.call(M,M.previous))return!0}return!1}},resolveAll:createResolver("text"===d?resolveAllLineSuffixes:void 0)}}function createResolver(d){return function resolveAllText(x,M){let E,C=-1;for(;++C<=x.length;)void 0===E?x[C]&&"data"===x[C][1].type&&(E=C,C++):x[C]&&"data"===x[C][1].type||(C!==E+2&&(x[E][1].end=x[C-1][1].end,x.splice(E+2,C-E-2),C=E+2),E=void 0);return d?d(x,M):x}}function resolveAllLineSuffixes(d,x){let M=0;for(;++M<=d.length;)if((M===d.length||"lineEnding"===d[M][1].type)&&"data"===d[M-1][1].type){const E=d[M-1][1],C=x.sliceStream(E);let j,R=C.length,D=-1,B=0;for(;R--;){const d=C[R];if("string"==typeof d){for(D=d.length;32===d.charCodeAt(D-1);)B++,D--;if(D)break;D=-1}else if(-2===d)j=!0,B++;else if(-1!==d){R++;break}}if(B){const C={type:M===d.length||j||B<2?"lineSuffix":"hardBreakTrailing",start:{line:E.end.line,column:E.end.column-B,offset:E.end.offset-B,_index:E.start._index+R,_bufferIndex:R?D:E.start._bufferIndex+D},end:Object.assign({},E.end)};E.end=Object.assign({},C.start),E.start.offset===E.end.offset?Object.assign(E,C):(d.splice(M,0,["enter",C,x],["exit",C,x]),M+=2)}M++}return d}function resolveAll(d,x,M){const E=[];let C=-1;for(;++C<d.length;){const j=d[C].resolveAll;j&&!E.includes(j)&&(x=j(x,M),E.push(j))}return x}function createTokenizer(d,x,M){let E=Object.assign(M?Object.assign({},M):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const C={},j=[];let D=[],B=[],F=!0;const q={consume:function consume(d){(0,R.HP)(d)?(E.line++,E.column=1,E.offset+=-3===d?2:1,accountForPotentialSkip()):-1!==d&&(E.column++,E.offset++);E._bufferIndex<0?E._index++:(E._bufferIndex++,E._bufferIndex===D[E._index].length&&(E._bufferIndex=-1,E._index++));K.previous=d,F=!0},enter:function enter(d,x){const M=x||{};return M.type=d,M.start=now(),K.events.push(["enter",M,K]),B.push(M),M},exit:function exit(d){const x=B.pop();return x.end=now(),K.events.push(["exit",x,K]),x},attempt:constructFactory((function onsuccessfulconstruct(d,x){addResult(d,x.from)})),check:constructFactory(onsuccessfulcheck),interrupt:constructFactory(onsuccessfulcheck,{interrupt:!0})},K={previous:null,code:null,containerState:{},events:[],parser:d,sliceStream,sliceSerialize:function sliceSerialize(d,x){return function serializeChunks(d,x){let M=-1;const E=[];let C;for(;++M<d.length;){const j=d[M];let R;if("string"==typeof j)R=j;else switch(j){case-5:R="\r";break;case-4:R="\n";break;case-3:R="\r\n";break;case-2:R=x?" ":"\t";break;case-1:if(!x&&C)continue;R=" ";break;default:R=String.fromCharCode(j)}C=-2===j,E.push(R)}return E.join("")}(sliceStream(d),x)},now,defineSkip:function defineSkip(d){C[d.line]=d.column,accountForPotentialSkip()},write:function write(d){if(D=push(D,d),main(),null!==D[D.length-1])return[];return addResult(x,0),K.events=resolveAll(j,K.events,K),K.events}};let V,W=x.tokenize.call(K,q);return x.resolveAll&&j.push(x),K;function sliceStream(d){return function sliceChunks(d,x){const M=x.start._index,E=x.start._bufferIndex,C=x.end._index,j=x.end._bufferIndex;let R;if(M===C)R=[d[M].slice(E,j)];else{if(R=d.slice(M,C),E>-1){const d=R[0];"string"==typeof d?R[0]=d.slice(E):R.shift()}j>0&&R.push(d[C].slice(0,j))}return R}(D,d)}function now(){const{line:d,column:x,offset:M,_index:C,_bufferIndex:j}=E;return{line:d,column:x,offset:M,_index:C,_bufferIndex:j}}function main(){let d;for(;E._index<D.length;){const x=D[E._index];if("string"==typeof x)for(d=E._index,E._bufferIndex<0&&(E._bufferIndex=0);E._index===d&&E._bufferIndex<x.length;)go(x.charCodeAt(E._bufferIndex));else go(x)}}function go(d){F=void 0,V=d,W=W(d)}function onsuccessfulcheck(d,x){x.restore()}function constructFactory(d,x){return function hook(M,C,j){let R,D,V,W;return Array.isArray(M)?handleListOfConstructs(M):"tokenize"in M?handleListOfConstructs([M]):function handleMapOfConstructs(d){return start;function start(x){const M=null!==x&&d[x],E=null!==x&&d.null;return handleListOfConstructs([...Array.isArray(M)?M:M?[M]:[],...Array.isArray(E)?E:E?[E]:[]])(x)}}(M);function handleListOfConstructs(d){return R=d,D=0,0===d.length?j:handleConstruct(d[D])}function handleConstruct(d){return function start(M){W=function store(){const d=now(),x=K.previous,M=K.currentConstruct,C=K.events.length,j=Array.from(B);return{restore,from:C};function restore(){E=d,K.previous=x,K.currentConstruct=M,K.events.length=C,B=j,accountForPotentialSkip()}}(),V=d,d.partial||(K.currentConstruct=d);if(d.name&&K.parser.constructs.disable.null.includes(d.name))return nok(M);return d.tokenize.call(x?Object.assign(Object.create(K),x):K,q,ok,nok)(M)}}function ok(x){return F=!0,d(V,W),C}function nok(d){return F=!0,W.restore(),++D<R.length?handleConstruct(R[D]):j}}}function addResult(d,x){d.resolveAll&&!j.includes(d)&&j.push(d),d.resolve&&splice(K.events,x,K.events.length-x,d.resolve(K.events.slice(x),K)),d.resolveTo&&(K.events=d.resolveTo(K.events,K))}function accountForPotentialSkip(){E.line in C&&E.column<2&&(E.column=C[E.line],E.offset+=C[E.line]-1)}}const ie={name:"thematicBreak",tokenize:function tokenizeThematicBreak(d,x,M){let E,C=0;return function start(x){return d.enter("thematicBreak"),function before(d){return E=d,atBreak(d)}(x)};function atBreak(j){return j===E?(d.enter("thematicBreakSequence"),sequence(j)):C>=3&&(null===j||(0,R.HP)(j))?(d.exit("thematicBreak"),x(j)):M(j)}function sequence(x){return x===E?(d.consume(x),C++,sequence):(d.exit("thematicBreakSequence"),(0,R.On)(x)?factorySpace(d,atBreak,"whitespace")(x):atBreak(x))}}};const ae={name:"list",tokenize:function tokenizeListStart(d,x,M){const E=this,C=E.events[E.events.length-1];let j=C&&"linePrefix"===C[1].type?C[2].sliceSerialize(C[1],!0).length:0,D=0;return function start(x){const C=E.containerState.type||(42===x||43===x||45===x?"listUnordered":"listOrdered");if("listUnordered"===C?!E.containerState.marker||x===E.containerState.marker:(0,R.BM)(x)){if(E.containerState.type||(E.containerState.type=C,d.enter(C,{_container:!0})),"listUnordered"===C)return d.enter("listItemPrefix"),42===x||45===x?d.check(ie,M,atMarker)(x):atMarker(x);if(!E.interrupt||49===x)return d.enter("listItemPrefix"),d.enter("listItemValue"),inside(x)}return M(x)};function inside(x){return(0,R.BM)(x)&&++D<10?(d.consume(x),inside):(!E.interrupt||D<2)&&(E.containerState.marker?x===E.containerState.marker:41===x||46===x)?(d.exit("listItemValue"),atMarker(x)):M(x)}function atMarker(x){return d.enter("listItemMarker"),d.consume(x),d.exit("listItemMarker"),E.containerState.marker=E.containerState.marker||x,d.check(q,E.interrupt?M:onBlank,d.attempt(se,endOfPrefix,otherPrefix))}function onBlank(d){return E.containerState.initialBlankLine=!0,j++,endOfPrefix(d)}function otherPrefix(x){return(0,R.On)(x)?(d.enter("listItemPrefixWhitespace"),d.consume(x),d.exit("listItemPrefixWhitespace"),endOfPrefix):M(x)}function endOfPrefix(M){return E.containerState.size=j+E.sliceSerialize(d.exit("listItemPrefix"),!0).length,x(M)}},continuation:{tokenize:function tokenizeListContinuation(d,x,M){const E=this;return E.containerState._closeFlow=void 0,d.check(q,(function onBlank(M){return E.containerState.furtherBlankLines=E.containerState.furtherBlankLines||E.containerState.initialBlankLine,factorySpace(d,x,"listItemIndent",E.containerState.size+1)(M)}),(function notBlank(M){if(E.containerState.furtherBlankLines||!(0,R.On)(M))return E.containerState.furtherBlankLines=void 0,E.containerState.initialBlankLine=void 0,notInCurrentItem(M);return E.containerState.furtherBlankLines=void 0,E.containerState.initialBlankLine=void 0,d.attempt(ue,x,notInCurrentItem)(M)}));function notInCurrentItem(C){return E.containerState._closeFlow=!0,E.interrupt=void 0,factorySpace(d,d.attempt(ae,x,M),"linePrefix",E.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C)}}},exit:function tokenizeListEnd(d){d.exit(this.containerState.type)}},se={tokenize:function tokenizeListItemPrefixWhitespace(d,x,M){const E=this;return factorySpace(d,(function afterPrefix(d){const C=E.events[E.events.length-1];return!(0,R.On)(d)&&C&&"listItemPrefixWhitespace"===C[1].type?x(d):M(d)}),"listItemPrefixWhitespace",E.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},ue={tokenize:function tokenizeIndent(d,x,M){const E=this;return factorySpace(d,(function afterPrefix(d){const C=E.events[E.events.length-1];return C&&"listItemIndent"===C[1].type&&C[2].sliceSerialize(C[1],!0).length===E.containerState.size?x(d):M(d)}),"listItemIndent",E.containerState.size+1)},partial:!0};const ce={name:"blockQuote",tokenize:function tokenizeBlockQuoteStart(d,x,M){const E=this;return function start(x){if(62===x){const M=E.containerState;return M.open||(d.enter("blockQuote",{_container:!0}),M.open=!0),d.enter("blockQuotePrefix"),d.enter("blockQuoteMarker"),d.consume(x),d.exit("blockQuoteMarker"),after}return M(x)};function after(M){return(0,R.On)(M)?(d.enter("blockQuotePrefixWhitespace"),d.consume(M),d.exit("blockQuotePrefixWhitespace"),d.exit("blockQuotePrefix"),x):(d.exit("blockQuotePrefix"),x(M))}},continuation:{tokenize:function tokenizeBlockQuoteContinuation(d,x,M){const E=this;return function contStart(x){if((0,R.On)(x))return factorySpace(d,contBefore,"linePrefix",E.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x);return contBefore(x)};function contBefore(E){return d.attempt(ce,x,M)(E)}}},exit:function exit(d){d.exit("blockQuote")}};function factoryDestination(d,x,M,E,C,j,D,B,F){const q=F||Number.POSITIVE_INFINITY;let K=0;return function start(x){if(60===x)return d.enter(E),d.enter(C),d.enter(j),d.consume(x),d.exit(j),enclosedBefore;if(null===x||32===x||41===x||(0,R.JQ)(x))return M(x);return d.enter(E),d.enter(D),d.enter(B),d.enter("chunkString",{contentType:"string"}),raw(x)};function enclosedBefore(M){return 62===M?(d.enter(j),d.consume(M),d.exit(j),d.exit(C),d.exit(E),x):(d.enter(B),d.enter("chunkString",{contentType:"string"}),enclosed(M))}function enclosed(x){return 62===x?(d.exit("chunkString"),d.exit(B),enclosedBefore(x)):null===x||60===x||(0,R.HP)(x)?M(x):(d.consume(x),92===x?enclosedEscape:enclosed)}function enclosedEscape(x){return 60===x||62===x||92===x?(d.consume(x),enclosed):enclosed(x)}function raw(C){return K||null!==C&&41!==C&&!(0,R.Ee)(C)?K<q&&40===C?(d.consume(C),K++,raw):41===C?(d.consume(C),K--,raw):null===C||32===C||40===C||(0,R.JQ)(C)?M(C):(d.consume(C),92===C?rawEscape:raw):(d.exit("chunkString"),d.exit(B),d.exit(D),d.exit(E),x(C))}function rawEscape(x){return 40===x||41===x||92===x?(d.consume(x),raw):raw(x)}}function factoryLabel(d,x,M,E,C,j){const D=this;let B,F=0;return function start(x){return d.enter(E),d.enter(C),d.consume(x),d.exit(C),d.enter(j),atBreak};function atBreak(q){return F>999||null===q||91===q||93===q&&!B||94===q&&!F&&"_hiddenFootnoteSupport"in D.parser.constructs?M(q):93===q?(d.exit(j),d.enter(C),d.consume(q),d.exit(C),d.exit(E),x):(0,R.HP)(q)?(d.enter("lineEnding"),d.consume(q),d.exit("lineEnding"),atBreak):(d.enter("chunkString",{contentType:"string"}),labelInside(q))}function labelInside(x){return null===x||91===x||93===x||(0,R.HP)(x)||F++>999?(d.exit("chunkString"),atBreak(x)):(d.consume(x),B||(B=!(0,R.On)(x)),92===x?labelEscape:labelInside)}function labelEscape(x){return 91===x||92===x||93===x?(d.consume(x),F++,labelInside):labelInside(x)}}function factoryTitle(d,x,M,E,C,j){let D;return function start(x){if(34===x||39===x||40===x)return d.enter(E),d.enter(C),d.consume(x),d.exit(C),D=40===x?41:x,begin;return M(x)};function begin(M){return M===D?(d.enter(C),d.consume(M),d.exit(C),d.exit(E),x):(d.enter(j),atBreak(M))}function atBreak(x){return x===D?(d.exit(j),begin(D)):null===x?M(x):(0,R.HP)(x)?(d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),factorySpace(d,atBreak,"linePrefix")):(d.enter("chunkString",{contentType:"string"}),inside(x))}function inside(x){return x===D||null===x||(0,R.HP)(x)?(d.exit("chunkString"),atBreak(x)):(d.consume(x),92===x?escape:inside)}function escape(x){return x===D||92===x?(d.consume(x),inside):inside(x)}}function factoryWhitespace(d,x){let M;return function start(E){if((0,R.HP)(E))return d.enter("lineEnding"),d.consume(E),d.exit("lineEnding"),M=!0,start;if((0,R.On)(E))return factorySpace(d,start,M?"linePrefix":"lineSuffix")(E);return x(E)}}function normalizeIdentifier(d){return d.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const he={name:"definition",tokenize:function tokenizeDefinition(d,x,M){const E=this;let C;return function start(x){return d.enter("definition"),function before(x){return factoryLabel.call(E,d,labelAfter,M,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}(x)};function labelAfter(x){return C=normalizeIdentifier(E.sliceSerialize(E.events[E.events.length-1][1]).slice(1,-1)),58===x?(d.enter("definitionMarker"),d.consume(x),d.exit("definitionMarker"),markerAfter):M(x)}function markerAfter(x){return(0,R.Ee)(x)?factoryWhitespace(d,destinationBefore)(x):destinationBefore(x)}function destinationBefore(x){return factoryDestination(d,destinationAfter,M,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function destinationAfter(x){return d.attempt(fe,after,after)(x)}function after(x){return(0,R.On)(x)?factorySpace(d,afterWhitespace,"whitespace")(x):afterWhitespace(x)}function afterWhitespace(j){return null===j||(0,R.HP)(j)?(d.exit("definition"),E.parser.defined.push(C),x(j)):M(j)}}},fe={tokenize:function tokenizeTitleBefore(d,x,M){return function titleBefore(x){return(0,R.Ee)(x)?factoryWhitespace(d,beforeMarker)(x):M(x)};function beforeMarker(x){return factoryTitle(d,titleAfter,M,"definitionTitle","definitionTitleMarker","definitionTitleString")(x)}function titleAfter(x){return(0,R.On)(x)?factorySpace(d,titleAfterOptionalWhitespace,"whitespace")(x):titleAfterOptionalWhitespace(x)}function titleAfterOptionalWhitespace(d){return null===d||(0,R.HP)(d)?x(d):M(d)}},partial:!0};const de={name:"codeIndented",tokenize:function tokenizeCodeIndented(d,x,M){const E=this;return function start(x){return d.enter("codeIndented"),factorySpace(d,afterPrefix,"linePrefix",5)(x)};function afterPrefix(d){const x=E.events[E.events.length-1];return x&&"linePrefix"===x[1].type&&x[2].sliceSerialize(x[1],!0).length>=4?atBreak(d):M(d)}function atBreak(x){return null===x?after(x):(0,R.HP)(x)?d.attempt(pe,atBreak,after)(x):(d.enter("codeFlowValue"),inside(x))}function inside(x){return null===x||(0,R.HP)(x)?(d.exit("codeFlowValue"),atBreak(x)):(d.consume(x),inside)}function after(M){return d.exit("codeIndented"),x(M)}}},pe={tokenize:function tokenizeFurtherStart(d,x,M){const E=this;return furtherStart;function furtherStart(x){return E.parser.lazy[E.now().line]?M(x):(0,R.HP)(x)?(d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),furtherStart):factorySpace(d,afterPrefix,"linePrefix",5)(x)}function afterPrefix(d){const C=E.events[E.events.length-1];return C&&"linePrefix"===C[1].type&&C[2].sliceSerialize(C[1],!0).length>=4?x(d):(0,R.HP)(d)?furtherStart(d):M(d)}},partial:!0};const me={name:"headingAtx",tokenize:function tokenizeHeadingAtx(d,x,M){let E=0;return function start(x){return d.enter("atxHeading"),function before(x){return d.enter("atxHeadingSequence"),sequenceOpen(x)}(x)};function sequenceOpen(x){return 35===x&&E++<6?(d.consume(x),sequenceOpen):null===x||(0,R.Ee)(x)?(d.exit("atxHeadingSequence"),atBreak(x)):M(x)}function atBreak(M){return 35===M?(d.enter("atxHeadingSequence"),sequenceFurther(M)):null===M||(0,R.HP)(M)?(d.exit("atxHeading"),x(M)):(0,R.On)(M)?factorySpace(d,atBreak,"whitespace")(M):(d.enter("atxHeadingText"),data(M))}function sequenceFurther(x){return 35===x?(d.consume(x),sequenceFurther):(d.exit("atxHeadingSequence"),atBreak(x))}function data(x){return null===x||35===x||(0,R.Ee)(x)?(d.exit("atxHeadingText"),atBreak(x)):(d.consume(x),data)}},resolve:function resolveHeadingAtx(d,x){let M,E,C=d.length-2,j=3;"whitespace"===d[j][1].type&&(j+=2);C-2>j&&"whitespace"===d[C][1].type&&(C-=2);"atxHeadingSequence"===d[C][1].type&&(j===C-1||C-4>j&&"whitespace"===d[C-2][1].type)&&(C-=j+1===C?2:4);C>j&&(M={type:"atxHeadingText",start:d[j][1].start,end:d[C][1].end},E={type:"chunkText",start:d[j][1].start,end:d[C][1].end,contentType:"text"},splice(d,j,C-j+1,[["enter",M,x],["enter",E,x],["exit",E,x],["exit",M,x]]));return d}};const ve={name:"setextUnderline",tokenize:function tokenizeSetextUnderline(d,x,M){const E=this;let C;return function start(x){let j,R=E.events.length;for(;R--;)if("lineEnding"!==E.events[R][1].type&&"linePrefix"!==E.events[R][1].type&&"content"!==E.events[R][1].type){j="paragraph"===E.events[R][1].type;break}if(!E.parser.lazy[E.now().line]&&(E.interrupt||j))return d.enter("setextHeadingLine"),C=x,function before(x){return d.enter("setextHeadingLineSequence"),inside(x)}(x);return M(x)};function inside(x){return x===C?(d.consume(x),inside):(d.exit("setextHeadingLineSequence"),(0,R.On)(x)?factorySpace(d,after,"lineSuffix")(x):after(x))}function after(E){return null===E||(0,R.HP)(E)?(d.exit("setextHeadingLine"),x(E)):M(E)}},resolveTo:function resolveToSetextUnderline(d,x){let M,E,C,j=d.length;for(;j--;)if("enter"===d[j][0]){if("content"===d[j][1].type){M=j;break}"paragraph"===d[j][1].type&&(E=j)}else"content"===d[j][1].type&&d.splice(j,1),C||"definition"!==d[j][1].type||(C=j);const R={type:"setextHeading",start:Object.assign({},d[E][1].start),end:Object.assign({},d[d.length-1][1].end)};d[E][1].type="setextHeadingText",C?(d.splice(E,0,["enter",R,x]),d.splice(C+1,0,["exit",d[M][1],x]),d[M][1].end=Object.assign({},d[C][1].end)):d[M][1]=R;return d.push(["exit",R,x]),d}};const ge=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ye=["pre","script","style","textarea"],be={name:"htmlFlow",tokenize:function tokenizeHtmlFlow(d,x,M){const E=this;let C,j,D,B,F;return function start(x){return function before(x){return d.enter("htmlFlow"),d.enter("htmlFlowData"),d.consume(x),open}(x)};function open(B){return 33===B?(d.consume(B),declarationOpen):47===B?(d.consume(B),j=!0,tagCloseStart):63===B?(d.consume(B),C=3,E.interrupt?x:continuationDeclarationInside):(0,R.CW)(B)?(d.consume(B),D=String.fromCharCode(B),tagName):M(B)}function declarationOpen(j){return 45===j?(d.consume(j),C=2,commentOpenInside):91===j?(d.consume(j),C=5,B=0,cdataOpenInside):(0,R.CW)(j)?(d.consume(j),C=4,E.interrupt?x:continuationDeclarationInside):M(j)}function commentOpenInside(C){return 45===C?(d.consume(C),E.interrupt?x:continuationDeclarationInside):M(C)}function cdataOpenInside(C){const j="CDATA[";return C===j.charCodeAt(B++)?(d.consume(C),6===B?E.interrupt?x:continuation:cdataOpenInside):M(C)}function tagCloseStart(x){return(0,R.CW)(x)?(d.consume(x),D=String.fromCharCode(x),tagName):M(x)}function tagName(B){if(null===B||47===B||62===B||(0,R.Ee)(B)){const R=47===B,F=D.toLowerCase();return R||j||!ye.includes(F)?ge.includes(D.toLowerCase())?(C=6,R?(d.consume(B),basicSelfClosing):E.interrupt?x(B):continuation(B)):(C=7,E.interrupt&&!E.parser.lazy[E.now().line]?M(B):j?completeClosingTagAfter(B):completeAttributeNameBefore(B)):(C=1,E.interrupt?x(B):continuation(B))}return 45===B||(0,R.lV)(B)?(d.consume(B),D+=String.fromCharCode(B),tagName):M(B)}function basicSelfClosing(C){return 62===C?(d.consume(C),E.interrupt?x:continuation):M(C)}function completeClosingTagAfter(x){return(0,R.On)(x)?(d.consume(x),completeClosingTagAfter):completeEnd(x)}function completeAttributeNameBefore(x){return 47===x?(d.consume(x),completeEnd):58===x||95===x||(0,R.CW)(x)?(d.consume(x),completeAttributeName):(0,R.On)(x)?(d.consume(x),completeAttributeNameBefore):completeEnd(x)}function completeAttributeName(x){return 45===x||46===x||58===x||95===x||(0,R.lV)(x)?(d.consume(x),completeAttributeName):completeAttributeNameAfter(x)}function completeAttributeNameAfter(x){return 61===x?(d.consume(x),completeAttributeValueBefore):(0,R.On)(x)?(d.consume(x),completeAttributeNameAfter):completeAttributeNameBefore(x)}function completeAttributeValueBefore(x){return null===x||60===x||61===x||62===x||96===x?M(x):34===x||39===x?(d.consume(x),F=x,completeAttributeValueQuoted):(0,R.On)(x)?(d.consume(x),completeAttributeValueBefore):completeAttributeValueUnquoted(x)}function completeAttributeValueQuoted(x){return x===F?(d.consume(x),F=null,completeAttributeValueQuotedAfter):null===x||(0,R.HP)(x)?M(x):(d.consume(x),completeAttributeValueQuoted)}function completeAttributeValueUnquoted(x){return null===x||34===x||39===x||47===x||60===x||61===x||62===x||96===x||(0,R.Ee)(x)?completeAttributeNameAfter(x):(d.consume(x),completeAttributeValueUnquoted)}function completeAttributeValueQuotedAfter(d){return 47===d||62===d||(0,R.On)(d)?completeAttributeNameBefore(d):M(d)}function completeEnd(x){return 62===x?(d.consume(x),completeAfter):M(x)}function completeAfter(x){return null===x||(0,R.HP)(x)?continuation(x):(0,R.On)(x)?(d.consume(x),completeAfter):M(x)}function continuation(x){return 45===x&&2===C?(d.consume(x),continuationCommentInside):60===x&&1===C?(d.consume(x),continuationRawTagOpen):62===x&&4===C?(d.consume(x),continuationClose):63===x&&3===C?(d.consume(x),continuationDeclarationInside):93===x&&5===C?(d.consume(x),continuationCdataInside):!(0,R.HP)(x)||6!==C&&7!==C?null===x||(0,R.HP)(x)?(d.exit("htmlFlowData"),continuationStart(x)):(d.consume(x),continuation):(d.exit("htmlFlowData"),d.check(xe,continuationAfter,continuationStart)(x))}function continuationStart(x){return d.check(we,continuationStartNonLazy,continuationAfter)(x)}function continuationStartNonLazy(x){return d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),continuationBefore}function continuationBefore(x){return null===x||(0,R.HP)(x)?continuationStart(x):(d.enter("htmlFlowData"),continuation(x))}function continuationCommentInside(x){return 45===x?(d.consume(x),continuationDeclarationInside):continuation(x)}function continuationRawTagOpen(x){return 47===x?(d.consume(x),D="",continuationRawEndTag):continuation(x)}function continuationRawEndTag(x){if(62===x){const M=D.toLowerCase();return ye.includes(M)?(d.consume(x),continuationClose):continuation(x)}return(0,R.CW)(x)&&D.length<8?(d.consume(x),D+=String.fromCharCode(x),continuationRawEndTag):continuation(x)}function continuationCdataInside(x){return 93===x?(d.consume(x),continuationDeclarationInside):continuation(x)}function continuationDeclarationInside(x){return 62===x?(d.consume(x),continuationClose):45===x&&2===C?(d.consume(x),continuationDeclarationInside):continuation(x)}function continuationClose(x){return null===x||(0,R.HP)(x)?(d.exit("htmlFlowData"),continuationAfter(x)):(d.consume(x),continuationClose)}function continuationAfter(M){return d.exit("htmlFlow"),x(M)}},resolveTo:function resolveToHtmlFlow(d){let x=d.length;for(;x--&&("enter"!==d[x][0]||"htmlFlow"!==d[x][1].type););x>1&&"linePrefix"===d[x-2][1].type&&(d[x][1].start=d[x-2][1].start,d[x+1][1].start=d[x-2][1].start,d.splice(x-2,2));return d},concrete:!0},xe={tokenize:function tokenizeBlankLineBefore(d,x,M){return function start(E){return d.enter("lineEnding"),d.consume(E),d.exit("lineEnding"),d.attempt(q,x,M)}},partial:!0},we={tokenize:function tokenizeNonLazyContinuationStart(d,x,M){const E=this;return function start(x){if((0,R.HP)(x))return d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),after;return M(x)};function after(d){return E.parser.lazy[E.now().line]?M(d):x(d)}},partial:!0};const Me={tokenize:function tokenizeNonLazyContinuation(d,x,M){const E=this;return function start(x){if(null===x)return M(x);return d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),lineStart};function lineStart(d){return E.parser.lazy[E.now().line]?M(d):x(d)}},partial:!0},Ie={name:"codeFenced",tokenize:function tokenizeCodeFenced(d,x,M){const E=this,C={tokenize:function tokenizeCloseStart(d,x,M){let C=0;return startBefore;function startBefore(x){return d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),start}function start(x){return d.enter("codeFencedFence"),(0,R.On)(x)?factorySpace(d,beforeSequenceClose,"linePrefix",E.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):beforeSequenceClose(x)}function beforeSequenceClose(x){return x===j?(d.enter("codeFencedFenceSequence"),sequenceClose(x)):M(x)}function sequenceClose(x){return x===j?(C++,d.consume(x),sequenceClose):C>=B?(d.exit("codeFencedFenceSequence"),(0,R.On)(x)?factorySpace(d,sequenceCloseAfter,"whitespace")(x):sequenceCloseAfter(x)):M(x)}function sequenceCloseAfter(E){return null===E||(0,R.HP)(E)?(d.exit("codeFencedFence"),x(E)):M(E)}},partial:!0};let j,D=0,B=0;return function start(x){return function beforeSequenceOpen(x){const M=E.events[E.events.length-1];return D=M&&"linePrefix"===M[1].type?M[2].sliceSerialize(M[1],!0).length:0,j=x,d.enter("codeFenced"),d.enter("codeFencedFence"),d.enter("codeFencedFenceSequence"),sequenceOpen(x)}(x)};function sequenceOpen(x){return x===j?(B++,d.consume(x),sequenceOpen):B<3?M(x):(d.exit("codeFencedFenceSequence"),(0,R.On)(x)?factorySpace(d,infoBefore,"whitespace")(x):infoBefore(x))}function infoBefore(M){return null===M||(0,R.HP)(M)?(d.exit("codeFencedFence"),E.interrupt?x(M):d.check(Me,atNonLazyBreak,after)(M)):(d.enter("codeFencedFenceInfo"),d.enter("chunkString",{contentType:"string"}),info(M))}function info(x){return null===x||(0,R.HP)(x)?(d.exit("chunkString"),d.exit("codeFencedFenceInfo"),infoBefore(x)):(0,R.On)(x)?(d.exit("chunkString"),d.exit("codeFencedFenceInfo"),factorySpace(d,metaBefore,"whitespace")(x)):96===x&&x===j?M(x):(d.consume(x),info)}function metaBefore(x){return null===x||(0,R.HP)(x)?infoBefore(x):(d.enter("codeFencedFenceMeta"),d.enter("chunkString",{contentType:"string"}),meta(x))}function meta(x){return null===x||(0,R.HP)(x)?(d.exit("chunkString"),d.exit("codeFencedFenceMeta"),infoBefore(x)):96===x&&x===j?M(x):(d.consume(x),meta)}function atNonLazyBreak(x){return d.attempt(C,after,contentBefore)(x)}function contentBefore(x){return d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),contentStart}function contentStart(x){return D>0&&(0,R.On)(x)?factorySpace(d,beforeContentChunk,"linePrefix",D+1)(x):beforeContentChunk(x)}function beforeContentChunk(x){return null===x||(0,R.HP)(x)?d.check(Me,atNonLazyBreak,after)(x):(d.enter("codeFlowValue"),contentChunk(x))}function contentChunk(x){return null===x||(0,R.HP)(x)?(d.exit("codeFlowValue"),beforeContentChunk(x)):(d.consume(x),contentChunk)}function after(M){return d.exit("codeFenced"),x(M)}},concrete:!0};const Re=document.createElement("i");function decodeNamedCharacterReference(d){const x="&"+d+";";Re.innerHTML=x;const M=Re.textContent;return(59!==M.charCodeAt(M.length-1)||"semi"===d)&&(M!==x&&M)}const Be={name:"characterReference",tokenize:function tokenizeCharacterReference(d,x,M){const E=this;let C,j,D=0;return function start(x){return d.enter("characterReference"),d.enter("characterReferenceMarker"),d.consume(x),d.exit("characterReferenceMarker"),open};function open(x){return 35===x?(d.enter("characterReferenceMarkerNumeric"),d.consume(x),d.exit("characterReferenceMarkerNumeric"),numeric):(d.enter("characterReferenceValue"),C=31,j=R.lV,value(x))}function numeric(x){return 88===x||120===x?(d.enter("characterReferenceMarkerHexadecimal"),d.consume(x),d.exit("characterReferenceMarkerHexadecimal"),d.enter("characterReferenceValue"),C=6,j=R.ok,value):(d.enter("characterReferenceValue"),C=7,j=R.BM,value(x))}function value(B){if(59===B&&D){const C=d.exit("characterReferenceValue");return j!==R.lV||decodeNamedCharacterReference(E.sliceSerialize(C))?(d.enter("characterReferenceMarker"),d.consume(B),d.exit("characterReferenceMarker"),d.exit("characterReference"),x):M(B)}return j(B)&&D++<C?(d.consume(B),value):M(B)}}};const Fe={name:"characterEscape",tokenize:function tokenizeCharacterEscape(d,x,M){return function start(x){return d.enter("characterEscape"),d.enter("escapeMarker"),d.consume(x),d.exit("escapeMarker"),inside};function inside(E){return(0,R.ol)(E)?(d.enter("characterEscapeValue"),d.consume(E),d.exit("characterEscapeValue"),d.exit("characterEscape"),x):M(E)}}};const qe={name:"lineEnding",tokenize:function tokenizeLineEnding(d,x){return function start(M){return d.enter("lineEnding"),d.consume(M),d.exit("lineEnding"),factorySpace(d,x,"linePrefix")}}};const He={name:"labelEnd",tokenize:function tokenizeLabelEnd(d,x,M){const E=this;let C,j,R=E.events.length;for(;R--;)if(("labelImage"===E.events[R][1].type||"labelLink"===E.events[R][1].type)&&!E.events[R][1]._balanced){C=E.events[R][1];break}return function start(x){if(!C)return M(x);if(C._inactive)return labelEndNok(x);return j=E.parser.defined.includes(normalizeIdentifier(E.sliceSerialize({start:C.end,end:E.now()}))),d.enter("labelEnd"),d.enter("labelMarker"),d.consume(x),d.exit("labelMarker"),d.exit("labelEnd"),after};function after(x){return 40===x?d.attempt(Xe,labelEndOk,j?labelEndOk:labelEndNok)(x):91===x?d.attempt(Ze,labelEndOk,j?referenceNotFull:labelEndNok)(x):j?labelEndOk(x):labelEndNok(x)}function referenceNotFull(x){return d.attempt(Je,labelEndOk,labelEndNok)(x)}function labelEndOk(d){return x(d)}function labelEndNok(d){return C._balanced=!0,M(d)}},resolveTo:function resolveToLabelEnd(d,x){let M,E,C,j,R=d.length,D=0;for(;R--;)if(M=d[R][1],E){if("link"===M.type||"labelLink"===M.type&&M._inactive)break;"enter"===d[R][0]&&"labelLink"===M.type&&(M._inactive=!0)}else if(C){if("enter"===d[R][0]&&("labelImage"===M.type||"labelLink"===M.type)&&!M._balanced&&(E=R,"labelLink"!==M.type)){D=2;break}}else"labelEnd"===M.type&&(C=R);const B={type:"labelLink"===d[E][1].type?"link":"image",start:Object.assign({},d[E][1].start),end:Object.assign({},d[d.length-1][1].end)},F={type:"label",start:Object.assign({},d[E][1].start),end:Object.assign({},d[C][1].end)},q={type:"labelText",start:Object.assign({},d[E+D+2][1].end),end:Object.assign({},d[C-2][1].start)};return j=[["enter",B,x],["enter",F,x]],j=push(j,d.slice(E+1,E+D+3)),j=push(j,[["enter",q,x]]),j=push(j,resolveAll(x.parser.constructs.insideSpan.null,d.slice(E+D+4,C-3),x)),j=push(j,[["exit",q,x],d[C-2],d[C-1],["exit",F,x]]),j=push(j,d.slice(C+1)),j=push(j,[["exit",B,x]]),splice(d,E,d.length,j),d},resolveAll:function resolveAllLabelEnd(d){let x=-1;for(;++x<d.length;){const M=d[x][1];"labelImage"!==M.type&&"labelLink"!==M.type&&"labelEnd"!==M.type||(d.splice(x+1,"labelImage"===M.type?4:2),M.type="data",x++)}return d}},Xe={tokenize:function tokenizeResource(d,x,M){return function resourceStart(x){return d.enter("resource"),d.enter("resourceMarker"),d.consume(x),d.exit("resourceMarker"),resourceBefore};function resourceBefore(x){return(0,R.Ee)(x)?factoryWhitespace(d,resourceOpen)(x):resourceOpen(x)}function resourceOpen(x){return 41===x?resourceEnd(x):factoryDestination(d,resourceDestinationAfter,resourceDestinationMissing,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function resourceDestinationAfter(x){return(0,R.Ee)(x)?factoryWhitespace(d,resourceBetween)(x):resourceEnd(x)}function resourceDestinationMissing(d){return M(d)}function resourceBetween(x){return 34===x||39===x||40===x?factoryTitle(d,resourceTitleAfter,M,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):resourceEnd(x)}function resourceTitleAfter(x){return(0,R.Ee)(x)?factoryWhitespace(d,resourceEnd)(x):resourceEnd(x)}function resourceEnd(E){return 41===E?(d.enter("resourceMarker"),d.consume(E),d.exit("resourceMarker"),d.exit("resource"),x):M(E)}}},Ze={tokenize:function tokenizeReferenceFull(d,x,M){const E=this;return function referenceFull(x){return factoryLabel.call(E,d,referenceFullAfter,referenceFullMissing,"reference","referenceMarker","referenceString")(x)};function referenceFullAfter(d){return E.parser.defined.includes(normalizeIdentifier(E.sliceSerialize(E.events[E.events.length-1][1]).slice(1,-1)))?x(d):M(d)}function referenceFullMissing(d){return M(d)}}},Je={tokenize:function tokenizeReferenceCollapsed(d,x,M){return function referenceCollapsedStart(x){return d.enter("reference"),d.enter("referenceMarker"),d.consume(x),d.exit("referenceMarker"),referenceCollapsedOpen};function referenceCollapsedOpen(E){return 93===E?(d.enter("referenceMarker"),d.consume(E),d.exit("referenceMarker"),d.exit("reference"),x):M(E)}}};const et={name:"labelStartImage",tokenize:function tokenizeLabelStartImage(d,x,M){const E=this;return function start(x){return d.enter("labelImage"),d.enter("labelImageMarker"),d.consume(x),d.exit("labelImageMarker"),open};function open(x){return 91===x?(d.enter("labelMarker"),d.consume(x),d.exit("labelMarker"),d.exit("labelImage"),after):M(x)}function after(d){return 94===d&&"_hiddenFootnoteSupport"in E.parser.constructs?M(d):x(d)}},resolveAll:He.resolveAll};function classifyCharacter(d){return null===d||(0,R.Ee)(d)||(0,R.Ny)(d)?1:(0,R.es)(d)?2:void 0}const tt={name:"attention",tokenize:function tokenizeAttention(d,x){const M=this.parser.constructs.attentionMarkers.null,E=this.previous,C=classifyCharacter(E);let j;return function start(x){return j=x,d.enter("attentionSequence"),inside(x)};function inside(R){if(R===j)return d.consume(R),inside;const D=d.exit("attentionSequence"),B=classifyCharacter(R),F=!B||2===B&&C||M.includes(R),q=!C||2===C&&B||M.includes(E);return D._open=Boolean(42===j?F:F&&(C||!q)),D._close=Boolean(42===j?q:q&&(B||!F)),x(R)}},resolveAll:function resolveAllAttention(d,x){let M,E,C,j,R,D,B,F,q=-1;for(;++q<d.length;)if("enter"===d[q][0]&&"attentionSequence"===d[q][1].type&&d[q][1]._close)for(M=q;M--;)if("exit"===d[M][0]&&"attentionSequence"===d[M][1].type&&d[M][1]._open&&x.sliceSerialize(d[M][1]).charCodeAt(0)===x.sliceSerialize(d[q][1]).charCodeAt(0)){if((d[M][1]._close||d[q][1]._open)&&(d[q][1].end.offset-d[q][1].start.offset)%3&&!((d[M][1].end.offset-d[M][1].start.offset+d[q][1].end.offset-d[q][1].start.offset)%3))continue;D=d[M][1].end.offset-d[M][1].start.offset>1&&d[q][1].end.offset-d[q][1].start.offset>1?2:1;const K=Object.assign({},d[M][1].end),V=Object.assign({},d[q][1].start);movePoint(K,-D),movePoint(V,D),j={type:D>1?"strongSequence":"emphasisSequence",start:K,end:Object.assign({},d[M][1].end)},R={type:D>1?"strongSequence":"emphasisSequence",start:Object.assign({},d[q][1].start),end:V},C={type:D>1?"strongText":"emphasisText",start:Object.assign({},d[M][1].end),end:Object.assign({},d[q][1].start)},E={type:D>1?"strong":"emphasis",start:Object.assign({},j.start),end:Object.assign({},R.end)},d[M][1].end=Object.assign({},j.start),d[q][1].start=Object.assign({},R.end),B=[],d[M][1].end.offset-d[M][1].start.offset&&(B=push(B,[["enter",d[M][1],x],["exit",d[M][1],x]])),B=push(B,[["enter",E,x],["enter",j,x],["exit",j,x],["enter",C,x]]),B=push(B,resolveAll(x.parser.constructs.insideSpan.null,d.slice(M+1,q),x)),B=push(B,[["exit",C,x],["enter",R,x],["exit",R,x],["exit",E,x]]),d[q][1].end.offset-d[q][1].start.offset?(F=2,B=push(B,[["enter",d[q][1],x],["exit",d[q][1],x]])):F=0,splice(d,M-1,q-M+3,B),q=M+B.length-F-2;break}q=-1;for(;++q<d.length;)"attentionSequence"===d[q][1].type&&(d[q][1].type="data");return d}};function movePoint(d,x){d.column+=x,d.offset+=x,d._bufferIndex+=x}const nt={name:"autolink",tokenize:function tokenizeAutolink(d,x,M){let E=0;return function start(x){return d.enter("autolink"),d.enter("autolinkMarker"),d.consume(x),d.exit("autolinkMarker"),d.enter("autolinkProtocol"),open};function open(x){return(0,R.CW)(x)?(d.consume(x),schemeOrEmailAtext):64===x?M(x):emailAtext(x)}function schemeOrEmailAtext(d){return 43===d||45===d||46===d||(0,R.lV)(d)?(E=1,schemeInsideOrEmailAtext(d)):emailAtext(d)}function schemeInsideOrEmailAtext(x){return 58===x?(d.consume(x),E=0,urlInside):(43===x||45===x||46===x||(0,R.lV)(x))&&E++<32?(d.consume(x),schemeInsideOrEmailAtext):(E=0,emailAtext(x))}function urlInside(E){return 62===E?(d.exit("autolinkProtocol"),d.enter("autolinkMarker"),d.consume(E),d.exit("autolinkMarker"),d.exit("autolink"),x):null===E||32===E||60===E||(0,R.JQ)(E)?M(E):(d.consume(E),urlInside)}function emailAtext(x){return 64===x?(d.consume(x),emailAtSignOrDot):(0,R.cx)(x)?(d.consume(x),emailAtext):M(x)}function emailAtSignOrDot(d){return(0,R.lV)(d)?emailLabel(d):M(d)}function emailLabel(M){return 46===M?(d.consume(M),E=0,emailAtSignOrDot):62===M?(d.exit("autolinkProtocol").type="autolinkEmail",d.enter("autolinkMarker"),d.consume(M),d.exit("autolinkMarker"),d.exit("autolink"),x):emailValue(M)}function emailValue(x){if((45===x||(0,R.lV)(x))&&E++<63){const M=45===x?emailValue:emailLabel;return d.consume(x),M}return M(x)}}};const rt={name:"htmlText",tokenize:function tokenizeHtmlText(d,x,M){const E=this;let C,j,D;return function start(x){return d.enter("htmlText"),d.enter("htmlTextData"),d.consume(x),open};function open(x){return 33===x?(d.consume(x),declarationOpen):47===x?(d.consume(x),tagCloseStart):63===x?(d.consume(x),instruction):(0,R.CW)(x)?(d.consume(x),tagOpen):M(x)}function declarationOpen(x){return 45===x?(d.consume(x),commentOpenInside):91===x?(d.consume(x),j=0,cdataOpenInside):(0,R.CW)(x)?(d.consume(x),declaration):M(x)}function commentOpenInside(x){return 45===x?(d.consume(x),commentEnd):M(x)}function comment(x){return null===x?M(x):45===x?(d.consume(x),commentClose):(0,R.HP)(x)?(D=comment,lineEndingBefore(x)):(d.consume(x),comment)}function commentClose(x){return 45===x?(d.consume(x),commentEnd):comment(x)}function commentEnd(d){return 62===d?end(d):45===d?commentClose(d):comment(d)}function cdataOpenInside(x){const E="CDATA[";return x===E.charCodeAt(j++)?(d.consume(x),6===j?cdata:cdataOpenInside):M(x)}function cdata(x){return null===x?M(x):93===x?(d.consume(x),cdataClose):(0,R.HP)(x)?(D=cdata,lineEndingBefore(x)):(d.consume(x),cdata)}function cdataClose(x){return 93===x?(d.consume(x),cdataEnd):cdata(x)}function cdataEnd(x){return 62===x?end(x):93===x?(d.consume(x),cdataEnd):cdata(x)}function declaration(x){return null===x||62===x?end(x):(0,R.HP)(x)?(D=declaration,lineEndingBefore(x)):(d.consume(x),declaration)}function instruction(x){return null===x?M(x):63===x?(d.consume(x),instructionClose):(0,R.HP)(x)?(D=instruction,lineEndingBefore(x)):(d.consume(x),instruction)}function instructionClose(d){return 62===d?end(d):instruction(d)}function tagCloseStart(x){return(0,R.CW)(x)?(d.consume(x),tagClose):M(x)}function tagClose(x){return 45===x||(0,R.lV)(x)?(d.consume(x),tagClose):tagCloseBetween(x)}function tagCloseBetween(x){return(0,R.HP)(x)?(D=tagCloseBetween,lineEndingBefore(x)):(0,R.On)(x)?(d.consume(x),tagCloseBetween):end(x)}function tagOpen(x){return 45===x||(0,R.lV)(x)?(d.consume(x),tagOpen):47===x||62===x||(0,R.Ee)(x)?tagOpenBetween(x):M(x)}function tagOpenBetween(x){return 47===x?(d.consume(x),end):58===x||95===x||(0,R.CW)(x)?(d.consume(x),tagOpenAttributeName):(0,R.HP)(x)?(D=tagOpenBetween,lineEndingBefore(x)):(0,R.On)(x)?(d.consume(x),tagOpenBetween):end(x)}function tagOpenAttributeName(x){return 45===x||46===x||58===x||95===x||(0,R.lV)(x)?(d.consume(x),tagOpenAttributeName):tagOpenAttributeNameAfter(x)}function tagOpenAttributeNameAfter(x){return 61===x?(d.consume(x),tagOpenAttributeValueBefore):(0,R.HP)(x)?(D=tagOpenAttributeNameAfter,lineEndingBefore(x)):(0,R.On)(x)?(d.consume(x),tagOpenAttributeNameAfter):tagOpenBetween(x)}function tagOpenAttributeValueBefore(x){return null===x||60===x||61===x||62===x||96===x?M(x):34===x||39===x?(d.consume(x),C=x,tagOpenAttributeValueQuoted):(0,R.HP)(x)?(D=tagOpenAttributeValueBefore,lineEndingBefore(x)):(0,R.On)(x)?(d.consume(x),tagOpenAttributeValueBefore):(d.consume(x),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuoted(x){return x===C?(d.consume(x),C=void 0,tagOpenAttributeValueQuotedAfter):null===x?M(x):(0,R.HP)(x)?(D=tagOpenAttributeValueQuoted,lineEndingBefore(x)):(d.consume(x),tagOpenAttributeValueQuoted)}function tagOpenAttributeValueUnquoted(x){return null===x||34===x||39===x||60===x||61===x||96===x?M(x):47===x||62===x||(0,R.Ee)(x)?tagOpenBetween(x):(d.consume(x),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuotedAfter(d){return 47===d||62===d||(0,R.Ee)(d)?tagOpenBetween(d):M(d)}function end(E){return 62===E?(d.consume(E),d.exit("htmlTextData"),d.exit("htmlText"),x):M(E)}function lineEndingBefore(x){return d.exit("htmlTextData"),d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),lineEndingAfter}function lineEndingAfter(x){return(0,R.On)(x)?factorySpace(d,lineEndingAfterPrefix,"linePrefix",E.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):lineEndingAfterPrefix(x)}function lineEndingAfterPrefix(x){return d.enter("htmlTextData"),D(x)}}};const ot={name:"labelStartLink",tokenize:function tokenizeLabelStartLink(d,x,M){const E=this;return function start(x){return d.enter("labelLink"),d.enter("labelMarker"),d.consume(x),d.exit("labelMarker"),d.exit("labelLink"),after};function after(d){return 94===d&&"_hiddenFootnoteSupport"in E.parser.constructs?M(d):x(d)}},resolveAll:He.resolveAll};const ft={name:"hardBreakEscape",tokenize:function tokenizeHardBreakEscape(d,x,M){return function start(x){return d.enter("hardBreakEscape"),d.consume(x),after};function after(E){return(0,R.HP)(E)?(d.exit("hardBreakEscape"),x(E)):M(E)}}};const xt={name:"codeText",tokenize:function tokenizeCodeText(d,x,M){let E,C,j=0;return function start(x){return d.enter("codeText"),d.enter("codeTextSequence"),sequenceOpen(x)};function sequenceOpen(x){return 96===x?(d.consume(x),j++,sequenceOpen):(d.exit("codeTextSequence"),between(x))}function between(x){return null===x?M(x):32===x?(d.enter("space"),d.consume(x),d.exit("space"),between):96===x?(C=d.enter("codeTextSequence"),E=0,sequenceClose(x)):(0,R.HP)(x)?(d.enter("lineEnding"),d.consume(x),d.exit("lineEnding"),between):(d.enter("codeTextData"),data(x))}function data(x){return null===x||32===x||96===x||(0,R.HP)(x)?(d.exit("codeTextData"),between(x)):(d.consume(x),data)}function sequenceClose(M){return 96===M?(d.consume(M),E++,sequenceClose):E===j?(d.exit("codeTextSequence"),d.exit("codeText"),x(M)):(C.type="codeTextData",data(M))}},resolve:function resolveCodeText(d){let x,M,E=d.length-4,C=3;if(!("lineEnding"!==d[C][1].type&&"space"!==d[C][1].type||"lineEnding"!==d[E][1].type&&"space"!==d[E][1].type))for(x=C;++x<E;)if("codeTextData"===d[x][1].type){d[C][1].type="codeTextPadding",d[E][1].type="codeTextPadding",C+=2,E-=2;break}x=C-1,E++;for(;++x<=E;)void 0===M?x!==E&&"lineEnding"!==d[x][1].type&&(M=x):x!==E&&"lineEnding"!==d[x][1].type||(d[M][1].type="codeTextData",x!==M+2&&(d[M][1].end=d[x-1][1].end,d.splice(M+2,x-M-2),E-=x-M-2,x=M+2),M=void 0);return d},previous:function previous(d){return 96!==d||"characterEscape"===this.events[this.events.length-1][1].type}};const Mt={42:ae,43:ae,45:ae,48:ae,49:ae,50:ae,51:ae,52:ae,53:ae,54:ae,55:ae,56:ae,57:ae,62:ce},Ot={91:he},Nt={[-2]:de,[-1]:de,32:de},Lt={35:me,42:ie,45:[ve,ie],60:be,61:ve,95:ie,96:Ie,126:Ie},Ft={38:Be,92:Fe},qt={[-5]:qe,[-4]:qe,[-3]:qe,33:et,38:Be,42:tt,60:[nt,rt],91:ot,92:[ft,Fe],93:He,95:tt,96:xt},Gt={null:[tt,$]},dn={null:[42,95]},Sn={null:[]};function parse(d){const x={defined:[],lazy:{},constructs:function combineExtensions(d){const x={};let M=-1;for(;++M<d.length;)syntaxExtension(x,d[M]);return x}([E,...(d||{}).extensions||[]]),content:create(D),document:create(B),flow:create(W),string:create(Q),text:create(Y)};return x;function create(d){return function creator(M){return createTokenizer(x,d,M)}}}const An=/[\0\t\n\r]/g;function decodeNumericCharacterReference(d,x){const M=Number.parseInt(d,x);return M<9||11===M||M>13&&M<32||M>126&&M<160||M>55295&&M<57344||M>64975&&M<65008||!(65535&~M)||65534==(65535&M)||M>1114111?"�":String.fromCodePoint(M)}const jn=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decode(d,x,M){if(x)return x;if(35===M.charCodeAt(0)){const d=M.charCodeAt(1),x=120===d||88===d;return decodeNumericCharacterReference(M.slice(x?2:1),x?16:10)}return decodeNamedCharacterReference(M)||d}var Rn=M(52095);const Nn={}.hasOwnProperty;function fromMarkdown(d,x,M){return"string"!=typeof x&&(M=x,x=void 0),function compiler(d){const x={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:opener(link),autolinkProtocol:onenterdata,autolinkEmail:onenterdata,atxHeading:opener(heading),blockQuote:opener(blockQuote),characterEscape:onenterdata,characterReference:onenterdata,codeFenced:opener(codeFlow),codeFencedFenceInfo:buffer,codeFencedFenceMeta:buffer,codeIndented:opener(codeFlow,buffer),codeText:opener(codeText,buffer),codeTextData:onenterdata,data:onenterdata,codeFlowValue:onenterdata,definition:opener(definition),definitionDestinationString:buffer,definitionLabelString:buffer,definitionTitleString:buffer,emphasis:opener(emphasis),hardBreakEscape:opener(hardBreak),hardBreakTrailing:opener(hardBreak),htmlFlow:opener(html,buffer),htmlFlowData:onenterdata,htmlText:opener(html,buffer),htmlTextData:onenterdata,image:opener(image),label:buffer,link:opener(link),listItem:opener(listItem),listItemValue:onenterlistitemvalue,listOrdered:opener(list,onenterlistordered),listUnordered:opener(list),paragraph:opener(paragraph),reference:onenterreference,referenceString:buffer,resourceDestinationString:buffer,resourceTitleString:buffer,setextHeading:opener(heading),strong:opener(strong),thematicBreak:opener(thematicBreak)},exit:{atxHeading:closer(),atxHeadingSequence:onexitatxheadingsequence,autolink:closer(),autolinkEmail:onexitautolinkemail,autolinkProtocol:onexitautolinkprotocol,blockQuote:closer(),characterEscapeValue:onexitdata,characterReferenceMarkerHexadecimal:onexitcharacterreferencemarker,characterReferenceMarkerNumeric:onexitcharacterreferencemarker,characterReferenceValue:onexitcharacterreferencevalue,characterReference:onexitcharacterreference,codeFenced:closer(onexitcodefenced),codeFencedFence:onexitcodefencedfence,codeFencedFenceInfo:onexitcodefencedfenceinfo,codeFencedFenceMeta:onexitcodefencedfencemeta,codeFlowValue:onexitdata,codeIndented:closer(onexitcodeindented),codeText:closer(onexitcodetext),codeTextData:onexitdata,data:onexitdata,definition:closer(),definitionDestinationString:onexitdefinitiondestinationstring,definitionLabelString:onexitdefinitionlabelstring,definitionTitleString:onexitdefinitiontitlestring,emphasis:closer(),hardBreakEscape:closer(onexithardbreak),hardBreakTrailing:closer(onexithardbreak),htmlFlow:closer(onexithtmlflow),htmlFlowData:onexitdata,htmlText:closer(onexithtmltext),htmlTextData:onexitdata,image:closer(onexitimage),label:onexitlabel,labelText:onexitlabeltext,lineEnding:onexitlineending,link:closer(onexitlink),listItem:closer(),listOrdered:closer(),listUnordered:closer(),paragraph:closer(),referenceString:onexitreferencestring,resourceDestinationString:onexitresourcedestinationstring,resourceTitleString:onexitresourcetitlestring,resource:onexitresource,setextHeading:closer(onexitsetextheading),setextHeadingLineSequence:onexitsetextheadinglinesequence,setextHeadingText:onexitsetextheadingtext,strong:closer(),thematicBreak:closer()}};configure(x,(d||{}).mdastExtensions||[]);const M={};return compile;function compile(d){let E={type:"root",children:[]};const C={stack:[E],tokenStack:[],config:x,enter,exit,buffer,resume,data:M},j=[];let R=-1;for(;++R<d.length;)if("listOrdered"===d[R][1].type||"listUnordered"===d[R][1].type)if("enter"===d[R][0])j.push(R);else{R=prepareList(d,j.pop(),R)}for(R=-1;++R<d.length;){const M=x[d[R][0]];Nn.call(M,d[R][1].type)&&M[d[R][1].type].call(Object.assign({sliceSerialize:d[R][2].sliceSerialize},C),d[R][1])}if(C.tokenStack.length>0){const d=C.tokenStack[C.tokenStack.length-1];(d[1]||defaultOnError).call(C,void 0,d[0])}for(E.position={start:point(d.length>0?d[0][1].start:{line:1,column:1,offset:0}),end:point(d.length>0?d[d.length-2][1].end:{line:1,column:1,offset:0})},R=-1;++R<x.transforms.length;)E=x.transforms[R](E)||E;return E}function prepareList(d,x,M){let E,C,j,R,D=x-1,B=-1,F=!1;for(;++D<=M;){const x=d[D];switch(x[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===x[0]?B++:B--,R=void 0;break;case"lineEndingBlank":"enter"===x[0]&&(!E||R||B||j||(j=D),R=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:R=void 0}if(!B&&"enter"===x[0]&&"listItemPrefix"===x[1].type||-1===B&&"exit"===x[0]&&("listUnordered"===x[1].type||"listOrdered"===x[1].type)){if(E){let R=D;for(C=void 0;R--;){const x=d[R];if("lineEnding"===x[1].type||"lineEndingBlank"===x[1].type){if("exit"===x[0])continue;C&&(d[C][1].type="lineEndingBlank",F=!0),x[1].type="lineEnding",C=R}else if("linePrefix"!==x[1].type&&"blockQuotePrefix"!==x[1].type&&"blockQuotePrefixWhitespace"!==x[1].type&&"blockQuoteMarker"!==x[1].type&&"listItemIndent"!==x[1].type)break}j&&(!C||j<C)&&(E._spread=!0),E.end=Object.assign({},C?d[C][1].start:x[1].end),d.splice(C||D,0,["exit",E,x[2]]),D++,M++}if("listItemPrefix"===x[1].type){const C={type:"listItem",_spread:!1,start:Object.assign({},x[1].start),end:void 0};E=C,d.splice(D,0,["enter",C,x[2]]),D++,M++,j=void 0,R=!0}}}return d[x][1]._spread=F,M}function opener(d,x){return open;function open(M){enter.call(this,d(M),M),x&&x.call(this,M)}}function buffer(){this.stack.push({type:"fragment",children:[]})}function enter(d,x,M){this.stack[this.stack.length-1].children.push(d),this.stack.push(d),this.tokenStack.push([x,M]),d.position={start:point(x.start),end:void 0}}function closer(d){return close;function close(x){d&&d.call(this,x),exit.call(this,x)}}function exit(d,x){const M=this.stack.pop(),E=this.tokenStack.pop();if(!E)throw new Error("Cannot close `"+d.type+"` ("+(0,Rn.L)({start:d.start,end:d.end})+"): it’s not open");if(E[0].type!==d.type)if(x)x.call(this,d,E[0]);else{(E[1]||defaultOnError).call(this,d,E[0])}M.position.end=point(d.end)}function resume(){return function lib_toString(d,x){const M=x||C;return one(d,"boolean"!=typeof M.includeImageAlt||M.includeImageAlt,"boolean"!=typeof M.includeHtml||M.includeHtml)}(this.stack.pop())}function onenterlistordered(){this.data.expectingFirstListItemValue=!0}function onenterlistitemvalue(d){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(d),10),this.data.expectingFirstListItemValue=void 0}}function onexitcodefencedfenceinfo(){const d=this.resume();this.stack[this.stack.length-1].lang=d}function onexitcodefencedfencemeta(){const d=this.resume();this.stack[this.stack.length-1].meta=d}function onexitcodefencedfence(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function onexitcodefenced(){const d=this.resume();this.stack[this.stack.length-1].value=d.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function onexitcodeindented(){const d=this.resume();this.stack[this.stack.length-1].value=d.replace(/(\r?\n|\r)$/g,"")}function onexitdefinitionlabelstring(d){const x=this.resume(),M=this.stack[this.stack.length-1];M.label=x,M.identifier=normalizeIdentifier(this.sliceSerialize(d)).toLowerCase()}function onexitdefinitiontitlestring(){const d=this.resume();this.stack[this.stack.length-1].title=d}function onexitdefinitiondestinationstring(){const d=this.resume();this.stack[this.stack.length-1].url=d}function onexitatxheadingsequence(d){const x=this.stack[this.stack.length-1];if(!x.depth){const M=this.sliceSerialize(d).length;x.depth=M}}function onexitsetextheadingtext(){this.data.setextHeadingSlurpLineEnding=!0}function onexitsetextheadinglinesequence(d){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(d).codePointAt(0)?1:2}function onexitsetextheading(){this.data.setextHeadingSlurpLineEnding=void 0}function onenterdata(d){const x=this.stack[this.stack.length-1].children;let M=x[x.length-1];M&&"text"===M.type||(M=text(),M.position={start:point(d.start),end:void 0},x.push(M)),this.stack.push(M)}function onexitdata(d){const x=this.stack.pop();x.value+=this.sliceSerialize(d),x.position.end=point(d.end)}function onexitlineending(d){const M=this.stack[this.stack.length-1];if(this.data.atHardBreak){return M.children[M.children.length-1].position.end=point(d.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&x.canContainEols.includes(M.type)&&(onenterdata.call(this,d),onexitdata.call(this,d))}function onexithardbreak(){this.data.atHardBreak=!0}function onexithtmlflow(){const d=this.resume();this.stack[this.stack.length-1].value=d}function onexithtmltext(){const d=this.resume();this.stack[this.stack.length-1].value=d}function onexitcodetext(){const d=this.resume();this.stack[this.stack.length-1].value=d}function onexitlink(){const d=this.stack[this.stack.length-1];if(this.data.inReference){const x=this.data.referenceType||"shortcut";d.type+="Reference",d.referenceType=x,delete d.url,delete d.title}else delete d.identifier,delete d.label;this.data.referenceType=void 0}function onexitimage(){const d=this.stack[this.stack.length-1];if(this.data.inReference){const x=this.data.referenceType||"shortcut";d.type+="Reference",d.referenceType=x,delete d.url,delete d.title}else delete d.identifier,delete d.label;this.data.referenceType=void 0}function onexitlabeltext(d){const x=this.sliceSerialize(d),M=this.stack[this.stack.length-2];M.label=function decodeString(d){return d.replace(jn,decode)}(x),M.identifier=normalizeIdentifier(x).toLowerCase()}function onexitlabel(){const d=this.stack[this.stack.length-1],x=this.resume(),M=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===M.type){const x=d.children;M.children=x}else M.alt=x}function onexitresourcedestinationstring(){const d=this.resume();this.stack[this.stack.length-1].url=d}function onexitresourcetitlestring(){const d=this.resume();this.stack[this.stack.length-1].title=d}function onexitresource(){this.data.inReference=void 0}function onenterreference(){this.data.referenceType="collapsed"}function onexitreferencestring(d){const x=this.resume(),M=this.stack[this.stack.length-1];M.label=x,M.identifier=normalizeIdentifier(this.sliceSerialize(d)).toLowerCase(),this.data.referenceType="full"}function onexitcharacterreferencemarker(d){this.data.characterReferenceType=d.type}function onexitcharacterreferencevalue(d){const x=this.sliceSerialize(d),M=this.data.characterReferenceType;let E;if(M)E=decodeNumericCharacterReference(x,"characterReferenceMarkerNumeric"===M?10:16),this.data.characterReferenceType=void 0;else{E=decodeNamedCharacterReference(x)}this.stack[this.stack.length-1].value+=E}function onexitcharacterreference(d){this.stack.pop().position.end=point(d.end)}function onexitautolinkprotocol(d){onexitdata.call(this,d);this.stack[this.stack.length-1].url=this.sliceSerialize(d)}function onexitautolinkemail(d){onexitdata.call(this,d);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(d)}function blockQuote(){return{type:"blockquote",children:[]}}function codeFlow(){return{type:"code",lang:null,meta:null,value:""}}function codeText(){return{type:"inlineCode",value:""}}function definition(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function emphasis(){return{type:"emphasis",children:[]}}function heading(){return{type:"heading",depth:0,children:[]}}function hardBreak(){return{type:"break"}}function html(){return{type:"html",value:""}}function image(){return{type:"image",title:null,url:"",alt:null}}function link(){return{type:"link",title:null,url:"",children:[]}}function list(d){return{type:"list",ordered:"listOrdered"===d.type,start:null,spread:d._spread,children:[]}}function listItem(d){return{type:"listItem",spread:d._spread,checked:null,children:[]}}function paragraph(){return{type:"paragraph",children:[]}}function strong(){return{type:"strong",children:[]}}function text(){return{type:"text",value:""}}function thematicBreak(){return{type:"thematicBreak"}}}(M)(function postprocess(d){for(;!subtokenize(d););return d}(parse(M).document().write(function preprocess(){let d,x=1,M="",E=!0;return function preprocessor(C,j,R){const D=[];let B,F,q,K,V;for(C=M+("string"==typeof C?C.toString():new TextDecoder(j||void 0).decode(C)),q=0,M="",E&&(65279===C.charCodeAt(0)&&q++,E=void 0);q<C.length;){if(An.lastIndex=q,B=An.exec(C),K=B&&void 0!==B.index?B.index:C.length,V=C.charCodeAt(K),!B){M=C.slice(q);break}if(10===V&&q===K&&d)D.push(-3),d=void 0;else switch(d&&(D.push(-5),d=void 0),q<K&&(D.push(C.slice(q,K)),x+=K-q),V){case 0:D.push(65533),x++;break;case 9:for(F=4*Math.ceil(x/4),D.push(-2);x++<F;)D.push(-1);break;case 10:D.push(-4),x=1;break;default:d=!0,x=1}q=K+1}return R&&(d&&D.push(-5),M&&D.push(M),D.push(null)),D}}()(d,x,!0))))}function point(d){return{line:d.line,column:d.column,offset:d.offset}}function configure(d,x){let M=-1;for(;++M<x.length;){const E=x[M];Array.isArray(E)?configure(d,E):extension(d,E)}}function extension(d,x){let M;for(M in x)if(Nn.call(x,M))switch(M){case"canContainEols":{const E=x[M];E&&d[M].push(...E);break}case"transforms":{const E=x[M];E&&d[M].push(...E);break}case"enter":case"exit":{const E=x[M];E&&Object.assign(d[M],E);break}}}function defaultOnError(d,x){throw d?new Error("Cannot close `"+d.type+"` ("+(0,Rn.L)({start:d.start,end:d.end})+"): a different token (`"+x.type+"`, "+(0,Rn.L)({start:x.start,end:x.end})+") is open"):new Error("Cannot close document, a token (`"+x.type+"`, "+(0,Rn.L)({start:x.start,end:x.end})+") is still open")}function remarkParse(d){const x=this;x.parser=function parser(M){return fromMarkdown(M,{...x.data("settings"),...d,extensions:x.data("micromarkExtensions")||[],mdastExtensions:x.data("fromMarkdownExtensions")||[]})}}},92756:(d,x,M)=>{"use strict";M.d(x,{A:()=>remarkRehype});var E=M(12002);const C="object"==typeof self?self:globalThis,deserialize=d=>((d,x)=>{const as=(x,M)=>(d.set(M,x),x),unpair=M=>{if(d.has(M))return d.get(M);const[E,j]=x[M];switch(E){case 0:case-1:return as(j,M);case 1:{const d=as([],M);for(const x of j)d.push(unpair(x));return d}case 2:{const d=as({},M);for(const[x,M]of j)d[unpair(x)]=unpair(M);return d}case 3:return as(new Date(j),M);case 4:{const{source:d,flags:x}=j;return as(new RegExp(d,x),M)}case 5:{const d=as(new Map,M);for(const[x,M]of j)d.set(unpair(x),unpair(M));return d}case 6:{const d=as(new Set,M);for(const x of j)d.add(unpair(x));return d}case 7:{const{name:d,message:x}=j;return as(new C[d](x),M)}case 8:return as(BigInt(j),M);case"BigInt":return as(Object(BigInt(j)),M)}return as(new C[E](j),M)};return unpair})(new Map,d)(0),j="",{toString:R}={},{keys:D}=Object,typeOf=d=>{const x=typeof d;if("object"!==x||!d)return[0,x];const M=R.call(d).slice(8,-1);switch(M){case"Array":return[1,j];case"Object":return[2,j];case"Date":return[3,j];case"RegExp":return[4,j];case"Map":return[5,j];case"Set":return[6,j]}return M.includes("Array")?[1,M]:M.includes("Error")?[7,M]:[2,M]},shouldSkip=([d,x])=>0===d&&("function"===x||"symbol"===x),serialize=(d,{json:x,lossy:M}={})=>{const E=[];return((d,x,M,E)=>{const as=(d,x)=>{const C=E.push(d)-1;return M.set(x,C),C},pair=E=>{if(M.has(E))return M.get(E);let[C,j]=typeOf(E);switch(C){case 0:{let x=E;switch(j){case"bigint":C=8,x=E.toString();break;case"function":case"symbol":if(d)throw new TypeError("unable to serialize "+j);x=null;break;case"undefined":return as([-1],E)}return as([C,x],E)}case 1:{if(j)return as([j,[...E]],E);const d=[],x=as([C,d],E);for(const x of E)d.push(pair(x));return x}case 2:{if(j)switch(j){case"BigInt":return as([j,E.toString()],E);case"Boolean":case"Number":case"String":return as([j,E.valueOf()],E)}if(x&&"toJSON"in E)return pair(E.toJSON());const M=[],R=as([C,M],E);for(const x of D(E))!d&&shouldSkip(typeOf(E[x]))||M.push([pair(x),pair(E[x])]);return R}case 3:return as([C,E.toISOString()],E);case 4:{const{source:d,flags:x}=E;return as([C,{source:d,flags:x}],E)}case 5:{const x=[],M=as([C,x],E);for(const[M,C]of E)(d||!shouldSkip(typeOf(M))&&!shouldSkip(typeOf(C)))&&x.push([pair(M),pair(C)]);return M}case 6:{const x=[],M=as([C,x],E);for(const M of E)!d&&shouldSkip(typeOf(M))||x.push(pair(M));return M}}const{message:R}=E;return as([C,{name:j,message:R}],E)};return pair})(!(x||M),!!x,new Map,E)(d),E},B="function"==typeof structuredClone?(d,x)=>x&&("json"in x||"lossy"in x)?deserialize(serialize(d,x)):structuredClone(d):(d,x)=>deserialize(serialize(d,x));var F=M(47159);function normalizeUri(d){const x=[];let M=-1,E=0,C=0;for(;++M<d.length;){const j=d.charCodeAt(M);let R="";if(37===j&&(0,F.lV)(d.charCodeAt(M+1))&&(0,F.lV)(d.charCodeAt(M+2)))C=2;else if(j<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(j))||(R=String.fromCharCode(j));else if(j>55295&&j<57344){const x=d.charCodeAt(M+1);j<56320&&x>56319&&x<57344?(R=String.fromCharCode(j,x),C=1):R="�"}else R=String.fromCharCode(j);R&&(x.push(d.slice(E,M),encodeURIComponent(R)),E=M+C+1,R=""),C&&(M+=C,C=0)}return x.join("")+d.slice(E)}function defaultFootnoteBackContent(d,x){const M=[{type:"text",value:"↩"}];return x>1&&M.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(x)}]}),M}function defaultFootnoteBackLabel(d,x){return"Back to reference "+(d+1)+(x>1?"-"+x:"")}var q=M(77080),K=M(54243);function revert(d,x){const M=x.referenceType;let E="]";if("collapsed"===M?E+="[]":"full"===M&&(E+="["+(x.label||x.identifier)+"]"),"imageReference"===x.type)return[{type:"text",value:"!["+x.alt+E}];const C=d.all(x),j=C[0];j&&"text"===j.type?j.value="["+j.value:C.unshift({type:"text",value:"["});const R=C[C.length-1];return R&&"text"===R.type?R.value+=E:C.push({type:"text",value:E}),C}function listItemLoose(d){const x=d.spread;return null==x?d.children.length>1:x}const V=9,W=32;function trimLines(d){const x=String(d),M=/\r?\n|\r/g;let E=M.exec(x),C=0;const j=[];for(;E;)j.push(trimLine(x.slice(C,E.index),C>0,!0),E[0]),C=E.index+E[0].length,E=M.exec(x);return j.push(trimLine(x.slice(C),C>0,!1)),j.join("")}function trimLine(d,x,M){let E=0,C=d.length;if(x){let x=d.codePointAt(E);for(;x===V||x===W;)E++,x=d.codePointAt(E)}if(M){let x=d.codePointAt(C-1);for(;x===V||x===W;)C--,x=d.codePointAt(C-1)}return C>E?d.slice(E,C):""}const $={blockquote:function blockquote(d,x){const M={type:"element",tagName:"blockquote",properties:{},children:d.wrap(d.all(x),!0)};return d.patch(x,M),d.applyData(x,M)},break:function hardBreak(d,x){const M={type:"element",tagName:"br",properties:{},children:[]};return d.patch(x,M),[d.applyData(x,M),{type:"text",value:"\n"}]},code:function code(d,x){const M=x.value?x.value+"\n":"",E={};x.lang&&(E.className=["language-"+x.lang]);let C={type:"element",tagName:"code",properties:E,children:[{type:"text",value:M}]};return x.meta&&(C.data={meta:x.meta}),d.patch(x,C),C=d.applyData(x,C),C={type:"element",tagName:"pre",properties:{},children:[C]},d.patch(x,C),C},delete:function strikethrough(d,x){const M={type:"element",tagName:"del",properties:{},children:d.all(x)};return d.patch(x,M),d.applyData(x,M)},emphasis:function emphasis(d,x){const M={type:"element",tagName:"em",properties:{},children:d.all(x)};return d.patch(x,M),d.applyData(x,M)},footnoteReference:function footnoteReference(d,x){const M="string"==typeof d.options.clobberPrefix?d.options.clobberPrefix:"user-content-",E=String(x.identifier).toUpperCase(),C=normalizeUri(E.toLowerCase()),j=d.footnoteOrder.indexOf(E);let R,D=d.footnoteCounts.get(E);void 0===D?(D=0,d.footnoteOrder.push(E),R=d.footnoteOrder.length):R=j+1,D+=1,d.footnoteCounts.set(E,D);const B={type:"element",tagName:"a",properties:{href:"#"+M+"fn-"+C,id:M+"fnref-"+C+(D>1?"-"+D:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(R)}]};d.patch(x,B);const F={type:"element",tagName:"sup",properties:{},children:[B]};return d.patch(x,F),d.applyData(x,F)},heading:function heading(d,x){const M={type:"element",tagName:"h"+x.depth,properties:{},children:d.all(x)};return d.patch(x,M),d.applyData(x,M)},html:function html(d,x){if(d.options.allowDangerousHtml){const M={type:"raw",value:x.value};return d.patch(x,M),d.applyData(x,M)}},imageReference:function imageReference(d,x){const M=String(x.identifier).toUpperCase(),E=d.definitionById.get(M);if(!E)return revert(d,x);const C={src:normalizeUri(E.url||""),alt:x.alt};null!==E.title&&void 0!==E.title&&(C.title=E.title);const j={type:"element",tagName:"img",properties:C,children:[]};return d.patch(x,j),d.applyData(x,j)},image:function image_image(d,x){const M={src:normalizeUri(x.url)};null!==x.alt&&void 0!==x.alt&&(M.alt=x.alt),null!==x.title&&void 0!==x.title&&(M.title=x.title);const E={type:"element",tagName:"img",properties:M,children:[]};return d.patch(x,E),d.applyData(x,E)},inlineCode:function inlineCode(d,x){const M={type:"text",value:x.value.replace(/\r?\n|\r/g," ")};d.patch(x,M);const E={type:"element",tagName:"code",properties:{},children:[M]};return d.patch(x,E),d.applyData(x,E)},linkReference:function linkReference(d,x){const M=String(x.identifier).toUpperCase(),E=d.definitionById.get(M);if(!E)return revert(d,x);const C={href:normalizeUri(E.url||"")};null!==E.title&&void 0!==E.title&&(C.title=E.title);const j={type:"element",tagName:"a",properties:C,children:d.all(x)};return d.patch(x,j),d.applyData(x,j)},link:function link_link(d,x){const M={href:normalizeUri(x.url)};null!==x.title&&void 0!==x.title&&(M.title=x.title);const E={type:"element",tagName:"a",properties:M,children:d.all(x)};return d.patch(x,E),d.applyData(x,E)},listItem:function listItem(d,x,M){const E=d.all(x),C=M?function listLoose(d){let x=!1;if("list"===d.type){x=d.spread||!1;const M=d.children;let E=-1;for(;!x&&++E<M.length;)x=listItemLoose(M[E])}return x}(M):listItemLoose(x),j={},R=[];if("boolean"==typeof x.checked){const d=E[0];let M;d&&"element"===d.type&&"p"===d.tagName?M=d:(M={type:"element",tagName:"p",properties:{},children:[]},E.unshift(M)),M.children.length>0&&M.children.unshift({type:"text",value:" "}),M.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:x.checked,disabled:!0},children:[]}),j.className=["task-list-item"]}let D=-1;for(;++D<E.length;){const d=E[D];(C||0!==D||"element"!==d.type||"p"!==d.tagName)&&R.push({type:"text",value:"\n"}),"element"!==d.type||"p"!==d.tagName||C?R.push(d):R.push(...d.children)}const B=E[E.length-1];B&&(C||"element"!==B.type||"p"!==B.tagName)&&R.push({type:"text",value:"\n"});const F={type:"element",tagName:"li",properties:j,children:R};return d.patch(x,F),d.applyData(x,F)},list:function list(d,x){const M={},E=d.all(x);let C=-1;for("number"==typeof x.start&&1!==x.start&&(M.start=x.start);++C<E.length;){const d=E[C];if("element"===d.type&&"li"===d.tagName&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){M.className=["contains-task-list"];break}}const j={type:"element",tagName:x.ordered?"ol":"ul",properties:M,children:d.wrap(E,!0)};return d.patch(x,j),d.applyData(x,j)},paragraph:function paragraph(d,x){const M={type:"element",tagName:"p",properties:{},children:d.all(x)};return d.patch(x,M),d.applyData(x,M)},root:function root(d,x){const M={type:"root",children:d.wrap(d.all(x))};return d.patch(x,M),d.applyData(x,M)},strong:function strong(d,x){const M={type:"element",tagName:"strong",properties:{},children:d.all(x)};return d.patch(x,M),d.applyData(x,M)},table:function table(d,x){const M=d.all(x),E=M.shift(),C=[];if(E){const M={type:"element",tagName:"thead",properties:{},children:d.wrap([E],!0)};d.patch(x.children[0],M),C.push(M)}if(M.length>0){const E={type:"element",tagName:"tbody",properties:{},children:d.wrap(M,!0)},j=(0,K.PW)(x.children[1]),R=(0,K.Y)(x.children[x.children.length-1]);j&&R&&(E.position={start:j,end:R}),C.push(E)}const j={type:"element",tagName:"table",properties:{},children:d.wrap(C,!0)};return d.patch(x,j),d.applyData(x,j)},tableCell:function tableCell(d,x){const M={type:"element",tagName:"td",properties:{},children:d.all(x)};return d.patch(x,M),d.applyData(x,M)},tableRow:function tableRow(d,x,M){const E=M?M.children:void 0,C=0===(E?E.indexOf(x):1)?"th":"td",j=M&&"table"===M.type?M.align:void 0,R=j?j.length:x.children.length;let D=-1;const B=[];for(;++D<R;){const M=x.children[D],E={},R=j?j[D]:void 0;R&&(E.align=R);let F={type:"element",tagName:C,properties:E,children:[]};M&&(F.children=d.all(M),d.patch(M,F),F=d.applyData(M,F)),B.push(F)}const F={type:"element",tagName:"tr",properties:{},children:d.wrap(B,!0)};return d.patch(x,F),d.applyData(x,F)},text:function text_text(d,x){const M={type:"text",value:trimLines(String(x.value))};return d.patch(x,M),d.applyData(x,M)},thematicBreak:function thematicBreak(d,x){const M={type:"element",tagName:"hr",properties:{},children:[]};return d.patch(x,M),d.applyData(x,M)},toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}const Q={}.hasOwnProperty,Y={};function patch(d,x){d.position&&(x.position=(0,K.G1)(d))}function applyData(d,x){let M=x;if(d&&d.data){const x=d.data.hName,E=d.data.hChildren,C=d.data.hProperties;if("string"==typeof x)if("element"===M.type)M.tagName=x;else{M={type:"element",tagName:x,properties:{},children:"children"in M?M.children:[M]}}"element"===M.type&&C&&Object.assign(M.properties,B(C)),"children"in M&&M.children&&null!=E&&(M.children=E)}return M}function defaultUnknownHandler(d,x){const M=x.data||{},E=!("value"in x)||Q.call(M,"hProperties")||Q.call(M,"hChildren")?{type:"element",tagName:"div",properties:{},children:d.all(x)}:{type:"text",value:x.value};return d.patch(x,E),d.applyData(x,E)}function wrap(d,x){const M=[];let E=-1;for(x&&M.push({type:"text",value:"\n"});++E<d.length;)E&&M.push({type:"text",value:"\n"}),M.push(d[E]);return x&&d.length>0&&M.push({type:"text",value:"\n"}),M}function trimMarkdownSpaceStart(d){let x=0,M=d.charCodeAt(x);for(;9===M||32===M;)x++,M=d.charCodeAt(x);return d.slice(x)}function toHast(d,x){const M=function createState(d,x){const M=x||Y,E=new Map,C=new Map,j=new Map,R={...$,...M.handlers},D={all:function all(d){const x=[];if("children"in d){const M=d.children;let E=-1;for(;++E<M.length;){const C=D.one(M[E],d);if(C){if(E&&"break"===M[E-1].type&&(Array.isArray(C)||"text"!==C.type||(C.value=trimMarkdownSpaceStart(C.value)),!Array.isArray(C)&&"element"===C.type)){const d=C.children[0];d&&"text"===d.type&&(d.value=trimMarkdownSpaceStart(d.value))}Array.isArray(C)?x.push(...C):x.push(C)}}}return x},applyData,definitionById:E,footnoteById:C,footnoteCounts:j,footnoteOrder:[],handlers:R,one:function one(d,x){const M=d.type,E=D.handlers[M];if(Q.call(D.handlers,M)&&E)return E(D,d,x);if(D.options.passThrough&&D.options.passThrough.includes(M)){if("children"in d){const{children:x,...M}=d,E=B(M);return E.children=D.all(d),E}return B(d)}return(D.options.unknownHandler||defaultUnknownHandler)(D,d,x)},options:M,patch,wrap};return(0,q.YR)(d,(function(d){if("definition"===d.type||"footnoteDefinition"===d.type){const x="definition"===d.type?E:C,M=String(d.identifier).toUpperCase();x.has(M)||x.set(M,d)}})),D}(d,x),C=M.one(d,void 0),j=function footer(d){const x="string"==typeof d.options.clobberPrefix?d.options.clobberPrefix:"user-content-",M=d.options.footnoteBackContent||defaultFootnoteBackContent,E=d.options.footnoteBackLabel||defaultFootnoteBackLabel,C=d.options.footnoteLabel||"Footnotes",j=d.options.footnoteLabelTagName||"h2",R=d.options.footnoteLabelProperties||{className:["sr-only"]},D=[];let F=-1;for(;++F<d.footnoteOrder.length;){const C=d.footnoteById.get(d.footnoteOrder[F]);if(!C)continue;const j=d.all(C),R=String(C.identifier).toUpperCase(),B=normalizeUri(R.toLowerCase());let q=0;const K=[],V=d.footnoteCounts.get(R);for(;void 0!==V&&++q<=V;){K.length>0&&K.push({type:"text",value:" "});let d="string"==typeof M?M:M(F,q);"string"==typeof d&&(d={type:"text",value:d}),K.push({type:"element",tagName:"a",properties:{href:"#"+x+"fnref-"+B+(q>1?"-"+q:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof E?E:E(F,q),className:["data-footnote-backref"]},children:Array.isArray(d)?d:[d]})}const W=j[j.length-1];if(W&&"element"===W.type&&"p"===W.tagName){const d=W.children[W.children.length-1];d&&"text"===d.type?d.value+=" ":W.children.push({type:"text",value:" "}),W.children.push(...K)}else j.push(...K);const $={type:"element",tagName:"li",properties:{id:x+"fn-"+B},children:d.wrap(j,!0)};d.patch(C,$),D.push($)}if(0!==D.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:j,properties:{...B(R),id:"footnote-label"},children:[{type:"text",value:C}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:d.wrap(D,!0)},{type:"text",value:"\n"}]}}(M),R=Array.isArray(C)?{type:"root",children:C}:C||{type:"root",children:[]};return j&&((0,E.ok)("children"in R),R.children.push({type:"text",value:"\n"},j)),R}function remarkRehype(d,x){return d&&"run"in d?async function(M,E){const C=toHast(M,{file:E,...x});await d.run(C,E)}:function(M,E){return toHast(M,{file:E,...x||d})}}},80646:(d,x,M)=>{"use strict";M.d(x,{G:()=>StyleModule});const E="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),C="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class StyleModule{constructor(d,x){this.rules=[];let{finish:M}=x||{};function splitSelector(d){return/^@/.test(d)?[d]:d.split(/,\s*/)}function render(d,x,E,C){let j=[],R=/^@(\w+)\b/.exec(d[0]),D=R&&"keyframes"==R[1];if(R&&null==x)return E.push(d[0]+";");for(let M in x){let C=x[M];if(/&/.test(M))render(M.split(/,\s*/).map((x=>d.map((d=>x.replace(/&/,d))))).reduce(((d,x)=>d.concat(x))),C,E);else if(C&&"object"==typeof C){if(!R)throw new RangeError("The value of a property ("+M+") should be a primitive value.");render(splitSelector(M),C,j,D)}else null!=C&&j.push(M.replace(/_.*/,"").replace(/[A-Z]/g,(d=>"-"+d.toLowerCase()))+": "+C+";")}(j.length||D)&&E.push((!M||R||C?d:d.map(M)).join(", ")+" {"+j.join(" ")+"}")}for(let x in d)render(splitSelector(x),d[x],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let d=j[E]||1;return j[E]=d+1,"ͼ"+d.toString(36)}static mount(d,x,M){let E=d[C],j=M&&M.nonce;E?j&&E.setNonce(j):E=new StyleSet(d,j),E.mount(Array.isArray(x)?x:[x],d)}}let R=new Map;class StyleSet{constructor(d,x){let M=d.ownerDocument||d,E=M.defaultView;if(!d.head&&d.adoptedStyleSheets&&E.CSSStyleSheet){let x=R.get(M);if(x)return d[C]=x;this.sheet=new E.CSSStyleSheet,R.set(M,this)}else this.styleTag=M.createElement("style"),x&&this.styleTag.setAttribute("nonce",x);this.modules=[],d[C]=this}mount(d,x){let M=this.sheet,E=0,C=0;for(let x=0;x<d.length;x++){let j=d[x],R=this.modules.indexOf(j);if(R<C&&R>-1&&(this.modules.splice(R,1),C--,R=-1),-1==R){if(this.modules.splice(C++,0,j),M)for(let d=0;d<j.rules.length;d++)M.insertRule(j.rules[d],E++)}else{for(;C<R;)E+=this.modules[C++].rules.length;E+=j.rules.length,C++}}if(M)x.adoptedStyleSheets.indexOf(this.sheet)<0&&(x.adoptedStyleSheets=[this.sheet,...x.adoptedStyleSheets]);else{let d="";for(let x=0;x<this.modules.length;x++)d+=this.modules[x].getRules()+"\n";this.styleTag.textContent=d;let M=x.head||x;this.styleTag.parentNode!=M&&M.insertBefore(this.styleTag,M.firstChild)}}setNonce(d){this.styleTag&&this.styleTag.getAttribute("nonce")!=d&&this.styleTag.setAttribute("nonce",d)}}},38408:(d,x,M)=>{"use strict";function bail(d){if(d)throw d}M.d(x,{l:()=>B});var E=M(19086),C=M(12002),j=M(82175);function trough(){const d=[],x={run:function run(...x){let M=-1;const E=x.pop();if("function"!=typeof E)throw new TypeError("Expected function as last argument, not "+E);!function next(C,...j){const R=d[++M];let D=-1;if(C)E(C);else{for(;++D<x.length;)null!==j[D]&&void 0!==j[D]||(j[D]=x[D]);x=j,R?function wrap(d,x){let M;return wrapped;function wrapped(...x){const E=d.length>x.length;let C;E&&x.push(done);try{C=d.apply(this,x)}catch(d){if(E&&M)throw d;return done(d)}E||(C&&C.then&&"function"==typeof C.then?C.then(then,done):C instanceof Error?done(C):then(C))}function done(d,...E){M||(M=!0,x(d,...E))}function then(d){done(null,d)}}(R,next)(...j):E(null,...j)}}(null,...x)},use:function use(M){if("function"!=typeof M)throw new TypeError("Expected `middelware` to be a function, not "+M);return d.push(M),x}};return x}var R=M(37535);const CallableInstance=function(d){const x=this.constructor.prototype,M=x[d],apply=function(){return M.apply(apply,arguments)};Object.setPrototypeOf(apply,x);const E=Object.getOwnPropertyNames(M);for(const d of E){const x=Object.getOwnPropertyDescriptor(M,d);x&&Object.defineProperty(apply,d,x)}return apply},D={}.hasOwnProperty;class Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){const d=new Processor;let x=-1;for(;++x<this.attachers.length;){const M=this.attachers[x];d.use(...M)}return d.data(E(!0,{},this.namespace)),d}data(d,x){return"string"==typeof d?2===arguments.length?(assertUnfrozen("data",this.frozen),this.namespace[d]=x,this):D.call(this.namespace,d)&&this.namespace[d]||void 0:d?(assertUnfrozen("data",this.frozen),this.namespace=d,this):this.namespace}freeze(){if(this.frozen)return this;const d=this;for(;++this.freezeIndex<this.attachers.length;){const[x,...M]=this.attachers[this.freezeIndex];if(!1===M[0])continue;!0===M[0]&&(M[0]=void 0);const E=x.call(d,...M);"function"==typeof E&&this.transformers.use(E)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(d){this.freeze();const x=vfile(d),M=this.parser||this.Parser;return assertParser("parse",M),M(String(x),x)}process(d,x){const M=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),x?executor(void 0,x):new Promise(executor);function executor(E,j){const R=vfile(d),D=M.parse(R);function realDone(d,M){d||!M?j(d):E?E(M):((0,C.ok)(x,"`done` is defined if `resolve` is not"),x(void 0,M))}M.run(D,R,(function(d,x,E){if(d||!x||!E)return realDone(d);const C=x,j=M.stringify(C,E);!function looksLikeAValue(d){return"string"==typeof d||function isUint8Array(d){return Boolean(d&&"object"==typeof d&&"byteLength"in d&&"byteOffset"in d)}(d)}(j)?E.result=j:E.value=j,realDone(d,E)}))}}processSync(d){let x,M=!1;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(d,(function realDone(d,E){M=!0,bail(d),x=E})),assertDone("processSync","process",M),(0,C.ok)(x,"we either bailed on an error or have a tree"),x}run(d,x,M){assertNode(d),this.freeze();const E=this.transformers;return M||"function"!=typeof x||(M=x,x=void 0),M?executor(void 0,M):new Promise(executor);function executor(j,R){(0,C.ok)("function"!=typeof x,"`file` can’t be a `done` anymore, we checked");const D=vfile(x);E.run(d,D,(function realDone(x,E,D){const B=E||d;x?R(x):j?j(B):((0,C.ok)(M,"`done` is defined if `resolve` is not"),M(void 0,B,D))}))}}runSync(d,x){let M,E=!1;return this.run(d,x,(function realDone(d,x){bail(d),M=x,E=!0})),assertDone("runSync","run",E),(0,C.ok)(M,"we either bailed on an error or have a tree"),M}stringify(d,x){this.freeze();const M=vfile(x),E=this.compiler||this.Compiler;return assertCompiler("stringify",E),assertNode(d),E(d,M)}use(d,...x){const M=this.attachers,C=this.namespace;if(assertUnfrozen("use",this.frozen),null==d);else if("function"==typeof d)addPlugin(d,x);else{if("object"!=typeof d)throw new TypeError("Expected usable value, not `"+d+"`");Array.isArray(d)?addList(d):addPreset(d)}return this;function add(d){if("function"==typeof d)addPlugin(d,[]);else{if("object"!=typeof d)throw new TypeError("Expected usable value, not `"+d+"`");if(Array.isArray(d)){const[x,...M]=d;addPlugin(x,M)}else addPreset(d)}}function addPreset(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");addList(d.plugins),d.settings&&(C.settings=E(!0,C.settings,d.settings))}function addList(d){let x=-1;if(null==d);else{if(!Array.isArray(d))throw new TypeError("Expected a list of plugins, not `"+d+"`");for(;++x<d.length;){add(d[x])}}}function addPlugin(d,x){let C=-1,R=-1;for(;++C<M.length;)if(M[C][0]===d){R=C;break}if(-1===R)M.push([d,...x]);else if(x.length>0){let[C,...D]=x;const B=M[R][1];j(B)&&j(C)&&(C=E(!0,B,C)),M[R]=[d,C,...D]}}}}const B=(new Processor).freeze();function assertParser(d,x){if("function"!=typeof x)throw new TypeError("Cannot `"+d+"` without `parser`")}function assertCompiler(d,x){if("function"!=typeof x)throw new TypeError("Cannot `"+d+"` without `compiler`")}function assertUnfrozen(d,x){if(x)throw new Error("Cannot call `"+d+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(d){if(!j(d)||"string"!=typeof d.type)throw new TypeError("Expected node, got `"+d+"`")}function assertDone(d,x,M){if(!M)throw new Error("`"+d+"` finished async. Use `"+x+"` instead")}function vfile(d){return function looksLikeAVFile(d){return Boolean(d&&"object"==typeof d&&"message"in d&&"messages"in d)}(d)?d:new R.T(d)}},54243:(d,x,M)=>{"use strict";M.d(x,{G1:()=>position,PW:()=>C,Y:()=>E});const E=point("end"),C=point("start");function point(d){return function point(x){const M=x&&x.position&&x.position[d]||{};if("number"==typeof M.line&&M.line>0&&"number"==typeof M.column&&M.column>0)return{line:M.line,column:M.column,offset:"number"==typeof M.offset&&M.offset>-1?M.offset:void 0}}}function position(d){const x=C(d),M=E(d);if(x&&M)return{start:x,end:M}}},52095:(d,x,M)=>{"use strict";function stringifyPosition(d){return d&&"object"==typeof d?"position"in d||"type"in d?position(d.position):"start"in d||"end"in d?position(d):"line"in d||"column"in d?point(d):"":""}function point(d){return index(d&&d.line)+":"+index(d&&d.column)}function position(d){return point(d&&d.start)+"-"+point(d&&d.end)}function index(d){return d&&"number"==typeof d?d:1}M.d(x,{L:()=>stringifyPosition})},77080:(d,x,M)=>{"use strict";M.d(x,{YR:()=>visit});const convert=function(d){if(null==d)return ok;if("function"==typeof d)return castFactory(d);if("object"==typeof d)return Array.isArray(d)?function anyFactory(d){const x=[];let M=-1;for(;++M<d.length;)x[M]=convert(d[M]);return castFactory(any);function any(...d){let M=-1;for(;++M<x.length;)if(x[M].apply(this,d))return!0;return!1}}(d):function propsFactory(d){const x=d;return castFactory(all);function all(M){const E=M;let C;for(C in d)if(E[C]!==x[C])return!1;return!0}}(d);if("string"==typeof d)return function typeFactory(d){return castFactory(type);function type(x){return x&&x.type===d}}(d);throw new Error("Expected function, string, or object as test")};function castFactory(d){return function check(x,M,E){return Boolean(looksLikeANode(x)&&d.call(this,x,"number"==typeof M?M:void 0,E||void 0))}}function ok(){return!0}function looksLikeANode(d){return null!==d&&"object"==typeof d&&"type"in d}const E=[],C=!0,j=!1,R="skip";function visitParents(d,x,M,D){let B;"function"==typeof x&&"function"!=typeof M?(D=M,M=x):B=x;const F=convert(B),q=D?-1:1;!function factory(d,B,K){const V=d&&"object"==typeof d?d:{};if("string"==typeof V.type){const x="string"==typeof V.tagName?V.tagName:"string"==typeof V.name?V.name:void 0;Object.defineProperty(visit,"name",{value:"node ("+d.type+(x?"<"+x+">":"")+")"})}return visit;function visit(){let V,W,$,Q=E;if((!x||F(d,B,K[K.length-1]||void 0))&&(Q=function toResult(d){if(Array.isArray(d))return d;if("number"==typeof d)return[C,d];return null==d?E:[d]}(M(d,K)),Q[0]===j))return Q;if("children"in d&&d.children){const x=d;if(x.children&&Q[0]!==R)for(W=(D?x.children.length:-1)+q,$=K.concat(x);W>-1&&W<x.children.length;){const d=x.children[W];if(V=factory(d,W,$)(),V[0]===j)return V;W="number"==typeof V[1]?V[1]:W+q}}return Q}}(d,void 0,[])()}function visit(d,x,M,E){let C,j,R;"function"==typeof x&&"function"!=typeof M?(j=void 0,R=x,C=M):(j=x,R=M,C=E),visitParents(d,j,(function overload(d,x){const M=x[x.length-1],E=M?M.children.indexOf(d):void 0;return R(d,E,M)}),C)}},75737:(d,x,M)=>{"use strict";M.d(x,{o:()=>VFileMessage});var E=M(52095);class VFileMessage extends Error{constructor(d,x,M){super(),"string"==typeof x&&(M=x,x=void 0);let C="",j={},R=!1;if(x&&(j="line"in x&&"column"in x||"start"in x&&"end"in x?{place:x}:"type"in x?{ancestors:[x],place:x.position}:{...x}),"string"==typeof d?C=d:!j.cause&&d&&(R=!0,C=d.message,j.cause=d),!j.ruleId&&!j.source&&"string"==typeof M){const d=M.indexOf(":");-1===d?j.ruleId=M:(j.source=M.slice(0,d),j.ruleId=M.slice(d+1))}if(!j.place&&j.ancestors&&j.ancestors){const d=j.ancestors[j.ancestors.length-1];d&&(j.place=d.position)}const D=j.place&&"start"in j.place?j.place.start:j.place;this.ancestors=j.ancestors||void 0,this.cause=j.cause||void 0,this.column=D?D.column:void 0,this.fatal=void 0,this.file,this.message=C,this.line=D?D.line:void 0,this.name=(0,E.L)(j.place)||"1:1",this.place=j.place||void 0,this.reason=this.message,this.ruleId=j.ruleId||void 0,this.source=j.source||void 0,this.stack=R&&j.cause&&"string"==typeof j.cause.stack?j.cause.stack:"",this.actual,this.expected,this.note,this.url}}VFileMessage.prototype.file="",VFileMessage.prototype.name="",VFileMessage.prototype.reason="",VFileMessage.prototype.message="",VFileMessage.prototype.stack="",VFileMessage.prototype.column=void 0,VFileMessage.prototype.line=void 0,VFileMessage.prototype.ancestors=void 0,VFileMessage.prototype.cause=void 0,VFileMessage.prototype.fatal=void 0,VFileMessage.prototype.place=void 0,VFileMessage.prototype.ruleId=void 0,VFileMessage.prototype.source=void 0},37535:(d,x,M)=>{"use strict";M.d(x,{T:()=>VFile});var E=M(75737);const C={basename:function basename(d,x){if(void 0!==x&&"string"!=typeof x)throw new TypeError('"ext" argument must be a string');assertPath(d);let M,E=0,C=-1,j=d.length;if(void 0===x||0===x.length||x.length>d.length){for(;j--;)if(47===d.codePointAt(j)){if(M){E=j+1;break}}else C<0&&(M=!0,C=j+1);return C<0?"":d.slice(E,C)}if(x===d)return"";let R=-1,D=x.length-1;for(;j--;)if(47===d.codePointAt(j)){if(M){E=j+1;break}}else R<0&&(M=!0,R=j+1),D>-1&&(d.codePointAt(j)===x.codePointAt(D--)?D<0&&(C=j):(D=-1,C=R));E===C?C=R:C<0&&(C=d.length);return d.slice(E,C)},dirname:function dirname(d){if(assertPath(d),0===d.length)return".";let x,M=-1,E=d.length;for(;--E;)if(47===d.codePointAt(E)){if(x){M=E;break}}else x||(x=!0);return M<0?47===d.codePointAt(0)?"/":".":1===M&&47===d.codePointAt(0)?"//":d.slice(0,M)},extname:function extname(d){assertPath(d);let x,M=d.length,E=-1,C=0,j=-1,R=0;for(;M--;){const D=d.codePointAt(M);if(47!==D)E<0&&(x=!0,E=M+1),46===D?j<0?j=M:1!==R&&(R=1):j>-1&&(R=-1);else if(x){C=M+1;break}}if(j<0||E<0||0===R||1===R&&j===E-1&&j===C+1)return"";return d.slice(j,E)},join:function join(...d){let x,M=-1;for(;++M<d.length;)assertPath(d[M]),d[M]&&(x=void 0===x?d[M]:x+"/"+d[M]);return void 0===x?".":function normalize(d){assertPath(d);const x=47===d.codePointAt(0);let M=function normalizeString(d,x){let M,E,C="",j=0,R=-1,D=0,B=-1;for(;++B<=d.length;){if(B<d.length)M=d.codePointAt(B);else{if(47===M)break;M=47}if(47===M){if(R===B-1||1===D);else if(R!==B-1&&2===D){if(C.length<2||2!==j||46!==C.codePointAt(C.length-1)||46!==C.codePointAt(C.length-2))if(C.length>2){if(E=C.lastIndexOf("/"),E!==C.length-1){E<0?(C="",j=0):(C=C.slice(0,E),j=C.length-1-C.lastIndexOf("/")),R=B,D=0;continue}}else if(C.length>0){C="",j=0,R=B,D=0;continue}x&&(C=C.length>0?C+"/..":"..",j=2)}else C.length>0?C+="/"+d.slice(R+1,B):C=d.slice(R+1,B),j=B-R-1;R=B,D=0}else 46===M&&D>-1?D++:D=-1}return C}(d,!x);0!==M.length||x||(M=".");M.length>0&&47===d.codePointAt(d.length-1)&&(M+="/");return x?"/"+M:M}(x)},sep:"/"};function assertPath(d){if("string"!=typeof d)throw new TypeError("Path must be a string. Received "+JSON.stringify(d))}const j={cwd:function cwd(){return"/"}};function isUrl(d){return Boolean(null!==d&&"object"==typeof d&&"href"in d&&d.href&&"protocol"in d&&d.protocol&&void 0===d.auth)}function urlToPath(d){if("string"==typeof d)d=new URL(d);else if(!isUrl(d)){const x=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+d+"`");throw x.code="ERR_INVALID_ARG_TYPE",x}if("file:"!==d.protocol){const d=new TypeError("The URL must be of scheme file");throw d.code="ERR_INVALID_URL_SCHEME",d}return function getPathFromURLPosix(d){if(""!==d.hostname){const d=new TypeError('File URL host must be "localhost" or empty on darwin');throw d.code="ERR_INVALID_FILE_URL_HOST",d}const x=d.pathname;let M=-1;for(;++M<x.length;)if(37===x.codePointAt(M)&&50===x.codePointAt(M+1)){const d=x.codePointAt(M+2);if(70===d||102===d){const d=new TypeError("File URL path must not include encoded / characters");throw d.code="ERR_INVALID_FILE_URL_PATH",d}}return decodeURIComponent(x)}(d)}const R=["history","path","basename","stem","extname","dirname"];class VFile{constructor(d){let x;x=d?isUrl(d)?{path:d}:"string"==typeof d||function isUint8Array(d){return Boolean(d&&"object"==typeof d&&"byteLength"in d&&"byteOffset"in d)}(d)?{value:d}:d:{},this.cwd=j.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let M,E=-1;for(;++E<R.length;){const d=R[E];d in x&&void 0!==x[d]&&null!==x[d]&&(this[d]="history"===d?[...x[d]]:x[d])}for(M in x)R.includes(M)||(this[M]=x[M])}get basename(){return"string"==typeof this.path?C.basename(this.path):void 0}set basename(d){assertNonEmpty(d,"basename"),assertPart(d,"basename"),this.path=C.join(this.dirname||"",d)}get dirname(){return"string"==typeof this.path?C.dirname(this.path):void 0}set dirname(d){lib_assertPath(this.basename,"dirname"),this.path=C.join(d||"",this.basename)}get extname(){return"string"==typeof this.path?C.extname(this.path):void 0}set extname(d){if(assertPart(d,"extname"),lib_assertPath(this.dirname,"extname"),d){if(46!==d.codePointAt(0))throw new Error("`extname` must start with `.`");if(d.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=C.join(this.dirname,this.stem+(d||""))}get path(){return this.history[this.history.length-1]}set path(d){isUrl(d)&&(d=urlToPath(d)),assertNonEmpty(d,"path"),this.path!==d&&this.history.push(d)}get stem(){return"string"==typeof this.path?C.basename(this.path,this.extname):void 0}set stem(d){assertNonEmpty(d,"stem"),assertPart(d,"stem"),this.path=C.join(this.dirname||"",d+(this.extname||""))}fail(d,x,M){const E=this.message(d,x,M);throw E.fatal=!0,E}info(d,x,M){const E=this.message(d,x,M);return E.fatal=void 0,E}message(d,x,M){const C=new E.o(d,x,M);return this.path&&(C.name=this.path+":"+C.name,C.file=this.path),C.fatal=!1,this.messages.push(C),C}toString(d){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(d||void 0).decode(this.value)}}function assertPart(d,x){if(d&&d.includes(C.sep))throw new Error("`"+x+"` cannot be a path: did not expect `"+C.sep+"`")}function assertNonEmpty(d,x){if(!d)throw new Error("`"+x+"` cannot be empty")}function lib_assertPath(d,x){if(!d)throw new Error("Setting `"+x+"` requires `path` to be set too")}},69037:(d,x,M)=>{"use strict";M.d(x,{BN:()=>C,E3:()=>E,xT:()=>keyName});for(var E={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},C={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},j="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),R="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),D=0;D<10;D++)E[48+D]=E[96+D]=String(D);for(D=1;D<=24;D++)E[D+111]="F"+D;for(D=65;D<=90;D++)E[D]=String.fromCharCode(D+32),C[D]=String.fromCharCode(D);for(var B in E)C.hasOwnProperty(B)||(C[B]=E[B]);function keyName(d){var x=!(j&&d.metaKey&&d.shiftKey&&!d.ctrlKey&&!d.altKey||R&&d.shiftKey&&d.key&&1==d.key.length||"Unidentified"==d.key)&&d.key||(d.shiftKey?C:E)[d.keyCode]||d.key||"Unidentified";return"Esc"==x&&(x="Escape"),"Del"==x&&(x="Delete"),"Left"==x&&(x="ArrowLeft"),"Up"==x&&(x="ArrowUp"),"Right"==x&&(x="ArrowRight"),"Down"==x&&(x="ArrowDown"),x}},15541:(d,x,M)=>{"use strict";M.d(x,{JK:()=>C});try{self["workbox:window:7.0.0"]&&_()}catch(n){}function n(d,x){return new Promise((function(M){var E=new MessageChannel;E.port1.onmessage=function(d){M(d.data)},d.postMessage(x,[E.port2])}))}function t(d){var x=function(d,x){if("object"!=typeof d||!d)return d;var M=d[Symbol.toPrimitive];if(void 0!==M){var E=M.call(d,"string");if("object"!=typeof E)return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(d)}(d);return"symbol"==typeof x?x:x+""}function r(d,x){for(var M=0;M<x.length;M++){var E=x[M];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(d,t(E.key),E)}}function e(d,x){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,x){return d.__proto__=x,d},e(d,x)}function i(d,x){(null==x||x>d.length)&&(x=d.length);for(var M=0,E=new Array(x);M<x;M++)E[M]=d[M];return E}try{self["workbox:core:7.0.0"]&&_()}catch(n){}var u=function(){var d=this;this.promise=new Promise((function(x,M){d.resolve=x,d.reject=M}))};function a(d,x){var M=location.href;return new URL(d,M).href===new URL(x,M).href}var c=function(d,x){this.type=d,Object.assign(this,x)};function f(d,x,M){return M?x?x(d):d:(d&&d.then||(d=Promise.resolve(d)),x?d.then(x):d)}function s(){}var E={type:"SKIP_WAITING"};function h(d,x){if(!x)return d&&d.then?d.then(s):Promise.resolve()}var C=function(d){function i(x,M){var E,C;return void 0===M&&(M={}),(E=d.call(this)||this).nn={},E.tn=0,E.rn=new u,E.en=new u,E.on=new u,E.un=0,E.an=new Set,E.cn=function(){var d=E.fn,x=d.installing;E.tn>0||!a(x.scriptURL,E.sn.toString())||performance.now()>E.un+6e4?(E.vn=x,d.removeEventListener("updatefound",E.cn)):(E.hn=x,E.an.add(x),E.rn.resolve(x)),++E.tn,x.addEventListener("statechange",E.ln)},E.ln=function(d){var x=E.fn,M=d.target,C=M.state,j=M===E.vn,R={sw:M,isExternal:j,originalEvent:d};!j&&E.mn&&(R.isUpdate=!0),E.dispatchEvent(new c(C,R)),"installed"===C?E.wn=self.setTimeout((function(){"installed"===C&&x.waiting===M&&E.dispatchEvent(new c("waiting",R))}),200):"activating"===C&&(clearTimeout(E.wn),j||E.en.resolve(M))},E.yn=function(d){var x=E.hn,M=x!==navigator.serviceWorker.controller;E.dispatchEvent(new c("controlling",{isExternal:M,originalEvent:d,sw:x,isUpdate:E.mn})),M||E.on.resolve(x)},E.gn=(C=function(d){var x=d.data,M=d.ports,C=d.source;return f(E.getSW(),(function(){E.an.has(C)&&E.dispatchEvent(new c("message",{data:x,originalEvent:d,ports:M,sw:C}))}))},function(){for(var d=[],x=0;x<arguments.length;x++)d[x]=arguments[x];try{return Promise.resolve(C.apply(this,d))}catch(d){return Promise.reject(d)}}),E.sn=x,E.nn=M,navigator.serviceWorker.addEventListener("message",E.gn),E}var x,M;M=d,(x=i).prototype=Object.create(M.prototype),x.prototype.constructor=x,e(x,M);var C,j,R=i.prototype;return R.register=function(d){var x=(void 0===d?{}:d).immediate,M=void 0!==x&&x;try{var E=this;return f(function(d,x){var M=d();return M&&M.then?M.then(x):x()}((function(){if(!M&&"complete"!==document.readyState)return h(new Promise((function(d){return window.addEventListener("load",d)})))}),(function(){return E.mn=Boolean(navigator.serviceWorker.controller),E.dn=E.pn(),f(E.bn(),(function(d){E.fn=d,E.dn&&(E.hn=E.dn,E.en.resolve(E.dn),E.on.resolve(E.dn),E.dn.addEventListener("statechange",E.ln,{once:!0}));var x=E.fn.waiting;return x&&a(x.scriptURL,E.sn.toString())&&(E.hn=x,Promise.resolve().then((function(){E.dispatchEvent(new c("waiting",{sw:x,wasWaitingBeforeRegister:!0}))})).then((function(){}))),E.hn&&(E.rn.resolve(E.hn),E.an.add(E.hn)),E.fn.addEventListener("updatefound",E.cn),navigator.serviceWorker.addEventListener("controllerchange",E.yn),E.fn}))})))}catch(d){return Promise.reject(d)}},R.update=function(){try{return this.fn?f(h(this.fn.update())):f()}catch(d){return Promise.reject(d)}},R.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},R.messageSW=function(d){try{return f(this.getSW(),(function(x){return n(x,d)}))}catch(d){return Promise.reject(d)}},R.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&n(this.fn.waiting,E)},R.pn=function(){var d=navigator.serviceWorker.controller;return d&&a(d.scriptURL,this.sn.toString())?d:void 0},R.bn=function(){try{var d=this;return f(function(d,x){try{var M=d()}catch(d){return x(d)}return M&&M.then?M.then(void 0,x):M}((function(){return f(navigator.serviceWorker.register(d.sn,d.nn),(function(x){return d.un=performance.now(),x}))}),(function(d){throw d})))}catch(d){return Promise.reject(d)}},C=i,(j=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&r(C.prototype,j),Object.defineProperty(C,"prototype",{writable:!1}),C}(function(){function n(){this.Pn=new Map}var d=n.prototype;return d.addEventListener=function(d,x){this.jn(d).add(x)},d.removeEventListener=function(d,x){this.jn(d).delete(x)},d.dispatchEvent=function(d){d.target=this;for(var x,M=function o(d,x){var M="undefined"!=typeof Symbol&&d[Symbol.iterator]||d["@@iterator"];if(M)return(M=M.call(d)).next.bind(M);if(Array.isArray(d)||(M=function(d,x){if(d){if("string"==typeof d)return i(d,x);var M=Object.prototype.toString.call(d).slice(8,-1);return"Object"===M&&d.constructor&&(M=d.constructor.name),"Map"===M||"Set"===M?Array.from(d):"Arguments"===M||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M)?i(d,x):void 0}}(d))||x&&d&&"number"==typeof d.length){M&&(d=M);var E=0;return function(){return E>=d.length?{done:!0}:{done:!1,value:d[E++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.jn(d.type));!(x=M()).done;)(0,x.value)(d)},d.jn=function(d){return this.Pn.has(d)||this.Pn.set(d,new Set),this.Pn.get(d)},n}())},51449:(d,x,M)=>{"use strict";function isZodErrorLike(d){return d instanceof Error&&"ZodError"===d.name&&"issues"in d&&Array.isArray(d.issues)}M.d(x,{yu:()=>fromZodError});var E=class extends Error{name;details;constructor(d,x){super(d,x),this.name="ZodValidationError",this.details=function getIssuesFromErrorOptions(d){if(d){const x=d.cause;if(isZodErrorLike(x))return x.issues}return[]}(x)}toString(){return this.message}};var C="; ",j=99,R="Validation error",D=": ",B=", or ";function prefixMessage(d,x,M){return null!==x?d.length>0?[x,d].join(M):x:d.length>0?d:R}var F=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function getMessageFromZodIssue(d){const{issue:x,issueSeparator:M,unionSeparator:E,includePath:C}=d;if("invalid_union"===x.code)return x.unionErrors.reduce(((d,x)=>{const j=x.issues.map((d=>getMessageFromZodIssue({issue:d,issueSeparator:M,unionSeparator:E,includePath:C}))).join(M);return d.includes(j)||d.push(j),d}),[]).join(E);if("invalid_arguments"===x.code)return[x.message,...x.argumentsError.issues.map((d=>getMessageFromZodIssue({issue:d,issueSeparator:M,unionSeparator:E,includePath:C})))].join(M);if("invalid_return_type"===x.code)return[x.message,...x.returnTypeError.issues.map((d=>getMessageFromZodIssue({issue:d,issueSeparator:M,unionSeparator:E,includePath:C})))].join(M);if(C&&function isNonEmptyArray(d){return 0!==d.length}(x.path)){if(1===x.path.length){const d=x.path[0];if("number"==typeof d)return`${x.message} at index ${d}`}return`${x.message} at "${function joinPath(d){return 1===d.length?d[0].toString():d.reduce(((d,x)=>"number"==typeof x?d+"["+x.toString()+"]":x.includes('"')?d+'["'+function escapeQuotes(d){return d.replace(/"/g,'\\"')}(x)+'"]':F.test(x)?d+(0===d.length?"":".")+x:d+'["'+x+'"]'),"")}(x.path)}"`}return x.message}function fromZodError(d,x={}){if(!isZodErrorLike(d))throw new TypeError(`Invalid zodError param; expected instance of ZodError. Did you mean to use the "${fromError.name}" method instead?`);return fromZodErrorWithoutRuntimeCheck(d,x)}function fromZodErrorWithoutRuntimeCheck(d,x={}){const{maxIssuesInMessage:M=j,issueSeparator:F=C,unionSeparator:q=B,prefixSeparator:K=D,prefix:V=R,includePath:W=!0}=x,$=d.errors,Q=prefixMessage(0===$.length?d.message:$.slice(0,M).map((d=>getMessageFromZodIssue({issue:d,issueSeparator:F,unionSeparator:q,includePath:W}))).join(F),V,K);return new E(Q,{cause:d})}var toValidationError=(d={})=>x=>isZodErrorLike(x)?fromZodErrorWithoutRuntimeCheck(x,d):x instanceof Error?new E(x.message,{cause:x}):new E("Unknown error");function fromError(d,x={}){return toValidationError(x)(d)}}}]);