From 3a6b2ed7a8ada06a36ff17bd0209aae465d33cbd Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:59:32 +0000 Subject: [PATCH] Updates --- .../{index-08601a8a.js => index-0b920267.js} | 68 +++++++++---------- index.html | 2 +- 2 files changed, 35 insertions(+), 35 deletions(-) rename assets/{index-08601a8a.js => index-0b920267.js} (88%) diff --git a/assets/index-08601a8a.js b/assets/index-0b920267.js similarity index 88% rename from assets/index-08601a8a.js rename to assets/index-0b920267.js index 07b89ee..d327d46 100644 --- a/assets/index-08601a8a.js +++ b/assets/index-0b920267.js @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Sa=Symbol.for("react.element"),FC=Symbol.for("react.portal"),jC=Symbol.for("react.fragment"),zC=Symbol.for("react.strict_mode"),BC=Symbol.for("react.profiler"),UC=Symbol.for("react.provider"),HC=Symbol.for("react.context"),WC=Symbol.for("react.forward_ref"),VC=Symbol.for("react.suspense"),qC=Symbol.for("react.memo"),ZC=Symbol.for("react.lazy"),Sy=Symbol.iterator;function GC(e){return e===null||typeof e!="object"?null:(e=Sy&&e[Sy]||e["@@iterator"],typeof e=="function"?e:null)}var Ib={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nb=Object.assign,Ob={};function Yo(e,t,n){this.props=e,this.context=t,this.refs=Ob,this.updater=n||Ib}Yo.prototype.isReactComponent={};Yo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mb(){}Mb.prototype=Yo.prototype;function Zp(e,t,n){this.props=e,this.context=t,this.refs=Ob,this.updater=n||Ib}var Gp=Zp.prototype=new Mb;Gp.constructor=Zp;Nb(Gp,Yo.prototype);Gp.isPureReactComponent=!0;var Ey=Array.isArray,Db=Object.prototype.hasOwnProperty,Yp={current:null},$b={key:!0,ref:!0,__self:!0,__source:!0};function Fb(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)Db.call(t,r)&&!$b.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,oe=W[J];if(0>>1;Ji(de,G))uei(be,de)?(W[J]=be,W[ue]=G,J=ue):(W[J]=de,W[fe]=G,J=fe);else if(uei(be,G))W[J]=be,W[ue]=G,J=ue;else break e}}return Y}function i(W,Y){var G=W.sortIndex-Y.sortIndex;return G!==0?G:W.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var d=[],y=[],_=1,c=null,f=3,w=!1,v=!1,p=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(W){for(var Y=n(y);Y!==null;){if(Y.callback===null)r(y);else if(Y.startTime<=W)r(y),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(y)}}function T(W){if(p=!1,h(W),!v)if(n(d)!==null)v=!0,H(x);else{var Y=n(y);Y!==null&&B(T,Y.startTime-W)}}function x(W,Y){v=!1,p&&(p=!1,g(E),E=-1),w=!0;var G=f;try{for(h(Y),c=n(d);c!==null&&(!(c.expirationTime>Y)||W&&!N());){var J=c.callback;if(typeof J=="function"){c.callback=null,f=c.priorityLevel;var oe=J(c.expirationTime<=Y);Y=e.unstable_now(),typeof oe=="function"?c.callback=oe:c===n(d)&&r(d),h(Y)}else r(d);c=n(d)}if(c!==null)var ce=!0;else{var fe=n(y);fe!==null&&B(T,fe.startTime-Y),ce=!1}return ce}finally{c=null,f=G,w=!1}}var k=!1,P=null,E=-1,A=5,C=-1;function N(){return!(e.unstable_now()-CW||125J?(W.sortIndex=G,t(y,W),n(d)===null&&W===n(y)&&(p?(g(E),E=-1):p=!0,B(T,G-J))):(W.sortIndex=oe,t(d,W),v||w||(v=!0,H(x))),W},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(W){var Y=f;return function(){var G=f;f=Y;try{return W.apply(this,arguments)}finally{f=G}}}})(zb);(function(e){e.exports=zb})(sP);/** + */(function(e){function t(W,Y){var G=W.length;W.push(Y);e:for(;0>>1,oe=W[J];if(0>>1;Ji(de,G))uei(be,de)?(W[J]=be,W[ue]=G,J=ue):(W[J]=de,W[fe]=G,J=fe);else if(uei(be,G))W[J]=be,W[ue]=G,J=ue;else break e}}return Y}function i(W,Y){var G=W.sortIndex-Y.sortIndex;return G!==0?G:W.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var d=[],y=[],_=1,c=null,f=3,w=!1,v=!1,p=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(W){for(var Y=n(y);Y!==null;){if(Y.callback===null)r(y);else if(Y.startTime<=W)r(y),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(y)}}function T(W){if(p=!1,h(W),!v)if(n(d)!==null)v=!0,H(x);else{var Y=n(y);Y!==null&&B(T,Y.startTime-W)}}function x(W,Y){v=!1,p&&(p=!1,g(E),E=-1),w=!0;var G=f;try{for(h(Y),c=n(d);c!==null&&(!(c.expirationTime>Y)||W&&!N());){var J=c.callback;if(typeof J=="function"){c.callback=null,f=c.priorityLevel;var oe=J(c.expirationTime<=Y);Y=e.unstable_now(),typeof oe=="function"?c.callback=oe:c===n(d)&&r(d),h(Y)}else r(d);c=n(d)}if(c!==null)var ce=!0;else{var fe=n(y);fe!==null&&B(T,fe.startTime-Y),ce=!1}return ce}finally{c=null,f=G,w=!1}}var k=!1,A=null,E=-1,P=5,C=-1;function N(){return!(e.unstable_now()-CW||125J?(W.sortIndex=G,t(y,W),n(d)===null&&W===n(y)&&(p?(g(E),E=-1):p=!0,B(T,G-J))):(W.sortIndex=oe,t(d,W),v||w||(v=!0,H(x))),W},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(W){var Y=f;return function(){var G=f;f=Y;try{return W.apply(this,arguments)}finally{f=G}}}})(zb);(function(e){e.exports=zb})(sA);/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Bb=ee,gn=kh;function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ch=Object.prototype.hasOwnProperty,aP=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ky={},Cy={};function lP(e){return Ch.call(Cy,e)?!0:Ch.call(ky,e)?!1:aP.test(e)?Cy[e]=!0:(ky[e]=!0,!1)}function uP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cP(e,t,n,r){if(t===null||typeof t>"u"||uP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function tn(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var zt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zt[e]=new tn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];zt[t]=new tn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zt[e]=new tn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zt[e]=new tn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){zt[e]=new tn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zt[e]=new tn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zt[e]=new tn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zt[e]=new tn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zt[e]=new tn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xp=/[\-:]([a-z])/g;function Qp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xp,Qp);zt[t]=new tn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xp,Qp);zt[t]=new tn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xp,Qp);zt[t]=new tn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zt[e]=new tn(e,1,!1,e.toLowerCase(),null,!1,!1)});zt.xlinkHref=new tn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zt[e]=new tn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jp(e,t,n,r){var i=zt.hasOwnProperty(t)?zt[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ch=Object.prototype.hasOwnProperty,aA=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ky={},Cy={};function lA(e){return Ch.call(Cy,e)?!0:Ch.call(ky,e)?!1:aA.test(e)?Cy[e]=!0:(ky[e]=!0,!1)}function uA(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cA(e,t,n,r){if(t===null||typeof t>"u"||uA(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function tn(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var Bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Bt[e]=new tn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Bt[t]=new tn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Bt[e]=new tn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Bt[e]=new tn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Bt[e]=new tn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Bt[e]=new tn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Bt[e]=new tn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Bt[e]=new tn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Bt[e]=new tn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xp=/[\-:]([a-z])/g;function Qp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xp,Qp);Bt[t]=new tn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xp,Qp);Bt[t]=new tn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xp,Qp);Bt[t]=new tn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Bt[e]=new tn(e,1,!1,e.toLowerCase(),null,!1,!1)});Bt.xlinkHref=new tn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Bt[e]=new tn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jp(e,t,n,r){var i=Bt.hasOwnProperty(t)?Bt[t]:null;(i!==null?i.type!==0:r||!(2l||i[a]!==s[l]){var d=` -`+i[a].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=a&&0<=l);break}}}finally{Wd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ns(e):""}function dP(e){switch(e.tag){case 5:return Ns(e.type);case 16:return Ns("Lazy");case 13:return Ns("Suspense");case 19:return Ns("SuspenseList");case 0:case 2:case 15:return e=Vd(e.type,!1),e;case 11:return e=Vd(e.type.render,!1),e;case 1:return e=Vd(e.type,!0),e;default:return""}}function Rh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case uo:return"Portal";case Ph:return"Profiler";case em:return"StrictMode";case Ah:return"Suspense";case Lh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wb:return(e.displayName||"Context")+".Consumer";case Hb:return(e._context.displayName||"Context")+".Provider";case tm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nm:return t=e.displayName||null,t!==null?t:Rh(e.type)||"Memo";case Vr:t=e._payload,e=e._init;try{return Rh(e(t))}catch{}}return null}function fP(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rh(t);case 8:return t===em?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hP(e){var t=qb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function il(e){e._valueTracker||(e._valueTracker=hP(e))}function Zb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ih(e,t){var n=t.checked;return dt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ay(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=li(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gb(e,t){t=t.checked,t!=null&&Jp(e,"checked",t,!1)}function Nh(e,t){Gb(e,t);var n=li(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oh(e,t.type,li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ly(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Oh(e,t,n){(t!=="number"||Kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Os=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ol.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ea(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pP=["Webkit","ms","Moz","O"];Object.keys(Bs).forEach(function(e){pP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bs[t]=Bs[e]})});function Qb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bs.hasOwnProperty(e)&&Bs[e]?(""+t).trim():t+"px"}function Jb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Qb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var mP=dt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $h(e,t){if(t){if(mP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function Fh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jh=null;function rm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zh=null,xo=null,ko=null;function Ny(e){if(e=ka(e)){if(typeof zh!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=mc(t),zh(e.stateNode,e.type,t))}}function e1(e){xo?ko?ko.push(e):ko=[e]:xo=e}function t1(){if(xo){var e=xo,t=ko;if(ko=xo=null,Ny(e),t)for(e=0;e>>=0,e===0?32:31-(kP(e)/CP|0)|0}var sl=64,al=4194304;function Ms(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function eu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=Ms(l):(s&=a,s!==0&&(r=Ms(s)))}else a=n&~i,a!==0?r=Ms(a):s!==0&&(r=Ms(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ea(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wn(t),e[t]=n}function RP(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Hs),Uy=String.fromCharCode(32),Hy=!1;function b1(e,t){switch(e){case"keyup":return oA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function T1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fo=!1;function aA(e,t){switch(e){case"compositionend":return T1(t);case"keypress":return t.which!==32?null:(Hy=!0,Uy);case"textInput":return e=t.data,e===Uy&&Hy?null:e;default:return null}}function lA(e,t){if(fo)return e==="compositionend"||!dm&&b1(e,t)?(e=_1(),Rl=lm=Xr=null,fo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zy(n)}}function k1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?k1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function C1(){for(var e=window,t=Kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kl(e.document)}return t}function fm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function vA(e){var t=C1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&k1(n.ownerDocument.documentElement,n)){if(r!==null&&fm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Gy(n,s);var a=Gy(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ho=null,qh=null,Vs=null,Zh=!1;function Yy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zh||ho==null||ho!==Kl(r)||(r=ho,"selectionStart"in r&&fm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vs&&sa(Vs,r)||(Vs=r,r=ru(qh,"onSelect"),0go||(e.current=Jh[go],Jh[go]=null,go--)}function Xe(e,t){go++,Jh[go]=e.current,e.current=t}var ui={},Kt=fi(ui),sn=fi(!1),$i=ui;function Do(e,t){var n=e.type.contextTypes;if(!n)return ui;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function an(e){return e=e.childContextTypes,e!=null}function ou(){tt(sn),tt(Kt)}function n_(e,t,n){if(Kt.current!==ui)throw Error(ae(168));Xe(Kt,t),Xe(sn,n)}function D1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,fP(e)||"Unknown",i));return dt({},n,r)}function su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ui,$i=Kt.current,Xe(Kt,e),Xe(sn,sn.current),!0}function r_(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=D1(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,tt(sn),tt(Kt),Xe(Kt,e)):tt(sn),Xe(sn,n)}var wr=null,gc=!1,sf=!1;function $1(e){wr===null?wr=[e]:wr.push(e)}function AA(e){gc=!0,$1(e)}function hi(){if(!sf&&wr!==null){sf=!0;var e=0,t=He;try{var n=wr;for(He=1;e>=a,i-=a,Sr=1<<32-Wn(t)+i|n<E?(A=P,P=null):A=P.sibling;var C=f(g,P,h[E],T);if(C===null){P===null&&(P=A);break}e&&P&&C.alternate===null&&t(g,P),m=s(C,m,E),k===null?x=C:k.sibling=C,k=C,P=A}if(E===h.length)return n(g,P),it&&ki(g,E),x;if(P===null){for(;EE?(A=P,P=null):A=P.sibling;var N=f(g,P,C.value,T);if(N===null){P===null&&(P=A);break}e&&P&&N.alternate===null&&t(g,P),m=s(N,m,E),k===null?x=N:k.sibling=N,k=N,P=A}if(C.done)return n(g,P),it&&ki(g,E),x;if(P===null){for(;!C.done;E++,C=h.next())C=c(g,C.value,T),C!==null&&(m=s(C,m,E),k===null?x=C:k.sibling=C,k=C);return it&&ki(g,E),x}for(P=r(g,P);!C.done;E++,C=h.next())C=w(P,g,E,C.value,T),C!==null&&(e&&C.alternate!==null&&P.delete(C.key===null?E:C.key),m=s(C,m,E),k===null?x=C:k.sibling=C,k=C);return e&&P.forEach(function($){return t(g,$)}),it&&ki(g,E),x}function b(g,m,h,T){if(typeof h=="object"&&h!==null&&h.type===co&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case rl:e:{for(var x=h.key,k=m;k!==null;){if(k.key===x){if(x=h.type,x===co){if(k.tag===7){n(g,k.sibling),m=i(k,h.props.children),m.return=g,g=m;break e}}else if(k.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Vr&&c_(x)===k.type){n(g,k.sibling),m=i(k,h.props),m.ref=Ts(g,k,h),m.return=g,g=m;break e}n(g,k);break}else t(g,k);k=k.sibling}h.type===co?(m=Mi(h.props.children,g.mode,T,h.key),m.return=g,g=m):(T=jl(h.type,h.key,h.props,null,g.mode,T),T.ref=Ts(g,m,h),T.return=g,g=T)}return a(g);case uo:e:{for(k=h.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=i(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=pf(h,g.mode,T),m.return=g,g=m}return a(g);case Vr:return k=h._init,b(g,m,k(h._payload),T)}if(Os(h))return v(g,m,h,T);if(vs(h))return p(g,m,h,T);pl(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,h),m.return=g,g=m):(n(g,m),m=hf(h,g.mode,T),m.return=g,g=m),a(g)):n(g,m)}return b}var Fo=V1(!0),q1=V1(!1),Ca={},lr=fi(Ca),ca=fi(Ca),da=fi(Ca);function Ri(e){if(e===Ca)throw Error(ae(174));return e}function bm(e,t){switch(Xe(da,t),Xe(ca,e),Xe(lr,Ca),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dh(t,e)}tt(lr),Xe(lr,t)}function jo(){tt(lr),tt(ca),tt(da)}function Z1(e){Ri(da.current);var t=Ri(lr.current),n=Dh(t,e.type);t!==n&&(Xe(ca,e),Xe(lr,n))}function Tm(e){ca.current===e&&(tt(lr),tt(ca))}var ut=fi(0);function fu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var af=[];function Sm(){for(var e=0;en?n:4,e(!0);var r=lf.transition;lf.transition={};try{e(!1),t()}finally{He=n,lf.transition=r}}function uT(){return In().memoizedState}function NA(e,t,n){var r=si(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cT(e))dT(t,n);else if(n=B1(e,t,n,r),n!==null){var i=Jt();Vn(n,e,r,i),fT(n,t,r)}}function OA(e,t,n){var r=si(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cT(e))dT(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.hasEagerState=!0,i.eagerState=l,Gn(l,a)){var d=t.interleaved;d===null?(i.next=i,_m(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=B1(e,t,i,r),n!==null&&(i=Jt(),Vn(n,e,r,i),fT(n,t,r))}}function cT(e){var t=e.alternate;return e===ct||t!==null&&t===ct}function dT(e,t){qs=hu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fT(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,om(e,n)}}var pu={readContext:Rn,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useInsertionEffect:Bt,useLayoutEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useMutableSource:Bt,useSyncExternalStore:Bt,useId:Bt,unstable_isNewReconciler:!1},MA={readContext:Rn,useCallback:function(e,t){return ir().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:f_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ml(4194308,4,iT.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ml(4,2,e,t)},useMemo:function(e,t){var n=ir();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ir();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=NA.bind(null,ct,e),[r.memoizedState,e]},useRef:function(e){var t=ir();return e={current:e},t.memoizedState=e},useState:d_,useDebugValue:Pm,useDeferredValue:function(e){return ir().memoizedState=e},useTransition:function(){var e=d_(!1),t=e[0];return e=IA.bind(null,e[1]),ir().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ct,i=ir();if(it){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),It===null)throw Error(ae(349));ji&30||K1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,f_(Q1.bind(null,r,s,e),[e]),r.flags|=2048,pa(9,X1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ir(),t=It.identifierPrefix;if(it){var n=Er,r=Sr;n=(r&~(1<<32-Wn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fa++,0")&&(d=d.replace("",e.displayName)),d}while(1<=a&&0<=l);break}}}finally{Wd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ns(e):""}function dA(e){switch(e.tag){case 5:return Ns(e.type);case 16:return Ns("Lazy");case 13:return Ns("Suspense");case 19:return Ns("SuspenseList");case 0:case 2:case 15:return e=Vd(e.type,!1),e;case 11:return e=Vd(e.type.render,!1),e;case 1:return e=Vd(e.type,!0),e;default:return""}}function Rh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case co:return"Fragment";case uo:return"Portal";case Ah:return"Profiler";case em:return"StrictMode";case Ph:return"Suspense";case Lh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wb:return(e.displayName||"Context")+".Consumer";case Hb:return(e._context.displayName||"Context")+".Provider";case tm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nm:return t=e.displayName||null,t!==null?t:Rh(e.type)||"Memo";case Vr:t=e._payload,e=e._init;try{return Rh(e(t))}catch{}}return null}function fA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rh(t);case 8:return t===em?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hA(e){var t=qb(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function il(e){e._valueTracker||(e._valueTracker=hA(e))}function Zb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ih(e,t){var n=t.checked;return dt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Py(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=li(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gb(e,t){t=t.checked,t!=null&&Jp(e,"checked",t,!1)}function Nh(e,t){Gb(e,t);var n=li(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Oh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Oh(e,t.type,li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ly(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Oh(e,t,n){(t!=="number"||Kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Os=Array.isArray;function Eo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ol.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ea(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pA=["Webkit","ms","Moz","O"];Object.keys(Bs).forEach(function(e){pA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bs[t]=Bs[e]})});function Qb(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bs.hasOwnProperty(e)&&Bs[e]?(""+t).trim():t+"px"}function Jb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Qb(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var mA=dt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $h(e,t){if(t){if(mA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ae(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ae(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ae(62))}}function Fh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jh=null;function rm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zh=null,xo=null,ko=null;function Ny(e){if(e=ka(e)){if(typeof zh!="function")throw Error(ae(280));var t=e.stateNode;t&&(t=mc(t),zh(e.stateNode,e.type,t))}}function e1(e){xo?ko?ko.push(e):ko=[e]:xo=e}function t1(){if(xo){var e=xo,t=ko;if(ko=xo=null,Ny(e),t)for(e=0;e>>=0,e===0?32:31-(kA(e)/CA|0)|0}var sl=64,al=4194304;function Ms(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function eu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=Ms(l):(s&=a,s!==0&&(r=Ms(s)))}else a=n&~i,a!==0?r=Ms(a):s!==0&&(r=Ms(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ea(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wn(t),e[t]=n}function RA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Hs),Uy=String.fromCharCode(32),Hy=!1;function b1(e,t){switch(e){case"keyup":return oP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function T1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fo=!1;function aP(e,t){switch(e){case"compositionend":return T1(t);case"keypress":return t.which!==32?null:(Hy=!0,Uy);case"textInput":return e=t.data,e===Uy&&Hy?null:e;default:return null}}function lP(e,t){if(fo)return e==="compositionend"||!dm&&b1(e,t)?(e=_1(),Rl=lm=Xr=null,fo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zy(n)}}function k1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?k1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function C1(){for(var e=window,t=Kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kl(e.document)}return t}function fm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function vP(e){var t=C1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&k1(n.ownerDocument.documentElement,n)){if(r!==null&&fm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Gy(n,s);var a=Gy(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ho=null,qh=null,Vs=null,Zh=!1;function Yy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zh||ho==null||ho!==Kl(r)||(r=ho,"selectionStart"in r&&fm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vs&&sa(Vs,r)||(Vs=r,r=ru(qh,"onSelect"),0go||(e.current=Jh[go],Jh[go]=null,go--)}function Xe(e,t){go++,Jh[go]=e.current,e.current=t}var ui={},Kt=fi(ui),sn=fi(!1),$i=ui;function Do(e,t){var n=e.type.contextTypes;if(!n)return ui;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function an(e){return e=e.childContextTypes,e!=null}function ou(){tt(sn),tt(Kt)}function n_(e,t,n){if(Kt.current!==ui)throw Error(ae(168));Xe(Kt,t),Xe(sn,n)}function D1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ae(108,fA(e)||"Unknown",i));return dt({},n,r)}function su(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ui,$i=Kt.current,Xe(Kt,e),Xe(sn,sn.current),!0}function r_(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=D1(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,tt(sn),tt(Kt),Xe(Kt,e)):tt(sn),Xe(sn,n)}var wr=null,gc=!1,sf=!1;function $1(e){wr===null?wr=[e]:wr.push(e)}function PP(e){gc=!0,$1(e)}function hi(){if(!sf&&wr!==null){sf=!0;var e=0,t=He;try{var n=wr;for(He=1;e>=a,i-=a,Sr=1<<32-Wn(t)+i|n<E?(P=A,A=null):P=A.sibling;var C=f(g,A,h[E],T);if(C===null){A===null&&(A=P);break}e&&A&&C.alternate===null&&t(g,A),m=s(C,m,E),k===null?x=C:k.sibling=C,k=C,A=P}if(E===h.length)return n(g,A),it&&ki(g,E),x;if(A===null){for(;EE?(P=A,A=null):P=A.sibling;var N=f(g,A,C.value,T);if(N===null){A===null&&(A=P);break}e&&A&&N.alternate===null&&t(g,A),m=s(N,m,E),k===null?x=N:k.sibling=N,k=N,A=P}if(C.done)return n(g,A),it&&ki(g,E),x;if(A===null){for(;!C.done;E++,C=h.next())C=c(g,C.value,T),C!==null&&(m=s(C,m,E),k===null?x=C:k.sibling=C,k=C);return it&&ki(g,E),x}for(A=r(g,A);!C.done;E++,C=h.next())C=w(A,g,E,C.value,T),C!==null&&(e&&C.alternate!==null&&A.delete(C.key===null?E:C.key),m=s(C,m,E),k===null?x=C:k.sibling=C,k=C);return e&&A.forEach(function($){return t(g,$)}),it&&ki(g,E),x}function b(g,m,h,T){if(typeof h=="object"&&h!==null&&h.type===co&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case rl:e:{for(var x=h.key,k=m;k!==null;){if(k.key===x){if(x=h.type,x===co){if(k.tag===7){n(g,k.sibling),m=i(k,h.props.children),m.return=g,g=m;break e}}else if(k.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Vr&&c_(x)===k.type){n(g,k.sibling),m=i(k,h.props),m.ref=Ts(g,k,h),m.return=g,g=m;break e}n(g,k);break}else t(g,k);k=k.sibling}h.type===co?(m=Mi(h.props.children,g.mode,T,h.key),m.return=g,g=m):(T=jl(h.type,h.key,h.props,null,g.mode,T),T.ref=Ts(g,m,h),T.return=g,g=T)}return a(g);case uo:e:{for(k=h.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=i(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=pf(h,g.mode,T),m.return=g,g=m}return a(g);case Vr:return k=h._init,b(g,m,k(h._payload),T)}if(Os(h))return v(g,m,h,T);if(vs(h))return p(g,m,h,T);pl(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=i(m,h),m.return=g,g=m):(n(g,m),m=hf(h,g.mode,T),m.return=g,g=m),a(g)):n(g,m)}return b}var Fo=V1(!0),q1=V1(!1),Ca={},lr=fi(Ca),ca=fi(Ca),da=fi(Ca);function Ri(e){if(e===Ca)throw Error(ae(174));return e}function bm(e,t){switch(Xe(da,t),Xe(ca,e),Xe(lr,Ca),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dh(t,e)}tt(lr),Xe(lr,t)}function jo(){tt(lr),tt(ca),tt(da)}function Z1(e){Ri(da.current);var t=Ri(lr.current),n=Dh(t,e.type);t!==n&&(Xe(ca,e),Xe(lr,n))}function Tm(e){ca.current===e&&(tt(lr),tt(ca))}var ut=fi(0);function fu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var af=[];function Sm(){for(var e=0;en?n:4,e(!0);var r=lf.transition;lf.transition={};try{e(!1),t()}finally{He=n,lf.transition=r}}function uT(){return In().memoizedState}function NP(e,t,n){var r=si(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cT(e))dT(t,n);else if(n=B1(e,t,n,r),n!==null){var i=Jt();Vn(n,e,r,i),fT(n,t,r)}}function OP(e,t,n){var r=si(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cT(e))dT(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.hasEagerState=!0,i.eagerState=l,Gn(l,a)){var d=t.interleaved;d===null?(i.next=i,_m(t)):(i.next=d.next,d.next=i),t.interleaved=i;return}}catch{}finally{}n=B1(e,t,i,r),n!==null&&(i=Jt(),Vn(n,e,r,i),fT(n,t,r))}}function cT(e){var t=e.alternate;return e===ct||t!==null&&t===ct}function dT(e,t){qs=hu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fT(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,om(e,n)}}var pu={readContext:Rn,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useInsertionEffect:Ut,useLayoutEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useMutableSource:Ut,useSyncExternalStore:Ut,useId:Ut,unstable_isNewReconciler:!1},MP={readContext:Rn,useCallback:function(e,t){return ir().memoizedState=[e,t===void 0?null:t],e},useContext:Rn,useEffect:f_,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ml(4194308,4,iT.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ml(4,2,e,t)},useMemo:function(e,t){var n=ir();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ir();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=NP.bind(null,ct,e),[r.memoizedState,e]},useRef:function(e){var t=ir();return e={current:e},t.memoizedState=e},useState:d_,useDebugValue:Am,useDeferredValue:function(e){return ir().memoizedState=e},useTransition:function(){var e=d_(!1),t=e[0];return e=IP.bind(null,e[1]),ir().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ct,i=ir();if(it){if(n===void 0)throw Error(ae(407));n=n()}else{if(n=t(),Nt===null)throw Error(ae(349));ji&30||K1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,f_(Q1.bind(null,r,s,e),[e]),r.flags|=2048,pa(9,X1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=ir(),t=Nt.identifierPrefix;if(it){var n=Er,r=Sr;n=(r&~(1<<32-Wn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[or]=t,e[ua]=r,bT(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fh(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;iBo&&(t.flags|=128,r=!0,Ss(s,!1),t.lanes=4194304)}else{if(!r)if(e=fu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ss(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!it)return Ut(t),null}else 2*bt()-s.renderingStartTime>Bo&&n!==1073741824&&(t.flags|=128,r=!0,Ss(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=bt(),t.sibling=null,n=ut.current,Xe(ut,r?n&1|2:n&1),t):(Ut(t),null);case 22:case 23:return Om(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hn&1073741824&&(Ut(t),t.subtreeFlags&6&&(t.flags|=8192)):Ut(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function HA(e,t){switch(pm(t),t.tag){case 1:return an(t.type)&&ou(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),tt(sn),tt(Kt),Sm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Tm(t),null;case 13:if(tt(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));$o()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(ut),null;case 4:return jo(),null;case 10:return ym(t.type._context),null;case 22:case 23:return Om(),null;case 24:return null;default:return null}}var gl=!1,qt=!1,WA=typeof WeakSet=="function"?WeakSet:Set,pe=null;function wo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pt(e,t,r)}else n.current=null}function dp(e,t,n){try{n()}catch(r){pt(e,t,r)}}var b_=!1;function VA(e,t){if(Gh=tu,e=C1(),fm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,l=-1,d=-1,y=0,_=0,c=e,f=null;t:for(;;){for(var w;c!==n||i!==0&&c.nodeType!==3||(l=a+i),c!==s||r!==0&&c.nodeType!==3||(d=a+r),c.nodeType===3&&(a+=c.nodeValue.length),(w=c.firstChild)!==null;)f=c,c=w;for(;;){if(c===e)break t;if(f===n&&++y===i&&(l=a),f===s&&++_===r&&(d=a),(w=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=w}n=l===-1||d===-1?null:{start:l,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yh={focusedElem:e,selectionRange:n},tu=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var p=v.memoizedProps,b=v.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:jn(t.type,p),b);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(T){pt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return v=b_,b_=!1,v}function Zs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&dp(t,n,s)}i=i.next}while(i!==r)}}function _c(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ET(e){var t=e.alternate;t!==null&&(e.alternate=null,ET(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[or],delete t[ua],delete t[Qh],delete t[CA],delete t[PA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xT(e){return e.tag===5||e.tag===3||e.tag===4}function T_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xT(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=iu));else if(r!==4&&(e=e.child,e!==null))for(hp(e,t,n),e=e.sibling;e!==null;)hp(e,t,n),e=e.sibling}function pp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(pp(e,t,n),e=e.sibling;e!==null;)pp(e,t,n),e=e.sibling}var Dt=null,zn=!1;function Ur(e,t,n){for(n=n.child;n!==null;)kT(e,t,n),n=n.sibling}function kT(e,t,n){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(dc,n)}catch{}switch(n.tag){case 5:qt||wo(n,t);case 6:var r=Dt,i=zn;Dt=null,Ur(e,t,n),Dt=r,zn=i,Dt!==null&&(zn?(e=Dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Dt.removeChild(n.stateNode));break;case 18:Dt!==null&&(zn?(e=Dt,n=n.stateNode,e.nodeType===8?of(e.parentNode,n):e.nodeType===1&&of(e,n),ia(e)):of(Dt,n.stateNode));break;case 4:r=Dt,i=zn,Dt=n.stateNode.containerInfo,zn=!0,Ur(e,t,n),Dt=r,zn=i;break;case 0:case 11:case 14:case 15:if(!qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&dp(n,t,a),i=i.next}while(i!==r)}Ur(e,t,n);break;case 1:if(!qt&&(wo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){pt(n,t,l)}Ur(e,t,n);break;case 21:Ur(e,t,n);break;case 22:n.mode&1?(qt=(r=qt)||n.memoizedState!==null,Ur(e,t,n),qt=r):Ur(e,t,n);break;default:Ur(e,t,n)}}function S_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new WA),t.forEach(function(r){var i=eL.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $n(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~s}if(r=i,r=bt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZA(r/1960))-r,10e?16:e,Qr===null)var r=!1;else{if(e=Qr,Qr=null,vu=0,Me&6)throw Error(ae(331));var i=Me;for(Me|=4,pe=e.current;pe!==null;){var s=pe,a=s.child;if(pe.flags&16){var l=s.deletions;if(l!==null){for(var d=0;dbt()-Im?Oi(e,0):Rm|=n),ln(e,t)}function OT(e,t){t===0&&(e.mode&1?(t=al,al<<=1,!(al&130023424)&&(al=4194304)):t=1);var n=Jt();e=Rr(e,t),e!==null&&(Ea(e,t,n),ln(e,n))}function JA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),OT(e,n)}function eL(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),OT(e,n)}var MT;MT=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rn=!1,BA(e,t,n);rn=!!(e.flags&131072)}else rn=!1,it&&t.flags&1048576&&F1(t,lu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Dl(e,t),e=t.pendingProps;var i=Do(t,Kt.current);Po(t,n),i=xm(null,t,r,e,i,n);var s=km();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,an(r)?(s=!0,su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wm(t),i.updater=vc,t.stateNode=i,i._reactInternals=t,ip(t,r,e,n),t=ap(null,t,r,!0,s,n)):(t.tag=0,it&&s&&hm(t),Qt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Dl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=nL(r),e=jn(r,e),i){case 0:t=sp(null,t,r,e,n);break e;case 1:t=y_(null,t,r,e,n);break e;case 11:t=g_(null,t,r,e,n);break e;case 14:t=v_(null,t,r,jn(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),sp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),y_(e,t,r,i,n);case 3:e:{if(yT(t),e===null)throw Error(ae(387));r=t.pendingProps,s=t.memoizedState,i=s.element,U1(e,t),du(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=zo(Error(ae(423)),t),t=__(e,t,r,n,i);break e}else if(r!==i){i=zo(Error(ae(424)),t),t=__(e,t,r,n,i);break e}else for(pn=ri(t.stateNode.containerInfo.firstChild),mn=t,it=!0,Bn=null,n=q1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($o(),r===i){t=Ir(e,t,n);break e}Qt(e,t,r,n)}t=t.child}return t;case 5:return Z1(t),e===null&&tp(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Kh(r,i)?a=null:s!==null&&Kh(r,s)&&(t.flags|=32),vT(e,t),Qt(e,t,a,n),t.child;case 6:return e===null&&tp(t),null;case 13:return _T(e,t,n);case 4:return bm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fo(t,null,r,n):Qt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),g_(e,t,r,i,n);case 7:return Qt(e,t,t.pendingProps,n),t.child;case 8:return Qt(e,t,t.pendingProps.children,n),t.child;case 12:return Qt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Xe(uu,r._currentValue),r._currentValue=a,s!==null)if(Gn(s.value,a)){if(s.children===i.children&&!sn.current){t=Ir(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var d=l.firstContext;d!==null;){if(d.context===r){if(s.tag===1){d=Cr(-1,n&-n),d.tag=2;var y=s.updateQueue;if(y!==null){y=y.shared;var _=y.pending;_===null?d.next=d:(d.next=_.next,_.next=d),y.pending=d}}s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),np(s.return,n,t),l.lanes|=n;break}d=d.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(ae(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),np(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Qt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Po(t,n),i=Rn(i),r=r(i),t.flags|=1,Qt(e,t,r,n),t.child;case 14:return r=t.type,i=jn(r,t.pendingProps),i=jn(r.type,i),v_(e,t,r,i,n);case 15:return mT(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),Dl(e,t),t.tag=1,an(r)?(e=!0,su(t)):e=!1,Po(t,n),W1(t,r,i),ip(t,r,i,n),ap(null,t,r,!0,e,n);case 19:return wT(e,t,n);case 22:return gT(e,t,n)}throw Error(ae(156,t.tag))};function DT(e,t){return l1(e,t)}function tL(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(e,t,n,r){return new tL(e,t,n,r)}function Dm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nL(e){if(typeof e=="function")return Dm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tm)return 11;if(e===nm)return 14}return 2}function ai(e,t){var n=e.alternate;return n===null?(n=Cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jl(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")Dm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case co:return Mi(n.children,i,s,t);case em:a=8,i|=8;break;case Ph:return e=Cn(12,n,t,i|2),e.elementType=Ph,e.lanes=s,e;case Ah:return e=Cn(13,n,t,i),e.elementType=Ah,e.lanes=s,e;case Lh:return e=Cn(19,n,t,i),e.elementType=Lh,e.lanes=s,e;case Vb:return bc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hb:a=10;break e;case Wb:a=9;break e;case tm:a=11;break e;case nm:a=14;break e;case Vr:a=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Cn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Mi(e,t,n,r){return e=Cn(7,e,r,t),e.lanes=n,e}function bc(e,t,n,r){return e=Cn(22,e,r,t),e.elementType=Vb,e.lanes=n,e.stateNode={isHidden:!1},e}function hf(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function pf(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rL(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zd(0),this.expirationTimes=Zd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $m(e,t,n,r,i,s,a,l,d){return e=new rL(e,t,n,l,d),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Cn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wm(s),e}function iL(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=yn})(oP);const uL=uc(Oo);var R_=Oo;xh.createRoot=R_.createRoot,xh.hydrateRoot=R_.hydrateRoot;var wu={},cL={get exports(){return wu},set exports(e){wu=e}},zT={};/** +`+s.stack}return{value:e,source:t,stack:i,digest:null}}function df(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function op(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var FP=typeof WeakMap=="function"?WeakMap:Map;function hT(e,t,n){n=Cr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gu||(gu=!0,mp=r),op(e,t)},n}function pT(e,t,n){n=Cr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){op(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){op(e,t),typeof r!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function h_(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new FP;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=QP.bind(null,e,t,n),t.then(e,e))}function p_(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function m_(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Cr(-1,1),t.tag=2,ii(n,t,1))),n.lanes|=1),e)}var jP=$r.ReactCurrentOwner,rn=!1;function Qt(e,t,n,r){t.child=e===null?q1(t,null,n,r):Fo(t,e.child,n,r)}function g_(e,t,n,r,i){n=n.render;var s=t.ref;return Ao(t,i),r=xm(e,t,n,r,s,i),n=km(),e!==null&&!rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ir(e,t,i)):(it&&n&&hm(t),t.flags|=1,Qt(e,t,r,i),t.child)}function v_(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Dm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,mT(e,t,s,r,i)):(e=jl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:sa,n(a,r)&&e.ref===t.ref)return Ir(e,t,i)}return t.flags|=1,e=ai(s,r),e.ref=t.ref,e.return=t,t.child=e}function mT(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(sa(s,r)&&e.ref===t.ref)if(rn=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(rn=!0);else return t.lanes=e.lanes,Ir(e,t,i)}return sp(e,t,n,r,i)}function gT(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(bo,hn),hn|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xe(bo,hn),hn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Xe(bo,hn),hn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Xe(bo,hn),hn|=r;return Qt(e,t,i,n),t.child}function vT(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function sp(e,t,n,r,i){var s=an(n)?$i:Kt.current;return s=Do(t,s),Ao(t,i),n=xm(e,t,n,r,s,i),r=km(),e!==null&&!rn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ir(e,t,i)):(it&&r&&hm(t),t.flags|=1,Qt(e,t,n,i),t.child)}function y_(e,t,n,r,i){if(an(n)){var s=!0;su(t)}else s=!1;if(Ao(t,i),t.stateNode===null)Dl(e,t),W1(t,n,r),ip(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var d=a.context,y=n.contextType;typeof y=="object"&&y!==null?y=Rn(y):(y=an(n)?$i:Kt.current,y=Do(t,y));var _=n.getDerivedStateFromProps,c=typeof _=="function"||typeof a.getSnapshotBeforeUpdate=="function";c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||d!==y)&&u_(t,a,r,y),qr=!1;var f=t.memoizedState;a.state=f,du(t,r,a,i),d=t.memoizedState,l!==r||f!==d||sn.current||qr?(typeof _=="function"&&(rp(t,n,_,r),d=t.memoizedState),(l=qr||l_(t,n,l,r,f,d,y))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=y,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,U1(e,t),l=t.memoizedProps,y=t.type===t.elementType?l:jn(t.type,l),a.props=y,c=t.pendingProps,f=a.context,d=n.contextType,typeof d=="object"&&d!==null?d=Rn(d):(d=an(n)?$i:Kt.current,d=Do(t,d));var w=n.getDerivedStateFromProps;(_=typeof w=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==c||f!==d)&&u_(t,a,r,d),qr=!1,f=t.memoizedState,a.state=f,du(t,r,a,i);var v=t.memoizedState;l!==c||f!==v||sn.current||qr?(typeof w=="function"&&(rp(t,n,w,r),v=t.memoizedState),(y=qr||l_(t,n,y,r,f,v,d)||!1)?(_||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,d),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,d)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=d,r=y):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ap(e,t,n,r,s,i)}function ap(e,t,n,r,i,s){vT(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&r_(t,n,!1),Ir(e,t,s);r=t.stateNode,jP.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Fo(t,e.child,null,s),t.child=Fo(t,null,l,s)):Qt(e,t,l,s),t.memoizedState=r.state,i&&r_(t,n,!0),t.child}function yT(e){var t=e.stateNode;t.pendingContext?n_(e,t.pendingContext,t.pendingContext!==t.context):t.context&&n_(e,t.context,!1),bm(e,t.containerInfo)}function __(e,t,n,r,i){return $o(),mm(i),t.flags|=256,Qt(e,t,n,r),t.child}var lp={dehydrated:null,treeContext:null,retryLane:0};function up(e){return{baseLanes:e,cachePool:null,transitions:null}}function _T(e,t,n){var r=t.pendingProps,i=ut.current,s=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xe(ut,i&1),e===null)return tp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=bc(a,r,0,null),e=Mi(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=up(n),t.memoizedState=lp,e):Pm(t,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return zP(e,t,a,r,l,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,l=i.sibling;var d={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=d,t.deletions=null):(r=ai(i,d),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=ai(l,s):(s=Mi(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?up(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=lp,r}return s=e.child,e=s.sibling,r=ai(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Pm(e,t){return t=bc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ml(e,t,n,r){return r!==null&&mm(r),Fo(t,e.child,null,n),e=Pm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zP(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=df(Error(ae(422))),ml(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=bc({mode:"visible",children:r.children},i,0,null),s=Mi(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Fo(t,e.child,null,a),t.child.memoizedState=up(a),t.memoizedState=lp,s);if(!(t.mode&1))return ml(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(ae(419)),r=df(s,r,void 0),ml(e,t,a,r)}if(l=(a&e.childLanes)!==0,rn||l){if(r=Nt,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Rr(e,i),Vn(r,e,i,-1))}return Mm(),r=df(Error(ae(421))),ml(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=JP.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,pn=ri(i.nextSibling),mn=t,it=!0,Bn=null,e!==null&&(xn[kn++]=Sr,xn[kn++]=Er,xn[kn++]=Fi,Sr=e.id,Er=e.overflow,Fi=t),t=Pm(t,r.children),t.flags|=4096,t)}function w_(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),np(e.return,t,n)}function ff(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function wT(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Qt(e,t,r.children,n),r=ut.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&w_(e,n,t);else if(e.tag===19)w_(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Xe(ut,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ff(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ff(t,!0,n,null,s);break;case"together":ff(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Dl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ir(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ae(153));if(t.child!==null){for(e=t.child,n=ai(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ai(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function BP(e,t,n){switch(t.tag){case 3:yT(t),$o();break;case 5:Z1(t);break;case 1:an(t.type)&&su(t);break;case 4:bm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xe(uu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Xe(ut,ut.current&1),t.flags|=128,null):n&t.child.childLanes?_T(e,t,n):(Xe(ut,ut.current&1),e=Ir(e,t,n),e!==null?e.sibling:null);Xe(ut,ut.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return wT(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(ut,ut.current),r)break;return null;case 22:case 23:return t.lanes=0,gT(e,t,n)}return Ir(e,t,n)}var bT,cp,TT,ST;bT=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};cp=function(){};TT=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ri(lr.current);var s=null;switch(n){case"input":i=Ih(e,i),r=Ih(e,r),s=[];break;case"select":i=dt({},i,{value:void 0}),r=dt({},r,{value:void 0}),s=[];break;case"textarea":i=Mh(e,i),r=Mh(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=iu)}$h(n,r);var a;n=null;for(y in i)if(!r.hasOwnProperty(y)&&i.hasOwnProperty(y)&&i[y]!=null)if(y==="style"){var l=i[y];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else y!=="dangerouslySetInnerHTML"&&y!=="children"&&y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(Js.hasOwnProperty(y)?s||(s=[]):(s=s||[]).push(y,null));for(y in r){var d=r[y];if(l=i!=null?i[y]:void 0,r.hasOwnProperty(y)&&d!==l&&(d!=null||l!=null))if(y==="style")if(l){for(a in l)!l.hasOwnProperty(a)||d&&d.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in d)d.hasOwnProperty(a)&&l[a]!==d[a]&&(n||(n={}),n[a]=d[a])}else n||(s||(s=[]),s.push(y,n)),n=d;else y==="dangerouslySetInnerHTML"?(d=d?d.__html:void 0,l=l?l.__html:void 0,d!=null&&l!==d&&(s=s||[]).push(y,d)):y==="children"?typeof d!="string"&&typeof d!="number"||(s=s||[]).push(y,""+d):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&(Js.hasOwnProperty(y)?(d!=null&&y==="onScroll"&&et("scroll",e),s||l===d||(s=[])):(s=s||[]).push(y,d))}n&&(s=s||[]).push("style",n);var y=s;(t.updateQueue=y)&&(t.flags|=4)}};ST=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ss(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function UP(e,t,n){var r=t.pendingProps;switch(pm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(t),null;case 1:return an(t.type)&&ou(),Ht(t),null;case 3:return r=t.stateNode,jo(),tt(sn),tt(Kt),Sm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(hl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bn!==null&&(yp(Bn),Bn=null))),cp(e,t),Ht(t),null;case 5:Tm(t);var i=Ri(da.current);if(n=t.type,e!==null&&t.stateNode!=null)TT(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ae(166));return Ht(t),null}if(e=Ri(lr.current),hl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[or]=t,r[ua]=s,e=(t.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[or]=t,e[ua]=r,bT(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fh(n,r),n){case"dialog":et("cancel",e),et("close",e),i=r;break;case"iframe":case"object":case"embed":et("load",e),i=r;break;case"video":case"audio":for(i=0;iBo&&(t.flags|=128,r=!0,Ss(s,!1),t.lanes=4194304)}else{if(!r)if(e=fu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ss(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!it)return Ht(t),null}else 2*bt()-s.renderingStartTime>Bo&&n!==1073741824&&(t.flags|=128,r=!0,Ss(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=bt(),t.sibling=null,n=ut.current,Xe(ut,r?n&1|2:n&1),t):(Ht(t),null);case 22:case 23:return Om(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?hn&1073741824&&(Ht(t),t.subtreeFlags&6&&(t.flags|=8192)):Ht(t),null;case 24:return null;case 25:return null}throw Error(ae(156,t.tag))}function HP(e,t){switch(pm(t),t.tag){case 1:return an(t.type)&&ou(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),tt(sn),tt(Kt),Sm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Tm(t),null;case 13:if(tt(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ae(340));$o()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return tt(ut),null;case 4:return jo(),null;case 10:return ym(t.type._context),null;case 22:case 23:return Om(),null;case 24:return null;default:return null}}var gl=!1,Zt=!1,WP=typeof WeakSet=="function"?WeakSet:Set,pe=null;function wo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pt(e,t,r)}else n.current=null}function dp(e,t,n){try{n()}catch(r){pt(e,t,r)}}var b_=!1;function VP(e,t){if(Gh=tu,e=C1(),fm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,l=-1,d=-1,y=0,_=0,c=e,f=null;t:for(;;){for(var w;c!==n||i!==0&&c.nodeType!==3||(l=a+i),c!==s||r!==0&&c.nodeType!==3||(d=a+r),c.nodeType===3&&(a+=c.nodeValue.length),(w=c.firstChild)!==null;)f=c,c=w;for(;;){if(c===e)break t;if(f===n&&++y===i&&(l=a),f===s&&++_===r&&(d=a),(w=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=w}n=l===-1||d===-1?null:{start:l,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yh={focusedElem:e,selectionRange:n},tu=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var p=v.memoizedProps,b=v.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?p:jn(t.type,p),b);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ae(163))}}catch(T){pt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return v=b_,b_=!1,v}function Zs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&dp(t,n,s)}i=i.next}while(i!==r)}}function _c(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ET(e){var t=e.alternate;t!==null&&(e.alternate=null,ET(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[or],delete t[ua],delete t[Qh],delete t[CP],delete t[AP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xT(e){return e.tag===5||e.tag===3||e.tag===4}function T_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xT(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function hp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=iu));else if(r!==4&&(e=e.child,e!==null))for(hp(e,t,n),e=e.sibling;e!==null;)hp(e,t,n),e=e.sibling}function pp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(pp(e,t,n),e=e.sibling;e!==null;)pp(e,t,n),e=e.sibling}var $t=null,zn=!1;function Ur(e,t,n){for(n=n.child;n!==null;)kT(e,t,n),n=n.sibling}function kT(e,t,n){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(dc,n)}catch{}switch(n.tag){case 5:Zt||wo(n,t);case 6:var r=$t,i=zn;$t=null,Ur(e,t,n),$t=r,zn=i,$t!==null&&(zn?(e=$t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$t.removeChild(n.stateNode));break;case 18:$t!==null&&(zn?(e=$t,n=n.stateNode,e.nodeType===8?of(e.parentNode,n):e.nodeType===1&&of(e,n),ia(e)):of($t,n.stateNode));break;case 4:r=$t,i=zn,$t=n.stateNode.containerInfo,zn=!0,Ur(e,t,n),$t=r,zn=i;break;case 0:case 11:case 14:case 15:if(!Zt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&dp(n,t,a),i=i.next}while(i!==r)}Ur(e,t,n);break;case 1:if(!Zt&&(wo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){pt(n,t,l)}Ur(e,t,n);break;case 21:Ur(e,t,n);break;case 22:n.mode&1?(Zt=(r=Zt)||n.memoizedState!==null,Ur(e,t,n),Zt=r):Ur(e,t,n);break;default:Ur(e,t,n)}}function S_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new WP),t.forEach(function(r){var i=eL.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $n(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~s}if(r=i,r=bt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZP(r/1960))-r,10e?16:e,Qr===null)var r=!1;else{if(e=Qr,Qr=null,vu=0,Me&6)throw Error(ae(331));var i=Me;for(Me|=4,pe=e.current;pe!==null;){var s=pe,a=s.child;if(pe.flags&16){var l=s.deletions;if(l!==null){for(var d=0;dbt()-Im?Oi(e,0):Rm|=n),ln(e,t)}function OT(e,t){t===0&&(e.mode&1?(t=al,al<<=1,!(al&130023424)&&(al=4194304)):t=1);var n=Jt();e=Rr(e,t),e!==null&&(Ea(e,t,n),ln(e,n))}function JP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),OT(e,n)}function eL(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}r!==null&&r.delete(t),OT(e,n)}var MT;MT=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rn=!1,BP(e,t,n);rn=!!(e.flags&131072)}else rn=!1,it&&t.flags&1048576&&F1(t,lu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Dl(e,t),e=t.pendingProps;var i=Do(t,Kt.current);Ao(t,n),i=xm(null,t,r,e,i,n);var s=km();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,an(r)?(s=!0,su(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,wm(t),i.updater=vc,t.stateNode=i,i._reactInternals=t,ip(t,r,e,n),t=ap(null,t,r,!0,s,n)):(t.tag=0,it&&s&&hm(t),Qt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Dl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=nL(r),e=jn(r,e),i){case 0:t=sp(null,t,r,e,n);break e;case 1:t=y_(null,t,r,e,n);break e;case 11:t=g_(null,t,r,e,n);break e;case 14:t=v_(null,t,r,jn(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),sp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),y_(e,t,r,i,n);case 3:e:{if(yT(t),e===null)throw Error(ae(387));r=t.pendingProps,s=t.memoizedState,i=s.element,U1(e,t),du(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=zo(Error(ae(423)),t),t=__(e,t,r,n,i);break e}else if(r!==i){i=zo(Error(ae(424)),t),t=__(e,t,r,n,i);break e}else for(pn=ri(t.stateNode.containerInfo.firstChild),mn=t,it=!0,Bn=null,n=q1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($o(),r===i){t=Ir(e,t,n);break e}Qt(e,t,r,n)}t=t.child}return t;case 5:return Z1(t),e===null&&tp(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Kh(r,i)?a=null:s!==null&&Kh(r,s)&&(t.flags|=32),vT(e,t),Qt(e,t,a,n),t.child;case 6:return e===null&&tp(t),null;case 13:return _T(e,t,n);case 4:return bm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fo(t,null,r,n):Qt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),g_(e,t,r,i,n);case 7:return Qt(e,t,t.pendingProps,n),t.child;case 8:return Qt(e,t,t.pendingProps.children,n),t.child;case 12:return Qt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Xe(uu,r._currentValue),r._currentValue=a,s!==null)if(Gn(s.value,a)){if(s.children===i.children&&!sn.current){t=Ir(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var d=l.firstContext;d!==null;){if(d.context===r){if(s.tag===1){d=Cr(-1,n&-n),d.tag=2;var y=s.updateQueue;if(y!==null){y=y.shared;var _=y.pending;_===null?d.next=d:(d.next=_.next,_.next=d),y.pending=d}}s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),np(s.return,n,t),l.lanes|=n;break}d=d.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(ae(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),np(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Qt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ao(t,n),i=Rn(i),r=r(i),t.flags|=1,Qt(e,t,r,n),t.child;case 14:return r=t.type,i=jn(r,t.pendingProps),i=jn(r.type,i),v_(e,t,r,i,n);case 15:return mT(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:jn(r,i),Dl(e,t),t.tag=1,an(r)?(e=!0,su(t)):e=!1,Ao(t,n),W1(t,r,i),ip(t,r,i,n),ap(null,t,r,!0,e,n);case 19:return wT(e,t,n);case 22:return gT(e,t,n)}throw Error(ae(156,t.tag))};function DT(e,t){return l1(e,t)}function tL(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(e,t,n,r){return new tL(e,t,n,r)}function Dm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nL(e){if(typeof e=="function")return Dm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tm)return 11;if(e===nm)return 14}return 2}function ai(e,t){var n=e.alternate;return n===null?(n=Cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jl(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")Dm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case co:return Mi(n.children,i,s,t);case em:a=8,i|=8;break;case Ah:return e=Cn(12,n,t,i|2),e.elementType=Ah,e.lanes=s,e;case Ph:return e=Cn(13,n,t,i),e.elementType=Ph,e.lanes=s,e;case Lh:return e=Cn(19,n,t,i),e.elementType=Lh,e.lanes=s,e;case Vb:return bc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hb:a=10;break e;case Wb:a=9;break e;case tm:a=11;break e;case nm:a=14;break e;case Vr:a=16,r=null;break e}throw Error(ae(130,e==null?e:typeof e,""))}return t=Cn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Mi(e,t,n,r){return e=Cn(7,e,r,t),e.lanes=n,e}function bc(e,t,n,r){return e=Cn(22,e,r,t),e.elementType=Vb,e.lanes=n,e.stateNode={isHidden:!1},e}function hf(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function pf(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rL(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zd(0),this.expirationTimes=Zd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function $m(e,t,n,r,i,s,a,l,d){return e=new rL(e,t,n,l,d),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Cn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wm(s),e}function iL(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=yn})(oA);const uL=uc(Oo);var R_=Oo;xh.createRoot=R_.createRoot,xh.hydrateRoot=R_.hydrateRoot;var wu={},cL={get exports(){return wu},set exports(e){wu=e}},zT={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -53,14 +53,14 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var kc=ee,bL=wu;function TL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var SL=typeof Object.is=="function"?Object.is:TL,EL=bL.useSyncExternalStore,xL=kc.useRef,kL=kc.useEffect,CL=kc.useMemo,PL=kc.useDebugValue;BT.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=xL(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=CL(function(){function d(w){if(!y){if(y=!0,_=w,w=r(w),i!==void 0&&a.hasValue){var v=a.value;if(i(v,w))return c=v}return c=w}if(v=c,SL(_,w))return v;var p=r(w);return i!==void 0&&i(v,p)?v:(_=w,c=p)}var y=!1,_,c,f=n===void 0?null:n;return[function(){return d(t())},f===null?void 0:function(){return d(f())}]},[t,n,r,i]);var l=EL(e,s[0],s[1]);return kL(function(){a.hasValue=!0,a.value=l},[l]),PL(l),l};(function(e){e.exports=BT})(wL);function AL(e){e()}let UT=AL;const LL=e=>UT=e,RL=()=>UT,HT=ee.createContext(null),IL=()=>{throw new Error("uSES not initialized!")};function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var _p={},NL={get exports(){return _p},set exports(e){_p=e}},We={};/** @license React v16.13.1 + */var kc=ee,bL=wu;function TL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var SL=typeof Object.is=="function"?Object.is:TL,EL=bL.useSyncExternalStore,xL=kc.useRef,kL=kc.useEffect,CL=kc.useMemo,AL=kc.useDebugValue;BT.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=xL(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=CL(function(){function d(w){if(!y){if(y=!0,_=w,w=r(w),i!==void 0&&a.hasValue){var v=a.value;if(i(v,w))return c=v}return c=w}if(v=c,SL(_,w))return v;var p=r(w);return i!==void 0&&i(v,p)?v:(_=w,c=p)}var y=!1,_,c,f=n===void 0?null:n;return[function(){return d(t())},f===null?void 0:function(){return d(f())}]},[t,n,r,i]);var l=EL(e,s[0],s[1]);return kL(function(){a.hasValue=!0,a.value=l},[l]),AL(l),l};(function(e){e.exports=BT})(wL);function PL(e){e()}let UT=PL;const LL=e=>UT=e,RL=()=>UT,HT=ee.createContext(null),IL=()=>{throw new Error("uSES not initialized!")};function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var _p={},NL={get exports(){return _p},set exports(e){_p=e}},We={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Nt=typeof Symbol=="function"&&Symbol.for,Um=Nt?Symbol.for("react.element"):60103,Hm=Nt?Symbol.for("react.portal"):60106,Cc=Nt?Symbol.for("react.fragment"):60107,Pc=Nt?Symbol.for("react.strict_mode"):60108,Ac=Nt?Symbol.for("react.profiler"):60114,Lc=Nt?Symbol.for("react.provider"):60109,Rc=Nt?Symbol.for("react.context"):60110,Wm=Nt?Symbol.for("react.async_mode"):60111,Ic=Nt?Symbol.for("react.concurrent_mode"):60111,Nc=Nt?Symbol.for("react.forward_ref"):60112,Oc=Nt?Symbol.for("react.suspense"):60113,OL=Nt?Symbol.for("react.suspense_list"):60120,Mc=Nt?Symbol.for("react.memo"):60115,Dc=Nt?Symbol.for("react.lazy"):60116,ML=Nt?Symbol.for("react.block"):60121,DL=Nt?Symbol.for("react.fundamental"):60117,$L=Nt?Symbol.for("react.responder"):60118,FL=Nt?Symbol.for("react.scope"):60119;function wn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Um:switch(e=e.type,e){case Wm:case Ic:case Cc:case Ac:case Pc:case Oc:return e;default:switch(e=e&&e.$$typeof,e){case Rc:case Nc:case Dc:case Mc:case Lc:return e;default:return t}}case Hm:return t}}}function WT(e){return wn(e)===Ic}We.AsyncMode=Wm;We.ConcurrentMode=Ic;We.ContextConsumer=Rc;We.ContextProvider=Lc;We.Element=Um;We.ForwardRef=Nc;We.Fragment=Cc;We.Lazy=Dc;We.Memo=Mc;We.Portal=Hm;We.Profiler=Ac;We.StrictMode=Pc;We.Suspense=Oc;We.isAsyncMode=function(e){return WT(e)||wn(e)===Wm};We.isConcurrentMode=WT;We.isContextConsumer=function(e){return wn(e)===Rc};We.isContextProvider=function(e){return wn(e)===Lc};We.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Um};We.isForwardRef=function(e){return wn(e)===Nc};We.isFragment=function(e){return wn(e)===Cc};We.isLazy=function(e){return wn(e)===Dc};We.isMemo=function(e){return wn(e)===Mc};We.isPortal=function(e){return wn(e)===Hm};We.isProfiler=function(e){return wn(e)===Ac};We.isStrictMode=function(e){return wn(e)===Pc};We.isSuspense=function(e){return wn(e)===Oc};We.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cc||e===Ic||e===Ac||e===Pc||e===Oc||e===OL||typeof e=="object"&&e!==null&&(e.$$typeof===Dc||e.$$typeof===Mc||e.$$typeof===Lc||e.$$typeof===Rc||e.$$typeof===Nc||e.$$typeof===DL||e.$$typeof===$L||e.$$typeof===FL||e.$$typeof===ML)};We.typeOf=wn;(function(e){e.exports=We})(NL);var Vm=_p,jL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},zL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},BL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},VT={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qm={};qm[Vm.ForwardRef]=BL;qm[Vm.Memo]=VT;function N_(e){return Vm.isMemo(e)?VT:qm[e.$$typeof]||jL}var UL=Object.defineProperty,HL=Object.getOwnPropertyNames,O_=Object.getOwnPropertySymbols,WL=Object.getOwnPropertyDescriptor,VL=Object.getPrototypeOf,M_=Object.prototype;function qT(e,t,n){if(typeof t!="string"){if(M_){var r=VL(t);r&&r!==M_&&qT(e,r,n)}var i=HL(t);O_&&(i=i.concat(O_(t)));for(var s=N_(e),a=N_(t),l=0;lt(i(...s)))}return n}function bp(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function $_(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):e.length!==1}function GT(e,t){return function(r,{displayName:i}){const s=function(l,d){return s.dependsOnOwnProps?s.mapToProps(l,d):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,d){s.mapToProps=e,s.dependsOnOwnProps=$_(e);let y=s(l,d);return typeof y=="function"&&(s.mapToProps=y,s.dependsOnOwnProps=$_(y),y=s(l,d)),y},s}}function Ym(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function JL(e){return e&&typeof e=="object"?bp(t=>QL(e,t)):e?typeof e=="function"?GT(e):Ym(e,"mapDispatchToProps"):bp(t=>({dispatch:t}))}function e2(e){return e?typeof e=="function"?GT(e):Ym(e,"mapStateToProps"):bp(()=>({}))}function t2(e,t,n){return Lo({},n,e,t)}function n2(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let s=!1,a;return function(d,y,_){const c=e(d,y,_);return s?i(c,a)||(a=c):(s=!0,a=c),a}}}function r2(e){return e?typeof e=="function"?n2(e):Ym(e,"mergeProps"):()=>t2}function i2(){const e=RL();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,s=n={callback:r,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!i||t===null||(i=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}const F_={notify(){},get:()=>[]};function YT(e,t){let n,r=F_;function i(c){return d(),r.subscribe(c)}function s(){r.notify()}function a(){_.onStateChange&&_.onStateChange()}function l(){return Boolean(n)}function d(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=i2())}function y(){n&&(n(),n=void 0,r.clear(),r=F_)}const _={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:a,isSubscribed:l,trySubscribe:d,tryUnsubscribe:y,getListeners:()=>r};return _}const o2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bu=o2?ee.useLayoutEffect:ee.useEffect;function j_(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function gf(e,t){if(j_(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{KT=e},l2=[null,null];function u2(e,t,n){bu(()=>e(...t),n)}function c2(e,t,n,r,i,s){e.current=r,n.current=!1,i.current&&(i.current=null,s())}function d2(e,t,n,r,i,s,a,l,d,y,_){if(!e)return()=>{};let c=!1,f=null;const w=()=>{if(c||!l.current)return;const p=t.getState();let b,g;try{b=r(p,i.current)}catch(m){g=m,f=m}g||(f=null),b===s.current?a.current||y():(s.current=b,d.current=b,a.current=!0,_())};return n.onStateChange=w,n.trySubscribe(),w(),()=>{if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function f2(e,t){return e===t}function pi(e,t,n,{pure:r,areStatesEqual:i=f2,areOwnPropsEqual:s=gf,areStatePropsEqual:a=gf,areMergedPropsEqual:l=gf,forwardRef:d=!1,context:y=HT}={}){const _=y,c=e2(e),f=JL(t),w=r2(n),v=Boolean(e);return b=>{const g=b.displayName||b.name||"Component",m=`Connect(${g})`,h={shouldHandleStateChanges:v,displayName:m,wrappedComponentName:g,WrappedComponent:b,initMapStateToProps:c,initMapDispatchToProps:f,initMergeProps:w,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function T(P){const[E,A,C]=ee.useMemo(()=>{const{reactReduxForwardedRef:Z}=P,Q=Bm(P,s2);return[P.context,Z,Q]},[P]),N=ee.useMemo(()=>E&&E.Consumer&&wp.isContextConsumer(wt.createElement(E.Consumer,null))?E:_,[E,_]),$=ee.useContext(N),F=Boolean(P.store)&&Boolean(P.store.getState)&&Boolean(P.store.dispatch),z=Boolean($)&&Boolean($.store),U=F?P.store:$.store,H=z?$.getServerState:U.getState,B=ee.useMemo(()=>XL(U.dispatch,h),[U]),[W,Y]=ee.useMemo(()=>{if(!v)return l2;const Z=YT(U,F?void 0:$.subscription),Q=Z.notifyNestedSubs.bind(Z);return[Z,Q]},[U,F,$]),G=ee.useMemo(()=>F?$:Lo({},$,{subscription:W}),[F,$,W]),J=ee.useRef(),oe=ee.useRef(C),ce=ee.useRef(),fe=ee.useRef(!1);ee.useRef(!1);const de=ee.useRef(!1),ue=ee.useRef();bu(()=>(de.current=!0,()=>{de.current=!1}),[]);const be=ee.useMemo(()=>()=>ce.current&&C===oe.current?ce.current:B(U.getState(),C),[U,C]),ne=ee.useMemo(()=>Q=>W?d2(v,U,W,B,oe,J,fe,de,ce,Y,Q):()=>{},[W]);u2(c2,[oe,J,fe,C,ce,Y]);let O;try{O=KT(ne,be,H?()=>B(H(),C):be)}catch(Z){throw ue.current&&(Z.message+=` + */var Zm=Symbol.for("react.element"),Gm=Symbol.for("react.portal"),$c=Symbol.for("react.fragment"),Fc=Symbol.for("react.strict_mode"),jc=Symbol.for("react.profiler"),zc=Symbol.for("react.provider"),Bc=Symbol.for("react.context"),ZL=Symbol.for("react.server_context"),Uc=Symbol.for("react.forward_ref"),Hc=Symbol.for("react.suspense"),Wc=Symbol.for("react.suspense_list"),Vc=Symbol.for("react.memo"),qc=Symbol.for("react.lazy"),GL=Symbol.for("react.offscreen"),ZT;ZT=Symbol.for("react.module.reference");function Nn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Zm:switch(e=e.type,e){case $c:case jc:case Fc:case Hc:case Wc:return e;default:switch(e=e&&e.$$typeof,e){case ZL:case Bc:case Uc:case qc:case Vc:case zc:return e;default:return t}}case Gm:return t}}}Ve.ContextConsumer=Bc;Ve.ContextProvider=zc;Ve.Element=Zm;Ve.ForwardRef=Uc;Ve.Fragment=$c;Ve.Lazy=qc;Ve.Memo=Vc;Ve.Portal=Gm;Ve.Profiler=jc;Ve.StrictMode=Fc;Ve.Suspense=Hc;Ve.SuspenseList=Wc;Ve.isAsyncMode=function(){return!1};Ve.isConcurrentMode=function(){return!1};Ve.isContextConsumer=function(e){return Nn(e)===Bc};Ve.isContextProvider=function(e){return Nn(e)===zc};Ve.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zm};Ve.isForwardRef=function(e){return Nn(e)===Uc};Ve.isFragment=function(e){return Nn(e)===$c};Ve.isLazy=function(e){return Nn(e)===qc};Ve.isMemo=function(e){return Nn(e)===Vc};Ve.isPortal=function(e){return Nn(e)===Gm};Ve.isProfiler=function(e){return Nn(e)===jc};Ve.isStrictMode=function(e){return Nn(e)===Fc};Ve.isSuspense=function(e){return Nn(e)===Hc};Ve.isSuspenseList=function(e){return Nn(e)===Wc};Ve.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$c||e===jc||e===Fc||e===Hc||e===Wc||e===GL||typeof e=="object"&&e!==null&&(e.$$typeof===qc||e.$$typeof===Vc||e.$$typeof===zc||e.$$typeof===Bc||e.$$typeof===Uc||e.$$typeof===ZT||e.getModuleId!==void 0)};Ve.typeOf=Nn;(function(e){e.exports=Ve})(qL);const YL=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function KL(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:s,areStatePropsEqual:a}){let l=!1,d,y,_,c,f;function w(m,h){return d=m,y=h,_=e(d,y),c=t(r,y),f=n(_,c,y),l=!0,f}function v(){return _=e(d,y),t.dependsOnOwnProps&&(c=t(r,y)),f=n(_,c,y),f}function p(){return e.dependsOnOwnProps&&(_=e(d,y)),t.dependsOnOwnProps&&(c=t(r,y)),f=n(_,c,y),f}function b(){const m=e(d,y),h=!a(m,_);return _=m,h&&(f=n(_,c,y)),f}function g(m,h){const T=!s(h,y),x=!i(m,d,h,y);return d=m,y=h,T&&x?v():T?p():x?b():f}return function(h,T){return l?g(h,T):w(h,T)}}function XL(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,s=Bm(t,YL);const a=n(e,s),l=r(e,s),d=i(e,s);return KL(a,l,d,e,s)}function QL(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...s)=>t(i(...s)))}return n}function bp(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function $_(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):e.length!==1}function GT(e,t){return function(r,{displayName:i}){const s=function(l,d){return s.dependsOnOwnProps?s.mapToProps(l,d):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,d){s.mapToProps=e,s.dependsOnOwnProps=$_(e);let y=s(l,d);return typeof y=="function"&&(s.mapToProps=y,s.dependsOnOwnProps=$_(y),y=s(l,d)),y},s}}function Ym(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function JL(e){return e&&typeof e=="object"?bp(t=>QL(e,t)):e?typeof e=="function"?GT(e):Ym(e,"mapDispatchToProps"):bp(t=>({dispatch:t}))}function e2(e){return e?typeof e=="function"?GT(e):Ym(e,"mapStateToProps"):bp(()=>({}))}function t2(e,t,n){return Lo({},n,e,t)}function n2(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let s=!1,a;return function(d,y,_){const c=e(d,y,_);return s?i(c,a)||(a=c):(s=!0,a=c),a}}}function r2(e){return e?typeof e=="function"?n2(e):Ym(e,"mergeProps"):()=>t2}function i2(){const e=RL();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,s=n={callback:r,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!i||t===null||(i=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}const F_={notify(){},get:()=>[]};function YT(e,t){let n,r=F_;function i(c){return d(),r.subscribe(c)}function s(){r.notify()}function a(){_.onStateChange&&_.onStateChange()}function l(){return Boolean(n)}function d(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=i2())}function y(){n&&(n(),n=void 0,r.clear(),r=F_)}const _={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:a,isSubscribed:l,trySubscribe:d,tryUnsubscribe:y,getListeners:()=>r};return _}const o2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bu=o2?ee.useLayoutEffect:ee.useEffect;function j_(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function gf(e,t){if(j_(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{KT=e},l2=[null,null];function u2(e,t,n){bu(()=>e(...t),n)}function c2(e,t,n,r,i,s){e.current=r,n.current=!1,i.current&&(i.current=null,s())}function d2(e,t,n,r,i,s,a,l,d,y,_){if(!e)return()=>{};let c=!1,f=null;const w=()=>{if(c||!l.current)return;const p=t.getState();let b,g;try{b=r(p,i.current)}catch(m){g=m,f=m}g||(f=null),b===s.current?a.current||y():(s.current=b,d.current=b,a.current=!0,_())};return n.onStateChange=w,n.trySubscribe(),w(),()=>{if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function f2(e,t){return e===t}function pi(e,t,n,{pure:r,areStatesEqual:i=f2,areOwnPropsEqual:s=gf,areStatePropsEqual:a=gf,areMergedPropsEqual:l=gf,forwardRef:d=!1,context:y=HT}={}){const _=y,c=e2(e),f=JL(t),w=r2(n),v=Boolean(e);return b=>{const g=b.displayName||b.name||"Component",m=`Connect(${g})`,h={shouldHandleStateChanges:v,displayName:m,wrappedComponentName:g,WrappedComponent:b,initMapStateToProps:c,initMapDispatchToProps:f,initMergeProps:w,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function T(A){const[E,P,C]=ee.useMemo(()=>{const{reactReduxForwardedRef:Z}=A,Q=Bm(A,s2);return[A.context,Z,Q]},[A]),N=ee.useMemo(()=>E&&E.Consumer&&wp.isContextConsumer(wt.createElement(E.Consumer,null))?E:_,[E,_]),$=ee.useContext(N),F=Boolean(A.store)&&Boolean(A.store.getState)&&Boolean(A.store.dispatch),z=Boolean($)&&Boolean($.store),U=F?A.store:$.store,H=z?$.getServerState:U.getState,B=ee.useMemo(()=>XL(U.dispatch,h),[U]),[W,Y]=ee.useMemo(()=>{if(!v)return l2;const Z=YT(U,F?void 0:$.subscription),Q=Z.notifyNestedSubs.bind(Z);return[Z,Q]},[U,F,$]),G=ee.useMemo(()=>F?$:Lo({},$,{subscription:W}),[F,$,W]),J=ee.useRef(),oe=ee.useRef(C),ce=ee.useRef(),fe=ee.useRef(!1);ee.useRef(!1);const de=ee.useRef(!1),ue=ee.useRef();bu(()=>(de.current=!0,()=>{de.current=!1}),[]);const be=ee.useMemo(()=>()=>ce.current&&C===oe.current?ce.current:B(U.getState(),C),[U,C]),ne=ee.useMemo(()=>Q=>W?d2(v,U,W,B,oe,J,fe,de,ce,Y,Q):()=>{},[W]);u2(c2,[oe,J,fe,C,ce,Y]);let O;try{O=KT(ne,be,H?()=>B(H(),C):be)}catch(Z){throw ue.current&&(Z.message+=` The error may be correlated with this previous error: ${ue.current.stack} -`),Z}bu(()=>{ue.current=void 0,ce.current=void 0,J.current=O});const j=ee.useMemo(()=>wt.createElement(b,Lo({},O,{ref:A})),[A,b,O]);return ee.useMemo(()=>v?wt.createElement(N.Provider,{value:G},j):j,[N,j,G])}const k=wt.memo(T);if(k.WrappedComponent=b,k.displayName=T.displayName=m,d){const E=wt.forwardRef(function(C,N){return wt.createElement(k,Lo({},C,{reactReduxForwardedRef:N}))});return E.displayName=m,E.WrappedComponent=b,D_(E,b)}return D_(k,b)}}function h2({store:e,context:t,children:n,serverState:r}){const i=ee.useMemo(()=>{const l=YT(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0}},[e,r]),s=ee.useMemo(()=>e.getState(),[e]);bu(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]);const a=t||HT;return wt.createElement(a.Provider,{value:i},n)}a2(wu.useSyncExternalStore);LL(Oo.unstable_batchedUpdates);function ga(e){return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function p2(e,t){if(ga(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ga(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m2(e){var t=p2(e,"string");return ga(t)==="symbol"?t:String(t)}function g2(e,t,n){return t=m2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B_(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($t(1));return n(Zc)(e,t)}if(typeof e!="function")throw new Error($t(2));var i=e,s=t,a=[],l=a,d=!1;function y(){l===a&&(l=a.slice())}function _(){if(d)throw new Error($t(3));return s}function c(p){if(typeof p!="function")throw new Error($t(4));if(d)throw new Error($t(5));var b=!0;return y(),l.push(p),function(){if(b){if(d)throw new Error($t(6));b=!1,y();var m=l.indexOf(p);l.splice(m,1),a=null}}}function f(p){if(!v2(p))throw new Error($t(7));if(typeof p.type>"u")throw new Error($t(8));if(d)throw new Error($t(9));try{d=!0,s=i(s,p)}finally{d=!1}for(var b=a=l,g=0;g"u")throw new Error($t(12));if(typeof n(void 0,{type:va.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($t(13))})}function XT(e){for(var t=Object.keys(e),n={},r=0;r"u")throw y&&y.type,new Error($t(14));c[w]=b,_=_||b!==p}return _=_||s.length!==Object.keys(d).length,_?c:d}}function H_(e,t){return function(){return t(e.apply(this,arguments))}}function Qo(e,t){if(typeof e=="function")return H_(e,t);if(typeof e!="object"||e===null)throw new Error($t(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=H_(i,t))}return n}function Km(){for(var e=arguments.length,t=new Array(e),n=0;n
Image: Vyacheslav Madiyevskyy/Reuters
Image: Järva Teataja/Scanpix Baltics via Reuters
','This map plots out and highlights incidents that have resulted in potential civilian impact or harm since Russia began its invasion of Ukraine. The incidents detailed have been collected by Bellingcat researchers. Included in the map are instances where civilian areas and infrastructure have been damaged or destroyed, where the presence of civilian injuries are visible and/or there is the presence of immobile civilian bodies. Collection for the incidences contained in this map began on February 24, 2022. Users can explore incidents by date and location. We intend this to be a living project that will continue to be updated as long as the conflict persists. For more detailed information about the entries included in this map, please refer to our methodology and explainer article which can be read here.',"

Editor's note: An error in our archiving system between October 21 and November 7 led to some incidents being published on our TimeMap before they were fully verified. We have fixed this issue and are working to verify all extra incidents.

"],flags:{isInfopoup:!1,isCover:!1},cover:{title:"About and Methodology",exploreButton:"BACK TO THE PLATFORM",description:["## Scope of Research","This database, organised on Forensic Architecture's [TimeMap](https://github.com/forensic-architecture/timemap) platform and customised for this project, is focused on incidents in Ukraine that have resulted in potential civilian harm. These include: incidents where rockets or missiles struck civilian areas, where attacks have resulted in the destruction of civilian infrastructure, where the presence of civilian injuries are visible and/or the presence of immobile civilian bodies. This database began collection on February 24, 2022 and intends to be a living document that will continue to be updated as long as the conflict persists. While we are attempting to collect as many incidents as possible, we cannot possibly guarantee to collect them all nor will we be able to corroborate the locations of all the incidents we collect. Those we do not corroborate the originality or exact location of will not be shown on the map. Therefore, this map is not an exhaustive list of civilian harm in Ukraine but rather a representation of all incidents which we have been able to collect and of which we have been able to determine the exact locations. ","## Open Source Footage","The links in this map are all open source, meaning they are connected to an open link posted online. These sources were collected by Bellingcat researchers and placed in a database from where they are also being archived locally. After collection, our Global Authentication Project members have determined the location of each of these events (you can read more about the Global Authentication Project and its makeup below). Bellingcat staff then cross-referenced these coordinates to ensure their accuracy. The resolution of these geolocations is within 150 metres of where the incident occurred but the public coordinates viewable on the map have been slightly obscured in order to protect the identity of the creators. Because this footage is open source, the users who uploaded the content are not directly affiliated to Bellingcat or our partners. Any opinions that may be contained within the posts are therefore not those of Bellingcat or our partners. Any claims contained within the posts have also not necessarily been confirmed or verified by Bellingcat, particularly in relation to which party may have been responsible for the incidents detailed.","## Verification Level","The data being collected is checked for originality, basic manipulation, and location by Bellingcat investigators. This level of verification is intended to indicate where incidents took place, when and where there are reasonable visual indications of civilian harm. Our investigation plan for the collection of this material and its uses are informed by the [Berkeley Protocol on Digital Open Source Investigations](https://www.ohchr.org/en/publications/policy-and-methodological-publications/berkeley-protocol-digital-open-source). These incidents are also being collected and archived at a [forensic level](https://mnemonic.org/en/our-work) for potential evidentiary use in the future. That level of in-depth analysis and verification will take many months and our goal with this map is to transparently report on the current situation in Ukraine, as it is happening, for public interest. To be clear, these two processes will be separate.","## Descriptions","Each incident is accompanied with source links, the exact location determined by our Global Authentication Project and Bellingcat researchers, as well as a brief description of the incident based on what is visually present. The descriptions indicate what is clearly visible but do not attempt to make assumptions about the exact number of casualties or which party to the conflict is responsible due to those factors being difficult to fully determine from short, visual imagery alone.","## Filters","On the left hand side of the map, a user can toggle between different kinds of areas impacted. We are characterising the areas as residential, industrial, administrative, healthcare, school/childcare, military, commercial, religious, or undefined. Decisions on these classifications are based on visual evidence in the footage and what the area is reportedly used as. We cannot fully exclude or exhaustively search for the potential of military use in some of these areas.","## Source Links/Embedding","We have chosen to embed the social media links directly onto the platform. Should any be deleted by the uploader, they will still be visible on the map, but data on the post, user and footage will no longer be presented publicly. Where sensitive footage posted by individuals might allow them or their location to be identified, we have sought to preemptively take steps to anonymise these users.","## Privacy concerns and respect for the dead ","This footage is graphic and contains distressing scenes of war and conflict. Many of the areas represented are, at time of writing, also under attack both physically and through online attempts to discredit or harm users posting this content. For these reasons, we have chosen not to share certain posts that might indicate the direct identity of any of the persons filming. We have also filtered out posts that contain images where an immobile body is closely filmed and their identity might be ascertained out of respect for them and their close ones.","## A Note on Bellingcat's Global Authentication Project","The Global Authentication Project consists of a wide community of open source researchers assisting in Bellingcat research through structured tasks and feedback. Our aim is to authenticate events taking place around the world and fill in the gaps of knowledge that exist, particularly in situations where there are vast quantities of data. In creating a community for those interested in open source research, we are fostering Bellingcat's original aim of solving problems **together**, to diversify our investigations and promote the use of these skills. For this dataset, we are working with many individuals who have Ukrainian language skills and others with local contextual knowledge of the events and places seen on the map. Other participants include individuals skilled in geolocation and chronolocation, with all contributions being vetted by Bellingcat researchers. As we expand the Global Authentication Project in the coming months, more information will be available on our website and Twitter.","## Feedback","This map will continue to change and be updated for the duration of this conflict. We welcome feedback on our methodology, data collection and take transparency seriously. Should you have any direct feedback about the platform, please indicate it on this [form](https://forms.gle/cV2YAojBoh6h4T3XA)."]},toolbar:{panels:{categories:{}}},spotlights:{}},ui:{coloring:{mode:"STATIC",maxNumOfColors:9,defaultColor:"#dfdfdf",colors:["#7E57C2","#F57C00","#FFEB3B","#D34F73","#08B2E3","#A1887F","#90A4AE","#E57373","#80CBC4"]},card:{layout:{template:"sourced"}},carto:{eventRadius:8},timeline:{eventRadius:9},tiles:{current:"bellingcat-mapbox/cl0qnou2y003m15s8ieuyhgsy",default:"bellingcat-mapbox/cl0qnou2y003m15s8ieuyhgsy",satellite:"bellingcat-mapbox/cl1win2vp003914pdhateva6p"}},features:{USE_CATEGORIES:!1,CATEGORIES_AS_FILTERS:!1,COLOR_BY_CATEGORY:!1,COLOR_BY_ASSOCIATION:!0,USE_ASSOCIATIONS:!0,USE_FULLSCREEN:!0,USE_DOWNLOAD:!0,USE_SOURCES:!0,USE_SPOTLIGHTS:!1,USE_SHAPES:!1,USE_COVER:!0,USE_INTRO:!1,USE_SATELLITE_OVERLAY_TOGGLE:!0,USE_SEARCH:!1,USE_SITES:!1,ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK:xs,FETCH_EXTERNAL_MEDIA:!1,USE_MEDIA_CACHE:!1,GRAPH_NONLOCATED:!1,NARRATIVE_STEP_STYLES:!1,CUSTOM_EVENT_FIELDS:[]}}};var Sp={},T2={get exports(){return Sp},set exports(e){Sp=e}};(function(e,t){(function(n,r){e.exports=r()})(Kr,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},d=function(p){return(p=+p)+(p>68?1900:2e3)},y=function(p){return function(b){this[p]=+b}},_=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var g=b.match(/([+-]|\d\d)/g),m=60*g[1]+(+g[2]||0);return m===0?0:g[0]==="+"?-m:m}(p)}],c=function(p){var b=l[p];return b&&(b.indexOf?b:b.s.concat(b.f))},f=function(p,b){var g,m=l.meridiem;if(m){for(var h=1;h<=24;h+=1)if(p.indexOf(m(h,0,b))>-1){g=h>12;break}}else g=p===(b?"pm":"PM");return g},w={A:[a,function(p){this.afternoon=f(p,!1)}],a:[a,function(p){this.afternoon=f(p,!0)}],S:[/\d/,function(p){this.milliseconds=100*+p}],SS:[i,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[s,y("seconds")],ss:[s,y("seconds")],m:[s,y("minutes")],mm:[s,y("minutes")],H:[s,y("hours")],h:[s,y("hours")],HH:[s,y("hours")],hh:[s,y("hours")],D:[s,y("day")],DD:[i,y("day")],Do:[a,function(p){var b=l.ordinal,g=p.match(/\d+/);if(this.day=g[0],b)for(var m=1;m<=31;m+=1)b(m).replace(/\[|\]/g,"")===p&&(this.day=m)}],M:[s,y("month")],MM:[i,y("month")],MMM:[a,function(p){var b=c("months"),g=(c("monthsShort")||b.map(function(m){return m.slice(0,3)})).indexOf(p)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[a,function(p){var b=c("months").indexOf(p)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,y("year")],YY:[i,function(p){this.year=d(p)}],YYYY:[/\d{4}/,y("year")],Z:_,ZZ:_};function v(p){var b,g;b=p,g=l&&l.formats;for(var m=(p=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,C,N){var $=N&&N.toUpperCase();return C||g[N]||n[N]||g[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,U){return z||U.slice(1)})})).match(r),h=m.length,T=0;T-1)return new Date((B==="X"?1e3:1)*H);var Y=v(B)(H),G=Y.year,J=Y.month,oe=Y.day,ce=Y.hours,fe=Y.minutes,de=Y.seconds,ue=Y.milliseconds,be=Y.zone,ne=new Date,O=oe||(G||J?1:ne.getDate()),j=G||ne.getFullYear(),V=0;G&&!J||(V=J>0?J-1:ne.getMonth());var Z=ce||0,Q=fe||0,te=de||0,ve=ue||0;return be?new Date(Date.UTC(j,V,O,Z,Q,te,ve+60*be.offset*1e3)):W?new Date(Date.UTC(j,V,O,Z,Q,te,ve)):new Date(j,V,O,Z,Q,te,ve)}catch{return new Date("")}}(x,E,k),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&x!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var F=E.length,z=1;z<=F;z+=1){P[1]=E[z-1];var U=g.apply(this,P);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}z===F&&(this.$d=new Date(""))}else h.call(this,T)}}})})(T2);const S2=Sp;var Ho={},E2={get exports(){return Ho},set exports(e){Ho=e}};(function(e,t){(function(n,r){e.exports=r()})(Kr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",y="day",_="week",c="month",f="quarter",w="year",v="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var z=["th","st","nd","rd"],U=F%100;return"["+F+(z[(U-20)%10]||z[U]||z[0])+"]"}},h=function(F,z,U){var H=String(F);return!H||H.length>=z?F:""+Array(z+1-H.length).join(U)+F},T={s:h,z:function(F){var z=-F.utcOffset(),U=Math.abs(z),H=Math.floor(U/60),B=U%60;return(z<=0?"+":"-")+h(H,2,"0")+":"+h(B,2,"0")},m:function F(z,U){if(z.date()1)return F(Y[0])}else{var G=z.name;k[G]=z,B=G}return!H&&B&&(x=B),B||!H&&x},A=function(F,z){if(P(F))return F.clone();var U=typeof z=="object"?z:{};return U.date=F,U.args=arguments,new N(U)},C=T;C.l=E,C.i=P,C.w=function(F,z){return A(F,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var N=function(){function F(U){this.$L=E(U.locale,null,!0),this.parse(U)}var z=F.prototype;return z.parse=function(U){this.$d=function(H){var B=H.date,W=H.utc;if(B===null)return new Date(NaN);if(C.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(b);if(Y){var G=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(B)}(U),this.$x=U.x||{},this.init()},z.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},z.$utils=function(){return C},z.isValid=function(){return this.$d.toString()!==p},z.isSame=function(U,H){var B=A(U);return this.startOf(H)<=B&&B<=this.endOf(H)},z.isAfter=function(U,H){return A(U){ue.current=void 0,ce.current=void 0,J.current=O});const j=ee.useMemo(()=>wt.createElement(b,Lo({},O,{ref:P})),[P,b,O]);return ee.useMemo(()=>v?wt.createElement(N.Provider,{value:G},j):j,[N,j,G])}const k=wt.memo(T);if(k.WrappedComponent=b,k.displayName=T.displayName=m,d){const E=wt.forwardRef(function(C,N){return wt.createElement(k,Lo({},C,{reactReduxForwardedRef:N}))});return E.displayName=m,E.WrappedComponent=b,D_(E,b)}return D_(k,b)}}function h2({store:e,context:t,children:n,serverState:r}){const i=ee.useMemo(()=>{const l=YT(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0}},[e,r]),s=ee.useMemo(()=>e.getState(),[e]);bu(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]);const a=t||HT;return wt.createElement(a.Provider,{value:i},n)}a2(wu.useSyncExternalStore);LL(Oo.unstable_batchedUpdates);function ga(e){return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function p2(e,t){if(ga(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ga(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function m2(e){var t=p2(e,"string");return ga(t)==="symbol"?t:String(t)}function g2(e,t,n){return t=m2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B_(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ft(1));return n(Zc)(e,t)}if(typeof e!="function")throw new Error(Ft(2));var i=e,s=t,a=[],l=a,d=!1;function y(){l===a&&(l=a.slice())}function _(){if(d)throw new Error(Ft(3));return s}function c(p){if(typeof p!="function")throw new Error(Ft(4));if(d)throw new Error(Ft(5));var b=!0;return y(),l.push(p),function(){if(b){if(d)throw new Error(Ft(6));b=!1,y();var m=l.indexOf(p);l.splice(m,1),a=null}}}function f(p){if(!v2(p))throw new Error(Ft(7));if(typeof p.type>"u")throw new Error(Ft(8));if(d)throw new Error(Ft(9));try{d=!0,s=i(s,p)}finally{d=!1}for(var b=a=l,g=0;g"u")throw new Error(Ft(12));if(typeof n(void 0,{type:va.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ft(13))})}function XT(e){for(var t=Object.keys(e),n={},r=0;r"u")throw y&&y.type,new Error(Ft(14));c[w]=b,_=_||b!==p}return _=_||s.length!==Object.keys(d).length,_?c:d}}function H_(e,t){return function(){return t(e.apply(this,arguments))}}function Qo(e,t){if(typeof e=="function")return H_(e,t);if(typeof e!="object"||e===null)throw new Error(Ft(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=H_(i,t))}return n}function Km(){for(var e=arguments.length,t=new Array(e),n=0;n
Image: Vyacheslav Madiyevskyy/Reuters
Image: Järva Teataja/Scanpix Baltics via Reuters
','This map plots out and highlights incidents that have resulted in potential civilian impact or harm since Russia began its invasion of Ukraine. The incidents detailed have been collected by Bellingcat researchers. Included in the map are instances where civilian areas and infrastructure have been damaged or destroyed, where the presence of civilian injuries are visible and/or there is the presence of immobile civilian bodies. Collection for the incidences contained in this map began on February 24, 2022. Users can explore incidents by date and location. We intend this to be a living project that will continue to be updated as long as the conflict persists. For more detailed information about the entries included in this map, please refer to our methodology and explainer article which can be read here.',"

Editor's note: An error in our archiving system between October 21 and November 7 led to some incidents being published on our TimeMap before they were fully verified. We have fixed this issue and are working to verify all extra incidents.

"],flags:{isInfopoup:!1,isCover:!1},cover:{title:"About and Methodology",exploreButton:"BACK TO THE PLATFORM",description:["## Scope of Research","This database, organised on Forensic Architecture's [TimeMap](https://github.com/forensic-architecture/timemap) platform and customised for this project, is focused on incidents in Ukraine that have resulted in potential civilian harm. These include: incidents where rockets or missiles struck civilian areas, where attacks have resulted in the destruction of civilian infrastructure, where the presence of civilian injuries are visible and/or the presence of immobile civilian bodies. This database began collection on February 24, 2022 and intends to be a living document that will continue to be updated as long as the conflict persists. While we are attempting to collect as many incidents as possible, we cannot possibly guarantee to collect them all nor will we be able to corroborate the locations of all the incidents we collect. Those we do not corroborate the originality or exact location of will not be shown on the map. Therefore, this map is not an exhaustive list of civilian harm in Ukraine but rather a representation of all incidents which we have been able to collect and of which we have been able to determine the exact locations. ","## Open Source Footage","The links in this map are all open source, meaning they are connected to an open link posted online. These sources were collected by Bellingcat researchers and placed in a database from where they are also being archived locally. After collection, our Global Authentication Project members have determined the location of each of these events (you can read more about the Global Authentication Project and its makeup below). Bellingcat staff then cross-referenced these coordinates to ensure their accuracy. The resolution of these geolocations is within 150 metres of where the incident occurred but the public coordinates viewable on the map have been slightly obscured in order to protect the identity of the creators. Because this footage is open source, the users who uploaded the content are not directly affiliated to Bellingcat or our partners. Any opinions that may be contained within the posts are therefore not those of Bellingcat or our partners. Any claims contained within the posts have also not necessarily been confirmed or verified by Bellingcat, particularly in relation to which party may have been responsible for the incidents detailed.","## Verification Level","The data being collected is checked for originality, basic manipulation, and location by Bellingcat investigators. This level of verification is intended to indicate where incidents took place, when and where there are reasonable visual indications of civilian harm. Our investigation plan for the collection of this material and its uses are informed by the [Berkeley Protocol on Digital Open Source Investigations](https://www.ohchr.org/en/publications/policy-and-methodological-publications/berkeley-protocol-digital-open-source). These incidents are also being collected and archived at a [forensic level](https://mnemonic.org/en/our-work) for potential evidentiary use in the future. That level of in-depth analysis and verification will take many months and our goal with this map is to transparently report on the current situation in Ukraine, as it is happening, for public interest. To be clear, these two processes will be separate.","## Descriptions","Each incident is accompanied with source links, the exact location determined by our Global Authentication Project and Bellingcat researchers, as well as a brief description of the incident based on what is visually present. The descriptions indicate what is clearly visible but do not attempt to make assumptions about the exact number of casualties or which party to the conflict is responsible due to those factors being difficult to fully determine from short, visual imagery alone.","## Filters","On the left hand side of the map, a user can toggle between different kinds of areas impacted. We are characterising the areas as residential, industrial, administrative, healthcare, school/childcare, military, commercial, religious, or undefined. Decisions on these classifications are based on visual evidence in the footage and what the area is reportedly used as. We cannot fully exclude or exhaustively search for the potential of military use in some of these areas.","## Source Links/Embedding","We have chosen to embed the social media links directly onto the platform. Should any be deleted by the uploader, they will still be visible on the map, but data on the post, user and footage will no longer be presented publicly. Where sensitive footage posted by individuals might allow them or their location to be identified, we have sought to preemptively take steps to anonymise these users.","## Privacy concerns and respect for the dead ","This footage is graphic and contains distressing scenes of war and conflict. Many of the areas represented are, at time of writing, also under attack both physically and through online attempts to discredit or harm users posting this content. For these reasons, we have chosen not to share certain posts that might indicate the direct identity of any of the persons filming. We have also filtered out posts that contain images where an immobile body is closely filmed and their identity might be ascertained out of respect for them and their close ones.","## A Note on Bellingcat's Global Authentication Project","The Global Authentication Project consists of a wide community of open source researchers assisting in Bellingcat research through structured tasks and feedback. Our aim is to authenticate events taking place around the world and fill in the gaps of knowledge that exist, particularly in situations where there are vast quantities of data. In creating a community for those interested in open source research, we are fostering Bellingcat's original aim of solving problems **together**, to diversify our investigations and promote the use of these skills. For this dataset, we are working with many individuals who have Ukrainian language skills and others with local contextual knowledge of the events and places seen on the map. Other participants include individuals skilled in geolocation and chronolocation, with all contributions being vetted by Bellingcat researchers. As we expand the Global Authentication Project in the coming months, more information will be available on our website and Twitter.","## Feedback","This map will continue to change and be updated for the duration of this conflict. We welcome feedback on our methodology, data collection and take transparency seriously. Should you have any direct feedback about the platform, please indicate it on this [form](https://forms.gle/cV2YAojBoh6h4T3XA)."]},toolbar:{panels:{categories:{}}},spotlights:{}},ui:{coloring:{mode:"STATIC",maxNumOfColors:9,defaultColor:"#dfdfdf",colors:["#7E57C2","#F57C00","#FFEB3B","#D34F73","#08B2E3","#A1887F","#90A4AE","#E57373","#80CBC4"]},card:{layout:{template:"sourced"}},carto:{eventRadius:8},timeline:{eventRadius:9},tiles:{current:"bellingcat-mapbox/cl0qnou2y003m15s8ieuyhgsy",default:"bellingcat-mapbox/cl0qnou2y003m15s8ieuyhgsy",satellite:"bellingcat-mapbox/cl1win2vp003914pdhateva6p"}},features:{USE_CATEGORIES:!1,CATEGORIES_AS_FILTERS:!1,COLOR_BY_CATEGORY:!1,COLOR_BY_ASSOCIATION:!0,USE_ASSOCIATIONS:!0,USE_FULLSCREEN:!0,USE_DOWNLOAD:!0,USE_SOURCES:!0,USE_SPOTLIGHTS:!1,USE_SHAPES:!1,USE_COVER:!0,USE_INTRO:!1,USE_SATELLITE_OVERLAY_TOGGLE:!0,USE_SEARCH:!1,USE_SITES:!1,ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK:xs,FETCH_EXTERNAL_MEDIA:!1,USE_MEDIA_CACHE:!1,GRAPH_NONLOCATED:!1,NARRATIVE_STEP_STYLES:!1,CUSTOM_EVENT_FIELDS:[]}}};var Sp={},T2={get exports(){return Sp},set exports(e){Sp=e}};(function(e,t){(function(n,r){e.exports=r()})(Kr,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},d=function(p){return(p=+p)+(p>68?1900:2e3)},y=function(p){return function(b){this[p]=+b}},_=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var g=b.match(/([+-]|\d\d)/g),m=60*g[1]+(+g[2]||0);return m===0?0:g[0]==="+"?-m:m}(p)}],c=function(p){var b=l[p];return b&&(b.indexOf?b:b.s.concat(b.f))},f=function(p,b){var g,m=l.meridiem;if(m){for(var h=1;h<=24;h+=1)if(p.indexOf(m(h,0,b))>-1){g=h>12;break}}else g=p===(b?"pm":"PM");return g},w={A:[a,function(p){this.afternoon=f(p,!1)}],a:[a,function(p){this.afternoon=f(p,!0)}],S:[/\d/,function(p){this.milliseconds=100*+p}],SS:[i,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[s,y("seconds")],ss:[s,y("seconds")],m:[s,y("minutes")],mm:[s,y("minutes")],H:[s,y("hours")],h:[s,y("hours")],HH:[s,y("hours")],hh:[s,y("hours")],D:[s,y("day")],DD:[i,y("day")],Do:[a,function(p){var b=l.ordinal,g=p.match(/\d+/);if(this.day=g[0],b)for(var m=1;m<=31;m+=1)b(m).replace(/\[|\]/g,"")===p&&(this.day=m)}],M:[s,y("month")],MM:[i,y("month")],MMM:[a,function(p){var b=c("months"),g=(c("monthsShort")||b.map(function(m){return m.slice(0,3)})).indexOf(p)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[a,function(p){var b=c("months").indexOf(p)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,y("year")],YY:[i,function(p){this.year=d(p)}],YYYY:[/\d{4}/,y("year")],Z:_,ZZ:_};function v(p){var b,g;b=p,g=l&&l.formats;for(var m=(p=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,C,N){var $=N&&N.toUpperCase();return C||g[N]||n[N]||g[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,U){return z||U.slice(1)})})).match(r),h=m.length,T=0;T-1)return new Date((B==="X"?1e3:1)*H);var Y=v(B)(H),G=Y.year,J=Y.month,oe=Y.day,ce=Y.hours,fe=Y.minutes,de=Y.seconds,ue=Y.milliseconds,be=Y.zone,ne=new Date,O=oe||(G||J?1:ne.getDate()),j=G||ne.getFullYear(),V=0;G&&!J||(V=J>0?J-1:ne.getMonth());var Z=ce||0,Q=fe||0,te=de||0,ve=ue||0;return be?new Date(Date.UTC(j,V,O,Z,Q,te,ve+60*be.offset*1e3)):W?new Date(Date.UTC(j,V,O,Z,Q,te,ve)):new Date(j,V,O,Z,Q,te,ve)}catch{return new Date("")}}(x,E,k),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&x!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var F=E.length,z=1;z<=F;z+=1){A[1]=E[z-1];var U=g.apply(this,A);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}z===F&&(this.$d=new Date(""))}else h.call(this,T)}}})})(T2);const S2=Sp;var Ho={},E2={get exports(){return Ho},set exports(e){Ho=e}};(function(e,t){(function(n,r){e.exports=r()})(Kr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",l="minute",d="hour",y="day",_="week",c="month",f="quarter",w="year",v="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var z=["th","st","nd","rd"],U=F%100;return"["+F+(z[(U-20)%10]||z[U]||z[0])+"]"}},h=function(F,z,U){var H=String(F);return!H||H.length>=z?F:""+Array(z+1-H.length).join(U)+F},T={s:h,z:function(F){var z=-F.utcOffset(),U=Math.abs(z),H=Math.floor(U/60),B=U%60;return(z<=0?"+":"-")+h(H,2,"0")+":"+h(B,2,"0")},m:function F(z,U){if(z.date()1)return F(Y[0])}else{var G=z.name;k[G]=z,B=G}return!H&&B&&(x=B),B||!H&&x},P=function(F,z){if(A(F))return F.clone();var U=typeof z=="object"?z:{};return U.date=F,U.args=arguments,new N(U)},C=T;C.l=E,C.i=A,C.w=function(F,z){return P(F,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var N=function(){function F(U){this.$L=E(U.locale,null,!0),this.parse(U)}var z=F.prototype;return z.parse=function(U){this.$d=function(H){var B=H.date,W=H.utc;if(B===null)return new Date(NaN);if(C.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(b);if(Y){var G=Y[2]-1||0,J=(Y[7]||"0").substring(0,3);return W?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,J)}}return new Date(B)}(U),this.$x=U.x||{},this.init()},z.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},z.$utils=function(){return C},z.isValid=function(){return this.$d.toString()!==p},z.isSame=function(U,H){var B=P(U);return this.startOf(H)<=B&&B<=this.endOf(H)},z.isAfter=function(U,H){return P(U)>16),U((65280&C)>>8),U(255&C);return N==2?U(255&(C=P(E.charAt(A))<<2|P(E.charAt(A+1))>>4)):N==1&&(U((C=P(E.charAt(A))<<10|P(E.charAt(A+1))<<4|P(E.charAt(A+2))>>2)>>8&255),U(255&C)),$},v.fromByteArray=function(E){var A,C,N,$,F=E.length%3,z="";function U(H){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(H)}for(A=0,N=E.length-F;A>18&63)+U($>>12&63)+U($>>6&63)+U(63&$);switch(F){case 1:z=(z+=U((C=E[E.length-1])>>2))+U(C<<4&63)+"==";break;case 2:z=(z=(z+=U((C=(E[E.length-2]<<8)+E[E.length-1])>>10))+U(C>>4&63))+U(C<<2&63)+"="}return z}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(s,a,b,d,y,_,c,f,w){var v=n("base64-js"),p=n("ieee754");function b(O,j,V){if(!(this instanceof b))return new b(O,j,V);var Z,Q,te,ve,se=typeof O;if(j==="base64"&&se=="string")for(O=(ve=O).trim?ve.trim():ve.replace(/^\s+|\s+$/g,"");O.length%4!=0;)O+="=";if(se=="number")Z=W(O);else if(se=="string")Z=b.byteLength(O,j);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");Z=W(O.length)}if(b._useTypedArrays?Q=b._augment(new Uint8Array(Z)):((Q=this).length=Z,Q._isBuffer=!0),b._useTypedArrays&&typeof O.byteLength=="number")Q._set(O);else if(Y(ve=O)||b.isBuffer(ve)||ve&&typeof ve=="object"&&typeof ve.length=="number")for(te=0;te>8,ve=ve%256,se.push(ve),se.push(te);return se}(j),O,V,Z)}function h(O,j,V){var Z="";V=Math.min(O.length,V);for(var Q=j;Q>>0)):(j+1>>0),Q}function k(O,j,V,Z){if(Z||(ne(typeof V=="boolean","missing or invalid endian"),ne(j!=null,"missing offset"),ne(j+1>>8*(Z?te:1-te)}function N(O,j,V,Z,Q){if(Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(V!=null,"missing offset"),ne(V+3>>8*(Z?te:3-te)&255}function $(O,j,V,Z,Q){Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(V!=null,"missing offset"),ne(V+1this.length&&(Z=this.length);var Q=(Z=O.length-j=this.length))return this[O]},b.prototype.readUInt16LE=function(O,j){return T(this,O,!0,j)},b.prototype.readUInt16BE=function(O,j){return T(this,O,!1,j)},b.prototype.readUInt32LE=function(O,j){return x(this,O,!0,j)},b.prototype.readUInt32BE=function(O,j){return x(this,O,!1,j)},b.prototype.readInt8=function(O,j){if(j||(ne(O!=null,"missing offset"),ne(O=this.length))return 128&this[O]?-1*(255-this[O]+1):this[O]},b.prototype.readInt16LE=function(O,j){return k(this,O,!0,j)},b.prototype.readInt16BE=function(O,j){return k(this,O,!1,j)},b.prototype.readInt32LE=function(O,j){return P(this,O,!0,j)},b.prototype.readInt32BE=function(O,j){return P(this,O,!1,j)},b.prototype.readFloatLE=function(O,j){return E(this,O,!0,j)},b.prototype.readFloatBE=function(O,j){return E(this,O,!1,j)},b.prototype.readDoubleLE=function(O,j){return A(this,O,!0,j)},b.prototype.readDoubleBE=function(O,j){return A(this,O,!1,j)},b.prototype.writeUInt8=function(O,j,V){V||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(this[j]=O)},b.prototype.writeUInt16LE=function(O,j,V){C(this,O,j,!0,V)},b.prototype.writeUInt16BE=function(O,j,V){C(this,O,j,!1,V)},b.prototype.writeUInt32LE=function(O,j,V){N(this,O,j,!0,V)},b.prototype.writeUInt32BE=function(O,j,V){N(this,O,j,!1,V)},b.prototype.writeInt8=function(O,j,V){V||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(0<=O?this.writeUInt8(O,j,V):this.writeUInt8(255+O+1,j,V))},b.prototype.writeInt16LE=function(O,j,V){$(this,O,j,!0,V)},b.prototype.writeInt16BE=function(O,j,V){$(this,O,j,!1,V)},b.prototype.writeInt32LE=function(O,j,V){F(this,O,j,!0,V)},b.prototype.writeInt32BE=function(O,j,V){F(this,O,j,!1,V)},b.prototype.writeFloatLE=function(O,j,V){z(this,O,j,!0,V)},b.prototype.writeFloatBE=function(O,j,V){z(this,O,j,!1,V)},b.prototype.writeDoubleLE=function(O,j,V){U(this,O,j,!0,V)},b.prototype.writeDoubleBE=function(O,j,V){U(this,O,j,!1,V)},b.prototype.fill=function(O,j,V){if(j=j||0,V=V||this.length,ne(typeof(O=typeof(O=O||0)=="string"?O.charCodeAt(0):O)=="number"&&!isNaN(O),"value is not a number"),ne(j<=V,"end < start"),V!==j&&this.length!==0){ne(0<=j&&j"},b.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(b._useTypedArrays)return new b(this).buffer;for(var O=new Uint8Array(this.length),j=0,V=O.length;j=j.length||Q>=O.length);Q++)j[Q+V]=O[Q];return Q}function fe(O){try{return decodeURIComponent(O)}catch{return String.fromCharCode(65533)}}function de(O,j){ne(typeof O=="number","cannot write a non-number as a number"),ne(0<=O,"specified a negative value for writing an unsigned value"),ne(O<=j,"value is larger than maximum value for type"),ne(Math.floor(O)===O,"value has a fractional component")}function ue(O,j,V){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(V<=O,"value smaller than minimum allowed value"),ne(Math.floor(O)===O,"value has a fractional component")}function be(O,j,V){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(V<=O,"value smaller than minimum allowed value")}function ne(O,j){if(!O)throw new Error(j||"Failed assertion")}b._augment=function(O){return O._isBuffer=!0,O._get=O.get,O._set=O.set,O.get=H.get,O.set=H.set,O.write=H.write,O.toString=H.toString,O.toLocaleString=H.toString,O.toJSON=H.toJSON,O.copy=H.copy,O.slice=H.slice,O.readUInt8=H.readUInt8,O.readUInt16LE=H.readUInt16LE,O.readUInt16BE=H.readUInt16BE,O.readUInt32LE=H.readUInt32LE,O.readUInt32BE=H.readUInt32BE,O.readInt8=H.readInt8,O.readInt16LE=H.readInt16LE,O.readInt16BE=H.readInt16BE,O.readInt32LE=H.readInt32LE,O.readInt32BE=H.readInt32BE,O.readFloatLE=H.readFloatLE,O.readFloatBE=H.readFloatBE,O.readDoubleLE=H.readDoubleLE,O.readDoubleBE=H.readDoubleBE,O.writeUInt8=H.writeUInt8,O.writeUInt16LE=H.writeUInt16LE,O.writeUInt16BE=H.writeUInt16BE,O.writeUInt32LE=H.writeUInt32LE,O.writeUInt32BE=H.writeUInt32BE,O.writeInt8=H.writeInt8,O.writeInt16LE=H.writeInt16LE,O.writeInt16BE=H.writeInt16BE,O.writeInt32LE=H.writeInt32LE,O.writeInt32BE=H.writeInt32BE,O.writeFloatLE=H.writeFloatLE,O.writeFloatBE=H.writeFloatBE,O.writeDoubleLE=H.writeDoubleLE,O.writeDoubleBE=H.writeDoubleBE,O.fill=H.fill,O.inspect=H.inspect,O.toArrayBuffer=H.toArrayBuffer,O}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(s,a,v,d,y,_,c,f,w){var v=n("buffer").Buffer,p=4,b=new v(p);b.fill(0),r.exports={hash:function(g,m,h,T){for(var x=m(function(C,N){C.length%p!=0&&($=C.length+(p-C.length%p),C=v.concat([C,b],$));for(var $,F=[],z=N?C.readInt32BE:C.readInt32LE,U=0;Uh?B=H(B):B.length>5]|=128<>>9<<4)]=P;for(var E=1732584193,A=-271733879,C=-1732584194,N=271733878,$=0;$>>32-C,E)}function g(k,P,E,A,C,N,$){return b(P&E|~P&A,k,P,C,N,$)}function m(k,P,E,A,C,N,$){return b(P&A|E&~A,k,P,C,N,$)}function h(k,P,E,A,C,N,$){return b(P^E^A,k,P,C,N,$)}function T(k,P,E,A,C,N,$){return b(E^(P|~A),k,P,C,N,$)}function x(k,P){var E=(65535&k)+(65535&P);return(k>>16)+(P>>16)+(E>>16)<<16|65535&E}r.exports=function(k){return v.hash(k,p,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){r.exports=function(v){for(var p,b=new Array(v),g=0;g>>((3&g)<<3)&255;return b}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){var v=n("./helpers");function p(m,h){m[h>>5]|=128<<24-h%32,m[15+(h+64>>9<<4)]=h;for(var T,x,k,P=Array(80),E=1732584193,A=-271733879,C=-1732584194,N=271733878,$=-1009589776,F=0;F>16)+(h>>16)+(T>>16)<<16|65535&T}function g(m,h){return m<>>32-h}r.exports=function(m){return v.hash(m,p,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){function v(h,T){var x=(65535&h)+(65535&T);return(h>>16)+(T>>16)+(x>>16)<<16|65535&x}function p(h,T){var x,k=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),P=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);h[T>>5]|=128<<24-T%32,h[15+(T+64>>9<<4)]=T;for(var A,C,N=0;N>>T|h<<32-T},m=function(h,T){return h>>>T};r.exports=function(h){return b.hash(h,p,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){i.read=function(v,p,b,g,N){var h,T,x=8*N-g-1,k=(1<>1,E=-7,A=b?N-1:0,C=b?-1:1,N=v[p+A];for(A+=C,h=N&(1<<-E)-1,N>>=-E,E+=x;0>=-E,E+=g;0>1,A=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=g?0:$-1,N=g?1:-1,$=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(x=isNaN(p)?1:0,T=P):(T=Math.floor(Math.log(p)/Math.LN2),p*(g=Math.pow(2,-T))<1&&(T--,g*=2),2<=(p+=1<=T+E?A/g:A*Math.pow(2,1-E))*g&&(T++,g/=2),P<=T+E?(x=0,T=P):1<=T+E?(x=(p*g-1)*Math.pow(2,m),T+=E):(x=p*Math.pow(2,E-1)*Math.pow(2,m),T=0));8<=m;v[b+C]=255&x,C+=N,x/=256,m-=8);for(T=T<t?1:e>=t?0:NaN}function k2(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Xm(e){let t,n,r;e.length!==2?(t=zl,n=(l,d)=>zl(e(l),d),r=(l,d)=>e(l)-d):(t=e===zl||e===k2?e:C2,n=e,r=e);function i(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<0?y=c+1:_=c}while(y<_)}return y}function s(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<=0?y=c+1:_=c}while(y<_)}return y}function a(l,d,y=0,_=l.length){const c=i(l,d,y,_-1);return c>y&&r(l[c-1],d)>-r(l[c],d)?c-1:c}return{left:i,center:a,right:s}}function C2(){return 0}function P2(e){return e===null?NaN:+e}const A2=Xm(zl),L2=A2.right;Xm(P2).center;const R2=L2;var I2=Math.sqrt(50),N2=Math.sqrt(10),O2=Math.sqrt(2);function W_(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),s=r/i;return s>=I2?i*=10:s>=N2?i*=5:s>=O2&&(i*=2),t+e(t)}function j2(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function z2(){return!this.__axis}function B2(e,t){var n=[],r=null,i=null,s=6,a=6,l=3,d=typeof window<"u"&&window.devicePixelRatio>1?0:.5,y=e===yf||e===wl?-1:1,_=e===wl||e===_f?"x":"y",c=e===yf||e===Ep?D2:$2;function f(w){var v=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):M2),b=Math.max(s,0)+l,g=t.range(),m=+g[0]+d,h=+g[g.length-1]+d,T=(t.bandwidth?j2:F2)(t.copy(),d),x=w.selection?w.selection():w,k=x.selectAll(".domain").data([null]),P=x.selectAll(".tick").data(v,t).order(),E=P.exit(),A=P.enter().append("g").attr("class","tick"),C=P.select("line"),N=P.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(A),C=C.merge(A.append("line").attr("stroke","currentColor").attr(_+"2",y*s)),N=N.merge(A.append("text").attr("fill","currentColor").attr(_,y*b).attr("dy",e===yf?"0em":e===Ep?"0.71em":"0.32em")),w!==x&&(k=k.transition(w),P=P.transition(w),C=C.transition(w),N=N.transition(w),E=E.transition(w).attr("opacity",V_).attr("transform",function($){return isFinite($=T($))?c($+d):this.getAttribute("transform")}),A.attr("opacity",V_).attr("transform",function($){var F=this.parentNode.__axis;return c((F&&isFinite(F=F($))?F:T($))+d)})),E.remove(),k.attr("d",e===wl||e===_f?a?"M"+y*a+","+m+"H"+d+"V"+h+"H"+y*a:"M"+d+","+m+"V"+h:a?"M"+m+","+y*a+"V"+d+"H"+h+"V"+y*a:"M"+m+","+d+"H"+h),P.attr("opacity",1).attr("transform",function($){return c(T($)+d)}),C.attr(_+"2",y*s),N.attr(_,y*b).text(p),x.filter(z2).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===_f?"start":e===wl?"end":"middle"),x.each(function(){this.__axis=T})}return f.scale=function(w){return arguments.length?(t=w,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(w){return arguments.length?(n=w==null?[]:Array.from(w),f):n.slice()},f.tickValues=function(w){return arguments.length?(r=w==null?null:Array.from(w),f):r&&r.slice()},f.tickFormat=function(w){return arguments.length?(i=w,f):i},f.tickSize=function(w){return arguments.length?(s=a=+w,f):s},f.tickSizeInner=function(w){return arguments.length?(s=+w,f):s},f.tickSizeOuter=function(w){return arguments.length?(a=+w,f):a},f.tickPadding=function(w){return arguments.length?(l=+w,f):l},f.offset=function(w){return arguments.length?(d=+w,f):d},f}function q_(e){return B2(Ep,e)}var U2={value:()=>{}};function Qm(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Bl.prototype=Qm.prototype={constructor:Bl,on:function(e,t){var n=this._,r=H2(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),r=0,i,s;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),G_.hasOwnProperty(t)?{space:G_[t],local:e}:e}function V2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===xp&&t.documentElement.namespaceURI===xp?t.createElement(e):t.createElementNS(n,e)}}function q2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function eS(e){var t=Gc(e);return(t.local?q2:V2)(t)}function Z2(){}function Jm(e){return e==null?Z2:function(){return this.querySelector(e)}}function G2(e){typeof e!="function"&&(e=Jm(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=h&&(h=m+1);!(x=b[h])&&++h=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function _R(e){e||(e=wR);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;st?1:e>=t?0:NaN}function bR(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function TR(){return Array.from(this)}function SR(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?OR:typeof t=="function"?DR:MR)(e,t,n??"")):Wo(this.node(),e)}function Wo(e,t){return e.style.getPropertyValue(t)||oS(e).getComputedStyle(e,null).getPropertyValue(t)}function FR(e){return function(){delete this[e]}}function jR(e,t){return function(){this[e]=t}}function zR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function BR(e,t){return arguments.length>1?this.each((t==null?FR:typeof t=="function"?zR:jR)(e,t)):this.node()[e]}function sS(e){return e.trim().split(/^|\s+/)}function eg(e){return e.classList||new aS(e)}function aS(e){this._node=e,this._names=sS(e.getAttribute("class")||"")}aS.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lS(e,t){for(var n=eg(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function mI(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n()=>e;function kp(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:a,y:l,dx:d,dy:y,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:_}})}kp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function CI(e){return!e.ctrlKey&&!e.button}function PI(){return this.parentNode}function AI(e,t){return t??{x:e.x,y:e.y}}function LI(){return navigator.maxTouchPoints||"ontouchstart"in this}function RI(){var e=CI,t=PI,n=AI,r=LI,i={},s=Qm("start","drag","end"),a=0,l,d,y,_,c=0;function f(T){T.on("mousedown.drag",w).filter(r).on("touchstart.drag",b).on("touchmove.drag",g,EI).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(T,x){if(!(_||!e.call(this,T,x))){var k=h(this,t.call(this,T,x),T,x,"mouse");k&&(Ui(T.view).on("mousemove.drag",v,ya).on("mouseup.drag",p,ya),xI(T.view),wf(T),y=!1,l=T.clientX,d=T.clientY,k("start",T))}}function v(T){if(Ro(T),!y){var x=T.clientX-l,k=T.clientY-d;y=x*x+k*k>c}i.mouse("drag",T)}function p(T){Ui(T.view).on("mousemove.drag mouseup.drag",null),kI(T.view,y),Ro(T),i.mouse("end",T)}function b(T,x){if(e.call(this,T,x)){var k=T.changedTouches,P=t.call(this,T,x),E=k.length,A,C;for(A=0;A>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=NI.exec(e))?new on(t[1],t[2],t[3],1):(t=OI.exec(e))?new on(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=MI.exec(e))?Tl(t[1],t[2],t[3],t[4]):(t=DI.exec(e))?Tl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$I.exec(e))?n0(t[1],t[2]/100,t[3]/100,1):(t=FI.exec(e))?n0(t[1],t[2]/100,t[3]/100,t[4]):K_.hasOwnProperty(e)?J_(K_[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function J_(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Tl(e,t,n,r){return r<=0&&(e=t=n=NaN),new on(e,t,n,r)}function BI(e){return e instanceof Aa||(e=Hi(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function Cp(e,t,n,r){return arguments.length===1?BI(e):new on(e,t,n,r??1)}function on(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}tg(on,Cp,fS(Aa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_a:Math.pow(_a,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new on(Di(this.r),Di(this.g),Di(this.b),Eu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:e0,formatHex:e0,formatHex8:UI,formatRgb:t0,toString:t0}));function e0(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function UI(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function t0(){const e=Eu(this.opacity);return`${e===1?"rgb(":"rgba("}${Di(this.r)}, ${Di(this.g)}, ${Di(this.b)}${e===1?")":`, ${e})`}`}function Eu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Di(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Di(e),(e<16?"0":"")+e.toString(16)}function n0(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hn(e,t,n,r)}function hS(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);if(e instanceof Aa||(e=Hi(e)),!e)return new Hn;if(e instanceof Hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,l=s-i,d=(s+i)/2;return l?(t===s?a=(n-r)/l+(n0&&d<1?0:a,new Hn(a,l,d,e.opacity)}function HI(e,t,n,r){return arguments.length===1?hS(e):new Hn(e,t,n,r??1)}function Hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}tg(Hn,HI,fS(Aa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_a:Math.pow(_a,e),new Hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new on(bf(e>=240?e-240:e+120,i,r),bf(e,i,r),bf(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Hn(r0(this.h),Sl(this.s),Sl(this.l),Eu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Eu(this.opacity);return`${e===1?"hsl(":"hsla("}${r0(this.h)}, ${Sl(this.s)*100}%, ${Sl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function r0(e){return e=(e||0)%360,e<0?e+360:e}function Sl(e){return Math.max(0,Math.min(1,e||0))}function bf(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ng=e=>()=>e;function WI(e,t){return function(n){return e+n*t}}function VI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qI(e){return(e=+e)==1?pS:function(t,n){return n-t?VI(t,n,e):ng(isNaN(t)?n:t)}}function pS(e,t){var n=t-e;return n?WI(e,n):ng(isNaN(e)?t:e)}const xu=function e(t){var n=qI(t);function r(i,s){var a=n((i=Cp(i)).r,(s=Cp(s)).r),l=n(i.g,s.g),d=n(i.b,s.b),y=pS(i.opacity,s.opacity);return function(_){return i.r=a(_),i.g=l(_),i.b=d(_),i.opacity=y(_),i+""}}return r.gamma=e,r}(1);function ZI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(r=r[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,d.push({i:a,x:Un(r,i)})),n=Tf.lastIndex;return n180?_+=360:_-y>180&&(y+=360),f.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Un(y,_)})):_&&c.push(i(c)+"rotate("+_+r)}function l(y,_,c,f){y!==_?f.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Un(y,_)}):_&&c.push(i(c)+"skewX("+_+r)}function d(y,_,c,f,w,v){if(y!==c||_!==f){var p=w.push(i(w)+"scale(",null,",",null,")");v.push({i:p-4,x:Un(y,c)},{i:p-2,x:Un(_,f)})}else(c!==1||f!==1)&&w.push(i(w)+"scale("+c+","+f+")")}return function(y,_){var c=[],f=[];return y=e(y),_=e(_),s(y.translateX,y.translateY,_.translateX,_.translateY,c,f),a(y.rotate,_.rotate,c,f),l(y.skewX,_.skewX,c,f),d(y.scaleX,y.scaleY,_.scaleX,_.scaleY,c,f),y=_=null,function(w){for(var v=-1,p=f.length,b;++v=0&&e._call.call(void 0,t),e=e._next;--Vo}function o0(){Wi=(Cu=ba.now())+Yc,Vo=$s=0;try{sN()}finally{Vo=0,lN(),Wi=0}}function aN(){var e=ba.now(),t=e-Cu;t>yS&&(Yc-=t,Cu=e)}function lN(){for(var e,t=ku,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ku=n);Fs=e,Lp(r)}function Lp(e){if(!Vo){$s&&($s=clearTimeout($s));var t=e-Wi;t>24?(e<1/0&&($s=setTimeout(o0,e-ba.now()-Yc)),ks&&(ks=clearInterval(ks))):(ks||(Cu=ba.now(),ks=setInterval(aN,yS)),Vo=1,_S(o0))}}function s0(e,t,n){var r=new Pu;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var uN=Qm("start","end","cancel","interrupt"),cN=[],bS=0,a0=1,Rp=2,Ul=3,l0=4,Ip=5,Hl=6;function Kc(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;dN(e,n,{name:t,index:r,group:i,on:uN,tween:cN,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:bS})}function og(e,t){var n=Kn(e,t);if(n.state>bS)throw new Error("too late; already scheduled");return n}function dr(e,t){var n=Kn(e,t);if(n.state>Ul)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function dN(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=wS(s,0,n.time);function s(y){n.state=a0,n.timer.restart(a,n.delay,n.time),n.delay<=y&&a(y-n.delay)}function a(y){var _,c,f,w;if(n.state!==a0)return d();for(_ in r)if(w=r[_],w.name===n.name){if(w.state===Ul)return s0(a);w.state===l0?(w.state=Hl,w.timer.stop(),w.on.call("interrupt",e,e.__data__,w.index,w.group),delete r[_]):+_Rp&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function UN(e,t,n){var r,i,s=BN(t)?og:dr;return function(){var a=s(this,e),l=a.on;l!==r&&(i=(r=l).copy()).on(t,n),a.on=i}}function HN(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(UN(n,e,t))}function WN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function VN(){return this.on("end.remove",WN(this._id))}function qN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Jm(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;at&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function bO(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i2?TO:bO,d=y=null,c}function c(f){return f==null||isNaN(f=+f)?s:(d||(d=l(e.map(r),t,n)))(r(a(f)))}return c.invert=function(f){return a(i((y||(y=l(t,e.map(r),Un)))(f)))},c.domain=function(f){return arguments.length?(e=Array.from(f,_O),_()):e.slice()},c.range=function(f){return arguments.length?(t=Array.from(f),_()):t.slice()},c.rangeRound=function(f){return t=Array.from(f),n=eN,_()},c.clamp=function(f){return arguments.length?(a=f?!0:To,_()):a!==To},c.interpolate=function(f){return arguments.length?(n=f,_()):n},c.unknown=function(f){return arguments.length?(s=f,c):s},function(f,w){return r=f,i=w,_()}}function xO(){return EO()(To,To)}function kO(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),l=i.ceil(s);return s-a(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,l)=>{const d=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s0))return d;let y;do d.push(y=new Date(+s)),t(s,l),e(s);while(yPt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!s(a););else for(;--l>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(Sf.setTime(+s),Ef.setTime(+a),e(Sf),e(Ef),Math.floor(n(Sf,Ef))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Au=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Au.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Au);Au.range;const xr=1e3,Pn=xr*60,kr=Pn*60,Or=kr*24,ag=Or*7,c0=Or*30,xf=Or*365,Jr=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getUTCSeconds());Jr.range;const Ht=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xr)},(e,t)=>{e.setTime(+e+t*Pn)},(e,t)=>(t-e)/Pn,e=>e.getMinutes());Ht.range;const xS=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Pn)},(e,t)=>(t-e)/Pn,e=>e.getUTCMinutes());xS.range;const lg=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xr-e.getMinutes()*Pn)},(e,t)=>{e.setTime(+e+t*kr)},(e,t)=>(t-e)/kr,e=>e.getHours());lg.range;const kS=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*kr)},(e,t)=>(t-e)/kr,e=>e.getUTCHours());kS.range;const La=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Pn)/Or,e=>e.getDate()-1);La.range;const ug=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Or,e=>e.getUTCDate()-1);ug.range;const CS=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Or,e=>Math.floor(e/Or));CS.range;function Yi(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Pn)/ag)}const Xc=Yi(0),Lu=Yi(1),CO=Yi(2),PO=Yi(3),qo=Yi(4),AO=Yi(5),LO=Yi(6);Xc.range;Lu.range;CO.range;PO.range;qo.range;AO.range;LO.range;function Ki(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ag)}const cg=Ki(0),Ru=Ki(1),RO=Ki(2),IO=Ki(3),Zo=Ki(4),NO=Ki(5),OO=Ki(6);cg.range;Ru.range;RO.range;IO.range;Zo.range;NO.range;OO.range;const dg=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());dg.range;const PS=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());PS.range;const Mr=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Mr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Mr.range;const ci=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ci.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ci.range;function AS(e,t,n,r,i,s){const a=[[Jr,1,xr],[Jr,5,5*xr],[Jr,15,15*xr],[Jr,30,30*xr],[s,1,Pn],[s,5,5*Pn],[s,15,15*Pn],[s,30,30*Pn],[i,1,kr],[i,3,3*kr],[i,6,6*kr],[i,12,12*kr],[r,1,Or],[r,2,2*Or],[n,1,ag],[t,1,c0],[t,3,3*c0],[e,1,xf]];function l(y,_,c){const f=_b).right(a,f);if(w===a.length)return e.every(W_(y/xf,_/xf,c));if(w===0)return Au.every(Math.max(W_(y,_,c),1));const[v,p]=a[f/a[w-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(te=Cf(Cs(Z.y,0,1)),ve=te.getUTCDay(),te=ve>4||ve===0?Ru.ceil(te):Ru(te),te=ug.offset(te,(Z.V-1)*7),Z.y=te.getUTCFullYear(),Z.m=te.getUTCMonth(),Z.d=te.getUTCDate()+(Z.w+6)%7):(te=kf(Cs(Z.y,0,1)),ve=te.getDay(),te=ve>4||ve===0?Lu.ceil(te):Lu(te),te=La.offset(te,(Z.V-1)*7),Z.y=te.getFullYear(),Z.m=te.getMonth(),Z.d=te.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),ve="Z"in Z?Cf(Cs(Z.y,0,1)).getUTCDay():kf(Cs(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(ve+5)%7:Z.w+Z.U*7-(ve+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,Cf(Z)):kf(Z)}}function E(O,j,V,Z){for(var Q=0,te=j.length,ve=V.length,se,$e;Q=ve)return-1;if(se=j.charCodeAt(Q++),se===37){if(se=j.charAt(Q++),$e=x[se in d0?j.charAt(Q++):se],!$e||(Z=$e(O,V,Z))<0)return-1}else if(se!=V.charCodeAt(Z++))return-1}return Z}function A(O,j,V){var Z=y.exec(j.slice(V));return Z?(O.p=_.get(Z[0].toLowerCase()),V+Z[0].length):-1}function C(O,j,V){var Z=w.exec(j.slice(V));return Z?(O.w=v.get(Z[0].toLowerCase()),V+Z[0].length):-1}function N(O,j,V){var Z=c.exec(j.slice(V));return Z?(O.w=f.get(Z[0].toLowerCase()),V+Z[0].length):-1}function $(O,j,V){var Z=g.exec(j.slice(V));return Z?(O.m=m.get(Z[0].toLowerCase()),V+Z[0].length):-1}function F(O,j,V){var Z=p.exec(j.slice(V));return Z?(O.m=b.get(Z[0].toLowerCase()),V+Z[0].length):-1}function z(O,j,V){return E(O,t,j,V)}function U(O,j,V){return E(O,n,j,V)}function H(O,j,V){return E(O,r,j,V)}function B(O){return a[O.getDay()]}function W(O){return s[O.getDay()]}function Y(O){return d[O.getMonth()]}function G(O){return l[O.getMonth()]}function J(O){return i[+(O.getHours()>=12)]}function oe(O){return 1+~~(O.getMonth()/3)}function ce(O){return a[O.getUTCDay()]}function fe(O){return s[O.getUTCDay()]}function de(O){return d[O.getUTCMonth()]}function ue(O){return l[O.getUTCMonth()]}function be(O){return i[+(O.getUTCHours()>=12)]}function ne(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var j=k(O+="",h);return j.toString=function(){return O},j},parse:function(O){var j=P(O+="",!1);return j.toString=function(){return O},j},utcFormat:function(O){var j=k(O+="",T);return j.toString=function(){return O},j},utcParse:function(O){var j=P(O+="",!0);return j.toString=function(){return O},j}}}var d0={"-":"",_:" ",0:"0"},Ot=/^\s*\d+/,FO=/^%/,jO=/[\\^$*+?|[\]().{}]/g;function je(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s[t.toLowerCase(),n]))}function BO(e,t,n){var r=Ot.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UO(e,t,n){var r=Ot.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function HO(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WO(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function VO(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function f0(e,t,n){var r=Ot.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function h0(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qO(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ZO(e,t,n){var r=Ot.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function GO(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function p0(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function YO(e,t,n){var r=Ot.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function m0(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function KO(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function XO(e,t,n){var r=Ot.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function QO(e,t,n){var r=Ot.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function JO(e,t,n){var r=Ot.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function eM(e,t,n){var r=FO.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tM(e,t,n){var r=Ot.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nM(e,t,n){var r=Ot.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function g0(e,t){return je(e.getDate(),t,2)}function rM(e,t){return je(e.getHours(),t,2)}function iM(e,t){return je(e.getHours()%12||12,t,2)}function oM(e,t){return je(1+La.count(Mr(e),e),t,3)}function LS(e,t){return je(e.getMilliseconds(),t,3)}function sM(e,t){return LS(e,t)+"000"}function aM(e,t){return je(e.getMonth()+1,t,2)}function lM(e,t){return je(e.getMinutes(),t,2)}function uM(e,t){return je(e.getSeconds(),t,2)}function cM(e){var t=e.getDay();return t===0?7:t}function dM(e,t){return je(Xc.count(Mr(e)-1,e),t,2)}function RS(e){var t=e.getDay();return t>=4||t===0?qo(e):qo.ceil(e)}function fM(e,t){return e=RS(e),je(qo.count(Mr(e),e)+(Mr(e).getDay()===4),t,2)}function hM(e){return e.getDay()}function pM(e,t){return je(Lu.count(Mr(e)-1,e),t,2)}function mM(e,t){return je(e.getFullYear()%100,t,2)}function gM(e,t){return e=RS(e),je(e.getFullYear()%100,t,2)}function vM(e,t){return je(e.getFullYear()%1e4,t,4)}function yM(e,t){var n=e.getDay();return e=n>=4||n===0?qo(e):qo.ceil(e),je(e.getFullYear()%1e4,t,4)}function _M(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+je(t/60|0,"0",2)+je(t%60,"0",2)}function v0(e,t){return je(e.getUTCDate(),t,2)}function wM(e,t){return je(e.getUTCHours(),t,2)}function bM(e,t){return je(e.getUTCHours()%12||12,t,2)}function TM(e,t){return je(1+ug.count(ci(e),e),t,3)}function IS(e,t){return je(e.getUTCMilliseconds(),t,3)}function SM(e,t){return IS(e,t)+"000"}function EM(e,t){return je(e.getUTCMonth()+1,t,2)}function xM(e,t){return je(e.getUTCMinutes(),t,2)}function kM(e,t){return je(e.getUTCSeconds(),t,2)}function CM(e){var t=e.getUTCDay();return t===0?7:t}function PM(e,t){return je(cg.count(ci(e)-1,e),t,2)}function NS(e){var t=e.getUTCDay();return t>=4||t===0?Zo(e):Zo.ceil(e)}function AM(e,t){return e=NS(e),je(Zo.count(ci(e),e)+(ci(e).getUTCDay()===4),t,2)}function LM(e){return e.getUTCDay()}function RM(e,t){return je(Ru.count(ci(e)-1,e),t,2)}function IM(e,t){return je(e.getUTCFullYear()%100,t,2)}function NM(e,t){return e=NS(e),je(e.getUTCFullYear()%100,t,2)}function OM(e,t){return je(e.getUTCFullYear()%1e4,t,4)}function MM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Zo(e):Zo.ceil(e),je(e.getUTCFullYear()%1e4,t,4)}function DM(){return"+0000"}function y0(){return"%"}function _0(e){return+e}function w0(e){return Math.floor(+e/1e3)}var lo,Iu;OS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function OS(e){return lo=$O(e),Iu=lo.format,lo.parse,lo.utcFormat,lo.utcParse,lo}function $M(e){return new Date(e)}function FM(e){return e instanceof Date?+e:+new Date(+e)}function MS(e,t,n,r,i,s,a,l,d,y){var _=xO(),c=_.invert,f=_.domain,w=y(".%L"),v=y(":%S"),p=y("%I:%M"),b=y("%I %p"),g=y("%a %d"),m=y("%b %d"),h=y("%B"),T=y("%Y");function x(k){return(d(k)(n[e[i]]=r,n),{})}function JM(e){return typeof e<"u"&&e!==null}function S0(e){return e.charAt(0).toUpperCase()+e.slice(1)}function eD(e,t){return e.length>t?e.substring(0,120)+"...":e}function FS(e){function t(i={},[s,...a],l){const d=Object.keys(i).find(_=>$S(_)===s);l.push(s);const y=l.join("/");return d||(i[y]={}),a.length>0&&t(i[y],a,l),i}const n=[];return e.forEach(i=>n.push(i.filter_paths)),n.reduce((i,s)=>t(i,s,[]),{})}function hg(e){const t=e.split("/"),n=[];return t.forEach((r,i)=>{const s=t.slice(0,i+1).join("/");n.push(s)}),n.pop(),n}function tD(e){const t=hg(e);return t[t.length-1]}function nD(e,t,n){function r(l,d){if(d.length===0||l==={})return{};const y=d.shift();if(Object.keys(l).includes(y)){const _=l[y];return d.length===0?_:r(_,d)}}const i=FS(e),s=hg(n),a=r(i,s);return Object.keys(a).filter(l=>l!==n)}function rD(e,t){const n=e.flatMap(i=>i),r=t.filter(i=>n.indexOf(i)===-1);return[...e,r]}function iD(e,t){return e.map(r=>r.filter(i=>!t.includes(i))).filter(r=>r.length!==0)}function jS(e,t){return e.associations.filter(r=>r.mode===Yn.CATEGORY).reduce((r,i)=>{const s=t.find(a=>a===i.title);return s&&r.push(s),r},[])}function Qc(e){return e.filter_paths.join("/")}function pg(e){return t=>{let n;return t.sources?n=t.sources.map(r=>e.hasOwnProperty(r)?e[r]:null):n=[],{...t,sources:n}}}const E0=Gt.SERVER_ROOT;function Jo(e){return Gt[e]?Array.isArray(Gt[e])?Gt[e].map(t=>`${E0}${t}`):[`${E0}${Gt[e]}`]:null}function Xi(e){return t=>({...t,flags:{...t.flags,[e]:!t.flags[e]}})}function zS(e){let t;switch(e=e.trim(),!0){case/\.((png)|(jpg)|(jpeg))$/.test(e):t="Image";break;case/\.(mp4)$/.test(e):t="Video";break;case/\.(md)$/.test(e):t="Text";break;case/\.(pdf)$/.test(e):t="Document";break;case/.+(twitter\.com).+/.test(e):t="Tweet";break;case/.+(t\.me).+/.test(e):t="Telegram";break;default:t="Unknown";break}return t}function oD(e,t){return{type:zS(e),path:e,poster:t}}function Pf(e,t){return Zt(e)===Zt(t)}function mg(e){return(e>=1?.9:0)+Math.min(.5,.08*(e-1))}function sD(e,t){return Math.min(.85,.08+e/t*50)}function BS(e,t){const n=t>60?60:35;return Math.min(n,10+e/t*100)}function US(e){return e.reduce((t,n)=>(n&&n.properties&&n.properties.cluster&&(t+=n.properties.point_count),t),0)}function Ra(e){return!!e&&isFinite(e)&&Math.abs(e)<=90}function Ia(e){return!!e&&isFinite(e)&&Math.abs(e)<=180}function x0(e,t){return e.reduce((n,r)=>{const i=t.find(s=>s.label===r.properties.id);return i&&n.push(i),n},[])}function gg(e,t){if(t.length===0)return[1];const n={};for(const[s,a]of t.entries())for(const l of a)n[l]=s;const r=new Array(t.length);r.fill(0);let i=0;return e.forEach(s=>{let a="events"in s?s.events:s;Array.isArray(a)||(a=[a]),a.forEach(l=>{l.associations.forEach(d=>{const y=n[Qc(d)];!y&&y!==0||(r[y]+=1,i+=1)})})}),i===0?[1]:r.map(s=>s/i)}function HS(e,t){let n=-1;return t.map((r,i)=>(r.indexOf(e)!==-1&&(n=i),null)),n}const aD=function(){return Array.prototype.slice.call(arguments).reduce(function(e,t){return et?e:t})};function uD(e,t,n){let r=0,i=e.length-1;for(;r<=i;){const s=i+r>>1,a=n(t,e[s]);if(a>0)r=s+1;else if(a<0)i=s-1;else return s}return-r-1}function Op(e){if(e===null)return null;const t=new Intl.DateTimeFormat(ht,{year:"numeric",month:"long",day:"2-digit"}),[{value:n},,{value:r},,{value:i}]=t.formatToParts(e);return`${r} ${n}, ${i}`}function cD(){const e={"es-MX":GM};ht!=="es-US"&&e[ht]&&OS(e[ht])}function dD(e,t){return e.map(r=>{const{colour:i,shape:s,id:a}=r,l={checkboxStyles:{background:t.includes(a)?i:"black",border:"none",clipPath:b0[s]},containerStyles:{background:i,clipPath:b0[s]}};return r.styles=l,r})}function fD(e,t){const n=e.reduce((i,s)=>{const a=s.filter_paths[0];return a in i||(i[a]=[]),i[a].push(s),i},{});return t.length>1?n:{default:e}}function hD(e,t){let n=t;return(e.length>1?e.filter(i=>i!=="default"):e).reduce((i,s)=>(i[s]=n,n+=1,i),{})}function pD(e,t,n){return e&&!t?1:!e&&t?n:e&&t?n+1:0}function k0(e,t){let n=document.createElement("a");n.setAttribute("href",`data:application/octet-stream;charset=utf-8,${encodeURIComponent(t)}`),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}const C0=e=>e.length===0;function mD(e){return e==null||typeof e=="object"&&!Object.keys(e).length}const gD=Jo("EVENTS_EXT"),P0=Jo("ASSOCIATIONS_EXT"),Nu=Jo("SOURCES_EXT"),vD=Jo("SITES_EXT"),yD=Jo("REGIONS_EXT"),_D=Jo("SHAPES_EXT"),Rs=e=>`Something went wrong fetching ${e}. Check the URL or try disabling them in the config file.`;function wD(){const e=[];function t(n){return e.push({message:n,type:"error"}),[]}return(n,r)=>{const i=r().features;n(Wl());const s=Promise.all(gD.map(c=>fetch(c).then(f=>f.json()).catch(()=>t("events")))).then(c=>c.flatMap(f=>f));let a=Promise.resolve([]);i.USE_ASSOCIATIONS&&(P0?a=fetch(P0).then(c=>c.json()).catch(()=>t(Rs("associations"))):a=Promise.resolve(t("USE_ASSOCIATIONS is true, but you have not provided a ASSOCIATIONS_EXT")));let l=Promise.resolve([]);i.USE_SOURCES&&(Nu?l=fetch(Nu).then(c=>c.json()).catch(()=>t(Rs("sources"))):l=Promise.resolve(t("USE_SOURCES is true, but you have not provided a SOURCES_EXT")));let d=Promise.resolve([]);i.USE_SITES&&(d=fetch(vD).then(c=>c.json()).catch(()=>t(Rs("sites"))));let y=Promise.resolve([]);i.USE_REGIONS&&(y=fetch(yD).then(c=>c.json()).catch(()=>t(Rs("regions"))));let _=Promise.resolve([]);return i.USE_SHAPES&&(_=fetch(_D).then(c=>c.json()).catch(()=>t(Rs("shapes")))),Promise.all([s,a,l,d,y,_]).then(c=>{const f={events:c[0],associations:c[1],sources:c[2],sites:c[3],regions:c[4],shapes:c[5],notifications:e};if(Object.values(f).some(w=>w.hasOwnProperty("error")))throw new Error("Some URLs returned negative. If you are in development, check the server is running");return n(Wl()),n(GS(f.associations)),n(YS(f.shapes)),f}).catch(c=>{n(WS(c.message)),n(Wl()),alert(c.message)})}}const vg="FETCH_ERROR";function WS(e){return{type:vg,message:e}}const yg="UPDATE_DOMAIN";function bD(e){return{type:yg,payload:e}}function TD(e){return t=>{Nu?(t(Mp()),fetch(`${Nu}`).then(n=>{if(n.ok)return n.json();throw new Error("No sources are available at the URL specified in the config specified.")}).catch(n=>{t(Dp(n.message)),t(Mp())})):t(Dp("No source extension specified."))}}const _g="UPDATE_HIGHLIGHTED";function SD(e){return{type:_g,highlighted:e}}const Jc="UPDATE_SELECTED";function ED(e){return{type:Jc,selected:e}}const VS="UPDATE_DISTRICT";function xD(e){return{type:VS,district:e}}const wg="CLEAR_FILTER";function kD(e){return{type:wg,filter:e}}const ed="TOGGLE_ASSOCIATIONS";function CD(e,t,n){return{type:ed,association:e,value:t,shouldColor:n}}const bg="TOGGLE_SHAPES";function PD(e){return{type:bg,shape:e}}const Tg="SET_LOADING";function qS(){return{type:Tg}}const Sg="SET_NOT_LOADING";function ZS(){return{type:Sg}}const Eg="SET_INITIAL_CATEGORIES";function GS(e){return{type:Eg,values:e}}const xg="SET_INITIAL_SHAPES";function YS(e){return{type:xg,values:e}}const td="UPDATE_TIMERANGE";function AD(e){return{type:td,timerange:e}}const kg="UPDATE_DIMENSIONS";function LD(e){return{type:kg,dims:e}}const Cg="UPDATE_NARRATIVE";function RD(e){return{type:Cg,narrative:e}}const Pg="UPDATE_NARRATIVE_STEP_IDX";function ID(e){return{type:Pg,idx:e}}const Ag="UPDATE_SOURCE";function ND(e){return{type:Ag,source:e}}const nd="UPDATE_COLORING_SET";function OD(e){return{type:nd,coloringSet:e}}const Lg="UPDATE_TICKS";function KS(e){return{type:Lg,ticks:e}}const Rg="TOGGLE_SITES";function MD(){return{type:Rg}}const Ig="TOGGLE_FETCHING_DOMAIN";function Wl(){return{type:Ig}}const Ng="TOGGLE_FETCHING_SOURCES";function Mp(){return{type:Ng}}const Og="TOGGLE_LANGUAGE";function DD(e){return{type:Og,language:e}}const XS="CLOSE_TOOLBAR";function $D(){return{type:XS}}const Mg="TOGGLE_INFOPOPUP";function FD(){return{type:Mg}}const Dg="TOGGLE_INTROPOPUP";function jD(){return{type:Dg}}const $g="TOGGLE_NOTIFICATIONS";function zD(){return{type:$g}}const Fg="MARK_NOTIFICATIONS_READ";function BD(){return{type:Fg}}const jg="TOGGLE_COVER";function UD(){return{type:jg}}const zg="TOGGLE_TILE_OVERLAY";function HD(){return{type:zg}}const Bg="UPDATE_SEARCH_QUERY";function WD(e){return{type:Bg,searchQuery:e}}const Ug="FETCH_SOURCE_ERROR";function Dp(e){return{type:Ug,msg:e}}const QS="TOGGLE_SATELLITE_VIEW";function VD(){return{type:QS}}const Hg="REHYDRATE_STATE";function qD(){return{type:Hg}}const rd=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_FILTER:wg,CLOSE_TOOLBAR:XS,FETCH_ERROR:vg,FETCH_SOURCE_ERROR:Ug,MARK_NOTIFICATIONS_READ:Fg,REHYDRATE_STATE:Hg,SET_INITIAL_CATEGORIES:Eg,SET_INITIAL_SHAPES:xg,SET_LOADING:Tg,SET_NOT_LOADING:Sg,TOGGLE_ASSOCIATIONS:ed,TOGGLE_COVER:jg,TOGGLE_FETCHING_DOMAIN:Ig,TOGGLE_FETCHING_SOURCES:Ng,TOGGLE_INFOPOPUP:Mg,TOGGLE_INTROPOPUP:Dg,TOGGLE_LANGUAGE:Og,TOGGLE_NOTIFICATIONS:$g,TOGGLE_SATELLITE_VIEW:QS,TOGGLE_SHAPES:bg,TOGGLE_SITES:Rg,TOGGLE_TILE_OVERLAY:zg,UPDATE_COLORING_SET:nd,UPDATE_DIMENSIONS:kg,UPDATE_DISTRICT:VS,UPDATE_DOMAIN:yg,UPDATE_HIGHLIGHTED:_g,UPDATE_NARRATIVE:Cg,UPDATE_NARRATIVE_STEP_IDX:Pg,UPDATE_SEARCH_QUERY:Bg,UPDATE_SELECTED:Jc,UPDATE_SOURCE:Ag,UPDATE_TICKS:Lg,UPDATE_TIMERANGE:td,clearFilter:kD,closeToolbar:$D,fetchDomain:wD,fetchError:WS,fetchSource:TD,fetchSourceError:Dp,markNotificationsRead:BD,rehydrateState:qD,setInitialCategories:GS,setInitialShapes:YS,setLoading:qS,setNotLoading:ZS,toggleAssociations:CD,toggleCover:UD,toggleFetchingDomain:Wl,toggleFetchingSources:Mp,toggleInfoPopup:FD,toggleIntroPopup:jD,toggleLanguage:DD,toggleNotifications:zD,toggleSatelliteView:VD,toggleShapes:PD,toggleSites:MD,toggleTileOverlay:HD,updateColoringSet:OD,updateDimensions:LD,updateDistrict:xD,updateDomain:bD,updateHighlighted:SD,updateNarrative:RD,updateNarrativeStepIdx:ID,updateSearchQuery:WD,updateSelected:ED,updateSource:ND,updateTicks:KS,updateTimeRange:AD},Symbol.toStringTag,{value:"Module"}));var Ou="NOT_FOUND";function ZD(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Ou},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function GD(e,t){var n=[];function r(l){var d=n.findIndex(function(_){return t(l,_.key)});if(d>-1){var y=n[d];return d>0&&(n.splice(d,1),n.unshift(y)),y.value}return Ou}function i(l,d){r(l)===Ou&&(n.unshift({key:l,value:d}),n.length>e&&n.pop())}function s(){return n}function a(){n=[]}return{get:r,put:i,getEntries:s,clear:a}}var YD=function(t,n){return t===n};function KD(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,s=0;s1?t-1:0),r=1;re.domain.events,eE=e=>e.domain.associations.filter(t=>t.mode===Yn.CATEGORY),t$=e=>e.domain.associations.filter(t=>t.mode===Yn.NARRATIVE),tE=e=>e.app.associations.narrative,Wg=e=>e.app.selected,n$=e=>e.domain.sites,Vg=e=>e.domain.sources,r$=e=>e.domain.regions,i$=e=>e.domain.shapes,nE=e=>e.domain.associations.filter(t=>t.mode===Yn.FILTER),qg=e=>e.app.associations.filters,Zg=e=>e.app.associations.categories,rE=e=>e.app.shapes,o$=e=>e.app.associations.coloringSet,iE=e=>e.app.timeline.range,s$=e=>e.app.timeline.dimensions,fr=e=>e.features,a$=e=>e.ui.eventRadius,l$=e=>e.ui.tiles.current,u$=e=>e.ui.tiles.current===e.ui.tiles.satellite,c$=At([n$,fr],(e,t)=>t.USE_SITES?e.filter(n=>!!+n.enabled):[]);At([Vg,fr],(e,t)=>t.USE_SOURCES?e:{});const d$=At([r$,fr],(e,t)=>t.USE_REGIONS?e:[]),f$=e=>e.app.timeline.range.initial,h$=e=>e.app.timeline.range.initialDaysShown,Gg=At([iE,f$,h$],(e,t,n)=>{let r,i;return e=e.current,Array.isArray(e)&&e.length===2?[r,i]=e:Array.isArray(t)&&t.length===2?[r,i]=t:(i=new Date,r=new Date(i.getTime()-n*24*60*60*1e3)),[new Date(r),new Date(i)]}),p$=e=>e.app.timeline.range.limits,oE=At(p$,e=>[new Date(e.lower),new Date(e.upper||Date.now())]),Yg=At([JS,qg,Zg,rE,Gg,fr],(e,t,n,r,i,s)=>e.reduce((a,l)=>{const y=l.associations&&l.associations.filter(w=>w.mode===Yn.FILTER).map(w=>t.includes(Qc(w))).some(w=>w)||t.length===0||t.length===0,_=l.associations&&l.associations.filter(w=>w.mode===Yn.CATEGORY).map(w=>n.includes(w.title)).some(w=>w)||n.length===0;let c=e$(l,i);c=s.GRAPH_NONLOCATED&&!l.latitude&&!l.longitude||c;const f=l.shape&&r.includes(l.shape.id);return l.type===DS?f&&_&&c&&(a[l.id]={...l}):y&&_&&c&&(a[l.id]={...l}),a},[])),m$=At([Yg],(e,t)=>e.reduce(n=>n+1,0)),Kg=At([JS,t$,Vg,fr],(e,t,n,r)=>{if(Array.isArray(t)&&t.length===0)return[];const i={},s=a=>({id:a,steps:[]});return e.forEach(a=>{a.associations.forEach(l=>{const d=t.find(y=>y.id===l);if(d){const{id:y}=d;i[y]||(i[y]=s(y)),i[y].steps.push(pg(n)(a))}})}),Object.keys(i).forEach(a=>{i[a].steps.sort((y,_)=>y.datetime-_.datetime);const d=t.find(y=>y.id===a);d&&(i[a]={...d,...i[a]})}),t.map(a=>i[a.id]).filter(a=>a)}),sE=At([Wg,tE],(e,t)=>{if(t===null)return-1;const n=e[0];let r;return t.steps.forEach((i,s)=>{n.id===i.id&&(r=s)}),r}),aE=At([tE,sE],(e,t)=>e?{...e,current:t}:null),g$=At([Yg],e=>{const t={};return e.forEach(n=>{const{latitude:r,longitude:i}=n;if(!Ra(r)||!Ia(i))return;const s=`${n.location}$_${n.latitude}_${n.longitude}`;t[s]?t[s].events.push(n):t[s]={label:s,events:[n],id:n.id,latitude:n.latitude,longitude:n.longitude}}),Object.values(t)}),lE=At([Yg,fr,a$],(e,t,n)=>{if(!t.GRAPH_NONLOCATED)return[e,[]];const r=2*n,i=t.GRAPH_NONLOCATED.projectIdx||0,s=_=>_.filters[i],a={};e=e.reduce((_,c)=>{const f=c.filters.length>=1&&!c.latitude&&!c.longitude?s(c):null;return f!==null&&(a.hasOwnProperty(f)?(a[f].start=aD(a[f].start,c.datetime),a[f].end=lD(a[f].end,c.datetime)):a[f]={start:c.datetime,end:c.datetime,key:f,category:c.category}),_.push({...c,project:f}),_},[]);const l=Object.values(a);l.sort((_,c)=>_.start-c.start);const d=Object.keys(a).map((_,c)=>null),y=l.reduce((_,c,f)=>{d.forEach((v,p)=>{v!==null&&a[v].ende[0]),y$=At([lE,fr],(e,t)=>t.GRAPH_NONLOCATED?e[1]:[]),Xg=At([Wg,Vg],(e,t)=>e.length===0?[]:e.map(pg(t))),$p=At([s$],e=>({...e,trackHeight:e.contentHeight-50})),uE=At([nE],e=>e.reduce((t,n)=>(t[Qc(n)]=n.id,t),{})),_$=At([o$,uE],(e,t)=>e.map(n=>cE(n,t).join(","))),w$=At([qg,uE],(e,t)=>cE(e,t));function cE(e,t){return e.reduce((n,r)=>{const i=t[r];return i&&n.push(i),n},[])}const Wt={NUMBER:"NUMBER",NUMBER_ARRAY:"NUMBER_ARRAY",STRING:"STRING",STRING_ARRAY:"STRING_ARRAY",DATE:"DATE",DATE_ARRAY:"DATE_ARRAY"};function A0(e){return[Wt.DATE_ARRAY,Wt.NUMBER_ARRAY,Wt.STRING_ARRAY].includes(e.type)}const Qg=Object.freeze({id:{key:"id",trigger:Jc,type:Wt.STRING_ARRAY,dehydrate(e){return Wg(e).map(({civId:t})=>t)},rehydrate(e,{id:t}){t!=null&&t.length&&(e.app.selected=t.reduce((n,r)=>{const i=e.domain.events.find(s=>s.civId===r);return i?n.push(i):console.warn(`event ${r} could not be rehydrated. reason: not present.`),n},[]))}},range:{key:"range",trigger:td,type:Wt.DATE_ARRAY,dehydrate(e){return iE(e)},rehydrate(e,{range:t}){if((t==null?void 0:t.length)===2){const n=Array.from(t);n.sort((r,i)=>new Date(r)-new Date(i)),e.app.timeline={...e.app.timeline,range:{...e.app.timeline.range,current:n}}}}},filter:{key:"filter",trigger:ed,type:Wt.STRING_ARRAY,dehydrate(e){return w$(e)},rehydrate(e,{filter:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=L0(n);e.app.associations.filters=t.map(i=>r[i])}}},color:{key:"color",trigger:nd,type:Wt.STRING_ARRAY,dehydrate(e){return _$(e)},rehydrate(e,{color:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=L0(n);e.app.associations.coloringSet=t.map(i=>i.split(",").map(s=>r[s]))}}}});function L0(e){return e.reduce((t,n)=>(t[n.id]=Qc(n),t),{})}class dE{constructor(){this.url=new URL(window.location),this.schema=Qg}delete(t){this.url.searchParams.delete(t)}set(t,n){const r=this.schema[t];if(r)if(this.delete(t),r.type===Wt.DATE_ARRAY)n.current.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else if(A0(r))n.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else{const i=this._encode(r,n);i&&this.url.searchParams.set(t,i)}}serialize(){window.history.replaceState(null,"",this.url)}deserialize(){const t={};return this.url.searchParams.forEach((n,r)=>{if(t[r]!=null)return;const i=this.schema[r];i&&(t[r]=A0(i)?this.url.searchParams.getAll(r).map(s=>this._decode(i,s)):this._decode(i,this.url.searchParams.get(r)))}),t}_decode(t,n){switch(t.type){case Wt.NUMBER_ARRAY:case Wt.NUMBER:return+n;case Wt.DATE:case Wt.DATE_ARRAY:return new Date(n);default:return n==="null"||n==="undefined"?void 0:n}}_encode(t,n){switch(t.type){case Wt.NUMBER_ARRAY:case Wt.NUMBER:return n.toString();case Wt.DATE:case Wt.DATE_ARRAY:return Ho(n).format("YYYY-MM-DD");default:return n}}}function b$(e){const t=new dE().deserialize();if(mD(t))return e;const n={...e};return Object.values(Qg).forEach(r=>{try{r.rehydrate(n,t)}catch(i){console.error(i)}}),n}function T$(e){return t=>n=>{const r=t(n);try{const i=Object.values(Qg).filter(s=>s.trigger===n.type);if(i.length){const s=new dE,a=e.getState();i.forEach(l=>{s.set(l.key,l.dehydrate(a))}),s.serialize()}}catch(i){console.error("error serializing url state",i)}return r}}function S$(e={},t){switch(t.type){case Hg:return b$(e);default:return e}}function lt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ni(e){return function t(n){return arguments.length===0||lt(n)?t:e.apply(this,arguments)}}function Pi(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return lt(n)?t:Ni(function(i){return e(n,i)});default:return lt(n)&<(r)?t:lt(n)?Ni(function(i){return e(i,r)}):lt(r)?Ni(function(i){return e(n,i)}):e(n,r)}}}function fE(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return lt(n)?t:Pi(function(s,a){return e(n,s,a)});case 2:return lt(n)&<(r)?t:lt(n)?Pi(function(s,a){return e(s,r,a)}):lt(r)?Pi(function(s,a){return e(n,s,a)}):Ni(function(s){return e(n,r,s)});default:return lt(n)&<(r)&<(i)?t:lt(n)&<(r)?Pi(function(s,a){return e(s,a,i)}):lt(n)&<(i)?Pi(function(s,a){return e(s,r,a)}):lt(r)&<(i)?Pi(function(s,a){return e(n,s,a)}):lt(n)?Ni(function(s){return e(s,r,i)}):lt(r)?Ni(function(s){return e(n,s,i)}):lt(i)?Ni(function(s){return e(n,r,s)}):e(n,r,i)}}}function xl(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function R0(e){return Object.prototype.toString.call(e)==="[object Object]"}var E$=fE(function(t,n,r){var i={},s;for(s in n)xl(s,n)&&(i[s]=xl(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)xl(s,r)&&!xl(s,i)&&(i[s]=r[s]);return i});const x$=E$;var k$=fE(function e(t,n,r){return x$(function(i,s,a){return R0(s)&&R0(a)?e(t,s,a):t(i,s,a)},n,r)});const C$=k$;var P$=Pi(function(t,n){return C$(function(r,i,s){return i},t,n)});const Jg=P$,js={fa_red:"#eb443e",yellow:"#ffd800",black:"#000",white:"#fff"},qn={fallbackEventColor:js.fa_red,darkBackground:js.black,primaryHighlight:js.fa_red,secondaryHighlight:js.white},Ue={"es-MX":{tiles:{default:"Mapa",satellite:"Sat"},loading:"Cargando...",legend:{view2d:{paragraphs:["Seleccionando una serie de filtros verá aparecer eventos en el mapa y en la línea del tiempo.","Cada evento estará coloreado según la persona que dio el testimonio del evento."],colors:[{class:"category_group00",label:"Categoría Grupo 00"},{class:"category_group01",label:"Categoría Grupo 01"},{class:"category_group02",label:"Categoría Grupo 02"},{class:"category_group03",label:"Categoría Grupo 03"},{class:"other",label:"Otras categorías"}]},default:{header:"Ayudas para explorar la plataforma",intro:["Cada **punto** representa un **evento en los datos** (o cada incidente). Al hacer clic en cada punto se ven los detalles del evento. Pero si le da clic en un **grupo** de puntos, verá cuantos eventos hay en ese grupo.","Puede acercarse en el mapa *(zoom)* haciendo *scroll* con el ratón o haciendo clic en un grupo de puntos.","Puede usar **filtros** para segmentar los datos. En el mapa sólo vemos los puntos relacionados con cada filtro seleccionado. Cuando no hay filtros seleccionados, vemos todos los puntos de la base de datos en el mapa.","Al seleccionar más de un filtro se introducen diferentes colores para diferenciarlos. Esto permite comparar los tipos de incidentes tanto en el mapa, como en la línea de tiempo. Esto sirve con un máximo de 6 filtros-colores.","Con el teclado puede usar las flechas de la derecha e izquierda para moverse entre eventos. También puede hacer clic y arrastrar la línea de tiempo hacia los lados para modificar el rango de tiempo."],notation:"Cuando un circulo combina colores significa que hay varios eventos en esa misma ubicación.",arrows:"Usar las flechas izquierda/derecha en el teclado para moverse entre eventos cronológicamente."}},toolbar:{title:"Título",filters:"Filtros",explore_by_filter__title:"Explorar por filtros",explore_by_filter__description:"Al seleccionar filtros, puede ver los eventos que tienen esa categoria. Para ver todos los eventos puede quitar todas las selecciones (o seleccionarlos todos).",panels:{mentions:{title:"Personas",overview:"Seleccionar los nombres de personas mostrará eventos en los que esta persona o organización ha sido mencionada, incluyendo el propio testimonio. Entre paréntesis encontrará el número de menciones. Ej. (34)."},categories:{title:"Testimonios",overview:"Seleccionar el nombre de una persona mostrará los eventos descritos por su testimonio. Entre paréntesis encontrará el número de eventos descritos. Ej. (34)."},search:{title:"Directorio de etiquetas",placeholder:"Búsqueda"}}},timeline:{zoomLevels:[{label:"20 años",duration:10512e3},{label:"2 años",duration:1051200},{label:"3 meses",duration:129600},{label:"3 días",duration:4320},{label:"12 horas",duration:720},{label:"1 hora",duration:60}],labels_title:"Testimonios",labels:["Testimonio Grupo 00","Testimonio Grupo 01","Testimonio Grupo 02","Testimonio Grupo 03","Otras categorias"],info:"%n eventos ocurridos entre",default_categories_label:"Eventos"},cardstack:{date_title:"Fecha incidente",location_title:"Ubicación",summary_title:"Resumen",header:"eventos seleccionados",unknown_location:"Ubicación desconocida",unknown_time:"Día y hora desconocida",timestamp:"Día y hora",estimated:"aproximado",location:"Ubicación",incident_type:"Tipo de acción",description:"Hechos",people:"Personas en el evento",sources:"Fuentes",category:"Según el testimonio de",communication:"Comunicación",transmitter:"Transmisor",receiver:"Receptor",warning:"(!) HECHOS CUESTIONADOS"}},"en-US":{tiles:{default:"Map",satellite:"Sat"},loading:"Loading...",legend:{view2d:{paragraphs:["Selecting a series of filters, you will be able to explore events on the map of Iguala and on the timeline.","Each event is colored according the person that gave category of the event."],colors:[{class:"category_group00",label:"Category Group 00"},{class:"category_group01",label:"Category Group 01"},{class:"category_group02",label:"Category Group 02"},{class:"category_group03",label:"Category Group 03"},{class:"other",label:"Other categories"}]},default:{header:"Navigating the Platform",intro:["Each small **dot** represents a **datapoint**, or incident. Click on a dot to see details. Hover over a larger ‘**cluster**’ dot to see how many events it represents.","Zoom in either with a mouse-scroll or by clicking a ‘cluster’ dot.","Use **filters** and **categories** to segment the data. Selecting certain filters and categories will show only the datapoints that relate to them. If no filters or categories are selected, all the datapoints are displayed.","Selecting more than one filter will introduce colour-coded datapoints, which allow you to compare types of incident across time and space. This feature works up to a maximum of six filters.","Once you have clicked on an event, use the left and right arrows to move back and forward day by day. You can also click and drag anywhere on the timeline. Use the handles on the right to select a date range."],notation:"Combinations of colours within a circle indicate multiple events in a single location.",arrows:"Use the left/right arrows on the keboard to move back and forth between events in time."}},toolbar:{title:"TITLE",panels:{mentions:{title:"Mentions",overview:"Selecting the names of people/organisation will show events in which these have been mentioned in their own testimony and by others. The number in the parentheses shows how many events contain a mention of a person or organisation, e.g. (34)"},categories:{title:"Testimonies",overview:"Selecting the name of a person will show the events only according to a person’s category or category. The number in the parentheses show how many events are contained in each category, e.g. (34)."},search:{title:"Directory of filters",placeholder:"Search"}},narratives:"Narratives",narratives_label:"Narratives",explore_by_narrative__title:"Explore events by narrative",explore_by_narrative__description:"Follow a path through the data, from one key event to the next.",filters:"Filters",filters_label:"Filters",explore_by_filter__title:"Explore by filter",explore_by_filter__description:"'Filters' refer to the types of incident. Select multiple filters to introduce colour-coding, up to a maximum of four filters.

If no filters are selected, all datapoints are displayed.",categories:"Categories",categories_label:"Categories",explore_by_category__title:"Explore events by category",explore_by_category__description:"",shapes:"Shapes",shapes_label:"Shapes",explore_by_shapes__title:"Explore events by shape breakdown",explore_by_shape__description:"Shapes map to a given type of event that appears on the timeline.

Select the shape marker to toggle this type of event on / off",fullscreen_enter:"Fullscreen",fullscreen_exit:"Exit Fullscreen",download:{button:"Download",panel:{title:"Download events",description:"Export the most recent available events in different formats.",formats:{api:{label:"API",description:"An API endpoint where you can always fetch the entire dataset in JSON format with tools like curl. Useful for integrating the data in other services and visualizaitons."},csv:{label:"CSV",description:"CSV file where sources and filters are concatenated into a single column each due to data structure limitations."},json:{label:"JSON",description:"JSON file where each event is a structured object containing nested arrays of sources and filters."}}}}},timeline:{labels_title:"Testimonies",labels:["Testimony Group 00","Testimony Group 01","Testimony Group 02","Testimony Group 03","Other"],info:"Showing %n events that occurred between",default_categories_label:""},cardstack:{header:"selected events",timestamp:"Day and time",unknown_location:"Unknown location",estimated:"estimated",unknown_time:"Unknown time",location:"Localization",incident_type:"Type of action",description:"Summary",filters:"Filters",nofilters:"No known filters for this event.",sources:"Sources",unknown_source:"The information for this source could not be retrieved.",category:"Category",communication:"Communication",transmitter:"Transmitter",receiver:"Receiver",warning:"(!) Highly questioned"}}},Af=window.innerHeight<800,A$={anchor:[31.356397,34.784818],startZoom:11,minZoom:2,maxZoom:16,bounds:null,maxBounds:[[180,-180],[-180,180]]},L$={},I0={domain:{events:[],categories:[],associations:[],sources:{},sites:[],shapes:[],regions:[],notifications:[]},app:{debug:!0,errors:{source:!1},highlighted:null,selected:[],source:null,associations:{coloringSet:[],filters:[],narrative:null,categories:[],views:{events:!0,routes:!1,sites:!0}},shapes:[],language:"en-US",cluster:{radius:30,minZoom:2,maxZoom:16},timeline:{dimensions:{ticks:15,height:Af?170:250,width:0,marginLeft:20,marginTop:Af?5:10,marginBottom:60,contentHeight:Af?160:200,width_controls:100},range:{current:null},zoomLevels:Ue[ht].timeline.zoomLevels||[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}]},flags:{isFetchingDomain:!1,isFetchingSources:!1,isCover:!0,isCardstack:!0,isInfopopup:!1,isIntropopup:!1,isShowingSites:!0},cover:{title:"project title",description:`A description of the project goes here. +`)},_domwindow:function(){return P("domwindow")},_bigint:function(C){return P("bigint:"+C.toString())},_process:function(){return P("process")},_timer:function(){return P("timer")},_pipe:function(){return P("pipe")},_tcp:function(){return P("tcp")},_udp:function(){return P("udp")},_tty:function(){return P("tty")},_statwatcher:function(){return P("statwatcher")},_securecontext:function(){return P("securecontext")},_connection:function(){return P("connection")},_zlib:function(){return P("zlib")},_context:function(){return P("context")},_nodescript:function(){return P("nodescript")},_httpparser:function(){return P("httpparser")},_dataview:function(){return P("dataview")},_signal:function(){return P("signal")},_fsevent:function(){return P("fsevent")},_tlswrap:function(){return P("tlswrap")}}}function x(){return{buf:"",write:function(k){this.buf+=k},end:function(k){this.buf+=k},read:function(){return this.buf}}}i.writeToStream=function(k,A,E){return E===void 0&&(E=A,A={}),T(A=m(k,A),E).dispatch(k)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){(function(v){var p=typeof Uint8Array<"u"?Uint8Array:Array,b="+".charCodeAt(0),g="/".charCodeAt(0),m="0".charCodeAt(0),h="a".charCodeAt(0),T="A".charCodeAt(0),x="-".charCodeAt(0),k="_".charCodeAt(0);function A(E){return E=E.charCodeAt(0),E===b||E===x?62:E===g||E===k?63:E>16),U((65280&C)>>8),U(255&C);return N==2?U(255&(C=A(E.charAt(P))<<2|A(E.charAt(P+1))>>4)):N==1&&(U((C=A(E.charAt(P))<<10|A(E.charAt(P+1))<<4|A(E.charAt(P+2))>>2)>>8&255),U(255&C)),$},v.fromByteArray=function(E){var P,C,N,$,F=E.length%3,z="";function U(H){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(H)}for(P=0,N=E.length-F;P>18&63)+U($>>12&63)+U($>>6&63)+U(63&$);switch(F){case 1:z=(z+=U((C=E[E.length-1])>>2))+U(C<<4&63)+"==";break;case 2:z=(z=(z+=U((C=(E[E.length-2]<<8)+E[E.length-1])>>10))+U(C>>4&63))+U(C<<2&63)+"="}return z}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(s,a,b,d,y,_,c,f,w){var v=n("base64-js"),p=n("ieee754");function b(O,j,V){if(!(this instanceof b))return new b(O,j,V);var Z,Q,te,ve,se=typeof O;if(j==="base64"&&se=="string")for(O=(ve=O).trim?ve.trim():ve.replace(/^\s+|\s+$/g,"");O.length%4!=0;)O+="=";if(se=="number")Z=W(O);else if(se=="string")Z=b.byteLength(O,j);else{if(se!="object")throw new Error("First argument needs to be a number, array or string.");Z=W(O.length)}if(b._useTypedArrays?Q=b._augment(new Uint8Array(Z)):((Q=this).length=Z,Q._isBuffer=!0),b._useTypedArrays&&typeof O.byteLength=="number")Q._set(O);else if(Y(ve=O)||b.isBuffer(ve)||ve&&typeof ve=="object"&&typeof ve.length=="number")for(te=0;te>8,ve=ve%256,se.push(ve),se.push(te);return se}(j),O,V,Z)}function h(O,j,V){var Z="";V=Math.min(O.length,V);for(var Q=j;Q>>0)):(j+1>>0),Q}function k(O,j,V,Z){if(Z||(ne(typeof V=="boolean","missing or invalid endian"),ne(j!=null,"missing offset"),ne(j+1>>8*(Z?te:1-te)}function N(O,j,V,Z,Q){if(Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(V!=null,"missing offset"),ne(V+3>>8*(Z?te:3-te)&255}function $(O,j,V,Z,Q){Q||(ne(j!=null,"missing value"),ne(typeof Z=="boolean","missing or invalid endian"),ne(V!=null,"missing offset"),ne(V+1this.length&&(Z=this.length);var Q=(Z=O.length-j=this.length))return this[O]},b.prototype.readUInt16LE=function(O,j){return T(this,O,!0,j)},b.prototype.readUInt16BE=function(O,j){return T(this,O,!1,j)},b.prototype.readUInt32LE=function(O,j){return x(this,O,!0,j)},b.prototype.readUInt32BE=function(O,j){return x(this,O,!1,j)},b.prototype.readInt8=function(O,j){if(j||(ne(O!=null,"missing offset"),ne(O=this.length))return 128&this[O]?-1*(255-this[O]+1):this[O]},b.prototype.readInt16LE=function(O,j){return k(this,O,!0,j)},b.prototype.readInt16BE=function(O,j){return k(this,O,!1,j)},b.prototype.readInt32LE=function(O,j){return A(this,O,!0,j)},b.prototype.readInt32BE=function(O,j){return A(this,O,!1,j)},b.prototype.readFloatLE=function(O,j){return E(this,O,!0,j)},b.prototype.readFloatBE=function(O,j){return E(this,O,!1,j)},b.prototype.readDoubleLE=function(O,j){return P(this,O,!0,j)},b.prototype.readDoubleBE=function(O,j){return P(this,O,!1,j)},b.prototype.writeUInt8=function(O,j,V){V||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(this[j]=O)},b.prototype.writeUInt16LE=function(O,j,V){C(this,O,j,!0,V)},b.prototype.writeUInt16BE=function(O,j,V){C(this,O,j,!1,V)},b.prototype.writeUInt32LE=function(O,j,V){N(this,O,j,!0,V)},b.prototype.writeUInt32BE=function(O,j,V){N(this,O,j,!1,V)},b.prototype.writeInt8=function(O,j,V){V||(ne(O!=null,"missing value"),ne(j!=null,"missing offset"),ne(j=this.length||(0<=O?this.writeUInt8(O,j,V):this.writeUInt8(255+O+1,j,V))},b.prototype.writeInt16LE=function(O,j,V){$(this,O,j,!0,V)},b.prototype.writeInt16BE=function(O,j,V){$(this,O,j,!1,V)},b.prototype.writeInt32LE=function(O,j,V){F(this,O,j,!0,V)},b.prototype.writeInt32BE=function(O,j,V){F(this,O,j,!1,V)},b.prototype.writeFloatLE=function(O,j,V){z(this,O,j,!0,V)},b.prototype.writeFloatBE=function(O,j,V){z(this,O,j,!1,V)},b.prototype.writeDoubleLE=function(O,j,V){U(this,O,j,!0,V)},b.prototype.writeDoubleBE=function(O,j,V){U(this,O,j,!1,V)},b.prototype.fill=function(O,j,V){if(j=j||0,V=V||this.length,ne(typeof(O=typeof(O=O||0)=="string"?O.charCodeAt(0):O)=="number"&&!isNaN(O),"value is not a number"),ne(j<=V,"end < start"),V!==j&&this.length!==0){ne(0<=j&&j"},b.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(b._useTypedArrays)return new b(this).buffer;for(var O=new Uint8Array(this.length),j=0,V=O.length;j=j.length||Q>=O.length);Q++)j[Q+V]=O[Q];return Q}function fe(O){try{return decodeURIComponent(O)}catch{return String.fromCharCode(65533)}}function de(O,j){ne(typeof O=="number","cannot write a non-number as a number"),ne(0<=O,"specified a negative value for writing an unsigned value"),ne(O<=j,"value is larger than maximum value for type"),ne(Math.floor(O)===O,"value has a fractional component")}function ue(O,j,V){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(V<=O,"value smaller than minimum allowed value"),ne(Math.floor(O)===O,"value has a fractional component")}function be(O,j,V){ne(typeof O=="number","cannot write a non-number as a number"),ne(O<=j,"value larger than maximum allowed value"),ne(V<=O,"value smaller than minimum allowed value")}function ne(O,j){if(!O)throw new Error(j||"Failed assertion")}b._augment=function(O){return O._isBuffer=!0,O._get=O.get,O._set=O.set,O.get=H.get,O.set=H.set,O.write=H.write,O.toString=H.toString,O.toLocaleString=H.toString,O.toJSON=H.toJSON,O.copy=H.copy,O.slice=H.slice,O.readUInt8=H.readUInt8,O.readUInt16LE=H.readUInt16LE,O.readUInt16BE=H.readUInt16BE,O.readUInt32LE=H.readUInt32LE,O.readUInt32BE=H.readUInt32BE,O.readInt8=H.readInt8,O.readInt16LE=H.readInt16LE,O.readInt16BE=H.readInt16BE,O.readInt32LE=H.readInt32LE,O.readInt32BE=H.readInt32BE,O.readFloatLE=H.readFloatLE,O.readFloatBE=H.readFloatBE,O.readDoubleLE=H.readDoubleLE,O.readDoubleBE=H.readDoubleBE,O.writeUInt8=H.writeUInt8,O.writeUInt16LE=H.writeUInt16LE,O.writeUInt16BE=H.writeUInt16BE,O.writeUInt32LE=H.writeUInt32LE,O.writeUInt32BE=H.writeUInt32BE,O.writeInt8=H.writeInt8,O.writeInt16LE=H.writeInt16LE,O.writeInt16BE=H.writeInt16BE,O.writeInt32LE=H.writeInt32LE,O.writeInt32BE=H.writeInt32BE,O.writeFloatLE=H.writeFloatLE,O.writeFloatBE=H.writeFloatBE,O.writeDoubleLE=H.writeDoubleLE,O.writeDoubleBE=H.writeDoubleBE,O.fill=H.fill,O.inspect=H.inspect,O.toArrayBuffer=H.toArrayBuffer,O}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(s,a,v,d,y,_,c,f,w){var v=n("buffer").Buffer,p=4,b=new v(p);b.fill(0),r.exports={hash:function(g,m,h,T){for(var x=m(function(C,N){C.length%p!=0&&($=C.length+(p-C.length%p),C=v.concat([C,b],$));for(var $,F=[],z=N?C.readInt32BE:C.readInt32LE,U=0;Uh?B=H(B):B.length>5]|=128<>>9<<4)]=A;for(var E=1732584193,P=-271733879,C=-1732584194,N=271733878,$=0;$>>32-C,E)}function g(k,A,E,P,C,N,$){return b(A&E|~A&P,k,A,C,N,$)}function m(k,A,E,P,C,N,$){return b(A&P|E&~P,k,A,C,N,$)}function h(k,A,E,P,C,N,$){return b(A^E^P,k,A,C,N,$)}function T(k,A,E,P,C,N,$){return b(E^(A|~P),k,A,C,N,$)}function x(k,A){var E=(65535&k)+(65535&A);return(k>>16)+(A>>16)+(E>>16)<<16|65535&E}r.exports=function(k){return v.hash(k,p,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){r.exports=function(v){for(var p,b=new Array(v),g=0;g>>((3&g)<<3)&255;return b}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){var v=n("./helpers");function p(m,h){m[h>>5]|=128<<24-h%32,m[15+(h+64>>9<<4)]=h;for(var T,x,k,A=Array(80),E=1732584193,P=-271733879,C=-1732584194,N=271733878,$=-1009589776,F=0;F>16)+(h>>16)+(T>>16)<<16|65535&T}function g(m,h){return m<>>32-h}r.exports=function(m){return v.hash(m,p,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){function v(h,T){var x=(65535&h)+(65535&T);return(h>>16)+(T>>16)+(x>>16)<<16|65535&x}function p(h,T){var x,k=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),A=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);h[T>>5]|=128<<24-T%32,h[15+(T+64>>9<<4)]=T;for(var P,C,N=0;N>>T|h<<32-T},m=function(h,T){return h>>>T};r.exports=function(h){return b.hash(h,p,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(s,a,l,d,y,_,c,f,w){i.read=function(v,p,b,g,N){var h,T,x=8*N-g-1,k=(1<>1,E=-7,P=b?N-1:0,C=b?-1:1,N=v[p+P];for(P+=C,h=N&(1<<-E)-1,N>>=-E,E+=x;0>=-E,E+=g;0>1,P=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=g?0:$-1,N=g?1:-1,$=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(x=isNaN(p)?1:0,T=A):(T=Math.floor(Math.log(p)/Math.LN2),p*(g=Math.pow(2,-T))<1&&(T--,g*=2),2<=(p+=1<=T+E?P/g:P*Math.pow(2,1-E))*g&&(T++,g/=2),A<=T+E?(x=0,T=A):1<=T+E?(x=(p*g-1)*Math.pow(2,m),T+=E):(x=p*Math.pow(2,E-1)*Math.pow(2,m),T=0));8<=m;v[b+C]=255&x,C+=N,x/=256,m-=8);for(T=T<t?1:e>=t?0:NaN}function k2(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Xm(e){let t,n,r;e.length!==2?(t=zl,n=(l,d)=>zl(e(l),d),r=(l,d)=>e(l)-d):(t=e===zl||e===k2?e:C2,n=e,r=e);function i(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<0?y=c+1:_=c}while(y<_)}return y}function s(l,d,y=0,_=l.length){if(y<_){if(t(d,d)!==0)return _;do{const c=y+_>>>1;n(l[c],d)<=0?y=c+1:_=c}while(y<_)}return y}function a(l,d,y=0,_=l.length){const c=i(l,d,y,_-1);return c>y&&r(l[c-1],d)>-r(l[c],d)?c-1:c}return{left:i,center:a,right:s}}function C2(){return 0}function A2(e){return e===null?NaN:+e}const P2=Xm(zl),L2=P2.right;Xm(A2).center;const R2=L2;var I2=Math.sqrt(50),N2=Math.sqrt(10),O2=Math.sqrt(2);function W_(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),s=r/i;return s>=I2?i*=10:s>=N2?i*=5:s>=O2&&(i*=2),t+e(t)}function j2(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function z2(){return!this.__axis}function B2(e,t){var n=[],r=null,i=null,s=6,a=6,l=3,d=typeof window<"u"&&window.devicePixelRatio>1?0:.5,y=e===yf||e===wl?-1:1,_=e===wl||e===_f?"x":"y",c=e===yf||e===Ep?D2:$2;function f(w){var v=r??(t.ticks?t.ticks.apply(t,n):t.domain()),p=i??(t.tickFormat?t.tickFormat.apply(t,n):M2),b=Math.max(s,0)+l,g=t.range(),m=+g[0]+d,h=+g[g.length-1]+d,T=(t.bandwidth?j2:F2)(t.copy(),d),x=w.selection?w.selection():w,k=x.selectAll(".domain").data([null]),A=x.selectAll(".tick").data(v,t).order(),E=A.exit(),P=A.enter().append("g").attr("class","tick"),C=A.select("line"),N=A.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(P),C=C.merge(P.append("line").attr("stroke","currentColor").attr(_+"2",y*s)),N=N.merge(P.append("text").attr("fill","currentColor").attr(_,y*b).attr("dy",e===yf?"0em":e===Ep?"0.71em":"0.32em")),w!==x&&(k=k.transition(w),A=A.transition(w),C=C.transition(w),N=N.transition(w),E=E.transition(w).attr("opacity",V_).attr("transform",function($){return isFinite($=T($))?c($+d):this.getAttribute("transform")}),P.attr("opacity",V_).attr("transform",function($){var F=this.parentNode.__axis;return c((F&&isFinite(F=F($))?F:T($))+d)})),E.remove(),k.attr("d",e===wl||e===_f?a?"M"+y*a+","+m+"H"+d+"V"+h+"H"+y*a:"M"+d+","+m+"V"+h:a?"M"+m+","+y*a+"V"+d+"H"+h+"V"+y*a:"M"+m+","+d+"H"+h),A.attr("opacity",1).attr("transform",function($){return c(T($)+d)}),C.attr(_+"2",y*s),N.attr(_,y*b).text(p),x.filter(z2).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===_f?"start":e===wl?"end":"middle"),x.each(function(){this.__axis=T})}return f.scale=function(w){return arguments.length?(t=w,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(w){return arguments.length?(n=w==null?[]:Array.from(w),f):n.slice()},f.tickValues=function(w){return arguments.length?(r=w==null?null:Array.from(w),f):r&&r.slice()},f.tickFormat=function(w){return arguments.length?(i=w,f):i},f.tickSize=function(w){return arguments.length?(s=a=+w,f):s},f.tickSizeInner=function(w){return arguments.length?(s=+w,f):s},f.tickSizeOuter=function(w){return arguments.length?(a=+w,f):a},f.tickPadding=function(w){return arguments.length?(l=+w,f):l},f.offset=function(w){return arguments.length?(d=+w,f):d},f}function q_(e){return B2(Ep,e)}var U2={value:()=>{}};function Qm(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Bl.prototype=Qm.prototype={constructor:Bl,on:function(e,t){var n=this._,r=H2(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),r=0,i,s;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),G_.hasOwnProperty(t)?{space:G_[t],local:e}:e}function V2(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===xp&&t.documentElement.namespaceURI===xp?t.createElement(e):t.createElementNS(n,e)}}function q2(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function eS(e){var t=Gc(e);return(t.local?q2:V2)(t)}function Z2(){}function Jm(e){return e==null?Z2:function(){return this.querySelector(e)}}function G2(e){typeof e!="function"&&(e=Jm(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=h&&(h=m+1);!(x=b[h])&&++h=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function _R(e){e||(e=wR);function t(c,f){return c&&f?e(c.__data__,f.__data__):!c-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;st?1:e>=t?0:NaN}function bR(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function TR(){return Array.from(this)}function SR(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?OR:typeof t=="function"?DR:MR)(e,t,n??"")):Wo(this.node(),e)}function Wo(e,t){return e.style.getPropertyValue(t)||oS(e).getComputedStyle(e,null).getPropertyValue(t)}function FR(e){return function(){delete this[e]}}function jR(e,t){return function(){this[e]=t}}function zR(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function BR(e,t){return arguments.length>1?this.each((t==null?FR:typeof t=="function"?zR:jR)(e,t)):this.node()[e]}function sS(e){return e.trim().split(/^|\s+/)}function eg(e){return e.classList||new aS(e)}function aS(e){this._node=e,this._names=sS(e.getAttribute("class")||"")}aS.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lS(e,t){for(var n=eg(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function mI(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n()=>e;function kp(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:a,y:l,dx:d,dy:y,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:_}})}kp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function CI(e){return!e.ctrlKey&&!e.button}function AI(){return this.parentNode}function PI(e,t){return t??{x:e.x,y:e.y}}function LI(){return navigator.maxTouchPoints||"ontouchstart"in this}function RI(){var e=CI,t=AI,n=PI,r=LI,i={},s=Qm("start","drag","end"),a=0,l,d,y,_,c=0;function f(T){T.on("mousedown.drag",w).filter(r).on("touchstart.drag",b).on("touchmove.drag",g,EI).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(T,x){if(!(_||!e.call(this,T,x))){var k=h(this,t.call(this,T,x),T,x,"mouse");k&&(Ui(T.view).on("mousemove.drag",v,ya).on("mouseup.drag",p,ya),xI(T.view),wf(T),y=!1,l=T.clientX,d=T.clientY,k("start",T))}}function v(T){if(Ro(T),!y){var x=T.clientX-l,k=T.clientY-d;y=x*x+k*k>c}i.mouse("drag",T)}function p(T){Ui(T.view).on("mousemove.drag mouseup.drag",null),kI(T.view,y),Ro(T),i.mouse("end",T)}function b(T,x){if(e.call(this,T,x)){var k=T.changedTouches,A=t.call(this,T,x),E=k.length,P,C;for(P=0;P>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=NI.exec(e))?new on(t[1],t[2],t[3],1):(t=OI.exec(e))?new on(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=MI.exec(e))?Tl(t[1],t[2],t[3],t[4]):(t=DI.exec(e))?Tl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$I.exec(e))?n0(t[1],t[2]/100,t[3]/100,1):(t=FI.exec(e))?n0(t[1],t[2]/100,t[3]/100,t[4]):K_.hasOwnProperty(e)?J_(K_[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function J_(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Tl(e,t,n,r){return r<=0&&(e=t=n=NaN),new on(e,t,n,r)}function BI(e){return e instanceof Pa||(e=Hi(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function Cp(e,t,n,r){return arguments.length===1?BI(e):new on(e,t,n,r??1)}function on(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}tg(on,Cp,fS(Pa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_a:Math.pow(_a,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new on(Di(this.r),Di(this.g),Di(this.b),Eu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:e0,formatHex:e0,formatHex8:UI,formatRgb:t0,toString:t0}));function e0(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function UI(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function t0(){const e=Eu(this.opacity);return`${e===1?"rgb(":"rgba("}${Di(this.r)}, ${Di(this.g)}, ${Di(this.b)}${e===1?")":`, ${e})`}`}function Eu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Di(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Di(e),(e<16?"0":"")+e.toString(16)}function n0(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hn(e,t,n,r)}function hS(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);if(e instanceof Pa||(e=Hi(e)),!e)return new Hn;if(e instanceof Hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,l=s-i,d=(s+i)/2;return l?(t===s?a=(n-r)/l+(n0&&d<1?0:a,new Hn(a,l,d,e.opacity)}function HI(e,t,n,r){return arguments.length===1?hS(e):new Hn(e,t,n,r??1)}function Hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}tg(Hn,HI,fS(Pa,{brighter(e){return e=e==null?Su:Math.pow(Su,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_a:Math.pow(_a,e),new Hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new on(bf(e>=240?e-240:e+120,i,r),bf(e,i,r),bf(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Hn(r0(this.h),Sl(this.s),Sl(this.l),Eu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Eu(this.opacity);return`${e===1?"hsl(":"hsla("}${r0(this.h)}, ${Sl(this.s)*100}%, ${Sl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function r0(e){return e=(e||0)%360,e<0?e+360:e}function Sl(e){return Math.max(0,Math.min(1,e||0))}function bf(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ng=e=>()=>e;function WI(e,t){return function(n){return e+n*t}}function VI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qI(e){return(e=+e)==1?pS:function(t,n){return n-t?VI(t,n,e):ng(isNaN(t)?n:t)}}function pS(e,t){var n=t-e;return n?WI(e,n):ng(isNaN(e)?t:e)}const xu=function e(t){var n=qI(t);function r(i,s){var a=n((i=Cp(i)).r,(s=Cp(s)).r),l=n(i.g,s.g),d=n(i.b,s.b),y=pS(i.opacity,s.opacity);return function(_){return i.r=a(_),i.g=l(_),i.b=d(_),i.opacity=y(_),i+""}}return r.gamma=e,r}(1);function ZI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(r=r[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,d.push({i:a,x:Un(r,i)})),n=Tf.lastIndex;return n180?_+=360:_-y>180&&(y+=360),f.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Un(y,_)})):_&&c.push(i(c)+"rotate("+_+r)}function l(y,_,c,f){y!==_?f.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Un(y,_)}):_&&c.push(i(c)+"skewX("+_+r)}function d(y,_,c,f,w,v){if(y!==c||_!==f){var p=w.push(i(w)+"scale(",null,",",null,")");v.push({i:p-4,x:Un(y,c)},{i:p-2,x:Un(_,f)})}else(c!==1||f!==1)&&w.push(i(w)+"scale("+c+","+f+")")}return function(y,_){var c=[],f=[];return y=e(y),_=e(_),s(y.translateX,y.translateY,_.translateX,_.translateY,c,f),a(y.rotate,_.rotate,c,f),l(y.skewX,_.skewX,c,f),d(y.scaleX,y.scaleY,_.scaleX,_.scaleY,c,f),y=_=null,function(w){for(var v=-1,p=f.length,b;++v=0&&e._call.call(void 0,t),e=e._next;--Vo}function o0(){Wi=(Cu=ba.now())+Yc,Vo=$s=0;try{sN()}finally{Vo=0,lN(),Wi=0}}function aN(){var e=ba.now(),t=e-Cu;t>yS&&(Yc-=t,Cu=e)}function lN(){for(var e,t=ku,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ku=n);Fs=e,Lp(r)}function Lp(e){if(!Vo){$s&&($s=clearTimeout($s));var t=e-Wi;t>24?(e<1/0&&($s=setTimeout(o0,e-ba.now()-Yc)),ks&&(ks=clearInterval(ks))):(ks||(Cu=ba.now(),ks=setInterval(aN,yS)),Vo=1,_S(o0))}}function s0(e,t,n){var r=new Au;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var uN=Qm("start","end","cancel","interrupt"),cN=[],bS=0,a0=1,Rp=2,Ul=3,l0=4,Ip=5,Hl=6;function Kc(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;dN(e,n,{name:t,index:r,group:i,on:uN,tween:cN,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:bS})}function og(e,t){var n=Kn(e,t);if(n.state>bS)throw new Error("too late; already scheduled");return n}function dr(e,t){var n=Kn(e,t);if(n.state>Ul)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function dN(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=wS(s,0,n.time);function s(y){n.state=a0,n.timer.restart(a,n.delay,n.time),n.delay<=y&&a(y-n.delay)}function a(y){var _,c,f,w;if(n.state!==a0)return d();for(_ in r)if(w=r[_],w.name===n.name){if(w.state===Ul)return s0(a);w.state===l0?(w.state=Hl,w.timer.stop(),w.on.call("interrupt",e,e.__data__,w.index,w.group),delete r[_]):+_Rp&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function UN(e,t,n){var r,i,s=BN(t)?og:dr;return function(){var a=s(this,e),l=a.on;l!==r&&(i=(r=l).copy()).on(t,n),a.on=i}}function HN(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(UN(n,e,t))}function WN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function VN(){return this.on("end.remove",WN(this._id))}function qN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Jm(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;at&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function bO(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i2?TO:bO,d=y=null,c}function c(f){return f==null||isNaN(f=+f)?s:(d||(d=l(e.map(r),t,n)))(r(a(f)))}return c.invert=function(f){return a(i((y||(y=l(t,e.map(r),Un)))(f)))},c.domain=function(f){return arguments.length?(e=Array.from(f,_O),_()):e.slice()},c.range=function(f){return arguments.length?(t=Array.from(f),_()):t.slice()},c.rangeRound=function(f){return t=Array.from(f),n=eN,_()},c.clamp=function(f){return arguments.length?(a=f?!0:To,_()):a!==To},c.interpolate=function(f){return arguments.length?(n=f,_()):n},c.unknown=function(f){return arguments.length?(s=f,c):s},function(f,w){return r=f,i=w,_()}}function xO(){return EO()(To,To)}function kO(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),l=i.ceil(s);return s-a(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,l)=>{const d=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s0))return d;let y;do d.push(y=new Date(+s)),t(s,l),e(s);while(yAt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,l)=>{if(a>=a)if(l<0)for(;++l<=0;)for(;t(a,-1),!s(a););else for(;--l>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(Sf.setTime(+s),Ef.setTime(+a),e(Sf),e(Ef),Math.floor(n(Sf,Ef))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Pu=At(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?At(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Pu);Pu.range;const xr=1e3,An=xr*60,kr=An*60,Or=kr*24,ag=Or*7,c0=Or*30,xf=Or*365,Jr=At(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*xr)},(e,t)=>(t-e)/xr,e=>e.getUTCSeconds());Jr.range;const Wt=At(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xr)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getMinutes());Wt.range;const xS=At(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getUTCMinutes());xS.range;const lg=At(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*xr-e.getMinutes()*An)},(e,t)=>{e.setTime(+e+t*kr)},(e,t)=>(t-e)/kr,e=>e.getHours());lg.range;const kS=At(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*kr)},(e,t)=>(t-e)/kr,e=>e.getUTCHours());kS.range;const La=At(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*An)/Or,e=>e.getDate()-1);La.range;const ug=At(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Or,e=>e.getUTCDate()-1);ug.range;const CS=At(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Or,e=>Math.floor(e/Or));CS.range;function Yi(e){return At(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*An)/ag)}const Xc=Yi(0),Lu=Yi(1),CO=Yi(2),AO=Yi(3),qo=Yi(4),PO=Yi(5),LO=Yi(6);Xc.range;Lu.range;CO.range;AO.range;qo.range;PO.range;LO.range;function Ki(e){return At(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ag)}const cg=Ki(0),Ru=Ki(1),RO=Ki(2),IO=Ki(3),Zo=Ki(4),NO=Ki(5),OO=Ki(6);cg.range;Ru.range;RO.range;IO.range;Zo.range;NO.range;OO.range;const dg=At(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());dg.range;const AS=At(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());AS.range;const Mr=At(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Mr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:At(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Mr.range;const ci=At(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ci.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:At(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ci.range;function PS(e,t,n,r,i,s){const a=[[Jr,1,xr],[Jr,5,5*xr],[Jr,15,15*xr],[Jr,30,30*xr],[s,1,An],[s,5,5*An],[s,15,15*An],[s,30,30*An],[i,1,kr],[i,3,3*kr],[i,6,6*kr],[i,12,12*kr],[r,1,Or],[r,2,2*Or],[n,1,ag],[t,1,c0],[t,3,3*c0],[e,1,xf]];function l(y,_,c){const f=_b).right(a,f);if(w===a.length)return e.every(W_(y/xf,_/xf,c));if(w===0)return Pu.every(Math.max(W_(y,_,c),1));const[v,p]=a[f/a[w-1][2]53)return null;"w"in Z||(Z.w=1),"Z"in Z?(te=Cf(Cs(Z.y,0,1)),ve=te.getUTCDay(),te=ve>4||ve===0?Ru.ceil(te):Ru(te),te=ug.offset(te,(Z.V-1)*7),Z.y=te.getUTCFullYear(),Z.m=te.getUTCMonth(),Z.d=te.getUTCDate()+(Z.w+6)%7):(te=kf(Cs(Z.y,0,1)),ve=te.getDay(),te=ve>4||ve===0?Lu.ceil(te):Lu(te),te=La.offset(te,(Z.V-1)*7),Z.y=te.getFullYear(),Z.m=te.getMonth(),Z.d=te.getDate()+(Z.w+6)%7)}else("W"in Z||"U"in Z)&&("w"in Z||(Z.w="u"in Z?Z.u%7:"W"in Z?1:0),ve="Z"in Z?Cf(Cs(Z.y,0,1)).getUTCDay():kf(Cs(Z.y,0,1)).getDay(),Z.m=0,Z.d="W"in Z?(Z.w+6)%7+Z.W*7-(ve+5)%7:Z.w+Z.U*7-(ve+6)%7);return"Z"in Z?(Z.H+=Z.Z/100|0,Z.M+=Z.Z%100,Cf(Z)):kf(Z)}}function E(O,j,V,Z){for(var Q=0,te=j.length,ve=V.length,se,$e;Q=ve)return-1;if(se=j.charCodeAt(Q++),se===37){if(se=j.charAt(Q++),$e=x[se in d0?j.charAt(Q++):se],!$e||(Z=$e(O,V,Z))<0)return-1}else if(se!=V.charCodeAt(Z++))return-1}return Z}function P(O,j,V){var Z=y.exec(j.slice(V));return Z?(O.p=_.get(Z[0].toLowerCase()),V+Z[0].length):-1}function C(O,j,V){var Z=w.exec(j.slice(V));return Z?(O.w=v.get(Z[0].toLowerCase()),V+Z[0].length):-1}function N(O,j,V){var Z=c.exec(j.slice(V));return Z?(O.w=f.get(Z[0].toLowerCase()),V+Z[0].length):-1}function $(O,j,V){var Z=g.exec(j.slice(V));return Z?(O.m=m.get(Z[0].toLowerCase()),V+Z[0].length):-1}function F(O,j,V){var Z=p.exec(j.slice(V));return Z?(O.m=b.get(Z[0].toLowerCase()),V+Z[0].length):-1}function z(O,j,V){return E(O,t,j,V)}function U(O,j,V){return E(O,n,j,V)}function H(O,j,V){return E(O,r,j,V)}function B(O){return a[O.getDay()]}function W(O){return s[O.getDay()]}function Y(O){return d[O.getMonth()]}function G(O){return l[O.getMonth()]}function J(O){return i[+(O.getHours()>=12)]}function oe(O){return 1+~~(O.getMonth()/3)}function ce(O){return a[O.getUTCDay()]}function fe(O){return s[O.getUTCDay()]}function de(O){return d[O.getUTCMonth()]}function ue(O){return l[O.getUTCMonth()]}function be(O){return i[+(O.getUTCHours()>=12)]}function ne(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var j=k(O+="",h);return j.toString=function(){return O},j},parse:function(O){var j=A(O+="",!1);return j.toString=function(){return O},j},utcFormat:function(O){var j=k(O+="",T);return j.toString=function(){return O},j},utcParse:function(O){var j=A(O+="",!0);return j.toString=function(){return O},j}}}var d0={"-":"",_:" ",0:"0"},Mt=/^\s*\d+/,FO=/^%/,jO=/[\\^$*+?|[\]().{}]/g;function je(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s[t.toLowerCase(),n]))}function BO(e,t,n){var r=Mt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UO(e,t,n){var r=Mt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function HO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function VO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function f0(e,t,n){var r=Mt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function h0(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qO(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ZO(e,t,n){var r=Mt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function GO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function p0(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function YO(e,t,n){var r=Mt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function m0(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function KO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function XO(e,t,n){var r=Mt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function QO(e,t,n){var r=Mt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function JO(e,t,n){var r=Mt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function eM(e,t,n){var r=FO.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tM(e,t,n){var r=Mt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nM(e,t,n){var r=Mt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function g0(e,t){return je(e.getDate(),t,2)}function rM(e,t){return je(e.getHours(),t,2)}function iM(e,t){return je(e.getHours()%12||12,t,2)}function oM(e,t){return je(1+La.count(Mr(e),e),t,3)}function LS(e,t){return je(e.getMilliseconds(),t,3)}function sM(e,t){return LS(e,t)+"000"}function aM(e,t){return je(e.getMonth()+1,t,2)}function lM(e,t){return je(e.getMinutes(),t,2)}function uM(e,t){return je(e.getSeconds(),t,2)}function cM(e){var t=e.getDay();return t===0?7:t}function dM(e,t){return je(Xc.count(Mr(e)-1,e),t,2)}function RS(e){var t=e.getDay();return t>=4||t===0?qo(e):qo.ceil(e)}function fM(e,t){return e=RS(e),je(qo.count(Mr(e),e)+(Mr(e).getDay()===4),t,2)}function hM(e){return e.getDay()}function pM(e,t){return je(Lu.count(Mr(e)-1,e),t,2)}function mM(e,t){return je(e.getFullYear()%100,t,2)}function gM(e,t){return e=RS(e),je(e.getFullYear()%100,t,2)}function vM(e,t){return je(e.getFullYear()%1e4,t,4)}function yM(e,t){var n=e.getDay();return e=n>=4||n===0?qo(e):qo.ceil(e),je(e.getFullYear()%1e4,t,4)}function _M(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+je(t/60|0,"0",2)+je(t%60,"0",2)}function v0(e,t){return je(e.getUTCDate(),t,2)}function wM(e,t){return je(e.getUTCHours(),t,2)}function bM(e,t){return je(e.getUTCHours()%12||12,t,2)}function TM(e,t){return je(1+ug.count(ci(e),e),t,3)}function IS(e,t){return je(e.getUTCMilliseconds(),t,3)}function SM(e,t){return IS(e,t)+"000"}function EM(e,t){return je(e.getUTCMonth()+1,t,2)}function xM(e,t){return je(e.getUTCMinutes(),t,2)}function kM(e,t){return je(e.getUTCSeconds(),t,2)}function CM(e){var t=e.getUTCDay();return t===0?7:t}function AM(e,t){return je(cg.count(ci(e)-1,e),t,2)}function NS(e){var t=e.getUTCDay();return t>=4||t===0?Zo(e):Zo.ceil(e)}function PM(e,t){return e=NS(e),je(Zo.count(ci(e),e)+(ci(e).getUTCDay()===4),t,2)}function LM(e){return e.getUTCDay()}function RM(e,t){return je(Ru.count(ci(e)-1,e),t,2)}function IM(e,t){return je(e.getUTCFullYear()%100,t,2)}function NM(e,t){return e=NS(e),je(e.getUTCFullYear()%100,t,2)}function OM(e,t){return je(e.getUTCFullYear()%1e4,t,4)}function MM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Zo(e):Zo.ceil(e),je(e.getUTCFullYear()%1e4,t,4)}function DM(){return"+0000"}function y0(){return"%"}function _0(e){return+e}function w0(e){return Math.floor(+e/1e3)}var lo,Iu;OS({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function OS(e){return lo=$O(e),Iu=lo.format,lo.parse,lo.utcFormat,lo.utcParse,lo}function $M(e){return new Date(e)}function FM(e){return e instanceof Date?+e:+new Date(+e)}function MS(e,t,n,r,i,s,a,l,d,y){var _=xO(),c=_.invert,f=_.domain,w=y(".%L"),v=y(":%S"),p=y("%I:%M"),b=y("%I %p"),g=y("%a %d"),m=y("%b %d"),h=y("%B"),T=y("%Y");function x(k){return(d(k)(n[e[i]]=r,n),{})}function JM(e){return typeof e<"u"&&e!==null}function S0(e){return e.charAt(0).toUpperCase()+e.slice(1)}function eD(e,t){return e.length>t?e.substring(0,120)+"...":e}function FS(e){function t(i={},[s,...a],l){const d=Object.keys(i).find(_=>$S(_)===s);l.push(s);const y=l.join("/");return d||(i[y]={}),a.length>0&&t(i[y],a,l),i}const n=[];return e.forEach(i=>n.push(i.filter_paths)),n.reduce((i,s)=>t(i,s,[]),{})}function hg(e){const t=e.split("/"),n=[];return t.forEach((r,i)=>{const s=t.slice(0,i+1).join("/");n.push(s)}),n.pop(),n}function tD(e){const t=hg(e);return t[t.length-1]}function nD(e,t,n){function r(l,d){if(d.length===0||l==={})return{};const y=d.shift();if(Object.keys(l).includes(y)){const _=l[y];return d.length===0?_:r(_,d)}}const i=FS(e),s=hg(n),a=r(i,s);return Object.keys(a).filter(l=>l!==n)}function rD(e,t){const n=e.flatMap(i=>i),r=t.filter(i=>n.indexOf(i)===-1);return[...e,r]}function iD(e,t){return e.map(r=>r.filter(i=>!t.includes(i))).filter(r=>r.length!==0)}function jS(e,t){return e.associations.filter(r=>r.mode===Yn.CATEGORY).reduce((r,i)=>{const s=t.find(a=>a===i.title);return s&&r.push(s),r},[])}function Qc(e){return e.filter_paths.join("/")}function pg(e){return t=>{let n;return t.sources?n=t.sources.map(r=>e.hasOwnProperty(r)?e[r]:null):n=[],{...t,sources:n}}}const E0=It.SERVER_ROOT;function Jo(e){return It[e]?Array.isArray(It[e])?It[e].map(t=>`${E0}${t}`):[`${E0}${It[e]}`]:null}function Xi(e){return t=>({...t,flags:{...t.flags,[e]:!t.flags[e]}})}function zS(e){let t;switch(e=e.trim(),!0){case/\.((png)|(jpg)|(jpeg))$/.test(e):t="Image";break;case/\.(mp4)$/.test(e):t="Video";break;case/\.(md)$/.test(e):t="Text";break;case/\.(pdf)$/.test(e):t="Document";break;case/.+(twitter\.com).+/.test(e):t="Tweet";break;case/.+(t\.me).+/.test(e):t="Telegram";break;default:t="Unknown";break}return t}function oD(e,t){return{type:zS(e),path:e,poster:t}}function Af(e,t){return Gt(e)===Gt(t)}function mg(e){return(e>=1?.9:0)+Math.min(.5,.08*(e-1))}function sD(e,t){return Math.min(.85,.08+e/t*50)}function BS(e,t){const n=t>60?60:35;return Math.min(n,10+e/t*100)}function US(e){return e.reduce((t,n)=>(n&&n.properties&&n.properties.cluster&&(t+=n.properties.point_count),t),0)}function Ra(e){return!!e&&isFinite(e)&&Math.abs(e)<=90}function Ia(e){return!!e&&isFinite(e)&&Math.abs(e)<=180}function x0(e,t){return e.reduce((n,r)=>{const i=t.find(s=>s.label===r.properties.id);return i&&n.push(i),n},[])}function gg(e,t){if(t.length===0)return[1];const n={};for(const[s,a]of t.entries())for(const l of a)n[l]=s;const r=new Array(t.length);r.fill(0);let i=0;return e.forEach(s=>{let a="events"in s?s.events:s;Array.isArray(a)||(a=[a]),a.forEach(l=>{l.associations.forEach(d=>{const y=n[Qc(d)];!y&&y!==0||(r[y]+=1,i+=1)})})}),i===0?[1]:r.map(s=>s/i)}function HS(e,t){let n=-1;return t.map((r,i)=>(r.indexOf(e)!==-1&&(n=i),null)),n}const aD=function(){return Array.prototype.slice.call(arguments).reduce(function(e,t){return et?e:t})};function uD(e,t,n){let r=0,i=e.length-1;for(;r<=i;){const s=i+r>>1,a=n(t,e[s]);if(a>0)r=s+1;else if(a<0)i=s-1;else return s}return-r-1}function Op(e){if(e===null)return null;const t=new Intl.DateTimeFormat(ht,{year:"numeric",month:"long",day:"2-digit"}),[{value:n},,{value:r},,{value:i}]=t.formatToParts(e);return`${r} ${n}, ${i}`}function cD(){const e={"es-MX":GM};ht!=="es-US"&&e[ht]&&OS(e[ht])}function dD(e,t){return e.map(r=>{const{colour:i,shape:s,id:a}=r,l={checkboxStyles:{background:t.includes(a)?i:"black",border:"none",clipPath:b0[s]},containerStyles:{background:i,clipPath:b0[s]}};return r.styles=l,r})}function fD(e,t){const n=e.reduce((i,s)=>{const a=s.filter_paths[0];return a in i||(i[a]=[]),i[a].push(s),i},{});return t.length>1?n:{default:e}}function hD(e,t){let n=t;return(e.length>1?e.filter(i=>i!=="default"):e).reduce((i,s)=>(i[s]=n,n+=1,i),{})}function pD(e,t,n){return e&&!t?1:!e&&t?n:e&&t?n+1:0}function k0(e,t){let n=document.createElement("a");n.setAttribute("href",`data:application/octet-stream;charset=utf-8,${encodeURIComponent(t)}`),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}const C0=e=>e.length===0;function mD(e){return e==null||typeof e=="object"&&!Object.keys(e).length}const gD=Jo("EVENTS_EXT"),A0=Jo("ASSOCIATIONS_EXT"),Nu=Jo("SOURCES_EXT"),vD=Jo("SITES_EXT"),yD=Jo("REGIONS_EXT"),_D=Jo("SHAPES_EXT"),Rs=e=>`Something went wrong fetching ${e}. Check the URL or try disabling them in the config file.`;function wD(){const e=[];function t(n){return e.push({message:n,type:"error"}),[]}return(n,r)=>{const i=r().features;n(Wl());const s=Promise.all(gD.map(c=>fetch(c).then(f=>f.json()).catch(()=>t("events")))).then(c=>c.flatMap(f=>f));let a=Promise.resolve([]);i.USE_ASSOCIATIONS&&(A0?a=fetch(A0).then(c=>c.json()).catch(()=>t(Rs("associations"))):a=Promise.resolve(t("USE_ASSOCIATIONS is true, but you have not provided a ASSOCIATIONS_EXT")));let l=Promise.resolve([]);i.USE_SOURCES&&(Nu?l=fetch(Nu).then(c=>c.json()).catch(()=>t(Rs("sources"))):l=Promise.resolve(t("USE_SOURCES is true, but you have not provided a SOURCES_EXT")));let d=Promise.resolve([]);i.USE_SITES&&(d=fetch(vD).then(c=>c.json()).catch(()=>t(Rs("sites"))));let y=Promise.resolve([]);i.USE_REGIONS&&(y=fetch(yD).then(c=>c.json()).catch(()=>t(Rs("regions"))));let _=Promise.resolve([]);return i.USE_SHAPES&&(_=fetch(_D).then(c=>c.json()).catch(()=>t(Rs("shapes")))),Promise.all([s,a,l,d,y,_]).then(c=>{const f={events:c[0],associations:c[1],sources:c[2],sites:c[3],regions:c[4],shapes:c[5],notifications:e};if(Object.values(f).some(w=>w.hasOwnProperty("error")))throw new Error("Some URLs returned negative. If you are in development, check the server is running");return n(Wl()),n(GS(f.associations)),n(YS(f.shapes)),f}).catch(c=>{n(WS(c.message)),n(Wl()),alert(c.message)})}}const vg="FETCH_ERROR";function WS(e){return{type:vg,message:e}}const yg="UPDATE_DOMAIN";function bD(e){return{type:yg,payload:e}}function TD(e){return t=>{Nu?(t(Mp()),fetch(`${Nu}`).then(n=>{if(n.ok)return n.json();throw new Error("No sources are available at the URL specified in the config specified.")}).catch(n=>{t(Dp(n.message)),t(Mp())})):t(Dp("No source extension specified."))}}const _g="UPDATE_HIGHLIGHTED";function SD(e){return{type:_g,highlighted:e}}const Jc="UPDATE_SELECTED";function ED(e){return{type:Jc,selected:e}}const VS="UPDATE_DISTRICT";function xD(e){return{type:VS,district:e}}const wg="CLEAR_FILTER";function kD(e){return{type:wg,filter:e}}const ed="TOGGLE_ASSOCIATIONS";function CD(e,t,n){return{type:ed,association:e,value:t,shouldColor:n}}const bg="TOGGLE_SHAPES";function AD(e){return{type:bg,shape:e}}const Tg="SET_LOADING";function qS(){return{type:Tg}}const Sg="SET_NOT_LOADING";function ZS(){return{type:Sg}}const Eg="SET_INITIAL_CATEGORIES";function GS(e){return{type:Eg,values:e}}const xg="SET_INITIAL_SHAPES";function YS(e){return{type:xg,values:e}}const td="UPDATE_TIMERANGE";function PD(e){return{type:td,timerange:e}}const kg="UPDATE_DIMENSIONS";function LD(e){return{type:kg,dims:e}}const Cg="UPDATE_NARRATIVE";function RD(e){return{type:Cg,narrative:e}}const Ag="UPDATE_NARRATIVE_STEP_IDX";function ID(e){return{type:Ag,idx:e}}const Pg="UPDATE_SOURCE";function ND(e){return{type:Pg,source:e}}const nd="UPDATE_COLORING_SET";function OD(e){return{type:nd,coloringSet:e}}const Lg="UPDATE_TICKS";function KS(e){return{type:Lg,ticks:e}}const Rg="TOGGLE_SITES";function MD(){return{type:Rg}}const Ig="TOGGLE_FETCHING_DOMAIN";function Wl(){return{type:Ig}}const Ng="TOGGLE_FETCHING_SOURCES";function Mp(){return{type:Ng}}const Og="TOGGLE_LANGUAGE";function DD(e){return{type:Og,language:e}}const XS="CLOSE_TOOLBAR";function $D(){return{type:XS}}const Mg="TOGGLE_INFOPOPUP";function FD(){return{type:Mg}}const Dg="TOGGLE_INTROPOPUP";function jD(){return{type:Dg}}const $g="TOGGLE_NOTIFICATIONS";function zD(){return{type:$g}}const Fg="MARK_NOTIFICATIONS_READ";function BD(){return{type:Fg}}const jg="TOGGLE_COVER";function UD(){return{type:jg}}const zg="TOGGLE_TILE_OVERLAY";function HD(){return{type:zg}}const Bg="UPDATE_SEARCH_QUERY";function WD(e){return{type:Bg,searchQuery:e}}const Ug="FETCH_SOURCE_ERROR";function Dp(e){return{type:Ug,msg:e}}const QS="TOGGLE_SATELLITE_VIEW";function VD(){return{type:QS}}const Hg="REHYDRATE_STATE";function qD(){return{type:Hg}}const rd=Object.freeze(Object.defineProperty({__proto__:null,CLEAR_FILTER:wg,CLOSE_TOOLBAR:XS,FETCH_ERROR:vg,FETCH_SOURCE_ERROR:Ug,MARK_NOTIFICATIONS_READ:Fg,REHYDRATE_STATE:Hg,SET_INITIAL_CATEGORIES:Eg,SET_INITIAL_SHAPES:xg,SET_LOADING:Tg,SET_NOT_LOADING:Sg,TOGGLE_ASSOCIATIONS:ed,TOGGLE_COVER:jg,TOGGLE_FETCHING_DOMAIN:Ig,TOGGLE_FETCHING_SOURCES:Ng,TOGGLE_INFOPOPUP:Mg,TOGGLE_INTROPOPUP:Dg,TOGGLE_LANGUAGE:Og,TOGGLE_NOTIFICATIONS:$g,TOGGLE_SATELLITE_VIEW:QS,TOGGLE_SHAPES:bg,TOGGLE_SITES:Rg,TOGGLE_TILE_OVERLAY:zg,UPDATE_COLORING_SET:nd,UPDATE_DIMENSIONS:kg,UPDATE_DISTRICT:VS,UPDATE_DOMAIN:yg,UPDATE_HIGHLIGHTED:_g,UPDATE_NARRATIVE:Cg,UPDATE_NARRATIVE_STEP_IDX:Ag,UPDATE_SEARCH_QUERY:Bg,UPDATE_SELECTED:Jc,UPDATE_SOURCE:Pg,UPDATE_TICKS:Lg,UPDATE_TIMERANGE:td,clearFilter:kD,closeToolbar:$D,fetchDomain:wD,fetchError:WS,fetchSource:TD,fetchSourceError:Dp,markNotificationsRead:BD,rehydrateState:qD,setInitialCategories:GS,setInitialShapes:YS,setLoading:qS,setNotLoading:ZS,toggleAssociations:CD,toggleCover:UD,toggleFetchingDomain:Wl,toggleFetchingSources:Mp,toggleInfoPopup:FD,toggleIntroPopup:jD,toggleLanguage:DD,toggleNotifications:zD,toggleSatelliteView:VD,toggleShapes:AD,toggleSites:MD,toggleTileOverlay:HD,updateColoringSet:OD,updateDimensions:LD,updateDistrict:xD,updateDomain:bD,updateHighlighted:SD,updateNarrative:RD,updateNarrativeStepIdx:ID,updateSearchQuery:WD,updateSelected:ED,updateSource:ND,updateTicks:KS,updateTimeRange:PD},Symbol.toStringTag,{value:"Module"}));var Ou="NOT_FOUND";function ZD(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Ou},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function GD(e,t){var n=[];function r(l){var d=n.findIndex(function(_){return t(l,_.key)});if(d>-1){var y=n[d];return d>0&&(n.splice(d,1),n.unshift(y)),y.value}return Ou}function i(l,d){r(l)===Ou&&(n.unshift({key:l,value:d}),n.length>e&&n.pop())}function s(){return n}function a(){n=[]}return{get:r,put:i,getEntries:s,clear:a}}var YD=function(t,n){return t===n};function KD(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,s=0;s1?t-1:0),r=1;re.domain.events,eE=e=>e.domain.associations.filter(t=>t.mode===Yn.CATEGORY),t$=e=>e.domain.associations.filter(t=>t.mode===Yn.NARRATIVE),tE=e=>e.app.associations.narrative,Wg=e=>e.app.selected,n$=e=>e.domain.sites,Vg=e=>e.domain.sources,r$=e=>e.domain.regions,i$=e=>e.domain.shapes,nE=e=>e.domain.associations.filter(t=>t.mode===Yn.FILTER),qg=e=>e.app.associations.filters,Zg=e=>e.app.associations.categories,rE=e=>e.app.shapes,o$=e=>e.app.associations.coloringSet,iE=e=>e.app.timeline.range,s$=e=>e.app.timeline.dimensions,fr=e=>e.features,a$=e=>e.ui.eventRadius,l$=e=>e.ui.tiles.current,u$=e=>e.ui.tiles.current===e.ui.tiles.satellite,c$=Pt([n$,fr],(e,t)=>t.USE_SITES?e.filter(n=>!!+n.enabled):[]);Pt([Vg,fr],(e,t)=>t.USE_SOURCES?e:{});const d$=Pt([r$,fr],(e,t)=>t.USE_REGIONS?e:[]),f$=e=>e.app.timeline.range.initial,h$=e=>e.app.timeline.range.initialDaysShown,Gg=Pt([iE,f$,h$],(e,t,n)=>{let r,i;return e=e.current,Array.isArray(e)&&e.length===2?[r,i]=e:Array.isArray(t)&&t.length===2?[r,i]=t:(i=new Date,r=new Date(i.getTime()-n*24*60*60*1e3)),[new Date(r),new Date(i)]}),p$=e=>e.app.timeline.range.limits,oE=Pt(p$,e=>[new Date(e.lower),new Date(e.upper||Date.now())]),Yg=Pt([JS,qg,Zg,rE,Gg,fr],(e,t,n,r,i,s)=>e.reduce((a,l)=>{const y=l.associations&&l.associations.filter(w=>w.mode===Yn.FILTER).map(w=>t.includes(Qc(w))).some(w=>w)||t.length===0||t.length===0,_=l.associations&&l.associations.filter(w=>w.mode===Yn.CATEGORY).map(w=>n.includes(w.title)).some(w=>w)||n.length===0;let c=e$(l,i);c=s.GRAPH_NONLOCATED&&!l.latitude&&!l.longitude||c;const f=l.shape&&r.includes(l.shape.id);return l.type===DS?f&&_&&c&&(a[l.id]={...l}):y&&_&&c&&(a[l.id]={...l}),a},[])),m$=Pt([Yg],(e,t)=>e.reduce(n=>n+1,0)),Kg=Pt([JS,t$,Vg,fr],(e,t,n,r)=>{if(Array.isArray(t)&&t.length===0)return[];const i={},s=a=>({id:a,steps:[]});return e.forEach(a=>{a.associations.forEach(l=>{const d=t.find(y=>y.id===l);if(d){const{id:y}=d;i[y]||(i[y]=s(y)),i[y].steps.push(pg(n)(a))}})}),Object.keys(i).forEach(a=>{i[a].steps.sort((y,_)=>y.datetime-_.datetime);const d=t.find(y=>y.id===a);d&&(i[a]={...d,...i[a]})}),t.map(a=>i[a.id]).filter(a=>a)}),sE=Pt([Wg,tE],(e,t)=>{if(t===null)return-1;const n=e[0];let r;return t.steps.forEach((i,s)=>{n.id===i.id&&(r=s)}),r}),aE=Pt([tE,sE],(e,t)=>e?{...e,current:t}:null),g$=Pt([Yg],e=>{const t={};return e.forEach(n=>{const{latitude:r,longitude:i}=n;if(!Ra(r)||!Ia(i))return;const s=`${n.location}$_${n.latitude}_${n.longitude}`;t[s]?t[s].events.push(n):t[s]={label:s,events:[n],id:n.id,latitude:n.latitude,longitude:n.longitude}}),Object.values(t)}),lE=Pt([Yg,fr,a$],(e,t,n)=>{if(!t.GRAPH_NONLOCATED)return[e,[]];const r=2*n,i=t.GRAPH_NONLOCATED.projectIdx||0,s=_=>_.filters[i],a={};e=e.reduce((_,c)=>{const f=c.filters.length>=1&&!c.latitude&&!c.longitude?s(c):null;return f!==null&&(a.hasOwnProperty(f)?(a[f].start=aD(a[f].start,c.datetime),a[f].end=lD(a[f].end,c.datetime)):a[f]={start:c.datetime,end:c.datetime,key:f,category:c.category}),_.push({...c,project:f}),_},[]);const l=Object.values(a);l.sort((_,c)=>_.start-c.start);const d=Object.keys(a).map((_,c)=>null),y=l.reduce((_,c,f)=>{d.forEach((v,p)=>{v!==null&&a[v].ende[0]),y$=Pt([lE,fr],(e,t)=>t.GRAPH_NONLOCATED?e[1]:[]),Xg=Pt([Wg,Vg],(e,t)=>e.length===0?[]:e.map(pg(t))),$p=Pt([s$],e=>({...e,trackHeight:e.contentHeight-50})),uE=Pt([nE],e=>e.reduce((t,n)=>(t[Qc(n)]=n.id,t),{})),_$=Pt([o$,uE],(e,t)=>e.map(n=>cE(n,t).join(","))),w$=Pt([qg,uE],(e,t)=>cE(e,t));function cE(e,t){return e.reduce((n,r)=>{const i=t[r];return i&&n.push(i),n},[])}const Vt={NUMBER:"NUMBER",NUMBER_ARRAY:"NUMBER_ARRAY",STRING:"STRING",STRING_ARRAY:"STRING_ARRAY",DATE:"DATE",DATE_ARRAY:"DATE_ARRAY"};function P0(e){return[Vt.DATE_ARRAY,Vt.NUMBER_ARRAY,Vt.STRING_ARRAY].includes(e.type)}const Qg=Object.freeze({id:{key:"id",trigger:Jc,type:Vt.STRING_ARRAY,dehydrate(e){return Wg(e).map(({civId:t})=>t)},rehydrate(e,{id:t}){t!=null&&t.length&&(e.app.selected=t.reduce((n,r)=>{const i=e.domain.events.find(s=>s.civId===r);return i?n.push(i):console.warn(`event ${r} could not be rehydrated. reason: not present.`),n},[]))}},range:{key:"range",trigger:td,type:Vt.DATE_ARRAY,dehydrate(e){return iE(e)},rehydrate(e,{range:t}){if((t==null?void 0:t.length)===2){const n=Array.from(t);n.sort((r,i)=>new Date(r)-new Date(i)),e.app.timeline={...e.app.timeline,range:{...e.app.timeline.range,current:n}}}}},filter:{key:"filter",trigger:ed,type:Vt.STRING_ARRAY,dehydrate(e){return w$(e)},rehydrate(e,{filter:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=L0(n);e.app.associations.filters=t.map(i=>r[i])}}},color:{key:"color",trigger:nd,type:Vt.STRING_ARRAY,dehydrate(e){return _$(e)},rehydrate(e,{color:t}){if(t!=null&&t.length){const n=e.domain.associations.filter(i=>i.mode===Yn.FILTER),r=L0(n);e.app.associations.coloringSet=t.map(i=>i.split(",").map(s=>r[s]))}}}});function L0(e){return e.reduce((t,n)=>(t[n.id]=Qc(n),t),{})}class dE{constructor(){this.url=new URL(window.location),this.schema=Qg}delete(t){this.url.searchParams.delete(t)}set(t,n){const r=this.schema[t];if(r)if(this.delete(t),r.type===Vt.DATE_ARRAY)n.current.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else if(P0(r))n.forEach(i=>{const s=this._encode(r,i);s&&this.url.searchParams.append(t,s)});else{const i=this._encode(r,n);i&&this.url.searchParams.set(t,i)}}serialize(){window.history.replaceState(null,"",this.url)}deserialize(){const t={};return this.url.searchParams.forEach((n,r)=>{if(t[r]!=null)return;const i=this.schema[r];i&&(t[r]=P0(i)?this.url.searchParams.getAll(r).map(s=>this._decode(i,s)):this._decode(i,this.url.searchParams.get(r)))}),t}_decode(t,n){switch(t.type){case Vt.NUMBER_ARRAY:case Vt.NUMBER:return+n;case Vt.DATE:case Vt.DATE_ARRAY:return new Date(n);default:return n==="null"||n==="undefined"?void 0:n}}_encode(t,n){switch(t.type){case Vt.NUMBER_ARRAY:case Vt.NUMBER:return n.toString();case Vt.DATE:case Vt.DATE_ARRAY:return Ho(n).format("YYYY-MM-DD");default:return n}}}function b$(e){const t=new dE().deserialize();if(mD(t))return e;const n={...e};return Object.values(Qg).forEach(r=>{try{r.rehydrate(n,t)}catch(i){console.error(i)}}),n}function T$(e){return t=>n=>{const r=t(n);try{const i=Object.values(Qg).filter(s=>s.trigger===n.type);if(i.length){const s=new dE,a=e.getState();i.forEach(l=>{s.set(l.key,l.dehydrate(a))}),s.serialize()}}catch(i){console.error("error serializing url state",i)}return r}}function S$(e={},t){switch(t.type){case Hg:return b$(e);default:return e}}function lt(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function Ni(e){return function t(n){return arguments.length===0||lt(n)?t:e.apply(this,arguments)}}function Ai(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return lt(n)?t:Ni(function(i){return e(n,i)});default:return lt(n)&<(r)?t:lt(n)?Ni(function(i){return e(i,r)}):lt(r)?Ni(function(i){return e(n,i)}):e(n,r)}}}function fE(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return lt(n)?t:Ai(function(s,a){return e(n,s,a)});case 2:return lt(n)&<(r)?t:lt(n)?Ai(function(s,a){return e(s,r,a)}):lt(r)?Ai(function(s,a){return e(n,s,a)}):Ni(function(s){return e(n,r,s)});default:return lt(n)&<(r)&<(i)?t:lt(n)&<(r)?Ai(function(s,a){return e(s,a,i)}):lt(n)&<(i)?Ai(function(s,a){return e(s,r,a)}):lt(r)&<(i)?Ai(function(s,a){return e(n,s,a)}):lt(n)?Ni(function(s){return e(s,r,i)}):lt(r)?Ni(function(s){return e(n,s,i)}):lt(i)?Ni(function(s){return e(n,r,s)}):e(n,r,i)}}}function xl(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function R0(e){return Object.prototype.toString.call(e)==="[object Object]"}var E$=fE(function(t,n,r){var i={},s;for(s in n)xl(s,n)&&(i[s]=xl(s,r)?t(s,n[s],r[s]):n[s]);for(s in r)xl(s,r)&&!xl(s,i)&&(i[s]=r[s]);return i});const x$=E$;var k$=fE(function e(t,n,r){return x$(function(i,s,a){return R0(s)&&R0(a)?e(t,s,a):t(i,s,a)},n,r)});const C$=k$;var A$=Ai(function(t,n){return C$(function(r,i,s){return i},t,n)});const Jg=A$,js={fa_red:"#eb443e",yellow:"#ffd800",black:"#000",white:"#fff"},qn={fallbackEventColor:js.fa_red,darkBackground:js.black,primaryHighlight:js.fa_red,secondaryHighlight:js.white},Ue={"es-MX":{tiles:{default:"Mapa",satellite:"Sat"},loading:"Cargando...",legend:{view2d:{paragraphs:["Seleccionando una serie de filtros verá aparecer eventos en el mapa y en la línea del tiempo.","Cada evento estará coloreado según la persona que dio el testimonio del evento."],colors:[{class:"category_group00",label:"Categoría Grupo 00"},{class:"category_group01",label:"Categoría Grupo 01"},{class:"category_group02",label:"Categoría Grupo 02"},{class:"category_group03",label:"Categoría Grupo 03"},{class:"other",label:"Otras categorías"}]},default:{header:"Ayudas para explorar la plataforma",intro:["Cada **punto** representa un **evento en los datos** (o cada incidente). Al hacer clic en cada punto se ven los detalles del evento. Pero si le da clic en un **grupo** de puntos, verá cuantos eventos hay en ese grupo.","Puede acercarse en el mapa *(zoom)* haciendo *scroll* con el ratón o haciendo clic en un grupo de puntos.","Puede usar **filtros** para segmentar los datos. En el mapa sólo vemos los puntos relacionados con cada filtro seleccionado. Cuando no hay filtros seleccionados, vemos todos los puntos de la base de datos en el mapa.","Al seleccionar más de un filtro se introducen diferentes colores para diferenciarlos. Esto permite comparar los tipos de incidentes tanto en el mapa, como en la línea de tiempo. Esto sirve con un máximo de 6 filtros-colores.","Con el teclado puede usar las flechas de la derecha e izquierda para moverse entre eventos. También puede hacer clic y arrastrar la línea de tiempo hacia los lados para modificar el rango de tiempo."],notation:"Cuando un circulo combina colores significa que hay varios eventos en esa misma ubicación.",arrows:"Usar las flechas izquierda/derecha en el teclado para moverse entre eventos cronológicamente."}},toolbar:{title:"Título",filters:"Filtros",explore_by_filter__title:"Explorar por filtros",explore_by_filter__description:"Al seleccionar filtros, puede ver los eventos que tienen esa categoria. Para ver todos los eventos puede quitar todas las selecciones (o seleccionarlos todos).",panels:{mentions:{title:"Personas",overview:"Seleccionar los nombres de personas mostrará eventos en los que esta persona o organización ha sido mencionada, incluyendo el propio testimonio. Entre paréntesis encontrará el número de menciones. Ej. (34)."},categories:{title:"Testimonios",overview:"Seleccionar el nombre de una persona mostrará los eventos descritos por su testimonio. Entre paréntesis encontrará el número de eventos descritos. Ej. (34)."},search:{title:"Directorio de etiquetas",placeholder:"Búsqueda"}}},timeline:{zoomLevels:[{label:"20 años",duration:10512e3},{label:"2 años",duration:1051200},{label:"3 meses",duration:129600},{label:"3 días",duration:4320},{label:"12 horas",duration:720},{label:"1 hora",duration:60}],labels_title:"Testimonios",labels:["Testimonio Grupo 00","Testimonio Grupo 01","Testimonio Grupo 02","Testimonio Grupo 03","Otras categorias"],info:"%n eventos ocurridos entre",default_categories_label:"Eventos"},cardstack:{date_title:"Fecha incidente",location_title:"Ubicación",summary_title:"Resumen",header:"eventos seleccionados",unknown_location:"Ubicación desconocida",unknown_time:"Día y hora desconocida",timestamp:"Día y hora",estimated:"aproximado",location:"Ubicación",incident_type:"Tipo de acción",description:"Hechos",people:"Personas en el evento",sources:"Fuentes",category:"Según el testimonio de",communication:"Comunicación",transmitter:"Transmisor",receiver:"Receptor",warning:"(!) HECHOS CUESTIONADOS"}},"en-US":{tiles:{default:"Map",satellite:"Sat"},loading:"Loading...",legend:{view2d:{paragraphs:["Selecting a series of filters, you will be able to explore events on the map of Iguala and on the timeline.","Each event is colored according the person that gave category of the event."],colors:[{class:"category_group00",label:"Category Group 00"},{class:"category_group01",label:"Category Group 01"},{class:"category_group02",label:"Category Group 02"},{class:"category_group03",label:"Category Group 03"},{class:"other",label:"Other categories"}]},default:{header:"Navigating the Platform",intro:["Each small **dot** represents a **datapoint**, or incident. Click on a dot to see details. Hover over a larger ‘**cluster**’ dot to see how many events it represents.","Zoom in either with a mouse-scroll or by clicking a ‘cluster’ dot.","Use **filters** and **categories** to segment the data. Selecting certain filters and categories will show only the datapoints that relate to them. If no filters or categories are selected, all the datapoints are displayed.","Selecting more than one filter will introduce colour-coded datapoints, which allow you to compare types of incident across time and space. This feature works up to a maximum of six filters.","Once you have clicked on an event, use the left and right arrows to move back and forward day by day. You can also click and drag anywhere on the timeline. Use the handles on the right to select a date range."],notation:"Combinations of colours within a circle indicate multiple events in a single location.",arrows:"Use the left/right arrows on the keboard to move back and forth between events in time."}},toolbar:{title:"TITLE",panels:{mentions:{title:"Mentions",overview:"Selecting the names of people/organisation will show events in which these have been mentioned in their own testimony and by others. The number in the parentheses shows how many events contain a mention of a person or organisation, e.g. (34)"},categories:{title:"Testimonies",overview:"Selecting the name of a person will show the events only according to a person’s category or category. The number in the parentheses show how many events are contained in each category, e.g. (34)."},search:{title:"Directory of filters",placeholder:"Search"}},narratives:"Narratives",narratives_label:"Narratives",explore_by_narrative__title:"Explore events by narrative",explore_by_narrative__description:"Follow a path through the data, from one key event to the next.",filters:"Filters",filters_label:"Filters",explore_by_filter__title:"Explore by filter",explore_by_filter__description:"'Filters' refer to the types of incident. Select multiple filters to introduce colour-coding, up to a maximum of four filters.

If no filters are selected, all datapoints are displayed.",categories:"Categories",categories_label:"Categories",explore_by_category__title:"Explore events by category",explore_by_category__description:"",shapes:"Shapes",shapes_label:"Shapes",explore_by_shapes__title:"Explore events by shape breakdown",explore_by_shape__description:"Shapes map to a given type of event that appears on the timeline.

Select the shape marker to toggle this type of event on / off",fullscreen_enter:"Fullscreen",fullscreen_exit:"Exit Fullscreen",download:{button:"Download",panel:{title:"Download events",description:"Export the most recent available events in different formats.",formats:{api:{label:"API",description:"An API endpoint where you can always fetch the entire dataset in JSON format with tools like curl. Useful for integrating the data in other services and visualizaitons."},csv:{label:"CSV",description:"CSV file where sources and filters are concatenated into a single column each due to data structure limitations."},json:{label:"JSON",description:"JSON file where each event is a structured object containing nested arrays of sources and filters."}}}}},timeline:{labels_title:"Testimonies",labels:["Testimony Group 00","Testimony Group 01","Testimony Group 02","Testimony Group 03","Other"],info:"Showing %n events that occurred between",default_categories_label:""},cardstack:{header:"selected events",timestamp:"Day and time",unknown_location:"Unknown location",estimated:"estimated",unknown_time:"Unknown time",location:"Localization",incident_type:"Type of action",description:"Summary",filters:"Filters",nofilters:"No known filters for this event.",sources:"Sources",unknown_source:"The information for this source could not be retrieved.",category:"Category",communication:"Communication",transmitter:"Transmitter",receiver:"Receiver",warning:"(!) Highly questioned"}}},Pf=window.innerHeight<800,P$={anchor:[31.356397,34.784818],startZoom:11,minZoom:2,maxZoom:16,bounds:null,maxBounds:[[180,-180],[-180,180]]},L$={},I0={domain:{events:[],categories:[],associations:[],sources:{},sites:[],shapes:[],regions:[],notifications:[]},app:{debug:!0,errors:{source:!1},highlighted:null,selected:[],source:null,associations:{coloringSet:[],filters:[],narrative:null,categories:[],views:{events:!0,routes:!1,sites:!0}},shapes:[],language:"en-US",cluster:{radius:30,minZoom:2,maxZoom:16},timeline:{dimensions:{ticks:15,height:Pf?170:250,width:0,marginLeft:20,marginTop:Pf?5:10,marginBottom:60,contentHeight:Pf?160:200,width_controls:100},range:{current:null},zoomLevels:Ue[ht].timeline.zoomLevels||[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}]},flags:{isFetchingDomain:!1,isFetchingSources:!1,isCover:!0,isCardstack:!0,isInfopopup:!1,isIntropopup:!1,isShowingSites:!0},cover:{title:"project title",description:`A description of the project goes here. This description may contain markdown. @@ -86,19 +86,19 @@ This description may contain markdown. ## Whereas this is a slightly smaller title. -Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/forensic-architecture/timemap) for more information around how to specify custom covers.`,exploreButton:"EXPLORE"},toolbar:{panels:{categories:{default:{icon:Ls.CATEGORY,label:Ue[ht].toolbar.categories_label,title:Ue[ht].toolbar.explore_by_category__title,description:Ue[ht].toolbar.explore_by_category__description}},filters:{icon:Ls.FILTER,label:Ue[ht].toolbar.filters_label,title:Ue[ht].toolbar.explore_by_filter__title,description:Ue[ht].toolbar.explore_by_filter__description},narratives:{icon:Ls.NARRATIVE,label:Ue[ht].toolbar.narratives_label,title:Ue[ht].toolbar.explore_by_narrative__title,description:Ue[ht].toolbar.explore_by_narrative__description},shapes:{icon:Ls.SHAPE,label:Ue[ht].toolbar.shapes_label,title:Ue[ht].toolbar.explore_by_shape__title,description:Ue[ht].toolbar.explore_by_shape__description},download:{icon:Ls.DOWNLOAD,label:Ue[ht].toolbar.download.button,title:Ue[ht].toolbar.download.panel.title,description:Ue[ht].toolbar.download.panel.description}}},loading:!1},ui:{tiles:{current:"openstreetmap",default:"openstreetmap",satellite:"satellite"},style:{categories:{default:qn.fallbackEventColor},narratives:{default:{opacity:.9,stroke:qn.fallbackEventColor,strokeWidth:3}},regions:{default:{stroke:"blue",strokeWidth:3,opacity:.9}},clusters:{radial:!1}},card:{layout:{template:"basic"}},coloring:{maxNumOfColors:4,colors:Object.values(js)},dom:{timeline:"timeline",timeslider:"timeslider",map:"map"},eventRadius:8},features:{USE_COVER:!1,USE_ASSOCIATIONS:!1,USE_SITES:!1,USE_SOURCES:!1,USE_REGIONS:!1,GRAPH_NONLOCATED:!1,HIGHLIGHT_GROUPS:!1}};let Zn;Gt.store?Zn=Jg(Gt.store,I0):Zn=I0;Zn.app.flags.isIntropopup=!!Zn.app.intro;"map"in Zn.app&&(Zn.app.map=Jg(Zn.app.map,A$));"space3d"in Zn.app&&(Zn.app.space3d=Jg(Zn.app.space3d,L$));const id=Zn;var Fp={},R$={get exports(){return Fp},set exports(e){Fp=e}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,s,a)=>{const l=a(375),d=a(8571),y=a(9474),_=a(1687),c=a(8652),f=a(8160),w=a(3292),v=a(6354),p=a(8901),b=a(9708),g=a(6914),m=a(2294),h=a(6133),T=a(1152),x=a(8863),k=a(2036),P={Base:class{constructor(E){this.type=E,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new m.Ids,this._preferences=null,this._refs=new h.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return l(typeof b.describe=="function","Manifest functionality disabled"),b.describe(this)}allow(){for(var E=arguments.length,A=new Array(E),C=0;C1&&arguments[1]!==void 0?arguments[1]:{};return l(E!==void 0,"Missing example"),f.assertOptions(A,["override"]),this._inner("examples",E,{single:!0,override:A.override})}external(E,A){return typeof E=="object"&&(l(!A,"Cannot combine options with description"),A=E.description,E=E.method),l(typeof E=="function","Method must be a function"),l(A===void 0||A&&typeof A=="string","Description must be a non-empty string"),this._inner("externals",{method:E,description:A},{single:!0})}failover(E,A){return this._default("failover",E,A)}forbidden(){return this.presence("forbidden")}id(E){return E?(l(typeof E=="string","id must be a non-empty string"),l(/^[^\.]+$/.test(E),"id cannot contain period character"),this.$_setFlag("id",E)):this.$_setFlag("id",void 0)}invalid(){for(var E=arguments.length,A=new Array(E),C=0;C0&&arguments[0]!==void 0)||arguments[0];return l(typeof E=="boolean","Invalid mode:",E),this.$_setFlag("only",E)}optional(){return this.presence("optional")}prefs(E){l(E,"Missing preferences"),l(E.context===void 0,"Cannot override context"),l(E.externals===void 0,"Cannot override externals"),l(E.warnings===void 0,"Cannot override warnings"),l(E.debug===void 0,"Cannot override debug"),f.checkPreferences(E);const A=this.clone();return A._preferences=f.preferences(A._preferences,E),A}presence(E){return l(["optional","required","forbidden"].includes(E),"Unknown presence mode",E),this.$_setFlag("presence",E)}raw(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"raw":void 0)}result(E){return l(["raw","strip"].includes(E),"Unknown result mode",E),this.$_setFlag("result",E)}required(){return this.presence("required")}strict(E){const A=this.clone(),C=E!==void 0&&!E;return A._preferences=f.preferences(A._preferences,{convert:C}),A}strip(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"strip":void 0)}tag(){for(var E=arguments.length,A=new Array(E),C=0;CN.keep||N.name!==C),A._singleRules.delete(C));for(const C of E._rules)E._definition.rules[C.method].multi||A._singleRules.set(C.name,C),A._rules.push(C);if(A._flags.empty&&E._flags.empty){A._flags.empty=A._flags.empty.concat(E._flags.empty);const C=Object.assign({},E._flags);delete C.empty,_(A._flags,C)}else if(E._flags.empty){A._flags.empty=E._flags.empty;const C=Object.assign({},E._flags);delete C.empty,_(A._flags,C)}else _(A._flags,E._flags);for(const C in E.$_terms){const N=E.$_terms[C];N?A.$_terms[C]?A.$_terms[C]=A.$_terms[C].concat(N):A.$_terms[C]=N.slice():A.$_terms[C]||(A.$_terms[C]=N)}return this.$_root._tracer&&this.$_root._tracer._combine(A,[this,E]),A.$_mutateRebuild()}extend(E){return l(!E.base,"Cannot extend type with another base"),p.type(this,E)}extract(E){return E=Array.isArray(E)?E:E.split("."),this._ids.reach(E)}fork(E,A){l(!this._inRuleset(),"Cannot fork inside a ruleset");let C=this;for(let N of[].concat(E))N=Array.isArray(N)?N:N.split("."),C=C._ids.fork(N,A,C);return C.$_temp.ruleset=!1,C}rule(E){const A=this._definition;f.assertOptions(E,Object.keys(A.modifiers)),l(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const C=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;l(C>=0&&CC.tailor(E),ref:!1}),A.$_temp.ruleset=!1,A.$_mutateRebuild()}tracer(){return T.location?T.location(this):this}validate(E,A){return x.entry(E,this,A)}validateAsync(E,A){return x.entryAsync(E,this,A)}$_addRule(E){typeof E=="string"&&(E={name:E}),l(E&&typeof E=="object","Invalid options"),l(E.name&&typeof E.name=="string","Invalid rule name");for(const F in E)l(F[0]!=="_","Cannot set private rule properties");const A=Object.assign({},E);A._resolve=[],A.method=A.method||A.name;const C=this._definition.rules[A.method],N=A.args;l(C,"Unknown rule",A.method);const $=this.clone();if(N){l(Object.keys(N).length===1||Object.keys(N).length===this._definition.rules[A.name].args.length,"Invalid rule definition for",this.type,A.name);for(const F in N){let z=N[F];if(C.argsByName){const U=C.argsByName.get(F);if(U.ref&&f.isResolvable(z))A._resolve.push(F),$.$_mutateRegister(z);else if(U.normalize&&(z=U.normalize(z),N[F]=z),U.assert){const H=f.validateArg(z,F,U);l(!H,H,"or reference")}}z!==void 0?N[F]=z:delete N[F]}}return C.multi||($._ruleRemove(A.name,{clone:!1}),$._singleRules.set(A.name,A)),$.$_temp.ruleset===!1&&($.$_temp.ruleset=null),C.priority?$._rules.unshift(A):$._rules.push(A),$}$_compile(E,A){return w.schema(this.$_root,E,A)}$_createError(E,A,C,N,$){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const z=F.flags!==!1?this._flags:{},U=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new v.Report(E,A,C,z,U,N,$)}$_getFlag(E){return this._flags[E]}$_getRule(E){return this._singleRules.get(E)}$_mapLabels(E){return E=Array.isArray(E)?E:E.split("."),this._ids.labels(E)}$_match(E,A,C,N){(C=Object.assign({},C)).abortEarly=!0,C._externals=!1,A.snapshot();const $=!x.validate(E,this,A,C,N).errors;return A.restore(),$}$_modify(E){return f.assertOptions(E,["each","once","ref","schema"]),m.schema(this,E)||this}$_mutateRebuild(){return l(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(E,A)=>{let{source:C,name:N,path:$,key:F}=A;const z=this._definition[C][N]&&this._definition[C][N].register;z!==!1&&this.$_mutateRegister(E,{family:z,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(E){let{family:A,key:C}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(E,A),this._ids.register(E,{key:C})}$_property(E){return this._definition.properties[E]}$_reach(E){return this._ids.reach(E)}$_rootReferences(){return this._refs.roots()}$_setFlag(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(E[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const N=this._definition.flags[E]||{};if(y(A,N.default)&&(A=void 0),y(A,this._flags[E]))return this;const $=C.clone!==!1?this.clone():this;return A!==void 0?($._flags[E]=A,$.$_mutateRegister(A)):delete $._flags[E],E[0]!=="_"&&($.$_temp.ruleset=!1),$}$_parent(E){for(var A=arguments.length,C=new Array(A>1?A-1:0),N=1;N2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(C,"literal"),l(A!==void 0,"Missing",E,"value"),l(typeof A=="function"||!C.literal,"Only function value supports literal option"),typeof A=="function"&&C.literal&&(A={[f.symbols.literal]:!0,literal:A}),this.$_setFlag(E,A)}_generate(E,A,C){if(!this.$_terms.whens)return{schema:this};const N=[],$=[];for(let U=0;UY)break}const F=$.join(", ");if(A.mainstay.tracer.debug(A,"rule","when",F),!F)return{schema:this};if(!A.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let z=this;this._definition.generate&&(z=this._definition.generate(this,E,A,C));for(const U of N)z=z.concat(U);return this.$_root._tracer&&this.$_root._tracer._combine(z,[this,...N]),this.$_temp.whens[F]=z,{schema:z,id:F}}_inner(E,A){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(!this._inRuleset(),`Cannot set ${E} inside a ruleset`);const N=this.clone();return N.$_terms[E]&&!C.override||(N.$_terms[E]=[]),C.single?N.$_terms[E].push(A):N.$_terms[E].push(...A),N.$_temp.ruleset=!1,N}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(E){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(E))return this;const C=A.clone!==!1?this.clone():this;C._singleRules.delete(E);const N=[];for(let $=0;${const l=a(375),d=a(8571),y=a(8160),_={max:1e3,supported:new Set(["undefined","boolean","number","string"])};s.provider={provision:c=>new _.Cache(c)},_.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};y.assertOptions(c,["max"]),l(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||_.max,this._map=new Map,this._list=new _.List}get length(){return this._map.size}set(c,f){if(c!==null&&!_.supported.has(typeof c))return;let w=this._map.get(c);if(w)return w.value=f,void this._list.first(w);w=this._list.unshift({key:c,value:f}),this._map.set(c,w),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),d(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},_.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:w}=c;return f.prev=w,w&&(w.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,s,a)=>{const l=a(375),d=a(7916),y=a(5934);let _,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};s.version=y.version,s.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},s.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},s.assertOptions=function(w,v){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";l(w&&typeof w=="object"&&!Array.isArray(w),"Options must be of type object");const b=Object.keys(w).filter(g=>!v.includes(g));l(b.length===0,`${p} contain unknown keys: ${b}`)},s.checkPreferences=function(w){c=c||a(3378);const v=c.preferences.validate(w);if(v.error)throw new d([v.error.details[0].message])},s.compare=function(w,v,p){switch(p){case"=":return w===v;case">":return w>v;case"<":return w=":return w>=v;case"<=":return w<=v}},s.default=function(w,v){return w===void 0?v:w},s.isIsoDate=function(w){return f.isoDate.test(w)},s.isNumber=function(w){return typeof w=="number"&&!isNaN(w)},s.isResolvable=function(w){return!!w&&(w[s.symbols.ref]||w[s.symbols.template])},s.isSchema=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const p=w&&w[s.symbols.any];return!!p&&(l(v.legacy||p.version===s.version,"Cannot mix different versions of joi schemas"),!0)},s.isValues=function(w){return w[s.symbols.values]},s.limit=function(w){return Number.isSafeInteger(w)&&w>=0},s.preferences=function(w,v){_=_||a(6914),w=w||{},v=v||{};const p=Object.assign({},w,v);return v.errors&&w.errors&&(p.errors=Object.assign({},w.errors,v.errors),p.errors.wrap=Object.assign({},w.errors.wrap,v.errors.wrap)),v.messages&&(p.messages=_.compile(v.messages,w.messages)),delete p[s.symbols.prefs],p},s.tryWithPath=function(w,v){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return w()}catch(b){throw b.path!==void 0?b.path=v+"."+b.path:b.path=v,p.append&&(b.message=`${b.message} (${b.path})`),b}},s.validateArg=function(w,v,p){let{assert:b,message:g}=p;if(s.isSchema(b)){const m=b.validate(w);return m.error?m.error.message:void 0}if(!b(w))return v?`${v} ${g}`:g},s.verifyFlat=function(w,v){for(const p of w)l(!Array.isArray(p),"Method no longer accepts array arguments:",v)}},3292:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.schema=function(c,f){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["appendPath","override"]);try{return _.schema(c,f,w)}catch(v){throw w.appendPath&&v.path!==void 0&&(v.message=`${v.message} (${v.path})`),v}},_.schema=function(c,f,w){l(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(l(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const v=function(p){for(var b=arguments.length,g=new Array(b>1?b-1:0),m=1;m2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["legacy"]);const v=f&&f[d.symbols.any];if(v)return l(w.legacy||v.version===d.version,"Cannot mix different versions of joi schemas:",v.version,d.version),f;if(typeof f!="object"||!w.legacy)return s.schema(c,f,{appendPath:!0});const p=_.walk(f);return p?p.compile(p.root,f):s.schema(c,f,{appendPath:!0})},_.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const w of c){const v=_.walk(w);if(v)return v}return null}const f=c[d.symbols.any];if(f)return{root:c[f.root],compile:f.compile};l(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const w in c){const v=_.walk(c[w]);if(v)return v}return null},_.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},s.when=function(c,f,w){if(w===void 0&&(l(f&&typeof f=="object","Missing options"),w=f,f=y.create(".")),Array.isArray(w)&&(w={switch:w}),d.assertOptions(w,["is","not","then","otherwise","switch","break"]),d.isSchema(f))return l(w.is===void 0,'"is" can not be used with a schema condition'),l(w.not===void 0,'"not" can not be used with a schema condition'),l(w.switch===void 0,'"switch" can not be used with a schema condition'),_.condition(c,{is:f,then:w.then,otherwise:w.otherwise,break:w.break});if(l(y.isRef(f)||typeof f=="string","Invalid condition:",f),l(w.not===void 0||w.is===void 0,'Cannot combine "is" with "not"'),w.switch===void 0){let p=w;w.not!==void 0&&(p={is:w.not,then:w.otherwise,otherwise:w.then,break:w.break});let b=p.is!==void 0?c.$_compile(p.is):c.$_root.invalid(null,!1,0,"").required();return l(p.then!==void 0||p.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(p.break===void 0||p.then===void 0||p.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),w.is===void 0||y.isRef(w.is)||d.isSchema(w.is)||(b=b.required()),_.condition(c,{ref:s.ref(f),is:b,then:p.then,otherwise:p.otherwise,break:p.break})}l(Array.isArray(w.switch),'"switch" must be an array'),l(w.is===void 0,'Cannot combine "switch" with "is"'),l(w.not===void 0,'Cannot combine "switch" with "not"'),l(w.then===void 0,'Cannot combine "switch" with "then"');const v={ref:s.ref(f),switch:[],break:w.break};for(let p=0;p{const l=a(5688),d=a(8160),y=a(3328);s.Report=class{constructor(_,c,f,w,v,p,b){if(this.code=_,this.flags=w,this.messages=v,this.path=p.path,this.prefs=b,this.state=p,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=s.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(_){if(this.template=_,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const _=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${_}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(_,c){return s.template(this.value,_,c||this.code,this.state,this.prefs)}},s.path=function(_){let c="";for(const f of _)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},s.template=function(_,c,f,w,v){if(!c)return;if(y.isTemplate(c))return f!=="root"?c:null;let p=v.errors.language;if(d.isResolvable(p)&&(p=p.resolve(_,w,v)),p&&c[p]){if(c[p][f]!==void 0)return c[p][f];if(c[p]["*"]!==void 0)return c[p]["*"]}return c[f]?c[f]:c["*"]},s.label=function(_,c,f,w){if(_.label)return _.label;if(!f.errors.label)return"";let v=c.path;return f.errors.label==="key"&&c.path.length>1&&(v=c.path.slice(-1)),s.path(v)||s.template(null,f.messages,"root",c,f)||w&&s.template(null,w,"root",c,f)||"value"},s.process=function(_,c,f){if(!_)return null;const{override:w,message:v,details:p}=s.details(_);if(w)return w;if(f.errors.stack)return new s.ValidationError(v,p,c);const b=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new s.ValidationError(v,p,c);return Error.stackTraceLimit=b,g},s.details=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const w=[];for(const v of _){if(v instanceof Error){if(c.override!==!1)return{override:v};const b=v.toString();f.push(b),w.push({message:b,type:"override",context:{error:v}});continue}const p=v.toString();f.push(p),w.push({message:p,path:v.path.filter(b=>typeof b!="object"),type:v.code,context:v.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:w}},s.ValidationError=class extends Error{constructor(_,c,f){super(_),this._original=f,this.details=c}static isError(_){return _ instanceof s.ValidationError}},s.ValidationError.prototype.isJoi=!0,s.ValidationError.prototype.name="ValidationError",s.ValidationError.prototype.annotate=l.error},8901:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8160),_=a(6914),c={};s.type=function(f,w){const v=Object.getPrototypeOf(f),p=d(v),b=f._assign(Object.create(p)),g=Object.assign({},w);delete g.base,p._definition=g;const m=v._definition||{};g.messages=_.merge(m.messages,g.messages),g.properties=Object.assign({},m.properties,g.properties),b.type=g.type,g.flags=Object.assign({},m.flags,g.flags);const h=Object.assign({},m.terms);if(g.terms)for(const P in g.terms){const E=g.terms[P];l(b.$_terms[P]===void 0,"Invalid term override for",g.type,P),b.$_terms[P]=E.init,h[P]=E}g.terms=h,g.args||(g.args=m.args),g.prepare=c.prepare(g.prepare,m.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,m.coerce),g.validate=c.validate(g.validate,m.validate);const T=Object.assign({},m.rules);if(g.rules)for(const P in g.rules){const E=g.rules[P];l(typeof E=="object","Invalid rule definition for",g.type,P);let A=E.method;if(A===void 0&&(A=function(){return this.$_addRule(P)}),A&&(l(!p[P],"Rule conflict in",g.type,P),p[P]=A),l(!T[P],"Rule conflict in",g.type,P),T[P]=E,E.alias){const C=[].concat(E.alias);for(const N of C)p[N]=E.method}E.args&&(E.argsByName=new Map,E.args=E.args.map(C=>(typeof C=="string"&&(C={name:C}),l(!E.argsByName.has(C.name),"Duplicated argument name",C.name),y.isSchema(C.assert)&&(C.assert=C.assert.strict().label(C.name)),E.argsByName.set(C.name,C),C)))}g.rules=T;const x=Object.assign({},m.modifiers);if(g.modifiers)for(const P in g.modifiers){l(!p[P],"Rule conflict in",g.type,P);const E=g.modifiers[P];l(typeof E=="function","Invalid modifier definition for",g.type,P);const A=function(C){return this.rule({[P]:C})};p[P]=A,x[P]=E}if(g.modifiers=x,g.overrides){p._super=v,b.$_super={};for(const P in g.overrides)l(v[P],"Cannot override missing",P),g.overrides[P][y.symbols.parent]=v[P],b.$_super[P]=v[P].bind(b);Object.assign(p,g.overrides)}g.cast=Object.assign({},m.cast,g.cast);const k=Object.assign({},m.manifest,g.manifest);return k.build=c.build(g.manifest&&g.manifest.build,m.manifest&&m.manifest.build),g.manifest=k,g.rebuild=c.rebuild(g.rebuild,m.rebuild),b},c.build=function(f,w){return f&&w?function(v,p){return w(f(v,p),p)}:f||w},c.coerce=function(f,w){return f&&w?{from:f.from&&w.from?[...new Set([...f.from,...w.from])]:null,method(v,p){let b;if((!w.from||w.from.includes(typeof v))&&(b=w.method(v,p),b)){if(b.errors||b.value===void 0)return b;v=b.value}if(!f.from||f.from.includes(typeof v)){const g=f.method(v,p);if(g)return g}return b}}:f||w},c.prepare=function(f,w){return f&&w?function(v,p){const b=f(v,p);if(b){if(b.errors||b.value===void 0)return b;v=b.value}return w(v,p)||b}:f||w},c.rebuild=function(f,w){return f&&w?function(v){w(v),f(v)}:f||w},c.validate=function(f,w){return f&&w?function(v,p){const b=w(v,p);if(b){if(b.errors&&(!Array.isArray(b.errors)||b.errors.length))return b;v=b.value}return f(v,p)||b}:f||w}},5107:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8652),_=a(8160),c=a(3292),f=a(6354),w=a(8901),v=a(9708),p=a(6133),b=a(3328),g=a(1152);let m;const h={types:{alternatives:a(4946),any:a(8068),array:a(546),boolean:a(4937),date:a(7500),function:a(390),link:a(8785),number:a(3832),object:a(8966),string:a(7417),symbol:a(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const T={_types:new Set(Object.keys(h.types))};for(const x of T._types)T[x]=function(){for(var k=arguments.length,P=new Array(k),E=0;E2?k-2:0),E=2;E2?k-2:0),E=2;E{const l=a(375),d=a(8571),y=a(3328);s.compile=function(_,c){if(typeof _=="string")return l(!c,"Cannot set single message string"),new y(_);if(y.isTemplate(_))return l(!c,"Cannot set single message template"),_;l(typeof _=="object"&&!Array.isArray(_),"Invalid message options"),c=c?d(c):{};for(let f in _){const w=_[f];if(f==="root"||y.isTemplate(w)){c[f]=w;continue}if(typeof w=="string"){c[f]=new y(w);continue}l(typeof w=="object"&&!Array.isArray(w),"Invalid message for",f);const v=f;for(f in c[v]=c[v]||{},w){const p=w[f];f==="root"||y.isTemplate(p)?c[v][f]=p:(l(typeof p=="string","Invalid message for",f,"in",v),c[v][f]=new y(p))}}return c},s.decompile=function(_){const c={};for(let f in _){const w=_[f];if(f==="root"){c.root=w;continue}if(y.isTemplate(w)){c[f]=w.describe({compact:!0});continue}const v=f;for(f in c[v]={},w){const p=w[f];f!=="root"?c[v][f]=p.describe({compact:!0}):c[v].root=p}}return c},s.merge=function(_,c){if(!_)return s.compile(c);if(!c)return _;if(typeof c=="string")return new y(c);if(y.isTemplate(c))return c;const f=d(_);for(let w in c){const v=c[w];if(w==="root"||y.isTemplate(v)){f[w]=v;continue}if(typeof v=="string"){f[w]=new y(v);continue}l(typeof v=="object"&&!Array.isArray(v),"Invalid message for",w);const p=w;for(w in f[p]=f[p]||{},v){const b=v[w];w==="root"||y.isTemplate(b)?f[p][w]=b:(l(typeof b=="string","Invalid message for",w,"in",p),f[p][w]=new y(b))}}return f}},2294:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.Ids=_.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new _.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,w]of c._byId.entries())l(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,w);for(const[f,w]of c._byKey.entries())l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,w)}fork(c,f,w){const v=this._collect(c);v.push({schema:w});const p=v.shift();let b={id:p.id,schema:f(p.schema)};l(d.isSchema(b.schema),"adjuster function failed to return a joi schema type");for(const g of v)b={id:g.id,schema:_.fork(g.schema,b.id,b.schema)};return b.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);if(!v)return[...f,...c].join(".");const p=c.slice(1);return f=[...f,v.schema._flags.label||w],p.length?v.schema._ids.labels(p,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);l(v,"Schema does not contain path",[...f,...c].join("."));const p=c.slice(1);return p.length?v.schema._ids.reach(p,[...f,w]):v.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!d.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const w=c._flags.id;if(w){const v=this._byId.get(w);l(!v||v.schema===c,"Cannot add different schemas with the same id:",w),l(!this._byKey.has(w),"Schema id conflicts with existing key:",w),this._byId.set(w,{schema:c,id:w})}f&&(l(!this._byKey.has(f),"Schema already contains key:",f),l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const v=c[0],p=this._get(v);l(p,"Schema does not contain path",[...f,...c].join(".")),w=[p,...w];const b=c.slice(1);return b.length?p.schema._ids._collect(b,[...f,v],w):w}_get(c){return this._byId.get(c)||this._byKey.get(c)}},_.fork=function(c,f,w){const v=s.schema(c,{each:(p,b)=>{let{key:g}=b;if(f===(p._flags.id||g))return w},ref:!1});return v?v.$_mutateRebuild():c},s.schema=function(c,f){let w;for(const v in c._flags){if(v[0]==="_")continue;const p=_.scan(c._flags[v],{source:"flags",name:v},f);p!==void 0&&(w=w||c.clone(),w._flags[v]=p)}for(let v=0;v{const l=a(375),d=a(8571),y=a(9621),_=a(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};s.create=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(typeof w=="string","Invalid reference key:",w),_.assertOptions(v,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!v.prefix||typeof v.prefix=="object","options.prefix must be of type object");const p=Object.assign({},f.defaults,v);delete p.prefix;const b=p.separator,g=f.context(w,b,v.prefix);if(p.type=g.type,w=g.key,p.type==="value")if(g.root&&(l(!b||w[0]!==b,"Cannot specify relative path with root prefix"),p.ancestor="root",w||(w=null)),b&&b===w)w=null,p.ancestor=0;else if(p.ancestor!==void 0)l(!b||!w||w[0]!==b,"Cannot combine prefix with ancestor option");else{const[m,h]=f.ancestor(w,b);h&&(w=w.slice(h))===""&&(w=null),p.ancestor=m}return p.path=b?w===null?[]:w.split(b):[w],new f.Ref(p)},s.in=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.create(w,{...v,in:!0})},s.isRef=function(w){return!!w&&!!w[_.symbols.ref]},f.Ref=class{constructor(w){l(typeof w=="object","Invalid reference construction"),_.assertOptions(w,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(w.separator)||typeof w.separator=="string"&&w.separator.length===1,"Invalid separator"),l(!w.adjust||typeof w.adjust=="function","options.adjust must be a function"),l(!w.map||Array.isArray(w.map),"options.map must be an array"),l(!w.map||!w.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,w),l(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(w,v,p,b){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return l(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(p.context,v,g):this.type==="local"?this._resolve(b,v,g):this.ancestor?this.ancestor==="root"?this._resolve(v.ancestors[v.ancestors.length-1],v,g):(l(this.ancestor<=v.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(v.ancestors[this.ancestor-1],v,g)):this._resolve(w,v,g)}_resolve(w,v,p){let b;if(this.type==="value"&&v.mainstay.shadow&&p.shadow!==!1&&(b=v.mainstay.shadow.get(this.absolute(v))),b===void 0&&(b=y(w,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(b=this.adjust(b)),this.map){const g=this.map.get(b);g!==void 0&&(b=g)}return v.mainstay&&v.mainstay.tracer.resolve(v,this,b),b}toString(){return this.display}absolute(w){return[...w.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const w={path:this.path};this.type!=="value"&&(w.type=this.type),this.separator!=="."&&(w.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(w.ancestor=this.ancestor),this.map&&(w.map=[...this.map]);for(const v of["adjust","iterables","render"])this[v]!==null&&this[v]!==void 0&&(w[v]=this[v]);return this.in!==!1&&(w.in=!0),{ref:w}}updateDisplay(){const w=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${w}`);if(!this.separator)return void(this.display=`ref:${w}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${w}`);if(this.ancestor==="root")return void(this.display=`ref:root:${w}`);if(this.ancestor===1)return void(this.display=`ref:${w||".."}`);const v=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${v}${w||""}`}},f.Ref.prototype[_.symbols.ref]=!0,s.build=function(w){return(w=Object.assign({},f.defaults,w)).type==="value"&&w.ancestor===void 0&&(w.ancestor=1),new f.Ref(w)},f.context=function(w,v){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(w=w.trim(),p){const b=p.global===void 0?"$":p.global;if(b!==v&&w.startsWith(b))return{key:w.slice(b.length),type:"global"};const g=p.local===void 0?"#":p.local;if(g!==v&&w.startsWith(g))return{key:w.slice(g.length),type:"local"};const m=p.root===void 0?"/":p.root;if(m!==v&&w.startsWith(m))return{key:w.slice(m.length),type:"value",root:!0}}return{key:w,type:"value"}},f.ancestor=function(w,v){if(!v)return[1,0];if(w[0]!==v)return[1,0];if(w[1]!==v)return[0,1];let p=2;for(;w[p]===v;)++p;return[p-1,p]},s.toSibling=0,s.toParent=1,s.Manager=class{constructor(){this.refs=[]}register(w,v){if(w)if(v=v===void 0?s.toParent:v,Array.isArray(w))for(const p of w)this.register(p,v);else if(_.isSchema(w))for(const p of w._refs.refs)p.ancestor-v>=0&&this.refs.push({ancestor:p.ancestor-v,root:p.root});else s.isRef(w)&&w.type==="value"&&w.ancestor-v>=0&&this.refs.push({ancestor:w.ancestor-v,root:w.root}),c=c||a(3328),c.isTemplate(w)&&this.register(w.refs(),v)}get length(){return this.refs.length}clone(){const w=new s.Manager;return w.refs=d(this.refs),w}reset(){this.refs=[]}roots(){return this.refs.filter(w=>!w.ancestor).map(w=>w.root)}}},3378:(i,s,a)=>{const l=a(5107),d={};d.wrap=l.string().min(1).max(2).allow(!1),s.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:d.wrap,array:d.wrap,string:d.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),d.nameRx=/^[a-zA-Z0-9]\w*$/,d.rule=l.object({alias:l.array().items(l.string().pattern(d.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(d.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),s.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(d.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(d.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(d.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(d.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(d.nameRx,d.rule),terms:l.object().pattern(d.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),s.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),d.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},d.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),d.desc.buffer,d.desc.func,d.desc.ref,d.desc.regex,d.desc.special,d.desc.template,d.desc.value,l.link("/")]),d.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.symbol(),d.desc.buffer,d.desc.func,d.desc.override,d.desc.ref,d.desc.regex,d.desc.template,d.desc.value),d.desc.messages=l.object().pattern(/.+/,[l.string(),d.desc.template,l.object().pattern(/.+/,[l.string(),d.desc.template])]),s.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:d.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),d.desc.ref],wrap:{label:d.wrap,array:d.wrap}},externals:l.boolean(),messages:d.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:d.desc.values,invalid:d.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),d.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:d.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(i,s,a)=>{const l=a(8571),d=a(9621),y=a(8160),_={value:Symbol("value")};i.exports=_.State=class{constructor(c,f,w){this.path=c,this.ancestors=f,this.mainstay=w.mainstay,this.schemas=w.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const v=new _.State(c,f,this);return w&&v.schemas&&(v.schemas=[_.schemas(w),...v.schemas]),v}nest(c,f){const w=new _.State(this.path,this.ancestors,this);return w.schemas=w.schemas&&[_.schemas(c),...w.schemas],w.debug=f,w}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new _.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=l(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},_.schemas=function(c){return y.isSchema(c)?{schema:c}:c},_.Shadow=class{constructor(){this._values=null}set(c,f,w){if(!c.length||w==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let v=this._values;for(let p=0;p{const l=a(375),d=a(8571),y=a(5277),_=a(1447),c=a(8160),f=a(6354),w=a(6133),v={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=v.Template=class{constructor(p,b){l(typeof p=="string","Template source must be a string"),l(!p.includes("\0")&&!p.includes(""),"Template source cannot contain reserved control characters"),this.source=p,this.rendered=p,this._template=null,this._settings=d(b),this._parse()}_parse(){if(!this.source.includes("{"))return;const p=v.encode(this.source),b=v.split(p);let g=!1;const m=[],h=b.shift();h&&m.push(h);for(const T of b){const x=T[0]!=="{",k=x?"}":"}}",P=T.indexOf(k);if(P===-1||T[1]==="{"){m.push(`{${v.decode(T)}`);continue}let E=T.slice(x?0:1,P);const A=E[0]===":";A&&(E=E.slice(1));const C=this._ref(v.decode(E),{raw:x,wrapped:A});m.push(C),typeof C!="string"&&(g=!0);const N=T.slice(P+k.length);N&&m.push(v.decode(N))}g?this._template=m:this.rendered=m.join("")}static date(p,b){return v.dateFormat[b.dateFormat].call(p)}describe(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&p.compact)return this.source;const b={template:this.source};return this._settings&&(b.options=this._settings),b}static build(p){return new v.Template(p.template,p.options)}isDynamic(){return!!this._template}static isTemplate(p){return!!p&&!!p[c.symbols.template]}refs(){if(!this._template)return;const p=[];for(const b of this._template)typeof b!="string"&&p.push(...b.refs);return p}resolve(p,b,g,m){return this._template&&this._template.length===1?this._part(this._template[0],p,b,g,m,{}):this.render(p,b,g,m)}_part(p){for(var b=arguments.length,g=new Array(b>1?b-1:0),m=1;m4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const T=[];for(const x of this._template)if(typeof x=="string")T.push(x);else{const k=this._part(x,p,b,g,m,h),P=v.stringify(k,p,b,g,m,h);if(P!==void 0){const E=x.raw||(h.errors&&h.errors.escapeHtml)===!1?P:y(P);T.push(v.wrap(E,x.wrapped&&g.errors.wrap.label))}}return T.join("")}_ref(p,b){let{raw:g,wrapped:m}=b;const h=[],T=k=>{const P=w.create(k,this._settings);return h.push(P),E=>P.resolve(...E)};try{var x=new _.Parser(p,{reference:T,functions:v.functions,constants:v.constants})}catch(k){throw k.message=`Invalid template variable "${p}" fails due to: ${k.message}`,k}if(x.single){if(x.single.type==="reference"){const k=h[0];return{ref:k,raw:g,refs:h,wrapped:m||k.type==="local"&&k.key==="label"}}return v.stringify(x.single.value)}return{formula:x,raw:g,refs:h}}toString(){return this.source}},v.Template.prototype[c.symbols.template]=!0,v.Template.prototype.isImmutable=!0,v.encode=function(p){return p.replace(/\\(\{+)/g,(b,g)=>v.opens.slice(0,g.length)).replace(/\\(\}+)/g,(b,g)=>v.closes.slice(0,g.length))},v.decode=function(p){return p.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},v.split=function(p){const b=[];let g="";for(let m=0;m5&&arguments[5]!==void 0?arguments[5]:{};const x=typeof p,k=m&&m.errors&&m.errors.wrap||{};let P=!1;if(w.isRef(p)&&p.render&&(P=p.in,p=p.resolve(b,g,m,h,{in:p.in,...T})),p===null)return"null";if(x==="string")return v.wrap(p,T.arrayItems&&k.string);if(x==="number"||x==="function"||x==="symbol")return p.toString();if(x!=="object")return JSON.stringify(p);if(p instanceof Date)return v.Template.date(p,m);if(p instanceof Map){const A=[];for(const[C,N]of p.entries())A.push(`${C.toString()} -> ${N.toString()}`);p=A}if(!Array.isArray(p))return p.toString();const E=[];for(const A of p)E.push(v.stringify(A,b,g,m,h,{arrayItems:!0,...T}));return v.wrap(E.join(", "),!P&&k.array)},v.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},v.functions={if:(p,b,g)=>p?b:g,length:p=>typeof p=="string"?p.length:p&&typeof p=="object"?Array.isArray(p)?p.length:Object.keys(p).length:null,msg(p){const[b,g,m,h,T]=this,x=T.messages;if(!x)return"";const k=f.template(b,x[0],p,g,m)||f.template(b,x[1],p,g,m);return k?k.render(b,g,m,h,T):""},number:p=>typeof p=="number"?p:typeof p=="string"?parseFloat(p):typeof p=="boolean"?p?1:0:p instanceof Date?p.getTime():null}},4946:(i,s,a)=>{const l=a(375),d=a(1687),y=a(8068),_=a(8160),c=a(3292),f=a(6354),w=a(6133),v={};i.exports=y.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:w.toSibling}},args(p){for(var b=arguments.length,g=new Array(b>1?b-1:0),m=1;mf.details(A,{override:!1}))})};if(g._flags.match==="one")return k.length===1?{value:k[0]}:{errors:m("alternatives.one")};if(k.length!==g.$_terms.matches.length)return{errors:m("alternatives.all",{details:P.map(A=>f.details(A,{override:!1}))})};const E=A=>A.$_terms.matches.some(C=>C.schema.type==="object"||C.schema.type==="alternatives"&&E(C.schema));return E(g)?{value:k.reduce((A,C)=>d(A,C,{mergeArrays:!1}))}:{value:k[k.length-1]}}const x=[];for(let k=0;kg.path[0]!=="is"?b.label(p):void 0,ref:!1})}},rebuild(p){p.$_modify({each:b=>{_.isSchema(b)&&b.type==="array"&&p.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(p,b){if(b.matches)for(const g of b.matches){const{schema:m,ref:h,is:T,not:x,then:k,otherwise:P}=g;p=m?p.try(m):h?p.conditional(h,{is:T,then:k,not:x,otherwise:P,switch:g.switch}):p.conditional(T,{then:k,otherwise:P})}return p}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),v.errors=function(p,b){let{error:g,state:m}=b;if(!p.length)return{errors:g("alternatives.any")};if(p.length===1)return{errors:p[0].reports};const h=new Set,T=[];for(const{reports:x,schema:k}of p){if(x.length>1)return v.unmatched(p,g);const P=x[0];if(P instanceof f.Report==0)return v.unmatched(p,g);if(P.state.path.length!==m.path.length){T.push({type:k.type,report:P});continue}if(P.code==="any.only"){for(const C of P.local.valids)h.add(C);continue}const[E,A]=P.code.split(".");A==="base"?h.add(E):T.push({type:k.type,report:P})}return T.length?T.length===1?{errors:T[0].report}:v.unmatched(p,g):{errors:g("alternatives.types",{types:[...h]})}},v.unmatched=function(p,b){const g=[];for(const m of p)g.push(...m.reports);return{errors:b("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,s,a)=>{const l=a(375),d=a(7629),y=a(8160),_=a(6914);i.exports=d.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return l(typeof c=="function","Method must be a function"),l(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,w){let{method:v}=w;try{return v(c,f)}catch(p){return f.error("any.custom",{error:p})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){l(y.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return l(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,w){let{code:v,local:p}=w;return f.error(v,p)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=_.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const w in f){const v=f[w];if(["examples","externals","metas","notes","tags"].includes(w))for(const p of v)c=c[w.slice(0,-1)](p);else if(w!=="alterations")if(w!=="whens"){if(w==="shared")for(const p of v)c=c.shared(p)}else for(const p of v){const{ref:b,is:g,not:m,then:h,otherwise:T,concat:x}=p;c=x?c.concat(x):b?c.when(b,{is:g,not:m,then:h,otherwise:T,switch:p.switch,break:p.break}):c.when(g,{then:h,otherwise:T,break:p.break})}else{const p={};for(const{target:b,adjuster:g}of v)p[b]=g;c=c.alter(p)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,s,a)=>{const l=a(375),d=a(9474),y=a(9621),_=a(8068),c=a(8160),f=a(3292),w={};i.exports=_.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(v,p){let{schema:b,state:g,prefs:m}=p;if(!Array.isArray(v))return;const h=b.$_getRule("sort");return h?w.sort(b,v,h.args.options,g,m):void 0}},validate(v,p){let{schema:b,error:g}=p;if(!Array.isArray(v)){if(b._flags.single){const m=[v];return m[c.symbols.arraySingle]=!0,{value:m}}return{errors:g("array.base")}}if(b.$_getRule("items")||b.$_terms.externals)return{value:v.slice()}},rules:{has:{method(v){v=this.$_compile(v,{appendPath:!0});const p=this.$_addRule({name:"has",args:{schema:v}});return p.$_mutateRegister(v),p},validate(v,p,b){let{state:g,prefs:m,error:h}=p,{schema:T}=b;const x=[v,...g.ancestors];for(let P=0;Pthis.$_compile(p[m]),m,{append:!0});g.$_terms.items.push(h)}return g.$_mutateRebuild()},validate(v,p){let{schema:b,error:g,state:m,prefs:h,errorsArray:T}=p;const x=b.$_terms._requireds.slice(),k=b.$_terms.ordered.slice(),P=[...b.$_terms._inclusions,...x],E=!v[c.symbols.arraySingle];delete v[c.symbols.arraySingle];const A=T();let C=v.length;for(let N=0;N="})}},ordered:{method(){for(var v=arguments.length,p=new Array(v),b=0;bthis.$_compile(p[m]),m,{append:!0});w.validateSingle(h,g),g.$_mutateRegister(h),g.$_terms.ordered.push(h)}return g.$_mutateRebuild()}},single:{method(v){const p=v===void 0||!!v;return l(!p||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",p)}},sort:{method(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(v,["by","order"]);const p={order:v.order||"ascending"};return v.by&&(p.by=f.ref(v.by,{ancestor:0}),l(!p.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:p}})},validate(v,p,b){let{error:g,state:m,prefs:h,schema:T}=p,{options:x}=b;const{value:k,errors:P}=w.sort(T,v,x,m,h);if(P)return P;for(let E=0;E1&&arguments[1]!==void 0?arguments[1]:{};l(!v||typeof v=="function"||typeof v=="string","comparator must be a function or a string"),c.assertOptions(p,["ignoreUndefined","separator"]);const b={name:"unique",args:{options:p,comparator:v}};if(v)if(typeof v=="string"){const g=c.default(p.separator,".");b.path=g?v.split(g):[v]}else b.comparator=v;return this.$_addRule(b)},validate(v,p,b,g){let{state:m,error:h,schema:T}=p,{comparator:x,options:k}=b,{comparator:P,path:E}=g;const A={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},C=P||d,N=k.ignoreUndefined;for(let $=0;$new Set(v)}},rebuild(v){v.$_terms._inclusions=[],v.$_terms._exclusions=[],v.$_terms._requireds=[];for(const p of v.$_terms.items)w.validateSingle(p,v),p._flags.presence==="required"?v.$_terms._requireds.push(p):p._flags.presence==="forbidden"?v.$_terms._exclusions.push(p):v.$_terms._inclusions.push(p);for(const p of v.$_terms.ordered)w.validateSingle(p,v)},manifest:{build:(v,p)=>(p.items&&(v=v.items(...p.items)),p.ordered&&(v=v.ordered(...p.ordered)),v)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),w.fillMissedErrors=function(v,p,b,g,m,h){const T=[];let x=0;for(const k of b){const P=k._flags.label;P?T.push(P):++x}T.length?x?p.push(v.$_createError("array.includesRequiredBoth",g,{knownMisses:T,unknownMisses:x},m,h)):p.push(v.$_createError("array.includesRequiredKnowns",g,{knownMisses:T},m,h)):p.push(v.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:x},m,h))},w.fillOrderedErrors=function(v,p,b,g,m,h){const T=[];for(const x of b)x._flags.presence==="required"&&T.push(x);T.length&&w.fillMissedErrors(v,p,T,g,m,h)},w.fillDefault=function(v,p,b,g){const m=[];let h=!0;for(let T=v.length-1;T>=0;--T){const x=v[T],k=[p,...b.ancestors],P=x.$_validate(void 0,b.localize(b.path,k,x),g).value;if(h){if(P===void 0)continue;h=!1}m.unshift(P)}m.length&&p.push(...m)},w.fastSplice=function(v,p){let b=p;for(;b{let A=w.compare(P,E,T,x);if(A!==null||(b.by&&(P=b.by.resolve(P,g,m),E=b.by.resolve(E,g,m)),A=w.compare(P,E,T,x),A!==null))return A;const C=typeof P;if(C!==typeof E)throw v.$_createError("array.sort.mismatching",p,null,g,m);if(C!=="number"&&C!=="string")throw v.$_createError("array.sort.unsupported",p,{type:C},g,m);return C==="number"?(P-E)*h:P{const l=a(375),d=a(8068),y=a(8160),_=a(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=d.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,w){let{schema:v}=w;if(typeof f!="boolean"){if(typeof f=="string"){const p=v._flags.sensitive?f:f.toLowerCase();f=p==="true"||p!=="false"&&f}return typeof f!="boolean"&&(f=v.$_terms.truthy&&v.$_terms.truthy.has(f,null,null,!v._flags.sensitive)||(!v.$_terms.falsy||!v.$_terms.falsy.has(f,null,null,!v._flags.sensitive))&&f),{value:f}}},validate(f,w){let{error:v}=w;if(typeof f!="boolean")return{value:f,errors:v("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,w=new Array(f),v=0;v0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,w)=>f?1:0},string:{from:c.isBool,to:(f,w)=>f?"true":"false"}},manifest:{build:(f,w)=>(w.truthy&&(f=f.truthy(...w.truthy)),w.falsy&&(f=f.falsy(...w.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_=a(3328),c={isDate:function(f){return f instanceof Date}};i.exports=d.extend({type:"date",coerce:{from:["number","string"],method(f,w){let{schema:v}=w;return{value:c.parse(f,v._flags.format)||f}}},validate(f,w){let{schema:v,error:p,prefs:b}=w;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=v._flags.format;return b.convert&&g&&typeof f=="string"?{value:f,errors:p("date.format",{format:g})}:{value:f,errors:p("date.base")}},rules:{compare:{method:!1,validate(f,w,v,p){let{date:b}=v,{name:g,operator:m,args:h}=p;const T=b==="now"?Date.now():b.getTime();return y.compare(f.getTime(),T,m)?f:w.error("date."+g,{limit:h.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return l(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return l(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,w)=>f.getTime()},string:{from:c.isDate,to(f,w){let{prefs:v}=w;return _.date(f,v)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,w){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(w==="iso")return y.isIsoDate(f)?c.date(f.toString()):null;const v=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),w){if(w==="javascript")return c.date(1*f);if(w==="unix")return c.date(1e3*f);if(typeof v=="string")return null}return c.date(f)},c.date=function(f){const w=new Date(f);return isNaN(w.getTime())?null:w}},390:(i,s,a)=>{const l=a(375),d=a(7824);i.exports=d.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length===f?y:_.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(y,_)=>/^\s*class\s/.test(y.toString())?y:_.error("function.class",{value:y})},minArity:{method(y){return l(Number.isSafeInteger(y)&&y>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length>=f?y:_.error("function.minArity",{n:f})}},maxArity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length<=f?y:_.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,s,a)=>{const l=a(978),d=a(375),y=a(8571),_=a(3652),c=a(8068),f=a(8160),w=a(3292),v=a(6354),p=a(6133),b=a(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(m,h)=>m.keys(h),validate(m,h){let{schema:T,error:x,state:k,prefs:P}=h;if(!m||typeof m!==T.$_property("typeof")||Array.isArray(m))return{value:m,errors:x("object.base",{type:T.$_property("typeof")})};if(!(T.$_terms.renames||T.$_terms.dependencies||T.$_terms.keys||T.$_terms.patterns||T.$_terms.externals))return;m=g.clone(m,P);const E=[];if(T.$_terms.renames&&!g.rename(T,m,k,P,E))return{value:m,errors:E};if(!T.$_terms.keys&&!T.$_terms.patterns&&!T.$_terms.dependencies)return{value:m,errors:E};const A=new Set(Object.keys(m));if(T.$_terms.keys){const C=[m,...k.ancestors];for(const N of T.$_terms.keys){const $=N.key,F=m[$];A.delete($);const z=k.localize([...k.path,$],C,N),U=N.schema.$_validate(F,z,P);if(U.errors){if(P.abortEarly)return{value:m,errors:U.errors};U.value!==void 0&&(m[$]=U.value),E.push(...U.errors)}else N.schema._flags.result==="strip"||U.value===void 0&&F!==void 0?delete m[$]:U.value!==void 0&&(m[$]=U.value)}}if(A.size||T._flags._hasPatternMatch){const C=g.unknown(T,m,A,E,k,P);if(C)return C}if(T.$_terms.dependencies)for(const C of T.$_terms.dependencies){if(C.key!==null&&g.isPresent(C.options)(C.key.resolve(m,k,P,null,{shadow:!1}))===!1)continue;const N=g.dependencies[C.rel](T,C,m,k,P);if(N){const $=T.$_createError(N.code,m,N.context,k,P);if(P.abortEarly)return{value:m,errors:$};E.push($)}}return{value:m,errors:E}},rules:{and:{method(){for(var m=arguments.length,h=new Array(m),T=0;T!m.hasOwnProperty(T.key)):new g.Keys;for(const T in m)f.tryWithPath(()=>h.$_terms.keys.push({key:T,schema:this.$_compile(m[T])}),T)}else h.$_terms.keys=new g.Keys;else h.$_terms.keys=null;return h.$_mutateRebuild()}},length:{method(m){return this.$_addRule({name:"length",args:{limit:m},operator:"="})},validate(m,h,T,x){let{limit:k}=T,{name:P,operator:E,args:A}=x;return f.compare(Object.keys(m).length,k,E)?m:h.error("object."+P,{limit:A.limit,value:m})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(m){return this.$_addRule({name:"max",method:"length",args:{limit:m},operator:"<="})}},min:{method(m){return this.$_addRule({name:"min",method:"length",args:{limit:m},operator:">="})}},nand:{method(){for(var m=arguments.length,h=new Array(m),T=0;T2&&arguments[2]!==void 0?arguments[2]:{};const x=m instanceof RegExp;x||(m=this.$_compile(m,{appendPath:!0})),d(h!==void 0,"Invalid rule"),f.assertOptions(T,["fallthrough","matches"]),x&&d(!m.flags.includes("g")&&!m.flags.includes("y"),"pattern should not use global or sticky mode"),h=this.$_compile(h,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const P={[x?"regex":"schema"]:m,rule:h};return T.matches&&(P.matches=this.$_compile(T.matches),P.matches.type!=="array"&&(P.matches=P.matches.$_root.array().items(P.matches)),k.$_mutateRegister(P.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),T.fallthrough&&(P.fallthrough=!0),k.$_terms.patterns.push(P),k.$_mutateRegister(h),k}},ref:{method(){return this.$_addRule("ref")},validate:(m,h)=>p.isRef(m)?m:h.error("object.refType",{value:m})},regex:{method(){return this.$_addRule("regex")},validate:(m,h)=>m instanceof RegExp?m:h.error("object.regex",{value:m})},rename:{method(m,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d(typeof m=="string"||m instanceof RegExp,"Rename missing the from argument"),d(typeof h=="string"||h instanceof b,"Invalid rename to argument"),d(h!==m,"Cannot rename key to same name:",m),f.assertOptions(T,["alias","ignoreUndefined","override","multiple"]);const x=this.clone();x.$_terms.renames=x.$_terms.renames||[];for(const k of x.$_terms.renames)d(k.from!==m,"Cannot rename the same key multiple times");return h instanceof b&&x.$_mutateRegister(h),x.$_terms.renames.push({from:m,to:h,options:l(g.renameDefaults,T)}),x}},schema:{method(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:m}})},validate(m,h,T){let{type:x}=T;return!f.isSchema(m)||x!=="any"&&m.type!==x?h.error("object.schema",{type:x}):m}},unknown:{method(m){return this.$_setFlag("unknown",m!==!1)}},with:{method(m,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",m,h,T)}},without:{method(m,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",m,h,T)}},xor:{method(){for(var m=arguments.length,h=new Array(m),T=0;Th.add(T,{after:T.schema.$_rootReferences(),group:T.key}),T.key);m.$_terms.keys=new g.Keys(...h.nodes)}},manifest:{build(m,h){if(h.keys&&(m=m.keys(h.keys)),h.dependencies)for(const{rel:T,key:x=null,peers:k,options:P}of h.dependencies)m=g.dependency(m,T,x,k,P);if(h.patterns)for(const{regex:T,schema:x,rule:k,fallthrough:P,matches:E}of h.patterns)m=m.pattern(T||x,k,{fallthrough:P,matches:E});if(h.renames)for(const{from:T,to:x,options:k}of h.renames)m=m.rename(T,x,k);return m}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(m,h){if(typeof m=="object"){if(h.nonEnumerables)return y(m,{shallow:!0});const x=Object.create(Object.getPrototypeOf(m));return Object.assign(x,m),x}const T=function(){for(var x=arguments.length,k=new Array(x),P=0;P1&&typeof x[x.length-1]=="object"?x.pop():{}),f.assertOptions(k,["separator","isPresent"]),x=[].concat(x);const P=f.default(k.separator,"."),E=[];for(const C of x)d(typeof C=="string",h,"peers must be strings"),E.push(w.ref(C,{separator:P,ancestor:0,prefix:!1}));T!==null&&(T=w.ref(T,{separator:P,ancestor:0,prefix:!1}));const A=m.clone();return A.$_terms.dependencies=A.$_terms.dependencies||[],A.$_terms.dependencies.push(new g.Dependency(h,T,E,x,k)),A},g.dependencies={and(m,h,T,x,k){const P=[],E=[],A=h.peers.length,C=g.isPresent(h.options);for(const N of h.peers)C(N.resolve(T,x,k,null,{shadow:!1}))===!1?P.push(N.key):E.push(N.key);if(P.length!==A&&E.length!==A)return{code:"object.and",context:{present:E,presentWithLabels:g.keysToLabels(m,E),missing:P,missingWithLabels:g.keysToLabels(m,P)}}},nand(m,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const N of h.peers)E(N.resolve(T,x,k,null,{shadow:!1}))&&P.push(N.key);if(P.length!==h.peers.length)return;const A=h.paths[0],C=h.paths.slice(1);return{code:"object.nand",context:{main:A,mainWithLabel:g.keysToLabels(m,A),peers:C,peersWithLabels:g.keysToLabels(m,C)}}},or(m,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:h.paths,peersWithLabels:g.keysToLabels(m,h.paths)}}},oxor(m,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&P.push(C.key);if(!P.length||P.length===1)return;const A={peers:h.paths,peersWithLabels:g.keysToLabels(m,h.paths)};return A.present=P,A.presentWithLabels=g.keysToLabels(m,P),{code:"object.oxor",context:A}},with(m,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:h.key.key,mainWithLabel:g.keysToLabels(m,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(m,E.key)}}},without(m,h,T,x,k){const P=g.isPresent(h.options);for(const E of h.peers)if(P(E.resolve(T,x,k,null,{shadow:!1})))return{code:"object.without",context:{main:h.key.key,mainWithLabel:g.keysToLabels(m,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(m,E.key)}}},xor(m,h,T,x,k){const P=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&P.push(C.key);if(P.length===1)return;const A={peers:h.paths,peersWithLabels:g.keysToLabels(m,h.paths)};return P.length===0?{code:"object.missing",context:A}:(A.present=P,A.presentWithLabels=g.keysToLabels(m,P),{code:"object.xor",context:A})}},g.keysToLabels=function(m,h){return Array.isArray(h)?h.map(T=>m.$_mapLabels(T)):m.$_mapLabels(h)},g.isPresent=function(m){return typeof m.isPresent=="function"?m.isPresent:h=>h!==void 0},g.rename=function(m,h,T,x,k){const P={};for(const E of m.$_terms.renames){const A=[],C=typeof E.from!="string";if(C)for(const N in h){if(h[N]===void 0&&E.options.ignoreUndefined||N===E.to)continue;const $=E.from.exec(N);$&&A.push({from:N,to:E.to,match:$})}else!Object.prototype.hasOwnProperty.call(h,E.from)||h[E.from]===void 0&&E.options.ignoreUndefined||A.push(E);for(const N of A){const $=N.from;let F=N.to;if(F instanceof b&&(F=F.render(h,T,x,N.match)),$!==F){if(!E.options.multiple&&P[F]&&(k.push(m.$_createError("object.rename.multiple",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly)||Object.prototype.hasOwnProperty.call(h,F)&&!E.options.override&&!P[F]&&(k.push(m.$_createError("object.rename.override",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly))return!1;h[$]===void 0?delete h[F]:h[F]=h[$],P[F]=!0,E.options.alias||delete h[$]}}}return!0},g.unknown=function(m,h,T,x,k,P){if(m.$_terms.patterns){let E=!1;const A=m.$_terms.patterns.map(N=>{if(N.matches)return E=!0,[]}),C=[h,...k.ancestors];for(const N of T){const $=h[N],F=[...k.path,N];for(let z=0;z{const l=a(375),d=a(8068),y=a(8160),_=a(3292),c=a(6354),f={};i.exports=d.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(w,v)=>w.ref(v),validate(w,v){let{schema:p,state:b,prefs:g}=v;l(p.$_terms.link,"Uninitialized link schema");const m=f.generate(p,w,b,g),h=p.$_terms.link[0].ref;return m.$_validate(w,b.nest(m,`link:${h.display}:${m.type}`),g)},generate:(w,v,p,b)=>f.generate(w,v,p,b),rules:{ref:{method(w){l(!this.$_terms.link,"Cannot reinitialize schema"),w=_.ref(w),l(w.type==="value"||w.type==="local","Invalid reference type:",w.type),l(w.type==="local"||w.ancestor==="root"||w.ancestor>0,"Link cannot reference itself");const v=this.clone();return v.$_terms.link=[{ref:w}],v}},relative:{method(){let w=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",w)}}},overrides:{concat(w){l(this.$_terms.link,"Uninitialized link schema"),l(y.isSchema(w),"Invalid schema object"),l(w.type!=="link","Cannot merge type link with another link");const v=this.clone();return v.$_terms.whens||(v.$_terms.whens=[]),v.$_terms.whens.push({concat:w}),v.$_mutateRebuild()}},manifest:{build:(w,v)=>(l(v.link,"Invalid link description missing link"),w.ref(v.link))}}),f.generate=function(w,v,p,b){let g=p.mainstay.links.get(w);if(g)return g._generate(v,p,b).schema;const m=w.$_terms.link[0].ref,{perspective:h,path:T}=f.perspective(m,p);f.assert(h,"which is outside of schema boundaries",m,w,p,b);try{g=T.length?h.$_reach(T):h}catch{f.assert(!1,"to non-existing schema",m,w,p,b)}return f.assert(g.type!=="link","which is another link",m,w,p,b),w._flags.relative||p.mainstay.links.set(w,g),g._generate(v,p,b).schema},f.perspective=function(w,v){if(w.type==="local"){for(const{schema:p,key:b}of v.schemas){if((p._flags.id||b)===w.path[0])return{perspective:p,path:w.path.slice(1)};if(p.$_terms.shared){for(const g of p.$_terms.shared)if(g._flags.id===w.path[0])return{perspective:g,path:w.path.slice(1)}}}return{perspective:null,path:null}}return w.ancestor==="root"?{perspective:v.schemas[v.schemas.length-1].schema,path:w.path}:{perspective:v.schemas[w.ancestor]&&v.schemas[w.ancestor].schema,path:w.path}},f.assert=function(w,v,p,b,g,m){w||l(!1,`"${c.label(b._flags,g,m)}" contains link reference "${p.display}" ${v}`)}},3832:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=d.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:w,error:v}=f;if(!c.match(_.numberRx))return;c=c.trim();const p={value:parseFloat(c)};if(p.value===0&&(p.value=0),!w._flags.unsafe)if(c.match(/e/i)){if(_.extractSignificantDigits(c)!==_.extractSignificantDigits(String(p.value)))return p.errors=v("number.unsafe"),p}else{const b=p.value.toString();if(b.match(/e/i))return p;if(b!==_.normalizeDecimal(c))return p.errors=v("number.unsafe"),p}return p}},validate(c,f){let{schema:w,error:v,prefs:p}=f;if(c===1/0||c===-1/0)return{value:c,errors:v("number.infinity")};if(!y.isNumber(c))return{value:c,errors:v("number.base")};const b={value:c};if(p.convert){const g=w.$_getRule("precision");if(g){const m=Math.pow(10,g.args.limit);b.value=Math.round(b.value*m)/m}}return b.value===0&&(b.value=0),!w._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,w,v){let{base:p}=w;return c*(1/p)%1==0?c:f.error("number.multiple",{multiple:v.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return l(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,w){let{limit:v}=w;const p=c.toString().match(_.precisionRx);return Math.max((p[1]?p[1].length:0)-(p[2]?parseInt(p[2],10):0),0)<=v?c:f.error("number.precision",{limit:v,value:c})},convert:!0},sign:{method(c){return l(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,w){let{sign:v}=w;return v==="negative"&&c<0||v==="positive"&&c>0?c:f.error(`number.${v}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),_.extractSignificantDigits=function(c){return c.replace(_.exponentialPartRegex,"").replace(_.dotRegex,"").replace(_.trailingZerosRegex,"").replace(_.leadingSignAndZerosRegex,"")},_.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,s,a)=>{const l=a(7824);i.exports=l.extend({type:"object",cast:{map:{from:d=>d&&typeof d=="object",to:(d,y)=>new Map(Object.entries(d))}}})},7417:(i,s,a)=>{const l=a(375),d=a(5380),y=a(1745),_=a(9959),c=a(6064),f=a(9926),w=a(5752),v=a(8068),p=a(8160),b={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:_.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=v.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,m){let{schema:h,state:T,prefs:x}=m;const k=h.$_getRule("normalize");k&&(g=g.normalize(k.args.form));const P=h.$_getRule("case");P&&(g=P.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const E=h.$_getRule("trim");if(E&&E.args.enabled&&(g=g.trim()),h.$_terms.replacements)for(const C of h.$_terms.replacements)g=g.replace(C.pattern,C.replacement);const A=h.$_getRule("hex");if(A&&A.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),h.$_getRule("isoDate")){const C=b.isoDate(g);C&&(g=C)}if(h._flags.truncate){const C=h.$_getRule("max");if(C){let N=C.args.limit;if(p.isResolvable(N)&&(N=N.resolve(g,T,x),!p.limit(N)))return{value:g,errors:h.$_createError("any.ref",N,{ref:C.args.limit,arg:"limit",reason:"must be a positive integer"},T,x)};g=g.slice(0,N)}}return{value:g}}},validate(g,m){let{schema:h,error:T}=m;if(typeof g!="string")return{value:g,errors:T("string.base")};if(g===""){const x=h.$_getRule("min");return x&&x.args.limit===0?void 0:{value:g,errors:T("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,m)=>/^[a-zA-Z0-9]+$/.test(g)?g:m.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return p.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,m,h){let{options:T}=h;return b.base64Regex[T.paddingRequired][T.urlSafe].test(g)?g:m.error("string.base64")}},case:{method(g){return l(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,m,h){let{direction:T}=h;return T==="lower"&&g===g.toLocaleLowerCase()||T==="upper"&&g===g.toLocaleUpperCase()?g:m.error(`string.${T}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,m){let h=g.length,T=0,x=1;for(;h--;){const k=g.charAt(h)*x;T+=k-9*(k>9),x^=3}return T>0&&T%10==0?g:m.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return p.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,m,h){let{options:T}=h;const x=g.match(b.dataUriRegex);return x&&(!x[2]||x[2]!=="base64"||b.base64Regex[T.paddingRequired].false.test(x[3]))?g:m.error("string.dataUri")}},domain:{method(g){g&&p.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const m=b.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:m})},validate(g,m,h,T){let{address:x}=T;return d.isValid(g,x)?g:m.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),l(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const m=b.addressOptions(g),h=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:h,address:m})},validate(g,m,h,T){let{options:x}=h,{regex:k,address:P}=T;const E=x.multiple?g.split(k):[g],A=[];for(const C of E)y.isValid(C,P)||A.push(C);return A.length?m.error("string.email",{value:g,invalids:A}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["version","separator"]);let m="";if(g.version){const x=[].concat(g.version);l(x.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let P=0;P0&&arguments[0]!==void 0?arguments[0]:{};return p.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},l(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,m,h){let{options:T}=h;return b.hexRegex.test(g)?T.byteAligned&&g.length%2!=0?m.error("string.hexAlign"):g:m.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,m)=>d.isValid(g,{minDomainSegments:1})||b.ipRegex.test(g)?g:m.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["cidr","version"]);const{cidr:m,versions:h,regex:T}=_.regex(g),x=g.version?h:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:m,version:x}},regex:T})},validate(g,m,h,T){let{options:x}=h,{regex:k}=T;return k.test(g)?g:x.version?m.error("string.ipVersion",{value:g,cidr:x.cidr,version:x.version}):m.error("string.ip",{value:g,cidr:x.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,m){let{error:h}=m;return b.isoDate(g)?g:h("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,m)=>b.isoDurationRegex.test(g)?g:m.error("string.isoDuration")},length:{method(g,m){return b.length(this,"length",g,"=",m)},validate(g,m,h,T){let{limit:x,encoding:k}=h,{name:P,operator:E,args:A}=T;const C=!k&&g.length;return p.compare(C,x,E)?g:m.error("string."+P,{limit:A.limit,value:g,encoding:k})},args:[{name:"limit",ref:!0,assert:p.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,m){return b.length(this,"max",g,"<=",m)},args:["limit","encoding"]},min:{method(g,m){return b.length(this,"min",g,">=",m)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return l(b.normalizationForms.includes(g),"normalization form must be one of "+b.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,m,h){let{error:T}=m,{form:x}=h;return g===g.normalize(x)?g:T("string.normalize",{value:g,form:x})},convert:!0},pattern:{alias:"regex",method(g){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(g instanceof RegExp,"regex must be a RegExp"),l(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof m=="string"&&(m={name:m}),p.assertOptions(m,["invert","name"]);const h=["string.pattern",m.invert?".invert":"",m.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:m},errorCode:h})},validate(g,m,h,T){let{regex:x,options:k}=h,{errorCode:P}=T;return x.test(g)^k.invert?g:m.error(P,{name:k.name,regex:x,value:g})},args:["regex","options"],multi:!0},replace:{method(g,m){typeof g=="string"&&(g=new RegExp(c(g),"g")),l(g instanceof RegExp,"pattern must be a RegExp"),l(typeof m=="string","replacement must be a String");const h=this.clone();return h.$_terms.replacements||(h.$_terms.replacements=[]),h.$_terms.replacements.push({pattern:g,replacement:m}),h}},token:{method(){return this.$_addRule("token")},validate:(g,m)=>/^\w+$/.test(g)?g:m.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,m,h){let{enabled:T}=h;return T&&g!==g.trim()?m.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&p.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:m,scheme:h}=w.regex(g),T=g.domain?b.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:m,domain:T,scheme:h})},validate(g,m,h,T){let{options:x}=h,{regex:k,domain:P,scheme:E}=T;if(["http:/","https:/"].includes(g))return m.error("string.uri");const A=k.exec(g);if(A){const C=A[1]||A[2];return!P||x.allowRelative&&!C||d.isValid(C,P)?g:m.error("string.domain",{value:C})}return x.relativeOnly?m.error("string.uriRelativeOnly"):x.scheme?m.error("string.uriCustomScheme",{scheme:E,value:g}):m.error("string.uri")}}},manifest:{build(g,m){if(m.replacements)for(const{pattern:h,replacement:T}of m.replacements)g=g.replace(h,T);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),b.addressOptions=function(g){if(!g||(l(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds);l(typeof g.tlds=="object","tlds must be true, false, or an object");const m=g.tlds.deny;if(m)return Array.isArray(m)&&(g=Object.assign({},g,{tlds:{deny:new Set(m)}})),l(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),b.validateTlds(g.tlds.deny,"tlds.deny"),g;const h=g.tlds.allow;return h?h===!0?(l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds)):(Array.isArray(h)&&(g=Object.assign({},g,{tlds:{allow:new Set(h)}})),l(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),b.validateTlds(g.tlds.allow,"tlds.allow"),g):g},b.validateTlds=function(g,m){for(const h of g)l(d.isValid(h,{minDomainSegments:1,maxDomainSegments:1}),`${m} must contain valid top level domain names`)},b.isoDate=function(g){if(!p.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const m=new Date(g);return isNaN(m.getTime())?null:m.toISOString()},b.length=function(g,m,h,T,x){return l(!x||!1,"Invalid encoding:",x),g.$_addRule({name:m,method:"length",args:{limit:h,encoding:x},operator:T})}},8826:(i,s,a)=>{const l=a(375),d=a(8068),y={};y.Map=class extends Map{slice(){return new y.Map(this)}},i.exports=d.extend({type:"symbol",terms:{map:{init:new y.Map}},coerce:{method(_,c){let{schema:f,error:w}=c;const v=f.$_terms.map.get(_);return v&&(_=v),f._flags.only&&typeof _!="symbol"?{value:_,errors:w("symbol.map",{map:f.$_terms.map})}:{value:_}}},validate(_,c){let{error:f}=c;if(typeof _!="symbol")return{value:_,errors:f("symbol.base")}},rules:{map:{method(_){_&&!_[Symbol.iterator]&&typeof _=="object"&&(_=Object.entries(_)),l(_&&_[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const w of _){l(w&&w[Symbol.iterator],"Entry must be an iterable");const[v,p]=w;l(typeof v!="object"&&typeof v!="function"&&typeof v!="symbol","Key must not be of type object, function, or Symbol"),l(typeof p=="symbol","Value must be a Symbol"),c.$_terms.map.set(v,p),f.push(p)}return c.valid(...f)}}},manifest:{build:(_,c)=>(c.map&&(_=_.map(c.map)),_)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,s,a)=>{const l=a(375),d=a(8571),y=a(738),_=a(9621),c=a(8160),f=a(6354),w=a(493),v={result:Symbol("result")};s.entry=function(p,b,g){let m=c.defaults;g&&(l(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),m=c.preferences(c.defaults,g));const h=v.entry(p,b,m);l(!h.mainstay.externals.length,"Schema with external rules must use validateAsync()");const T={value:h.value};return h.error&&(T.error=h.error),h.mainstay.warnings.length&&(T.warning=f.details(h.mainstay.warnings)),h.mainstay.debug&&(T.debug=h.mainstay.debug),h.mainstay.artifacts&&(T.artifacts=h.mainstay.artifacts),T},s.entryAsync=async function(p,b,g){let m=c.defaults;g&&(m=c.preferences(c.defaults,g));const h=v.entry(p,b,m),T=h.mainstay;if(h.error)throw T.debug&&(h.error.debug=T.debug),h.error;if(T.externals.length){let k=h.value;for(const{method:P,path:E,label:A}of T.externals){let C,N,$=k;E.length&&(C=E[E.length-1],N=_(k,E.slice(0,-1)),$=N[C]);try{const F=await P($,{prefs:g});if(F===void 0||F===$)continue;N?N[C]=F:k=F}catch(F){throw m.errors.label&&(F.message+=` (${A})`),F}}h.value=k}if(!m.warnings&&!m.debug&&!m.artifacts)return h.value;const x={value:h.value};return T.warnings.length&&(x.warning=f.details(T.warnings)),T.debug&&(x.debug=T.debug),T.artifacts&&(x.artifacts=T.artifacts),x},v.entry=function(p,b,g){const{tracer:m,cleanup:h}=v.tracer(b,g),T={externals:[],warnings:[],tracer:m,debug:g.debug?[]:null,links:b._ids._schemaChain?new Map:null},x=b._ids._schemaChain?[{schema:b}]:null,k=new w([],[],{mainstay:T,schemas:x}),P=s.validate(p,b,k,g);h&&b.$_root.untrace();const E=f.process(P.errors,p,g);return{value:P.value,error:E,mainstay:T}},v.tracer=function(p,b){return p.$_root._tracer?{tracer:p.$_root._tracer._register(p)}:b.debug?(l(p.$_root.trace,"Debug mode not supported"),{tracer:p.$_root.trace()._register(p),cleanup:!0}):{tracer:v.ignore}},s.validate=function(p,b,g,m){let h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(b.$_terms.whens&&(b=b._generate(p,g,m).schema),b._preferences&&(m=v.prefs(b,m)),b._cache&&m.cache){const C=b._cache.get(p);if(g.mainstay.tracer.debug(g,"validate","cached",!!C),C)return C}const T=(C,N,$)=>b.$_createError(C,p,N,$||g,m),x={original:p,prefs:m,schema:b,state:g,error:T,errorsArray:v.errorsArray,warn:(C,N,$)=>g.mainstay.warnings.push(T(C,N,$)),message:(C,N)=>b.$_createError("custom",p,N,g,m,{messages:C})};g.mainstay.tracer.entry(b,g);const k=b._definition;if(k.prepare&&p!==void 0&&m.convert){const C=k.prepare(p,x);if(C){if(g.mainstay.tracer.value(g,"prepare",p,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);p=C.value}}if(k.coerce&&p!==void 0&&m.convert&&(!k.coerce.from||k.coerce.from.includes(typeof p))){const C=k.coerce.method(p,x);if(C){if(g.mainstay.tracer.value(g,"coerced",p,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);p=C.value}}const P=b._flags.empty;P&&P.$_match(v.trim(p,b),g.nest(P),c.defaults)&&(g.mainstay.tracer.value(g,"empty",p,void 0),p=void 0);const E=h.presence||b._flags.presence||(b._flags._endedSwitch?null:m.presence);if(p===void 0){if(E==="forbidden")return v.finalize(p,null,x);if(E==="required")return v.finalize(p,[b.$_createError("any.required",p,null,g,m)],x);if(E==="optional"){if(b._flags.default!==c.symbols.deepDefault)return v.finalize(p,null,x);g.mainstay.tracer.value(g,"default",p,{}),p={}}}else if(E==="forbidden")return v.finalize(p,[b.$_createError("any.unknown",p,null,g,m)],x);const A=[];if(b._valids){const C=b._valids.get(p,g,m,b._flags.insensitive);if(C)return m.convert&&(g.mainstay.tracer.value(g,"valids",p,C.value),p=C.value),g.mainstay.tracer.filter(b,g,"valid",C),v.finalize(p,null,x);if(b._flags.only){const N=b.$_createError("any.only",p,{valids:b._valids.values({display:!0})},g,m);if(m.abortEarly)return v.finalize(p,[N],x);A.push(N)}}if(b._invalids){const C=b._invalids.get(p,g,m,b._flags.insensitive);if(C){g.mainstay.tracer.filter(b,g,"invalid",C);const N=b.$_createError("any.invalid",p,{invalids:b._invalids.values({display:!0})},g,m);if(m.abortEarly)return v.finalize(p,[N],x);A.push(N)}}if(k.validate){const C=k.validate(p,x);if(C&&(g.mainstay.tracer.value(g,"base",p,C.value),p=C.value,C.errors)){if(!Array.isArray(C.errors))return A.push(C.errors),v.finalize(p,A,x);if(C.errors.length)return A.push(...C.errors),v.finalize(p,A,x)}}return b._rules.length?v.rules(p,A,x):v.finalize(p,A,x)},v.rules=function(p,b,g){const{schema:m,state:h,prefs:T}=g;for(const x of m._rules){const k=m._definition.rules[x.method];if(k.convert&&T.convert){h.mainstay.tracer.log(m,h,"rule",x.name,"full");continue}let P,E=x.args;if(x._resolve.length){E=Object.assign({},E);for(const C of x._resolve){const N=k.argsByName.get(C),$=E[C].resolve(p,h,T),F=N.normalize?N.normalize($):$,z=c.validateArg(F,null,N);if(z){P=m.$_createError("any.ref",$,{arg:C,ref:E[C],reason:z},h,T);break}E[C]=F}}P=P||k.validate(p,g,E,x);const A=v.rule(P,x);if(A.errors){if(h.mainstay.tracer.log(m,h,"rule",x.name,"error"),x.warn){h.mainstay.warnings.push(...A.errors);continue}if(T.abortEarly)return v.finalize(p,A.errors,g);b.push(...A.errors)}else h.mainstay.tracer.log(m,h,"rule",x.name,"pass"),h.mainstay.tracer.value(h,"rule",p,A.value,x.name),p=A.value}return v.finalize(p,b,g)},v.rule=function(p,b){return p instanceof f.Report?(v.error(p,b),{errors:[p],value:null}):Array.isArray(p)&&p[c.symbols.errors]?(p.forEach(g=>v.error(g,b)),{errors:p,value:null}):{errors:null,value:p}},v.error=function(p,b){return b.message&&p._setTemplate(b.message),p},v.finalize=function(p,b,g){b=b||[];const{schema:m,state:h,prefs:T}=g;if(b.length){const k=v.default("failover",void 0,b,g);k!==void 0&&(h.mainstay.tracer.value(h,"failover",p,k),p=k,b=[])}if(b.length&&m._flags.error)if(typeof m._flags.error=="function"){b=m._flags.error(b),Array.isArray(b)||(b=[b]);for(const k of b)l(k instanceof Error||k instanceof f.Report,"error() must return an Error object")}else b=[m._flags.error];if(p===void 0){const k=v.default("default",p,b,g);h.mainstay.tracer.value(h,"default",p,k),p=k}if(m._flags.cast&&p!==void 0){const k=m._definition.cast[m._flags.cast];if(k.from(p)){const P=k.to(p,g);h.mainstay.tracer.value(h,"cast",p,P,m._flags.cast),p=P}}if(m.$_terms.externals&&T.externals&&T._externals!==!1)for(const{method:k}of m.$_terms.externals)h.mainstay.externals.push({method:k,path:h.path,label:f.label(m._flags,h,T)});const x={value:p,errors:b.length?b:null};return m._flags.result&&(x.value=m._flags.result==="strip"?void 0:g.original,h.mainstay.tracer.value(h,m._flags.result,p,x.value),h.shadow(p,m._flags.result)),m._cache&&T.cache!==!1&&!m._refs.length&&m._cache.set(g.original,x),p===void 0||x.errors||m._flags.artifact===void 0||(h.mainstay.artifacts=h.mainstay.artifacts||new Map,h.mainstay.artifacts.has(m._flags.artifact)||h.mainstay.artifacts.set(m._flags.artifact,[]),h.mainstay.artifacts.get(m._flags.artifact).push(h.path)),x},v.prefs=function(p,b){const g=b===c.defaults;return g&&p._preferences[c.symbols.prefs]?p._preferences[c.symbols.prefs]:(b=c.preferences(b,p._preferences),g&&(p._preferences[c.symbols.prefs]=b),b)},v.default=function(p,b,g,m){const{schema:h,state:T,prefs:x}=m,k=h._flags[p];if(x.noDefaults||k===void 0)return b;if(T.mainstay.tracer.log(h,T,"rule",p,"full"),!k)return k;if(typeof k=="function"){const P=k.length?[d(T.ancestors[0]),m]:[];try{return k(...P)}catch(E){return void g.push(h.$_createError(`any.${p}`,null,{error:E},T,x))}}return typeof k!="object"?k:k[c.symbols.literal]?k.literal:c.isResolvable(k)?k.resolve(b,T,x):d(k)},v.trim=function(p,b){if(typeof p!="string")return p;const g=b.$_getRule("trim");return g&&g.args.enabled?p.trim():p},v.ignore={active:!1,debug:y,entry:y,filter:y,log:y,resolve:y,value:y},v.errorsArray=function(){const p=[];return p[c.symbols.errors]=!0,p}},2036:(i,s,a)=>{const l=a(375),d=a(9474),y=a(8160),_={};i.exports=_.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=_.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){y.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,w){if(c=c||new _.Values,f){if(f._override)return f.clone();for(const v of[...f._values,...f._refs])c.add(v)}if(w)for(const v of[...w._values,...w._refs])c.remove(v);return c.length?c:null}remove(c){y.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,w,v){return!!this.get(c,f,w,v)}get(c,f,w,v){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&v){const p=this._lowercase.get(c.toLowerCase());if(p)return{value:p}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const p of this._values)if(d(p,c))return{value:p}}if(f)for(const p of this._refs){const b=p.resolve(c,f,w,null,{in:!0});if(b===void 0)continue;const g=p.in&&typeof b=="object"?Array.isArray(b)?b:Object.keys(b):[b];for(const m of g)if(typeof m==typeof c){if(v&&c&&typeof c=="string"){if(m.toLowerCase()===c.toLowerCase())return{value:m,ref:p}}else if(d(m,c))return{value:m,ref:p}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const w of[...this._values,...this._refs])w!==void 0&&f.push(w);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new _.Values(this._values,this._refs);return c._override=this._override,c}concat(c){l(!c._override,"Cannot concat override set of values");const f=new _.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},_.Values.prototype[y.symbols.values]=!0,_.Values.prototype.slice=_.Values.prototype.clone,_.lowercases=function(c){const f=new Map;if(c)for(const w of c)typeof w=="string"&&f.set(w.toLowerCase(),w);return f}},978:(i,s,a)=>{const l=a(375),d=a(8571),y=a(1687),_=a(9621),c={};i.exports=function(f,w){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(l(f&&typeof f=="object","Invalid defaults value: must be an object"),l(!w||w===!0||typeof w=="object","Invalid source value: must be true, falsy or an object"),l(typeof v=="object","Invalid options: must be an object"),!w)return null;if(v.shallow)return c.applyToDefaultsWithShallow(f,w,v);const p=d(f);if(w===!0)return p;const b=v.nullOverride!==void 0&&v.nullOverride;return y(p,w,{nullOverride:b,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,w,v){const p=v.shallow;l(Array.isArray(p),"Invalid keys");const b=new Map,g=w===!0?null:new Set;for(let T of p){T=Array.isArray(T)?T:T.split(".");const x=_(f,T);x&&typeof x=="object"?b.set(x,g&&_(w,T)||x):g&&g.add(T)}const m=d(f,{},b);if(!g)return m;for(const T of g)c.reachCopy(m,w,T);const h=v.nullOverride!==void 0&&v.nullOverride;return y(m,w,{nullOverride:h,mergeArrays:!1})},c.reachCopy=function(f,w,v){for(const g of v){if(!(g in w))return;const m=w[g];if(typeof m!="object"||m===null)return;w=m}const p=w;let b=f;for(let g=0;g{const l=a(7916);i.exports=function(d){if(!d){for(var y=arguments.length,_=new Array(y>1?y-1:0),c=1;c{const l=a(9621),d=a(4277),y=a(7043),_={needsProtoHack:new Set([d.set,d.map,d.weakSet,d.weakMap])};i.exports=_.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let v=_.clone,p=w;if(f.shallow){if(f.shallow!==!0)return _.cloneWithShallow(c,f);v=h=>h}else if(p){const h=p.get(c);if(h)return h}else p=new Map;const b=d.getInternalProto(c);if(b===d.buffer)return!1;if(b===d.date)return new Date(c.getTime());if(b===d.regex)return new RegExp(c);const g=_.base(c,b,f);if(g===c)return c;if(p&&p.set(c,g),b===d.set)for(const h of c)g.add(v(h,f,p));else if(b===d.map)for(const[h,T]of c)g.set(h,v(T,f,p));const m=y.keys(c,f);for(const h of m){if(h==="__proto__")continue;if(b===d.array&&h==="length"){g.length=c.length;continue}const T=Object.getOwnPropertyDescriptor(c,h);T?T.get||T.set?Object.defineProperty(g,h,T):T.enumerable?g[h]=v(c[h],f,p):Object.defineProperty(g,h,{enumerable:!1,writable:!0,configurable:!0,value:v(c[h],f,p)}):Object.defineProperty(g,h,{enumerable:!0,writable:!0,configurable:!0,value:v(c[h],f,p)})}return g},_.cloneWithShallow=function(c,f){const w=f.shallow;(f=Object.assign({},f)).shallow=!1;const v=new Map;for(const p of w){const b=l(c,p);typeof b!="object"&&typeof b!="function"||v.set(b,b)}return _.clone(c,f,v)},_.base=function(c,f,w){if(w.prototype===!1)return _.needsProtoHack.has(f)?new f.constructor:f===d.array?[]:{};const v=Object.getPrototypeOf(c);if(v&&v.isImmutable)return c;if(f===d.array){const p=[];return v!==f&&Object.setPrototypeOf(p,v),p}if(_.needsProtoHack.has(f)){const p=new v.constructor;return v!==f&&Object.setPrototypeOf(p,v),p}return Object.create(v)}},9474:(i,s,a)=>{const l=a(4277),d={mismatched:null};i.exports=function(y,_,c){return c=Object.assign({prototype:!0},c),!!d.isDeepEqual(y,_,c,[])},d.isDeepEqual=function(y,_,c,f){if(y===_)return y!==0||1/y==1/_;const w=typeof y;if(w!==typeof _||y===null||_===null)return!1;if(w==="function"){if(!c.deepFunction||y.toString()!==_.toString())return!1}else if(w!=="object")return y!=y&&_!=_;const v=d.getSharedType(y,_,!!c.prototype);switch(v){case l.buffer:return!1;case l.promise:return y===_;case l.regex:return y.toString()===_.toString();case d.mismatched:return!1}for(let p=f.length-1;p>=0;--p)if(f[p].isSame(y,_))return!0;f.push(new d.SeenEntry(y,_));try{return!!d.isDeepEqualObj(v,y,_,c,f)}finally{f.pop()}},d.getSharedType=function(y,_,c){if(c)return Object.getPrototypeOf(y)!==Object.getPrototypeOf(_)?d.mismatched:l.getInternalProto(y);const f=l.getInternalProto(y);return f!==l.getInternalProto(_)?d.mismatched:f},d.valueOf=function(y){const _=y.valueOf;if(_===void 0)return y;try{return _.call(y)}catch(c){return c}},d.hasOwnEnumerableProperty=function(y,_){return Object.prototype.propertyIsEnumerable.call(y,_)},d.isSetSimpleEqual=function(y,_){for(const c of Set.prototype.values.call(y))if(!Set.prototype.has.call(_,c))return!1;return!0},d.isDeepEqualObj=function(y,_,c,f,w){const{isDeepEqual:v,valueOf:p,hasOwnEnumerableProperty:b}=d,{keys:g,getOwnPropertySymbols:m}=Object;if(y===l.array){if(!f.part){if(_.length!==c.length)return!1;for(let P=0;P<_.length;++P)if(!v(_[P],c[P],f,w))return!1;return!0}for(const P of _)for(const E of c)if(v(P,E,f,w))return!0}else if(y===l.set){if(_.size!==c.size)return!1;if(!d.isSetSimpleEqual(_,c)){const P=new Set(Set.prototype.values.call(c));for(const E of Set.prototype.values.call(_)){if(P.delete(E))continue;let A=!1;for(const C of P)if(v(E,C,f,w)){P.delete(C),A=!0;break}if(!A)return!1}}}else if(y===l.map){if(_.size!==c.size)return!1;for(const[P,E]of Map.prototype.entries.call(_))if(E===void 0&&!Map.prototype.has.call(c,P)||!v(E,Map.prototype.get.call(c,P),f,w))return!1}else if(y===l.error&&(_.name!==c.name||_.message!==c.message))return!1;const h=p(_),T=p(c);if((_!==h||c!==T)&&!v(h,T,f,w))return!1;const x=g(_);if(!f.part&&x.length!==g(c).length&&!f.skip)return!1;let k=0;for(const P of x)if(f.skip&&f.skip.includes(P))c[P]===void 0&&++k;else if(!b(c,P)||!v(_[P],c[P],f,w))return!1;if(!f.part&&x.length-k!==g(c).length)return!1;if(f.symbols!==!1){const P=m(_),E=new Set(m(c));for(const A of P){if(!f.skip||!f.skip.includes(A)){if(b(_,A)){if(!b(c,A)||!v(_[A],c[A],f,w))return!1}else if(b(c,A))return!1}E.delete(A)}for(const A of E)if(b(c,A))return!1}return!0},d.SeenEntry=class{constructor(y,_){this.obj=y,this.ref=_}isSame(y,_){return this.obj===y&&this.ref===_}}},7916:(i,s,a)=>{const l=a(8761);i.exports=class extends Error{constructor(d){super(d.filter(y=>y!=="").map(y=>typeof y=="string"?y:y instanceof Error?y.message:l(y)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s.assert)}}},5277:i=>{const s={};i.exports=function(a){if(!a)return"";let l="";for(let d=0;d=256?"&#"+a+";":`&#x${a.toString(16).padStart(2,"0")};`)},s.isSafe=function(a){return s.safeCharCodes.has(a)},s.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),s.safeCharCodes=function(){const a=new Set;for(let l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&a.add(l);return a}()},6064:i=>{i.exports=function(s){return s.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,s,a)=>{const l=a(375),d=a(8571),y=a(7043),_={};i.exports=_.merge=function(c,f,w){if(l(c&&typeof c=="object","Invalid target value: must be an object"),l(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(w=Object.assign({nullOverride:!0,mergeArrays:!0},w),Array.isArray(f)){l(Array.isArray(c),"Cannot merge array onto an object"),w.mergeArrays||(c.length=0);for(let p=0;p{const l=a(375),d={};i.exports=function(y,_,c){if(_===!1||_==null)return y;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(_);l(!f||!c.separator,"Separator option is not valid for array-based chain");const w=f?_:_.split(c.separator||".");let v=y;for(let p=0;p{i.exports=function(){try{return JSON.stringify(...arguments)}catch(s){return"[Cannot display object: "+s.message+"]"}}},4277:(i,s)=>{const a={};s=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},a.typeMap=new Map([["[object Error]",s.error],["[object Map]",s.map],["[object Promise]",s.promise],["[object Set]",s.set],["[object WeakMap]",s.weakMap],["[object WeakSet]",s.weakSet]]),s.getInternalProto=function(l){if(Array.isArray(l))return s.array;if(l instanceof Date)return s.date;if(l instanceof RegExp)return s.regex;if(l instanceof Error)return s.error;const d=Object.prototype.toString.call(l);return a.typeMap.get(d)||s.generic}},7043:(i,s)=>{s.keys=function(a){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(a):Object.getOwnPropertyNames(a)}},3652:(i,s,a)=>{const l=a(375),d={};s.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(y,_){const c=[].concat((_=_||{}).before||[]),f=[].concat(_.after||[]),w=_.group||"?",v=_.sort||0;l(!c.includes(w),`Item cannot come before itself: ${w}`),l(!c.includes("?"),"Item cannot come before unassociated items"),l(!f.includes(w),`Item cannot come after itself: ${w}`),l(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(y)||(y=[y]);for(const p of y){const b={seq:this._items.length,sort:v,before:c,after:f,group:w,node:p};this._items.push(b)}if(!_.manual){const p=this._sort();l(p,"item",w!=="?"?`added into group ${w}`:"","created a dependencies error")}return this.nodes}merge(y){Array.isArray(y)||(y=[y]);for(const c of y)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(d.mergeSort);for(let c=0;cy.sort===_.sort?0:y.sort<_.sort?-1:1},5380:(i,s,a)=>{const l=a(443),d=a(2178),y={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:l.URL||URL};s.analyze=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_)return d.code("DOMAIN_NON_EMPTY_STRING");if(typeof _!="string")throw new Error("Invalid input: domain must be a string");if(_.length>256)return d.code("DOMAIN_TOO_LONG");if(!!y.nonAsciiRx.test(_)){if(c.allowUnicode===!1)return d.code("DOMAIN_INVALID_UNICODE_CHARS");_=_.normalize("NFC")}if(y.domainControlRx.test(_))return d.code("DOMAIN_INVALID_CHARS");_=y.punycode(_),c.allowFullyQualified&&_[_.length-1]==="."&&(_=_.slice(0,-1));const w=c.minDomainSegments||y.minDomainSegments,v=_.split(".");if(v.lengthc.maxDomainSegments)return d.code("DOMAIN_SEGMENTS_COUNT_MAX");const p=c.tlds;if(p){const b=v[v.length-1].toLowerCase();if(p.deny&&p.deny.has(b)||p.allow&&!p.allow.has(b))return d.code("DOMAIN_FORBIDDEN_TLDS")}for(let b=0;b63)return d.code("DOMAIN_LONG_SEGMENT");if(b{const l=a(9848),d=a(5380),y=a(2178),_={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.TextEncoder||TextEncoder)};s.analyze=function(c,f){return _.email(c,f)},s.isValid=function(c,f){return!_.email(c,f)},_.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return y.code("EMPTY_STRING");const w=!_.nonAsciiRx.test(c);if(!w){if(f.allowUnicode===!1)return y.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const v=c.split("@");if(v.length!==2)return v.length>2?y.code("MULTIPLE_AT_CHAR"):y.code("MISSING_AT_CHAR");const[p,b]=v;if(!p)return y.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return y.code("ADDRESS_TOO_LONG");if(_.encoder.encode(p).length>64)return y.code("LOCAL_TOO_LONG")}return _.local(p,w)||d.analyze(b,f)},_.local=function(c,f){const w=c.split(".");for(const v of w){if(!v.length)return y.code("EMPTY_LOCAL_SEGMENT");if(f){if(!_.atextRx.test(v))return y.code("INVALID_LOCAL_CHARS")}else for(const p of v){if(_.atextRx.test(p))continue;const b=_.binary(p);if(!_.atomRx.test(b))return y.code("INVALID_LOCAL_CHARS")}}},_.binary=function(c){return Array.from(_.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},_.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,_.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,s)=>{s.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},s.code=function(a){return{code:a,error:s.codes[a]}}},9959:(i,s,a)=>{const l=a(375),d=a(5752);s.regex=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};l(y.cidr===void 0||typeof y.cidr=="string","options.cidr must be a string");const _=y.cidr?y.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(_),"options.cidr must be one of required, optional, forbidden"),l(y.version===void 0||typeof y.version=="string"||Array.isArray(y.version),"options.version must be a string or an array of string");let c=y.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),l(c.length>=1,"options.version must have at least 1 version specified");for(let p=0;p{if(_==="forbidden")return d.ip[p];const b=`\\/${p==="ipv4"?d.ip.v4Cidr:d.ip.v6Cidr}`;return _==="required"?`${d.ip[p]}${b}`:`${d.ip[p]}(?:${b})?`}),w=`(?:${f.join("|")})`,v=new RegExp(`^${w}$`);return{cidr:_,versions:c,regex:v,raw:w}}},5752:(i,s,a)=>{const l=a(375),d=a(6064),y={generate:function(){const _={},c="!\\$&'\\(\\)\\*\\+,;=",f="\\w-\\.~%\\dA-Fa-f"+c+":@",w="["+f+"]",v="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";_.ipv4address="(?:"+v+"\\.){3}"+v;const p="[\\dA-Fa-f]{1,4}",b="(?:"+p+":"+p+"|"+_.ipv4address+")",g="(?:"+p+":){6}"+b,m="::(?:"+p+":){5}"+b,h="(?:"+p+")?::(?:"+p+":){4}"+b,T="(?:(?:"+p+":){0,1}"+p+")?::(?:"+p+":){3}"+b,x="(?:(?:"+p+":){0,2}"+p+")?::(?:"+p+":){2}"+b,k="(?:(?:"+p+":){0,3}"+p+")?::"+p+":"+b,P="(?:(?:"+p+":){0,4}"+p+")?::"+b;_.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",_.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",_.ipv6address="(?:"+g+"|"+m+"|"+h+"|"+T+"|"+x+"|"+k+"|"+P+"|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)",_.ipvFuture="v[\\dA-Fa-f]+\\.[\\w-\\.~"+c+":]+",_.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",_.schemeRegex=new RegExp(_.scheme);const E="[\\w-\\.~%\\dA-Fa-f"+c+":]*",A="(?:\\[(?:"+_.ipv6address+"|"+_.ipvFuture+")\\]|"+_.ipv4address+"|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})",C="(?:"+E+"@)?"+A+"(?::\\d*)?",N="(?:"+E+"@)?("+A+")(?::\\d*)?",$=w+"+",F="(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*",z="\\/(?:"+$+F+")?",U=$+F,H="[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=@]+"+F;return _.hierPart="(?:(?:\\/\\/"+C+F+")|"+z+"|"+U+"|(?:\\/\\/\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*))",_.hierPartCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+U+")",_.relativeRef="(?:(?:\\/\\/"+C+F+")|"+z+"|"+H+"|)",_.relativeRefCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+H+"|)",_.query="["+f+"\\/\\?]*(?=#|$)",_.queryWithSquareBrackets="["+f+"\\[\\]\\/\\?]*(?=#|$)",_.fragment="["+f+"\\/\\?]*",_}};y.rfc3986=y.generate(),s.ip={v4Cidr:y.rfc3986.ipv4Cidr,v6Cidr:y.rfc3986.ipv6Cidr,ipv4:y.rfc3986.ipv4address,ipv6:y.rfc3986.ipv6address,ipvfuture:y.rfc3986.ipvFuture},y.createRegex=function(_){const c=y.rfc3986,f="(?:\\?"+(_.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",w=_.domain?c.relativeRefCapture:c.relativeRef;if(_.relativeOnly)return y.wrap(w+f);let v="";if(_.scheme){l(_.scheme instanceof RegExp||typeof _.scheme=="string"||Array.isArray(_.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(_.scheme);l(g.length>=1,"scheme must have at least 1 scheme specified");const m=[];for(let h=0;h0&&arguments[0]!==void 0?arguments[0]:{};return _.scheme||_.allowRelative||_.relativeOnly||_.allowQuerySquareBrackets||_.domain?y.createRegex(_):y.uriRegex}},1447:(i,s)=>{const a={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*\.?[0-9]*){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};s.Parser=class{constructor(l){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d[a.settings]&&d.constants)for(const y in d.constants){const _=d.constants[y];if(_!==null&&!["boolean","number","string"].includes(typeof _))throw new Error(`Formula constant ${y} contains invalid ${typeof _} value type`)}this.settings=d[a.settings]?d:Object.assign({[a.settings]:!0,constants:{},functions:{}},d),this.single=null,this._parts=null,this._parse(l)}_parse(l){let d=[],y="",_=0,c=!1;const f=v=>{if(_)throw new Error("Formula missing closing parenthesis");const p=d.length?d[d.length-1]:null;if(c||y||v){if(p&&p.type==="reference"&&v===")")return p.type="function",p.value=this._subFormula(y,p.value),void(y="");if(v===")"){const b=new s.Parser(y,this.settings);d.push({type:"segment",value:b})}else if(c){if(c==="]")return d.push({type:"reference",value:y}),void(y="");d.push({type:"literal",value:y})}else if(a.operatorCharacters.includes(y))p&&p.type==="operator"&&a.operators.includes(p.value+y)?p.value+=y:d.push({type:"operator",value:y});else if(y.match(a.numberRx))d.push({type:"constant",value:parseFloat(y)});else if(this.settings.constants[y]!==void 0)d.push({type:"constant",value:this.settings.constants[y]});else{if(!y.match(a.tokenRx))throw new Error(`Formula contains invalid token: ${y}`);d.push({type:"reference",value:y})}y=""}};for(const v of l)c?v===c?(f(),c=!1):y+=v:_?v==="("?(y+=v,++_):v===")"?(--_,_?y+=v:f(v)):y+=v:v in a.literals?c=a.literals[v]:v==="("?(f(),++_):a.operatorCharacters.includes(v)?(f(),y=v,f()):v!==" "?y+=v:f();f(),d=d.map((v,p)=>v.type!=="operator"||v.value!=="-"||p&&d[p-1].type!=="operator"?v:{type:"operator",value:"n"});let w=!1;for(const v of d){if(v.type==="operator"){if(a.operatorsPrefix.includes(v.value))continue;if(!w)throw new Error("Formula contains an operator in invalid position");if(!a.operators.includes(v.value))throw new Error(`Formula contains an unknown operator ${v.value}`)}else if(w)throw new Error("Formula missing expected operator");w=!w}if(!w)throw new Error("Formula contains invalid trailing operator");d.length===1&&["reference","literal","constant"].includes(d[0].type)&&(this.single={type:d[0].type==="reference"?"reference":"value",value:d[0].value}),this._parts=d.map(v=>{if(v.type==="operator")return a.operatorsPrefix.includes(v.value)?v:v.value;if(v.type!=="reference")return v.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(v.value))throw new Error(`Formula contains invalid reference ${v.value}`);return this.settings.reference?this.settings.reference(v.value):a.reference(v.value)})}_subFormula(l,d){const y=this.settings.functions[d];if(typeof y!="function")throw new Error(`Formula contains unknown function ${d}`);let _=[];if(l){let c="",f=0,w=!1;const v=()=>{if(!c)throw new Error(`Formula contains function ${d} with invalid arguments ${l}`);_.push(c),c=""};for(let p=0;pnew s.Parser(c,this.settings)),function(c){const f=[];for(const w of _)f.push(w.evaluate(c));return y.call(c,...f)}}evaluate(l){const d=this._parts.slice();for(let y=d.length-2;y>=0;--y){const _=d[y];if(_&&_.type==="operator"){const c=d[y+1];d.splice(y+1,1);const f=a.evaluate(c,l);d[y]=a.single(_.value,f)}}return a.operatorsOrder.forEach(y=>{for(let _=1;_":return d>y;case">=":return d>=y;case"==":return d===y;case"!=":return d!==y;case"&&":return d&&y;case"||":return d||y}return null},a.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.7.0"}}},r={},function i(s){var a=r[s];if(a!==void 0)return a.exports;var l=r[s]={exports:{}};return n[s](l,l.exports,i),l.exports}(5107);var n,r})})(R$);const ye=Fp;function I$(e){const t={};return e.forEach(n=>{(n.kind==="text"||n.kind==="link")&&(t[n.key]=ye.string().allow("")),n.kind==="list"&&(t[n.key]=ye.array().allow(""))}),t}function N$(e){return ye.object().keys({id:ye.string().allow(""),civId:ye.string().allow(""),description:ye.string().allow("").required(),graphic:ye.string().allow(""),date:ye.string().allow(""),time:ye.string().allow(""),time_precision:ye.string().allow(""),location:ye.string().allow(""),latitude:ye.string().allow(""),longitude:ye.string().allow(""),x:ye.string().allow(""),y:ye.string().allow(""),z:ye.string().allow(""),type:ye.string().allow(""),category:ye.string().allow(""),category_full:ye.string().allow(""),associations:ye.array().default([]),sources:ye.array(),comments:ye.string().allow(""),time_display:ye.string().allow(""),narrative___stepStyles:ye.array(),shape:ye.string().allow(""),colour:ye.string().allow(""),...I$(e)}).and("latitude","longitude").or("date","latitude")}const O$=ye.object().keys({id:ye.string().required(),description:ye.string().allow("").required(),site:ye.string().required(),latitude:ye.string().required(),longitude:ye.string().required(),enabled:ye.string().allow("")}),M$=ye.object().keys({id:ye.string().allow("").required(),title:ye.string().allow("").required(),desc:ye.string().allow(""),mode:ye.string().allow("").required(),filter_paths:ye.array()}),D$=ye.object().keys({id:ye.string().required(),title:ye.string().allow(""),thumbnail:ye.string().allow(""),paths:ye.array().required(),type:ye.string().allow(""),affil_s:ye.array().allow(""),url:ye.string().allow(""),description:ye.string().allow(""),parent:ye.string().allow(""),author:ye.string().allow(""),date:ye.string().allow(""),notes:ye.string().allow("")}),$$=ye.object().keys({name:ye.string().required(),items:ye.array().required()}),F$=ye.object().keys({id:ye.string().allow(""),title:ye.string().allow(""),shape:ye.string().allow(""),colour:ye.string().allow("")});function zs(e,t,n){return{type:"error",id:t,message:`${e} ${t}: ${n}`}}function j$(e){return e instanceof Date&&!isNaN(e)}function z$(e){const t=new Set([]),n=[];return e.forEach(r=>{t.has(r.id)?n.push({id:r.id,error:zs("Association",r.id,"association was found more than once. Ignoring duplicate.")}):t.add(r.id)}),n}function B$(e,t){const n={events:[],sites:[],associations:[],sources:{},regions:[],shapes:[],notifications:e?e.notifications:null};if(e===void 0)return n;const r={events:[],sites:[],associations:[],sources:[],regions:[],shapes:[]};function i(y,_,c){const f=c.validate(y);if(f.error!=null){const w=y.id||"-",v=S0(_),p=zs(v,w,f.error.message);r[_].push(Object.assign(y,{error:p}))}else n[_].push(y)}function s(y,_,c){y.forEach(f=>{_==="events"&&f.date===""&&f.time===""||i(f,_,c)})}function a(y,_,c){Object.keys(y).forEach(f=>{if(f==="")return;const w=y[f],v=c.validate(w);if(v.error!=null){const p=w.id||"-",b=S0(_);r[_].push({...w,error:zs(b,p,v.error.message)})}else n[_][f]=w})}Array.isArray(t.CUSTOM_EVENT_FIELDS)||(t.CUSTOM_EVENT_FIELDS=[]);const l=N$(t.CUSTOM_EVENT_FIELDS);s(e.events,"events",l),s(e.sites,"sites",O$),s(e.associations,"associations",M$),a(e.sources,"sources",D$),s(e.regions,"regions",$$),s(e.shapes,"shapes",F$),n.regions=n.regions.map(y=>({name:y.name,points:y.items.map(_=>_.replace(/\s/g,"").split(","))})),n.shapes=n.shapes.reduce((y,_)=>(_.shape?y.push(_):r.shapes.push({..._,error:zs("events",_.id,"Invalid event shape. Please specify a shape for this type of event.")}),y),[]);const d=z$(e.associations);return d.length>0&&n.notifications.push({message:"Associations are required to be unique. Ignoring duplicates for now.",items:d,type:"error"}),n.associations=e.associations,n.events=n.events.filter((y,_)=>{let c="";if(y.civId=y.id,y.id=_,y.associations=y.associations.reduce((f,w)=>{const v=n.associations.find(p=>p.id===w);return v&&f.push(v),f},[]),y.shape){const f=n.shapes.find(w=>w.id===y.shape);f?y.shape=f:c="Failed to find related shape. Please verify shape type for event."}return y.latitude=y.latitude.replace(",","."),y.longitude=y.longitude.replace(",","."),y.datetime=QM(y.date,y.time),j$(y.datetime)||(c="Invalid date. It's been dropped, as otherwise timemap won't work as expected."),c?(r.events.push({...y,error:zs("events",y.id,c)}),!1):!0}),n.events.sort((y,_)=>y.datetime-_.datetime),Object.keys(r).forEach(y=>{const _=r[y].length;_&&n.notifications.push({message:`${_} invalid ${y} not displayed.`,items:r[y],type:"error"})}),n}function U$(e,t){return{...e,...B$(t.payload.domain,t.payload.features)}}function H$(e,t){return{...e,notifications:e.notifications.map(n=>({...n,isRead:!0}))}}function W$(e=id.domain,t){switch(t.type){case yg:return U$(e,t);case Fg:return H$(e);default:return e}}function V$(e,t){return Object.assign({},e,{highlighted:t.highlighted})}function q$(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,ticks:t.ticks}}}}function Z$(e,t){return Object.assign({},e,{selected:t.selected})}function G$(e,t){return{...e,associations:{...e.associations,coloringSet:t.coloringSet}}}function Y$(e,t){let[n,r]=Gg(e);const i=[180,180],s=[-180,-180];if(t.narrative){[n,r]=oE(e),t.narrative.steps.forEach(l=>{const d=l.datetime;dr&&(r=d),l.longitude&&l.latitude&&(+l.longitudes[1]&&(s[1]=+l.longitude),+l.latitudes[0]&&(s[0]=+l.latitude))});const a=t.narrative.steps[0];if(a.longitude&&a.latitude){const l=Math.abs(+a.longitude-i[1]),d=Math.abs(+a.longitude-s[1]),y=Math.abs(+a.latitude-i[0]),_=Math.abs(+a.latitude-s[0]);l>d&&(s[1]=+a.longitude+l),l_&&(s[0]=+a.latitude+y),y<_&&(i[0]=+a.latitude-_)}n=n-Math.abs((r-n)/10),r=r+Math.abs((r-n)/10)}return{...e,associations:{...e.associations,narrative:t.narrative},map:{...e.map,bounds:t.narrative?[i,s]:null},timeline:{...e.timeline,range:{...e.timeline.range,current:[n,r]}}}}function K$(e,t){return{...e,narrativeState:{current:t.idx}}}function X$(e,t){t.value instanceof Array||(t.value=[t.value]);const{association:n}=t;let r=e.associations[n].slice(0);return t.value.forEach(i=>{r.includes(i)?r=r.filter(s=>s!==i):r.push(i)}),{...e,associations:{...e.associations,[n]:r}}}function Q$(e,t){let n=[...e.shapes];if(n.includes(t.shape)){const r=n.indexOf(t.shape);n.splice(r,1)}else n.push(t.shape);return{...e,shapes:n}}function J$(e,t){return{...e,filters:{...e.filters,[t.filter]:[]}}}function e3(e,t){return{...e,timeline:{...e.timeline,range:{...e.timeline.range,current:[new Date(t.timerange[0]).toISOString(),new Date(t.timerange[1]).toISOString()]}}}}function t3(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,...t.dims}}}}function n3(e,t){const n=e.language==="es-MX"?"en-US":"es-MX";return Object.assign({},e,{language:t.language||n})}function r3(e,t){return{...e,source:t.source}}function i3(e,t){return{...e,error:t.message,notifications:[{type:"error",message:t.message}]}}const o3=Xi("isShowingSites"),s3=Xi("isFetchingDomain"),a3=Xi("isFetchingSources"),l3=Xi("isInfopopup"),u3=Xi("isIntropopup"),c3=Xi("isNotification"),d3=Xi("isCover");function f3(e,t){return{...e,errors:{...e.errors,source:t.msg}}}function h3(e){return{...e,loading:!0}}function p3(e){return{...e,loading:!1}}function m3(e,t){const n=t.values.reduce((r,i)=>(i.mode===Yn.CATEGORY&&r.push(i.title),r),[]);return{...e,associations:{...e.associations,categories:n}}}function g3(e,t){const n=t.values.map(r=>r.id);return{...e,shapes:n}}function v3(e,t){return{...e,searchQuery:t.searchQuery}}function y3(e=id.app,t){switch(t.type){case _g:return V$(e,t);case Jc:return Z$(e,t);case nd:return G$(e,t);case Lg:return q$(e,t);case wg:return J$(e,t);case ed:return X$(e,t);case bg:return Q$(e,t);case td:return e3(e,t);case kg:return t3(e,t);case Cg:return Y$(e,t);case Pg:return K$(e,t);case Ag:return r3(e,t);case Og:return n3(e,t);case Rg:return o3(e);case Ig:return s3(e);case Ng:return a3(e);case Mg:return l3(e);case Dg:return u3(e);case $g:return c3(e);case jg:return d3(e);case vg:return i3(e,t);case Ug:return f3(e,t);case Tg:return h3(e);case Sg:return p3(e);case Eg:return m3(e,t);case xg:return g3(e,t);case Bg:return v3(e,t);default:return e}}function _3(e=id.ui,t){switch(t.type){case zg:return{...e,tiles:{...e.tiles,current:e.tiles.current===e.tiles.satellite?e.tiles.default:e.tiles.satellite}};default:return e}}function w3(e=id.features,t){return e}function b3(e,t){return(n,r)=>t({...e(n,r)},r)}const T3=b3(S$,XT({app:y3,domain:W$,ui:_3,features:w3})),S3=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Km,E3=Zc(T3,S3(Tp(b2),Tp(T$)));var Mu={},x3={get exports(){return Mu},set exports(e){Mu=e}},Lf,N0;function k3(){if(N0)return Lf;N0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Lf=e,Lf}var Rf,O0;function C3(){if(O0)return Rf;O0=1;var e=k3();function t(){}function n(){}return n.resetWarningCache=t,Rf=function(){function r(a,l,d,y,_,c){if(c!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Rf}var M0;function De(){return M0||(M0=1,x3.exports=C3()()),Mu}var P3=De();const Tr=uc(P3);function ev(e){return t=>!!t.type&&t.type.tabsRole===e}const od=ev("Tab"),tv=ev("TabList"),nv=ev("TabPanel");function A3(e){return od(e)||tv(e)||nv(e)}function jp(e,t){return ee.Children.map(e,n=>n===null?null:A3(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"?ee.cloneElement(n,{...n.props,children:jp(n.props.children,t)}):n)}function hE(e,t){return ee.Children.forEach(e,n=>{n!==null&&(od(n)||nv(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"&&(tv(n)&&t(n),hE(n.props.children,t)))})}function pE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{od(n)&&t++}),t}function gE(e){return e&&"getAttribute"in e}function D0(e){return gE(e)&&e.getAttribute("data-rttab")}function xi(e){return gE(e)&&e.getAttribute("aria-disabled")==="true"}let Du;function L3(e){const t=e||(typeof window<"u"?window:void 0);try{Du=!!(typeof t<"u"&&t.document&&t.document.activeElement)}catch{Du=!1}}const R3={className:"react-tabs",focus:!1},iv=e=>{let t=ee.useRef([]),n=ee.useRef([]);const r=ee.useRef();function i(F,z){if(F<0||F>=y())return;const{onSelect:U,selectedIndex:H}=e;U(F,H,z)}function s(F){const z=y();for(let U=F+1;UF;)if(!xi(_(z)))return z;return F}function l(){const F=y();for(let z=0;z{let de=fe;if(tv(fe)){let ue=0,be=!1;Du==null&&L3(J);const ne=J||(typeof window<"u"?window:void 0);Du&&ne&&(be=wt.Children.toArray(fe.props.children).filter(od).some((O,j)=>ne.document.activeElement===_(j))),de=ee.cloneElement(fe,{children:jp(fe.props.children,O=>{const j=`tabs-${ue}`,V=W===ue,Z={tabRef:Q=>{t.current[j]=Q},id:n.current[ue],selected:V,focus:V&&(H||be)};return Y&&(Z.selectedClassName=Y),U&&(Z.disabledClassName=U),ue++,ee.cloneElement(O,Z)})})}else if(nv(fe)){const ue={id:n.current[F],selected:W===F};B&&(ue.forceRender=B),G&&(ue.selectedClassName=G),F++,de=ee.cloneElement(fe,ue)}return de})}function f(F){const{direction:z,disableUpDownKeys:U,disableLeftRightKeys:H}=e;if(v(F.target)){let{selectedIndex:B}=e,W=!1,Y=!1;(F.code==="Space"||F.keyCode===32||F.code==="Enter"||F.keyCode===13)&&(W=!0,Y=!1,w(F)),!H&&(F.keyCode===37||F.code==="ArrowLeft")||!U&&(F.keyCode===38||F.code==="ArrowUp")?(z==="rtl"?B=s(B):B=a(B),W=!0,Y=!0):!H&&(F.keyCode===39||F.code==="ArrowRight")||!U&&(F.keyCode===40||F.code==="ArrowDown")?(z==="rtl"?B=a(B):B=s(B),W=!0,Y=!0):F.keyCode===35||F.code==="End"?(B=d(),W=!0,Y=!0):(F.keyCode===36||F.code==="Home")&&(B=l(),W=!0,Y=!0),W&&F.preventDefault(),Y&&i(B,F)}}function w(F){let z=F.target;do if(v(z)){if(xi(z))return;const U=[].slice.call(z.parentNode.children).filter(D0).indexOf(z);i(U,F);return}while((z=z.parentNode)!=null)}function v(F){if(!D0(F))return!1;let z=F.parentElement;do{if(z===r.current)return!0;if(z.getAttribute("data-rttabs"))break;z=z.parentElement}while(z);return!1}const{children:p,className:b,disabledTabClassName:g,domRef:m,focus:h,forceRenderTabPanel:T,onSelect:x,selectedIndex:k,selectedTabClassName:P,selectedTabPanelClassName:E,environment:A,disableUpDownKeys:C,disableLeftRightKeys:N,...$}=e;return wt.createElement("div",Object.assign({},$,{className:rv(b),onClick:w,onKeyDown:f,ref:F=>{r.current=F,m&&m(F)},"data-rttabs":!0}),c())};iv.defaultProps=R3;iv.propTypes={};const I3=0,Vl=1,N3={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},O3=e=>e.selectedIndex===null?Vl:I3,sd=e=>{const{children:t,defaultFocus:n,defaultIndex:r,focusTabOnClick:i,onSelect:s}=e,[a,l]=ee.useState(n),[d]=ee.useState(O3(e)),[y,_]=ee.useState(d===Vl?r||0:null);if(ee.useEffect(()=>{l(!1)},[]),d===Vl){const w=mE(t);ee.useEffect(()=>{if(y!=null){const v=Math.max(0,w-1);_(Math.min(y,v))}},[w])}const c=(w,v,p)=>{typeof s=="function"&&s(w,v,p)===!1||(i&&l(!0),d===Vl&&_(w))};let f={...e};return f.focus=a,f.onSelect=c,y!=null&&(f.selectedIndex=y),delete f.defaultFocus,delete f.defaultIndex,delete f.focusTabOnClick,wt.createElement(iv,f,t)};sd.propTypes={};sd.defaultProps=N3;sd.tabsRole="Tabs";const M3={className:"react-tabs__tab-list"},ad=e=>{const{children:t,className:n,...r}=e;return wt.createElement("ul",Object.assign({},r,{className:rv(n),role:"tablist"}),t)};ad.tabsRole="TabList";ad.propTypes={};ad.defaultProps=M3;const $0="react-tabs__tab-panel",D3={className:$0,forceRender:!1,selectedClassName:`${$0}--selected`},Yr=e=>{const{children:t,className:n,forceRender:r,id:i,selected:s,selectedClassName:a,...l}=e;return wt.createElement("div",Object.assign({},l,{className:rv(n,{[a]:s}),role:"tabpanel",id:`panel${i}`,"aria-labelledby":`tab${i}`}),r||s?t:null)};Yr.tabsRole="TabPanel";Yr.propTypes={};Yr.defaultProps=D3;const vE=({label:e,isActive:t,onClickCheckbox:n,color:r,styleProps:i})=>{const s=r||YM,a={checkboxStyles:{background:t?s:"none",border:`1px solid ${s}`}},l=i?i.containerStyles:{},d=i?i.checkboxStyles:a.checkboxStyles,y=e.toLowerCase().replaceAll(" ","-"),_=c=>{c.stopPropagation(),n(c)};return ie("div",{className:t?"item active":"item",onClick:_,children:[M("button",{id:y,onClick:_,children:M("div",{className:"border",style:l,children:M("div",{className:"checkbox",style:d})})}),M("label",{htmlFor:y,style:{color:r},children:e})]})};function yE(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let es=yE();function $3(e){es=e}const _E=/[&<>"']/,F3=new RegExp(_E.source,"g"),wE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,j3=new RegExp(wE.source,"g"),z3={"&":"&","<":"<",">":">",'"':""","'":"'"},F0=e=>z3[e];function Ft(e,t){if(t){if(_E.test(e))return e.replace(F3,F0)}else if(wE.test(e))return e.replace(j3,F0);return e}const B3=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function bE(e){return e.replace(B3,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const U3=/(^|[^\[])\^/g;function Ye(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(U3,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const H3=/[^\w:]/g,W3=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function j0(e,t,n){if(e){let r;try{r=decodeURIComponent(bE(n)).replace(H3,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!W3.test(n)&&(n=G3(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const kl={},V3=/^[^:]+:\/*[^/]*$/,q3=/^([^:]+:)[\s\S]*$/,Z3=/^([^:]+:\/*[^/]*)[\s\S]*$/;function G3(e,t){kl[" "+e]||(V3.test(e)?kl[" "+e]=e+"/":kl[" "+e]=ql(e,"/",!0)),e=kl[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(q3,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Z3,"$1")+t:e+t}const $u={exec:function(){}};function Xn(e){let t=1,n,r;for(;t{let d=!1,y=a;for(;--y>=0&&l[y]==="\\";)d=!d;return d?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function U0(e,t,n,r){const i=t.href,s=t.title?Ft(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:s,text:Ft(a)}}function K3(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(` +Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/forensic-architecture/timemap) for more information around how to specify custom covers.`,exploreButton:"EXPLORE"},toolbar:{panels:{categories:{default:{icon:Ls.CATEGORY,label:Ue[ht].toolbar.categories_label,title:Ue[ht].toolbar.explore_by_category__title,description:Ue[ht].toolbar.explore_by_category__description}},filters:{icon:Ls.FILTER,label:Ue[ht].toolbar.filters_label,title:Ue[ht].toolbar.explore_by_filter__title,description:Ue[ht].toolbar.explore_by_filter__description},narratives:{icon:Ls.NARRATIVE,label:Ue[ht].toolbar.narratives_label,title:Ue[ht].toolbar.explore_by_narrative__title,description:Ue[ht].toolbar.explore_by_narrative__description},shapes:{icon:Ls.SHAPE,label:Ue[ht].toolbar.shapes_label,title:Ue[ht].toolbar.explore_by_shape__title,description:Ue[ht].toolbar.explore_by_shape__description},download:{icon:Ls.DOWNLOAD,label:Ue[ht].toolbar.download.button,title:Ue[ht].toolbar.download.panel.title,description:Ue[ht].toolbar.download.panel.description}}},loading:!1},ui:{tiles:{current:"openstreetmap",default:"openstreetmap",satellite:"satellite"},style:{categories:{default:qn.fallbackEventColor},narratives:{default:{opacity:.9,stroke:qn.fallbackEventColor,strokeWidth:3}},regions:{default:{stroke:"blue",strokeWidth:3,opacity:.9}},clusters:{radial:!1}},card:{layout:{template:"basic"}},coloring:{maxNumOfColors:4,colors:Object.values(js)},dom:{timeline:"timeline",timeslider:"timeslider",map:"map"},eventRadius:8},features:{USE_COVER:!1,USE_ASSOCIATIONS:!1,USE_SITES:!1,USE_SOURCES:!1,USE_REGIONS:!1,GRAPH_NONLOCATED:!1,HIGHLIGHT_GROUPS:!1}};let Zn;It.store?Zn=Jg(It.store,I0):Zn=I0;Zn.app.flags.isIntropopup=!!Zn.app.intro;"map"in Zn.app&&(Zn.app.map=Jg(Zn.app.map,P$));"space3d"in Zn.app&&(Zn.app.space3d=Jg(Zn.app.space3d,L$));const id=Zn;var Fp={},R$={get exports(){return Fp},set exports(e){Fp=e}};(function(e,t){(function(n,r){e.exports=r()})(self,()=>{return n={7629:(i,s,a)=>{const l=a(375),d=a(8571),y=a(9474),_=a(1687),c=a(8652),f=a(8160),w=a(3292),v=a(6354),p=a(8901),b=a(9708),g=a(6914),m=a(2294),h=a(6133),T=a(1152),x=a(8863),k=a(2036),A={Base:class{constructor(E){this.type=E,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new m.Ids,this._preferences=null,this._refs=new h.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return l(typeof b.describe=="function","Manifest functionality disabled"),b.describe(this)}allow(){for(var E=arguments.length,P=new Array(E),C=0;C1&&arguments[1]!==void 0?arguments[1]:{};return l(E!==void 0,"Missing example"),f.assertOptions(P,["override"]),this._inner("examples",E,{single:!0,override:P.override})}external(E,P){return typeof E=="object"&&(l(!P,"Cannot combine options with description"),P=E.description,E=E.method),l(typeof E=="function","Method must be a function"),l(P===void 0||P&&typeof P=="string","Description must be a non-empty string"),this._inner("externals",{method:E,description:P},{single:!0})}failover(E,P){return this._default("failover",E,P)}forbidden(){return this.presence("forbidden")}id(E){return E?(l(typeof E=="string","id must be a non-empty string"),l(/^[^\.]+$/.test(E),"id cannot contain period character"),this.$_setFlag("id",E)):this.$_setFlag("id",void 0)}invalid(){for(var E=arguments.length,P=new Array(E),C=0;C0&&arguments[0]!==void 0)||arguments[0];return l(typeof E=="boolean","Invalid mode:",E),this.$_setFlag("only",E)}optional(){return this.presence("optional")}prefs(E){l(E,"Missing preferences"),l(E.context===void 0,"Cannot override context"),l(E.externals===void 0,"Cannot override externals"),l(E.warnings===void 0,"Cannot override warnings"),l(E.debug===void 0,"Cannot override debug"),f.checkPreferences(E);const P=this.clone();return P._preferences=f.preferences(P._preferences,E),P}presence(E){return l(["optional","required","forbidden"].includes(E),"Unknown presence mode",E),this.$_setFlag("presence",E)}raw(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"raw":void 0)}result(E){return l(["raw","strip"].includes(E),"Unknown result mode",E),this.$_setFlag("result",E)}required(){return this.presence("required")}strict(E){const P=this.clone(),C=E!==void 0&&!E;return P._preferences=f.preferences(P._preferences,{convert:C}),P}strip(){let E=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("result",E?"strip":void 0)}tag(){for(var E=arguments.length,P=new Array(E),C=0;CN.keep||N.name!==C),P._singleRules.delete(C));for(const C of E._rules)E._definition.rules[C.method].multi||P._singleRules.set(C.name,C),P._rules.push(C);if(P._flags.empty&&E._flags.empty){P._flags.empty=P._flags.empty.concat(E._flags.empty);const C=Object.assign({},E._flags);delete C.empty,_(P._flags,C)}else if(E._flags.empty){P._flags.empty=E._flags.empty;const C=Object.assign({},E._flags);delete C.empty,_(P._flags,C)}else _(P._flags,E._flags);for(const C in E.$_terms){const N=E.$_terms[C];N?P.$_terms[C]?P.$_terms[C]=P.$_terms[C].concat(N):P.$_terms[C]=N.slice():P.$_terms[C]||(P.$_terms[C]=N)}return this.$_root._tracer&&this.$_root._tracer._combine(P,[this,E]),P.$_mutateRebuild()}extend(E){return l(!E.base,"Cannot extend type with another base"),p.type(this,E)}extract(E){return E=Array.isArray(E)?E:E.split("."),this._ids.reach(E)}fork(E,P){l(!this._inRuleset(),"Cannot fork inside a ruleset");let C=this;for(let N of[].concat(E))N=Array.isArray(N)?N:N.split("."),C=C._ids.fork(N,P,C);return C.$_temp.ruleset=!1,C}rule(E){const P=this._definition;f.assertOptions(E,Object.keys(P.modifiers)),l(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const C=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;l(C>=0&&CC.tailor(E),ref:!1}),P.$_temp.ruleset=!1,P.$_mutateRebuild()}tracer(){return T.location?T.location(this):this}validate(E,P){return x.entry(E,this,P)}validateAsync(E,P){return x.entryAsync(E,this,P)}$_addRule(E){typeof E=="string"&&(E={name:E}),l(E&&typeof E=="object","Invalid options"),l(E.name&&typeof E.name=="string","Invalid rule name");for(const F in E)l(F[0]!=="_","Cannot set private rule properties");const P=Object.assign({},E);P._resolve=[],P.method=P.method||P.name;const C=this._definition.rules[P.method],N=P.args;l(C,"Unknown rule",P.method);const $=this.clone();if(N){l(Object.keys(N).length===1||Object.keys(N).length===this._definition.rules[P.name].args.length,"Invalid rule definition for",this.type,P.name);for(const F in N){let z=N[F];if(C.argsByName){const U=C.argsByName.get(F);if(U.ref&&f.isResolvable(z))P._resolve.push(F),$.$_mutateRegister(z);else if(U.normalize&&(z=U.normalize(z),N[F]=z),U.assert){const H=f.validateArg(z,F,U);l(!H,H,"or reference")}}z!==void 0?N[F]=z:delete N[F]}}return C.multi||($._ruleRemove(P.name,{clone:!1}),$._singleRules.set(P.name,P)),$.$_temp.ruleset===!1&&($.$_temp.ruleset=null),C.priority?$._rules.unshift(P):$._rules.push(P),$}$_compile(E,P){return w.schema(this.$_root,E,P)}$_createError(E,P,C,N,$){let F=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};const z=F.flags!==!1?this._flags:{},U=F.messages?g.merge(this._definition.messages,F.messages):this._definition.messages;return new v.Report(E,P,C,z,U,N,$)}$_getFlag(E){return this._flags[E]}$_getRule(E){return this._singleRules.get(E)}$_mapLabels(E){return E=Array.isArray(E)?E:E.split("."),this._ids.labels(E)}$_match(E,P,C,N){(C=Object.assign({},C)).abortEarly=!0,C._externals=!1,P.snapshot();const $=!x.validate(E,this,P,C,N).errors;return P.restore(),$}$_modify(E){return f.assertOptions(E,["each","once","ref","schema"]),m.schema(this,E)||this}$_mutateRebuild(){return l(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(E,P)=>{let{source:C,name:N,path:$,key:F}=P;const z=this._definition[C][N]&&this._definition[C][N].register;z!==!1&&this.$_mutateRegister(E,{family:z,key:F})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(E){let{family:P,key:C}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._refs.register(E,P),this._ids.register(E,{key:C})}$_property(E){return this._definition.properties[E]}$_reach(E){return this._ids.reach(E)}$_rootReferences(){return this._refs.roots()}$_setFlag(E,P){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(E[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const N=this._definition.flags[E]||{};if(y(P,N.default)&&(P=void 0),y(P,this._flags[E]))return this;const $=C.clone!==!1?this.clone():this;return P!==void 0?($._flags[E]=P,$.$_mutateRegister(P)):delete $._flags[E],E[0]!=="_"&&($.$_temp.ruleset=!1),$}$_parent(E){for(var P=arguments.length,C=new Array(P>1?P-1:0),N=1;N2&&arguments[2]!==void 0?arguments[2]:{};return f.assertOptions(C,"literal"),l(P!==void 0,"Missing",E,"value"),l(typeof P=="function"||!C.literal,"Only function value supports literal option"),typeof P=="function"&&C.literal&&(P={[f.symbols.literal]:!0,literal:P}),this.$_setFlag(E,P)}_generate(E,P,C){if(!this.$_terms.whens)return{schema:this};const N=[],$=[];for(let U=0;UY)break}const F=$.join(", ");if(P.mainstay.tracer.debug(P,"rule","when",F),!F)return{schema:this};if(!P.mainstay.tracer.active&&this.$_temp.whens[F])return{schema:this.$_temp.whens[F],id:F};let z=this;this._definition.generate&&(z=this._definition.generate(this,E,P,C));for(const U of N)z=z.concat(U);return this.$_root._tracer&&this.$_root._tracer._combine(z,[this,...N]),this.$_temp.whens[F]=z,{schema:z,id:F}}_inner(E,P){let C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};l(!this._inRuleset(),`Cannot set ${E} inside a ruleset`);const N=this.clone();return N.$_terms[E]&&!C.override||(N.$_terms[E]=[]),C.single?N.$_terms[E].push(P):N.$_terms[E].push(...P),N.$_temp.ruleset=!1,N}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(E){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this._singleRules.has(E))return this;const C=P.clone!==!1?this.clone():this;C._singleRules.delete(E);const N=[];for(let $=0;${const l=a(375),d=a(8571),y=a(8160),_={max:1e3,supported:new Set(["undefined","boolean","number","string"])};s.provider={provision:c=>new _.Cache(c)},_.Cache=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};y.assertOptions(c,["max"]),l(c.max===void 0||c.max&&c.max>0&&isFinite(c.max),"Invalid max cache size"),this._max=c.max||_.max,this._map=new Map,this._list=new _.List}get length(){return this._map.size}set(c,f){if(c!==null&&!_.supported.has(typeof c))return;let w=this._map.get(c);if(w)return w.value=f,void this._list.first(w);w=this._list.unshift({key:c,value:f}),this._map.set(c,w),this._compact()}get(c){const f=this._map.get(c);if(f)return this._list.first(f),d(f.value)}_compact(){if(this._map.size>this._max){const c=this._list.pop();this._map.delete(c.key)}}},_.List=class{constructor(){this.tail=null,this.head=null}unshift(c){return c.next=null,c.prev=this.head,this.head&&(this.head.next=c),this.head=c,this.tail||(this.tail=c),c}first(c){c!==this.head&&(this._remove(c),this.unshift(c))}pop(){return this._remove(this.tail)}_remove(c){const{next:f,prev:w}=c;return f.prev=w,w&&(w.next=f),c===this.tail&&(this.tail=f),c.prev=null,c.next=null,c}}},8160:(i,s,a)=>{const l=a(375),d=a(7916),y=a(5934);let _,c;const f={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};s.version=y.version,s.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},s.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},s.assertOptions=function(w,v){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"Options";l(w&&typeof w=="object"&&!Array.isArray(w),"Options must be of type object");const b=Object.keys(w).filter(g=>!v.includes(g));l(b.length===0,`${p} contain unknown keys: ${b}`)},s.checkPreferences=function(w){c=c||a(3378);const v=c.preferences.validate(w);if(v.error)throw new d([v.error.details[0].message])},s.compare=function(w,v,p){switch(p){case"=":return w===v;case">":return w>v;case"<":return w=":return w>=v;case"<=":return w<=v}},s.default=function(w,v){return w===void 0?v:w},s.isIsoDate=function(w){return f.isoDate.test(w)},s.isNumber=function(w){return typeof w=="number"&&!isNaN(w)},s.isResolvable=function(w){return!!w&&(w[s.symbols.ref]||w[s.symbols.template])},s.isSchema=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const p=w&&w[s.symbols.any];return!!p&&(l(v.legacy||p.version===s.version,"Cannot mix different versions of joi schemas"),!0)},s.isValues=function(w){return w[s.symbols.values]},s.limit=function(w){return Number.isSafeInteger(w)&&w>=0},s.preferences=function(w,v){_=_||a(6914),w=w||{},v=v||{};const p=Object.assign({},w,v);return v.errors&&w.errors&&(p.errors=Object.assign({},w.errors,v.errors),p.errors.wrap=Object.assign({},w.errors.wrap,v.errors.wrap)),v.messages&&(p.messages=_.compile(v.messages,w.messages)),delete p[s.symbols.prefs],p},s.tryWithPath=function(w,v){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};try{return w()}catch(b){throw b.path!==void 0?b.path=v+"."+b.path:b.path=v,p.append&&(b.message=`${b.message} (${b.path})`),b}},s.validateArg=function(w,v,p){let{assert:b,message:g}=p;if(s.isSchema(b)){const m=b.validate(w);return m.error?m.error.message:void 0}if(!b(w))return v?`${v} ${g}`:g},s.verifyFlat=function(w,v){for(const p of w)l(!Array.isArray(p),"Method no longer accepts array arguments:",v)}},3292:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.schema=function(c,f){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["appendPath","override"]);try{return _.schema(c,f,w)}catch(v){throw w.appendPath&&v.path!==void 0&&(v.message=`${v.message} (${v.path})`),v}},_.schema=function(c,f,w){l(f!==void 0,"Invalid undefined schema"),Array.isArray(f)&&(l(f.length,"Invalid empty array schema"),f.length===1&&(f=f[0]));const v=function(p){for(var b=arguments.length,g=new Array(b>1?b-1:0),m=1;m2&&arguments[2]!==void 0?arguments[2]:{};d.assertOptions(w,["legacy"]);const v=f&&f[d.symbols.any];if(v)return l(w.legacy||v.version===d.version,"Cannot mix different versions of joi schemas:",v.version,d.version),f;if(typeof f!="object"||!w.legacy)return s.schema(c,f,{appendPath:!0});const p=_.walk(f);return p?p.compile(p.root,f):s.schema(c,f,{appendPath:!0})},_.walk=function(c){if(typeof c!="object")return null;if(Array.isArray(c)){for(const w of c){const v=_.walk(w);if(v)return v}return null}const f=c[d.symbols.any];if(f)return{root:c[f.root],compile:f.compile};l(Object.getPrototypeOf(c)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const w in c){const v=_.walk(c[w]);if(v)return v}return null},_.simple=function(c){return c===null||["boolean","string","number"].includes(typeof c)},s.when=function(c,f,w){if(w===void 0&&(l(f&&typeof f=="object","Missing options"),w=f,f=y.create(".")),Array.isArray(w)&&(w={switch:w}),d.assertOptions(w,["is","not","then","otherwise","switch","break"]),d.isSchema(f))return l(w.is===void 0,'"is" can not be used with a schema condition'),l(w.not===void 0,'"not" can not be used with a schema condition'),l(w.switch===void 0,'"switch" can not be used with a schema condition'),_.condition(c,{is:f,then:w.then,otherwise:w.otherwise,break:w.break});if(l(y.isRef(f)||typeof f=="string","Invalid condition:",f),l(w.not===void 0||w.is===void 0,'Cannot combine "is" with "not"'),w.switch===void 0){let p=w;w.not!==void 0&&(p={is:w.not,then:w.otherwise,otherwise:w.then,break:w.break});let b=p.is!==void 0?c.$_compile(p.is):c.$_root.invalid(null,!1,0,"").required();return l(p.then!==void 0||p.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(p.break===void 0||p.then===void 0||p.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),w.is===void 0||y.isRef(w.is)||d.isSchema(w.is)||(b=b.required()),_.condition(c,{ref:s.ref(f),is:b,then:p.then,otherwise:p.otherwise,break:p.break})}l(Array.isArray(w.switch),'"switch" must be an array'),l(w.is===void 0,'Cannot combine "switch" with "is"'),l(w.not===void 0,'Cannot combine "switch" with "not"'),l(w.then===void 0,'Cannot combine "switch" with "then"');const v={ref:s.ref(f),switch:[],break:w.break};for(let p=0;p{const l=a(5688),d=a(8160),y=a(3328);s.Report=class{constructor(_,c,f,w,v,p,b){if(this.code=_,this.flags=w,this.messages=v,this.path=p.path,this.prefs=b,this.state=p,this.value=c,this.message=null,this.template=null,this.local=f||{},this.local.label=s.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const g=this.path[this.path.length-1];typeof g!="object"&&(this.local.key=g)}}_setTemplate(_){if(this.template=_,!this.flags.label&&this.path.length===0){const c=this._template(this.template,"root");c&&(this.local.label=c)}}toString(){if(this.message)return this.message;const _=this.code;if(!this.prefs.errors.render)return this.code;const c=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return c===void 0?`Error code "${_}" is not defined, your custom type is missing the correct messages definition`:(this.message=c.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(_,c){return s.template(this.value,_,c||this.code,this.state,this.prefs)}},s.path=function(_){let c="";for(const f of _)typeof f!="object"&&(typeof f=="string"?(c&&(c+="."),c+=f):c+=`[${f}]`);return c},s.template=function(_,c,f,w,v){if(!c)return;if(y.isTemplate(c))return f!=="root"?c:null;let p=v.errors.language;if(d.isResolvable(p)&&(p=p.resolve(_,w,v)),p&&c[p]){if(c[p][f]!==void 0)return c[p][f];if(c[p]["*"]!==void 0)return c[p]["*"]}return c[f]?c[f]:c["*"]},s.label=function(_,c,f,w){if(_.label)return _.label;if(!f.errors.label)return"";let v=c.path;return f.errors.label==="key"&&c.path.length>1&&(v=c.path.slice(-1)),s.path(v)||s.template(null,f.messages,"root",c,f)||w&&s.template(null,w,"root",c,f)||"value"},s.process=function(_,c,f){if(!_)return null;const{override:w,message:v,details:p}=s.details(_);if(w)return w;if(f.errors.stack)return new s.ValidationError(v,p,c);const b=Error.stackTraceLimit;Error.stackTraceLimit=0;const g=new s.ValidationError(v,p,c);return Error.stackTraceLimit=b,g},s.details=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=[];const w=[];for(const v of _){if(v instanceof Error){if(c.override!==!1)return{override:v};const b=v.toString();f.push(b),w.push({message:b,type:"override",context:{error:v}});continue}const p=v.toString();f.push(p),w.push({message:p,path:v.path.filter(b=>typeof b!="object"),type:v.code,context:v.local})}return f.length>1&&(f=[...new Set(f)]),{message:f.join(". "),details:w}},s.ValidationError=class extends Error{constructor(_,c,f){super(_),this._original=f,this.details=c}static isError(_){return _ instanceof s.ValidationError}},s.ValidationError.prototype.isJoi=!0,s.ValidationError.prototype.name="ValidationError",s.ValidationError.prototype.annotate=l.error},8901:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8160),_=a(6914),c={};s.type=function(f,w){const v=Object.getPrototypeOf(f),p=d(v),b=f._assign(Object.create(p)),g=Object.assign({},w);delete g.base,p._definition=g;const m=v._definition||{};g.messages=_.merge(m.messages,g.messages),g.properties=Object.assign({},m.properties,g.properties),b.type=g.type,g.flags=Object.assign({},m.flags,g.flags);const h=Object.assign({},m.terms);if(g.terms)for(const A in g.terms){const E=g.terms[A];l(b.$_terms[A]===void 0,"Invalid term override for",g.type,A),b.$_terms[A]=E.init,h[A]=E}g.terms=h,g.args||(g.args=m.args),g.prepare=c.prepare(g.prepare,m.prepare),g.coerce&&(typeof g.coerce=="function"&&(g.coerce={method:g.coerce}),g.coerce.from&&!Array.isArray(g.coerce.from)&&(g.coerce={method:g.coerce.method,from:[].concat(g.coerce.from)})),g.coerce=c.coerce(g.coerce,m.coerce),g.validate=c.validate(g.validate,m.validate);const T=Object.assign({},m.rules);if(g.rules)for(const A in g.rules){const E=g.rules[A];l(typeof E=="object","Invalid rule definition for",g.type,A);let P=E.method;if(P===void 0&&(P=function(){return this.$_addRule(A)}),P&&(l(!p[A],"Rule conflict in",g.type,A),p[A]=P),l(!T[A],"Rule conflict in",g.type,A),T[A]=E,E.alias){const C=[].concat(E.alias);for(const N of C)p[N]=E.method}E.args&&(E.argsByName=new Map,E.args=E.args.map(C=>(typeof C=="string"&&(C={name:C}),l(!E.argsByName.has(C.name),"Duplicated argument name",C.name),y.isSchema(C.assert)&&(C.assert=C.assert.strict().label(C.name)),E.argsByName.set(C.name,C),C)))}g.rules=T;const x=Object.assign({},m.modifiers);if(g.modifiers)for(const A in g.modifiers){l(!p[A],"Rule conflict in",g.type,A);const E=g.modifiers[A];l(typeof E=="function","Invalid modifier definition for",g.type,A);const P=function(C){return this.rule({[A]:C})};p[A]=P,x[A]=E}if(g.modifiers=x,g.overrides){p._super=v,b.$_super={};for(const A in g.overrides)l(v[A],"Cannot override missing",A),g.overrides[A][y.symbols.parent]=v[A],b.$_super[A]=v[A].bind(b);Object.assign(p,g.overrides)}g.cast=Object.assign({},m.cast,g.cast);const k=Object.assign({},m.manifest,g.manifest);return k.build=c.build(g.manifest&&g.manifest.build,m.manifest&&m.manifest.build),g.manifest=k,g.rebuild=c.rebuild(g.rebuild,m.rebuild),b},c.build=function(f,w){return f&&w?function(v,p){return w(f(v,p),p)}:f||w},c.coerce=function(f,w){return f&&w?{from:f.from&&w.from?[...new Set([...f.from,...w.from])]:null,method(v,p){let b;if((!w.from||w.from.includes(typeof v))&&(b=w.method(v,p),b)){if(b.errors||b.value===void 0)return b;v=b.value}if(!f.from||f.from.includes(typeof v)){const g=f.method(v,p);if(g)return g}return b}}:f||w},c.prepare=function(f,w){return f&&w?function(v,p){const b=f(v,p);if(b){if(b.errors||b.value===void 0)return b;v=b.value}return w(v,p)||b}:f||w},c.rebuild=function(f,w){return f&&w?function(v){w(v),f(v)}:f||w},c.validate=function(f,w){return f&&w?function(v,p){const b=w(v,p);if(b){if(b.errors&&(!Array.isArray(b.errors)||b.errors.length))return b;v=b.value}return f(v,p)||b}:f||w}},5107:(i,s,a)=>{const l=a(375),d=a(8571),y=a(8652),_=a(8160),c=a(3292),f=a(6354),w=a(8901),v=a(9708),p=a(6133),b=a(3328),g=a(1152);let m;const h={types:{alternatives:a(4946),any:a(8068),array:a(546),boolean:a(4937),date:a(7500),function:a(390),link:a(8785),number:a(3832),object:a(8966),string:a(7417),symbol:a(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const T={_types:new Set(Object.keys(h.types))};for(const x of T._types)T[x]=function(){for(var k=arguments.length,A=new Array(k),E=0;E2?k-2:0),E=2;E2?k-2:0),E=2;E{const l=a(375),d=a(8571),y=a(3328);s.compile=function(_,c){if(typeof _=="string")return l(!c,"Cannot set single message string"),new y(_);if(y.isTemplate(_))return l(!c,"Cannot set single message template"),_;l(typeof _=="object"&&!Array.isArray(_),"Invalid message options"),c=c?d(c):{};for(let f in _){const w=_[f];if(f==="root"||y.isTemplate(w)){c[f]=w;continue}if(typeof w=="string"){c[f]=new y(w);continue}l(typeof w=="object"&&!Array.isArray(w),"Invalid message for",f);const v=f;for(f in c[v]=c[v]||{},w){const p=w[f];f==="root"||y.isTemplate(p)?c[v][f]=p:(l(typeof p=="string","Invalid message for",f,"in",v),c[v][f]=new y(p))}}return c},s.decompile=function(_){const c={};for(let f in _){const w=_[f];if(f==="root"){c.root=w;continue}if(y.isTemplate(w)){c[f]=w.describe({compact:!0});continue}const v=f;for(f in c[v]={},w){const p=w[f];f!=="root"?c[v][f]=p.describe({compact:!0}):c[v].root=p}}return c},s.merge=function(_,c){if(!_)return s.compile(c);if(!c)return _;if(typeof c=="string")return new y(c);if(y.isTemplate(c))return c;const f=d(_);for(let w in c){const v=c[w];if(w==="root"||y.isTemplate(v)){f[w]=v;continue}if(typeof v=="string"){f[w]=new y(v);continue}l(typeof v=="object"&&!Array.isArray(v),"Invalid message for",w);const p=w;for(w in f[p]=f[p]||{},v){const b=v[w];w==="root"||y.isTemplate(b)?f[p][w]=b:(l(typeof b=="string","Invalid message for",w,"in",p),f[p][w]=new y(b))}}return f}},2294:(i,s,a)=>{const l=a(375),d=a(8160),y=a(6133),_={};s.Ids=_.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const c=new _.Ids;return c._byId=new Map(this._byId),c._byKey=new Map(this._byKey),c._schemaChain=this._schemaChain,c}concat(c){c._schemaChain&&(this._schemaChain=!0);for(const[f,w]of c._byId.entries())l(!this._byKey.has(f),"Schema id conflicts with existing key:",f),this._byId.set(f,w);for(const[f,w]of c._byKey.entries())l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,w)}fork(c,f,w){const v=this._collect(c);v.push({schema:w});const p=v.shift();let b={id:p.id,schema:f(p.schema)};l(d.isSchema(b.schema),"adjuster function failed to return a joi schema type");for(const g of v)b={id:g.id,schema:_.fork(g.schema,b.id,b.schema)};return b.schema}labels(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);if(!v)return[...f,...c].join(".");const p=c.slice(1);return f=[...f,v.schema._flags.label||w],p.length?v.schema._ids.labels(p,f):f.join(".")}reach(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const w=c[0],v=this._get(w);l(v,"Schema does not contain path",[...f,...c].join("."));const p=c.slice(1);return p.length?v.schema._ids.reach(p,[...f,w]):v.schema}register(c){let{key:f}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!c||!d.isSchema(c))return;(c.$_property("schemaChain")||c._ids._schemaChain)&&(this._schemaChain=!0);const w=c._flags.id;if(w){const v=this._byId.get(w);l(!v||v.schema===c,"Cannot add different schemas with the same id:",w),l(!this._byKey.has(w),"Schema id conflicts with existing key:",w),this._byId.set(w,{schema:c,id:w})}f&&(l(!this._byKey.has(f),"Schema already contains key:",f),l(!this._byId.has(f),"Schema key conflicts with existing id:",f),this._byKey.set(f,{schema:c,id:f}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const v=c[0],p=this._get(v);l(p,"Schema does not contain path",[...f,...c].join(".")),w=[p,...w];const b=c.slice(1);return b.length?p.schema._ids._collect(b,[...f,v],w):w}_get(c){return this._byId.get(c)||this._byKey.get(c)}},_.fork=function(c,f,w){const v=s.schema(c,{each:(p,b)=>{let{key:g}=b;if(f===(p._flags.id||g))return w},ref:!1});return v?v.$_mutateRebuild():c},s.schema=function(c,f){let w;for(const v in c._flags){if(v[0]==="_")continue;const p=_.scan(c._flags[v],{source:"flags",name:v},f);p!==void 0&&(w=w||c.clone(),w._flags[v]=p)}for(let v=0;v{const l=a(375),d=a(8571),y=a(9621),_=a(8160);let c;const f={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};s.create=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(typeof w=="string","Invalid reference key:",w),_.assertOptions(v,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!v.prefix||typeof v.prefix=="object","options.prefix must be of type object");const p=Object.assign({},f.defaults,v);delete p.prefix;const b=p.separator,g=f.context(w,b,v.prefix);if(p.type=g.type,w=g.key,p.type==="value")if(g.root&&(l(!b||w[0]!==b,"Cannot specify relative path with root prefix"),p.ancestor="root",w||(w=null)),b&&b===w)w=null,p.ancestor=0;else if(p.ancestor!==void 0)l(!b||!w||w[0]!==b,"Cannot combine prefix with ancestor option");else{const[m,h]=f.ancestor(w,b);h&&(w=w.slice(h))===""&&(w=null),p.ancestor=m}return p.path=b?w===null?[]:w.split(b):[w],new f.Ref(p)},s.in=function(w){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s.create(w,{...v,in:!0})},s.isRef=function(w){return!!w&&!!w[_.symbols.ref]},f.Ref=class{constructor(w){l(typeof w=="object","Invalid reference construction"),_.assertOptions(w,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(w.separator)||typeof w.separator=="string"&&w.separator.length===1,"Invalid separator"),l(!w.adjust||typeof w.adjust=="function","options.adjust must be a function"),l(!w.map||Array.isArray(w.map),"options.map must be an array"),l(!w.map||!w.adjust,"Cannot set both map and adjust options"),Object.assign(this,f.defaults,w),l(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(w,v,p,b){let g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};return l(!this.in||g.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(p.context,v,g):this.type==="local"?this._resolve(b,v,g):this.ancestor?this.ancestor==="root"?this._resolve(v.ancestors[v.ancestors.length-1],v,g):(l(this.ancestor<=v.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(v.ancestors[this.ancestor-1],v,g)):this._resolve(w,v,g)}_resolve(w,v,p){let b;if(this.type==="value"&&v.mainstay.shadow&&p.shadow!==!1&&(b=v.mainstay.shadow.get(this.absolute(v))),b===void 0&&(b=y(w,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(b=this.adjust(b)),this.map){const g=this.map.get(b);g!==void 0&&(b=g)}return v.mainstay&&v.mainstay.tracer.resolve(v,this,b),b}toString(){return this.display}absolute(w){return[...w.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const w={path:this.path};this.type!=="value"&&(w.type=this.type),this.separator!=="."&&(w.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(w.ancestor=this.ancestor),this.map&&(w.map=[...this.map]);for(const v of["adjust","iterables","render"])this[v]!==null&&this[v]!==void 0&&(w[v]=this[v]);return this.in!==!1&&(w.in=!0),{ref:w}}updateDisplay(){const w=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${w}`);if(!this.separator)return void(this.display=`ref:${w}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${w}`);if(this.ancestor==="root")return void(this.display=`ref:root:${w}`);if(this.ancestor===1)return void(this.display=`ref:${w||".."}`);const v=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${v}${w||""}`}},f.Ref.prototype[_.symbols.ref]=!0,s.build=function(w){return(w=Object.assign({},f.defaults,w)).type==="value"&&w.ancestor===void 0&&(w.ancestor=1),new f.Ref(w)},f.context=function(w,v){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(w=w.trim(),p){const b=p.global===void 0?"$":p.global;if(b!==v&&w.startsWith(b))return{key:w.slice(b.length),type:"global"};const g=p.local===void 0?"#":p.local;if(g!==v&&w.startsWith(g))return{key:w.slice(g.length),type:"local"};const m=p.root===void 0?"/":p.root;if(m!==v&&w.startsWith(m))return{key:w.slice(m.length),type:"value",root:!0}}return{key:w,type:"value"}},f.ancestor=function(w,v){if(!v)return[1,0];if(w[0]!==v)return[1,0];if(w[1]!==v)return[0,1];let p=2;for(;w[p]===v;)++p;return[p-1,p]},s.toSibling=0,s.toParent=1,s.Manager=class{constructor(){this.refs=[]}register(w,v){if(w)if(v=v===void 0?s.toParent:v,Array.isArray(w))for(const p of w)this.register(p,v);else if(_.isSchema(w))for(const p of w._refs.refs)p.ancestor-v>=0&&this.refs.push({ancestor:p.ancestor-v,root:p.root});else s.isRef(w)&&w.type==="value"&&w.ancestor-v>=0&&this.refs.push({ancestor:w.ancestor-v,root:w.root}),c=c||a(3328),c.isTemplate(w)&&this.register(w.refs(),v)}get length(){return this.refs.length}clone(){const w=new s.Manager;return w.refs=d(this.refs),w}reset(){this.refs=[]}roots(){return this.refs.filter(w=>!w.ancestor).map(w=>w.root)}}},3378:(i,s,a)=>{const l=a(5107),d={};d.wrap=l.string().min(1).max(2).allow(!1),s.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:d.wrap,array:d.wrap,string:d.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),d.nameRx=/^[a-zA-Z0-9]\w*$/,d.rule=l.object({alias:l.array().items(l.string().pattern(d.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(d.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),s.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(d.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(d.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(d.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(d.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(d.nameRx,d.rule),terms:l.object().pattern(d.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),s.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),d.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},d.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),d.desc.buffer,d.desc.func,d.desc.ref,d.desc.regex,d.desc.special,d.desc.template,d.desc.value,l.link("/")]),d.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.symbol(),d.desc.buffer,d.desc.func,d.desc.override,d.desc.ref,d.desc.regex,d.desc.template,d.desc.value),d.desc.messages=l.object().pattern(/.+/,[l.string(),d.desc.template,l.object().pattern(/.+/,[l.string(),d.desc.template])]),s.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:d.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),d.desc.ref],wrap:{label:d.wrap,array:d.wrap}},externals:l.boolean(),messages:d.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:d.desc.values,invalid:d.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),d.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:d.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(i,s,a)=>{const l=a(8571),d=a(9621),y=a(8160),_={value:Symbol("value")};i.exports=_.State=class{constructor(c,f,w){this.path=c,this.ancestors=f,this.mainstay=w.mainstay,this.schemas=w.schemas,this.debug=null}localize(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const v=new _.State(c,f,this);return w&&v.schemas&&(v.schemas=[_.schemas(w),...v.schemas]),v}nest(c,f){const w=new _.State(this.path,this.ancestors,this);return w.schemas=w.schemas&&[_.schemas(c),...w.schemas],w.debug=f,w}shadow(c,f){this.mainstay.shadow=this.mainstay.shadow||new _.Shadow,this.mainstay.shadow.set(this.path,c,f)}snapshot(){this.mainstay.shadow&&(this._snapshot=l(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},_.schemas=function(c){return y.isSchema(c)?{schema:c}:c},_.Shadow=class{constructor(){this._values=null}set(c,f,w){if(!c.length||w==="strip"&&typeof c[c.length-1]=="number")return;this._values=this._values||new Map;let v=this._values;for(let p=0;p{const l=a(375),d=a(8571),y=a(5277),_=a(1447),c=a(8160),f=a(6354),w=a(6133),v={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};i.exports=v.Template=class{constructor(p,b){l(typeof p=="string","Template source must be a string"),l(!p.includes("\0")&&!p.includes(""),"Template source cannot contain reserved control characters"),this.source=p,this.rendered=p,this._template=null,this._settings=d(b),this._parse()}_parse(){if(!this.source.includes("{"))return;const p=v.encode(this.source),b=v.split(p);let g=!1;const m=[],h=b.shift();h&&m.push(h);for(const T of b){const x=T[0]!=="{",k=x?"}":"}}",A=T.indexOf(k);if(A===-1||T[1]==="{"){m.push(`{${v.decode(T)}`);continue}let E=T.slice(x?0:1,A);const P=E[0]===":";P&&(E=E.slice(1));const C=this._ref(v.decode(E),{raw:x,wrapped:P});m.push(C),typeof C!="string"&&(g=!0);const N=T.slice(A+k.length);N&&m.push(v.decode(N))}g?this._template=m:this.rendered=m.join("")}static date(p,b){return v.dateFormat[b.dateFormat].call(p)}describe(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this._settings&&p.compact)return this.source;const b={template:this.source};return this._settings&&(b.options=this._settings),b}static build(p){return new v.Template(p.template,p.options)}isDynamic(){return!!this._template}static isTemplate(p){return!!p&&!!p[c.symbols.template]}refs(){if(!this._template)return;const p=[];for(const b of this._template)typeof b!="string"&&p.push(...b.refs);return p}resolve(p,b,g,m){return this._template&&this._template.length===1?this._part(this._template[0],p,b,g,m,{}):this.render(p,b,g,m)}_part(p){for(var b=arguments.length,g=new Array(b>1?b-1:0),m=1;m4&&arguments[4]!==void 0?arguments[4]:{};if(!this.isDynamic())return this.rendered;const T=[];for(const x of this._template)if(typeof x=="string")T.push(x);else{const k=this._part(x,p,b,g,m,h),A=v.stringify(k,p,b,g,m,h);if(A!==void 0){const E=x.raw||(h.errors&&h.errors.escapeHtml)===!1?A:y(A);T.push(v.wrap(E,x.wrapped&&g.errors.wrap.label))}}return T.join("")}_ref(p,b){let{raw:g,wrapped:m}=b;const h=[],T=k=>{const A=w.create(k,this._settings);return h.push(A),E=>A.resolve(...E)};try{var x=new _.Parser(p,{reference:T,functions:v.functions,constants:v.constants})}catch(k){throw k.message=`Invalid template variable "${p}" fails due to: ${k.message}`,k}if(x.single){if(x.single.type==="reference"){const k=h[0];return{ref:k,raw:g,refs:h,wrapped:m||k.type==="local"&&k.key==="label"}}return v.stringify(x.single.value)}return{formula:x,raw:g,refs:h}}toString(){return this.source}},v.Template.prototype[c.symbols.template]=!0,v.Template.prototype.isImmutable=!0,v.encode=function(p){return p.replace(/\\(\{+)/g,(b,g)=>v.opens.slice(0,g.length)).replace(/\\(\}+)/g,(b,g)=>v.closes.slice(0,g.length))},v.decode=function(p){return p.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},v.split=function(p){const b=[];let g="";for(let m=0;m5&&arguments[5]!==void 0?arguments[5]:{};const x=typeof p,k=m&&m.errors&&m.errors.wrap||{};let A=!1;if(w.isRef(p)&&p.render&&(A=p.in,p=p.resolve(b,g,m,h,{in:p.in,...T})),p===null)return"null";if(x==="string")return v.wrap(p,T.arrayItems&&k.string);if(x==="number"||x==="function"||x==="symbol")return p.toString();if(x!=="object")return JSON.stringify(p);if(p instanceof Date)return v.Template.date(p,m);if(p instanceof Map){const P=[];for(const[C,N]of p.entries())P.push(`${C.toString()} -> ${N.toString()}`);p=P}if(!Array.isArray(p))return p.toString();const E=[];for(const P of p)E.push(v.stringify(P,b,g,m,h,{arrayItems:!0,...T}));return v.wrap(E.join(", "),!A&&k.array)},v.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},v.functions={if:(p,b,g)=>p?b:g,length:p=>typeof p=="string"?p.length:p&&typeof p=="object"?Array.isArray(p)?p.length:Object.keys(p).length:null,msg(p){const[b,g,m,h,T]=this,x=T.messages;if(!x)return"";const k=f.template(b,x[0],p,g,m)||f.template(b,x[1],p,g,m);return k?k.render(b,g,m,h,T):""},number:p=>typeof p=="number"?p:typeof p=="string"?parseFloat(p):typeof p=="boolean"?p?1:0:p instanceof Date?p.getTime():null}},4946:(i,s,a)=>{const l=a(375),d=a(1687),y=a(8068),_=a(8160),c=a(3292),f=a(6354),w=a(6133),v={};i.exports=y.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:w.toSibling}},args(p){for(var b=arguments.length,g=new Array(b>1?b-1:0),m=1;mf.details(P,{override:!1}))})};if(g._flags.match==="one")return k.length===1?{value:k[0]}:{errors:m("alternatives.one")};if(k.length!==g.$_terms.matches.length)return{errors:m("alternatives.all",{details:A.map(P=>f.details(P,{override:!1}))})};const E=P=>P.$_terms.matches.some(C=>C.schema.type==="object"||C.schema.type==="alternatives"&&E(C.schema));return E(g)?{value:k.reduce((P,C)=>d(P,C,{mergeArrays:!1}))}:{value:k[k.length-1]}}const x=[];for(let k=0;kg.path[0]!=="is"?b.label(p):void 0,ref:!1})}},rebuild(p){p.$_modify({each:b=>{_.isSchema(b)&&b.type==="array"&&p.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(p,b){if(b.matches)for(const g of b.matches){const{schema:m,ref:h,is:T,not:x,then:k,otherwise:A}=g;p=m?p.try(m):h?p.conditional(h,{is:T,then:k,not:x,otherwise:A,switch:g.switch}):p.conditional(T,{then:k,otherwise:A})}return p}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),v.errors=function(p,b){let{error:g,state:m}=b;if(!p.length)return{errors:g("alternatives.any")};if(p.length===1)return{errors:p[0].reports};const h=new Set,T=[];for(const{reports:x,schema:k}of p){if(x.length>1)return v.unmatched(p,g);const A=x[0];if(A instanceof f.Report==0)return v.unmatched(p,g);if(A.state.path.length!==m.path.length){T.push({type:k.type,report:A});continue}if(A.code==="any.only"){for(const C of A.local.valids)h.add(C);continue}const[E,P]=A.code.split(".");P==="base"?h.add(E):T.push({type:k.type,report:A})}return T.length?T.length===1?{errors:T[0].report}:v.unmatched(p,g):{errors:g("alternatives.types",{types:[...h]})}},v.unmatched=function(p,b){const g=[];for(const m of p)g.push(...m.reports);return{errors:b("alternatives.match",f.details(g,{override:!1}))}}},8068:(i,s,a)=>{const l=a(375),d=a(7629),y=a(8160),_=a(6914);i.exports=d.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(c,f){return l(typeof c=="function","Method must be a function"),l(f===void 0||f&&typeof f=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:c,description:f}})},validate(c,f,w){let{method:v}=w;try{return v(c,f)}catch(p){return f.error("any.custom",{error:p})}},args:["method","description"],multi:!0},messages:{method(c){return this.prefs({messages:c})}},shared:{method(c){l(y.isSchema(c)&&c._flags.id,"Schema must be a schema with an id");const f=this.clone();return f.$_terms.shared=f.$_terms.shared||[],f.$_terms.shared.push(c),f.$_mutateRegister(c),f}},warning:{method(c,f){return l(c&&typeof c=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:c,local:f},warn:!0})},validate(c,f,w){let{code:v,local:p}=w;return f.error(v,p)},args:["code","local"],multi:!0}},modifiers:{keep(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.keep=f},message(c,f){c.message=_.compile(f)},warn(c){let f=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];c.warn=f}},manifest:{build(c,f){for(const w in f){const v=f[w];if(["examples","externals","metas","notes","tags"].includes(w))for(const p of v)c=c[w.slice(0,-1)](p);else if(w!=="alterations")if(w!=="whens"){if(w==="shared")for(const p of v)c=c.shared(p)}else for(const p of v){const{ref:b,is:g,not:m,then:h,otherwise:T,concat:x}=p;c=x?c.concat(x):b?c.when(b,{is:g,not:m,then:h,otherwise:T,switch:p.switch,break:p.break}):c.when(g,{then:h,otherwise:T,break:p.break})}else{const p={};for(const{target:b,adjuster:g}of v)p[b]=g;c=c.alter(p)}}return c}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(i,s,a)=>{const l=a(375),d=a(9474),y=a(9621),_=a(8068),c=a(8160),f=a(3292),w={};i.exports=_.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(v,p){let{schema:b,state:g,prefs:m}=p;if(!Array.isArray(v))return;const h=b.$_getRule("sort");return h?w.sort(b,v,h.args.options,g,m):void 0}},validate(v,p){let{schema:b,error:g}=p;if(!Array.isArray(v)){if(b._flags.single){const m=[v];return m[c.symbols.arraySingle]=!0,{value:m}}return{errors:g("array.base")}}if(b.$_getRule("items")||b.$_terms.externals)return{value:v.slice()}},rules:{has:{method(v){v=this.$_compile(v,{appendPath:!0});const p=this.$_addRule({name:"has",args:{schema:v}});return p.$_mutateRegister(v),p},validate(v,p,b){let{state:g,prefs:m,error:h}=p,{schema:T}=b;const x=[v,...g.ancestors];for(let A=0;Athis.$_compile(p[m]),m,{append:!0});g.$_terms.items.push(h)}return g.$_mutateRebuild()},validate(v,p){let{schema:b,error:g,state:m,prefs:h,errorsArray:T}=p;const x=b.$_terms._requireds.slice(),k=b.$_terms.ordered.slice(),A=[...b.$_terms._inclusions,...x],E=!v[c.symbols.arraySingle];delete v[c.symbols.arraySingle];const P=T();let C=v.length;for(let N=0;N="})}},ordered:{method(){for(var v=arguments.length,p=new Array(v),b=0;bthis.$_compile(p[m]),m,{append:!0});w.validateSingle(h,g),g.$_mutateRegister(h),g.$_terms.ordered.push(h)}return g.$_mutateRebuild()}},single:{method(v){const p=v===void 0||!!v;return l(!p||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",p)}},sort:{method(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.assertOptions(v,["by","order"]);const p={order:v.order||"ascending"};return v.by&&(p.by=f.ref(v.by,{ancestor:0}),l(!p.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:p}})},validate(v,p,b){let{error:g,state:m,prefs:h,schema:T}=p,{options:x}=b;const{value:k,errors:A}=w.sort(T,v,x,m,h);if(A)return A;for(let E=0;E1&&arguments[1]!==void 0?arguments[1]:{};l(!v||typeof v=="function"||typeof v=="string","comparator must be a function or a string"),c.assertOptions(p,["ignoreUndefined","separator"]);const b={name:"unique",args:{options:p,comparator:v}};if(v)if(typeof v=="string"){const g=c.default(p.separator,".");b.path=g?v.split(g):[v]}else b.comparator=v;return this.$_addRule(b)},validate(v,p,b,g){let{state:m,error:h,schema:T}=p,{comparator:x,options:k}=b,{comparator:A,path:E}=g;const P={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},C=A||d,N=k.ignoreUndefined;for(let $=0;$new Set(v)}},rebuild(v){v.$_terms._inclusions=[],v.$_terms._exclusions=[],v.$_terms._requireds=[];for(const p of v.$_terms.items)w.validateSingle(p,v),p._flags.presence==="required"?v.$_terms._requireds.push(p):p._flags.presence==="forbidden"?v.$_terms._exclusions.push(p):v.$_terms._inclusions.push(p);for(const p of v.$_terms.ordered)w.validateSingle(p,v)},manifest:{build:(v,p)=>(p.items&&(v=v.items(...p.items)),p.ordered&&(v=v.ordered(...p.ordered)),v)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),w.fillMissedErrors=function(v,p,b,g,m,h){const T=[];let x=0;for(const k of b){const A=k._flags.label;A?T.push(A):++x}T.length?x?p.push(v.$_createError("array.includesRequiredBoth",g,{knownMisses:T,unknownMisses:x},m,h)):p.push(v.$_createError("array.includesRequiredKnowns",g,{knownMisses:T},m,h)):p.push(v.$_createError("array.includesRequiredUnknowns",g,{unknownMisses:x},m,h))},w.fillOrderedErrors=function(v,p,b,g,m,h){const T=[];for(const x of b)x._flags.presence==="required"&&T.push(x);T.length&&w.fillMissedErrors(v,p,T,g,m,h)},w.fillDefault=function(v,p,b,g){const m=[];let h=!0;for(let T=v.length-1;T>=0;--T){const x=v[T],k=[p,...b.ancestors],A=x.$_validate(void 0,b.localize(b.path,k,x),g).value;if(h){if(A===void 0)continue;h=!1}m.unshift(A)}m.length&&p.push(...m)},w.fastSplice=function(v,p){let b=p;for(;b{let P=w.compare(A,E,T,x);if(P!==null||(b.by&&(A=b.by.resolve(A,g,m),E=b.by.resolve(E,g,m)),P=w.compare(A,E,T,x),P!==null))return P;const C=typeof A;if(C!==typeof E)throw v.$_createError("array.sort.mismatching",p,null,g,m);if(C!=="number"&&C!=="string")throw v.$_createError("array.sort.unsupported",p,{type:C},g,m);return C==="number"?(A-E)*h:A{const l=a(375),d=a(8068),y=a(8160),_=a(2036),c={isBool:function(f){return typeof f=="boolean"}};i.exports=d.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(f,w){let{schema:v}=w;if(typeof f!="boolean"){if(typeof f=="string"){const p=v._flags.sensitive?f:f.toLowerCase();f=p==="true"||p!=="false"&&f}return typeof f!="boolean"&&(f=v.$_terms.truthy&&v.$_terms.truthy.has(f,null,null,!v._flags.sensitive)||(!v.$_terms.falsy||!v.$_terms.falsy.has(f,null,null,!v._flags.sensitive))&&f),{value:f}}},validate(f,w){let{error:v}=w;if(typeof f!="boolean")return{value:f,errors:v("boolean.base")}},rules:{truthy:{method(){for(var f=arguments.length,w=new Array(f),v=0;v0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("sensitive",f)}}},cast:{number:{from:c.isBool,to:(f,w)=>f?1:0},string:{from:c.isBool,to:(f,w)=>f?"true":"false"}},manifest:{build:(f,w)=>(w.truthy&&(f=f.truthy(...w.truthy)),w.falsy&&(f=f.falsy(...w.falsy)),f)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_=a(3328),c={isDate:function(f){return f instanceof Date}};i.exports=d.extend({type:"date",coerce:{from:["number","string"],method(f,w){let{schema:v}=w;return{value:c.parse(f,v._flags.format)||f}}},validate(f,w){let{schema:v,error:p,prefs:b}=w;if(f instanceof Date&&!isNaN(f.getTime()))return;const g=v._flags.format;return b.convert&&g&&typeof f=="string"?{value:f,errors:p("date.format",{format:g})}:{value:f,errors:p("date.base")}},rules:{compare:{method:!1,validate(f,w,v,p){let{date:b}=v,{name:g,operator:m,args:h}=p;const T=b==="now"?Date.now():b.getTime();return y.compare(f.getTime(),T,m)?f:w.error("date."+g,{limit:h.date,value:f})},args:[{name:"date",ref:!0,normalize:f=>f==="now"?f:c.parse(f),assert:f=>f!==null,message:"must have a valid date format"}]},format:{method(f){return l(["iso","javascript","unix"].includes(f),"Unknown date format",f),this.$_setFlag("format",f)}},greater:{method(f){return this.$_addRule({name:"greater",method:"compare",args:{date:f},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(f){return this.$_addRule({name:"less",method:"compare",args:{date:f},operator:"<"})}},max:{method(f){return this.$_addRule({name:"max",method:"compare",args:{date:f},operator:"<="})}},min:{method(f){return this.$_addRule({name:"min",method:"compare",args:{date:f},operator:">="})}},timestamp:{method(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"javascript";return l(["javascript","unix"].includes(f),'"type" must be one of "javascript, unix"'),this.format(f)}}},cast:{number:{from:c.isDate,to:(f,w)=>f.getTime()},string:{from:c.isDate,to(f,w){let{prefs:v}=w;return _.date(f,v)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),c.parse=function(f,w){if(f instanceof Date)return f;if(typeof f!="string"&&(isNaN(f)||!isFinite(f))||/^\s*$/.test(f))return null;if(w==="iso")return y.isIsoDate(f)?c.date(f.toString()):null;const v=f;if(typeof f=="string"&&/^[+-]?\d+(\.\d+)?$/.test(f)&&(f=parseFloat(f)),w){if(w==="javascript")return c.date(1*f);if(w==="unix")return c.date(1e3*f);if(typeof v=="string")return null}return c.date(f)},c.date=function(f){const w=new Date(f);return isNaN(w.getTime())?null:w}},390:(i,s,a)=>{const l=a(375),d=a(7824);i.exports=d.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length===f?y:_.error("function.arity",{n:f})}},class:{method(){return this.$_addRule("class")},validate:(y,_)=>/^\s*class\s/.test(y.toString())?y:_.error("function.class",{value:y})},minArity:{method(y){return l(Number.isSafeInteger(y)&&y>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length>=f?y:_.error("function.minArity",{n:f})}},maxArity:{method(y){return l(Number.isSafeInteger(y)&&y>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:y}})},validate(y,_,c){let{n:f}=c;return y.length<=f?y:_.error("function.maxArity",{n:f})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(i,s,a)=>{const l=a(978),d=a(375),y=a(8571),_=a(3652),c=a(8068),f=a(8160),w=a(3292),v=a(6354),p=a(6133),b=a(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};i.exports=c.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(m,h)=>m.keys(h),validate(m,h){let{schema:T,error:x,state:k,prefs:A}=h;if(!m||typeof m!==T.$_property("typeof")||Array.isArray(m))return{value:m,errors:x("object.base",{type:T.$_property("typeof")})};if(!(T.$_terms.renames||T.$_terms.dependencies||T.$_terms.keys||T.$_terms.patterns||T.$_terms.externals))return;m=g.clone(m,A);const E=[];if(T.$_terms.renames&&!g.rename(T,m,k,A,E))return{value:m,errors:E};if(!T.$_terms.keys&&!T.$_terms.patterns&&!T.$_terms.dependencies)return{value:m,errors:E};const P=new Set(Object.keys(m));if(T.$_terms.keys){const C=[m,...k.ancestors];for(const N of T.$_terms.keys){const $=N.key,F=m[$];P.delete($);const z=k.localize([...k.path,$],C,N),U=N.schema.$_validate(F,z,A);if(U.errors){if(A.abortEarly)return{value:m,errors:U.errors};U.value!==void 0&&(m[$]=U.value),E.push(...U.errors)}else N.schema._flags.result==="strip"||U.value===void 0&&F!==void 0?delete m[$]:U.value!==void 0&&(m[$]=U.value)}}if(P.size||T._flags._hasPatternMatch){const C=g.unknown(T,m,P,E,k,A);if(C)return C}if(T.$_terms.dependencies)for(const C of T.$_terms.dependencies){if(C.key!==null&&g.isPresent(C.options)(C.key.resolve(m,k,A,null,{shadow:!1}))===!1)continue;const N=g.dependencies[C.rel](T,C,m,k,A);if(N){const $=T.$_createError(N.code,m,N.context,k,A);if(A.abortEarly)return{value:m,errors:$};E.push($)}}return{value:m,errors:E}},rules:{and:{method(){for(var m=arguments.length,h=new Array(m),T=0;T!m.hasOwnProperty(T.key)):new g.Keys;for(const T in m)f.tryWithPath(()=>h.$_terms.keys.push({key:T,schema:this.$_compile(m[T])}),T)}else h.$_terms.keys=new g.Keys;else h.$_terms.keys=null;return h.$_mutateRebuild()}},length:{method(m){return this.$_addRule({name:"length",args:{limit:m},operator:"="})},validate(m,h,T,x){let{limit:k}=T,{name:A,operator:E,args:P}=x;return f.compare(Object.keys(m).length,k,E)?m:h.error("object."+A,{limit:P.limit,value:m})},args:[{name:"limit",ref:!0,assert:f.limit,message:"must be a positive integer"}]},max:{method(m){return this.$_addRule({name:"max",method:"length",args:{limit:m},operator:"<="})}},min:{method(m){return this.$_addRule({name:"min",method:"length",args:{limit:m},operator:">="})}},nand:{method(){for(var m=arguments.length,h=new Array(m),T=0;T2&&arguments[2]!==void 0?arguments[2]:{};const x=m instanceof RegExp;x||(m=this.$_compile(m,{appendPath:!0})),d(h!==void 0,"Invalid rule"),f.assertOptions(T,["fallthrough","matches"]),x&&d(!m.flags.includes("g")&&!m.flags.includes("y"),"pattern should not use global or sticky mode"),h=this.$_compile(h,{appendPath:!0});const k=this.clone();k.$_terms.patterns=k.$_terms.patterns||[];const A={[x?"regex":"schema"]:m,rule:h};return T.matches&&(A.matches=this.$_compile(T.matches),A.matches.type!=="array"&&(A.matches=A.matches.$_root.array().items(A.matches)),k.$_mutateRegister(A.matches),k.$_setFlag("_hasPatternMatch",!0,{clone:!1})),T.fallthrough&&(A.fallthrough=!0),k.$_terms.patterns.push(A),k.$_mutateRegister(h),k}},ref:{method(){return this.$_addRule("ref")},validate:(m,h)=>p.isRef(m)?m:h.error("object.refType",{value:m})},regex:{method(){return this.$_addRule("regex")},validate:(m,h)=>m instanceof RegExp?m:h.error("object.regex",{value:m})},rename:{method(m,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d(typeof m=="string"||m instanceof RegExp,"Rename missing the from argument"),d(typeof h=="string"||h instanceof b,"Invalid rename to argument"),d(h!==m,"Cannot rename key to same name:",m),f.assertOptions(T,["alias","ignoreUndefined","override","multiple"]);const x=this.clone();x.$_terms.renames=x.$_terms.renames||[];for(const k of x.$_terms.renames)d(k.from!==m,"Cannot rename the same key multiple times");return h instanceof b&&x.$_mutateRegister(h),x.$_terms.renames.push({from:m,to:h,options:l(g.renameDefaults,T)}),x}},schema:{method(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:m}})},validate(m,h,T){let{type:x}=T;return!f.isSchema(m)||x!=="any"&&m.type!==x?h.error("object.schema",{type:x}):m}},unknown:{method(m){return this.$_setFlag("unknown",m!==!1)}},with:{method(m,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"with",m,h,T)}},without:{method(m,h){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return g.dependency(this,"without",m,h,T)}},xor:{method(){for(var m=arguments.length,h=new Array(m),T=0;Th.add(T,{after:T.schema.$_rootReferences(),group:T.key}),T.key);m.$_terms.keys=new g.Keys(...h.nodes)}},manifest:{build(m,h){if(h.keys&&(m=m.keys(h.keys)),h.dependencies)for(const{rel:T,key:x=null,peers:k,options:A}of h.dependencies)m=g.dependency(m,T,x,k,A);if(h.patterns)for(const{regex:T,schema:x,rule:k,fallthrough:A,matches:E}of h.patterns)m=m.pattern(T||x,k,{fallthrough:A,matches:E});if(h.renames)for(const{from:T,to:x,options:k}of h.renames)m=m.rename(T,x,k);return m}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(m,h){if(typeof m=="object"){if(h.nonEnumerables)return y(m,{shallow:!0});const x=Object.create(Object.getPrototypeOf(m));return Object.assign(x,m),x}const T=function(){for(var x=arguments.length,k=new Array(x),A=0;A1&&typeof x[x.length-1]=="object"?x.pop():{}),f.assertOptions(k,["separator","isPresent"]),x=[].concat(x);const A=f.default(k.separator,"."),E=[];for(const C of x)d(typeof C=="string",h,"peers must be strings"),E.push(w.ref(C,{separator:A,ancestor:0,prefix:!1}));T!==null&&(T=w.ref(T,{separator:A,ancestor:0,prefix:!1}));const P=m.clone();return P.$_terms.dependencies=P.$_terms.dependencies||[],P.$_terms.dependencies.push(new g.Dependency(h,T,E,x,k)),P},g.dependencies={and(m,h,T,x,k){const A=[],E=[],P=h.peers.length,C=g.isPresent(h.options);for(const N of h.peers)C(N.resolve(T,x,k,null,{shadow:!1}))===!1?A.push(N.key):E.push(N.key);if(A.length!==P&&E.length!==P)return{code:"object.and",context:{present:E,presentWithLabels:g.keysToLabels(m,E),missing:A,missingWithLabels:g.keysToLabels(m,A)}}},nand(m,h,T,x,k){const A=[],E=g.isPresent(h.options);for(const N of h.peers)E(N.resolve(T,x,k,null,{shadow:!1}))&&A.push(N.key);if(A.length!==h.peers.length)return;const P=h.paths[0],C=h.paths.slice(1);return{code:"object.nand",context:{main:P,mainWithLabel:g.keysToLabels(m,P),peers:C,peersWithLabels:g.keysToLabels(m,C)}}},or(m,h,T,x,k){const A=g.isPresent(h.options);for(const E of h.peers)if(A(E.resolve(T,x,k,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:h.paths,peersWithLabels:g.keysToLabels(m,h.paths)}}},oxor(m,h,T,x,k){const A=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&A.push(C.key);if(!A.length||A.length===1)return;const P={peers:h.paths,peersWithLabels:g.keysToLabels(m,h.paths)};return P.present=A,P.presentWithLabels=g.keysToLabels(m,A),{code:"object.oxor",context:P}},with(m,h,T,x,k){const A=g.isPresent(h.options);for(const E of h.peers)if(A(E.resolve(T,x,k,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:h.key.key,mainWithLabel:g.keysToLabels(m,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(m,E.key)}}},without(m,h,T,x,k){const A=g.isPresent(h.options);for(const E of h.peers)if(A(E.resolve(T,x,k,null,{shadow:!1})))return{code:"object.without",context:{main:h.key.key,mainWithLabel:g.keysToLabels(m,h.key.key),peer:E.key,peerWithLabel:g.keysToLabels(m,E.key)}}},xor(m,h,T,x,k){const A=[],E=g.isPresent(h.options);for(const C of h.peers)E(C.resolve(T,x,k,null,{shadow:!1}))&&A.push(C.key);if(A.length===1)return;const P={peers:h.paths,peersWithLabels:g.keysToLabels(m,h.paths)};return A.length===0?{code:"object.missing",context:P}:(P.present=A,P.presentWithLabels=g.keysToLabels(m,A),{code:"object.xor",context:P})}},g.keysToLabels=function(m,h){return Array.isArray(h)?h.map(T=>m.$_mapLabels(T)):m.$_mapLabels(h)},g.isPresent=function(m){return typeof m.isPresent=="function"?m.isPresent:h=>h!==void 0},g.rename=function(m,h,T,x,k){const A={};for(const E of m.$_terms.renames){const P=[],C=typeof E.from!="string";if(C)for(const N in h){if(h[N]===void 0&&E.options.ignoreUndefined||N===E.to)continue;const $=E.from.exec(N);$&&P.push({from:N,to:E.to,match:$})}else!Object.prototype.hasOwnProperty.call(h,E.from)||h[E.from]===void 0&&E.options.ignoreUndefined||P.push(E);for(const N of P){const $=N.from;let F=N.to;if(F instanceof b&&(F=F.render(h,T,x,N.match)),$!==F){if(!E.options.multiple&&A[F]&&(k.push(m.$_createError("object.rename.multiple",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly)||Object.prototype.hasOwnProperty.call(h,F)&&!E.options.override&&!A[F]&&(k.push(m.$_createError("object.rename.override",h,{from:$,to:F,pattern:C},T,x)),x.abortEarly))return!1;h[$]===void 0?delete h[F]:h[F]=h[$],A[F]=!0,E.options.alias||delete h[$]}}}return!0},g.unknown=function(m,h,T,x,k,A){if(m.$_terms.patterns){let E=!1;const P=m.$_terms.patterns.map(N=>{if(N.matches)return E=!0,[]}),C=[h,...k.ancestors];for(const N of T){const $=h[N],F=[...k.path,N];for(let z=0;z{const l=a(375),d=a(8068),y=a(8160),_=a(3292),c=a(6354),f={};i.exports=d.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(w,v)=>w.ref(v),validate(w,v){let{schema:p,state:b,prefs:g}=v;l(p.$_terms.link,"Uninitialized link schema");const m=f.generate(p,w,b,g),h=p.$_terms.link[0].ref;return m.$_validate(w,b.nest(m,`link:${h.display}:${m.type}`),g)},generate:(w,v,p,b)=>f.generate(w,v,p,b),rules:{ref:{method(w){l(!this.$_terms.link,"Cannot reinitialize schema"),w=_.ref(w),l(w.type==="value"||w.type==="local","Invalid reference type:",w.type),l(w.type==="local"||w.ancestor==="root"||w.ancestor>0,"Link cannot reference itself");const v=this.clone();return v.$_terms.link=[{ref:w}],v}},relative:{method(){let w=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.$_setFlag("relative",w)}}},overrides:{concat(w){l(this.$_terms.link,"Uninitialized link schema"),l(y.isSchema(w),"Invalid schema object"),l(w.type!=="link","Cannot merge type link with another link");const v=this.clone();return v.$_terms.whens||(v.$_terms.whens=[]),v.$_terms.whens.push({concat:w}),v.$_mutateRebuild()}},manifest:{build:(w,v)=>(l(v.link,"Invalid link description missing link"),w.ref(v.link))}}),f.generate=function(w,v,p,b){let g=p.mainstay.links.get(w);if(g)return g._generate(v,p,b).schema;const m=w.$_terms.link[0].ref,{perspective:h,path:T}=f.perspective(m,p);f.assert(h,"which is outside of schema boundaries",m,w,p,b);try{g=T.length?h.$_reach(T):h}catch{f.assert(!1,"to non-existing schema",m,w,p,b)}return f.assert(g.type!=="link","which is another link",m,w,p,b),w._flags.relative||p.mainstay.links.set(w,g),g._generate(v,p,b).schema},f.perspective=function(w,v){if(w.type==="local"){for(const{schema:p,key:b}of v.schemas){if((p._flags.id||b)===w.path[0])return{perspective:p,path:w.path.slice(1)};if(p.$_terms.shared){for(const g of p.$_terms.shared)if(g._flags.id===w.path[0])return{perspective:g,path:w.path.slice(1)}}}return{perspective:null,path:null}}return w.ancestor==="root"?{perspective:v.schemas[v.schemas.length-1].schema,path:w.path}:{perspective:v.schemas[w.ancestor]&&v.schemas[w.ancestor].schema,path:w.path}},f.assert=function(w,v,p,b,g,m){w||l(!1,`"${c.label(b._flags,g,m)}" contains link reference "${p.display}" ${v}`)}},3832:(i,s,a)=>{const l=a(375),d=a(8068),y=a(8160),_={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};i.exports=d.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(c,f){let{schema:w,error:v}=f;if(!c.match(_.numberRx))return;c=c.trim();const p={value:parseFloat(c)};if(p.value===0&&(p.value=0),!w._flags.unsafe)if(c.match(/e/i)){if(_.extractSignificantDigits(c)!==_.extractSignificantDigits(String(p.value)))return p.errors=v("number.unsafe"),p}else{const b=p.value.toString();if(b.match(/e/i))return p;if(b!==_.normalizeDecimal(c))return p.errors=v("number.unsafe"),p}return p}},validate(c,f){let{schema:w,error:v,prefs:p}=f;if(c===1/0||c===-1/0)return{value:c,errors:v("number.infinity")};if(!y.isNumber(c))return{value:c,errors:v("number.base")};const b={value:c};if(p.convert){const g=w.$_getRule("precision");if(g){const m=Math.pow(10,g.args.limit);b.value=Math.round(b.value*m)/m}}return b.value===0&&(b.value=0),!w._flags.unsafe&&(c>Number.MAX_SAFE_INTEGER||c"})}},integer:{method(){return this.$_addRule("integer")},validate:(c,f)=>Math.trunc(c)-c==0?c:f.error("number.integer")},less:{method(c){return this.$_addRule({name:"less",method:"compare",args:{limit:c},operator:"<"})}},max:{method(c){return this.$_addRule({name:"max",method:"compare",args:{limit:c},operator:"<="})}},min:{method(c){return this.$_addRule({name:"min",method:"compare",args:{limit:c},operator:">="})}},multiple:{method(c){return this.$_addRule({name:"multiple",args:{base:c}})},validate(c,f,w,v){let{base:p}=w;return c*(1/p)%1==0?c:f.error("number.multiple",{multiple:v.args.base,value:c})},args:[{name:"base",ref:!0,assert:c=>typeof c=="number"&&isFinite(c)&&c>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(c,f)=>Number.isSafeInteger(c)&&c>=0&&c<=65535?c:f.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(c){return l(Number.isSafeInteger(c),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:c}})},validate(c,f,w){let{limit:v}=w;const p=c.toString().match(_.precisionRx);return Math.max((p[1]?p[1].length:0)-(p[2]?parseInt(p[2],10):0),0)<=v?c:f.error("number.precision",{limit:v,value:c})},convert:!0},sign:{method(c){return l(["negative","positive"].includes(c),"Invalid sign",c),this.$_addRule({name:"sign",args:{sign:c}})},validate(c,f,w){let{sign:v}=w;return v==="negative"&&c<0||v==="positive"&&c>0?c:f.error(`number.${v}`)}},unsafe:{method(){let c=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof c=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",c)}}},cast:{string:{from:c=>typeof c=="number",to:(c,f)=>c.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),_.extractSignificantDigits=function(c){return c.replace(_.exponentialPartRegex,"").replace(_.dotRegex,"").replace(_.trailingZerosRegex,"").replace(_.leadingSignAndZerosRegex,"")},_.normalizeDecimal=function(c){return(c=c.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&c.endsWith("0")&&(c=c.replace(/0+$/,"")),c==="-0"?"0":c}},8966:(i,s,a)=>{const l=a(7824);i.exports=l.extend({type:"object",cast:{map:{from:d=>d&&typeof d=="object",to:(d,y)=>new Map(Object.entries(d))}}})},7417:(i,s,a)=>{const l=a(375),d=a(5380),y=a(1745),_=a(9959),c=a(6064),f=a(9926),w=a(5752),v=a(8068),p=a(8160),b={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:_.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};i.exports=v.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(g,m){let{schema:h,state:T,prefs:x}=m;const k=h.$_getRule("normalize");k&&(g=g.normalize(k.args.form));const A=h.$_getRule("case");A&&(g=A.args.direction==="upper"?g.toLocaleUpperCase():g.toLocaleLowerCase());const E=h.$_getRule("trim");if(E&&E.args.enabled&&(g=g.trim()),h.$_terms.replacements)for(const C of h.$_terms.replacements)g=g.replace(C.pattern,C.replacement);const P=h.$_getRule("hex");if(P&&P.args.options.byteAligned&&g.length%2!=0&&(g=`0${g}`),h.$_getRule("isoDate")){const C=b.isoDate(g);C&&(g=C)}if(h._flags.truncate){const C=h.$_getRule("max");if(C){let N=C.args.limit;if(p.isResolvable(N)&&(N=N.resolve(g,T,x),!p.limit(N)))return{value:g,errors:h.$_createError("any.ref",N,{ref:C.args.limit,arg:"limit",reason:"must be a positive integer"},T,x)};g=g.slice(0,N)}}return{value:g}}},validate(g,m){let{schema:h,error:T}=m;if(typeof g!="string")return{value:g,errors:T("string.base")};if(g===""){const x=h.$_getRule("min");return x&&x.args.limit===0?void 0:{value:g,errors:T("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(g,m)=>/^[a-zA-Z0-9]+$/.test(g)?g:m.error("string.alphanum")},base64:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return p.assertOptions(g,["paddingRequired","urlSafe"]),g={urlSafe:!1,paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof g.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:g}})},validate(g,m,h){let{options:T}=h;return b.base64Regex[T.paddingRequired][T.urlSafe].test(g)?g:m.error("string.base64")}},case:{method(g){return l(["lower","upper"].includes(g),"Invalid case:",g),this.$_addRule({name:"case",args:{direction:g}})},validate(g,m,h){let{direction:T}=h;return T==="lower"&&g===g.toLocaleLowerCase()||T==="upper"&&g===g.toLocaleUpperCase()?g:m.error(`string.${T}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(g,m){let h=g.length,T=0,x=1;for(;h--;){const k=g.charAt(h)*x;T+=k-9*(k>9),x^=3}return T>0&&T%10==0?g:m.error("string.creditCard")}},dataUri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return p.assertOptions(g,["paddingRequired"]),g={paddingRequired:!0,...g},l(typeof g.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:g}})},validate(g,m,h){let{options:T}=h;const x=g.match(b.dataUriRegex);return x&&(!x[2]||x[2]!=="base64"||b.base64Regex[T.paddingRequired].false.test(x[3]))?g:m.error("string.dataUri")}},domain:{method(g){g&&p.assertOptions(g,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const m=b.addressOptions(g);return this.$_addRule({name:"domain",args:{options:g},address:m})},validate(g,m,h,T){let{address:x}=T;return d.isValid(g,x)?g:m.error("string.domain")}},email:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),l(g.multiple===void 0||typeof g.multiple=="boolean","multiple option must be an boolean");const m=b.addressOptions(g),h=new RegExp(`\\s*[${g.separator?c(g.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:g},regex:h,address:m})},validate(g,m,h,T){let{options:x}=h,{regex:k,address:A}=T;const E=x.multiple?g.split(k):[g],P=[];for(const C of E)y.isValid(C,A)||P.push(C);return P.length?m.error("string.email",{value:g,invalids:P}):g}},guid:{alias:"uuid",method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["version","separator"]);let m="";if(g.version){const x=[].concat(g.version);l(x.length>=1,"version must have at least 1 valid version specified");const k=new Set;for(let A=0;A0&&arguments[0]!==void 0?arguments[0]:{};return p.assertOptions(g,["byteAligned"]),g={byteAligned:!1,...g},l(typeof g.byteAligned=="boolean","byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:g}})},validate(g,m,h){let{options:T}=h;return b.hexRegex.test(g)?T.byteAligned&&g.length%2!=0?m.error("string.hexAlign"):g:m.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(g,m)=>d.isValid(g,{minDomainSegments:1})||b.ipRegex.test(g)?g:m.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["cidr","version"]);const{cidr:m,versions:h,regex:T}=_.regex(g),x=g.version?h:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:m,version:x}},regex:T})},validate(g,m,h,T){let{options:x}=h,{regex:k}=T;return k.test(g)?g:x.version?m.error("string.ipVersion",{value:g,cidr:x.cidr,version:x.version}):m.error("string.ip",{value:g,cidr:x.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(g,m){let{error:h}=m;return b.isoDate(g)?g:h("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(g,m)=>b.isoDurationRegex.test(g)?g:m.error("string.isoDuration")},length:{method(g,m){return b.length(this,"length",g,"=",m)},validate(g,m,h,T){let{limit:x,encoding:k}=h,{name:A,operator:E,args:P}=T;const C=!k&&g.length;return p.compare(C,x,E)?g:m.error("string."+A,{limit:P.limit,value:g,encoding:k})},args:[{name:"limit",ref:!0,assert:p.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(g,m){return b.length(this,"max",g,"<=",m)},args:["limit","encoding"]},min:{method(g,m){return b.length(this,"min",g,">=",m)},args:["limit","encoding"]},normalize:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"NFC";return l(b.normalizationForms.includes(g),"normalization form must be one of "+b.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:g}})},validate(g,m,h){let{error:T}=m,{form:x}=h;return g===g.normalize(x)?g:T("string.normalize",{value:g,form:x})},convert:!0},pattern:{alias:"regex",method(g){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(g instanceof RegExp,"regex must be a RegExp"),l(!g.flags.includes("g")&&!g.flags.includes("y"),"regex should not use global or sticky mode"),typeof m=="string"&&(m={name:m}),p.assertOptions(m,["invert","name"]);const h=["string.pattern",m.invert?".invert":"",m.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:g,options:m},errorCode:h})},validate(g,m,h,T){let{regex:x,options:k}=h,{errorCode:A}=T;return x.test(g)^k.invert?g:m.error(A,{name:k.name,regex:x,value:g})},args:["regex","options"],multi:!0},replace:{method(g,m){typeof g=="string"&&(g=new RegExp(c(g),"g")),l(g instanceof RegExp,"pattern must be a RegExp"),l(typeof m=="string","replacement must be a String");const h=this.clone();return h.$_terms.replacements||(h.$_terms.replacements=[]),h.$_terms.replacements.push({pattern:g,replacement:m}),h}},token:{method(){return this.$_addRule("token")},validate:(g,m)=>/^\w+$/.test(g)?g:m.error("string.token")},trim:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:g}})},validate(g,m,h){let{enabled:T}=h;return T&&g!==g.trim()?m.error("string.trim"):g},convert:!0},truncate:{method(){let g=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return l(typeof g=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",g)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};p.assertOptions(g,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),g.domain&&p.assertOptions(g.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:m,scheme:h}=w.regex(g),T=g.domain?b.addressOptions(g.domain):null;return this.$_addRule({name:"uri",args:{options:g},regex:m,domain:T,scheme:h})},validate(g,m,h,T){let{options:x}=h,{regex:k,domain:A,scheme:E}=T;if(["http:/","https:/"].includes(g))return m.error("string.uri");const P=k.exec(g);if(P){const C=P[1]||P[2];return!A||x.allowRelative&&!C||d.isValid(C,A)?g:m.error("string.domain",{value:C})}return x.relativeOnly?m.error("string.uriRelativeOnly"):x.scheme?m.error("string.uriCustomScheme",{scheme:E,value:g}):m.error("string.uri")}}},manifest:{build(g,m){if(m.replacements)for(const{pattern:h,replacement:T}of m.replacements)g=g.replace(h,T);return g}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),b.addressOptions=function(g){if(!g||(l(g.minDomainSegments===void 0||Number.isSafeInteger(g.minDomainSegments)&&g.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(g.maxDomainSegments===void 0||Number.isSafeInteger(g.maxDomainSegments)&&g.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),g.tlds===!1))return g;if(g.tlds===!0||g.tlds===void 0)return l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds);l(typeof g.tlds=="object","tlds must be true, false, or an object");const m=g.tlds.deny;if(m)return Array.isArray(m)&&(g=Object.assign({},g,{tlds:{deny:new Set(m)}})),l(g.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!g.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),b.validateTlds(g.tlds.deny,"tlds.deny"),g;const h=g.tlds.allow;return h?h===!0?(l(b.tlds,"Built-in TLD list disabled"),Object.assign({},g,b.tlds)):(Array.isArray(h)&&(g=Object.assign({},g,{tlds:{allow:new Set(h)}})),l(g.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),b.validateTlds(g.tlds.allow,"tlds.allow"),g):g},b.validateTlds=function(g,m){for(const h of g)l(d.isValid(h,{minDomainSegments:1,maxDomainSegments:1}),`${m} must contain valid top level domain names`)},b.isoDate=function(g){if(!p.isIsoDate(g))return null;/.*T.*[+-]\d\d$/.test(g)&&(g+="00");const m=new Date(g);return isNaN(m.getTime())?null:m.toISOString()},b.length=function(g,m,h,T,x){return l(!x||!1,"Invalid encoding:",x),g.$_addRule({name:m,method:"length",args:{limit:h,encoding:x},operator:T})}},8826:(i,s,a)=>{const l=a(375),d=a(8068),y={};y.Map=class extends Map{slice(){return new y.Map(this)}},i.exports=d.extend({type:"symbol",terms:{map:{init:new y.Map}},coerce:{method(_,c){let{schema:f,error:w}=c;const v=f.$_terms.map.get(_);return v&&(_=v),f._flags.only&&typeof _!="symbol"?{value:_,errors:w("symbol.map",{map:f.$_terms.map})}:{value:_}}},validate(_,c){let{error:f}=c;if(typeof _!="symbol")return{value:_,errors:f("symbol.base")}},rules:{map:{method(_){_&&!_[Symbol.iterator]&&typeof _=="object"&&(_=Object.entries(_)),l(_&&_[Symbol.iterator],"Iterable must be an iterable or object");const c=this.clone(),f=[];for(const w of _){l(w&&w[Symbol.iterator],"Entry must be an iterable");const[v,p]=w;l(typeof v!="object"&&typeof v!="function"&&typeof v!="symbol","Key must not be of type object, function, or Symbol"),l(typeof p=="symbol","Value must be a Symbol"),c.$_terms.map.set(v,p),f.push(p)}return c.valid(...f)}}},manifest:{build:(_,c)=>(c.map&&(_=_.map(c.map)),_)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(i,s,a)=>{const l=a(375),d=a(8571),y=a(738),_=a(9621),c=a(8160),f=a(6354),w=a(493),v={result:Symbol("result")};s.entry=function(p,b,g){let m=c.defaults;g&&(l(g.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(g.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),m=c.preferences(c.defaults,g));const h=v.entry(p,b,m);l(!h.mainstay.externals.length,"Schema with external rules must use validateAsync()");const T={value:h.value};return h.error&&(T.error=h.error),h.mainstay.warnings.length&&(T.warning=f.details(h.mainstay.warnings)),h.mainstay.debug&&(T.debug=h.mainstay.debug),h.mainstay.artifacts&&(T.artifacts=h.mainstay.artifacts),T},s.entryAsync=async function(p,b,g){let m=c.defaults;g&&(m=c.preferences(c.defaults,g));const h=v.entry(p,b,m),T=h.mainstay;if(h.error)throw T.debug&&(h.error.debug=T.debug),h.error;if(T.externals.length){let k=h.value;for(const{method:A,path:E,label:P}of T.externals){let C,N,$=k;E.length&&(C=E[E.length-1],N=_(k,E.slice(0,-1)),$=N[C]);try{const F=await A($,{prefs:g});if(F===void 0||F===$)continue;N?N[C]=F:k=F}catch(F){throw m.errors.label&&(F.message+=` (${P})`),F}}h.value=k}if(!m.warnings&&!m.debug&&!m.artifacts)return h.value;const x={value:h.value};return T.warnings.length&&(x.warning=f.details(T.warnings)),T.debug&&(x.debug=T.debug),T.artifacts&&(x.artifacts=T.artifacts),x},v.entry=function(p,b,g){const{tracer:m,cleanup:h}=v.tracer(b,g),T={externals:[],warnings:[],tracer:m,debug:g.debug?[]:null,links:b._ids._schemaChain?new Map:null},x=b._ids._schemaChain?[{schema:b}]:null,k=new w([],[],{mainstay:T,schemas:x}),A=s.validate(p,b,k,g);h&&b.$_root.untrace();const E=f.process(A.errors,p,g);return{value:A.value,error:E,mainstay:T}},v.tracer=function(p,b){return p.$_root._tracer?{tracer:p.$_root._tracer._register(p)}:b.debug?(l(p.$_root.trace,"Debug mode not supported"),{tracer:p.$_root.trace()._register(p),cleanup:!0}):{tracer:v.ignore}},s.validate=function(p,b,g,m){let h=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};if(b.$_terms.whens&&(b=b._generate(p,g,m).schema),b._preferences&&(m=v.prefs(b,m)),b._cache&&m.cache){const C=b._cache.get(p);if(g.mainstay.tracer.debug(g,"validate","cached",!!C),C)return C}const T=(C,N,$)=>b.$_createError(C,p,N,$||g,m),x={original:p,prefs:m,schema:b,state:g,error:T,errorsArray:v.errorsArray,warn:(C,N,$)=>g.mainstay.warnings.push(T(C,N,$)),message:(C,N)=>b.$_createError("custom",p,N,g,m,{messages:C})};g.mainstay.tracer.entry(b,g);const k=b._definition;if(k.prepare&&p!==void 0&&m.convert){const C=k.prepare(p,x);if(C){if(g.mainstay.tracer.value(g,"prepare",p,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);p=C.value}}if(k.coerce&&p!==void 0&&m.convert&&(!k.coerce.from||k.coerce.from.includes(typeof p))){const C=k.coerce.method(p,x);if(C){if(g.mainstay.tracer.value(g,"coerced",p,C.value),C.errors)return v.finalize(C.value,[].concat(C.errors),x);p=C.value}}const A=b._flags.empty;A&&A.$_match(v.trim(p,b),g.nest(A),c.defaults)&&(g.mainstay.tracer.value(g,"empty",p,void 0),p=void 0);const E=h.presence||b._flags.presence||(b._flags._endedSwitch?null:m.presence);if(p===void 0){if(E==="forbidden")return v.finalize(p,null,x);if(E==="required")return v.finalize(p,[b.$_createError("any.required",p,null,g,m)],x);if(E==="optional"){if(b._flags.default!==c.symbols.deepDefault)return v.finalize(p,null,x);g.mainstay.tracer.value(g,"default",p,{}),p={}}}else if(E==="forbidden")return v.finalize(p,[b.$_createError("any.unknown",p,null,g,m)],x);const P=[];if(b._valids){const C=b._valids.get(p,g,m,b._flags.insensitive);if(C)return m.convert&&(g.mainstay.tracer.value(g,"valids",p,C.value),p=C.value),g.mainstay.tracer.filter(b,g,"valid",C),v.finalize(p,null,x);if(b._flags.only){const N=b.$_createError("any.only",p,{valids:b._valids.values({display:!0})},g,m);if(m.abortEarly)return v.finalize(p,[N],x);P.push(N)}}if(b._invalids){const C=b._invalids.get(p,g,m,b._flags.insensitive);if(C){g.mainstay.tracer.filter(b,g,"invalid",C);const N=b.$_createError("any.invalid",p,{invalids:b._invalids.values({display:!0})},g,m);if(m.abortEarly)return v.finalize(p,[N],x);P.push(N)}}if(k.validate){const C=k.validate(p,x);if(C&&(g.mainstay.tracer.value(g,"base",p,C.value),p=C.value,C.errors)){if(!Array.isArray(C.errors))return P.push(C.errors),v.finalize(p,P,x);if(C.errors.length)return P.push(...C.errors),v.finalize(p,P,x)}}return b._rules.length?v.rules(p,P,x):v.finalize(p,P,x)},v.rules=function(p,b,g){const{schema:m,state:h,prefs:T}=g;for(const x of m._rules){const k=m._definition.rules[x.method];if(k.convert&&T.convert){h.mainstay.tracer.log(m,h,"rule",x.name,"full");continue}let A,E=x.args;if(x._resolve.length){E=Object.assign({},E);for(const C of x._resolve){const N=k.argsByName.get(C),$=E[C].resolve(p,h,T),F=N.normalize?N.normalize($):$,z=c.validateArg(F,null,N);if(z){A=m.$_createError("any.ref",$,{arg:C,ref:E[C],reason:z},h,T);break}E[C]=F}}A=A||k.validate(p,g,E,x);const P=v.rule(A,x);if(P.errors){if(h.mainstay.tracer.log(m,h,"rule",x.name,"error"),x.warn){h.mainstay.warnings.push(...P.errors);continue}if(T.abortEarly)return v.finalize(p,P.errors,g);b.push(...P.errors)}else h.mainstay.tracer.log(m,h,"rule",x.name,"pass"),h.mainstay.tracer.value(h,"rule",p,P.value,x.name),p=P.value}return v.finalize(p,b,g)},v.rule=function(p,b){return p instanceof f.Report?(v.error(p,b),{errors:[p],value:null}):Array.isArray(p)&&p[c.symbols.errors]?(p.forEach(g=>v.error(g,b)),{errors:p,value:null}):{errors:null,value:p}},v.error=function(p,b){return b.message&&p._setTemplate(b.message),p},v.finalize=function(p,b,g){b=b||[];const{schema:m,state:h,prefs:T}=g;if(b.length){const k=v.default("failover",void 0,b,g);k!==void 0&&(h.mainstay.tracer.value(h,"failover",p,k),p=k,b=[])}if(b.length&&m._flags.error)if(typeof m._flags.error=="function"){b=m._flags.error(b),Array.isArray(b)||(b=[b]);for(const k of b)l(k instanceof Error||k instanceof f.Report,"error() must return an Error object")}else b=[m._flags.error];if(p===void 0){const k=v.default("default",p,b,g);h.mainstay.tracer.value(h,"default",p,k),p=k}if(m._flags.cast&&p!==void 0){const k=m._definition.cast[m._flags.cast];if(k.from(p)){const A=k.to(p,g);h.mainstay.tracer.value(h,"cast",p,A,m._flags.cast),p=A}}if(m.$_terms.externals&&T.externals&&T._externals!==!1)for(const{method:k}of m.$_terms.externals)h.mainstay.externals.push({method:k,path:h.path,label:f.label(m._flags,h,T)});const x={value:p,errors:b.length?b:null};return m._flags.result&&(x.value=m._flags.result==="strip"?void 0:g.original,h.mainstay.tracer.value(h,m._flags.result,p,x.value),h.shadow(p,m._flags.result)),m._cache&&T.cache!==!1&&!m._refs.length&&m._cache.set(g.original,x),p===void 0||x.errors||m._flags.artifact===void 0||(h.mainstay.artifacts=h.mainstay.artifacts||new Map,h.mainstay.artifacts.has(m._flags.artifact)||h.mainstay.artifacts.set(m._flags.artifact,[]),h.mainstay.artifacts.get(m._flags.artifact).push(h.path)),x},v.prefs=function(p,b){const g=b===c.defaults;return g&&p._preferences[c.symbols.prefs]?p._preferences[c.symbols.prefs]:(b=c.preferences(b,p._preferences),g&&(p._preferences[c.symbols.prefs]=b),b)},v.default=function(p,b,g,m){const{schema:h,state:T,prefs:x}=m,k=h._flags[p];if(x.noDefaults||k===void 0)return b;if(T.mainstay.tracer.log(h,T,"rule",p,"full"),!k)return k;if(typeof k=="function"){const A=k.length?[d(T.ancestors[0]),m]:[];try{return k(...A)}catch(E){return void g.push(h.$_createError(`any.${p}`,null,{error:E},T,x))}}return typeof k!="object"?k:k[c.symbols.literal]?k.literal:c.isResolvable(k)?k.resolve(b,T,x):d(k)},v.trim=function(p,b){if(typeof p!="string")return p;const g=b.$_getRule("trim");return g&&g.args.enabled?p.trim():p},v.ignore={active:!1,debug:y,entry:y,filter:y,log:y,resolve:y,value:y},v.errorsArray=function(){const p=[];return p[c.symbols.errors]=!0,p}},2036:(i,s,a)=>{const l=a(375),d=a(9474),y=a(8160),_={};i.exports=_.Values=class{constructor(c,f){this._values=new Set(c),this._refs=new Set(f),this._lowercase=_.lowercases(c),this._override=!1}get length(){return this._values.size+this._refs.size}add(c,f){y.isResolvable(c)?this._refs.has(c)||(this._refs.add(c),f&&f.register(c)):this.has(c,null,null,!1)||(this._values.add(c),typeof c=="string"&&this._lowercase.set(c.toLowerCase(),c))}static merge(c,f,w){if(c=c||new _.Values,f){if(f._override)return f.clone();for(const v of[...f._values,...f._refs])c.add(v)}if(w)for(const v of[...w._values,...w._refs])c.remove(v);return c.length?c:null}remove(c){y.isResolvable(c)?this._refs.delete(c):(this._values.delete(c),typeof c=="string"&&this._lowercase.delete(c.toLowerCase()))}has(c,f,w,v){return!!this.get(c,f,w,v)}get(c,f,w,v){if(!this.length)return!1;if(this._values.has(c))return{value:c};if(typeof c=="string"&&c&&v){const p=this._lowercase.get(c.toLowerCase());if(p)return{value:p}}if(!this._refs.size&&typeof c!="object")return!1;if(typeof c=="object"){for(const p of this._values)if(d(p,c))return{value:p}}if(f)for(const p of this._refs){const b=p.resolve(c,f,w,null,{in:!0});if(b===void 0)continue;const g=p.in&&typeof b=="object"?Array.isArray(b)?b:Object.keys(b):[b];for(const m of g)if(typeof m==typeof c){if(v&&c&&typeof c=="string"){if(m.toLowerCase()===c.toLowerCase())return{value:m,ref:p}}else if(d(m,c))return{value:m,ref:p}}}return!1}override(){this._override=!0}values(c){if(c&&c.display){const f=[];for(const w of[...this._values,...this._refs])w!==void 0&&f.push(w);return f}return Array.from([...this._values,...this._refs])}clone(){const c=new _.Values(this._values,this._refs);return c._override=this._override,c}concat(c){l(!c._override,"Cannot concat override set of values");const f=new _.Values([...this._values,...c._values],[...this._refs,...c._refs]);return f._override=this._override,f}describe(){const c=[];this._override&&c.push({override:!0});for(const f of this._values.values())c.push(f&&typeof f=="object"?{value:f}:f);for(const f of this._refs.values())c.push(f.describe());return c}},_.Values.prototype[y.symbols.values]=!0,_.Values.prototype.slice=_.Values.prototype.clone,_.lowercases=function(c){const f=new Map;if(c)for(const w of c)typeof w=="string"&&f.set(w.toLowerCase(),w);return f}},978:(i,s,a)=>{const l=a(375),d=a(8571),y=a(1687),_=a(9621),c={};i.exports=function(f,w){let v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(l(f&&typeof f=="object","Invalid defaults value: must be an object"),l(!w||w===!0||typeof w=="object","Invalid source value: must be true, falsy or an object"),l(typeof v=="object","Invalid options: must be an object"),!w)return null;if(v.shallow)return c.applyToDefaultsWithShallow(f,w,v);const p=d(f);if(w===!0)return p;const b=v.nullOverride!==void 0&&v.nullOverride;return y(p,w,{nullOverride:b,mergeArrays:!1})},c.applyToDefaultsWithShallow=function(f,w,v){const p=v.shallow;l(Array.isArray(p),"Invalid keys");const b=new Map,g=w===!0?null:new Set;for(let T of p){T=Array.isArray(T)?T:T.split(".");const x=_(f,T);x&&typeof x=="object"?b.set(x,g&&_(w,T)||x):g&&g.add(T)}const m=d(f,{},b);if(!g)return m;for(const T of g)c.reachCopy(m,w,T);const h=v.nullOverride!==void 0&&v.nullOverride;return y(m,w,{nullOverride:h,mergeArrays:!1})},c.reachCopy=function(f,w,v){for(const g of v){if(!(g in w))return;const m=w[g];if(typeof m!="object"||m===null)return;w=m}const p=w;let b=f;for(let g=0;g{const l=a(7916);i.exports=function(d){if(!d){for(var y=arguments.length,_=new Array(y>1?y-1:0),c=1;c{const l=a(9621),d=a(4277),y=a(7043),_={needsProtoHack:new Set([d.set,d.map,d.weakSet,d.weakMap])};i.exports=_.clone=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(typeof c!="object"||c===null)return c;let v=_.clone,p=w;if(f.shallow){if(f.shallow!==!0)return _.cloneWithShallow(c,f);v=h=>h}else if(p){const h=p.get(c);if(h)return h}else p=new Map;const b=d.getInternalProto(c);if(b===d.buffer)return!1;if(b===d.date)return new Date(c.getTime());if(b===d.regex)return new RegExp(c);const g=_.base(c,b,f);if(g===c)return c;if(p&&p.set(c,g),b===d.set)for(const h of c)g.add(v(h,f,p));else if(b===d.map)for(const[h,T]of c)g.set(h,v(T,f,p));const m=y.keys(c,f);for(const h of m){if(h==="__proto__")continue;if(b===d.array&&h==="length"){g.length=c.length;continue}const T=Object.getOwnPropertyDescriptor(c,h);T?T.get||T.set?Object.defineProperty(g,h,T):T.enumerable?g[h]=v(c[h],f,p):Object.defineProperty(g,h,{enumerable:!1,writable:!0,configurable:!0,value:v(c[h],f,p)}):Object.defineProperty(g,h,{enumerable:!0,writable:!0,configurable:!0,value:v(c[h],f,p)})}return g},_.cloneWithShallow=function(c,f){const w=f.shallow;(f=Object.assign({},f)).shallow=!1;const v=new Map;for(const p of w){const b=l(c,p);typeof b!="object"&&typeof b!="function"||v.set(b,b)}return _.clone(c,f,v)},_.base=function(c,f,w){if(w.prototype===!1)return _.needsProtoHack.has(f)?new f.constructor:f===d.array?[]:{};const v=Object.getPrototypeOf(c);if(v&&v.isImmutable)return c;if(f===d.array){const p=[];return v!==f&&Object.setPrototypeOf(p,v),p}if(_.needsProtoHack.has(f)){const p=new v.constructor;return v!==f&&Object.setPrototypeOf(p,v),p}return Object.create(v)}},9474:(i,s,a)=>{const l=a(4277),d={mismatched:null};i.exports=function(y,_,c){return c=Object.assign({prototype:!0},c),!!d.isDeepEqual(y,_,c,[])},d.isDeepEqual=function(y,_,c,f){if(y===_)return y!==0||1/y==1/_;const w=typeof y;if(w!==typeof _||y===null||_===null)return!1;if(w==="function"){if(!c.deepFunction||y.toString()!==_.toString())return!1}else if(w!=="object")return y!=y&&_!=_;const v=d.getSharedType(y,_,!!c.prototype);switch(v){case l.buffer:return!1;case l.promise:return y===_;case l.regex:return y.toString()===_.toString();case d.mismatched:return!1}for(let p=f.length-1;p>=0;--p)if(f[p].isSame(y,_))return!0;f.push(new d.SeenEntry(y,_));try{return!!d.isDeepEqualObj(v,y,_,c,f)}finally{f.pop()}},d.getSharedType=function(y,_,c){if(c)return Object.getPrototypeOf(y)!==Object.getPrototypeOf(_)?d.mismatched:l.getInternalProto(y);const f=l.getInternalProto(y);return f!==l.getInternalProto(_)?d.mismatched:f},d.valueOf=function(y){const _=y.valueOf;if(_===void 0)return y;try{return _.call(y)}catch(c){return c}},d.hasOwnEnumerableProperty=function(y,_){return Object.prototype.propertyIsEnumerable.call(y,_)},d.isSetSimpleEqual=function(y,_){for(const c of Set.prototype.values.call(y))if(!Set.prototype.has.call(_,c))return!1;return!0},d.isDeepEqualObj=function(y,_,c,f,w){const{isDeepEqual:v,valueOf:p,hasOwnEnumerableProperty:b}=d,{keys:g,getOwnPropertySymbols:m}=Object;if(y===l.array){if(!f.part){if(_.length!==c.length)return!1;for(let A=0;A<_.length;++A)if(!v(_[A],c[A],f,w))return!1;return!0}for(const A of _)for(const E of c)if(v(A,E,f,w))return!0}else if(y===l.set){if(_.size!==c.size)return!1;if(!d.isSetSimpleEqual(_,c)){const A=new Set(Set.prototype.values.call(c));for(const E of Set.prototype.values.call(_)){if(A.delete(E))continue;let P=!1;for(const C of A)if(v(E,C,f,w)){A.delete(C),P=!0;break}if(!P)return!1}}}else if(y===l.map){if(_.size!==c.size)return!1;for(const[A,E]of Map.prototype.entries.call(_))if(E===void 0&&!Map.prototype.has.call(c,A)||!v(E,Map.prototype.get.call(c,A),f,w))return!1}else if(y===l.error&&(_.name!==c.name||_.message!==c.message))return!1;const h=p(_),T=p(c);if((_!==h||c!==T)&&!v(h,T,f,w))return!1;const x=g(_);if(!f.part&&x.length!==g(c).length&&!f.skip)return!1;let k=0;for(const A of x)if(f.skip&&f.skip.includes(A))c[A]===void 0&&++k;else if(!b(c,A)||!v(_[A],c[A],f,w))return!1;if(!f.part&&x.length-k!==g(c).length)return!1;if(f.symbols!==!1){const A=m(_),E=new Set(m(c));for(const P of A){if(!f.skip||!f.skip.includes(P)){if(b(_,P)){if(!b(c,P)||!v(_[P],c[P],f,w))return!1}else if(b(c,P))return!1}E.delete(P)}for(const P of E)if(b(c,P))return!1}return!0},d.SeenEntry=class{constructor(y,_){this.obj=y,this.ref=_}isSame(y,_){return this.obj===y&&this.ref===_}}},7916:(i,s,a)=>{const l=a(8761);i.exports=class extends Error{constructor(d){super(d.filter(y=>y!=="").map(y=>typeof y=="string"?y:y instanceof Error?y.message:l(y)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s.assert)}}},5277:i=>{const s={};i.exports=function(a){if(!a)return"";let l="";for(let d=0;d=256?"&#"+a+";":`&#x${a.toString(16).padStart(2,"0")};`)},s.isSafe=function(a){return s.safeCharCodes.has(a)},s.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),s.safeCharCodes=function(){const a=new Set;for(let l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&a.add(l);return a}()},6064:i=>{i.exports=function(s){return s.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:i=>{i.exports=function(){}},1687:(i,s,a)=>{const l=a(375),d=a(8571),y=a(7043),_={};i.exports=_.merge=function(c,f,w){if(l(c&&typeof c=="object","Invalid target value: must be an object"),l(f==null||typeof f=="object","Invalid source value: must be null, undefined, or an object"),!f)return c;if(w=Object.assign({nullOverride:!0,mergeArrays:!0},w),Array.isArray(f)){l(Array.isArray(c),"Cannot merge array onto an object"),w.mergeArrays||(c.length=0);for(let p=0;p{const l=a(375),d={};i.exports=function(y,_,c){if(_===!1||_==null)return y;typeof(c=c||{})=="string"&&(c={separator:c});const f=Array.isArray(_);l(!f||!c.separator,"Separator option is not valid for array-based chain");const w=f?_:_.split(c.separator||".");let v=y;for(let p=0;p{i.exports=function(){try{return JSON.stringify(...arguments)}catch(s){return"[Cannot display object: "+s.message+"]"}}},4277:(i,s)=>{const a={};s=i.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},a.typeMap=new Map([["[object Error]",s.error],["[object Map]",s.map],["[object Promise]",s.promise],["[object Set]",s.set],["[object WeakMap]",s.weakMap],["[object WeakSet]",s.weakSet]]),s.getInternalProto=function(l){if(Array.isArray(l))return s.array;if(l instanceof Date)return s.date;if(l instanceof RegExp)return s.regex;if(l instanceof Error)return s.error;const d=Object.prototype.toString.call(l);return a.typeMap.get(d)||s.generic}},7043:(i,s)=>{s.keys=function(a){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).symbols!==!1?Reflect.ownKeys(a):Object.getOwnPropertyNames(a)}},3652:(i,s,a)=>{const l=a(375),d={};s.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(y,_){const c=[].concat((_=_||{}).before||[]),f=[].concat(_.after||[]),w=_.group||"?",v=_.sort||0;l(!c.includes(w),`Item cannot come before itself: ${w}`),l(!c.includes("?"),"Item cannot come before unassociated items"),l(!f.includes(w),`Item cannot come after itself: ${w}`),l(!f.includes("?"),"Item cannot come after unassociated items"),Array.isArray(y)||(y=[y]);for(const p of y){const b={seq:this._items.length,sort:v,before:c,after:f,group:w,node:p};this._items.push(b)}if(!_.manual){const p=this._sort();l(p,"item",w!=="?"?`added into group ${w}`:"","created a dependencies error")}return this.nodes}merge(y){Array.isArray(y)||(y=[y]);for(const c of y)if(c)for(const f of c._items)this._items.push(Object.assign({},f));this._items.sort(d.mergeSort);for(let c=0;cy.sort===_.sort?0:y.sort<_.sort?-1:1},5380:(i,s,a)=>{const l=a(443),d=a(2178),y={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:l.URL||URL};s.analyze=function(_){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_)return d.code("DOMAIN_NON_EMPTY_STRING");if(typeof _!="string")throw new Error("Invalid input: domain must be a string");if(_.length>256)return d.code("DOMAIN_TOO_LONG");if(!!y.nonAsciiRx.test(_)){if(c.allowUnicode===!1)return d.code("DOMAIN_INVALID_UNICODE_CHARS");_=_.normalize("NFC")}if(y.domainControlRx.test(_))return d.code("DOMAIN_INVALID_CHARS");_=y.punycode(_),c.allowFullyQualified&&_[_.length-1]==="."&&(_=_.slice(0,-1));const w=c.minDomainSegments||y.minDomainSegments,v=_.split(".");if(v.lengthc.maxDomainSegments)return d.code("DOMAIN_SEGMENTS_COUNT_MAX");const p=c.tlds;if(p){const b=v[v.length-1].toLowerCase();if(p.deny&&p.deny.has(b)||p.allow&&!p.allow.has(b))return d.code("DOMAIN_FORBIDDEN_TLDS")}for(let b=0;b63)return d.code("DOMAIN_LONG_SEGMENT");if(b{const l=a(9848),d=a(5380),y=a(2178),_={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.TextEncoder||TextEncoder)};s.analyze=function(c,f){return _.email(c,f)},s.isValid=function(c,f){return!_.email(c,f)},_.email=function(c){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof c!="string")throw new Error("Invalid input: email must be a string");if(!c)return y.code("EMPTY_STRING");const w=!_.nonAsciiRx.test(c);if(!w){if(f.allowUnicode===!1)return y.code("FORBIDDEN_UNICODE");c=c.normalize("NFC")}const v=c.split("@");if(v.length!==2)return v.length>2?y.code("MULTIPLE_AT_CHAR"):y.code("MISSING_AT_CHAR");const[p,b]=v;if(!p)return y.code("EMPTY_LOCAL");if(!f.ignoreLength){if(c.length>254)return y.code("ADDRESS_TOO_LONG");if(_.encoder.encode(p).length>64)return y.code("LOCAL_TOO_LONG")}return _.local(p,w)||d.analyze(b,f)},_.local=function(c,f){const w=c.split(".");for(const v of w){if(!v.length)return y.code("EMPTY_LOCAL_SEGMENT");if(f){if(!_.atextRx.test(v))return y.code("INVALID_LOCAL_CHARS")}else for(const p of v){if(_.atextRx.test(p))continue;const b=_.binary(p);if(!_.atomRx.test(b))return y.code("INVALID_LOCAL_CHARS")}}},_.binary=function(c){return Array.from(_.encoder.encode(c)).map(f=>String.fromCharCode(f)).join("")},_.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,_.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(i,s)=>{s.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},s.code=function(a){return{code:a,error:s.codes[a]}}},9959:(i,s,a)=>{const l=a(375),d=a(5752);s.regex=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};l(y.cidr===void 0||typeof y.cidr=="string","options.cidr must be a string");const _=y.cidr?y.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(_),"options.cidr must be one of required, optional, forbidden"),l(y.version===void 0||typeof y.version=="string"||Array.isArray(y.version),"options.version must be a string or an array of string");let c=y.version||["ipv4","ipv6","ipvfuture"];Array.isArray(c)||(c=[c]),l(c.length>=1,"options.version must have at least 1 version specified");for(let p=0;p{if(_==="forbidden")return d.ip[p];const b=`\\/${p==="ipv4"?d.ip.v4Cidr:d.ip.v6Cidr}`;return _==="required"?`${d.ip[p]}${b}`:`${d.ip[p]}(?:${b})?`}),w=`(?:${f.join("|")})`,v=new RegExp(`^${w}$`);return{cidr:_,versions:c,regex:v,raw:w}}},5752:(i,s,a)=>{const l=a(375),d=a(6064),y={generate:function(){const _={},c="!\\$&'\\(\\)\\*\\+,;=",f="\\w-\\.~%\\dA-Fa-f"+c+":@",w="["+f+"]",v="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";_.ipv4address="(?:"+v+"\\.){3}"+v;const p="[\\dA-Fa-f]{1,4}",b="(?:"+p+":"+p+"|"+_.ipv4address+")",g="(?:"+p+":){6}"+b,m="::(?:"+p+":){5}"+b,h="(?:"+p+")?::(?:"+p+":){4}"+b,T="(?:(?:"+p+":){0,1}"+p+")?::(?:"+p+":){3}"+b,x="(?:(?:"+p+":){0,2}"+p+")?::(?:"+p+":){2}"+b,k="(?:(?:"+p+":){0,3}"+p+")?::"+p+":"+b,A="(?:(?:"+p+":){0,4}"+p+")?::"+b;_.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",_.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",_.ipv6address="(?:"+g+"|"+m+"|"+h+"|"+T+"|"+x+"|"+k+"|"+A+"|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)",_.ipvFuture="v[\\dA-Fa-f]+\\.[\\w-\\.~"+c+":]+",_.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",_.schemeRegex=new RegExp(_.scheme);const E="[\\w-\\.~%\\dA-Fa-f"+c+":]*",P="(?:\\[(?:"+_.ipv6address+"|"+_.ipvFuture+")\\]|"+_.ipv4address+"|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})",C="(?:"+E+"@)?"+P+"(?::\\d*)?",N="(?:"+E+"@)?("+P+")(?::\\d*)?",$=w+"+",F="(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*",z="\\/(?:"+$+F+")?",U=$+F,H="[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=@]+"+F;return _.hierPart="(?:(?:\\/\\/"+C+F+")|"+z+"|"+U+"|(?:\\/\\/\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*(?:\\/[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=:@]*)*))",_.hierPartCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+U+")",_.relativeRef="(?:(?:\\/\\/"+C+F+")|"+z+"|"+H+"|)",_.relativeRefCapture="(?:(?:\\/\\/"+N+F+")|"+z+"|"+H+"|)",_.query="["+f+"\\/\\?]*(?=#|$)",_.queryWithSquareBrackets="["+f+"\\[\\]\\/\\?]*(?=#|$)",_.fragment="["+f+"\\/\\?]*",_}};y.rfc3986=y.generate(),s.ip={v4Cidr:y.rfc3986.ipv4Cidr,v6Cidr:y.rfc3986.ipv6Cidr,ipv4:y.rfc3986.ipv4address,ipv6:y.rfc3986.ipv6address,ipvfuture:y.rfc3986.ipvFuture},y.createRegex=function(_){const c=y.rfc3986,f="(?:\\?"+(_.allowQuerySquareBrackets?c.queryWithSquareBrackets:c.query)+")?(?:#"+c.fragment+")?",w=_.domain?c.relativeRefCapture:c.relativeRef;if(_.relativeOnly)return y.wrap(w+f);let v="";if(_.scheme){l(_.scheme instanceof RegExp||typeof _.scheme=="string"||Array.isArray(_.scheme),"scheme must be a RegExp, String, or Array");const g=[].concat(_.scheme);l(g.length>=1,"scheme must have at least 1 scheme specified");const m=[];for(let h=0;h0&&arguments[0]!==void 0?arguments[0]:{};return _.scheme||_.allowRelative||_.relativeOnly||_.allowQuerySquareBrackets||_.domain?y.createRegex(_):y.uriRegex}},1447:(i,s)=>{const a={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*\.?[0-9]*){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};s.Parser=class{constructor(l){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!d[a.settings]&&d.constants)for(const y in d.constants){const _=d.constants[y];if(_!==null&&!["boolean","number","string"].includes(typeof _))throw new Error(`Formula constant ${y} contains invalid ${typeof _} value type`)}this.settings=d[a.settings]?d:Object.assign({[a.settings]:!0,constants:{},functions:{}},d),this.single=null,this._parts=null,this._parse(l)}_parse(l){let d=[],y="",_=0,c=!1;const f=v=>{if(_)throw new Error("Formula missing closing parenthesis");const p=d.length?d[d.length-1]:null;if(c||y||v){if(p&&p.type==="reference"&&v===")")return p.type="function",p.value=this._subFormula(y,p.value),void(y="");if(v===")"){const b=new s.Parser(y,this.settings);d.push({type:"segment",value:b})}else if(c){if(c==="]")return d.push({type:"reference",value:y}),void(y="");d.push({type:"literal",value:y})}else if(a.operatorCharacters.includes(y))p&&p.type==="operator"&&a.operators.includes(p.value+y)?p.value+=y:d.push({type:"operator",value:y});else if(y.match(a.numberRx))d.push({type:"constant",value:parseFloat(y)});else if(this.settings.constants[y]!==void 0)d.push({type:"constant",value:this.settings.constants[y]});else{if(!y.match(a.tokenRx))throw new Error(`Formula contains invalid token: ${y}`);d.push({type:"reference",value:y})}y=""}};for(const v of l)c?v===c?(f(),c=!1):y+=v:_?v==="("?(y+=v,++_):v===")"?(--_,_?y+=v:f(v)):y+=v:v in a.literals?c=a.literals[v]:v==="("?(f(),++_):a.operatorCharacters.includes(v)?(f(),y=v,f()):v!==" "?y+=v:f();f(),d=d.map((v,p)=>v.type!=="operator"||v.value!=="-"||p&&d[p-1].type!=="operator"?v:{type:"operator",value:"n"});let w=!1;for(const v of d){if(v.type==="operator"){if(a.operatorsPrefix.includes(v.value))continue;if(!w)throw new Error("Formula contains an operator in invalid position");if(!a.operators.includes(v.value))throw new Error(`Formula contains an unknown operator ${v.value}`)}else if(w)throw new Error("Formula missing expected operator");w=!w}if(!w)throw new Error("Formula contains invalid trailing operator");d.length===1&&["reference","literal","constant"].includes(d[0].type)&&(this.single={type:d[0].type==="reference"?"reference":"value",value:d[0].value}),this._parts=d.map(v=>{if(v.type==="operator")return a.operatorsPrefix.includes(v.value)?v:v.value;if(v.type!=="reference")return v.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(v.value))throw new Error(`Formula contains invalid reference ${v.value}`);return this.settings.reference?this.settings.reference(v.value):a.reference(v.value)})}_subFormula(l,d){const y=this.settings.functions[d];if(typeof y!="function")throw new Error(`Formula contains unknown function ${d}`);let _=[];if(l){let c="",f=0,w=!1;const v=()=>{if(!c)throw new Error(`Formula contains function ${d} with invalid arguments ${l}`);_.push(c),c=""};for(let p=0;pnew s.Parser(c,this.settings)),function(c){const f=[];for(const w of _)f.push(w.evaluate(c));return y.call(c,...f)}}evaluate(l){const d=this._parts.slice();for(let y=d.length-2;y>=0;--y){const _=d[y];if(_&&_.type==="operator"){const c=d[y+1];d.splice(y+1,1);const f=a.evaluate(c,l);d[y]=a.single(_.value,f)}}return a.operatorsOrder.forEach(y=>{for(let _=1;_":return d>y;case">=":return d>=y;case"==":return d===y;case"!=":return d!==y;case"&&":return d&&y;case"||":return d||y}return null},a.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:i=>{i.exports={version:"17.7.0"}}},r={},function i(s){var a=r[s];if(a!==void 0)return a.exports;var l=r[s]={exports:{}};return n[s](l,l.exports,i),l.exports}(5107);var n,r})})(R$);const ye=Fp;function I$(e){const t={};return e.forEach(n=>{(n.kind==="text"||n.kind==="link")&&(t[n.key]=ye.string().allow("")),n.kind==="list"&&(t[n.key]=ye.array().allow(""))}),t}function N$(e){return ye.object().keys({id:ye.string().allow(""),civId:ye.string().allow(""),description:ye.string().allow("").required(),graphic:ye.string().allow(""),date:ye.string().allow(""),time:ye.string().allow(""),time_precision:ye.string().allow(""),location:ye.string().allow(""),latitude:ye.string().allow(""),longitude:ye.string().allow(""),x:ye.string().allow(""),y:ye.string().allow(""),z:ye.string().allow(""),type:ye.string().allow(""),category:ye.string().allow(""),category_full:ye.string().allow(""),associations:ye.array().default([]),sources:ye.array(),comments:ye.string().allow(""),time_display:ye.string().allow(""),narrative___stepStyles:ye.array(),shape:ye.string().allow(""),colour:ye.string().allow(""),...I$(e)}).and("latitude","longitude").or("date","latitude")}const O$=ye.object().keys({id:ye.string().required(),description:ye.string().allow("").required(),site:ye.string().required(),latitude:ye.string().required(),longitude:ye.string().required(),enabled:ye.string().allow("")}),M$=ye.object().keys({id:ye.string().allow("").required(),title:ye.string().allow("").required(),desc:ye.string().allow(""),mode:ye.string().allow("").required(),filter_paths:ye.array()}),D$=ye.object().keys({id:ye.string().required(),title:ye.string().allow(""),thumbnail:ye.string().allow(""),paths:ye.array().required(),type:ye.string().allow(""),affil_s:ye.array().allow(""),url:ye.string().allow(""),description:ye.string().allow(""),parent:ye.string().allow(""),author:ye.string().allow(""),date:ye.string().allow(""),notes:ye.string().allow("")}),$$=ye.object().keys({name:ye.string().required(),items:ye.array().required()}),F$=ye.object().keys({id:ye.string().allow(""),title:ye.string().allow(""),shape:ye.string().allow(""),colour:ye.string().allow("")});function zs(e,t,n){return{type:"error",id:t,message:`${e} ${t}: ${n}`}}function j$(e){return e instanceof Date&&!isNaN(e)}function z$(e){const t=new Set([]),n=[];return e.forEach(r=>{t.has(r.id)?n.push({id:r.id,error:zs("Association",r.id,"association was found more than once. Ignoring duplicate.")}):t.add(r.id)}),n}function B$(e,t){const n={events:[],sites:[],associations:[],sources:{},regions:[],shapes:[],notifications:e?e.notifications:null};if(e===void 0)return n;const r={events:[],sites:[],associations:[],sources:[],regions:[],shapes:[]};function i(y,_,c){const f=c.validate(y);if(f.error!=null){const w=y.id||"-",v=S0(_),p=zs(v,w,f.error.message);r[_].push(Object.assign(y,{error:p}))}else n[_].push(y)}function s(y,_,c){y.forEach(f=>{_==="events"&&f.date===""&&f.time===""||i(f,_,c)})}function a(y,_,c){Object.keys(y).forEach(f=>{if(f==="")return;const w=y[f],v=c.validate(w);if(v.error!=null){const p=w.id||"-",b=S0(_);r[_].push({...w,error:zs(b,p,v.error.message)})}else n[_][f]=w})}Array.isArray(t.CUSTOM_EVENT_FIELDS)||(t.CUSTOM_EVENT_FIELDS=[]);const l=N$(t.CUSTOM_EVENT_FIELDS);s(e.events,"events",l),s(e.sites,"sites",O$),s(e.associations,"associations",M$),a(e.sources,"sources",D$),s(e.regions,"regions",$$),s(e.shapes,"shapes",F$),n.regions=n.regions.map(y=>({name:y.name,points:y.items.map(_=>_.replace(/\s/g,"").split(","))})),n.shapes=n.shapes.reduce((y,_)=>(_.shape?y.push(_):r.shapes.push({..._,error:zs("events",_.id,"Invalid event shape. Please specify a shape for this type of event.")}),y),[]);const d=z$(e.associations);return d.length>0&&n.notifications.push({message:"Associations are required to be unique. Ignoring duplicates for now.",items:d,type:"error"}),n.associations=e.associations,n.events=n.events.filter((y,_)=>{let c="";if(y.civId=y.id,y.id=_,y.associations=y.associations.reduce((f,w)=>{const v=n.associations.find(p=>p.id===w);return v&&f.push(v),f},[]),y.shape){const f=n.shapes.find(w=>w.id===y.shape);f?y.shape=f:c="Failed to find related shape. Please verify shape type for event."}return y.latitude=y.latitude.replace(",","."),y.longitude=y.longitude.replace(",","."),y.datetime=QM(y.date,y.time),j$(y.datetime)||(c="Invalid date. It's been dropped, as otherwise timemap won't work as expected."),c?(r.events.push({...y,error:zs("events",y.id,c)}),!1):!0}),n.events.sort((y,_)=>y.datetime-_.datetime),Object.keys(r).forEach(y=>{const _=r[y].length;_&&n.notifications.push({message:`${_} invalid ${y} not displayed.`,items:r[y],type:"error"})}),n}function U$(e,t){return{...e,...B$(t.payload.domain,t.payload.features)}}function H$(e,t){return{...e,notifications:e.notifications.map(n=>({...n,isRead:!0}))}}function W$(e=id.domain,t){switch(t.type){case yg:return U$(e,t);case Fg:return H$(e);default:return e}}function V$(e,t){return Object.assign({},e,{highlighted:t.highlighted})}function q$(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,ticks:t.ticks}}}}function Z$(e,t){return Object.assign({},e,{selected:t.selected})}function G$(e,t){return{...e,associations:{...e.associations,coloringSet:t.coloringSet}}}function Y$(e,t){let[n,r]=Gg(e);const i=[180,180],s=[-180,-180];if(t.narrative){[n,r]=oE(e),t.narrative.steps.forEach(l=>{const d=l.datetime;dr&&(r=d),l.longitude&&l.latitude&&(+l.longitudes[1]&&(s[1]=+l.longitude),+l.latitudes[0]&&(s[0]=+l.latitude))});const a=t.narrative.steps[0];if(a.longitude&&a.latitude){const l=Math.abs(+a.longitude-i[1]),d=Math.abs(+a.longitude-s[1]),y=Math.abs(+a.latitude-i[0]),_=Math.abs(+a.latitude-s[0]);l>d&&(s[1]=+a.longitude+l),l_&&(s[0]=+a.latitude+y),y<_&&(i[0]=+a.latitude-_)}n=n-Math.abs((r-n)/10),r=r+Math.abs((r-n)/10)}return{...e,associations:{...e.associations,narrative:t.narrative},map:{...e.map,bounds:t.narrative?[i,s]:null},timeline:{...e.timeline,range:{...e.timeline.range,current:[n,r]}}}}function K$(e,t){return{...e,narrativeState:{current:t.idx}}}function X$(e,t){t.value instanceof Array||(t.value=[t.value]);const{association:n}=t;let r=e.associations[n].slice(0);return t.value.forEach(i=>{r.includes(i)?r=r.filter(s=>s!==i):r.push(i)}),{...e,associations:{...e.associations,[n]:r}}}function Q$(e,t){let n=[...e.shapes];if(n.includes(t.shape)){const r=n.indexOf(t.shape);n.splice(r,1)}else n.push(t.shape);return{...e,shapes:n}}function J$(e,t){return{...e,filters:{...e.filters,[t.filter]:[]}}}function e3(e,t){return{...e,timeline:{...e.timeline,range:{...e.timeline.range,current:[new Date(t.timerange[0]).toISOString(),new Date(t.timerange[1]).toISOString()]}}}}function t3(e,t){return{...e,timeline:{...e.timeline,dimensions:{...e.timeline.dimensions,...t.dims}}}}function n3(e,t){const n=e.language==="es-MX"?"en-US":"es-MX";return Object.assign({},e,{language:t.language||n})}function r3(e,t){return{...e,source:t.source}}function i3(e,t){return{...e,error:t.message,notifications:[{type:"error",message:t.message}]}}const o3=Xi("isShowingSites"),s3=Xi("isFetchingDomain"),a3=Xi("isFetchingSources"),l3=Xi("isInfopopup"),u3=Xi("isIntropopup"),c3=Xi("isNotification"),d3=Xi("isCover");function f3(e,t){return{...e,errors:{...e.errors,source:t.msg}}}function h3(e){return{...e,loading:!0}}function p3(e){return{...e,loading:!1}}function m3(e,t){const n=t.values.reduce((r,i)=>(i.mode===Yn.CATEGORY&&r.push(i.title),r),[]);return{...e,associations:{...e.associations,categories:n}}}function g3(e,t){const n=t.values.map(r=>r.id);return{...e,shapes:n}}function v3(e,t){return{...e,searchQuery:t.searchQuery}}function y3(e=id.app,t){switch(t.type){case _g:return V$(e,t);case Jc:return Z$(e,t);case nd:return G$(e,t);case Lg:return q$(e,t);case wg:return J$(e,t);case ed:return X$(e,t);case bg:return Q$(e,t);case td:return e3(e,t);case kg:return t3(e,t);case Cg:return Y$(e,t);case Ag:return K$(e,t);case Pg:return r3(e,t);case Og:return n3(e,t);case Rg:return o3(e);case Ig:return s3(e);case Ng:return a3(e);case Mg:return l3(e);case Dg:return u3(e);case $g:return c3(e);case jg:return d3(e);case vg:return i3(e,t);case Ug:return f3(e,t);case Tg:return h3(e);case Sg:return p3(e);case Eg:return m3(e,t);case xg:return g3(e,t);case Bg:return v3(e,t);default:return e}}function _3(e=id.ui,t){switch(t.type){case zg:return{...e,tiles:{...e.tiles,current:e.tiles.current===e.tiles.satellite?e.tiles.default:e.tiles.satellite}};default:return e}}function w3(e=id.features,t){return e}function b3(e,t){return(n,r)=>t({...e(n,r)},r)}const T3=b3(S$,XT({app:y3,domain:W$,ui:_3,features:w3})),S3=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Km,E3=Zc(T3,S3(Tp(b2),Tp(T$)));var Mu={},x3={get exports(){return Mu},set exports(e){Mu=e}},Lf,N0;function k3(){if(N0)return Lf;N0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Lf=e,Lf}var Rf,O0;function C3(){if(O0)return Rf;O0=1;var e=k3();function t(){}function n(){}return n.resetWarningCache=t,Rf=function(){function r(a,l,d,y,_,c){if(c!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Rf}var M0;function De(){return M0||(M0=1,x3.exports=C3()()),Mu}var A3=De();const Tr=uc(A3);function ev(e){return t=>!!t.type&&t.type.tabsRole===e}const od=ev("Tab"),tv=ev("TabList"),nv=ev("TabPanel");function P3(e){return od(e)||tv(e)||nv(e)}function jp(e,t){return ee.Children.map(e,n=>n===null?null:P3(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"?ee.cloneElement(n,{...n.props,children:jp(n.props.children,t)}):n)}function hE(e,t){return ee.Children.forEach(e,n=>{n!==null&&(od(n)||nv(n)?t(n):n.props&&n.props.children&&typeof n.props.children=="object"&&(tv(n)&&t(n),hE(n.props.children,t)))})}function pE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{od(n)&&t++}),t}function gE(e){return e&&"getAttribute"in e}function D0(e){return gE(e)&&e.getAttribute("data-rttab")}function xi(e){return gE(e)&&e.getAttribute("aria-disabled")==="true"}let Du;function L3(e){const t=e||(typeof window<"u"?window:void 0);try{Du=!!(typeof t<"u"&&t.document&&t.document.activeElement)}catch{Du=!1}}const R3={className:"react-tabs",focus:!1},iv=e=>{let t=ee.useRef([]),n=ee.useRef([]);const r=ee.useRef();function i(F,z){if(F<0||F>=y())return;const{onSelect:U,selectedIndex:H}=e;U(F,H,z)}function s(F){const z=y();for(let U=F+1;UF;)if(!xi(_(z)))return z;return F}function l(){const F=y();for(let z=0;z{let de=fe;if(tv(fe)){let ue=0,be=!1;Du==null&&L3(J);const ne=J||(typeof window<"u"?window:void 0);Du&&ne&&(be=wt.Children.toArray(fe.props.children).filter(od).some((O,j)=>ne.document.activeElement===_(j))),de=ee.cloneElement(fe,{children:jp(fe.props.children,O=>{const j=`tabs-${ue}`,V=W===ue,Z={tabRef:Q=>{t.current[j]=Q},id:n.current[ue],selected:V,focus:V&&(H||be)};return Y&&(Z.selectedClassName=Y),U&&(Z.disabledClassName=U),ue++,ee.cloneElement(O,Z)})})}else if(nv(fe)){const ue={id:n.current[F],selected:W===F};B&&(ue.forceRender=B),G&&(ue.selectedClassName=G),F++,de=ee.cloneElement(fe,ue)}return de})}function f(F){const{direction:z,disableUpDownKeys:U,disableLeftRightKeys:H}=e;if(v(F.target)){let{selectedIndex:B}=e,W=!1,Y=!1;(F.code==="Space"||F.keyCode===32||F.code==="Enter"||F.keyCode===13)&&(W=!0,Y=!1,w(F)),!H&&(F.keyCode===37||F.code==="ArrowLeft")||!U&&(F.keyCode===38||F.code==="ArrowUp")?(z==="rtl"?B=s(B):B=a(B),W=!0,Y=!0):!H&&(F.keyCode===39||F.code==="ArrowRight")||!U&&(F.keyCode===40||F.code==="ArrowDown")?(z==="rtl"?B=a(B):B=s(B),W=!0,Y=!0):F.keyCode===35||F.code==="End"?(B=d(),W=!0,Y=!0):(F.keyCode===36||F.code==="Home")&&(B=l(),W=!0,Y=!0),W&&F.preventDefault(),Y&&i(B,F)}}function w(F){let z=F.target;do if(v(z)){if(xi(z))return;const U=[].slice.call(z.parentNode.children).filter(D0).indexOf(z);i(U,F);return}while((z=z.parentNode)!=null)}function v(F){if(!D0(F))return!1;let z=F.parentElement;do{if(z===r.current)return!0;if(z.getAttribute("data-rttabs"))break;z=z.parentElement}while(z);return!1}const{children:p,className:b,disabledTabClassName:g,domRef:m,focus:h,forceRenderTabPanel:T,onSelect:x,selectedIndex:k,selectedTabClassName:A,selectedTabPanelClassName:E,environment:P,disableUpDownKeys:C,disableLeftRightKeys:N,...$}=e;return wt.createElement("div",Object.assign({},$,{className:rv(b),onClick:w,onKeyDown:f,ref:F=>{r.current=F,m&&m(F)},"data-rttabs":!0}),c())};iv.defaultProps=R3;iv.propTypes={};const I3=0,Vl=1,N3={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},O3=e=>e.selectedIndex===null?Vl:I3,sd=e=>{const{children:t,defaultFocus:n,defaultIndex:r,focusTabOnClick:i,onSelect:s}=e,[a,l]=ee.useState(n),[d]=ee.useState(O3(e)),[y,_]=ee.useState(d===Vl?r||0:null);if(ee.useEffect(()=>{l(!1)},[]),d===Vl){const w=mE(t);ee.useEffect(()=>{if(y!=null){const v=Math.max(0,w-1);_(Math.min(y,v))}},[w])}const c=(w,v,p)=>{typeof s=="function"&&s(w,v,p)===!1||(i&&l(!0),d===Vl&&_(w))};let f={...e};return f.focus=a,f.onSelect=c,y!=null&&(f.selectedIndex=y),delete f.defaultFocus,delete f.defaultIndex,delete f.focusTabOnClick,wt.createElement(iv,f,t)};sd.propTypes={};sd.defaultProps=N3;sd.tabsRole="Tabs";const M3={className:"react-tabs__tab-list"},ad=e=>{const{children:t,className:n,...r}=e;return wt.createElement("ul",Object.assign({},r,{className:rv(n),role:"tablist"}),t)};ad.tabsRole="TabList";ad.propTypes={};ad.defaultProps=M3;const $0="react-tabs__tab-panel",D3={className:$0,forceRender:!1,selectedClassName:`${$0}--selected`},Yr=e=>{const{children:t,className:n,forceRender:r,id:i,selected:s,selectedClassName:a,...l}=e;return wt.createElement("div",Object.assign({},l,{className:rv(n,{[a]:s}),role:"tabpanel",id:`panel${i}`,"aria-labelledby":`tab${i}`}),r||s?t:null)};Yr.tabsRole="TabPanel";Yr.propTypes={};Yr.defaultProps=D3;const vE=({label:e,isActive:t,onClickCheckbox:n,color:r,styleProps:i})=>{const s=r||YM,a={checkboxStyles:{background:t?s:"none",border:`1px solid ${s}`}},l=i?i.containerStyles:{},d=i?i.checkboxStyles:a.checkboxStyles,y=e.toLowerCase().replaceAll(" ","-"),_=c=>{c.stopPropagation(),n(c)};return ie("div",{className:t?"item active":"item",onClick:_,children:[M("button",{id:y,onClick:_,children:M("div",{className:"border",style:l,children:M("div",{className:"checkbox",style:d})})}),M("label",{htmlFor:y,style:{color:r},children:e})]})};function yE(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let es=yE();function $3(e){es=e}const _E=/[&<>"']/,F3=new RegExp(_E.source,"g"),wE=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,j3=new RegExp(wE.source,"g"),z3={"&":"&","<":"<",">":">",'"':""","'":"'"},F0=e=>z3[e];function jt(e,t){if(t){if(_E.test(e))return e.replace(F3,F0)}else if(wE.test(e))return e.replace(j3,F0);return e}const B3=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function bE(e){return e.replace(B3,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const U3=/(^|[^\[])\^/g;function Ye(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(U3,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const H3=/[^\w:]/g,W3=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function j0(e,t,n){if(e){let r;try{r=decodeURIComponent(bE(n)).replace(H3,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!W3.test(n)&&(n=G3(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const kl={},V3=/^[^:]+:\/*[^/]*$/,q3=/^([^:]+:)[\s\S]*$/,Z3=/^([^:]+:\/*[^/]*)[\s\S]*$/;function G3(e,t){kl[" "+e]||(V3.test(e)?kl[" "+e]=e+"/":kl[" "+e]=ql(e,"/",!0)),e=kl[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(q3,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Z3,"$1")+t:e+t}const $u={exec:function(){}};function Xn(e){let t=1,n,r;for(;t{let d=!1,y=a;for(;--y>=0&&l[y]==="\\";)d=!d;return d?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function U0(e,t,n,r){const i=t.href,s=t.title?jt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const l={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:s,text:jt(a)}}function K3(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(` `).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[a]=s;return a.length>=r.length?i.slice(r.length):i}).join(` `)}class ov{constructor(t){this.options=t||es}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ql(r,` `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=K3(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=ql(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:s,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,s,a,l,d,y,_,c,f,w,v,p=n[1].trim();const b=p.length>1,g={type:"list",raw:"",ordered:b,start:b?+p.slice(0,-1):"",loose:!1,items:[]};p=b?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=b?p:"[*+-]");const m=new RegExp(`^( {0,3}${p})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(v=!1,!(!(n=m.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),_=n[2].split(` `,1)[0].replace(/^\t+/,T=>" ".repeat(3*T.length)),c=t.split(` `,1)[0],this.options.pedantic?(a=2,w=_.trimLeft()):(a=n[2].search(/[^ ]/),a=a>4?1:a,w=_.slice(a),a+=n[1].length),d=!1,!_&&/^ *$/.test(c)&&(r+=c+` -`,t=t.substring(c.length+1),v=!0),!v){const T=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),x=new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),P=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;t&&(f=t.split(` -`,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(k.test(c)||P.test(c)||T.test(c)||x.test(t)));){if(c.search(/[^ ]/)>=a||!c.trim())w+=` -`+c.slice(a);else{if(d||_.search(/[^ ]/)>=4||k.test(_)||P.test(_)||x.test(_))break;w+=` +`,t=t.substring(c.length+1),v=!0),!v){const T=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),x=new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;t&&(f=t.split(` +`,1)[0],c=f,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(k.test(c)||A.test(c)||T.test(c)||x.test(t)));){if(c.search(/[^ ]/)>=a||!c.trim())w+=` +`+c.slice(a);else{if(d||_.search(/[^ ]/)>=4||k.test(_)||A.test(_)||x.test(_))break;w+=` `+c}!d&&!c.trim()&&(d=!0),r+=f+` -`,t=t.substring(f.length+1),_=c.slice(a)}}g.loose||(y?g.loose=!0:/\n *\n *$/.test(r)&&(y=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(w),i&&(s=i[0]!=="[ ] ",w=w.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:w}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=w.trimRight(),g.raw=g.raw.trimRight();const h=g.items.length;for(l=0;lk.type==="space"),x=T.length>0&&T.some(k=>/\n.*\n/.test(k.raw));g.loose=x}if(g.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:z0(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`,t=t.substring(f.length+1),_=c.slice(a)}}g.loose||(y?g.loose=!0:/\n *\n *$/.test(r)&&(y=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(w),i&&(s=i[0]!=="[ ] ",w=w.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:w}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=w.trimRight(),g.raw=g.raw.trimRight();const h=g.items.length;for(l=0;lk.type==="space"),x=T.length>0&&T.some(k=>/\n.*\n/.test(k.raw));g.loose=x}if(g.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(n){const r={type:"table",header:z0(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,a,l,d;for(s=0;s({text:y}));for(i=r.header.length,a=0;a/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Ft(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const a=ql(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Y3(n[2],"()");if(a>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],s=a[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),U0(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return U0(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const a=i[0].length-1;let l,d,y=a,_=0;const c=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+a);(i=c.exec(n))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=l.length,i[3]||i[4]){y+=d;continue}else if((i[5]||i[6])&&a%3&&!((a+d)%3)){_+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y+_);const f=t.slice(0,a+i.index+(i[0].length-l.length)+d);if(Math.min(a,d)%2){const v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}const w=f.slice(2,-2);return{type:"strong",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=Ft(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=Ft(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=Ft(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=Ft(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);i=Ft(r[0]),r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ft(r[0]):r[0]:i=Ft(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Te={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:$u,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Te._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Te.def=Ye(Te.def).replace("label",Te._label).replace("title",Te._title).getRegex();Te.bullet=/(?:[*+-]|\d{1,9}[.)])/;Te.listItemStart=Ye(/^( *)(bull) */).replace("bull",Te.bullet).getRegex();Te.list=Ye(Te.list).replace(/bull/g,Te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Te.def.source+")").getRegex();Te._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Te._comment=/|$)/;Te.html=Ye(Te.html,"i").replace("comment",Te._comment).replace("tag",Te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Te.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.blockquote=Ye(Te.blockquote).replace("paragraph",Te.paragraph).getRegex();Te.normal=Xn({},Te);Te.gfm=Xn({},Te.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Te.gfm.table=Ye(Te.gfm.table).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.gfm.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Te.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.pedantic=Xn({},Te.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Te._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$u,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ye(Te.normal._paragraph).replace("hr",Te.hr).replace("heading",` *#{1,6} *[^ +`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:jt(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):jt(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const a=ql(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Y3(n[2],"()");if(a>-1){const d=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,d).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],s=a[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),U0(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return U0(r,i,r[0],this.lexer)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const a=i[0].length-1;let l,d,y=a,_=0;const c=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+a);(i=c.exec(n))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=l.length,i[3]||i[4]){y+=d;continue}else if((i[5]||i[6])&&a%3&&!((a+d)%3)){_+=d;continue}if(y-=d,y>0)continue;d=Math.min(d,d+y+_);const f=t.slice(0,a+i.index+(i[0].length-l.length)+d);if(Math.min(a,d)%2){const v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}const w=f.slice(2,-2);return{type:"strong",raw:f,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=jt(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=jt(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=jt(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=jt(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);i=jt(r[0]),r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):jt(r[0]):r[0]:i=jt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const Te={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:$u,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Te._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Te.def=Ye(Te.def).replace("label",Te._label).replace("title",Te._title).getRegex();Te.bullet=/(?:[*+-]|\d{1,9}[.)])/;Te.listItemStart=Ye(/^( *)(bull) */).replace("bull",Te.bullet).getRegex();Te.list=Ye(Te.list).replace(/bull/g,Te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Te.def.source+")").getRegex();Te._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Te._comment=/|$)/;Te.html=Ye(Te.html,"i").replace("comment",Te._comment).replace("tag",Te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Te.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.blockquote=Ye(Te.blockquote).replace("paragraph",Te.paragraph).getRegex();Te.normal=Xn({},Te);Te.gfm=Xn({},Te.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Te.gfm.table=Ye(Te.gfm.table).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.gfm.paragraph=Ye(Te._paragraph).replace("hr",Te.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Te.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Te._tag).getRegex();Te.pedantic=Xn({},Te.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Te._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$u,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ye(Te.normal._paragraph).replace("hr",Te.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Te.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const me={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:$u,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:$u,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";me.punctuation=Ye(me.punctuation).replace(/punctuation/g,me._punctuation).getRegex();me.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;me.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;me._comment=Ye(Te._comment).replace("(?:-->|$)","-->").getRegex();me.emStrong.lDelim=Ye(me.emStrong.lDelim).replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimAst=Ye(me.emStrong.rDelimAst,"g").replace(/punct/g,me._punctuation).getRegex();me.emStrong.rDelimUnd=Ye(me.emStrong.rDelimUnd,"g").replace(/punct/g,me._punctuation).getRegex();me._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;me._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;me._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;me.autolink=Ye(me.autolink).replace("scheme",me._scheme).replace("email",me._email).getRegex();me._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;me.tag=Ye(me.tag).replace("comment",me._comment).replace("attribute",me._attribute).getRegex();me._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;me._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;me._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;me.link=Ye(me.link).replace("label",me._label).replace("href",me._href).replace("title",me._title).getRegex();me.reflink=Ye(me.reflink).replace("label",me._label).replace("ref",Te._label).getRegex();me.nolink=Ye(me.nolink).replace("ref",Te._label).getRegex();me.reflinkSearch=Ye(me.reflinkSearch,"g").replace("reflink",me.reflink).replace("nolink",me.nolink).getRegex();me.normal=Xn({},me);me.pedantic=Xn({},me.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ye(/^!?\[(label)\]\((.*?)\)/).replace("label",me._label).getRegex(),reflink:Ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",me._label).getRegex()});me.gfm=Xn({},me.normal,{escape:Ye(me.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}class Dr{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||es,this.options.tokenizer=this.options.tokenizer||new ov,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:Te.normal,inline:me.normal};this.options.pedantic?(n.block=Te.pedantic,n.inline=me.pedantic):this.options.gfm&&(n.block=Te.gfm,this.options.breaks?n.inline=me.breaks:n.inline=me.gfm),this.tokenizer.rules=n}static get rules(){return{block:Te,inline:me}}static lex(t,n){return new Dr(n).lex(t)}static lexInline(t,n){return new Dr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` `),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,d,y)=>d+" ".repeat(y.length));let r,i,s,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=` `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` @@ -110,8 +110,8 @@ Check out docs/custom-covers.md in the [Timemap GitHub repo](https://github.com/ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),a=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=` `+r.raw,i.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,i,s,a=t,l,d,y;if(this.tokens.links){const _=Object.keys(this.tokens.links);if(_.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)_.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+B0("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+B0("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,l.index+l[0].length-2)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(d||(y=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(_=>(r=_.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,a,y)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t,H0)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,H0))){t=t.substring(r.raw.length),n.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let _=1/0;const c=t.slice(1);let f;this.options.extensions.startInline.forEach(function(w){f=w.call({lexer:this},c),typeof f=="number"&&f>=0&&(_=Math.min(_,f))}),_<1/0&&_>=0&&(s=t.substring(0,_+1))}if(r=this.tokenizer.inlineText(s,X3)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(y=r.raw.slice(-1)),d=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(t){const _="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return n}}class sv{constructor(t){this.options=t||es}code(t,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(r=!0,t=s)}return t=t.replace(/\n$/,"")+` -`,i?'
'+(r?t:Ft(t,!0))+`
-`:"
"+(r?t:Ft(t,!0))+`
+`,i?'
'+(r?t:jt(t,!0))+`
+`:"
"+(r?t:jt(t,!0))+`
`}blockquote(t){return`
${t}
`}html(t){return t}heading(t,n,r,i){if(this.options.headerIds){const s=this.options.headerPrefix+i.slug(r);return`${t} @@ -129,28 +129,28 @@ ${t} `}tablerow(t){return` ${t} `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+` -`}strong(t){return`${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
":"
"}del(t){return`${t}`}link(t,n,r){if(t=j0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='
",i}image(t,n,r){if(t=j0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i=`${r}":">",i}text(t){return t}}class SE{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class EE{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class cr{constructor(t){this.options=t||es,this.options.renderer=this.options.renderer||new sv,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new SE,this.slugger=new EE}static parse(t,n){return new cr(n).parse(t)}static parseInline(t,n){return new cr(n).parseInline(t)}parse(t,n=!0){let r="",i,s,a,l,d,y,_,c,f,w,v,p,b,g,m,h,T,x,k;const P=t.length;for(i=0;i0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=x+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=x+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:x}):g+=x),g+=this.parse(m.tokens,b),f+=this.renderer.listitem(g,T,h);r+=this.renderer.list(f,v,p);continue}case"html":{r+=this.renderer.html(w.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(w.tokens));continue}case"text":{for(f=w.tokens?this.parseInline(w.tokens):w.text;i+1${t}`}em(t){return`${t}`}codespan(t){return`${t}`}br(){return this.options.xhtml?"
":"
"}del(t){return`${t}`}link(t,n,r){if(t=j0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i='
",i}image(t,n,r){if(t=j0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let i=`${r}":">",i}text(t){return t}}class SE{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class EE{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let r=t,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[t];do i++,r=t+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[t]=i,this.seen[r]=0),r}slug(t,n={}){const r=this.serialize(t);return this.getNextSafeSlug(r,n.dryrun)}}class cr{constructor(t){this.options=t||es,this.options.renderer=this.options.renderer||new sv,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new SE,this.slugger=new EE}static parse(t,n){return new cr(n).parse(t)}static parseInline(t,n){return new cr(n).parseInline(t)}parse(t,n=!0){let r="",i,s,a,l,d,y,_,c,f,w,v,p,b,g,m,h,T,x,k;const A=t.length;for(i=0;i0&&m.tokens[0].type==="paragraph"?(m.tokens[0].text=x+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&m.tokens[0].tokens[0].type==="text"&&(m.tokens[0].tokens[0].text=x+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:x}):g+=x),g+=this.parse(m.tokens,b),f+=this.renderer.listitem(g,T,h);r+=this.renderer.list(f,v,p);continue}case"html":{r+=this.renderer.html(w.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(w.tokens));continue}case"text":{for(f=w.tokens?this.parseInline(w.tokens):w.text;i+1"u"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(n=t,t=null),t=Xn({},_e.defaults,t||{}),TE(t),n){const i=t.highlight;let s;try{s=Dr.lex(e,t)}catch(d){return n(d)}const a=function(d){let y;if(!d)try{t.walkTokens&&_e.walkTokens(s,t.walkTokens),y=cr.parse(s,t)}catch(_){d=_}return t.highlight=i,d?n(d):n(null,y)};if(!i||i.length<3||(delete t.highlight,!s.length))return a();let l=0;_e.walkTokens(s,function(d){d.type==="code"&&(l++,setTimeout(()=>{i(d.text,d.lang,function(y,_){if(y)return a(y);_!=null&&_!==d.text&&(d.text=_,d.escaped=!0),l--,l===0&&a()})},0))}),l===0&&a();return}function r(i){if(i.message+=` -Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+Ft(i.message+"",!0)+"
";throw i}try{const i=Dr.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(_e.walkTokens(i,t.walkTokens)).then(()=>cr.parse(i,t)).catch(r);_e.walkTokens(i,t.walkTokens)}return cr.parse(i,t)}catch(i){r(i)}}_e.options=_e.setOptions=function(e){return Xn(_e.defaults,e),$3(_e.defaults),_e};_e.getDefaults=yE;_e.defaults=es;_e.use=function(...e){const t=_e.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r=Xn({},n);if(r.async=_e.defaults.async||r.async,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=_e.defaults.renderer||new sv;for(const s in n.renderer){const a=i[s];i[s]=(...l)=>{let d=n.renderer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.renderer=i}if(n.tokenizer){const i=_e.defaults.tokenizer||new ov;for(const s in n.tokenizer){const a=i[s];i[s]=(...l)=>{let d=n.tokenizer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.tokenizer=i}if(n.walkTokens){const i=_e.defaults.walkTokens;r.walkTokens=function(s){let a=[];return a.push(n.walkTokens.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}_e.setOptions(r)})};_e.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(_e,r)),r.type){case"table":{for(const i of r.header)n=n.concat(_e.walkTokens(i.tokens,t));for(const i of r.rows)for(const s of i)n=n.concat(_e.walkTokens(s.tokens,t));break}case"list":{n=n.concat(_e.walkTokens(r.items,t));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(_e.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,t)))}return n};_e.parseInline=function(e,t){if(typeof e>"u"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Xn({},_e.defaults,t||{}),TE(t);try{const n=Dr.lexInline(e,t);return t.walkTokens&&_e.walkTokens(n,t.walkTokens),cr.parseInline(n,t)}catch(n){if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+Ft(n.message+"",!0)+"
";throw n}};_e.Parser=cr;_e.parser=cr.parse;_e.Renderer=sv;_e.TextRenderer=SE;_e.Lexer=Dr;_e.lexer=Dr.lex;_e.Tokenizer=ov;_e.Slugger=EE;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;cr.parse;Dr.lex;function xE(e,t){const[n,r]=e,i=t.includes(n),s=Object.entries(r).flatMap(a=>xE(a,t)).filter(a=>t.includes(a)===i);return s.push(n),s}function Q3({filters:e,activeFilters:t,onSelectFilter:n,language:r,coloringSet:i,filterColors:s,title:a,description:l}){function d(_,c){const[f,w]=_,v=$S(f),p=xE(_,t),b=HS(f,i),g=b!==-1&&t.includes(f)?s[b]:"",m={color:g,marginLeft:`${c*20}px`};return ie("li",{className:"filter-filter",style:{...m},children:[M(vE,{label:v,isActive:t.includes(f),onClickCheckbox:h=>{h.preventDefault(),n(f,p)},color:g}),Object.keys(w).length>0?M("ul",{children:Object.entries(w).map(h=>d(h,c+1))}):null]},v.replace(/ /g,"_"))}function y(_){const c=FS(_);return M("div",{className:"scrolled-area",children:Object.entries(c).map(f=>d(f,0))})}return ie("div",{children:[M("div",{className:"sticky-header",children:M("h2",{children:a})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:_e(l)}}),y(e)]})}const kE=({data:e,activeValues:t,onSelect:n,type:r})=>{const i=r===Yn.CATEGORY?"title":"id";return M("div",{children:e.map(s=>M("li",{className:"filter-filter active",children:M(vE,{label:s.title,isActive:t.includes(s[i]),onClickCheckbox:()=>n(s[i]),styleProps:s.styles})},s.title.replace(/ /g,"_")))})},J3=({categories:e,activeCategories:t,onCategoryFilter:n,language:r,title:i,description:s})=>ie("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(kE,{data:e,activeValues:t,onSelect:n,type:Yn.CATEGORY})]}),eF=({shapes:e,activeShapes:t,onShapeFilter:n,language:r,title:i,description:s})=>{const a=dD(e,t);return ie("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(kE,{data:a,activeValues:t,onSelect:n,type:DS})]})},tF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"location_on"})})},nF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"home"})})};function rF(e){function t(){return ie(Ln,{children:[M("div",{className:"bottom-action-block",children:e.features.USE_SITES?M(tF,{isActive:e.sites.enabled,onClickHandler:e.sites.toggle}):null}),M("div",{className:"botttom-action-block",children:e.features.USE_COVER?M(nF,{onClickHandler:e.cover.toggle}):null}),ie("div",{style:{fontSize:9,paddingTop:10},children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from ",M("br",{})," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}return M("div",{className:"bottom-actions",children:t()})}function av({isActive:e,iconKey:t,onClick:n,label:r}){return ie("div",{className:e?"toolbar-tab active":"toolbar-tab",onClick:n,children:[M("i",{className:"material-icons",children:t}),M("div",{className:"tab-caption",children:r})]},t)}av.tabsRole="Tab";const W0=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Pr=(()=>{if(typeof document>"u")return!1;const e=W0[0],t={};for(const n of W0)if((n==null?void 0:n[1])in document){for(const[i,s]of n.entries())t[e[i]]=s;return t}return!1})(),V0={change:Pr.fullscreenchange,error:Pr.fullscreenerror};let fn={request(e=document.documentElement,t){return new Promise((n,r)=>{const i=()=>{fn.off("change",i),n()};fn.on("change",i);const s=e[Pr.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(r)})},exit(){return new Promise((e,t)=>{if(!fn.isFullscreen){e();return}const n=()=>{fn.off("change",n),e()};fn.on("change",n);const r=document[Pr.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},toggle(e,t){return fn.isFullscreen?fn.exit():fn.request(e,t)},onchange(e){fn.on("change",e)},onerror(e){fn.on("error",e)},on(e,t){const n=V0[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=V0[e];n&&document.removeEventListener(n,t,!1)},raw:Pr};Object.defineProperties(fn,{isFullscreen:{get:()=>Boolean(document[Pr.fullscreenElement])},element:{enumerable:!0,get:()=>document[Pr.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[Pr.fullscreenEnabled])}});Pr||(fn={isEnabled:!1});const Hr=fn;let iF=class extends ee.Component{constructor(t){super(t),this.onFullscreenStateChange=this.onFullscreenStateChange.bind(this),this.state={isFullscreen:Hr.isFullscreen}}componentDidMount(){Hr.on&&Hr.on("change",this.onFullscreenStateChange)}componentWillUnmount(){Hr.off&&Hr.off("change",this.onFullscreenStateChange)}onFullscreenStateChange(t){this.setState({isFullscreen:Hr.isFullscreen})}onToggleFullscreen(){Hr.toggle().catch(console.warn)}render(){if(!Hr.isEnabled)return null;const{language:t}=this.props,{isFullscreen:n}=this.state;return M(av,{isActive:n,label:n?Ue[t].toolbar.fullscreen_exit:Ue[t].toolbar.fullscreen_enter,iconKey:n?"fullscreen_exit":"fullscreen",onClick:this.onToggleFullscreen})}};var oF="Expected a function",CE="__lodash_hash_undefined__",PE=1/0,sF="[object Function]",aF="[object GeneratorFunction]",lF="[object Symbol]",uF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cF=/^\w*$/,dF=/^\./,fF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hF=/[\\^$.*+?()[\]{}|]/g,pF=/\\(\\)?/g,mF=/^\[object .+?Constructor\]$/,gF=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,vF=typeof self=="object"&&self&&self.Object===Object&&self,lv=gF||vF||Function("return this")();function yF(e,t){return e==null?void 0:e[t]}function _F(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var wF=Array.prototype,bF=Function.prototype,AE=Object.prototype,If=lv["__core-js_shared__"],q0=function(){var e=/[^.]+$/.exec(If&&If.keys&&If.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),LE=bF.toString,uv=AE.hasOwnProperty,RE=AE.toString,TF=RegExp("^"+LE.call(uv).replace(hF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z0=lv.Symbol,SF=wF.splice,EF=IE(lv,"Map"),Ta=IE(Object,"create"),G0=Z0?Z0.prototype:void 0,Y0=G0?G0.toString:void 0;function Vi(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function OF(e,t){var n=this.__data__,r=ld(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}ts.prototype.clear=LF;ts.prototype.delete=RF;ts.prototype.get=IF;ts.prototype.has=NF;ts.prototype.set=OF;function Qi(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function fv(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function nj(e={stringFormatter:fv()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function rj(e={stringFormatter:fv()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function X0(e,t,n){const r=e[t];return r===void 0?n:r}function ME(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function zp(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class ij{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||fv(),i=rj({stringFormatter:r}),s={header:r,undefined:Nf,boolean:Nf,number:tj(),bigint:Nf,string:r,symbol:nj({stringFormatter:r}),function:i,object:i};return n.formatters={...s,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>K0(i,r,n):i=>X0(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?s=>K0(s,r.value,i):s=>X0(s,r.value,i)};if(typeof r.value=="function"){const s=r.label||r.value.name||"",a={label:s,default:i};return{label:s,value(l){const d=r.value(l,a);return d??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return zp(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(ME,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return zp(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class oj extends ij{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,l)=>(Object.keys(l).forEach(d=>{a.includes(d)||a.push(d)}),a),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(ME,[])}processData(t){return zp(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Lt;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(Lt||(Lt={}));Lt.QUOTATION_MARK+"",Lt.QUOTATION_MARK,Lt.REVERSE_SOLIDUS+"",Lt.REVERSE_SOLIDUS,Lt.SOLIDUS+"",Lt.SOLIDUS,Lt.LATIN_SMALL_LETTER_B+"",Lt.BACKSPACE,Lt.LATIN_SMALL_LETTER_F+"",Lt.FORM_FEED,Lt.LATIN_SMALL_LETTER_N+"",Lt.NEWLINE,Lt.LATIN_SMALL_LETTER_R+"",Lt.CARRIAGE_RETURN,Lt.LATIN_SMALL_LETTER_T+"",Lt.TAB;var Q0;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(Q0||(Q0={}));var J0;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(J0||(J0={}));var ew;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(ew||(ew={}));var tw;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(tw||(tw={}));class Of extends ee.Component{onDownload(t,n){let r=`ukr-civharm-${Ho().format("YYYY-MM-DD")}`;if(t==="api")window.open(Gt.API_DATA,"_blank");else if(t==="csv"){let i=this.getCsvData(n);k0(`${r}.csv`,i)}else if(t==="json"){let i=this.getJsonData(n);k0(`${r}.json`,i)}}getCsvData(t){const{events:n,sources:r}=t,i=n.map(a=>({id:a.civId,date:a.date,latitude:a.latitude,longitude:a.longitude,location:a.location,description:a.description,sources:a.sources.map(l=>r[l].paths[0]).join(","),associations:a.associations.map(l=>l.filter_paths.join("=")).join(",")}));return new oj().parse(i,{flatten:!0})}getJsonData(t){const{events:n,sources:r}=t,i=n.map(s=>({id:s.civId,date:s.date,latitude:s.latitude,longitude:s.longitude,location:s.location,description:s.description,sources:s.sources.map(a=>{const l=r[a];return{id:a,path:l.paths[0],description:l.description}}),filters:s.associations.map(a=>({key:a.filter_paths[0],value:a.filter_paths[1]}))}));return JSON.stringify(i)}render(){const{language:t,domain:n,format:r}=this.props,i=Ue[t].toolbar.download.panel.formats[r];return ie("div",{className:"download-row",children:[ie("span",{className:"download-button",onClick:()=>this.onDownload(r,n),children:[M("i",{className:"material-icons",children:"download"}),M("span",{className:"tab-caption",children:i.label})]},`download-${r}`),M("span",{className:"download-description",children:i.description})]})}}const sj=({language:e,title:t,description:n,domain:r})=>ie("div",{className:"react-innertabpanel",children:[M("div",{className:"sticky-header",children:M("h2",{children:t})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:n}}),M("hr",{}),M(Of,{language:e,domain:r,format:"api"}),M(Of,{language:e,domain:r,format:"csv"}),M(Of,{language:e,domain:r,format:"json"})]});class aj extends ee.Component{constructor(t){super(t),this.onSelectFilter=this.onSelectFilter.bind(this),this.state={_selected:0,_active:!1}}selectTab(t){let n=!0;this.state._selected===t&&this.state._active===!0&&(n=!1),this.setState({_selected:t,_active:n})}onSelectFilter(t,n){const{filters:r,activeFilters:i,coloringSet:s,maxNumOfColors:a}=this.props,l=tD(t);if(i.includes(t)){if(l&&i.includes(l)){const _=nD(r,l,t);let c=!0;for(const f of _)if(i.includes(f)){c=!1;break}if(c){const f=hg(t).filter(w=>i.includes(w));n=n.concat(f)}}const y=iD(s,n);this.props.actions.updateColoringSet(y)}else{const y=rD(s,n);y.length<=a&&this.props.actions.updateColoringSet(y)}this.props.methods.onSelectFilter(n),this.props.actions.updateSelected([])}renderClosePanel(){return M("div",{className:"panel-header",onClick:()=>this.selectTab(this.state._selected),children:M("div",{className:"caret"})})}goToNarrative(t){this.props.methods.onSelectNarrative(t)}renderToolbarNarrativePanel(){const{panels:t}=this.props.toolbarCopy;return ie(Yr,{children:[M("h2",{children:t.narratives.label}),M("p",{children:t.narratives.description}),this.props.narratives.map(n=>M("div",{className:"panel-action action",children:ie("button",{onClick:()=>{this.goToNarrative(n)},children:[M("p",{children:n.id}),M("p",{children:M("small",{children:eD(n.desc,120)})})]})}))]})}renderToolbarCategoriesPanel(){const{categories:t}=this.props.toolbarCopy.panels,n=fD(this.props.categories,Object.keys(t));return M("div",{children:Object.keys(n).map(r=>{const i=n[r];return M(Yr,{children:M(J3,{categories:i,activeCategories:this.props.activeCategories,onCategoryFilter:this.props.methods.onCategoryFilter,language:this.props.language,title:t[r].label,description:t[r].description})},r)})})}renderToolbarFilterPanel(){const{panels:t}=this.props.toolbarCopy;return M(Yr,{children:M(Q3,{filters:this.props.filters,activeFilters:this.props.activeFilters,onSelectFilter:this.onSelectFilter,language:this.props.language,coloringSet:this.props.coloringSet,filterColors:this.props.filterColors,title:t.filters.label,description:t.filters.description})})}renderToolbarShapePanel(){const{panels:t}=this.props.toolbarCopy;if(this.props.features.USE_SHAPES)return M(Yr,{children:M(eF,{shapes:this.props.shapes,activeShapes:this.props.activeShapes,onShapeFilter:this.props.methods.onShapeFilter,language:this.props.language,title:t.shapes.label,description:t.shapes.description})})}renderToolbarDownloadPanel(){const{panels:t}=this.props.toolbarCopy;return M(Yr,{children:M(sj,{language:this.props.language,title:t.download.label,description:t.download.description,domain:this.props.domain})})}renderToolbarTab(t,n,r,i){return M(av,{label:n,iconKey:r,isActive:this.state._selected===t&&this.state._active===!0,onClick:()=>{this.selectTab(t)}},i)}renderToolbarCategoryTabs(t){const{categories:n}=this.props.toolbarCopy.panels;return M("div",{children:Object.keys(t).map(r=>this.renderToolbarTab(t[r],n[r].label,n[r].icon,r))})}renderToolbarPanels(){const{features:t,narratives:n}=this.props,r=this.state._active===!0?"toolbar-panels":"toolbar-panels folded";return ie("div",{className:r,children:[this.renderClosePanel(),n&&n.length!==0?this.renderToolbarNarrativePanel():null,t.USE_CATEGORIES?this.renderToolbarCategoriesPanel():null,t.USE_ASSOCIATIONS?this.renderToolbarFilterPanel():null,t.USE_SHAPES?this.renderToolbarShapePanel():null,t.USE_DOWNLOAD?this.renderToolbarDownloadPanel():null]})}renderToolbarNavs(){return this.props.narratives?this.props.narratives.map((t,n)=>{const i=n===this.state._selected&&this.state._active===!0?"toolbar-tab active":"toolbar-tab";return M("div",{className:i,onClick:()=>{this.selectTab(n)},children:M("div",{className:"tab-caption",children:t.label})})}):null}renderToolbarTabs(){const{features:t,narratives:n,toolbarCopy:r}=this.props,i=n&&n.length!==0;let s=Ue[this.props.language].toolbar.title;s=Gt.display_title;const{panels:a}=r,l=0,d=hD(Object.keys(a.categories),i?1:0),y=Object.keys(d).length,_=pD(i,t.USE_CATEGORIES,y||0),c=_+t.USE_SHAPES,f=c+t.USE_DOWNLOAD;return ie("div",{className:"toolbar",children:[M("div",{className:"toolbar-header",onClick:this.props.methods.onTitle,children:M("p",{children:s})}),M("div",{className:"toolbar-tabs",children:ie(ad,{children:[i?this.renderToolbarTab(l,a.narratives.label,a.narratives.icon):null,t.USE_CATEGORIES?this.renderToolbarCategoryTabs(d):null,t.USE_ASSOCIATIONS?this.renderToolbarTab(_,a.filters.label,a.filters.icon):null,t.USE_SHAPES?this.renderToolbarTab(c,a.shapes.label,a.shapes.icon):null,t.USE_DOWNLOAD?this.renderToolbarTab(f,a.download.label,a.download.icon):null,t.USE_FULLSCREEN&&M(iF,{language:this.props.language})]})}),M(rF,{info:{enabled:this.props.infoShowing,toggle:this.props.actions.toggleInfoPopup},sites:{enabled:this.props.sitesShowing,toggle:this.props.actions.toggleSites},cover:{toggle:this.props.actions.toggleCover},features:this.props.features}),ie("div",{id:"made-with",children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from"," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}render(){const{isNarrative:t}=this.props;return M("div",{id:"toolbar-wrapper",className:`toolbar-wrapper ${t?"narrative-mode":""}`,children:ie(sd,{onSelect:()=>null,selectedIndex:this.state._selected,children:[this.renderToolbarTabs(),this.renderToolbarPanels()]})})}}function lj(e){return{filters:nE(e),categories:eE(e),narratives:Kg(e),shapes:i$(e),language:e.app.language,toolbarCopy:e.app.toolbar,activeFilters:qg(e),activeCategories:Zg(e),activeShapes:rE(e),viewFilters:e.app.associations.views,narrative:e.app.associations.narrative,sitesShowing:e.app.flags.isShowingSites,infoShowing:e.app.flags.isInfopopup,coloringSet:e.app.associations.coloringSet,maxNumOfColors:e.ui.coloring.maxNumOfColors,filterColors:e.ui.coloring.colors,eventRadius:e.ui.eventRadius,features:fr(e)}}function uj(e){return{actions:Qo(rd,e)}}const cj=pi(lj,uj)(aj),dj=window.innerWidth>1e3?14:18,DE=({content:e=[],styles:t={},isOpen:n=!0,onClose:r,title:i,theme:s="light",children:a})=>ie("div",{children:[M("div",{className:`infopopup__bg ${n?"":"hidden"}`,onClick:r}),ie("div",{className:`infopopup ${n?"":"hidden"} ${s==="dark"?"dark":"light"}`,style:{...t,fontSize:dj},children:[ie("div",{className:"legend-header",children:[M("button",{onClick:r,className:"side-menu-burg over-white is-active",children:M("span",{})}),M("h2",{children:i})]}),e.map((l,d)=>M("div",{dangerouslySetInnerHTML:{__html:_e(l)}},d)),a]})]}),fj=({isOpen:e,onClose:t,language:n,styles:r})=>M(DE,{title:Ue[n].legend.default.header,content:Ue[n].legend.default.intro,onClose:t,isOpen:e,styles:r});class hj extends ee.Component{constructor(t){super(),this.state={isExtended:!1}}toggleDetails(){this.setState({isExtended:!this.state.isExtended})}renderItems(t){return t?M("div",{children:t.map((n,r)=>n.error?M("p",{children:n.error.message},r):null)}):""}renderNotificationContent(t){const{type:n,message:r,items:i}=t;return ie("div",{children:[M("div",{className:`message ${n}`,children:r}),M("div",{className:`details ${this.state.isExtended}`,children:i!==null?this.renderItems(i):""})]})}render(){return this.props.notifications?this.props.notifications.filter(n=>!("isRead"in n&&n.isRead)).length>0?M("div",{className:"notification-wrapper",children:this.props.notifications.map((n,r)=>ie("div",{className:"notification",onClick:()=>this.toggleDetails(),children:[M("button",{onClick:this.props.onToggle,className:"side-menu-burg over-white is-active",children:M("span",{})}),this.renderNotificationContent(n)]},r))}):M("div",{}):null}}var hv={},nt={},pj={get exports(){return nt},set exports(e){nt=e}},Go={},mj={get exports(){return Go},set exports(e){Go=e}};(function(e){function t(n){return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(mj);(function(e){var t=Go.default;function n(i){if(typeof WeakMap!="function")return null;var s=new WeakMap,a=new WeakMap;return(n=function(d){return d?a:s})(i)}function r(i,s){if(!s&&i&&i.__esModule)return i;if(i===null||t(i)!=="object"&&typeof i!="function")return{default:i};var a=n(s);if(a&&a.has(i))return a.get(i);var l={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(y!=="default"&&Object.prototype.hasOwnProperty.call(i,y)){var _=d?Object.getOwnPropertyDescriptor(i,y):null;_&&(_.get||_.set)?Object.defineProperty(l,y,_):l[y]=i[y]}return l.default=i,a&&a.set(i,l),l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(pj);var ke={},gj={get exports(){return ke},set exports(e){ke=e}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(gj);var Mf={},Fu={},vj={get exports(){return Fu},set exports(e){Fu=e}},ju={},yj={get exports(){return ju},set exports(e){ju=e}},zu={},_j={get exports(){return zu},set exports(e){zu=e}},Bu={},wj={get exports(){return Bu},set exports(e){Bu=e}},nw;function bj(){return nw||(nw=1,function(e){var t=Go.default;function n(r,i){if(t(r)!=="object"||r===null)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var a=s.call(r,i||"default");if(t(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(wj)),Bu}var rw;function $E(){return rw||(rw=1,function(e){var t=Go.default,n=bj();function r(i){var s=n(i,"string");return t(s)==="symbol"?s:String(s)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(_j)),zu}var iw;function cd(){return iw||(iw=1,function(e){var t=$E();function n(r,i,s){return i=t(i),i in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(yj)),ju}var ow;function mi(){return ow||(ow=1,function(e){var t=cd();function n(r){for(var i=1;i=0)&&(i[a]=n[a]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Sj)),Hu}var aw;function pv(){return aw||(aw=1,function(e){var t=Ej();function n(r,i){if(r==null)return{};var s=t(r,i),a,l;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(r,a)&&(s[a]=r[a])}return s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Tj)),Uu}var Wu={},xj={get exports(){return Wu},set exports(e){Wu=e}},lw;function ot(){return lw||(lw=1,function(e){function t(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(xj)),Wu}var Vu={},kj={get exports(){return Vu},set exports(e){Vu=e}},uw;function st(){return uw||(uw=1,function(e){var t=$E();function n(i,s){for(var a=0;aAn error occurred:

"+jt(i.message+"",!0)+"
";throw i}try{const i=Dr.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(_e.walkTokens(i,t.walkTokens)).then(()=>cr.parse(i,t)).catch(r);_e.walkTokens(i,t.walkTokens)}return cr.parse(i,t)}catch(i){r(i)}}_e.options=_e.setOptions=function(e){return Xn(_e.defaults,e),$3(_e.defaults),_e};_e.getDefaults=yE;_e.defaults=es;_e.use=function(...e){const t=_e.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{const r=Xn({},n);if(r.async=_e.defaults.async||r.async,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=t.renderers[i.name];s?t.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=_e.defaults.renderer||new sv;for(const s in n.renderer){const a=i[s];i[s]=(...l)=>{let d=n.renderer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.renderer=i}if(n.tokenizer){const i=_e.defaults.tokenizer||new ov;for(const s in n.tokenizer){const a=i[s];i[s]=(...l)=>{let d=n.tokenizer[s].apply(i,l);return d===!1&&(d=a.apply(i,l)),d}}r.tokenizer=i}if(n.walkTokens){const i=_e.defaults.walkTokens;r.walkTokens=function(s){let a=[];return a.push(n.walkTokens.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}_e.setOptions(r)})};_e.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(_e,r)),r.type){case"table":{for(const i of r.header)n=n.concat(_e.walkTokens(i.tokens,t));for(const i of r.rows)for(const s of i)n=n.concat(_e.walkTokens(s.tokens,t));break}case"list":{n=n.concat(_e.walkTokens(r.items,t));break}default:_e.defaults.extensions&&_e.defaults.extensions.childTokens&&_e.defaults.extensions.childTokens[r.type]?_e.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(_e.walkTokens(r[i],t))}):r.tokens&&(n=n.concat(_e.walkTokens(r.tokens,t)))}return n};_e.parseInline=function(e,t){if(typeof e>"u"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Xn({},_e.defaults,t||{}),TE(t);try{const n=Dr.lexInline(e,t);return t.walkTokens&&_e.walkTokens(n,t.walkTokens),cr.parseInline(n,t)}catch(n){if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+jt(n.message+"",!0)+"
";throw n}};_e.Parser=cr;_e.parser=cr.parse;_e.Renderer=sv;_e.TextRenderer=SE;_e.Lexer=Dr;_e.lexer=Dr.lex;_e.Tokenizer=ov;_e.Slugger=EE;_e.parse=_e;_e.options;_e.setOptions;_e.use;_e.walkTokens;_e.parseInline;cr.parse;Dr.lex;function xE(e,t){const[n,r]=e,i=t.includes(n),s=Object.entries(r).flatMap(a=>xE(a,t)).filter(a=>t.includes(a)===i);return s.push(n),s}function Q3({filters:e,activeFilters:t,onSelectFilter:n,language:r,coloringSet:i,filterColors:s,title:a,description:l}){function d(_,c){const[f,w]=_,v=$S(f),p=xE(_,t),b=HS(f,i),g=b!==-1&&t.includes(f)?s[b]:"",m={color:g,marginLeft:`${c*20}px`};return ie("li",{className:"filter-filter",style:{...m},children:[M(vE,{label:v,isActive:t.includes(f),onClickCheckbox:h=>{h.preventDefault(),n(f,p)},color:g}),Object.keys(w).length>0?M("ul",{children:Object.entries(w).map(h=>d(h,c+1))}):null]},v.replace(/ /g,"_"))}function y(_){const c=FS(_);return M("div",{className:"scrolled-area",children:Object.entries(c).map(f=>d(f,0))})}return ie("div",{children:[M("div",{className:"sticky-header",children:M("h2",{children:a})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:_e(l)}}),y(e)]})}const kE=({data:e,activeValues:t,onSelect:n,type:r})=>{const i=r===Yn.CATEGORY?"title":"id";return M("div",{children:e.map(s=>M("li",{className:"filter-filter active",children:M(vE,{label:s.title,isActive:t.includes(s[i]),onClickCheckbox:()=>n(s[i]),styleProps:s.styles})},s.title.replace(/ /g,"_")))})},J3=({categories:e,activeCategories:t,onCategoryFilter:n,language:r,title:i,description:s})=>ie("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(kE,{data:e,activeValues:t,onSelect:n,type:Yn.CATEGORY})]}),eF=({shapes:e,activeShapes:t,onShapeFilter:n,language:r,title:i,description:s})=>{const a=dD(e,t);return ie("div",{className:"react-innertabpanel",children:[M("h2",{children:i}),M("p",{dangerouslySetInnerHTML:{__html:_e(s)}}),M(kE,{data:a,activeValues:t,onSelect:n,type:DS})]})},tF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"location_on"})})},nF=({isActive:e,isDisabled:t,onClickHandler:n})=>{let r=e?"action-button enabled":"action-button";return t&&(r="action-button disabled"),M("button",{className:r,onClick:n,children:M("i",{className:"material-icons",children:"home"})})};function rF(e){function t(){return ie(Ln,{children:[M("div",{className:"bottom-action-block",children:e.features.USE_SITES?M(tF,{isActive:e.sites.enabled,onClickHandler:e.sites.toggle}):null}),M("div",{className:"botttom-action-block",children:e.features.USE_COVER?M(nF,{onClickHandler:e.cover.toggle}):null}),ie("div",{style:{fontSize:9,paddingTop:10},children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from ",M("br",{})," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}return M("div",{className:"bottom-actions",children:t()})}function av({isActive:e,iconKey:t,onClick:n,label:r}){return ie("div",{className:e?"toolbar-tab active":"toolbar-tab",onClick:n,children:[M("i",{className:"material-icons",children:t}),M("div",{className:"tab-caption",children:r})]},t)}av.tabsRole="Tab";const W0=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Ar=(()=>{if(typeof document>"u")return!1;const e=W0[0],t={};for(const n of W0)if((n==null?void 0:n[1])in document){for(const[i,s]of n.entries())t[e[i]]=s;return t}return!1})(),V0={change:Ar.fullscreenchange,error:Ar.fullscreenerror};let fn={request(e=document.documentElement,t){return new Promise((n,r)=>{const i=()=>{fn.off("change",i),n()};fn.on("change",i);const s=e[Ar.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(r)})},exit(){return new Promise((e,t)=>{if(!fn.isFullscreen){e();return}const n=()=>{fn.off("change",n),e()};fn.on("change",n);const r=document[Ar.exitFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},toggle(e,t){return fn.isFullscreen?fn.exit():fn.request(e,t)},onchange(e){fn.on("change",e)},onerror(e){fn.on("error",e)},on(e,t){const n=V0[e];n&&document.addEventListener(n,t,!1)},off(e,t){const n=V0[e];n&&document.removeEventListener(n,t,!1)},raw:Ar};Object.defineProperties(fn,{isFullscreen:{get:()=>Boolean(document[Ar.fullscreenElement])},element:{enumerable:!0,get:()=>document[Ar.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[Ar.fullscreenEnabled])}});Ar||(fn={isEnabled:!1});const Hr=fn;let iF=class extends ee.Component{constructor(t){super(t),this.onFullscreenStateChange=this.onFullscreenStateChange.bind(this),this.state={isFullscreen:Hr.isFullscreen}}componentDidMount(){Hr.on&&Hr.on("change",this.onFullscreenStateChange)}componentWillUnmount(){Hr.off&&Hr.off("change",this.onFullscreenStateChange)}onFullscreenStateChange(t){this.setState({isFullscreen:Hr.isFullscreen})}onToggleFullscreen(){Hr.toggle().catch(console.warn)}render(){if(!Hr.isEnabled)return null;const{language:t}=this.props,{isFullscreen:n}=this.state;return M(av,{isActive:n,label:n?Ue[t].toolbar.fullscreen_exit:Ue[t].toolbar.fullscreen_enter,iconKey:n?"fullscreen_exit":"fullscreen",onClick:this.onToggleFullscreen})}};var oF="Expected a function",CE="__lodash_hash_undefined__",AE=1/0,sF="[object Function]",aF="[object GeneratorFunction]",lF="[object Symbol]",uF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cF=/^\w*$/,dF=/^\./,fF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hF=/[\\^$.*+?()[\]{}|]/g,pF=/\\(\\)?/g,mF=/^\[object .+?Constructor\]$/,gF=typeof Kr=="object"&&Kr&&Kr.Object===Object&&Kr,vF=typeof self=="object"&&self&&self.Object===Object&&self,lv=gF||vF||Function("return this")();function yF(e,t){return e==null?void 0:e[t]}function _F(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var wF=Array.prototype,bF=Function.prototype,PE=Object.prototype,If=lv["__core-js_shared__"],q0=function(){var e=/[^.]+$/.exec(If&&If.keys&&If.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),LE=bF.toString,uv=PE.hasOwnProperty,RE=PE.toString,TF=RegExp("^"+LE.call(uv).replace(hF,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z0=lv.Symbol,SF=wF.splice,EF=IE(lv,"Map"),Ta=IE(Object,"create"),G0=Z0?Z0.prototype:void 0,Y0=G0?G0.toString:void 0;function Vi(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function OF(e,t){var n=this.__data__,r=ld(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}ts.prototype.clear=LF;ts.prototype.delete=RF;ts.prototype.get=IF;ts.prototype.has=NF;ts.prototype.set=OF;function Qi(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function fv(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function nj(e={stringFormatter:fv()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function rj(e={stringFormatter:fv()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function X0(e,t,n){const r=e[t];return r===void 0?n:r}function ME(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function zp(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class ij{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||fv(),i=rj({stringFormatter:r}),s={header:r,undefined:Nf,boolean:Nf,number:tj(),bigint:Nf,string:r,symbol:nj({stringFormatter:r}),function:i,object:i};return n.formatters={...s,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>K0(i,r,n):i=>X0(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?s=>K0(s,r.value,i):s=>X0(s,r.value,i)};if(typeof r.value=="function"){const s=r.label||r.value.name||"",a={label:s,default:i};return{label:s,value(l){const d=r.value(l,a);return d??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return zp(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(ME,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return zp(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class oj extends ij{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,l)=>(Object.keys(l).forEach(d=>{a.includes(d)||a.push(d)}),a),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(ME,[])}processData(t){return zp(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var Lt;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(Lt||(Lt={}));Lt.QUOTATION_MARK+"",Lt.QUOTATION_MARK,Lt.REVERSE_SOLIDUS+"",Lt.REVERSE_SOLIDUS,Lt.SOLIDUS+"",Lt.SOLIDUS,Lt.LATIN_SMALL_LETTER_B+"",Lt.BACKSPACE,Lt.LATIN_SMALL_LETTER_F+"",Lt.FORM_FEED,Lt.LATIN_SMALL_LETTER_N+"",Lt.NEWLINE,Lt.LATIN_SMALL_LETTER_R+"",Lt.CARRIAGE_RETURN,Lt.LATIN_SMALL_LETTER_T+"",Lt.TAB;var Q0;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(Q0||(Q0={}));var J0;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(J0||(J0={}));var ew;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(ew||(ew={}));var tw;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(tw||(tw={}));class Of extends ee.Component{onDownload(t,n){let r=`ukr-civharm-${Ho().format("YYYY-MM-DD")}`;if(t==="api")console.log(It.API_DATA),window.open(It.API_DATA,"_blank");else if(t==="csv"){let i=this.getCsvData(n);k0(`${r}.csv`,i)}else if(t==="json"){let i=this.getJsonData(n);k0(`${r}.json`,i)}}getCsvData(t){const{events:n,sources:r}=t,i=n.map(a=>({id:a.civId,date:a.date,latitude:a.latitude,longitude:a.longitude,location:a.location,description:a.description,sources:a.sources.map(l=>r[l].paths[0]).join(","),associations:a.associations.map(l=>l.filter_paths.join("=")).join(",")}));return new oj().parse(i,{flatten:!0})}getJsonData(t){const{events:n,sources:r}=t,i=n.map(s=>({id:s.civId,date:s.date,latitude:s.latitude,longitude:s.longitude,location:s.location,description:s.description,sources:s.sources.map(a=>{const l=r[a];return{id:a,path:l.paths[0],description:l.description}}),filters:s.associations.map(a=>({key:a.filter_paths[0],value:a.filter_paths[1]}))}));return JSON.stringify(i)}render(){const{language:t,domain:n,format:r}=this.props,i=Ue[t].toolbar.download.panel.formats[r];let s=M("span",{className:"download-description",children:i.description});if(r=="api"){const a=It.API_DATA;s=ie("span",{className:"download-description",children:[i.description," ",M("a",{href:a,children:"Copy API endpoint link from here."})]})}return ie("div",{className:"download-row",children:[ie("span",{className:"download-button",onClick:()=>this.onDownload(r,n),children:[M("i",{className:"material-icons",children:"download"}),M("span",{className:"tab-caption",children:i.label})]},`download-${r}`),s]})}}const sj=({language:e,title:t,description:n,domain:r})=>ie("div",{className:"react-innertabpanel",children:[M("div",{className:"sticky-header",children:M("h2",{children:t})}),M("div",{className:"panel-description",dangerouslySetInnerHTML:{__html:n}}),M("hr",{}),M(Of,{language:e,domain:r,format:"api"}),M(Of,{language:e,domain:r,format:"csv"}),M(Of,{language:e,domain:r,format:"json"})]});class aj extends ee.Component{constructor(t){super(t),this.onSelectFilter=this.onSelectFilter.bind(this),this.state={_selected:0,_active:!1}}selectTab(t){let n=!0;this.state._selected===t&&this.state._active===!0&&(n=!1),this.setState({_selected:t,_active:n})}onSelectFilter(t,n){const{filters:r,activeFilters:i,coloringSet:s,maxNumOfColors:a}=this.props,l=tD(t);if(i.includes(t)){if(l&&i.includes(l)){const _=nD(r,l,t);let c=!0;for(const f of _)if(i.includes(f)){c=!1;break}if(c){const f=hg(t).filter(w=>i.includes(w));n=n.concat(f)}}const y=iD(s,n);this.props.actions.updateColoringSet(y)}else{const y=rD(s,n);y.length<=a&&this.props.actions.updateColoringSet(y)}this.props.methods.onSelectFilter(n),this.props.actions.updateSelected([])}renderClosePanel(){return M("div",{className:"panel-header",onClick:()=>this.selectTab(this.state._selected),children:M("div",{className:"caret"})})}goToNarrative(t){this.props.methods.onSelectNarrative(t)}renderToolbarNarrativePanel(){const{panels:t}=this.props.toolbarCopy;return ie(Yr,{children:[M("h2",{children:t.narratives.label}),M("p",{children:t.narratives.description}),this.props.narratives.map(n=>M("div",{className:"panel-action action",children:ie("button",{onClick:()=>{this.goToNarrative(n)},children:[M("p",{children:n.id}),M("p",{children:M("small",{children:eD(n.desc,120)})})]})}))]})}renderToolbarCategoriesPanel(){const{categories:t}=this.props.toolbarCopy.panels,n=fD(this.props.categories,Object.keys(t));return M("div",{children:Object.keys(n).map(r=>{const i=n[r];return M(Yr,{children:M(J3,{categories:i,activeCategories:this.props.activeCategories,onCategoryFilter:this.props.methods.onCategoryFilter,language:this.props.language,title:t[r].label,description:t[r].description})},r)})})}renderToolbarFilterPanel(){const{panels:t}=this.props.toolbarCopy;return M(Yr,{children:M(Q3,{filters:this.props.filters,activeFilters:this.props.activeFilters,onSelectFilter:this.onSelectFilter,language:this.props.language,coloringSet:this.props.coloringSet,filterColors:this.props.filterColors,title:t.filters.label,description:t.filters.description})})}renderToolbarShapePanel(){const{panels:t}=this.props.toolbarCopy;if(this.props.features.USE_SHAPES)return M(Yr,{children:M(eF,{shapes:this.props.shapes,activeShapes:this.props.activeShapes,onShapeFilter:this.props.methods.onShapeFilter,language:this.props.language,title:t.shapes.label,description:t.shapes.description})})}renderToolbarDownloadPanel(){const{panels:t}=this.props.toolbarCopy;return M(Yr,{children:M(sj,{language:this.props.language,title:t.download.label,description:t.download.description,domain:this.props.domain})})}renderToolbarTab(t,n,r,i){return M(av,{label:n,iconKey:r,isActive:this.state._selected===t&&this.state._active===!0,onClick:()=>{this.selectTab(t)}},i)}renderToolbarCategoryTabs(t){const{categories:n}=this.props.toolbarCopy.panels;return M("div",{children:Object.keys(t).map(r=>this.renderToolbarTab(t[r],n[r].label,n[r].icon,r))})}renderToolbarPanels(){const{features:t,narratives:n}=this.props,r=this.state._active===!0?"toolbar-panels":"toolbar-panels folded";return ie("div",{className:r,children:[this.renderClosePanel(),n&&n.length!==0?this.renderToolbarNarrativePanel():null,t.USE_CATEGORIES?this.renderToolbarCategoriesPanel():null,t.USE_ASSOCIATIONS?this.renderToolbarFilterPanel():null,t.USE_SHAPES?this.renderToolbarShapePanel():null,t.USE_DOWNLOAD?this.renderToolbarDownloadPanel():null]})}renderToolbarNavs(){return this.props.narratives?this.props.narratives.map((t,n)=>{const i=n===this.state._selected&&this.state._active===!0?"toolbar-tab active":"toolbar-tab";return M("div",{className:i,onClick:()=>{this.selectTab(n)},children:M("div",{className:"tab-caption",children:t.label})})}):null}renderToolbarTabs(){const{features:t,narratives:n,toolbarCopy:r}=this.props,i=n&&n.length!==0;let s=Ue[this.props.language].toolbar.title;s=It.display_title;const{panels:a}=r,l=0,d=hD(Object.keys(a.categories),i?1:0),y=Object.keys(d).length,_=pD(i,t.USE_CATEGORIES,y||0),c=_+t.USE_SHAPES,f=c+t.USE_DOWNLOAD;return ie("div",{className:"toolbar",children:[M("div",{className:"toolbar-header",onClick:this.props.methods.onTitle,children:M("p",{children:s})}),M("div",{className:"toolbar-tabs",children:ie(ad,{children:[i?this.renderToolbarTab(l,a.narratives.label,a.narratives.icon):null,t.USE_CATEGORIES?this.renderToolbarCategoryTabs(d):null,t.USE_ASSOCIATIONS?this.renderToolbarTab(_,a.filters.label,a.filters.icon):null,t.USE_SHAPES?this.renderToolbarTab(c,a.shapes.label,a.shapes.icon):null,t.USE_DOWNLOAD?this.renderToolbarTab(f,a.download.label,a.download.icon):null,t.USE_FULLSCREEN&&M(iF,{language:this.props.language})]})}),M(rF,{info:{enabled:this.props.infoShowing,toggle:this.props.actions.toggleInfoPopup},sites:{enabled:this.props.sitesShowing,toggle:this.props.actions.toggleSites},cover:{toggle:this.props.actions.toggleCover},features:this.props.features}),ie("div",{id:"made-with",children:["Made with"," ",M("a",{href:"https://github.com/forensic-architecture/timemap",children:"TimeMap"}),M("br",{}),"Free software from"," ",M("a",{href:"https://forensic-architecture.org",children:"Forensic Architecture"})]})]})}render(){const{isNarrative:t}=this.props;return M("div",{id:"toolbar-wrapper",className:`toolbar-wrapper ${t?"narrative-mode":""}`,children:ie(sd,{onSelect:()=>null,selectedIndex:this.state._selected,children:[this.renderToolbarTabs(),this.renderToolbarPanels()]})})}}function lj(e){return{filters:nE(e),categories:eE(e),narratives:Kg(e),shapes:i$(e),language:e.app.language,toolbarCopy:e.app.toolbar,activeFilters:qg(e),activeCategories:Zg(e),activeShapes:rE(e),viewFilters:e.app.associations.views,narrative:e.app.associations.narrative,sitesShowing:e.app.flags.isShowingSites,infoShowing:e.app.flags.isInfopopup,coloringSet:e.app.associations.coloringSet,maxNumOfColors:e.ui.coloring.maxNumOfColors,filterColors:e.ui.coloring.colors,eventRadius:e.ui.eventRadius,features:fr(e)}}function uj(e){return{actions:Qo(rd,e)}}const cj=pi(lj,uj)(aj),dj=window.innerWidth>1e3?14:18,DE=({content:e=[],styles:t={},isOpen:n=!0,onClose:r,title:i,theme:s="light",children:a})=>ie("div",{children:[M("div",{className:`infopopup__bg ${n?"":"hidden"}`,onClick:r}),ie("div",{className:`infopopup ${n?"":"hidden"} ${s==="dark"?"dark":"light"}`,style:{...t,fontSize:dj},children:[ie("div",{className:"legend-header",children:[M("button",{onClick:r,className:"side-menu-burg over-white is-active",children:M("span",{})}),M("h2",{children:i})]}),e.map((l,d)=>M("div",{dangerouslySetInnerHTML:{__html:_e(l)}},d)),a]})]}),fj=({isOpen:e,onClose:t,language:n,styles:r})=>M(DE,{title:Ue[n].legend.default.header,content:Ue[n].legend.default.intro,onClose:t,isOpen:e,styles:r});class hj extends ee.Component{constructor(t){super(),this.state={isExtended:!1}}toggleDetails(){this.setState({isExtended:!this.state.isExtended})}renderItems(t){return t?M("div",{children:t.map((n,r)=>n.error?M("p",{children:n.error.message},r):null)}):""}renderNotificationContent(t){const{type:n,message:r,items:i}=t;return ie("div",{children:[M("div",{className:`message ${n}`,children:r}),M("div",{className:`details ${this.state.isExtended}`,children:i!==null?this.renderItems(i):""})]})}render(){return this.props.notifications?this.props.notifications.filter(n=>!("isRead"in n&&n.isRead)).length>0?M("div",{className:"notification-wrapper",children:this.props.notifications.map((n,r)=>ie("div",{className:"notification",onClick:()=>this.toggleDetails(),children:[M("button",{onClick:this.props.onToggle,className:"side-menu-burg over-white is-active",children:M("span",{})}),this.renderNotificationContent(n)]},r))}):M("div",{}):null}}var hv={},nt={},pj={get exports(){return nt},set exports(e){nt=e}},Go={},mj={get exports(){return Go},set exports(e){Go=e}};(function(e){function t(n){return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(mj);(function(e){var t=Go.default;function n(i){if(typeof WeakMap!="function")return null;var s=new WeakMap,a=new WeakMap;return(n=function(d){return d?a:s})(i)}function r(i,s){if(!s&&i&&i.__esModule)return i;if(i===null||t(i)!=="object"&&typeof i!="function")return{default:i};var a=n(s);if(a&&a.has(i))return a.get(i);var l={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(y!=="default"&&Object.prototype.hasOwnProperty.call(i,y)){var _=d?Object.getOwnPropertyDescriptor(i,y):null;_&&(_.get||_.set)?Object.defineProperty(l,y,_):l[y]=i[y]}return l.default=i,a&&a.set(i,l),l}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(pj);var ke={},gj={get exports(){return ke},set exports(e){ke=e}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(gj);var Mf={},Fu={},vj={get exports(){return Fu},set exports(e){Fu=e}},ju={},yj={get exports(){return ju},set exports(e){ju=e}},zu={},_j={get exports(){return zu},set exports(e){zu=e}},Bu={},wj={get exports(){return Bu},set exports(e){Bu=e}},nw;function bj(){return nw||(nw=1,function(e){var t=Go.default;function n(r,i){if(t(r)!=="object"||r===null)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var a=s.call(r,i||"default");if(t(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(wj)),Bu}var rw;function $E(){return rw||(rw=1,function(e){var t=Go.default,n=bj();function r(i){var s=n(i,"string");return t(s)==="symbol"?s:String(s)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(_j)),zu}var iw;function cd(){return iw||(iw=1,function(e){var t=$E();function n(r,i,s){return i=t(i),i in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(yj)),ju}var ow;function mi(){return ow||(ow=1,function(e){var t=cd();function n(r){for(var i=1;i=0)&&(i[a]=n[a]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Sj)),Hu}var aw;function pv(){return aw||(aw=1,function(e){var t=Ej();function n(r,i){if(r==null)return{};var s=t(r,i),a,l;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(r);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(r,a)&&(s[a]=r[a])}return s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Tj)),Uu}var Wu={},xj={get exports(){return Wu},set exports(e){Wu=e}},lw;function ot(){return lw||(lw=1,function(e){function t(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(xj)),Wu}var Vu={},kj={get exports(){return Vu},set exports(e){Vu=e}},uw;function st(){return uw||(uw=1,function(e){var t=$E();function n(i,s){for(var a=0;a0&&arguments[0]!==void 0?arguments[0]:{action:"play",source:""};return this.video.play(),{type:n,operation:h}}function _(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"pause",source:""};return this.video.pause(),{type:n,operation:h}}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"toggle-play",source:""};return this.video.togglePlay(),{type:n,operation:h}}function f(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"seek",source:""};return this.video.seek(h),{type:n,operation:T}}function w(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"forward-".concat(h),source:""};return this.video.forward(h),{type:n,operation:T}}function v(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"replay-".concat(h),source:""};return this.video.replay(h),{type:n,operation:T}}function p(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-rate",source:""};return this.video.playbackRate=h,{type:n,operation:T}}function b(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-volume",source:""},x=h;return h<0&&(x=0),h>1&&(x=1),this.video.volume=x,{type:n,operation:T}}function g(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:h?"muted":"unmuted",source:""};return this.video.muted=h,{type:n,operation:T}}function m(h){return t.default.enabled?(t.default.isFullscreen?t.default.exit():t.default.request(this.rootElement),{type:n,operation:{action:"toggle-fullscreen",source:""}}):{type:r,isFullscreen:!h.isFullscreen}}return rt}var _w;function Mj(){return _w||(_w=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(mi()),r=mv(),i=dd(),s={currentSrc:null,duration:0,currentTime:0,seekingTime:0,buffered:null,waiting:!1,seeking:!1,paused:!0,autoPaused:!1,ended:!1,playbackRate:1,muted:!1,volume:1,readyState:0,networkState:0,videoWidth:0,videoHeight:0,hasStarted:!1,userActivity:!0,isActive:!1,isFullscreen:!1,activeTextTrack:null};function a(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,d=arguments.length>1?arguments[1]:void 0;switch(d.type){case i.USER_ACTIVATE:return(0,n.default)({},l,{userActivity:d.activity});case i.PLAYER_ACTIVATE:return(0,n.default)({},l,{isActive:d.activity});case i.FULLSCREEN_CHANGE:return(0,n.default)({},l,{isFullscreen:!!d.isFullscreen});case r.SEEKING_TIME:return(0,n.default)({},l,{seekingTime:d.time});case r.END_SEEKING:return(0,n.default)({},l,{seekingTime:0});case r.LOAD_START:return(0,n.default)({},l,d.videoProps,{hasStarted:!1,ended:!1});case r.CAN_PLAY:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.WAITING:return(0,n.default)({},l,d.videoProps,{waiting:!0});case r.CAN_PLAY_THROUGH:case r.PLAYING:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.PLAY:return(0,n.default)({},l,d.videoProps,{ended:!1,paused:!1,autoPaused:!1,waiting:!1,hasStarted:!0});case r.PAUSE:return(0,n.default)({},l,d.videoProps,{paused:!0});case r.END:return(0,n.default)({},l,d.videoProps,{ended:!0});case r.SEEKING:return(0,n.default)({},l,d.videoProps,{seeking:!0});case r.SEEKED:return(0,n.default)({},l,d.videoProps,{seeking:!1});case r.ERROR:return(0,n.default)({},l,d.videoProps,{error:"UNKNOWN ERROR",ended:!0});case r.DURATION_CHANGE:case r.TIME_UPDATE:case r.VOLUME_CHANGE:case r.PROGRESS_CHANGE:case r.RATE_CHANGE:case r.SUSPEND:case r.ABORT:case r.EMPTIED:case r.STALLED:case r.LOADED_META_DATA:case r.LOADED_DATA:case r.RESIZE:return(0,n.default)({},l,d.videoProps);case r.ACTIVATE_TEXT_TRACK:return(0,n.default)({},l,{activeTextTrack:d.textTrack});default:return l}}}(Ff)),Ff}var zf={},ww;function Dj(){return ww||(ww=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=t(mi()),r=dd(),i={count:0,operation:{action:"",source:""}};function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i,l=arguments.length>1?arguments[1]:void 0;switch(l.type){case r.OPERATE:return(0,n.default)({},a,{count:a.count+1,operation:(0,n.default)({},a.operation,l.operation)});default:return a}}}(zf)),zf}var bw;function jE(){return bw||(bw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.operationReducer=e.playerReducer=void 0;var n=t(Mj()),r=t(Dj());function i(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;return{player:(0,n.default)(l.player,d),operation:(0,r.default)(l.operation,d)}}var s=n.default;e.playerReducer=s;var a=r.default;e.operationReducer=a}($f)),$f}var Tw;function $j(){return Tw||(Tw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(ot()),s=n(st()),a=Oj,l=n(jE()),d=t(dd()),y=t(mv()),_=function(){function c(f){(0,i.default)(this,c),this.store=f||(0,a.createStore)(l.default),this.video=null,this.rootElement=null}return(0,s.default)(c,[{key:"getActions",value:function(){var w=this,v=this.store.dispatch,p=(0,r.default)({},d,y);function b(g){return function(){var h=g.apply(w,arguments);typeof h<"u"&&v(h)}}return Object.keys(p).filter(function(g){return typeof p[g]=="function"}).reduce(function(g,m){return g[m]=b(p[m]),g},{})}},{key:"getState",value:function(){return this.store.getState()}},{key:"subscribeToStateChange",value:function(w,v){v||(v=this.getState.bind(this));var p=v(),b=function(){var m=v();if(m!==p){var h=p;p=m,w(m,h)}};return this.store.subscribe(b)}},{key:"subscribeToOperationStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().operation})}},{key:"subscribeToPlayerStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().player})}}]),c}();e.default=_}(Df)),Df}var Bf={},Sw;function zE(){return Sw||(Sw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={actions:y.default.object,player:y.default.object,position:y.default.string,className:y.default.string},w={position:"left"},v=function(p){(0,d.default)(b,p);function b(g,m){var h;return(0,r.default)(this,b),h=(0,s.default)(this,(0,a.default)(b).call(this,g,m)),h.handleClick=h.handleClick.bind((0,l.default)(h)),h}return(0,i.default)(b,[{key:"componentDidMount",value:function(){}},{key:"handleClick",value:function(){var m=this.props.actions;m.play()}},{key:"render",value:function(){var m=this.props,h=m.player,T=m.position;return _.default.createElement("button",{className:(0,c.default)("video-react-button","video-react-big-play-button","video-react-big-play-button-".concat(T),this.props.className,{"big-play-button-hide":h.hasStarted||!h.currentSrc}),type:"button","aria-live":"polite",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Play Video"))}}]),b}(_.Component);e.default=v,v.propTypes=f,v.defaultProps=w,v.displayName="BigPlayButton"}(Bf)),Bf}var Uf={},Ew;function BE(){return Ew||(Ew=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(ee),i=t(Ze()),s={player:n.default.object,className:n.default.string};function a(l){var d=l.player,y=l.className;return d.error?null:r.default.createElement("div",{className:(0,i.default)("video-react-loading-spinner",y)})}a.propTypes=s,a.displayName="LoadingSpinner"}(Uf)),Uf}var Hf={},xw;function UE(){return xw||(xw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s={poster:n.default.string,player:n.default.object,actions:n.default.object,className:n.default.string};function a(d){var y=d.poster,_=d.player,c=d.actions,f=d.className;return!y||_.hasStarted?null:r.default.createElement("div",{className:(0,i.default)("video-react-poster",f),style:{backgroundImage:'url("'.concat(y,'")')},onClick:function(){_.paused&&c.play()}})}a.propTypes=s,a.displayName="PosterImage";var l=a;e.default=l}(Hf)),Hf}var Wf={},rr={},Qu={},Fj={get exports(){return Qu},set exports(e){Qu=e}},Ju={},jj={get exports(){return Ju},set exports(e){Ju=e}},ec={},zj={get exports(){return ec},set exports(e){ec=e}},kw;function HE(){return kw||(kw=1,function(e){function t(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,s=new Array(r);i0&&arguments[0]!==void 0?arguments[0]:0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,b=Math.floor(v%60),g=Math.floor(v/60%60),m=Math.floor(v/3600),h=Math.floor(p/60%60),T=Math.floor(p/3600);return(s(v)||v===1/0)&&(m="-",g="-",b="-"),m=m>0||T>0?"".concat(m,":"):"",g="".concat((m||h>=10)&&g<10?"0".concat(g):g,":"),b=b<10?"0".concat(b):b,m+g+b}function l(v){return v.props&&v.props.isVideoChild?!0:v.type==="source"||v.type==="track"}var d=function(p,b){return p.filter(b)[0]},y=function(p,b){var g=p.type,m=b.type;return typeof g=="string"||typeof m=="string"?g===m:typeof g=="function"&&typeof m=="function"?g.displayName===m.displayName:!1};function _(v,p,b){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,m=i.default.Children.toArray(p);b.order;var h=(0,r.default)(b,["order"]);return m.filter(function(T){return!T.props.disabled}).concat(v.filter(function(T){return!d(m,function(x){return y(x,T)})})).map(function(T){var x=d(v,function(A){return y(A,T)}),k=x?x.props:{},P=(0,n.default)({},h,k,T.props),E=i.default.cloneElement(T,P,T.props.children);return E}).sort(function(T,x){return(T.props.order||g)-(x.props.order||g)})}function c(v,p){console.warn("WARNING: ".concat(v," will be deprecated soon! Please use ").concat(p," instead."))}function f(v,p){var b=arguments,g=!1;return function(){g||(v.apply(void 0,(0,t.default)(b)),g=!0,setTimeout(function(){g=!1},p))}}var w=["error","src","srcObject","currentSrc","crossOrigin","networkState","preload","buffered","readyState","seeking","currentTime","duration","paused","defaultPlaybackRate","playbackRate","played","seekable","ended","autoplay","loop","mediaGroup","controller","controls","volume","muted","defaultMuted","audioTracks","videoTracks","textTracks","width","height","videoWidth","videoHeight","poster"];return rr.mediaProperties=w,rr}var Nw;function VE(){return Nw||(Nw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=hr(),v={actions:_.default.object,player:_.default.object,children:_.default.any,startTime:_.default.number,loop:_.default.bool,muted:_.default.bool,autoPlay:_.default.bool,playsInline:_.default.bool,src:_.default.string,poster:_.default.string,className:_.default.string,preload:_.default.oneOf(["auto","metadata","none"]),crossOrigin:_.default.string,onLoadStart:_.default.func,onWaiting:_.default.func,onCanPlay:_.default.func,onCanPlayThrough:_.default.func,onPlaying:_.default.func,onEnded:_.default.func,onSeeking:_.default.func,onSeeked:_.default.func,onPlay:_.default.func,onPause:_.default.func,onProgress:_.default.func,onDurationChange:_.default.func,onError:_.default.func,onSuspend:_.default.func,onAbort:_.default.func,onEmptied:_.default.func,onStalled:_.default.func,onLoadedMetadata:_.default.func,onLoadedData:_.default.func,onTimeUpdate:_.default.func,onRateChange:_.default.func,onVolumeChange:_.default.func,onResize:_.default.func},p=function(b){(0,y.default)(g,b);function g(m){var h;return(0,i.default)(this,g),h=(0,a.default)(this,(0,l.default)(g).call(this,m)),h.video=null,h.play=h.play.bind((0,d.default)(h)),h.pause=h.pause.bind((0,d.default)(h)),h.seek=h.seek.bind((0,d.default)(h)),h.forward=h.forward.bind((0,d.default)(h)),h.replay=h.replay.bind((0,d.default)(h)),h.toggleFullscreen=h.toggleFullscreen.bind((0,d.default)(h)),h.getProperties=h.getProperties.bind((0,d.default)(h)),h.renderChildren=h.renderChildren.bind((0,d.default)(h)),h.handleLoadStart=h.handleLoadStart.bind((0,d.default)(h)),h.handleCanPlay=h.handleCanPlay.bind((0,d.default)(h)),h.handleCanPlayThrough=h.handleCanPlayThrough.bind((0,d.default)(h)),h.handlePlay=h.handlePlay.bind((0,d.default)(h)),h.handlePlaying=h.handlePlaying.bind((0,d.default)(h)),h.handlePause=h.handlePause.bind((0,d.default)(h)),h.handleEnded=h.handleEnded.bind((0,d.default)(h)),h.handleWaiting=h.handleWaiting.bind((0,d.default)(h)),h.handleSeeking=h.handleSeeking.bind((0,d.default)(h)),h.handleSeeked=h.handleSeeked.bind((0,d.default)(h)),h.handleFullscreenChange=h.handleFullscreenChange.bind((0,d.default)(h)),h.handleError=h.handleError.bind((0,d.default)(h)),h.handleSuspend=h.handleSuspend.bind((0,d.default)(h)),h.handleAbort=h.handleAbort.bind((0,d.default)(h)),h.handleEmptied=h.handleEmptied.bind((0,d.default)(h)),h.handleStalled=h.handleStalled.bind((0,d.default)(h)),h.handleLoadedMetaData=h.handleLoadedMetaData.bind((0,d.default)(h)),h.handleLoadedData=h.handleLoadedData.bind((0,d.default)(h)),h.handleTimeUpdate=h.handleTimeUpdate.bind((0,d.default)(h)),h.handleRateChange=h.handleRateChange.bind((0,d.default)(h)),h.handleVolumeChange=h.handleVolumeChange.bind((0,d.default)(h)),h.handleDurationChange=h.handleDurationChange.bind((0,d.default)(h)),h.handleProgress=(0,w.throttle)(h.handleProgress.bind((0,d.default)(h)),250),h.handleKeypress=h.handleKeypress.bind((0,d.default)(h)),h.handleTextTrackChange=h.handleTextTrackChange.bind((0,d.default)(h)),h}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.forceUpdate(),this.video&&this.video.textTracks&&(this.video.textTracks.onaddtrack=this.handleTextTrackChange,this.video.textTracks.onremovetrack=this.handleTextTrackChange)}},{key:"getProperties",value:function(){var h=this;return this.video?w.mediaProperties.reduce(function(T,x){return T[x]=h.video[x],T},{}):null}},{key:"handleTextTrackChange",value:function(){var h=this.props,T=h.actions,x=h.player;if(this.video&&this.video.textTracks){var k=Array.from(this.video.textTracks).find(function(P){return P.mode==="showing"});k!==x.activeTextTrack&&T.activateTextTrack(k)}}},{key:"play",value:function(){var h=this.video.play();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"pause",value:function(){var h=this.video.pause();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"load",value:function(){this.video.load()}},{key:"addTextTrack",value:function(){var h;(h=this.video).addTextTrack.apply(h,arguments)}},{key:"canPlayType",value:function(){var h;(h=this.video).canPlayType.apply(h,arguments)}},{key:"togglePlay",value:function(){this.video.paused?this.play():this.pause()}},{key:"seek",value:function(h){try{this.video.currentTime=h}catch{}}},{key:"forward",value:function(h){this.seek(this.video.currentTime+h)}},{key:"replay",value:function(h){this.forward(-h)}},{key:"toggleFullscreen",value:function(){var h=this.props,T=h.player,x=h.actions;x.toggleFullscreen(T)}},{key:"handleLoadStart",value:function(){var h=this.props,T=h.actions,x=h.onLoadStart;T.handleLoadStart(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlay",value:function(){var h=this.props,T=h.actions,x=h.onCanPlay;T.handleCanPlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlayThrough",value:function(){var h=this.props,T=h.actions,x=h.onCanPlayThrough;T.handleCanPlayThrough(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlaying",value:function(){var h=this.props,T=h.actions,x=h.onPlaying;T.handlePlaying(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlay",value:function(){var h=this.props,T=h.actions,x=h.onPlay;T.handlePlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePause",value:function(){var h=this.props,T=h.actions,x=h.onPause;T.handlePause(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleDurationChange",value:function(){var h=this.props,T=h.actions,x=h.onDurationChange;T.handleDurationChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleProgress",value:function(){var h=this.props,T=h.actions,x=h.onProgress;this.video&&T.handleProgressChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEnded",value:function(){var h=this.props,T=h.loop,x=h.player,k=h.actions,P=h.onEnded;T?(this.seek(0),this.play()):x.paused||this.pause(),k.handleEnd(this.getProperties()),P&&P.apply(void 0,arguments)}},{key:"handleWaiting",value:function(){var h=this.props,T=h.actions,x=h.onWaiting;T.handleWaiting(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeking",value:function(){var h=this.props,T=h.actions,x=h.onSeeking;T.handleSeeking(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeked",value:function(){var h=this.props,T=h.actions,x=h.onSeeked;T.handleSeeked(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleFullscreenChange",value:function(){}},{key:"handleSuspend",value:function(){var h=this.props,T=h.actions,x=h.onSuspend;T.handleSuspend(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleAbort",value:function(){var h=this.props,T=h.actions,x=h.onAbort;T.handleAbort(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEmptied",value:function(){var h=this.props,T=h.actions,x=h.onEmptied;T.handleEmptied(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleStalled",value:function(){var h=this.props,T=h.actions,x=h.onStalled;T.handleStalled(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedMetaData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedMetadata,k=h.startTime;k&&k>0&&(this.video.currentTime=k),T.handleLoadedMetaData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedData;T.handleLoadedData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleTimeUpdate",value:function(){var h=this.props,T=h.actions,x=h.onTimeUpdate;T.handleTimeUpdate(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleRateChange",value:function(){var h=this.props,T=h.actions,x=h.onRateChange;T.handleRateChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleVolumeChange",value:function(){var h=this.props,T=h.actions,x=h.onVolumeChange;T.handleVolumeChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleError",value:function(){var h=this.props,T=h.actions,x=h.onError;T.handleError(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleResize",value:function(){var h=this.props,T=h.actions,x=h.onResize;T.handleResize(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleKeypress",value:function(){}},{key:"renderChildren",value:function(){var h=this,T=(0,r.default)({},this.props,{video:this.video});return this.video?c.default.Children.toArray(this.props.children).filter(w.isVideoChild).map(function(x){var k;if(typeof x.type=="string"){if(x.type==="source"){k=(0,r.default)({},x.props);var P=k.onError;k.onError=function(){P&&P.apply(void 0,arguments),h.handleError.apply(h,arguments)}}}else k=T;return c.default.cloneElement(x,k)}):null}},{key:"render",value:function(){var h=this,T=this.props,x=T.loop,k=T.poster,P=T.preload,E=T.src,A=T.autoPlay,C=T.playsInline,N=T.muted,$=T.crossOrigin,F=T.videoId;return c.default.createElement("video",{className:(0,f.default)("video-react-video",this.props.className),id:F,crossOrigin:$,ref:function(U){h.video=U},muted:N,preload:P,loop:x,playsInline:C,autoPlay:A,poster:k,src:E,onLoadStart:this.handleLoadStart,onWaiting:this.handleWaiting,onCanPlay:this.handleCanPlay,onCanPlayThrough:this.handleCanPlayThrough,onPlaying:this.handlePlaying,onEnded:this.handleEnded,onSeeking:this.handleSeeking,onSeeked:this.handleSeeked,onPlay:this.handlePlay,onPause:this.handlePause,onProgress:this.handleProgress,onDurationChange:this.handleDurationChange,onError:this.handleError,onSuspend:this.handleSuspend,onAbort:this.handleAbort,onEmptied:this.handleEmptied,onStalled:this.handleStalled,onLoadedMetadata:this.handleLoadedMetaData,onLoadedData:this.handleLoadedData,onTimeUpdate:this.handleTimeUpdate,onRateChange:this.handleRateChange,onVolumeChange:this.handleVolumeChange,tabIndex:"-1"},this.renderChildren())}},{key:"playbackRate",get:function(){return this.video.playbackRate},set:function(h){this.video.playbackRate=h}},{key:"muted",get:function(){return this.video.muted},set:function(h){this.video.muted=h}},{key:"volume",get:function(){return this.video.volume},set:function(h){h>1&&(h=1),h<0&&(h=0),this.video.volume=h}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}}]),g}(c.Component);e.default=p,p.propTypes=v,p.displayName="Video"}(Wf)),Wf}var Vf={},Ow;function qE(){return Ow||(Ow=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={manager:y.default.object,className:y.default.string},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.timer=null,b.manager.subscribeToOperationStateChange(m.handleStateChange.bind((0,l.default)(m))),m.state={hidden:!0,operation:{}},m}return(0,i.default)(p,[{key:"handleStateChange",value:function(g,m){var h=this;g.count!==m.count&&g.operation.source==="shortcut"&&(this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({hidden:!1,count:g.count,operation:g.operation}),this.timer=setTimeout(function(){h.setState({hidden:!0}),h.timer=null},500))}},{key:"render",value:function(){if(this.state.operation.source!=="shortcut")return null;var g=this.state.hidden?{display:"none"}:null;return _.default.createElement("div",{className:(0,c.default)({"video-react-bezel":!0,"video-react-bezel-animation":this.state.count%2===0,"video-react-bezel-animation-alt":this.state.count%2===1},this.props.className),style:g,role:"status","aria-label":this.state.operation.action},_.default.createElement("div",{className:(0,c.default)("video-react-bezel-icon","video-react-bezel-icon-".concat(this.state.operation.action))}))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="Bezel"}(Vf)),Vf}var qf={},Wr={},Mw;function fd(){if(Mw)return Wr;Mw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.findElPosition=e,Wr.getPointerPosition=t,Wr.blurNode=n,Wr.focusNode=r,Wr.hasClass=i;function e(s){var a;if(s.getBoundingClientRect&&s.parentNode&&(a=s.getBoundingClientRect()),!a)return{left:0,top:0};var l=document,d=l.body,y=l.documentElement,_=y.clientLeft||d.clientLeft||0,c=window.pageXOffset||d.scrollLeft,f=a.left+c-_,w=y.clientTop||d.clientTop||0,v=window.pageYOffset||d.scrollTop,p=a.top+v-w;return{left:Math.round(f),top:Math.round(p)}}function t(s,a){var l={},d=e(s),y=s.offsetWidth,_=s.offsetHeight,c=d.top,f=d.left,w=a.pageY,v=a.pageX;return a.changedTouches&&(v=a.changedTouches[0].pageX,w=a.changedTouches[0].pageY),l.y=Math.max(0,Math.min(1,(c-w+_)/_)),l.x=Math.max(0,Math.min(1,(v-f)/y)),l}function n(s){s&&s.blur&&s.blur()}function r(s){s&&s.focus&&s.focus()}function i(s,a){for(var l=s.className.split(" "),d=0;d1&&(E=1),P.changeVolume(E,{action:"volume-up",source:"shortcut"})}},{keyCode:40,handle:function(k,P){var E=k.volume-.05;E<0&&(E=0);var A=E>0?"volume-down":"volume-off";P.changeVolume(E,{action:A,source:"shortcut"})}},{keyCode:190,shift:!0,handle:function(k,P){var E=k.playbackRate;E>=1.5?E=2:E>=1.25?E=1.5:E>=1?E=1.25:E>=.5?E=1:E>=.25?E=.5:E>=0&&(E=.25),P.changeRate(E,{action:"fast-forward",source:"shortcut"})}},{keyCode:188,shift:!0,handle:function(k,P){var E=k.playbackRate;E<=.5?E=.25:E<=1?E=.5:E<=1.25?E=1:E<=1.5?E=1.25:E<=2&&(E=1.5),P.changeRate(E,{action:"fast-rewind",source:"shortcut"})}}],T.shortcuts=(0,r.default)(T.defaultShortcuts),T.mergeShortcuts=T.mergeShortcuts.bind((0,d.default)(T)),T.handleKeyPress=T.handleKeyPress.bind((0,d.default)(T)),T.handleClick=T.handleClick.bind((0,d.default)(T)),T.handleDoubleClick=T.handleDoubleClick.bind((0,d.default)(T)),T}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.mergeShortcuts(),document.addEventListener("keydown",this.handleKeyPress),document.addEventListener("click",this.handleClick),document.addEventListener("dblclick",this.handleDoubleClick)}},{key:"componentDidUpdate",value:function(h){h.shortcuts!==this.props.shortcuts&&this.mergeShortcuts()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("click",this.handleClick),document.removeEventListener("dblclick",this.handleDoubleClick)}},{key:"mergeShortcuts",value:function(){var h=function(E){var A=E.keyCode,C=A===void 0?0:A,N=E.ctrl,$=N===void 0?!1:N,F=E.shift,z=F===void 0?!1:F,U=E.alt,H=U===void 0?!1:U;return"".concat(C,":").concat($,":").concat(z,":").concat(H)},T=this.defaultShortcuts.reduce(function(P,E){return Object.assign(P,(0,n.default)({},h(E),E))},{}),x=(this.props.shortcuts||[]).reduce(function(P,E){var A=E.keyCode,C=E.handle;return A&&typeof C=="function"?Object.assign(P,(0,n.default)({},h(E),E)):P},T),k=function(E){var A=0,C=["ctrl","shift","alt"];return C.forEach(function(N){E[N]&&A++}),A};this.shortcuts=Object.keys(x).map(function(P){return x[P]}).sort(function(P,E){return k(E)-k(P)})}},{key:"togglePlay",value:function(h,T){h.paused?T.play({action:"play",source:"shortcut"}):T.pause({action:"pause",source:"shortcut"})}},{key:"toggleFullscreen",value:function(h,T){T.toggleFullscreen(h)}},{key:"handleKeyPress",value:function(h){var T=this.props,x=T.player,k=T.actions;if(x.isActive&&!(document.activeElement&&((0,f.hasClass)(document.activeElement,"video-react-control")||(0,f.hasClass)(document.activeElement,"video-react-menu-button-active")||(0,f.hasClass)(document.activeElement,"video-react-big-play-button")))){var P=h.keyCode||h.which,E=h.ctrlKey||h.metaKey,A=h.shiftKey,C=h.altKey,N=this.shortcuts.filter(function($){return!(!$.keyCode||$.keyCode-P!==0||$.ctrl!==void 0&&$.ctrl!==E||$.shift!==void 0&&$.shift!==A||$.alt!==void 0&&$.alt!==C)})[0];N&&(N.handle(x,k),h.preventDefault())}}},{key:"canBeClicked",value:function(h,T){return!(!h.isActive||T.target.nodeName!=="VIDEO"||h.readyState!==4)}},{key:"handleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,P=T.clickable;!this.canBeClicked(x,h)||!P||this.togglePlay(x,k)}},{key:"handleDoubleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,P=T.dblclickable;!this.canBeClicked(x,h)||!P||this.toggleFullscreen(x,k)}},{key:"render",value:function(){return null}}]),g}(_.Component);e.default=p,p.propTypes=w,p.defaultProps=v,p.displayName="Shortcut"}(qf)),qf}var Zf={},Gf={},ic={},Gj={get exports(){return ic},set exports(e){ic=e}},$w;function Na(){return $w||($w=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;ry&&(c=y);function w(h,T){var x=h/T||0;return"".concat((x>=1?1:x)*100,"%")}f.width=w(c,y);for(var v=[],p=0;p=1?1:N}},{key:"getNewTime",value:function(k){var P=this.props.player.duration,E=this.slider.calculateDistance(k),A=E*P;return A===P?A-.1:A}},{key:"handleMouseDown",value:function(){}},{key:"handleMouseUp",value:function(k){var P=this.props.actions,E=this.getNewTime(k);P.seek(E),P.handleEndSeeking(E)}},{key:"handleMouseMove",value:function(k){var P=this.props.actions,E=this.getNewTime(k);P.handleSeekingTime(E)}},{key:"stepForward",value:function(){var k=this.props.actions;k.forward(5)}},{key:"stepBack",value:function(){var k=this.props.actions;k.replay(5)}},{key:"render",value:function(){var k=this,P=this.props,E=P.player,A=E.currentTime,C=E.seekingTime,N=E.duration,$=E.buffered,F=P.mouseTime,z=C||A;return _.default.createElement(f.default,{ref:function(H){k.slider=H},label:"video progress bar",className:(0,c.default)("video-react-progress-holder",this.props.className),valuenow:(this.getPercent()*100).toFixed(2),valuetext:(0,b.formatTime)(z,N),onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,getPercent:this.getPercent,stepForward:this.stepForward,stepBack:this.stepBack},_.default.createElement(v.default,{buffered:$,currentTime:z,duration:N}),_.default.createElement(p.default,{duration:N,mouseTime:F}),_.default.createElement(w.default,{currentTime:z,duration:N}))}}]),T}(_.Component);e.default=m,m.propTypes=g,m.displayName="SeekBar"}(Yf)),Yf}var Hw;function QE(){return Hw||(Hw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=t(fd()),v=n(XE()),p={player:_.default.object,className:_.default.string},b=function(g){(0,y.default)(m,g);function m(h,T){var x;return(0,i.default)(this,m),x=(0,a.default)(this,(0,l.default)(m).call(this,h,T)),x.state={mouseTime:{time:null,position:0}},x.handleMouseMoveThrottle=x.handleMouseMove.bind((0,d.default)(x)),x}return(0,s.default)(m,[{key:"handleMouseMove",value:function(T){if(T.pageX){var x=this.props.player.duration,k=this.seekBar,P=w.getPointerPosition(k,T).x*x,E=T.pageX-w.findElPosition(k).left;this.setState({mouseTime:{time:P,position:E}})}}},{key:"render",value:function(){var T=this,x=this.props.className;return c.default.createElement("div",{onMouseMove:this.handleMouseMoveThrottle,className:(0,f.default)("video-react-progress-control video-react-control",x)},c.default.createElement(v.default,(0,r.default)({mouseTime:this.state.mouseTime,ref:function(P){T.seekBar=P}},this.props)))}}]),m}(c.Component);e.default=b,b.propTypes=p,b.displayName="ProgressControl"}(Gf)),Gf}var eh={},Ww;function JE(){return Ww||(Ww=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.handleClick=m.handleClick.bind((0,l.default)(m)),m}return(0,i.default)(p,[{key:"handleClick",value:function(){var g=this.props,m=g.actions,h=g.player;h.paused?m.play():m.pause()}},{key:"render",value:function(){var g=this,m=this.props,h=m.player,T=m.className,x=h.paused?"Play":"Pause";return _.default.createElement("button",{ref:function(P){g.button=P},className:(0,c.default)(T,{"video-react-play-control":!0,"video-react-control":!0,"video-react-button":!0,"video-react-paused":h.paused,"video-react-playing":!h.paused}),type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},x))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="PlayToggle"}(eh)),eh}var th={},nh={},Vw;function ex(){return Vw||(Vw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c={actions:y.default.object,className:y.default.string,seconds:y.default.oneOf([5,10,30])},f={seconds:10},w=function(p){var b=function(g){(0,d.default)(m,g);function m(h,T){var x;return(0,r.default)(this,m),x=(0,s.default)(this,(0,a.default)(m).call(this,h,T)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x}return(0,i.default)(m,[{key:"handleClick",value:function(){var T=this.props,x=T.actions,k=T.seconds;p==="forward"?x.forward(k):x.replay(k)}},{key:"render",value:function(){var T=this,x=this.props,k=x.seconds,P=x.className,E=["video-react-control","video-react-button","video-react-icon"];return E.push("video-react-icon-".concat(p,"-").concat(k),"video-react-".concat(p,"-control")),P&&E.push(P),_.default.createElement("button",{ref:function(C){T.button=C},className:E.join(" "),type:"button",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"".concat(p," ").concat(k," seconds")))}}]),m}(_.Component);return b.propTypes=c,b.defaultProps=f,b};e.default=w}(nh)),nh}var qw;function tx(){return qw||(qw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ex()),r=(0,n.default)("forward");r.displayName="ForwardControl";var i=r;e.default=i}(th)),th}var rh={},Zw;function nx(){return Zw||(Zw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ex()),r=(0,n.default)("replay");r.displayName="ReplayControl";var i=r;e.default=i}(rh)),rh}var ih={},Gw;function rx(){return Gw||(Gw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.handleClick=m.handleClick.bind((0,l.default)(m)),m}return(0,i.default)(p,[{key:"handleClick",value:function(){var g=this.props,m=g.player,h=g.actions;h.toggleFullscreen(m)}},{key:"render",value:function(){var g=this,m=this.props,h=m.player,T=m.className;return _.default.createElement("button",{className:(0,c.default)(T,{"video-react-icon-fullscreen-exit":h.isFullscreen,"video-react-icon-fullscreen":!h.isFullscreen},"video-react-fullscreen-control video-react-control video-react-button video-react-icon"),ref:function(k){g.button=k},type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Non-Fullscreen"))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="FullscreenToggle"}(ih)),ih}var oh={},Yw;function ix(){return Yw||(Yw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s=hr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=f-c,p=(0,s.formatTime)(v);return r.default.createElement("div",{className:(0,i.default)("video-react-remaining-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-remaining-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Remaining Time "),"-".concat(p)))}l.propTypes=a,l.displayName="RemainingTimeDisplay";var d=l;e.default=d}(oh)),oh}var sh={},Kw;function ox(){return Kw||(Kw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s=hr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=(0,s.formatTime)(c,f);return r.default.createElement("div",{className:(0,i.default)("video-react-current-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-current-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Current Time "),v))}l.propTypes=a,l.displayName="CurrentTimeDisplay";var d=l;e.default=d}(sh)),sh}var ah={},Xw;function sx(){return Xw||(Xw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s=hr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player.duration,c=y.className,f=(0,s.formatTime)(_);return r.default.createElement("div",{className:(0,i.default)(c,"video-react-duration video-react-time-control video-react-control")},r.default.createElement("div",{className:"video-react-duration-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Duration Time "),f))}l.propTypes=a,l.displayName="DurationDisplay";var d=l;e.default=d}(ah)),ah}var lh={},Qw;function ax(){return Qw||(Qw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(ee),i=t(Ze()),s={separator:n.default.string,className:n.default.string};function a(l){var d=l.separator,y=l.className,_=d||"/";return r.default.createElement("div",{className:(0,i.default)("video-react-time-control video-react-time-divider",y),dir:"ltr"},r.default.createElement("div",null,r.default.createElement("span",null,_)))}a.propTypes=s,a.displayName="TimeDivider"}(lh)),lh}var uh={},ch={},dh={},Jw;function lx(){return Jw||(Jw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(mi()),s=n(ot()),a=n(st()),l=n(gt()),d=n(vt()),y=n(mt()),_=n(yt()),c=n(De()),f=t(ee),w=n(Ze()),v={tagName:c.default.string,onClick:c.default.func.isRequired,onFocus:c.default.func,onBlur:c.default.func,className:c.default.string},p={tagName:"div"},b=function(g){(0,_.default)(m,g);function m(h,T){var x;return(0,s.default)(this,m),x=(0,l.default)(this,(0,d.default)(m).call(this,h,T)),x.handleClick=x.handleClick.bind((0,y.default)(x)),x.handleFocus=x.handleFocus.bind((0,y.default)(x)),x.handleBlur=x.handleBlur.bind((0,y.default)(x)),x.handleKeypress=x.handleKeypress.bind((0,y.default)(x)),x}return(0,a.default)(m,[{key:"componentWillUnmount",value:function(T){this.handleBlur(T)}},{key:"handleKeypress",value:function(T){(T.which===32||T.which===13)&&(T.preventDefault(),this.handleClick(T))}},{key:"handleClick",value:function(T){var x=this.props.onClick;x(T)}},{key:"handleFocus",value:function(T){document.addEventListener("keydown",this.handleKeypress),this.props.onFocus&&this.props.onFocus(T)}},{key:"handleBlur",value:function(T){document.removeEventListener("keydown",this.handleKeypress),this.props.onBlur&&this.props.onBlur(T)}},{key:"render",value:function(){var T=this.props.tagName,x=(0,i.default)({},this.props);return delete x.tagName,delete x.className,f.default.createElement(T,(0,r.default)({className:(0,w.default)(this.props.className),role:"button",tabIndex:"0",onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},x))}}]),m}(f.Component);e.default=b,b.propTypes=v,b.defaultProps=p,b.displayName="ClickableComponent"}(dh)),dh}var fh={},eb;function Yj(){return eb||(eb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c={player:y.default.object,children:y.default.any},f=function(w){(0,d.default)(v,w);function v(p,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,p,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){var b=this.props.children;return _.default.createElement("div",{className:"video-react-menu",onClick:this.handleClick},_.default.createElement("div",{className:"video-react-menu-content"},b))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Popup"}(fh)),fh}var tb;function Kj(){return tb||(tb=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=t(Na()),r=t(mi()),i=t(De()),s=t(ee),a=t(Ze()),l=t(lx()),d=t(Yj()),y={inline:i.default.bool,onClick:i.default.func.isRequired,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string},_={inline:!0};function c(f){var w=f.inline,v=f.className,p=(0,r.default)({},f);return delete p.children,delete p.inline,delete p.className,s.default.createElement(l.default,(0,n.default)({className:(0,a.default)(v,{"video-react-menu-button-inline":!!w,"video-react-menu-button-popup":!w},"video-react-control video-react-button video-react-menu-button")},p),s.default.createElement(d.default,f))}c.propTypes=y,c.defaultProps=_,c.displayName="PopupButton"}(ch)),ch}var hh={},ph={},nb;function Xj(){return nb||(nb=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s={percentage:n.default.string,vertical:n.default.bool,className:n.default.string},a={percentage:"100%",vertical:!1};function l(y){var _=y.percentage,c=y.vertical,f=y.className,w={};return c?w.height=_:w.width=_,r.default.createElement("div",{className:(0,i.default)(f,"video-react-volume-level"),style:w},r.default.createElement("span",{className:"video-react-control-text"}))}l.propTypes=s,l.defaultProps=a,l.displayName="VolumeLevel";var d=l;e.default=d}(ph)),ph}var rb;function Qj(){return rb||(rb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=n(gv()),v=n(Xj()),p={actions:_.default.object,player:_.default.object,className:_.default.string,onFocus:_.default.func,onBlur:_.default.func},b=function(m){(0,y.default)(h,m);function h(T,x){var k;return(0,i.default)(this,h),k=(0,a.default)(this,(0,l.default)(h).call(this,T,x)),k.state={percentage:"0%"},k.handleMouseMove=k.handleMouseMove.bind((0,d.default)(k)),k.handlePercentageChange=k.handlePercentageChange.bind((0,d.default)(k)),k.checkMuted=k.checkMuted.bind((0,d.default)(k)),k.getPercent=k.getPercent.bind((0,d.default)(k)),k.stepForward=k.stepForward.bind((0,d.default)(k)),k.stepBack=k.stepBack.bind((0,d.default)(k)),k.handleFocus=k.handleFocus.bind((0,d.default)(k)),k.handleBlur=k.handleBlur.bind((0,d.default)(k)),k.handleClick=k.handleClick.bind((0,d.default)(k)),k}return(0,s.default)(h,[{key:"componentDidMount",value:function(){}},{key:"getPercent",value:function(){var x=this.props.player;return x.muted?0:x.volume}},{key:"checkMuted",value:function(){var x=this.props,k=x.player,P=x.actions;k.muted&&P.mute(!1)}},{key:"handleMouseMove",value:function(x){var k=this.props.actions;this.checkMuted();var P=this.slider.calculateDistance(x);k.changeVolume(P)}},{key:"stepForward",value:function(){var x=this.props,k=x.player,P=x.actions;this.checkMuted(),P.changeVolume(k.volume+.1)}},{key:"stepBack",value:function(){var x=this.props,k=x.player,P=x.actions;this.checkMuted(),P.changeVolume(k.volume-.1)}},{key:"handleFocus",value:function(x){this.props.onFocus&&this.props.onFocus(x)}},{key:"handleBlur",value:function(x){this.props.onBlur&&this.props.onBlur(x)}},{key:"handlePercentageChange",value:function(x){x!==this.state.percentage&&this.setState({percentage:x})}},{key:"handleClick",value:function(x){x.stopPropagation()}},{key:"render",value:function(){var x=this,k=this.props,P=k.player,E=k.className,A=(P.volume*100).toFixed(2);return c.default.createElement(w.default,(0,r.default)({ref:function(N){x.slider=N},label:"volume level",valuenow:A,valuetext:"".concat(A,"%"),onMouseMove:this.handleMouseMove,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,sliderActive:this.handleFocus,sliderInactive:this.handleBlur,getPercent:this.getPercent,onPercentageChange:this.handlePercentageChange,stepForward:this.stepForward,stepBack:this.stepBack},this.props,{className:(0,f.default)(E,"video-react-volume-bar video-react-slider-bar")}),c.default.createElement(v.default,this.props))}}]),h}(c.Component);b.propTypes=p,b.displayName="VolumeBar";var g=b;e.default=g}(hh)),hh}var ib;function ux(){return ib||(ib=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=n(Kj()),v=n(Qj()),p={player:_.default.object,actions:_.default.object,vertical:_.default.bool,className:_.default.string,alwaysShowVolume:_.default.bool},b={vertical:!1},g=function(h){(0,y.default)(T,h);function T(x,k){var P;return(0,i.default)(this,T),P=(0,a.default)(this,(0,l.default)(T).call(this,x,k)),P.state={active:!1},P.handleClick=P.handleClick.bind((0,d.default)(P)),P.handleFocus=P.handleFocus.bind((0,d.default)(P)),P.handleBlur=P.handleBlur.bind((0,d.default)(P)),P}return(0,s.default)(T,[{key:"handleClick",value:function(){var k=this.props,P=k.player,E=k.actions;E.mute(!P.muted)}},{key:"handleFocus",value:function(){this.setState({active:!0})}},{key:"handleBlur",value:function(){this.setState({active:!1})}},{key:"render",value:function(){var k=this.props,P=k.vertical,E=k.player,A=k.className,C=!P,N=this.volumeLevel;return c.default.createElement(w.default,{className:(0,f.default)(A,{"video-react-volume-menu-button-vertical":P,"video-react-volume-menu-button-horizontal":!P,"video-react-vol-muted":E.muted,"video-react-vol-0":N===0&&!E.muted,"video-react-vol-1":N===1,"video-react-vol-2":N===2,"video-react-vol-3":N===3,"video-react-slider-active":this.props.alwaysShowVolume||this.state.active,"video-react-lock-showing":this.props.alwaysShowVolume||this.state.active},"video-react-volume-menu-button"),onClick:this.handleClick,inline:C},c.default.createElement(v.default,(0,r.default)({onFocus:this.handleFocus,onBlur:this.handleBlur},this.props)))}},{key:"volumeLevel",get:function(){var k=this.props.player,P=k.volume,E=k.muted,A=3;return P===0||E?A=0:P<.33?A=1:P<.67&&(A=2),A}}]),T}(c.Component);g.propTypes=p,g.defaultProps=b,g.displayName="VolumeMenuButton";var m=g;e.default=m}(uh)),uh}var mh={},gh={},vh={},ob;function Jj(){return ob||(ob=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c={children:y.default.any},f=function(w){(0,d.default)(v,w);function v(p,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,p,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){return _.default.createElement("div",{className:"video-react-menu video-react-lock-showing",role:"presentation",onClick:this.handleClick},_.default.createElement("ul",{className:"video-react-menu-content"},this.props.children))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Menu"}(vh)),vh}var yh={},sb;function e4(){return sb||(sb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={item:y.default.object,index:y.default.number,activateIndex:y.default.number,onSelectItem:y.default.func},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.handleClick=m.handleClick.bind((0,l.default)(m)),m}return(0,i.default)(p,[{key:"handleClick",value:function(){var g=this.props,m=g.index,h=g.onSelectItem;h(m)}},{key:"render",value:function(){var g=this.props,m=g.item,h=g.index,T=g.activateIndex;return _.default.createElement("li",{className:(0,c.default)({"video-react-menu-item":!0,"video-react-selected":h===T}),role:"menuitem",onClick:this.handleClick},m.label,_.default.createElement("span",{className:"video-react-control-text"}))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="MenuItem"}(yh)),yh}var ab;function vv(){return ab||(ab=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f=n(Jj()),w=n(e4()),v=n(lx()),p={inline:y.default.bool,items:y.default.array,className:y.default.string,onSelectItem:y.default.func,children:y.default.any,selectedIndex:y.default.number},b=function(g){(0,d.default)(m,g);function m(h,T){var x;return(0,r.default)(this,m),x=(0,s.default)(this,(0,a.default)(m).call(this,h,T)),x.state={active:!1,activateIndex:h.selectedIndex||0},x.commitSelection=x.commitSelection.bind((0,l.default)(x)),x.activateMenuItem=x.activateMenuItem.bind((0,l.default)(x)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x.renderMenu=x.renderMenu.bind((0,l.default)(x)),x.handleFocus=x.handleFocus.bind((0,l.default)(x)),x.handleBlur=x.handleBlur.bind((0,l.default)(x)),x.handleUpArrow=x.handleUpArrow.bind((0,l.default)(x)),x.handleDownArrow=x.handleDownArrow.bind((0,l.default)(x)),x.handleEscape=x.handleEscape.bind((0,l.default)(x)),x.handleReturn=x.handleReturn.bind((0,l.default)(x)),x.handleTab=x.handleTab.bind((0,l.default)(x)),x.handleKeyPress=x.handleKeyPress.bind((0,l.default)(x)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x.handleIndexChange=x.handleIndexChange.bind((0,l.default)(x)),x}return(0,i.default)(m,[{key:"componentDidUpdate",value:function(T){T.selectedIndex!==this.props.selectedIndex&&this.activateMenuItem(this.props.selectedIndex)}},{key:"commitSelection",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"activateMenuItem",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"handleIndexChange",value:function(T){var x=this.props.onSelectItem;x(T)}},{key:"handleClick",value:function(){this.setState(function(T){return{active:!T.active}})}},{key:"handleFocus",value:function(){document.addEventListener("keydown",this.handleKeyPress)}},{key:"handleBlur",value:function(){this.setState({active:!1}),document.removeEventListener("keydown",this.handleKeyPress)}},{key:"handleUpArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex-1;k<0&&(k=x.length?x.length-1:0),this.activateMenuItem(k)}}},{key:"handleDownArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex+1;k>=x.length&&(k=0),this.activateMenuItem(k)}}},{key:"handleTab",value:function(T){this.state.active&&(T.preventDefault(),this.commitSelection(this.state.activateIndex))}},{key:"handleReturn",value:function(T){T.preventDefault(),this.state.active?this.commitSelection(this.state.activateIndex):this.setState({active:!0})}},{key:"handleEscape",value:function(){this.setState({active:!1,activateIndex:0})}},{key:"handleKeyPress",value:function(T){T.which===27?this.handleEscape(T):T.which===9?this.handleTab(T):T.which===13?this.handleReturn(T):T.which===38?this.handleUpArrow(T):T.which===40&&this.handleDownArrow(T)}},{key:"handleSelectItem",value:function(T){this.commitSelection(T)}},{key:"renderMenu",value:function(){var T=this;if(!this.state.active)return null;var x=this.props.items;return _.default.createElement(f.default,null,x.map(function(k,P){return _.default.createElement(w.default,{item:k,index:P,onSelectItem:T.handleSelectItem,activateIndex:T.state.activateIndex,key:"item-".concat(P++)})}))}},{key:"render",value:function(){var T=this,x=this.props,k=x.inline,P=x.className;return _.default.createElement(v.default,{className:(0,c.default)(P,{"video-react-menu-button-inline":!!k,"video-react-menu-button-popup":!k,"video-react-menu-button-active":this.state.active},"video-react-control video-react-button video-react-menu-button"),role:"button",tabIndex:"0",ref:function(A){T.menuButton=A},onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},this.props.children,this.renderMenu())}}]),m}(_.Component);e.default=b,b.propTypes=p,b.displayName="MenuButton"}(gh)),gh}var lb;function yv(){return lb||(lb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f=n(vv()),w={player:y.default.object,actions:y.default.object,rates:y.default.array,className:y.default.string},v={rates:[2,1.5,1.25,1,.5,.25]},p=function(g){(0,d.default)(m,g);function m(h,T){var x;return(0,r.default)(this,m),x=(0,s.default)(this,(0,a.default)(m).call(this,h,T)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x}return(0,i.default)(m,[{key:"handleSelectItem",value:function(T){var x=this.props,k=x.rates,P=x.actions;T>=0&&Tt.text()).then(t=>{if(t.length<=0)throw new Error;this.setState({md:_e(t)})}).catch(()=>{this.setState({error:!0})})}render(){return this.state.md&&!this.state.error?M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:this.state.md}}):this.state.error?this.props.unloader||M("div",{children:"Error: couldn't load source"}):this.props.loader}}fx.propTypes={loader:Tr.func,unloader:Tr.func.isRequired,path:Tr.string.isRequired};const mb=({small:e})=>ie("div",{className:`spinner ${e?"small":""}`,children:[M("div",{className:"double-bounce-overlay"}),M("div",{className:"double-bounce"})]}),gb=({failedUrls:e})=>M("div",{className:"no-source-container",children:ie("div",{className:"no-source-row",children:[M("p",{children:M("i",{className:"material-icons no-source-icon",children:"error"})}),M("p",{children:"No media found, as the original media has not yet been uploaded to the platform."})]})}),f4=({media:e,viewIdx:t,translations:n,switchLanguage:r,langIdx:i})=>{const s=document.querySelector(".source-media-gallery"),a=s?s.getBoundingClientRect().width:0;function l(d){const{path:y,type:_,poster:c}=d;switch(_){case"Image":return M("div",{className:"source-image-container",children:M(d4,{className:"source-image",src:y,loader:M("div",{className:"source-image-loader",children:M(mb,{})}),unloader:M(gb,{failedUrls:[y]}),onClick:()=>window.open(y,"_blank")})});case"Video":return ie("div",{className:"media-player",children:[M("div",{className:"banner-trans right-overlay",children:n?n.map((f,w)=>i!==w+1?M("div",{className:"trans-button",onClick:()=>r(w+1),children:f.code}):M("div",{className:"trans-button",onClick:()=>r(0),children:"EN"})):null}),M(hv.Player,{poster:c,className:"source-video",playsInline:!0,src:y})]});case"Text":return M("div",{className:"source-text-container",children:M(fx,{path:y,loader:M(mb,{}),unloader:()=>this.renderError()})});case"Document":return M("iframe",{title:y,className:"source-document",src:y});default:return M(gb,{failedUrls:[`Application does not support extension: ${y.split(".")[1]}`]})}}return M("div",{className:"source-media-gallery",style:{transform:`translate(${t*-a}px)`},children:e.map(d=>l(d))})},h4=({viewIdx:e,paths:t,onShiftHandler:n})=>{const r=e!==0?M("div",{className:"back",onClick:()=>n(-1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_left"})})}):null,i=en(1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_right"})})}):null;return t.length>1?ie("div",{className:"media-gallery-controls",children:[r,i]}):M("div",{className:"media-gallery-controls"})};class hx extends ee.Component{constructor(){super(),this.state={mediaIdx:0,langIdx:0},this.onShiftGallery=this.onShiftGallery.bind(this)}getTypeCounts(t){return t.reduce((n,r)=>(n[r.type]+=1,n),{Image:0,Video:0,Text:0})}onShiftGallery(t){this.state.mediaIdx===0&&t===-1||this.state.mediaIdx===this.props.source.paths.length-1&&t===1||this.setState({mediaIdx:this.state.mediaIdx+t})}switchLanguage(t){this.setState({langIdx:t})}renderContent(t){const{url:n,title:r,paths:i,date:s,type:a,poster:l,description:d}=t,y=r.substring(0,100);return ie(Ln,{children:[ie("div",{className:"mo-banner",children:[M("div",{className:"mo-banner-close",onClick:this.props.onCancel,children:M("i",{className:"material-icons",children:"close"})}),M("h3",{className:"mo-banner-content",children:y})]}),M("div",{className:"mo-container",onClick:_=>_.stopPropagation(),children:M("div",{className:"mo-media-container",children:M(f4,{switchLanguage:_=>this.switchLanguage(_),translations:this.props.translations,langIdx:this.state.langIdx,media:i.map(_=>oD(_,l)),viewIdx:this.state.mediaIdx})})}),ie("div",{className:"mo-footer",children:[M(h4,{paths:i,viewIdx:this.state.mediaIdx,onShiftHandler:this.onShiftGallery}),ie("div",{className:"mo-meta-container",children:[d?M("div",{className:"mo-box-desc",children:M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(d)}})}):null,a||s||n?ie("div",{className:"mo-box",children:[ie("div",{children:[a?M("h4",{children:"Evidence type"}):null,a?ie("p",{children:[M("i",{className:"material-icons left",children:"perm_media"}),a]}):null]}),ie("div",{children:[s?M("h4",{children:"Date Published"}):null,s?ie("p",{children:[M("i",{className:"material-icons left",children:"today"}),s]}):null]}),ie("div",{children:[n?M("h4",{children:"Link"}):null,n?ie("span",{children:[M("i",{className:"material-icons left",children:"link"}),M("a",{href:n,target:"_blank",rel:"noreferrer",children:"Link to original URL"})]}):null]})]}):null]})]})]})}renderIntlContent(){const{langIdx:t}=this.state,{translations:n,source:r}=this.props;let i=null;return n&&n.length&&t>0&&(i=n[t-1]),i&&(i={...i,poster:r.poster,paths:i.file?[i.file]:i.paths}),this.renderContent(t===0?r:i)}render(){return typeof this.props.source!="object"?this.renderError():M("div",{className:`mo-overlay ${this.props.opaque?"opaque":""}`,children:this.renderIntlContent()})}}const p4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEUAAAD////8/PwEBAT5+fltbW3w8PAICAj19fXS0tKlpaUQEBB5eXmioqL09PTGxsaMjIzd3d3q6uo3NzfAwMB/f3/k5ORkZGQrKytNTU0fHx9VVVWPj4+4uLhbW1vR0dGXl5cnJydxcXGwsLA+Pj5GRkYZGRkwMDBPT09YWFiFhYVwONfZAAAHtklEQVR4nO2diXbaOhCGtWEwuw2YhABhCdDy/g94NbItCULaNIhjMXe+tpykp9XRnxlJo2UkxgiCIAiCIAiCIAiCIAiCIAiCIAhkSAmfve1k24Mv2uX3mNCCjrNpViR5Np31UEpsDzqcC4Dz4aDH0Cmc51xLM3+AvKUl4hEp22ynjPEsQu0YIoWMrSv3tHSUmGNy1G2ihP7lKdQmTV4YDoVS++iK++pqVmgUstfhhYfWTbHzq+m6hUHbaXDThIJ3m65bICTLbugDsqarForjLQvC6K8WTVctCLoZfqnw0HTlgiDZ241uppT41nTlgiDZr68UKiSdKZvc9lI9XEyarlooki/60qTpioVBj/jTLxROm65bGHTQ1ufiRlAjeL/puoVBxzTt7GZQk7WbrlsgtJvO9Vzis8I5ksjbWLHLr+aH+usBGoGGkVCeGXU4I0YMk0ItZXVlwyn8LR6Juj9l/cTzUHVmqFaiAC3mnJY9qkrPTdfmERh7TeazcX+NJla7wvdJXO5ZYQTCh0TVhxIEQRAEQRAEQYTGmx8iW76ouFyVwajQnMlw3zRXj8ch2TxLK5ZNV+ZBtOxqKZZDGNeQwueHFD4/pPD5qRUKvmm6Kg/C2RDniC/ZzCocN12ZhyDZ0nopVhuOkdsQjgrX7JquyoPoWoWtpqvyIEa2HeI4OfsJmVmFp6br8hgWuVXYdFUegmQHjlshYzvb0WQ412lsR4MnHeiKiTsLvcSnENZKl/YUrXjDqJAdc3s2MenhU9iWrOvSD1fITn2Z014miRRrVGqOsm3taC940Wu6SoEBG7bfbRK34OgOl0KTmzqBAk0OQkm5pzblVSOEz3nTdQpLJdAaUKCLZ0Dg3muDIsO2dwhpCH6+TOeAaSw0bVD3otZDlRLrpisVFi1wkblOVMel6HoZts1srCYUZOMhclHTi04KLlwvo2aYehnTBg91qFZevINsCVG22VvHBduCJ8gmhVrMeuhnqxWv6Fx03nFdjOAZrlwnmC71rf2UUvz92HSdwqLb4FIoZ0O+R5bLpcVstC47EPINKoFmMrGsY22hexuFbDtUGgt6gUwHVyBTuajnoR09DLbxzOolLBsOeBWq6dkgz16arlNYLpe2tSXTBcNjP0C3t5mw813Fpz0mcSlss7lwwwSc7cJ0h6cJ1d6ch3ZgXRSPPFaGaie7+6J9dYxqnAe0mlTYUE1s0GVVmMsD3TDRxZc3It3RQwXrvrjaoMHtYgtY923jU+gu9BKdF3QuanxU2VWnPjoXBXvl5aoMfE6RhWoAnB1VVUcq8i1ChWyRq9qGZmUbm5cydr7oRxHSs/foCmy7LxUtuwnKi6brEh4Iud2hPD2jwNcG9ZwisTZMjvgUSkgVsSvc2A4iAFrhSlgb7rBNCgHJhvVIwXNka2sGyT7cUPEepMjZoKL7GqS8O5HecM83QYqsz2/wWO7h3TuFv4MU6FJPIlFoR0PR+QhZoIhGoTuQkIXZCY1NYdvd8xymo2Epr48yxhHkTlzINgpTYsarqSaP45TYwSlchSmxCgL1RxxJbmuncBCkwJ6yB27jCCBcijbfBCnwo1rUEkLFcei9H1ShlHa2qYPA+8sLQXCFS163w0B9872EVcj8teV9kPLuxlMYoKeR7OiyaSM5qOL1NEF+5gcXQYQJc+/GGy2CjPjWJ6LJpnUjvkhDlOeWtWJZel1YgSLEFP+U25XJMAFEALxHDwLMyfsuASWaR0xS1xBn95fmnDSP5FSq9Of40zuf5ZDsw+5hmcJiwFunUSJf3LWaKCGb1u5DtqJZmfS6GqjVHSVJ1ha8VlgsYrGhZIVTeFcWs3lUSNX7kJuIznMM3Kr+8J5rS6Qfz6iYLkBZey/h3ncVm7eJFWi9IBCZl0R5z6R17PYheVwveLqaKfMg3k/aj/4/r4lLF97H0wiBFxtpmQyun54qtWtsQgwncSlkGzdgqPynlbMp30qJQTRjoUGynrszQfH0Z266rx1UF5KyiIYKZobEPi93Sc3nP08TQUzXDjnCPMEak0A44M1SYUcMBRK/72TlrQQXKd/x3ckHCaMdd0hfSzx93wbwD3up/0BihA8HghW8EUNbM//+EgtkYya+wIJFeTBOQkjpv+JYxiR/cVYz11qsXCQDCwUxhWseuq5TF57CF/m49w2FrDceXjz9mEexd3+DtmTH1CWtwRUKvBj/dd3mdM7czwWIOCNamgN8Lj41f5LV7z/V97D3nnsW8Du6WOaaEfemGaWzDkfnm7v7vV238GxnXl/lgbbJHwVkcQ1c8mHtrdC7pvvBef7rMDm9nE4fr+vZZlVwfume8E0k+xRfIiEDoZVcGkaU6erwteoME82wo8pvBb9QyJN+fOPgNdBzfow4t6q+B/wYuBg9Sc6+1tjPwVW/r1BAwJbv4jegoTzEvky+L9D4ajJ7mkw3WWrcnrO/a7Nk5wV7Egt6HFujBO5TMBe3iE8mNYOfaavDUSuO8wj/iHnf+LwyvaYSn7udOj1jNHuS/uUa+7rTejMtrtVVDEeD+cW/fTK8Wi9+9zer9zQtijwZJkWRvo/25/mT2u5P9Lbbl8nktFjEOPm7F3m95/asnvlHSk31y9yfNBMEQRAEQRAEQRAEQRAEQRAE8b/nP3XqQCdLzBvzAAAAAElFTkSuQmCC",Th=-2;class m4 extends ee.Component{constructor(t){super(t),this.state={video:Th,featureLang:0}}getVideo(t,n){return t=0?this.props.cover.videos[t-n]:null}onVideoClickHandler(t){const n=this.props.cover.headerVideos?this.props.cover.headerVideos.length:0;return()=>{this.setState({video:t+n})}}renderFeature(){const{featureVideo:t}=this.props.cover,{featureLang:n}=this.state,{translations:r}=t,i=n===0?t:{...r[n-1],poster:t.poster};return ie("div",{children:[M("div",{className:"banner-trans right-overlay",children:r&&r.map((s,a)=>{const l=a+1;return n!==l?M("div",{onClick:()=>this.setState({featureLang:l}),className:"trans-button",children:s.code},s.code):M("div",{onClick:()=>this.setState({featureLang:0}),className:"trans-button",children:"ENG"},"ENG")})}),M(hv.Player,{className:"source-video",poster:i.poster,playsInline:!0,src:i.file})]})}renderHeaderVideos(){const{headerVideos:t}=this.props.cover;return M("div",{className:"row",children:t.slice(0,2).map((n,r)=>M("div",{className:"cell plain",onClick:()=>this.setState({video:r}),children:n.buttonTitle},r))})}renderButton(t,n){return M("div",{className:"row",children:M("a",{className:`cell ${n?"yellow":"plain"}`,href:t.href,children:t.title})})}renderMediaOverlay(){const t=this.getVideo(this.state.video,this.props.cover.headerVideos?this.props.cover.headerVideos.length:0);return M(hx,{opaque:!0,source:{title:t.title,desc:t.desc,paths:[t.file],poster:t.poster},translations:t.translations,onCancel:()=>this.setState({video:Th})})}render(){if(!this.props.cover)return ie("div",{className:"default-cover-container",children:["You haven't specified any cover props. Put them in the values that overwrite the store in ",M("code",{children:"app.cover"})]});const{videos:t,footerButton:n}=this.props.cover,{showing:r}=this.props;return ie("div",{className:"default-cover-container",children:[M("div",{className:r?"cover-header":"cover-header minimized",children:M("a",{className:"cover-logo-container",href:"https://bellingcat.com",children:M("img",{className:"cover-logo",src:p4,alt:"Bellingcat logo"})})}),ie("div",{className:"cover-content",children:[this.props.cover.bgVideo?M("div",{className:`fullscreen-bg ${this.props.showing?"":"hidden"}`,children:M("video",{loop:!0,muted:!0,autoPlay:!0,preload:"auto",className:"fullscreen-bg__video",children:M("source",{src:this.props.cover.bgVideo,type:"video/mp4"})})}):null,M("h2",{dangerouslySetInnerHTML:{__html:this.props.cover.title}}),this.props.cover.subtitle?M("h3",{style:{marginTop:0},children:this.props.cover.subtitle}):null,this.props.cover.subsubtitle?M("h5",{children:this.props.cover.subsubtitle}):null,this.props.cover.featureVideo?this.renderFeature():null,ie("div",{className:"hero thin",children:[this.props.cover.headerVideos?this.renderHeaderVideos():null,this.props.cover.headerButton?this.renderButton(this.props.cover.headerButton):null,M("div",{className:"row",children:M("div",{className:"cell yellow",onClick:this.props.showAppHandler,children:this.props.cover.exploreButton})})]}),Array.isArray(this.props.cover.description)?this.props.cover.description.map((i,s)=>M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(i)}},s)):M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(this.props.cover.description)}}),t?ie("div",{className:"hero",children:[M("div",{className:"row",children:t&&t.slice(0,2).map((i,s)=>ie("div",{className:"cell small",onClick:this.onVideoClickHandler(s),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))}),M("div",{className:"row",children:t.length>2&&this.props.cover.videos.slice(2,4).map((i,s)=>ie("div",{className:"cell small",onClick:this.onVideoClickHandler(s+2),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))})]}):null,n?M("div",{className:"hero",children:M("div",{className:"row",children:this.renderButton(n)})}):null]}),this.state.video!==Th?this.renderMediaOverlay():null]})}}function g4(e){return{cover:e.app.cover}}const v4=pi(g4)(m4),y4=({showing:e,children:t})=>M("div",{className:`cover-container ${e?"showing":""}`,children:t}),px=({isLoading:e,language:t})=>{let n="loading-overlay";return n+=e?"":" hidden",M("div",{id:"loading-overlay",className:n,children:ie("div",{className:"loading-wrapper",children:[M("span",{id:"loading-text",className:"text",children:Ue[t].loading}),ie("div",{className:"spinner",children:[M("div",{className:"double-bounce1"}),M("div",{className:"double-bounce2"})]})]})})},_4=({title:e,from:t,to:n,onClick:r,hideInfo:i})=>{const s=t&&Op(t),a=n&&Op(n);return ie("div",{className:"timeline-header",children:[M("div",{className:"timeline-toggle",onClick:()=>r(),children:M("p",{children:M("i",{className:"arrow-down"})})}),ie("div",{className:`timeline-info ${i?"hidden":""}`,children:[M("p",{dangerouslySetInnerHTML:{__html:e}}),ie("p",{children:[s," - ",a]})]})]})},w4=15;cD();class b4 extends ee.Component{constructor(){super(),this.xAxis0Ref=ee.createRef(),this.xAxis1Ref=ee.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){let t,n;this.props.extent>5256e3?(t="%Y",n=""):(this.props.extent>43200,n="%d %b",t="");let{marginTop:r}=this.props.dims;this.props.scaleX&&(this.x0=q_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r+30).tickSize(100-w4-r).tickFormat(Iu(t)),this.x1=q_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r).tickSize(0).tickFormat(Iu(n)),this.state.isInitialized||this.setState({isInitialized:!0})),this.state.isInitialized&&(Ui(this.xAxis0Ref.current).transition().duration(this.props.transitionDuration).call(this.x0),Ui(this.xAxis1Ref.current).transition().duration(this.props.transitionDuration).call(this.x1))}render(){return ie(Ln,{children:[M("g",{ref:this.xAxis0Ref,transform:"translate(0, 24)",clipPath:"url(#clip)",className:"axis xAxis"}),M("g",{ref:this.xAxis1Ref,transform:`translate(0, ${this.props.dims.marginTop})`,clipPath:"url(#clip)",className:"axis xAxis"})]})}}const T4=({dims:e})=>M("clipPath",{id:"clip",children:M("rect",{x:e.marginLeft,y:"0",width:Math.max(0,e.width-e.marginLeft*2),height:e.contentHeight})}),vb=({dims:e,onMoveTime:t,backward:n})=>n===!0?M("div",{className:"timeline-handle",onClick:()=>t("backwards"),children:M("span",{className:"timeline-handle__triangle"})}):M("div",{className:"timeline-handle right",onClick:()=>t("forward"),children:M("span",{className:"timeline-handle__triangle"})}),S4=[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}];function E4(e,t,n){return e>=n&&t>=n?!0:e===t}const x4=({extent:e,zoomLevels:t,dims:n,onApplyZoom:r})=>{function i(s,a){const l=t.reduce((y,_)=>y.duration<_.duration?_:y),d=E4(s.duration,e,l.duration);return M("div",{className:`zoom-level-button ${d?"active":""}`,x:"60",y:a*15+20,onClick:()=>r(s),children:s.label},a)}return t.length===0&&(t=S4),M("div",{className:"zoom-controls",children:t.map((s,a)=>i(s,a))})},k4=({styles:e,eventRadius:t,getEventX:n,getEventY:r,categories:i,transitionDuration:s,selected:a,dims:l,features:d})=>{function y(_,c){function f(g){return M("circle",{className:"timeline-marker",cx:0,cy:0,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeLinejoin:"round",strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px, ${g+40}px)`,WebkitTransition:`transform ${s/1e3}s ease`,MozTransition:"none",opacity:1},r:t*2},Zt(c))}function w(){return M("rect",{className:"timeline-marker",x:0,y:l.marginTop,width:t/1.5,height:l.contentHeight-55,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px)`,opacity:.7}})}const v=Ra(c.latitude)&&Ia(c.longitude)||d.GRAPH_NONLOCATED&&c.projectOffset!==-1,p=jS(c,i).map(g=>r({...c,category:g}));function b(g){switch(c.shape){case"circle":case br.DIAMOND:case br.STAR:_.push(f(g));break;case br.BAR:_.push(w());break;default:return v?_.push(f(g)):_.push(w())}}return p.length>0?p.forEach(b):b(r(c)),_}return M("g",{clipPath:"url(#clip)",children:a.reduce(y,[])})},C4=({highlights:e,events:t,x:n,y:r,width:i,height:s,onSelect:a,styleProps:l,extraRender:d})=>{if(e.length===0)return M("rect",{onClick:a,className:"event",x:n,y:r,style:l,width:i,height:s});const y=s/e.length;return M(Ln,{children:e.map((_,c)=>M("rect",{onClick:a,className:"event",x:n,y:r-y+c*y+y/2,style:{...l,opacity:_?.3:.1},width:i,height:y}))})},mx=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>M("rect",{onClick:i,className:"event",x:e,y:t,style:s,width:n,height:n,transform:r}),P4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>{const l=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e+l},${t-l} ${e-n},${t} ${e+n},${t} ${e-l},${t-l} ${e},${t+l}`,transform:r})},A4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t-a} ${e-a},${t-a}`,transform:`rotate(180, ${e}, ${t})`})},L4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t} ${e+a},${t-a} ${e-a},${t-a} ${e-a},${t}`,transform:`rotate(180, ${e}, ${t})`})},R4=({offset:e,id:t,start:n,end:r,getX:i,y:s,dims:a,colour:l,eventRadius:d,onClick:y})=>{const _=i(r)-i(n);return e===void 0?null:M("rect",{onClick:y,className:"project",x:i(n),y:a.marginTop+e,width:_,style:{fill:l,fillOpacity:.2},height:2*d})};function _v({radius:e,colorPercentMap:t,styles:n,className:r}){let i=0;const s=Object.keys(t);return M(Ln,{children:s.map((a,l)=>{const d=t[a],[y,_]=T0(e,i);i+=d;const[c,f]=T0(e,i),w=s.length===1||d>.5?1:0,v=[`M ${y} ${_}`,`A ${e} ${e} 0 ${w} 1 ${c} ${f}`,"L 0 0 ",`L ${y} ${_} Z`].join(" "),p={...n,fill:a};return M("path",{className:r,id:`arc_${l}`,d:v,style:p},`arc_${l}`)})})}function yb(e,t,n){const r=gg([e],n.coloringSet);return M("g",{className:"timeline-event",onClick:n.onSelect,transform:`translate(${n.x}, ${n.y+40})`,children:M(_v,{radius:n.eventRadius,colorPercentMap:fg(n.filterColors,r),styles:{...t},className:"event"})},e.id)}function _b(e,t,n){const r=n.features.GRAPH_NONLOCATED?e.projectOffset>=0?t.opacity:.5:mg(1);return M(C4,{onSelect:n.onSelect,category:e.category,events:[e],x:n.x,y:n.dims.marginTop,width:n.eventRadius/4,height:n.dims.trackHeight,styleProps:{...t,fillOpacity:r},highlights:n.highlights})}function I4(e,t,n){return M(mx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius,r:1.8*n.eventRadius,styleProps:t,transform:`rotate(45, ${n.x}, ${n.y})`})}function N4(e,t,n){return M(mx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius/2,r:1.8*n.eventRadius,styleProps:t})}function O4(e,t,n){return M(A4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function M4(e,t,n){return M(L4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function D4(e,t,n){return M(P4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.8*n.eventRadius,styleProps:{...t,fillRule:"nonzero"},transform:`rotate(180, ${n.x}, ${n.y})`})}const $4=({events:e,projects:t,categories:n,narrative:r,getDatetimeX:i,getY:s,getCategoryColor:a,getHighlights:l,onSelect:d,transitionDuration:y,dims:_,features:c,setLoading:f,setNotLoading:w,eventRadius:v,filterColors:p,coloringSet:b})=>{const g=r?r.steps.map(T=>T.id):[];function m(T,x){if(r&&!g.includes(x.id))return null;const k=Ra(x.latitude)&&Ia(x.longitude)||c.GRAPH_NONLOCATED&&x.projectOffset!==-1,{shape:P}=x;let E=k?yb:_b;P&&P.shape&&(P.shape===br.BAR?E=_b:P.shape===br.DIAMOND?E=I4:P.shape===br.STAR?E=D4:P.shape===br.TRIANGLE?E=O4:P.shape===br.PENTAGON?E=M4:P.shape===br.SQUARE?E=N4:E=yb);const A=jS(x,n).map(N=>{const $=s({...x,category:N}),z={fill:x.colour?x.colour:a(N.title),fillOpacity:$>0?mg(1):0,transition:`transform ${y/1e3}s ease`};return{y:$,styles:z}});function C(N,$){return E(x,$,{x:i(x.datetime),y:N,eventRadius:v,onSelect:()=>d(x),dims:_,highlights:c.HIGHLIGHT_GROUPS?l(x.filters[c.HIGHLIGHT_GROUPS.filterIndexIndicatingGroup]):[],features:c,filterColors:p,coloringSet:b})}return A.length===0?T.push(C(s(x),{fill:a(null)})):A.forEach(N=>{T.push(C(N.y,N.styles))}),T}let h=()=>null;return c.GRAPH_NONLOCATED&&(h=function(){return M(Ln,{children:Object.values(t).map(T=>M(R4,{...T,eventRadius:v,onClick:()=>console.log(T),getX:i,dims:_,colour:a(T.category)},T.id))})}),ie("g",{clipPath:"url(#clip)",children:[h(),e.reduce(m,[])]})};class F4 extends ee.Component{constructor(t){super(t),this.grabRef=ee.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){if(!this.state.isInitialized){const t=RI().on("start",this.props.onDragStart).on("drag",this.props.onDrag).on("end",this.props.onDragEnd);Ui(this.grabRef.current).call(t),this.setState({isInitialized:!0})}}renderCategory(t,n){const{features:r,dims:i}=this.props,s=1;return r.GRAPH_NONLOCATED&&r.GRAPH_NONLOCATED.categories&&r.GRAPH_NONLOCATED.categories.includes(t)?null:ie(Ln,{children:[M("g",{className:"tick",style:{strokeWidth:s},opacity:"0.5",transform:"translate(0, 66)",children:M("line",{x1:i.marginLeft,x2:i.width-i.marginLeft})}),M("g",{className:"tick",opacity:"1",transform:"translate(0, 66)",children:M("text",{x:i.marginLeft-5,dy:"0.32em",children:t})})]})}render(){const{dims:t,categories:n,fallbackLabel:r}=this.props,s=n&&n.length>0?n.map((a,l)=>this.renderCategory(a,l)):this.renderCategory(r,0);return ie("g",{className:"yAxis",children:[s,M("rect",{ref:this.grabRef,className:"drag-grabber",x:t.marginLeft,y:t.marginTop,width:Math.max(0,t.width-t.marginLeft*2),height:t.contentHeight})]})}}class j4 extends ee.Component{constructor(t){super(t);let n=new URLSearchParams(window.location.href.split("?")[1]);this.styleDatetime=this.styleDatetime.bind(this),this.getDatetimeX=this.getDatetimeX.bind(this),this.getY=this.getY.bind(this),this.onApplyZoom=this.onApplyZoom.bind(this),this.onSelect=this.onSelect.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.svgRef=ee.createRef(),this.state={isFolded:n.has("timeline")&&n.get("timeline")==="false",dims:t.dimensions,scaleX:null,scaleY:null,timerange:[null,null],dragPos0:null,transitionDuration:300}}componentDidMount(){this.addEventListeners()}UNSAFE_componentWillReceiveProps(t){if(Zt(t)!==Zt(this.props)&&this.setState({timerange:t.app.timeline.range,scaleX:this.makeScaleX()}),Zt(t.activeCategories)!==Zt(this.props.activeCategories)||Zt(t.dimensions)!==Zt(this.props.dimensions)){const{trackHeight:n,marginTop:r}=t.dimensions;this.setState({scaleY:this.makeScaleY(t.activeCategories,n,r)})}t.dimensions.trackHeight!==this.props.dimensions.trackHeight&&this.computeDims()}addEventListeners(){window.addEventListener("resize",()=>{this.computeDims()});const t=document.querySelector(".timeline-wrapper");t!==null&&t.addEventListener("transitionend",n=>{this.computeDims()})}makeScaleX(){return jM().domain(this.state.timerange).range([this.state.dims.marginLeft,this.state.dims.width-this.state.dims.marginLeft])}makeScaleY(t,n,r){const{features:i}=this.props;i.GRAPH_NONLOCATED&&i.GRAPH_NONLOCATED.categories&&(t=t.filter(d=>!i.GRAPH_NONLOCATED.categories.includes(d.title)));const s=0,a=t.length>2?n/t.length:n/(t.length+1),l=t.map((d,y)=>(y+1)*a+r+s/2);return d=>{const y=t.indexOf(d);return l[y]}}componentDidUpdate(t,n){n.timerange!==this.state.timerange&&this.setState({scaleX:this.makeScaleX()})}getTimeScaleExtent(){if(!this.state.scaleX)return 0;const t=this.state.scaleX.domain();return(t[1].getTime()-t[0].getTime())/6e4}onClickArrow(){this.setState(t=>({isFolded:!t.isFolded}))}computeDims(){const t=this.props.ui.dom.timeline;if(document.querySelector(`#${t}`)!==null){const n=document.querySelector(`#${t}`).getBoundingClientRect();this.setState({dims:{...this.props.dimensions,width:n.width}},()=>{this.setState({scaleX:this.makeScaleX()})})}}onMoveTime(t){const n=this.getTimeScaleExtent(),r=Ht.offset(this.state.scaleX.domain()[0],n);let i=r,s=Ht.offset(r,n);t==="backwards"&&(i=Ht.offset(r,-(2*n)),s=Ht.offset(r,-n)),this.props.methods.onUpdateTimerange([i,s]),this.props.methods.onSelect([])}onCenterTime(t){const n=this.getTimeScaleExtent(),r=Ht.offset(t,-n/2),i=Ht.offset(t,+n/2);this.setState({timerange:[r,i]},()=>{this.props.methods.onUpdateTimerange(this.state.timerange)})}onSoftTimeRangeUpdate(t){this.setState({timerange:t})}onApplyZoom(t){const n=this.getTimeScaleExtent(),r=Ht.offset(this.state.scaleX.domain()[0],n/2),{rangeLimits:i}=this.props.app.timeline;let s=Ht.offset(r,-t.duration/2),a=Ht.offset(r,t.duration/2);if(i){const l=i[0],d=i[1];sd&&(a=d,s=Ht.offset(a,-t.duration))}this.setState({timerange:[s,a]},()=>{this.props.actions.updateTicks(15),this.props.methods.onUpdateTimerange(this.state.timerange)})}toggleTransition(t){this.setState({transitionDuration:t?300:0})}onDragStart(t){t.sourceEvent.stopPropagation(),this.setState({dragPos0:t.x},()=>{this.toggleTransition(!1)})}onDrag(t){const n=this.state.scaleX.invert(this.state.dragPos0).getTime(),r=this.state.scaleX.invert(t.x).getTime(),i=(n-r)/1e3,{range:s,rangeLimits:a}=this.props.app.timeline;let l=Jr.offset(s[0],i),d=Jr.offset(s[1],i);if(a){const y=a[0],_=a[1];l=l_?_:d}this.onSoftTimeRangeUpdate([l,d])}onDragEnd(){this.toggleTransition(!0),this.props.methods.onUpdateTimerange(this.state.timerange)}getDatetimeX(t){return this.state.scaleX(t)}getY(t){const{features:n,domain:r,activeCategories:i}=this.props,{USE_CATEGORIES:s,GRAPH_NONLOCATED:a}=n;if(!(s&&i&&i.length>0))return this.state.dims.trackHeight/1.5;const{category:d}=t;if(a&&a.categories.includes(d)){const{project:y}=t;return this.state.dims.marginTop+r.projects[y].offset+this.props.ui.eventRadius}return this.state.scaleY?this.state.scaleY(d):0}styleDatetime(t,n){return[null,null]}onSelect(t){if(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK){const n=Math.floor(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK/2),r=Ht.offset(t.datetime,-n),i=Ht.offset(t.datetime,n);this.props.actions.updateTicks(1),this.props.methods.onUpdateTimerange([r,i])}this.props.methods.onSelect(t)}render(){const{isNarrative:t,app:n,domain:r}=this.props,{timeline:i}=n;let s=`timeline-wrapper ${this.state.isFolded?" folded":""}`;s+=n.narrative!==null?" narrative-mode":"";const{dims:a}=this.state,l={height:a.contentHeight},{activeCategories:d}=this.props,y=Ue[this.props.app.language].timeline.info.replace("%n",r.eventCountInTimeRange);return ie("div",{className:s,onKeyDown:this.props.onKeyDown,tabIndex:"1",children:[M(_4,{title:y,from:this.state.timerange[0],to:this.state.timerange[1],onClick:()=>{this.onClickArrow()},hideInfo:t}),M("div",{className:"timeline-content",children:ie("div",{id:this.props.ui.dom.timeline,className:"timeline",children:[M("div",{className:"timeline-container",children:ie("svg",{ref:this.svgRef,width:a.width,style:l,children:[M(T4,{dims:a}),M(b4,{ticks:i.dimensions.ticks,dims:a,extent:this.getTimeScaleExtent(),transitionDuration:this.state.transitionDuration,scaleX:this.state.scaleX}),M(F4,{dims:a,getCategoryY:_=>this.getY({category:_,project:null}),onDragStart:this.onDragStart,onDrag:this.onDrag,onDragEnd:this.onDragEnd,categories:d,features:this.props.features,fallbackLabel:Ue[this.props.app.language].timeline.default_categories_label}),M(k4,{dims:a,selected:this.props.app.selected,getEventX:_=>this.getDatetimeX(_.datetime),getEventY:this.getY,categories:d,transitionDuration:this.state.transitionDuration,styles:this.props.ui.styles,features:this.props.features,eventRadius:this.props.ui.eventRadius}),M($4,{events:this.props.domain.events,projects:this.props.domain.projects,categories:d,styleDatetime:this.styleDatetime,narrative:this.props.app.narrative,getDatetimeX:this.getDatetimeX,getY:this.getY,getHighlights:_=>_==="None"?[]:d.map(c=>c.group===_),getCategoryColor:this.props.methods.getCategoryColor,transitionDuration:this.state.transitionDuration,onSelect:this.onSelect,dims:a,features:this.props.features,setLoading:this.props.actions.setLoading,setNotLoading:this.props.actions.setNotLoading,eventRadius:this.props.ui.eventRadius,filterColors:this.props.ui.filterColors,coloringSet:this.props.app.coloringSet})]})}),ie("div",{className:"timeline-bottom",children:[M(vb,{dims:a,onMoveTime:_=>{this.onMoveTime(_)},backward:!0}),M(x4,{extent:this.getTimeScaleExtent(),zoomLevels:i.zoomLevels,dims:a,onApplyZoom:this.onApplyZoom}),M(vb,{dims:a,onMoveTime:_=>{this.onMoveTime(_)},backward:!1})]})]})})]})}}function z4(e){return{dimensions:$p(e),isNarrative:!!e.app.associations.narrative,activeCategories:Zg(e),domain:{events:v$(e),eventCountInTimeRange:m$(e),projects:y$(e),narratives:e.domain.narratives},app:{selected:e.app.selected,language:e.app.language,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,timeline:{zoomLevels:e.app.timeline.zoomLevels,dimensions:$p(e),ticks:e.app.timeline.ticks,range:Gg(e),rangeLimits:oE(e)}},ui:{dom:e.ui.dom,styles:e.ui.style.selectedEvents,eventRadius:e.ui.eventRadius,filterColors:e.ui.coloring.colors},features:fr(e)}}function B4(e){return{actions:Qo({setLoading:qS,setNotLoading:ZS,updateTicks:KS},e)}}const U4=pi(z4,B4)(j4);var Bp={},H4={get exports(){return Bp},set exports(e){Bp=e}};/* @preserve +*/var mw;function Ze(){return mw||(mw=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0&&arguments[0]!==void 0?arguments[0]:{action:"play",source:""};return this.video.play(),{type:n,operation:h}}function _(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"pause",source:""};return this.video.pause(),{type:n,operation:h}}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{action:"toggle-play",source:""};return this.video.togglePlay(),{type:n,operation:h}}function f(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"seek",source:""};return this.video.seek(h),{type:n,operation:T}}function w(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"forward-".concat(h),source:""};return this.video.forward(h),{type:n,operation:T}}function v(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"replay-".concat(h),source:""};return this.video.replay(h),{type:n,operation:T}}function p(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-rate",source:""};return this.video.playbackRate=h,{type:n,operation:T}}function b(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:"change-volume",source:""},x=h;return h<0&&(x=0),h>1&&(x=1),this.video.volume=x,{type:n,operation:T}}function g(h){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{action:h?"muted":"unmuted",source:""};return this.video.muted=h,{type:n,operation:T}}function m(h){return t.default.enabled?(t.default.isFullscreen?t.default.exit():t.default.request(this.rootElement),{type:n,operation:{action:"toggle-fullscreen",source:""}}):{type:r,isFullscreen:!h.isFullscreen}}return rt}var _w;function Mj(){return _w||(_w=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(mi()),r=mv(),i=dd(),s={currentSrc:null,duration:0,currentTime:0,seekingTime:0,buffered:null,waiting:!1,seeking:!1,paused:!0,autoPaused:!1,ended:!1,playbackRate:1,muted:!1,volume:1,readyState:0,networkState:0,videoWidth:0,videoHeight:0,hasStarted:!1,userActivity:!0,isActive:!1,isFullscreen:!1,activeTextTrack:null};function a(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,d=arguments.length>1?arguments[1]:void 0;switch(d.type){case i.USER_ACTIVATE:return(0,n.default)({},l,{userActivity:d.activity});case i.PLAYER_ACTIVATE:return(0,n.default)({},l,{isActive:d.activity});case i.FULLSCREEN_CHANGE:return(0,n.default)({},l,{isFullscreen:!!d.isFullscreen});case r.SEEKING_TIME:return(0,n.default)({},l,{seekingTime:d.time});case r.END_SEEKING:return(0,n.default)({},l,{seekingTime:0});case r.LOAD_START:return(0,n.default)({},l,d.videoProps,{hasStarted:!1,ended:!1});case r.CAN_PLAY:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.WAITING:return(0,n.default)({},l,d.videoProps,{waiting:!0});case r.CAN_PLAY_THROUGH:case r.PLAYING:return(0,n.default)({},l,d.videoProps,{waiting:!1});case r.PLAY:return(0,n.default)({},l,d.videoProps,{ended:!1,paused:!1,autoPaused:!1,waiting:!1,hasStarted:!0});case r.PAUSE:return(0,n.default)({},l,d.videoProps,{paused:!0});case r.END:return(0,n.default)({},l,d.videoProps,{ended:!0});case r.SEEKING:return(0,n.default)({},l,d.videoProps,{seeking:!0});case r.SEEKED:return(0,n.default)({},l,d.videoProps,{seeking:!1});case r.ERROR:return(0,n.default)({},l,d.videoProps,{error:"UNKNOWN ERROR",ended:!0});case r.DURATION_CHANGE:case r.TIME_UPDATE:case r.VOLUME_CHANGE:case r.PROGRESS_CHANGE:case r.RATE_CHANGE:case r.SUSPEND:case r.ABORT:case r.EMPTIED:case r.STALLED:case r.LOADED_META_DATA:case r.LOADED_DATA:case r.RESIZE:return(0,n.default)({},l,d.videoProps);case r.ACTIVATE_TEXT_TRACK:return(0,n.default)({},l,{activeTextTrack:d.textTrack});default:return l}}}(Ff)),Ff}var zf={},ww;function Dj(){return ww||(ww=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=t(mi()),r=dd(),i={count:0,operation:{action:"",source:""}};function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i,l=arguments.length>1?arguments[1]:void 0;switch(l.type){case r.OPERATE:return(0,n.default)({},a,{count:a.count+1,operation:(0,n.default)({},a.operation,l.operation)});default:return a}}}(zf)),zf}var bw;function jE(){return bw||(bw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,e.operationReducer=e.playerReducer=void 0;var n=t(Mj()),r=t(Dj());function i(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;return{player:(0,n.default)(l.player,d),operation:(0,r.default)(l.operation,d)}}var s=n.default;e.playerReducer=s;var a=r.default;e.operationReducer=a}($f)),$f}var Tw;function $j(){return Tw||(Tw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(ot()),s=n(st()),a=Oj,l=n(jE()),d=t(dd()),y=t(mv()),_=function(){function c(f){(0,i.default)(this,c),this.store=f||(0,a.createStore)(l.default),this.video=null,this.rootElement=null}return(0,s.default)(c,[{key:"getActions",value:function(){var w=this,v=this.store.dispatch,p=(0,r.default)({},d,y);function b(g){return function(){var h=g.apply(w,arguments);typeof h<"u"&&v(h)}}return Object.keys(p).filter(function(g){return typeof p[g]=="function"}).reduce(function(g,m){return g[m]=b(p[m]),g},{})}},{key:"getState",value:function(){return this.store.getState()}},{key:"subscribeToStateChange",value:function(w,v){v||(v=this.getState.bind(this));var p=v(),b=function(){var m=v();if(m!==p){var h=p;p=m,w(m,h)}};return this.store.subscribe(b)}},{key:"subscribeToOperationStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().operation})}},{key:"subscribeToPlayerStateChange",value:function(w){var v=this;return this.subscribeToStateChange(w,function(){return v.getState().player})}}]),c}();e.default=_}(Df)),Df}var Bf={},Sw;function zE(){return Sw||(Sw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={actions:y.default.object,player:y.default.object,position:y.default.string,className:y.default.string},w={position:"left"},v=function(p){(0,d.default)(b,p);function b(g,m){var h;return(0,r.default)(this,b),h=(0,s.default)(this,(0,a.default)(b).call(this,g,m)),h.handleClick=h.handleClick.bind((0,l.default)(h)),h}return(0,i.default)(b,[{key:"componentDidMount",value:function(){}},{key:"handleClick",value:function(){var m=this.props.actions;m.play()}},{key:"render",value:function(){var m=this.props,h=m.player,T=m.position;return _.default.createElement("button",{className:(0,c.default)("video-react-button","video-react-big-play-button","video-react-big-play-button-".concat(T),this.props.className,{"big-play-button-hide":h.hasStarted||!h.currentSrc}),type:"button","aria-live":"polite",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Play Video"))}}]),b}(_.Component);e.default=v,v.propTypes=f,v.defaultProps=w,v.displayName="BigPlayButton"}(Bf)),Bf}var Uf={},Ew;function BE(){return Ew||(Ew=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(ee),i=t(Ze()),s={player:n.default.object,className:n.default.string};function a(l){var d=l.player,y=l.className;return d.error?null:r.default.createElement("div",{className:(0,i.default)("video-react-loading-spinner",y)})}a.propTypes=s,a.displayName="LoadingSpinner"}(Uf)),Uf}var Hf={},xw;function UE(){return xw||(xw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s={poster:n.default.string,player:n.default.object,actions:n.default.object,className:n.default.string};function a(d){var y=d.poster,_=d.player,c=d.actions,f=d.className;return!y||_.hasStarted?null:r.default.createElement("div",{className:(0,i.default)("video-react-poster",f),style:{backgroundImage:'url("'.concat(y,'")')},onClick:function(){_.paused&&c.play()}})}a.propTypes=s,a.displayName="PosterImage";var l=a;e.default=l}(Hf)),Hf}var Wf={},rr={},Qu={},Fj={get exports(){return Qu},set exports(e){Qu=e}},Ju={},jj={get exports(){return Ju},set exports(e){Ju=e}},ec={},zj={get exports(){return ec},set exports(e){ec=e}},kw;function HE(){return kw||(kw=1,function(e){function t(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,s=new Array(r);i0&&arguments[0]!==void 0?arguments[0]:0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v,b=Math.floor(v%60),g=Math.floor(v/60%60),m=Math.floor(v/3600),h=Math.floor(p/60%60),T=Math.floor(p/3600);return(s(v)||v===1/0)&&(m="-",g="-",b="-"),m=m>0||T>0?"".concat(m,":"):"",g="".concat((m||h>=10)&&g<10?"0".concat(g):g,":"),b=b<10?"0".concat(b):b,m+g+b}function l(v){return v.props&&v.props.isVideoChild?!0:v.type==="source"||v.type==="track"}var d=function(p,b){return p.filter(b)[0]},y=function(p,b){var g=p.type,m=b.type;return typeof g=="string"||typeof m=="string"?g===m:typeof g=="function"&&typeof m=="function"?g.displayName===m.displayName:!1};function _(v,p,b){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,m=i.default.Children.toArray(p);b.order;var h=(0,r.default)(b,["order"]);return m.filter(function(T){return!T.props.disabled}).concat(v.filter(function(T){return!d(m,function(x){return y(x,T)})})).map(function(T){var x=d(v,function(P){return y(P,T)}),k=x?x.props:{},A=(0,n.default)({},h,k,T.props),E=i.default.cloneElement(T,A,T.props.children);return E}).sort(function(T,x){return(T.props.order||g)-(x.props.order||g)})}function c(v,p){console.warn("WARNING: ".concat(v," will be deprecated soon! Please use ").concat(p," instead."))}function f(v,p){var b=arguments,g=!1;return function(){g||(v.apply(void 0,(0,t.default)(b)),g=!0,setTimeout(function(){g=!1},p))}}var w=["error","src","srcObject","currentSrc","crossOrigin","networkState","preload","buffered","readyState","seeking","currentTime","duration","paused","defaultPlaybackRate","playbackRate","played","seekable","ended","autoplay","loop","mediaGroup","controller","controls","volume","muted","defaultMuted","audioTracks","videoTracks","textTracks","width","height","videoWidth","videoHeight","poster"];return rr.mediaProperties=w,rr}var Nw;function VE(){return Nw||(Nw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(mi()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=hr(),v={actions:_.default.object,player:_.default.object,children:_.default.any,startTime:_.default.number,loop:_.default.bool,muted:_.default.bool,autoPlay:_.default.bool,playsInline:_.default.bool,src:_.default.string,poster:_.default.string,className:_.default.string,preload:_.default.oneOf(["auto","metadata","none"]),crossOrigin:_.default.string,onLoadStart:_.default.func,onWaiting:_.default.func,onCanPlay:_.default.func,onCanPlayThrough:_.default.func,onPlaying:_.default.func,onEnded:_.default.func,onSeeking:_.default.func,onSeeked:_.default.func,onPlay:_.default.func,onPause:_.default.func,onProgress:_.default.func,onDurationChange:_.default.func,onError:_.default.func,onSuspend:_.default.func,onAbort:_.default.func,onEmptied:_.default.func,onStalled:_.default.func,onLoadedMetadata:_.default.func,onLoadedData:_.default.func,onTimeUpdate:_.default.func,onRateChange:_.default.func,onVolumeChange:_.default.func,onResize:_.default.func},p=function(b){(0,y.default)(g,b);function g(m){var h;return(0,i.default)(this,g),h=(0,a.default)(this,(0,l.default)(g).call(this,m)),h.video=null,h.play=h.play.bind((0,d.default)(h)),h.pause=h.pause.bind((0,d.default)(h)),h.seek=h.seek.bind((0,d.default)(h)),h.forward=h.forward.bind((0,d.default)(h)),h.replay=h.replay.bind((0,d.default)(h)),h.toggleFullscreen=h.toggleFullscreen.bind((0,d.default)(h)),h.getProperties=h.getProperties.bind((0,d.default)(h)),h.renderChildren=h.renderChildren.bind((0,d.default)(h)),h.handleLoadStart=h.handleLoadStart.bind((0,d.default)(h)),h.handleCanPlay=h.handleCanPlay.bind((0,d.default)(h)),h.handleCanPlayThrough=h.handleCanPlayThrough.bind((0,d.default)(h)),h.handlePlay=h.handlePlay.bind((0,d.default)(h)),h.handlePlaying=h.handlePlaying.bind((0,d.default)(h)),h.handlePause=h.handlePause.bind((0,d.default)(h)),h.handleEnded=h.handleEnded.bind((0,d.default)(h)),h.handleWaiting=h.handleWaiting.bind((0,d.default)(h)),h.handleSeeking=h.handleSeeking.bind((0,d.default)(h)),h.handleSeeked=h.handleSeeked.bind((0,d.default)(h)),h.handleFullscreenChange=h.handleFullscreenChange.bind((0,d.default)(h)),h.handleError=h.handleError.bind((0,d.default)(h)),h.handleSuspend=h.handleSuspend.bind((0,d.default)(h)),h.handleAbort=h.handleAbort.bind((0,d.default)(h)),h.handleEmptied=h.handleEmptied.bind((0,d.default)(h)),h.handleStalled=h.handleStalled.bind((0,d.default)(h)),h.handleLoadedMetaData=h.handleLoadedMetaData.bind((0,d.default)(h)),h.handleLoadedData=h.handleLoadedData.bind((0,d.default)(h)),h.handleTimeUpdate=h.handleTimeUpdate.bind((0,d.default)(h)),h.handleRateChange=h.handleRateChange.bind((0,d.default)(h)),h.handleVolumeChange=h.handleVolumeChange.bind((0,d.default)(h)),h.handleDurationChange=h.handleDurationChange.bind((0,d.default)(h)),h.handleProgress=(0,w.throttle)(h.handleProgress.bind((0,d.default)(h)),250),h.handleKeypress=h.handleKeypress.bind((0,d.default)(h)),h.handleTextTrackChange=h.handleTextTrackChange.bind((0,d.default)(h)),h}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.forceUpdate(),this.video&&this.video.textTracks&&(this.video.textTracks.onaddtrack=this.handleTextTrackChange,this.video.textTracks.onremovetrack=this.handleTextTrackChange)}},{key:"getProperties",value:function(){var h=this;return this.video?w.mediaProperties.reduce(function(T,x){return T[x]=h.video[x],T},{}):null}},{key:"handleTextTrackChange",value:function(){var h=this.props,T=h.actions,x=h.player;if(this.video&&this.video.textTracks){var k=Array.from(this.video.textTracks).find(function(A){return A.mode==="showing"});k!==x.activeTextTrack&&T.activateTextTrack(k)}}},{key:"play",value:function(){var h=this.video.play();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"pause",value:function(){var h=this.video.pause();h!==void 0&&h.catch(function(){}).then(function(){})}},{key:"load",value:function(){this.video.load()}},{key:"addTextTrack",value:function(){var h;(h=this.video).addTextTrack.apply(h,arguments)}},{key:"canPlayType",value:function(){var h;(h=this.video).canPlayType.apply(h,arguments)}},{key:"togglePlay",value:function(){this.video.paused?this.play():this.pause()}},{key:"seek",value:function(h){try{this.video.currentTime=h}catch{}}},{key:"forward",value:function(h){this.seek(this.video.currentTime+h)}},{key:"replay",value:function(h){this.forward(-h)}},{key:"toggleFullscreen",value:function(){var h=this.props,T=h.player,x=h.actions;x.toggleFullscreen(T)}},{key:"handleLoadStart",value:function(){var h=this.props,T=h.actions,x=h.onLoadStart;T.handleLoadStart(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlay",value:function(){var h=this.props,T=h.actions,x=h.onCanPlay;T.handleCanPlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleCanPlayThrough",value:function(){var h=this.props,T=h.actions,x=h.onCanPlayThrough;T.handleCanPlayThrough(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlaying",value:function(){var h=this.props,T=h.actions,x=h.onPlaying;T.handlePlaying(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePlay",value:function(){var h=this.props,T=h.actions,x=h.onPlay;T.handlePlay(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handlePause",value:function(){var h=this.props,T=h.actions,x=h.onPause;T.handlePause(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleDurationChange",value:function(){var h=this.props,T=h.actions,x=h.onDurationChange;T.handleDurationChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleProgress",value:function(){var h=this.props,T=h.actions,x=h.onProgress;this.video&&T.handleProgressChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEnded",value:function(){var h=this.props,T=h.loop,x=h.player,k=h.actions,A=h.onEnded;T?(this.seek(0),this.play()):x.paused||this.pause(),k.handleEnd(this.getProperties()),A&&A.apply(void 0,arguments)}},{key:"handleWaiting",value:function(){var h=this.props,T=h.actions,x=h.onWaiting;T.handleWaiting(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeking",value:function(){var h=this.props,T=h.actions,x=h.onSeeking;T.handleSeeking(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleSeeked",value:function(){var h=this.props,T=h.actions,x=h.onSeeked;T.handleSeeked(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleFullscreenChange",value:function(){}},{key:"handleSuspend",value:function(){var h=this.props,T=h.actions,x=h.onSuspend;T.handleSuspend(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleAbort",value:function(){var h=this.props,T=h.actions,x=h.onAbort;T.handleAbort(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleEmptied",value:function(){var h=this.props,T=h.actions,x=h.onEmptied;T.handleEmptied(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleStalled",value:function(){var h=this.props,T=h.actions,x=h.onStalled;T.handleStalled(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedMetaData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedMetadata,k=h.startTime;k&&k>0&&(this.video.currentTime=k),T.handleLoadedMetaData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleLoadedData",value:function(){var h=this.props,T=h.actions,x=h.onLoadedData;T.handleLoadedData(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleTimeUpdate",value:function(){var h=this.props,T=h.actions,x=h.onTimeUpdate;T.handleTimeUpdate(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleRateChange",value:function(){var h=this.props,T=h.actions,x=h.onRateChange;T.handleRateChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleVolumeChange",value:function(){var h=this.props,T=h.actions,x=h.onVolumeChange;T.handleVolumeChange(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleError",value:function(){var h=this.props,T=h.actions,x=h.onError;T.handleError(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleResize",value:function(){var h=this.props,T=h.actions,x=h.onResize;T.handleResize(this.getProperties()),x&&x.apply(void 0,arguments)}},{key:"handleKeypress",value:function(){}},{key:"renderChildren",value:function(){var h=this,T=(0,r.default)({},this.props,{video:this.video});return this.video?c.default.Children.toArray(this.props.children).filter(w.isVideoChild).map(function(x){var k;if(typeof x.type=="string"){if(x.type==="source"){k=(0,r.default)({},x.props);var A=k.onError;k.onError=function(){A&&A.apply(void 0,arguments),h.handleError.apply(h,arguments)}}}else k=T;return c.default.cloneElement(x,k)}):null}},{key:"render",value:function(){var h=this,T=this.props,x=T.loop,k=T.poster,A=T.preload,E=T.src,P=T.autoPlay,C=T.playsInline,N=T.muted,$=T.crossOrigin,F=T.videoId;return c.default.createElement("video",{className:(0,f.default)("video-react-video",this.props.className),id:F,crossOrigin:$,ref:function(U){h.video=U},muted:N,preload:A,loop:x,playsInline:C,autoPlay:P,poster:k,src:E,onLoadStart:this.handleLoadStart,onWaiting:this.handleWaiting,onCanPlay:this.handleCanPlay,onCanPlayThrough:this.handleCanPlayThrough,onPlaying:this.handlePlaying,onEnded:this.handleEnded,onSeeking:this.handleSeeking,onSeeked:this.handleSeeked,onPlay:this.handlePlay,onPause:this.handlePause,onProgress:this.handleProgress,onDurationChange:this.handleDurationChange,onError:this.handleError,onSuspend:this.handleSuspend,onAbort:this.handleAbort,onEmptied:this.handleEmptied,onStalled:this.handleStalled,onLoadedMetadata:this.handleLoadedMetaData,onLoadedData:this.handleLoadedData,onTimeUpdate:this.handleTimeUpdate,onRateChange:this.handleRateChange,onVolumeChange:this.handleVolumeChange,tabIndex:"-1"},this.renderChildren())}},{key:"playbackRate",get:function(){return this.video.playbackRate},set:function(h){this.video.playbackRate=h}},{key:"muted",get:function(){return this.video.muted},set:function(h){this.video.muted=h}},{key:"volume",get:function(){return this.video.volume},set:function(h){h>1&&(h=1),h<0&&(h=0),this.video.volume=h}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}}]),g}(c.Component);e.default=p,p.propTypes=v,p.displayName="Video"}(Wf)),Wf}var Vf={},Ow;function qE(){return Ow||(Ow=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={manager:y.default.object,className:y.default.string},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.timer=null,b.manager.subscribeToOperationStateChange(m.handleStateChange.bind((0,l.default)(m))),m.state={hidden:!0,operation:{}},m}return(0,i.default)(p,[{key:"handleStateChange",value:function(g,m){var h=this;g.count!==m.count&&g.operation.source==="shortcut"&&(this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({hidden:!1,count:g.count,operation:g.operation}),this.timer=setTimeout(function(){h.setState({hidden:!0}),h.timer=null},500))}},{key:"render",value:function(){if(this.state.operation.source!=="shortcut")return null;var g=this.state.hidden?{display:"none"}:null;return _.default.createElement("div",{className:(0,c.default)({"video-react-bezel":!0,"video-react-bezel-animation":this.state.count%2===0,"video-react-bezel-animation-alt":this.state.count%2===1},this.props.className),style:g,role:"status","aria-label":this.state.operation.action},_.default.createElement("div",{className:(0,c.default)("video-react-bezel-icon","video-react-bezel-icon-".concat(this.state.operation.action))}))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="Bezel"}(Vf)),Vf}var qf={},Wr={},Mw;function fd(){if(Mw)return Wr;Mw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.findElPosition=e,Wr.getPointerPosition=t,Wr.blurNode=n,Wr.focusNode=r,Wr.hasClass=i;function e(s){var a;if(s.getBoundingClientRect&&s.parentNode&&(a=s.getBoundingClientRect()),!a)return{left:0,top:0};var l=document,d=l.body,y=l.documentElement,_=y.clientLeft||d.clientLeft||0,c=window.pageXOffset||d.scrollLeft,f=a.left+c-_,w=y.clientTop||d.clientTop||0,v=window.pageYOffset||d.scrollTop,p=a.top+v-w;return{left:Math.round(f),top:Math.round(p)}}function t(s,a){var l={},d=e(s),y=s.offsetWidth,_=s.offsetHeight,c=d.top,f=d.left,w=a.pageY,v=a.pageX;return a.changedTouches&&(v=a.changedTouches[0].pageX,w=a.changedTouches[0].pageY),l.y=Math.max(0,Math.min(1,(c-w+_)/_)),l.x=Math.max(0,Math.min(1,(v-f)/y)),l}function n(s){s&&s.blur&&s.blur()}function r(s){s&&s.focus&&s.focus()}function i(s,a){for(var l=s.className.split(" "),d=0;d1&&(E=1),A.changeVolume(E,{action:"volume-up",source:"shortcut"})}},{keyCode:40,handle:function(k,A){var E=k.volume-.05;E<0&&(E=0);var P=E>0?"volume-down":"volume-off";A.changeVolume(E,{action:P,source:"shortcut"})}},{keyCode:190,shift:!0,handle:function(k,A){var E=k.playbackRate;E>=1.5?E=2:E>=1.25?E=1.5:E>=1?E=1.25:E>=.5?E=1:E>=.25?E=.5:E>=0&&(E=.25),A.changeRate(E,{action:"fast-forward",source:"shortcut"})}},{keyCode:188,shift:!0,handle:function(k,A){var E=k.playbackRate;E<=.5?E=.25:E<=1?E=.5:E<=1.25?E=1:E<=1.5?E=1.25:E<=2&&(E=1.5),A.changeRate(E,{action:"fast-rewind",source:"shortcut"})}}],T.shortcuts=(0,r.default)(T.defaultShortcuts),T.mergeShortcuts=T.mergeShortcuts.bind((0,d.default)(T)),T.handleKeyPress=T.handleKeyPress.bind((0,d.default)(T)),T.handleClick=T.handleClick.bind((0,d.default)(T)),T.handleDoubleClick=T.handleDoubleClick.bind((0,d.default)(T)),T}return(0,s.default)(g,[{key:"componentDidMount",value:function(){this.mergeShortcuts(),document.addEventListener("keydown",this.handleKeyPress),document.addEventListener("click",this.handleClick),document.addEventListener("dblclick",this.handleDoubleClick)}},{key:"componentDidUpdate",value:function(h){h.shortcuts!==this.props.shortcuts&&this.mergeShortcuts()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("click",this.handleClick),document.removeEventListener("dblclick",this.handleDoubleClick)}},{key:"mergeShortcuts",value:function(){var h=function(E){var P=E.keyCode,C=P===void 0?0:P,N=E.ctrl,$=N===void 0?!1:N,F=E.shift,z=F===void 0?!1:F,U=E.alt,H=U===void 0?!1:U;return"".concat(C,":").concat($,":").concat(z,":").concat(H)},T=this.defaultShortcuts.reduce(function(A,E){return Object.assign(A,(0,n.default)({},h(E),E))},{}),x=(this.props.shortcuts||[]).reduce(function(A,E){var P=E.keyCode,C=E.handle;return P&&typeof C=="function"?Object.assign(A,(0,n.default)({},h(E),E)):A},T),k=function(E){var P=0,C=["ctrl","shift","alt"];return C.forEach(function(N){E[N]&&P++}),P};this.shortcuts=Object.keys(x).map(function(A){return x[A]}).sort(function(A,E){return k(E)-k(A)})}},{key:"togglePlay",value:function(h,T){h.paused?T.play({action:"play",source:"shortcut"}):T.pause({action:"pause",source:"shortcut"})}},{key:"toggleFullscreen",value:function(h,T){T.toggleFullscreen(h)}},{key:"handleKeyPress",value:function(h){var T=this.props,x=T.player,k=T.actions;if(x.isActive&&!(document.activeElement&&((0,f.hasClass)(document.activeElement,"video-react-control")||(0,f.hasClass)(document.activeElement,"video-react-menu-button-active")||(0,f.hasClass)(document.activeElement,"video-react-big-play-button")))){var A=h.keyCode||h.which,E=h.ctrlKey||h.metaKey,P=h.shiftKey,C=h.altKey,N=this.shortcuts.filter(function($){return!(!$.keyCode||$.keyCode-A!==0||$.ctrl!==void 0&&$.ctrl!==E||$.shift!==void 0&&$.shift!==P||$.alt!==void 0&&$.alt!==C)})[0];N&&(N.handle(x,k),h.preventDefault())}}},{key:"canBeClicked",value:function(h,T){return!(!h.isActive||T.target.nodeName!=="VIDEO"||h.readyState!==4)}},{key:"handleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,A=T.clickable;!this.canBeClicked(x,h)||!A||this.togglePlay(x,k)}},{key:"handleDoubleClick",value:function(h){var T=this.props,x=T.player,k=T.actions,A=T.dblclickable;!this.canBeClicked(x,h)||!A||this.toggleFullscreen(x,k)}},{key:"render",value:function(){return null}}]),g}(_.Component);e.default=p,p.propTypes=w,p.defaultProps=v,p.displayName="Shortcut"}(qf)),qf}var Zf={},Gf={},ic={},Gj={get exports(){return ic},set exports(e){ic=e}},$w;function Na(){return $w||($w=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;ry&&(c=y);function w(h,T){var x=h/T||0;return"".concat((x>=1?1:x)*100,"%")}f.width=w(c,y);for(var v=[],p=0;p=1?1:N}},{key:"getNewTime",value:function(k){var A=this.props.player.duration,E=this.slider.calculateDistance(k),P=E*A;return P===A?P-.1:P}},{key:"handleMouseDown",value:function(){}},{key:"handleMouseUp",value:function(k){var A=this.props.actions,E=this.getNewTime(k);A.seek(E),A.handleEndSeeking(E)}},{key:"handleMouseMove",value:function(k){var A=this.props.actions,E=this.getNewTime(k);A.handleSeekingTime(E)}},{key:"stepForward",value:function(){var k=this.props.actions;k.forward(5)}},{key:"stepBack",value:function(){var k=this.props.actions;k.replay(5)}},{key:"render",value:function(){var k=this,A=this.props,E=A.player,P=E.currentTime,C=E.seekingTime,N=E.duration,$=E.buffered,F=A.mouseTime,z=C||P;return _.default.createElement(f.default,{ref:function(H){k.slider=H},label:"video progress bar",className:(0,c.default)("video-react-progress-holder",this.props.className),valuenow:(this.getPercent()*100).toFixed(2),valuetext:(0,b.formatTime)(z,N),onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,getPercent:this.getPercent,stepForward:this.stepForward,stepBack:this.stepBack},_.default.createElement(v.default,{buffered:$,currentTime:z,duration:N}),_.default.createElement(p.default,{duration:N,mouseTime:F}),_.default.createElement(w.default,{currentTime:z,duration:N}))}}]),T}(_.Component);e.default=m,m.propTypes=g,m.displayName="SeekBar"}(Yf)),Yf}var Hw;function QE(){return Hw||(Hw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=t(fd()),v=n(XE()),p={player:_.default.object,className:_.default.string},b=function(g){(0,y.default)(m,g);function m(h,T){var x;return(0,i.default)(this,m),x=(0,a.default)(this,(0,l.default)(m).call(this,h,T)),x.state={mouseTime:{time:null,position:0}},x.handleMouseMoveThrottle=x.handleMouseMove.bind((0,d.default)(x)),x}return(0,s.default)(m,[{key:"handleMouseMove",value:function(T){if(T.pageX){var x=this.props.player.duration,k=this.seekBar,A=w.getPointerPosition(k,T).x*x,E=T.pageX-w.findElPosition(k).left;this.setState({mouseTime:{time:A,position:E}})}}},{key:"render",value:function(){var T=this,x=this.props.className;return c.default.createElement("div",{onMouseMove:this.handleMouseMoveThrottle,className:(0,f.default)("video-react-progress-control video-react-control",x)},c.default.createElement(v.default,(0,r.default)({mouseTime:this.state.mouseTime,ref:function(A){T.seekBar=A}},this.props)))}}]),m}(c.Component);e.default=b,b.propTypes=p,b.displayName="ProgressControl"}(Gf)),Gf}var eh={},Ww;function JE(){return Ww||(Ww=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.handleClick=m.handleClick.bind((0,l.default)(m)),m}return(0,i.default)(p,[{key:"handleClick",value:function(){var g=this.props,m=g.actions,h=g.player;h.paused?m.play():m.pause()}},{key:"render",value:function(){var g=this,m=this.props,h=m.player,T=m.className,x=h.paused?"Play":"Pause";return _.default.createElement("button",{ref:function(A){g.button=A},className:(0,c.default)(T,{"video-react-play-control":!0,"video-react-control":!0,"video-react-button":!0,"video-react-paused":h.paused,"video-react-playing":!h.paused}),type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},x))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="PlayToggle"}(eh)),eh}var th={},nh={},Vw;function ex(){return Vw||(Vw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c={actions:y.default.object,className:y.default.string,seconds:y.default.oneOf([5,10,30])},f={seconds:10},w=function(p){var b=function(g){(0,d.default)(m,g);function m(h,T){var x;return(0,r.default)(this,m),x=(0,s.default)(this,(0,a.default)(m).call(this,h,T)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x}return(0,i.default)(m,[{key:"handleClick",value:function(){var T=this.props,x=T.actions,k=T.seconds;p==="forward"?x.forward(k):x.replay(k)}},{key:"render",value:function(){var T=this,x=this.props,k=x.seconds,A=x.className,E=["video-react-control","video-react-button","video-react-icon"];return E.push("video-react-icon-".concat(p,"-").concat(k),"video-react-".concat(p,"-control")),A&&E.push(A),_.default.createElement("button",{ref:function(C){T.button=C},className:E.join(" "),type:"button",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"".concat(p," ").concat(k," seconds")))}}]),m}(_.Component);return b.propTypes=c,b.defaultProps=f,b};e.default=w}(nh)),nh}var qw;function tx(){return qw||(qw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ex()),r=(0,n.default)("forward");r.displayName="ForwardControl";var i=r;e.default=i}(th)),th}var rh={},Zw;function nx(){return Zw||(Zw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(ex()),r=(0,n.default)("replay");r.displayName="ReplayControl";var i=r;e.default=i}(rh)),rh}var ih={},Gw;function rx(){return Gw||(Gw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={actions:y.default.object,player:y.default.object,className:y.default.string},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.handleClick=m.handleClick.bind((0,l.default)(m)),m}return(0,i.default)(p,[{key:"handleClick",value:function(){var g=this.props,m=g.player,h=g.actions;h.toggleFullscreen(m)}},{key:"render",value:function(){var g=this,m=this.props,h=m.player,T=m.className;return _.default.createElement("button",{className:(0,c.default)(T,{"video-react-icon-fullscreen-exit":h.isFullscreen,"video-react-icon-fullscreen":!h.isFullscreen},"video-react-fullscreen-control video-react-control video-react-button video-react-icon"),ref:function(k){g.button=k},type:"button",tabIndex:"0",onClick:this.handleClick},_.default.createElement("span",{className:"video-react-control-text"},"Non-Fullscreen"))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="FullscreenToggle"}(ih)),ih}var oh={},Yw;function ix(){return Yw||(Yw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s=hr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=f-c,p=(0,s.formatTime)(v);return r.default.createElement("div",{className:(0,i.default)("video-react-remaining-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-remaining-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Remaining Time "),"-".concat(p)))}l.propTypes=a,l.displayName="RemainingTimeDisplay";var d=l;e.default=d}(oh)),oh}var sh={},Kw;function ox(){return Kw||(Kw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s=hr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player,c=_.currentTime,f=_.duration,w=y.className,v=(0,s.formatTime)(c,f);return r.default.createElement("div",{className:(0,i.default)("video-react-current-time video-react-time-control video-react-control",w)},r.default.createElement("div",{className:"video-react-current-time-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Current Time "),v))}l.propTypes=a,l.displayName="CurrentTimeDisplay";var d=l;e.default=d}(sh)),sh}var ah={},Xw;function sx(){return Xw||(Xw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s=hr(),a={player:n.default.object,className:n.default.string};function l(y){var _=y.player.duration,c=y.className,f=(0,s.formatTime)(_);return r.default.createElement("div",{className:(0,i.default)(c,"video-react-duration video-react-time-control video-react-control")},r.default.createElement("div",{className:"video-react-duration-display","aria-live":"off"},r.default.createElement("span",{className:"video-react-control-text"},"Duration Time "),f))}l.propTypes=a,l.displayName="DurationDisplay";var d=l;e.default=d}(ah)),ah}var lh={},Qw;function ax(){return Qw||(Qw=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(De()),r=t(ee),i=t(Ze()),s={separator:n.default.string,className:n.default.string};function a(l){var d=l.separator,y=l.className,_=d||"/";return r.default.createElement("div",{className:(0,i.default)("video-react-time-control video-react-time-divider",y),dir:"ltr"},r.default.createElement("div",null,r.default.createElement("span",null,_)))}a.propTypes=s,a.displayName="TimeDivider"}(lh)),lh}var uh={},ch={},dh={},Jw;function lx(){return Jw||(Jw=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(mi()),s=n(ot()),a=n(st()),l=n(gt()),d=n(vt()),y=n(mt()),_=n(yt()),c=n(De()),f=t(ee),w=n(Ze()),v={tagName:c.default.string,onClick:c.default.func.isRequired,onFocus:c.default.func,onBlur:c.default.func,className:c.default.string},p={tagName:"div"},b=function(g){(0,_.default)(m,g);function m(h,T){var x;return(0,s.default)(this,m),x=(0,l.default)(this,(0,d.default)(m).call(this,h,T)),x.handleClick=x.handleClick.bind((0,y.default)(x)),x.handleFocus=x.handleFocus.bind((0,y.default)(x)),x.handleBlur=x.handleBlur.bind((0,y.default)(x)),x.handleKeypress=x.handleKeypress.bind((0,y.default)(x)),x}return(0,a.default)(m,[{key:"componentWillUnmount",value:function(T){this.handleBlur(T)}},{key:"handleKeypress",value:function(T){(T.which===32||T.which===13)&&(T.preventDefault(),this.handleClick(T))}},{key:"handleClick",value:function(T){var x=this.props.onClick;x(T)}},{key:"handleFocus",value:function(T){document.addEventListener("keydown",this.handleKeypress),this.props.onFocus&&this.props.onFocus(T)}},{key:"handleBlur",value:function(T){document.removeEventListener("keydown",this.handleKeypress),this.props.onBlur&&this.props.onBlur(T)}},{key:"render",value:function(){var T=this.props.tagName,x=(0,i.default)({},this.props);return delete x.tagName,delete x.className,f.default.createElement(T,(0,r.default)({className:(0,w.default)(this.props.className),role:"button",tabIndex:"0",onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},x))}}]),m}(f.Component);e.default=b,b.propTypes=v,b.defaultProps=p,b.displayName="ClickableComponent"}(dh)),dh}var fh={},eb;function Yj(){return eb||(eb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c={player:y.default.object,children:y.default.any},f=function(w){(0,d.default)(v,w);function v(p,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,p,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){var b=this.props.children;return _.default.createElement("div",{className:"video-react-menu",onClick:this.handleClick},_.default.createElement("div",{className:"video-react-menu-content"},b))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Popup"}(fh)),fh}var tb;function Kj(){return tb||(tb=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var n=t(Na()),r=t(mi()),i=t(De()),s=t(ee),a=t(Ze()),l=t(lx()),d=t(Yj()),y={inline:i.default.bool,onClick:i.default.func.isRequired,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string},_={inline:!0};function c(f){var w=f.inline,v=f.className,p=(0,r.default)({},f);return delete p.children,delete p.inline,delete p.className,s.default.createElement(l.default,(0,n.default)({className:(0,a.default)(v,{"video-react-menu-button-inline":!!w,"video-react-menu-button-popup":!w},"video-react-control video-react-button video-react-menu-button")},p),s.default.createElement(d.default,f))}c.propTypes=y,c.defaultProps=_,c.displayName="PopupButton"}(ch)),ch}var hh={},ph={},nb;function Xj(){return nb||(nb=1,function(e){var t=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(De()),r=t(ee),i=t(Ze()),s={percentage:n.default.string,vertical:n.default.bool,className:n.default.string},a={percentage:"100%",vertical:!1};function l(y){var _=y.percentage,c=y.vertical,f=y.className,w={};return c?w.height=_:w.width=_,r.default.createElement("div",{className:(0,i.default)(f,"video-react-volume-level"),style:w},r.default.createElement("span",{className:"video-react-control-text"}))}l.propTypes=s,l.defaultProps=a,l.displayName="VolumeLevel";var d=l;e.default=d}(ph)),ph}var rb;function Qj(){return rb||(rb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=n(gv()),v=n(Xj()),p={actions:_.default.object,player:_.default.object,className:_.default.string,onFocus:_.default.func,onBlur:_.default.func},b=function(m){(0,y.default)(h,m);function h(T,x){var k;return(0,i.default)(this,h),k=(0,a.default)(this,(0,l.default)(h).call(this,T,x)),k.state={percentage:"0%"},k.handleMouseMove=k.handleMouseMove.bind((0,d.default)(k)),k.handlePercentageChange=k.handlePercentageChange.bind((0,d.default)(k)),k.checkMuted=k.checkMuted.bind((0,d.default)(k)),k.getPercent=k.getPercent.bind((0,d.default)(k)),k.stepForward=k.stepForward.bind((0,d.default)(k)),k.stepBack=k.stepBack.bind((0,d.default)(k)),k.handleFocus=k.handleFocus.bind((0,d.default)(k)),k.handleBlur=k.handleBlur.bind((0,d.default)(k)),k.handleClick=k.handleClick.bind((0,d.default)(k)),k}return(0,s.default)(h,[{key:"componentDidMount",value:function(){}},{key:"getPercent",value:function(){var x=this.props.player;return x.muted?0:x.volume}},{key:"checkMuted",value:function(){var x=this.props,k=x.player,A=x.actions;k.muted&&A.mute(!1)}},{key:"handleMouseMove",value:function(x){var k=this.props.actions;this.checkMuted();var A=this.slider.calculateDistance(x);k.changeVolume(A)}},{key:"stepForward",value:function(){var x=this.props,k=x.player,A=x.actions;this.checkMuted(),A.changeVolume(k.volume+.1)}},{key:"stepBack",value:function(){var x=this.props,k=x.player,A=x.actions;this.checkMuted(),A.changeVolume(k.volume-.1)}},{key:"handleFocus",value:function(x){this.props.onFocus&&this.props.onFocus(x)}},{key:"handleBlur",value:function(x){this.props.onBlur&&this.props.onBlur(x)}},{key:"handlePercentageChange",value:function(x){x!==this.state.percentage&&this.setState({percentage:x})}},{key:"handleClick",value:function(x){x.stopPropagation()}},{key:"render",value:function(){var x=this,k=this.props,A=k.player,E=k.className,P=(A.volume*100).toFixed(2);return c.default.createElement(w.default,(0,r.default)({ref:function(N){x.slider=N},label:"volume level",valuenow:P,valuetext:"".concat(P,"%"),onMouseMove:this.handleMouseMove,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,sliderActive:this.handleFocus,sliderInactive:this.handleBlur,getPercent:this.getPercent,onPercentageChange:this.handlePercentageChange,stepForward:this.stepForward,stepBack:this.stepBack},this.props,{className:(0,f.default)(E,"video-react-volume-bar video-react-slider-bar")}),c.default.createElement(v.default,this.props))}}]),h}(c.Component);b.propTypes=p,b.displayName="VolumeBar";var g=b;e.default=g}(hh)),hh}var ib;function ux(){return ib||(ib=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(Na()),i=n(ot()),s=n(st()),a=n(gt()),l=n(vt()),d=n(mt()),y=n(yt()),_=n(De()),c=t(ee),f=n(Ze()),w=n(Kj()),v=n(Qj()),p={player:_.default.object,actions:_.default.object,vertical:_.default.bool,className:_.default.string,alwaysShowVolume:_.default.bool},b={vertical:!1},g=function(h){(0,y.default)(T,h);function T(x,k){var A;return(0,i.default)(this,T),A=(0,a.default)(this,(0,l.default)(T).call(this,x,k)),A.state={active:!1},A.handleClick=A.handleClick.bind((0,d.default)(A)),A.handleFocus=A.handleFocus.bind((0,d.default)(A)),A.handleBlur=A.handleBlur.bind((0,d.default)(A)),A}return(0,s.default)(T,[{key:"handleClick",value:function(){var k=this.props,A=k.player,E=k.actions;E.mute(!A.muted)}},{key:"handleFocus",value:function(){this.setState({active:!0})}},{key:"handleBlur",value:function(){this.setState({active:!1})}},{key:"render",value:function(){var k=this.props,A=k.vertical,E=k.player,P=k.className,C=!A,N=this.volumeLevel;return c.default.createElement(w.default,{className:(0,f.default)(P,{"video-react-volume-menu-button-vertical":A,"video-react-volume-menu-button-horizontal":!A,"video-react-vol-muted":E.muted,"video-react-vol-0":N===0&&!E.muted,"video-react-vol-1":N===1,"video-react-vol-2":N===2,"video-react-vol-3":N===3,"video-react-slider-active":this.props.alwaysShowVolume||this.state.active,"video-react-lock-showing":this.props.alwaysShowVolume||this.state.active},"video-react-volume-menu-button"),onClick:this.handleClick,inline:C},c.default.createElement(v.default,(0,r.default)({onFocus:this.handleFocus,onBlur:this.handleBlur},this.props)))}},{key:"volumeLevel",get:function(){var k=this.props.player,A=k.volume,E=k.muted,P=3;return A===0||E?P=0:A<.33?P=1:A<.67&&(P=2),P}}]),T}(c.Component);g.propTypes=p,g.defaultProps=b,g.displayName="VolumeMenuButton";var m=g;e.default=m}(uh)),uh}var mh={},gh={},vh={},ob;function Jj(){return ob||(ob=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c={children:y.default.any},f=function(w){(0,d.default)(v,w);function v(p,b){var g;return(0,r.default)(this,v),g=(0,s.default)(this,(0,a.default)(v).call(this,p,b)),g.handleClick=g.handleClick.bind((0,l.default)(g)),g}return(0,i.default)(v,[{key:"handleClick",value:function(b){b.preventDefault()}},{key:"render",value:function(){return _.default.createElement("div",{className:"video-react-menu video-react-lock-showing",role:"presentation",onClick:this.handleClick},_.default.createElement("ul",{className:"video-react-menu-content"},this.props.children))}}]),v}(_.Component);e.default=f,f.propTypes=c,f.displayName="Menu"}(vh)),vh}var yh={},sb;function e4(){return sb||(sb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f={item:y.default.object,index:y.default.number,activateIndex:y.default.number,onSelectItem:y.default.func},w=function(v){(0,d.default)(p,v);function p(b,g){var m;return(0,r.default)(this,p),m=(0,s.default)(this,(0,a.default)(p).call(this,b,g)),m.handleClick=m.handleClick.bind((0,l.default)(m)),m}return(0,i.default)(p,[{key:"handleClick",value:function(){var g=this.props,m=g.index,h=g.onSelectItem;h(m)}},{key:"render",value:function(){var g=this.props,m=g.item,h=g.index,T=g.activateIndex;return _.default.createElement("li",{className:(0,c.default)({"video-react-menu-item":!0,"video-react-selected":h===T}),role:"menuitem",onClick:this.handleClick},m.label,_.default.createElement("span",{className:"video-react-control-text"}))}}]),p}(_.Component);e.default=w,w.propTypes=f,w.displayName="MenuItem"}(yh)),yh}var ab;function vv(){return ab||(ab=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f=n(Jj()),w=n(e4()),v=n(lx()),p={inline:y.default.bool,items:y.default.array,className:y.default.string,onSelectItem:y.default.func,children:y.default.any,selectedIndex:y.default.number},b=function(g){(0,d.default)(m,g);function m(h,T){var x;return(0,r.default)(this,m),x=(0,s.default)(this,(0,a.default)(m).call(this,h,T)),x.state={active:!1,activateIndex:h.selectedIndex||0},x.commitSelection=x.commitSelection.bind((0,l.default)(x)),x.activateMenuItem=x.activateMenuItem.bind((0,l.default)(x)),x.handleClick=x.handleClick.bind((0,l.default)(x)),x.renderMenu=x.renderMenu.bind((0,l.default)(x)),x.handleFocus=x.handleFocus.bind((0,l.default)(x)),x.handleBlur=x.handleBlur.bind((0,l.default)(x)),x.handleUpArrow=x.handleUpArrow.bind((0,l.default)(x)),x.handleDownArrow=x.handleDownArrow.bind((0,l.default)(x)),x.handleEscape=x.handleEscape.bind((0,l.default)(x)),x.handleReturn=x.handleReturn.bind((0,l.default)(x)),x.handleTab=x.handleTab.bind((0,l.default)(x)),x.handleKeyPress=x.handleKeyPress.bind((0,l.default)(x)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x.handleIndexChange=x.handleIndexChange.bind((0,l.default)(x)),x}return(0,i.default)(m,[{key:"componentDidUpdate",value:function(T){T.selectedIndex!==this.props.selectedIndex&&this.activateMenuItem(this.props.selectedIndex)}},{key:"commitSelection",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"activateMenuItem",value:function(T){this.setState({activateIndex:T}),this.handleIndexChange(T)}},{key:"handleIndexChange",value:function(T){var x=this.props.onSelectItem;x(T)}},{key:"handleClick",value:function(){this.setState(function(T){return{active:!T.active}})}},{key:"handleFocus",value:function(){document.addEventListener("keydown",this.handleKeyPress)}},{key:"handleBlur",value:function(){this.setState({active:!1}),document.removeEventListener("keydown",this.handleKeyPress)}},{key:"handleUpArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex-1;k<0&&(k=x.length?x.length-1:0),this.activateMenuItem(k)}}},{key:"handleDownArrow",value:function(T){var x=this.props.items;if(this.state.active){T.preventDefault();var k=this.state.activateIndex+1;k>=x.length&&(k=0),this.activateMenuItem(k)}}},{key:"handleTab",value:function(T){this.state.active&&(T.preventDefault(),this.commitSelection(this.state.activateIndex))}},{key:"handleReturn",value:function(T){T.preventDefault(),this.state.active?this.commitSelection(this.state.activateIndex):this.setState({active:!0})}},{key:"handleEscape",value:function(){this.setState({active:!1,activateIndex:0})}},{key:"handleKeyPress",value:function(T){T.which===27?this.handleEscape(T):T.which===9?this.handleTab(T):T.which===13?this.handleReturn(T):T.which===38?this.handleUpArrow(T):T.which===40&&this.handleDownArrow(T)}},{key:"handleSelectItem",value:function(T){this.commitSelection(T)}},{key:"renderMenu",value:function(){var T=this;if(!this.state.active)return null;var x=this.props.items;return _.default.createElement(f.default,null,x.map(function(k,A){return _.default.createElement(w.default,{item:k,index:A,onSelectItem:T.handleSelectItem,activateIndex:T.state.activateIndex,key:"item-".concat(A++)})}))}},{key:"render",value:function(){var T=this,x=this.props,k=x.inline,A=x.className;return _.default.createElement(v.default,{className:(0,c.default)(A,{"video-react-menu-button-inline":!!k,"video-react-menu-button-popup":!k,"video-react-menu-button-active":this.state.active},"video-react-control video-react-button video-react-menu-button"),role:"button",tabIndex:"0",ref:function(P){T.menuButton=P},onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},this.props.children,this.renderMenu())}}]),m}(_.Component);e.default=b,b.propTypes=p,b.displayName="MenuButton"}(gh)),gh}var lb;function yv(){return lb||(lb=1,function(e){var t=nt,n=ke;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(ot()),i=n(st()),s=n(gt()),a=n(vt()),l=n(mt()),d=n(yt()),y=n(De()),_=t(ee),c=n(Ze()),f=n(vv()),w={player:y.default.object,actions:y.default.object,rates:y.default.array,className:y.default.string},v={rates:[2,1.5,1.25,1,.5,.25]},p=function(g){(0,d.default)(m,g);function m(h,T){var x;return(0,r.default)(this,m),x=(0,s.default)(this,(0,a.default)(m).call(this,h,T)),x.handleSelectItem=x.handleSelectItem.bind((0,l.default)(x)),x}return(0,i.default)(m,[{key:"handleSelectItem",value:function(T){var x=this.props,k=x.rates,A=x.actions;T>=0&&Tt.text()).then(t=>{if(t.length<=0)throw new Error;this.setState({md:_e(t)})}).catch(()=>{this.setState({error:!0})})}render(){return this.state.md&&!this.state.error?M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:this.state.md}}):this.state.error?this.props.unloader||M("div",{children:"Error: couldn't load source"}):this.props.loader}}fx.propTypes={loader:Tr.func,unloader:Tr.func.isRequired,path:Tr.string.isRequired};const mb=({small:e})=>ie("div",{className:`spinner ${e?"small":""}`,children:[M("div",{className:"double-bounce-overlay"}),M("div",{className:"double-bounce"})]}),gb=({failedUrls:e})=>M("div",{className:"no-source-container",children:ie("div",{className:"no-source-row",children:[M("p",{children:M("i",{className:"material-icons no-source-icon",children:"error"})}),M("p",{children:"No media found, as the original media has not yet been uploaded to the platform."})]})}),f4=({media:e,viewIdx:t,translations:n,switchLanguage:r,langIdx:i})=>{const s=document.querySelector(".source-media-gallery"),a=s?s.getBoundingClientRect().width:0;function l(d){const{path:y,type:_,poster:c}=d;switch(_){case"Image":return M("div",{className:"source-image-container",children:M(d4,{className:"source-image",src:y,loader:M("div",{className:"source-image-loader",children:M(mb,{})}),unloader:M(gb,{failedUrls:[y]}),onClick:()=>window.open(y,"_blank")})});case"Video":return ie("div",{className:"media-player",children:[M("div",{className:"banner-trans right-overlay",children:n?n.map((f,w)=>i!==w+1?M("div",{className:"trans-button",onClick:()=>r(w+1),children:f.code}):M("div",{className:"trans-button",onClick:()=>r(0),children:"EN"})):null}),M(hv.Player,{poster:c,className:"source-video",playsInline:!0,src:y})]});case"Text":return M("div",{className:"source-text-container",children:M(fx,{path:y,loader:M(mb,{}),unloader:()=>this.renderError()})});case"Document":return M("iframe",{title:y,className:"source-document",src:y});default:return M(gb,{failedUrls:[`Application does not support extension: ${y.split(".")[1]}`]})}}return M("div",{className:"source-media-gallery",style:{transform:`translate(${t*-a}px)`},children:e.map(d=>l(d))})},h4=({viewIdx:e,paths:t,onShiftHandler:n})=>{const r=e!==0?M("div",{className:"back",onClick:()=>n(-1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_left"})})}):null,i=en(1),children:M("div",{className:"centerer",children:M("i",{className:"material-icons",children:"arrow_right"})})}):null;return t.length>1?ie("div",{className:"media-gallery-controls",children:[r,i]}):M("div",{className:"media-gallery-controls"})};class hx extends ee.Component{constructor(){super(),this.state={mediaIdx:0,langIdx:0},this.onShiftGallery=this.onShiftGallery.bind(this)}getTypeCounts(t){return t.reduce((n,r)=>(n[r.type]+=1,n),{Image:0,Video:0,Text:0})}onShiftGallery(t){this.state.mediaIdx===0&&t===-1||this.state.mediaIdx===this.props.source.paths.length-1&&t===1||this.setState({mediaIdx:this.state.mediaIdx+t})}switchLanguage(t){this.setState({langIdx:t})}renderContent(t){const{url:n,title:r,paths:i,date:s,type:a,poster:l,description:d}=t,y=r.substring(0,100);return ie(Ln,{children:[ie("div",{className:"mo-banner",children:[M("div",{className:"mo-banner-close",onClick:this.props.onCancel,children:M("i",{className:"material-icons",children:"close"})}),M("h3",{className:"mo-banner-content",children:y})]}),M("div",{className:"mo-container",onClick:_=>_.stopPropagation(),children:M("div",{className:"mo-media-container",children:M(f4,{switchLanguage:_=>this.switchLanguage(_),translations:this.props.translations,langIdx:this.state.langIdx,media:i.map(_=>oD(_,l)),viewIdx:this.state.mediaIdx})})}),ie("div",{className:"mo-footer",children:[M(h4,{paths:i,viewIdx:this.state.mediaIdx,onShiftHandler:this.onShiftGallery}),ie("div",{className:"mo-meta-container",children:[d?M("div",{className:"mo-box-desc",children:M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(d)}})}):null,a||s||n?ie("div",{className:"mo-box",children:[ie("div",{children:[a?M("h4",{children:"Evidence type"}):null,a?ie("p",{children:[M("i",{className:"material-icons left",children:"perm_media"}),a]}):null]}),ie("div",{children:[s?M("h4",{children:"Date Published"}):null,s?ie("p",{children:[M("i",{className:"material-icons left",children:"today"}),s]}):null]}),ie("div",{children:[n?M("h4",{children:"Link"}):null,n?ie("span",{children:[M("i",{className:"material-icons left",children:"link"}),M("a",{href:n,target:"_blank",rel:"noreferrer",children:"Link to original URL"})]}):null]})]}):null]})]})]})}renderIntlContent(){const{langIdx:t}=this.state,{translations:n,source:r}=this.props;let i=null;return n&&n.length&&t>0&&(i=n[t-1]),i&&(i={...i,poster:r.poster,paths:i.file?[i.file]:i.paths}),this.renderContent(t===0?r:i)}render(){return typeof this.props.source!="object"?this.renderError():M("div",{className:`mo-overlay ${this.props.opaque?"opaque":""}`,children:this.renderIntlContent()})}}const p4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEUAAAD////8/PwEBAT5+fltbW3w8PAICAj19fXS0tKlpaUQEBB5eXmioqL09PTGxsaMjIzd3d3q6uo3NzfAwMB/f3/k5ORkZGQrKytNTU0fHx9VVVWPj4+4uLhbW1vR0dGXl5cnJydxcXGwsLA+Pj5GRkYZGRkwMDBPT09YWFiFhYVwONfZAAAHtklEQVR4nO2diXbaOhCGtWEwuw2YhABhCdDy/g94NbItCULaNIhjMXe+tpykp9XRnxlJo2UkxgiCIAiCIAiCIAiCIAiCIAiCIAhkSAmfve1k24Mv2uX3mNCCjrNpViR5Np31UEpsDzqcC4Dz4aDH0Cmc51xLM3+AvKUl4hEp22ynjPEsQu0YIoWMrSv3tHSUmGNy1G2ihP7lKdQmTV4YDoVS++iK++pqVmgUstfhhYfWTbHzq+m6hUHbaXDThIJ3m65bICTLbugDsqarForjLQvC6K8WTVctCLoZfqnw0HTlgiDZ241uppT41nTlgiDZr68UKiSdKZvc9lI9XEyarlooki/60qTpioVBj/jTLxROm65bGHTQ1ufiRlAjeL/puoVBxzTt7GZQk7WbrlsgtJvO9Vzis8I5ksjbWLHLr+aH+usBGoGGkVCeGXU4I0YMk0ItZXVlwyn8LR6Juj9l/cTzUHVmqFaiAC3mnJY9qkrPTdfmERh7TeazcX+NJla7wvdJXO5ZYQTCh0TVhxIEQRAEQRAEQYTGmx8iW76ouFyVwajQnMlw3zRXj8ch2TxLK5ZNV+ZBtOxqKZZDGNeQwueHFD4/pPD5qRUKvmm6Kg/C2RDniC/ZzCocN12ZhyDZ0nopVhuOkdsQjgrX7JquyoPoWoWtpqvyIEa2HeI4OfsJmVmFp6br8hgWuVXYdFUegmQHjlshYzvb0WQ412lsR4MnHeiKiTsLvcSnENZKl/YUrXjDqJAdc3s2MenhU9iWrOvSD1fITn2Z014miRRrVGqOsm3taC940Wu6SoEBG7bfbRK34OgOl0KTmzqBAk0OQkm5pzblVSOEz3nTdQpLJdAaUKCLZ0Dg3muDIsO2dwhpCH6+TOeAaSw0bVD3otZDlRLrpisVFi1wkblOVMel6HoZts1srCYUZOMhclHTi04KLlwvo2aYehnTBg91qFZevINsCVG22VvHBduCJ8gmhVrMeuhnqxWv6Fx03nFdjOAZrlwnmC71rf2UUvz92HSdwqLb4FIoZ0O+R5bLpcVstC47EPINKoFmMrGsY22hexuFbDtUGgt6gUwHVyBTuajnoR09DLbxzOolLBsOeBWq6dkgz16arlNYLpe2tSXTBcNjP0C3t5mw813Fpz0mcSlss7lwwwSc7cJ0h6cJ1d6ch3ZgXRSPPFaGaie7+6J9dYxqnAe0mlTYUE1s0GVVmMsD3TDRxZc3It3RQwXrvrjaoMHtYgtY923jU+gu9BKdF3QuanxU2VWnPjoXBXvl5aoMfE6RhWoAnB1VVUcq8i1ChWyRq9qGZmUbm5cydr7oRxHSs/foCmy7LxUtuwnKi6brEh4Iud2hPD2jwNcG9ZwisTZMjvgUSkgVsSvc2A4iAFrhSlgb7rBNCgHJhvVIwXNka2sGyT7cUPEepMjZoKL7GqS8O5HecM83QYqsz2/wWO7h3TuFv4MU6FJPIlFoR0PR+QhZoIhGoTuQkIXZCY1NYdvd8xymo2Epr48yxhHkTlzINgpTYsarqSaP45TYwSlchSmxCgL1RxxJbmuncBCkwJ6yB27jCCBcijbfBCnwo1rUEkLFcei9H1ShlHa2qYPA+8sLQXCFS163w0B9872EVcj8teV9kPLuxlMYoKeR7OiyaSM5qOL1NEF+5gcXQYQJc+/GGy2CjPjWJ6LJpnUjvkhDlOeWtWJZel1YgSLEFP+U25XJMAFEALxHDwLMyfsuASWaR0xS1xBn95fmnDSP5FSq9Of40zuf5ZDsw+5hmcJiwFunUSJf3LWaKCGb1u5DtqJZmfS6GqjVHSVJ1ha8VlgsYrGhZIVTeFcWs3lUSNX7kJuIznMM3Kr+8J5rS6Qfz6iYLkBZey/h3ncVm7eJFWi9IBCZl0R5z6R17PYheVwveLqaKfMg3k/aj/4/r4lLF97H0wiBFxtpmQyun54qtWtsQgwncSlkGzdgqPynlbMp30qJQTRjoUGynrszQfH0Z266rx1UF5KyiIYKZobEPi93Sc3nP08TQUzXDjnCPMEak0A44M1SYUcMBRK/72TlrQQXKd/x3ckHCaMdd0hfSzx93wbwD3up/0BihA8HghW8EUNbM//+EgtkYya+wIJFeTBOQkjpv+JYxiR/cVYz11qsXCQDCwUxhWseuq5TF57CF/m49w2FrDceXjz9mEexd3+DtmTH1CWtwRUKvBj/dd3mdM7czwWIOCNamgN8Lj41f5LV7z/V97D3nnsW8Du6WOaaEfemGaWzDkfnm7v7vV238GxnXl/lgbbJHwVkcQ1c8mHtrdC7pvvBef7rMDm9nE4fr+vZZlVwfume8E0k+xRfIiEDoZVcGkaU6erwteoME82wo8pvBb9QyJN+fOPgNdBzfow4t6q+B/wYuBg9Sc6+1tjPwVW/r1BAwJbv4jegoTzEvky+L9D4ajJ7mkw3WWrcnrO/a7Nk5wV7Egt6HFujBO5TMBe3iE8mNYOfaavDUSuO8wj/iHnf+LwyvaYSn7udOj1jNHuS/uUa+7rTejMtrtVVDEeD+cW/fTK8Wi9+9zer9zQtijwZJkWRvo/25/mT2u5P9Lbbl8nktFjEOPm7F3m95/asnvlHSk31y9yfNBMEQRAEQRAEQRAEQRAEQRAE8b/nP3XqQCdLzBvzAAAAAElFTkSuQmCC",Th=-2;class m4 extends ee.Component{constructor(t){super(t),this.state={video:Th,featureLang:0}}getVideo(t,n){return t=0?this.props.cover.videos[t-n]:null}onVideoClickHandler(t){const n=this.props.cover.headerVideos?this.props.cover.headerVideos.length:0;return()=>{this.setState({video:t+n})}}renderFeature(){const{featureVideo:t}=this.props.cover,{featureLang:n}=this.state,{translations:r}=t,i=n===0?t:{...r[n-1],poster:t.poster};return ie("div",{children:[M("div",{className:"banner-trans right-overlay",children:r&&r.map((s,a)=>{const l=a+1;return n!==l?M("div",{onClick:()=>this.setState({featureLang:l}),className:"trans-button",children:s.code},s.code):M("div",{onClick:()=>this.setState({featureLang:0}),className:"trans-button",children:"ENG"},"ENG")})}),M(hv.Player,{className:"source-video",poster:i.poster,playsInline:!0,src:i.file})]})}renderHeaderVideos(){const{headerVideos:t}=this.props.cover;return M("div",{className:"row",children:t.slice(0,2).map((n,r)=>M("div",{className:"cell plain",onClick:()=>this.setState({video:r}),children:n.buttonTitle},r))})}renderButton(t,n){return M("div",{className:"row",children:M("a",{className:`cell ${n?"yellow":"plain"}`,href:t.href,children:t.title})})}renderMediaOverlay(){const t=this.getVideo(this.state.video,this.props.cover.headerVideos?this.props.cover.headerVideos.length:0);return M(hx,{opaque:!0,source:{title:t.title,desc:t.desc,paths:[t.file],poster:t.poster},translations:t.translations,onCancel:()=>this.setState({video:Th})})}render(){if(!this.props.cover)return ie("div",{className:"default-cover-container",children:["You haven't specified any cover props. Put them in the values that overwrite the store in ",M("code",{children:"app.cover"})]});const{videos:t,footerButton:n}=this.props.cover,{showing:r}=this.props;return ie("div",{className:"default-cover-container",children:[M("div",{className:r?"cover-header":"cover-header minimized",children:M("a",{className:"cover-logo-container",href:"https://bellingcat.com",children:M("img",{className:"cover-logo",src:p4,alt:"Bellingcat logo"})})}),ie("div",{className:"cover-content",children:[this.props.cover.bgVideo?M("div",{className:`fullscreen-bg ${this.props.showing?"":"hidden"}`,children:M("video",{loop:!0,muted:!0,autoPlay:!0,preload:"auto",className:"fullscreen-bg__video",children:M("source",{src:this.props.cover.bgVideo,type:"video/mp4"})})}):null,M("h2",{dangerouslySetInnerHTML:{__html:this.props.cover.title}}),this.props.cover.subtitle?M("h3",{style:{marginTop:0},children:this.props.cover.subtitle}):null,this.props.cover.subsubtitle?M("h5",{children:this.props.cover.subsubtitle}):null,this.props.cover.featureVideo?this.renderFeature():null,ie("div",{className:"hero thin",children:[this.props.cover.headerVideos?this.renderHeaderVideos():null,this.props.cover.headerButton?this.renderButton(this.props.cover.headerButton):null,M("div",{className:"row",children:M("div",{className:"cell yellow",onClick:this.props.showAppHandler,children:this.props.cover.exploreButton})})]}),Array.isArray(this.props.cover.description)?this.props.cover.description.map((i,s)=>M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(i)}},s)):M("div",{className:"md-container",dangerouslySetInnerHTML:{__html:_e(this.props.cover.description)}}),t?ie("div",{className:"hero",children:[M("div",{className:"row",children:t&&t.slice(0,2).map((i,s)=>ie("div",{className:"cell small",onClick:this.onVideoClickHandler(s),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))}),M("div",{className:"row",children:t.length>2&&this.props.cover.videos.slice(2,4).map((i,s)=>ie("div",{className:"cell small",onClick:this.onVideoClickHandler(s+2),children:[i.buttonTitle,M("br",{}),i.buttonSubtitle]},s))})]}):null,n?M("div",{className:"hero",children:M("div",{className:"row",children:this.renderButton(n)})}):null]}),this.state.video!==Th?this.renderMediaOverlay():null]})}}function g4(e){return{cover:e.app.cover}}const v4=pi(g4)(m4),y4=({showing:e,children:t})=>M("div",{className:`cover-container ${e?"showing":""}`,children:t}),px=({isLoading:e,language:t})=>{let n="loading-overlay";return n+=e?"":" hidden",M("div",{id:"loading-overlay",className:n,children:ie("div",{className:"loading-wrapper",children:[M("span",{id:"loading-text",className:"text",children:Ue[t].loading}),ie("div",{className:"spinner",children:[M("div",{className:"double-bounce1"}),M("div",{className:"double-bounce2"})]})]})})},_4=({title:e,from:t,to:n,onClick:r,hideInfo:i})=>{const s=t&&Op(t),a=n&&Op(n);return ie("div",{className:"timeline-header",children:[M("div",{className:"timeline-toggle",onClick:()=>r(),children:M("p",{children:M("i",{className:"arrow-down"})})}),ie("div",{className:`timeline-info ${i?"hidden":""}`,children:[M("p",{dangerouslySetInnerHTML:{__html:e}}),ie("p",{children:[s," - ",a]})]})]})},w4=15;cD();class b4 extends ee.Component{constructor(){super(),this.xAxis0Ref=ee.createRef(),this.xAxis1Ref=ee.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){let t,n;this.props.extent>5256e3?(t="%Y",n=""):(this.props.extent>43200,n="%d %b",t="");let{marginTop:r}=this.props.dims;this.props.scaleX&&(this.x0=q_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r+30).tickSize(100-w4-r).tickFormat(Iu(t)),this.x1=q_(this.props.scaleX).ticks(this.props.ticks).tickPadding(r).tickSize(0).tickFormat(Iu(n)),this.state.isInitialized||this.setState({isInitialized:!0})),this.state.isInitialized&&(Ui(this.xAxis0Ref.current).transition().duration(this.props.transitionDuration).call(this.x0),Ui(this.xAxis1Ref.current).transition().duration(this.props.transitionDuration).call(this.x1))}render(){return ie(Ln,{children:[M("g",{ref:this.xAxis0Ref,transform:"translate(0, 24)",clipPath:"url(#clip)",className:"axis xAxis"}),M("g",{ref:this.xAxis1Ref,transform:`translate(0, ${this.props.dims.marginTop})`,clipPath:"url(#clip)",className:"axis xAxis"})]})}}const T4=({dims:e})=>M("clipPath",{id:"clip",children:M("rect",{x:e.marginLeft,y:"0",width:Math.max(0,e.width-e.marginLeft*2),height:e.contentHeight})}),vb=({dims:e,onMoveTime:t,backward:n})=>n===!0?M("div",{className:"timeline-handle",onClick:()=>t("backwards"),children:M("span",{className:"timeline-handle__triangle"})}):M("div",{className:"timeline-handle right",onClick:()=>t("forward"),children:M("span",{className:"timeline-handle__triangle"})}),S4=[{label:"20 years",duration:10512e3},{label:"2 years",duration:1051200},{label:"3 months",duration:129600},{label:"3 days",duration:4320},{label:"12 hours",duration:720},{label:"1 hour",duration:60}];function E4(e,t,n){return e>=n&&t>=n?!0:e===t}const x4=({extent:e,zoomLevels:t,dims:n,onApplyZoom:r})=>{function i(s,a){const l=t.reduce((y,_)=>y.duration<_.duration?_:y),d=E4(s.duration,e,l.duration);return M("div",{className:`zoom-level-button ${d?"active":""}`,x:"60",y:a*15+20,onClick:()=>r(s),children:s.label},a)}return t.length===0&&(t=S4),M("div",{className:"zoom-controls",children:t.map((s,a)=>i(s,a))})},k4=({styles:e,eventRadius:t,getEventX:n,getEventY:r,categories:i,transitionDuration:s,selected:a,dims:l,features:d})=>{function y(_,c){function f(g){return M("circle",{className:"timeline-marker",cx:0,cy:0,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeLinejoin:"round",strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px, ${g+40}px)`,WebkitTransition:`transform ${s/1e3}s ease`,MozTransition:"none",opacity:1},r:t*2},Gt(c))}function w(){return M("rect",{className:"timeline-marker",x:0,y:l.marginTop,width:t/1.5,height:l.contentHeight-55,stroke:e?e.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:e?e["stroke-width"]:1,strokeDasharray:e?e["stroke-dasharray"]:"2,2",style:{transform:`translate(${n(c)}px)`,opacity:.7}})}const v=Ra(c.latitude)&&Ia(c.longitude)||d.GRAPH_NONLOCATED&&c.projectOffset!==-1,p=jS(c,i).map(g=>r({...c,category:g}));function b(g){switch(c.shape){case"circle":case br.DIAMOND:case br.STAR:_.push(f(g));break;case br.BAR:_.push(w());break;default:return v?_.push(f(g)):_.push(w())}}return p.length>0?p.forEach(b):b(r(c)),_}return M("g",{clipPath:"url(#clip)",children:a.reduce(y,[])})},C4=({highlights:e,events:t,x:n,y:r,width:i,height:s,onSelect:a,styleProps:l,extraRender:d})=>{if(e.length===0)return M("rect",{onClick:a,className:"event",x:n,y:r,style:l,width:i,height:s});const y=s/e.length;return M(Ln,{children:e.map((_,c)=>M("rect",{onClick:a,className:"event",x:n,y:r-y+c*y+y/2,style:{...l,opacity:_?.3:.1},width:i,height:y}))})},mx=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>M("rect",{onClick:i,className:"event",x:e,y:t,style:s,width:n,height:n,transform:r}),A4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s,extraRender:a})=>{const l=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e+l},${t-l} ${e-n},${t} ${e+n},${t} ${e-l},${t-l} ${e},${t+l}`,transform:r})},P4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t-a} ${e-a},${t-a}`,transform:`rotate(180, ${e}, ${t})`})},L4=({x:e,y:t,r:n,transform:r,onSelect:i,styleProps:s})=>{const a=n*2/3;return M("polygon",{onClick:i,className:"event",x:e,y:t,style:s,points:`${e},${t+a} ${e+a},${t} ${e+a},${t-a} ${e-a},${t-a} ${e-a},${t}`,transform:`rotate(180, ${e}, ${t})`})},R4=({offset:e,id:t,start:n,end:r,getX:i,y:s,dims:a,colour:l,eventRadius:d,onClick:y})=>{const _=i(r)-i(n);return e===void 0?null:M("rect",{onClick:y,className:"project",x:i(n),y:a.marginTop+e,width:_,style:{fill:l,fillOpacity:.2},height:2*d})};function _v({radius:e,colorPercentMap:t,styles:n,className:r}){let i=0;const s=Object.keys(t);return M(Ln,{children:s.map((a,l)=>{const d=t[a],[y,_]=T0(e,i);i+=d;const[c,f]=T0(e,i),w=s.length===1||d>.5?1:0,v=[`M ${y} ${_}`,`A ${e} ${e} 0 ${w} 1 ${c} ${f}`,"L 0 0 ",`L ${y} ${_} Z`].join(" "),p={...n,fill:a};return M("path",{className:r,id:`arc_${l}`,d:v,style:p},`arc_${l}`)})})}function yb(e,t,n){const r=gg([e],n.coloringSet);return M("g",{className:"timeline-event",onClick:n.onSelect,transform:`translate(${n.x}, ${n.y+40})`,children:M(_v,{radius:n.eventRadius,colorPercentMap:fg(n.filterColors,r),styles:{...t},className:"event"})},e.id)}function _b(e,t,n){const r=n.features.GRAPH_NONLOCATED?e.projectOffset>=0?t.opacity:.5:mg(1);return M(C4,{onSelect:n.onSelect,category:e.category,events:[e],x:n.x,y:n.dims.marginTop,width:n.eventRadius/4,height:n.dims.trackHeight,styleProps:{...t,fillOpacity:r},highlights:n.highlights})}function I4(e,t,n){return M(mx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius,r:1.8*n.eventRadius,styleProps:t,transform:`rotate(45, ${n.x}, ${n.y})`})}function N4(e,t,n){return M(mx,{onSelect:n.onSelect,x:n.x,y:n.y-1.8*n.eventRadius/2,r:1.8*n.eventRadius,styleProps:t})}function O4(e,t,n){return M(P4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function M4(e,t,n){return M(L4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.5*n.eventRadius,styleProps:t})}function D4(e,t,n){return M(A4,{onSelect:n.onSelect,x:n.x,y:n.y,r:1.8*n.eventRadius,styleProps:{...t,fillRule:"nonzero"},transform:`rotate(180, ${n.x}, ${n.y})`})}const $4=({events:e,projects:t,categories:n,narrative:r,getDatetimeX:i,getY:s,getCategoryColor:a,getHighlights:l,onSelect:d,transitionDuration:y,dims:_,features:c,setLoading:f,setNotLoading:w,eventRadius:v,filterColors:p,coloringSet:b})=>{const g=r?r.steps.map(T=>T.id):[];function m(T,x){if(r&&!g.includes(x.id))return null;const k=Ra(x.latitude)&&Ia(x.longitude)||c.GRAPH_NONLOCATED&&x.projectOffset!==-1,{shape:A}=x;let E=k?yb:_b;A&&A.shape&&(A.shape===br.BAR?E=_b:A.shape===br.DIAMOND?E=I4:A.shape===br.STAR?E=D4:A.shape===br.TRIANGLE?E=O4:A.shape===br.PENTAGON?E=M4:A.shape===br.SQUARE?E=N4:E=yb);const P=jS(x,n).map(N=>{const $=s({...x,category:N}),z={fill:x.colour?x.colour:a(N.title),fillOpacity:$>0?mg(1):0,transition:`transform ${y/1e3}s ease`};return{y:$,styles:z}});function C(N,$){return E(x,$,{x:i(x.datetime),y:N,eventRadius:v,onSelect:()=>d(x),dims:_,highlights:c.HIGHLIGHT_GROUPS?l(x.filters[c.HIGHLIGHT_GROUPS.filterIndexIndicatingGroup]):[],features:c,filterColors:p,coloringSet:b})}return P.length===0?T.push(C(s(x),{fill:a(null)})):P.forEach(N=>{T.push(C(N.y,N.styles))}),T}let h=()=>null;return c.GRAPH_NONLOCATED&&(h=function(){return M(Ln,{children:Object.values(t).map(T=>M(R4,{...T,eventRadius:v,onClick:()=>console.log(T),getX:i,dims:_,colour:a(T.category)},T.id))})}),ie("g",{clipPath:"url(#clip)",children:[h(),e.reduce(m,[])]})};class F4 extends ee.Component{constructor(t){super(t),this.grabRef=ee.createRef(),this.state={isInitialized:!1}}componentDidUpdate(){if(!this.state.isInitialized){const t=RI().on("start",this.props.onDragStart).on("drag",this.props.onDrag).on("end",this.props.onDragEnd);Ui(this.grabRef.current).call(t),this.setState({isInitialized:!0})}}renderCategory(t,n){const{features:r,dims:i}=this.props,s=1;return r.GRAPH_NONLOCATED&&r.GRAPH_NONLOCATED.categories&&r.GRAPH_NONLOCATED.categories.includes(t)?null:ie(Ln,{children:[M("g",{className:"tick",style:{strokeWidth:s},opacity:"0.5",transform:"translate(0, 66)",children:M("line",{x1:i.marginLeft,x2:i.width-i.marginLeft})}),M("g",{className:"tick",opacity:"1",transform:"translate(0, 66)",children:M("text",{x:i.marginLeft-5,dy:"0.32em",children:t})})]})}render(){const{dims:t,categories:n,fallbackLabel:r}=this.props,s=n&&n.length>0?n.map((a,l)=>this.renderCategory(a,l)):this.renderCategory(r,0);return ie("g",{className:"yAxis",children:[s,M("rect",{ref:this.grabRef,className:"drag-grabber",x:t.marginLeft,y:t.marginTop,width:Math.max(0,t.width-t.marginLeft*2),height:t.contentHeight})]})}}class j4 extends ee.Component{constructor(t){super(t);let n=new URLSearchParams(window.location.href.split("?")[1]);this.styleDatetime=this.styleDatetime.bind(this),this.getDatetimeX=this.getDatetimeX.bind(this),this.getY=this.getY.bind(this),this.onApplyZoom=this.onApplyZoom.bind(this),this.onSelect=this.onSelect.bind(this),this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.svgRef=ee.createRef(),this.state={isFolded:n.has("timeline")&&n.get("timeline")==="false",dims:t.dimensions,scaleX:null,scaleY:null,timerange:[null,null],dragPos0:null,transitionDuration:300}}componentDidMount(){this.addEventListeners()}UNSAFE_componentWillReceiveProps(t){if(Gt(t)!==Gt(this.props)&&this.setState({timerange:t.app.timeline.range,scaleX:this.makeScaleX()}),Gt(t.activeCategories)!==Gt(this.props.activeCategories)||Gt(t.dimensions)!==Gt(this.props.dimensions)){const{trackHeight:n,marginTop:r}=t.dimensions;this.setState({scaleY:this.makeScaleY(t.activeCategories,n,r)})}t.dimensions.trackHeight!==this.props.dimensions.trackHeight&&this.computeDims()}addEventListeners(){window.addEventListener("resize",()=>{this.computeDims()});const t=document.querySelector(".timeline-wrapper");t!==null&&t.addEventListener("transitionend",n=>{this.computeDims()})}makeScaleX(){return jM().domain(this.state.timerange).range([this.state.dims.marginLeft,this.state.dims.width-this.state.dims.marginLeft])}makeScaleY(t,n,r){const{features:i}=this.props;i.GRAPH_NONLOCATED&&i.GRAPH_NONLOCATED.categories&&(t=t.filter(d=>!i.GRAPH_NONLOCATED.categories.includes(d.title)));const s=0,a=t.length>2?n/t.length:n/(t.length+1),l=t.map((d,y)=>(y+1)*a+r+s/2);return d=>{const y=t.indexOf(d);return l[y]}}componentDidUpdate(t,n){n.timerange!==this.state.timerange&&this.setState({scaleX:this.makeScaleX()})}getTimeScaleExtent(){if(!this.state.scaleX)return 0;const t=this.state.scaleX.domain();return(t[1].getTime()-t[0].getTime())/6e4}onClickArrow(){this.setState(t=>({isFolded:!t.isFolded}))}computeDims(){const t=this.props.ui.dom.timeline;if(document.querySelector(`#${t}`)!==null){const n=document.querySelector(`#${t}`).getBoundingClientRect();this.setState({dims:{...this.props.dimensions,width:n.width}},()=>{this.setState({scaleX:this.makeScaleX()})})}}onMoveTime(t){const n=this.getTimeScaleExtent(),r=Wt.offset(this.state.scaleX.domain()[0],n);let i=r,s=Wt.offset(r,n);t==="backwards"&&(i=Wt.offset(r,-(2*n)),s=Wt.offset(r,-n)),this.props.methods.onUpdateTimerange([i,s]),this.props.methods.onSelect([])}onCenterTime(t){const n=this.getTimeScaleExtent(),r=Wt.offset(t,-n/2),i=Wt.offset(t,+n/2);this.setState({timerange:[r,i]},()=>{this.props.methods.onUpdateTimerange(this.state.timerange)})}onSoftTimeRangeUpdate(t){this.setState({timerange:t})}onApplyZoom(t){const n=this.getTimeScaleExtent(),r=Wt.offset(this.state.scaleX.domain()[0],n/2),{rangeLimits:i}=this.props.app.timeline;let s=Wt.offset(r,-t.duration/2),a=Wt.offset(r,t.duration/2);if(i){const l=i[0],d=i[1];sd&&(a=d,s=Wt.offset(a,-t.duration))}this.setState({timerange:[s,a]},()=>{this.props.actions.updateTicks(15),this.props.methods.onUpdateTimerange(this.state.timerange)})}toggleTransition(t){this.setState({transitionDuration:t?300:0})}onDragStart(t){t.sourceEvent.stopPropagation(),this.setState({dragPos0:t.x},()=>{this.toggleTransition(!1)})}onDrag(t){const n=this.state.scaleX.invert(this.state.dragPos0).getTime(),r=this.state.scaleX.invert(t.x).getTime(),i=(n-r)/1e3,{range:s,rangeLimits:a}=this.props.app.timeline;let l=Jr.offset(s[0],i),d=Jr.offset(s[1],i);if(a){const y=a[0],_=a[1];l=l_?_:d}this.onSoftTimeRangeUpdate([l,d])}onDragEnd(){this.toggleTransition(!0),this.props.methods.onUpdateTimerange(this.state.timerange)}getDatetimeX(t){return this.state.scaleX(t)}getY(t){const{features:n,domain:r,activeCategories:i}=this.props,{USE_CATEGORIES:s,GRAPH_NONLOCATED:a}=n;if(!(s&&i&&i.length>0))return this.state.dims.trackHeight/1.5;const{category:d}=t;if(a&&a.categories.includes(d)){const{project:y}=t;return this.state.dims.marginTop+r.projects[y].offset+this.props.ui.eventRadius}return this.state.scaleY?this.state.scaleY(d):0}styleDatetime(t,n){return[null,null]}onSelect(t){if(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK){const n=Math.floor(this.props.features.ZOOM_TO_TIMEFRAME_ON_TIMELINE_CLICK/2),r=Wt.offset(t.datetime,-n),i=Wt.offset(t.datetime,n);this.props.actions.updateTicks(1),this.props.methods.onUpdateTimerange([r,i])}this.props.methods.onSelect(t)}render(){const{isNarrative:t,app:n,domain:r}=this.props,{timeline:i}=n;let s=`timeline-wrapper ${this.state.isFolded?" folded":""}`;s+=n.narrative!==null?" narrative-mode":"";const{dims:a}=this.state,l={height:a.contentHeight},{activeCategories:d}=this.props,y=Ue[this.props.app.language].timeline.info.replace("%n",r.eventCountInTimeRange);return ie("div",{className:s,onKeyDown:this.props.onKeyDown,tabIndex:"1",children:[M(_4,{title:y,from:this.state.timerange[0],to:this.state.timerange[1],onClick:()=>{this.onClickArrow()},hideInfo:t}),M("div",{className:"timeline-content",children:ie("div",{id:this.props.ui.dom.timeline,className:"timeline",children:[M("div",{className:"timeline-container",children:ie("svg",{ref:this.svgRef,width:a.width,style:l,children:[M(T4,{dims:a}),M(b4,{ticks:i.dimensions.ticks,dims:a,extent:this.getTimeScaleExtent(),transitionDuration:this.state.transitionDuration,scaleX:this.state.scaleX}),M(F4,{dims:a,getCategoryY:_=>this.getY({category:_,project:null}),onDragStart:this.onDragStart,onDrag:this.onDrag,onDragEnd:this.onDragEnd,categories:d,features:this.props.features,fallbackLabel:Ue[this.props.app.language].timeline.default_categories_label}),M(k4,{dims:a,selected:this.props.app.selected,getEventX:_=>this.getDatetimeX(_.datetime),getEventY:this.getY,categories:d,transitionDuration:this.state.transitionDuration,styles:this.props.ui.styles,features:this.props.features,eventRadius:this.props.ui.eventRadius}),M($4,{events:this.props.domain.events,projects:this.props.domain.projects,categories:d,styleDatetime:this.styleDatetime,narrative:this.props.app.narrative,getDatetimeX:this.getDatetimeX,getY:this.getY,getHighlights:_=>_==="None"?[]:d.map(c=>c.group===_),getCategoryColor:this.props.methods.getCategoryColor,transitionDuration:this.state.transitionDuration,onSelect:this.onSelect,dims:a,features:this.props.features,setLoading:this.props.actions.setLoading,setNotLoading:this.props.actions.setNotLoading,eventRadius:this.props.ui.eventRadius,filterColors:this.props.ui.filterColors,coloringSet:this.props.app.coloringSet})]})}),ie("div",{className:"timeline-bottom",children:[M(vb,{dims:a,onMoveTime:_=>{this.onMoveTime(_)},backward:!0}),M(x4,{extent:this.getTimeScaleExtent(),zoomLevels:i.zoomLevels,dims:a,onApplyZoom:this.onApplyZoom}),M(vb,{dims:a,onMoveTime:_=>{this.onMoveTime(_)},backward:!1})]})]})})]})}}function z4(e){return{dimensions:$p(e),isNarrative:!!e.app.associations.narrative,activeCategories:Zg(e),domain:{events:v$(e),eventCountInTimeRange:m$(e),projects:y$(e),narratives:e.domain.narratives},app:{selected:e.app.selected,language:e.app.language,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,timeline:{zoomLevels:e.app.timeline.zoomLevels,dimensions:$p(e),ticks:e.app.timeline.ticks,range:Gg(e),rangeLimits:oE(e)}},ui:{dom:e.ui.dom,styles:e.ui.style.selectedEvents,eventRadius:e.ui.eventRadius,filterColors:e.ui.coloring.colors},features:fr(e)}}function B4(e){return{actions:Qo({setLoading:qS,setNotLoading:ZS,updateTicks:KS},e)}}const U4=pi(z4,B4)(j4);var Bp={},H4={get exports(){return Bp},set exports(e){Bp=e}};/* @preserve * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(Kr,function(n){var r="1.9.3";function i(o){var u,S,R,I;for(S=1,R=arguments.length;S"u"||!L||!L.Mixin)){o=h(o)?o:[o];for(var u=0;u0?Math.floor(o):Math.ceil(o)};W.prototype={clone:function(){return new W(this.x,this.y)},add:function(o){return this.clone()._add(G(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(G(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new W(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new W(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Y(this.x),this.y=Y(this.y),this},distanceTo:function(o){o=G(o);var u=o.x-this.x,S=o.y-this.y;return Math.sqrt(u*u+S*S)},equals:function(o){return o=G(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=G(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function G(o,u,S){return o instanceof W?o:h(o)?new W(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new W(o.x,o.y):new W(o,u,S)}function J(o,u){if(o)for(var S=u?[o,u]:o,R=0,I=S.length;R=this.min.x&&S.x<=this.max.x&&u.y>=this.min.y&&S.y<=this.max.y},intersects:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>=u.x&&R.x<=S.x,q=I.y>=u.y&&R.y<=S.y;return D&&q},overlaps:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>u.x&&R.xu.y&&R.y=u.lat&&I.lat<=S.lat&&R.lng>=u.lng&&I.lng<=S.lng},intersects:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>=u.lat&&R.lat<=S.lat,q=I.lng>=u.lng&&R.lng<=S.lng;return D&&q},overlaps:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>u.lat&&R.latu.lng&&R.lng1,Ek=function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",c,u),window.removeEventListener("testPassiveEventSupport",c,u)}catch{}return o}(),xk=function(){return!!document.createElement("canvas").getContext}(),md=!!(document.createElementNS&&ve("svg").createSVGRect),kk=!!md&&function(){var o=document.createElement("div");return o.innerHTML="",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Ck=!md&&function(){try{var o=document.createElement("div");o.innerHTML='';var u=o.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}}(),Pk=navigator.platform.indexOf("Mac")===0,Ak=navigator.platform.indexOf("Linux")===0;function Qn(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var we={ie:ft,ielt9:xt,edge:ze,webkit:Be,android:qe,android23:xe,androidStock:Ae,opera:Je,chrome:Le,gecko:yi,safari:Ge,phantom:Fr,opera12:cn,win:Da,ie3d:rs,webkit3d:pd,gecko3d:Ev,any3d:vk,mobile:is,mobileWebkit:yk,mobileWebkit3d:_k,msPointer:xv,pointer:kv,touch:wk,touchNative:Cv,mobileOpera:bk,mobileGecko:Tk,retina:Sk,passiveEvents:Ek,canvas:xk,svg:md,vml:Ck,inlineSvg:kk,mac:Pk,linux:Ak},Pv=we.msPointer?"MSPointerDown":"pointerdown",Av=we.msPointer?"MSPointerMove":"pointermove",Lv=we.msPointer?"MSPointerUp":"pointerup",Rv=we.msPointer?"MSPointerCancel":"pointercancel",gd={touchstart:Pv,touchmove:Av,touchend:Lv,touchcancel:Rv},Iv={touchstart:Mk,touchmove:$a,touchend:$a,touchcancel:$a},Ji={},Nv=!1;function Lk(o,u,S){return u==="touchstart"&&Ok(),Iv[u]?(S=Iv[u].bind(this,S),o.addEventListener(gd[u],S,!1),S):(console.warn("wrong event specified:",u),c)}function Rk(o,u,S){if(!gd[u]){console.warn("wrong event specified:",u);return}o.removeEventListener(gd[u],S,!1)}function Ik(o){Ji[o.pointerId]=o}function Nk(o){Ji[o.pointerId]&&(Ji[o.pointerId]=o)}function Ov(o){delete Ji[o.pointerId]}function Ok(){Nv||(document.addEventListener(Pv,Ik,!0),document.addEventListener(Av,Nk,!0),document.addEventListener(Lv,Ov,!0),document.addEventListener(Rv,Ov,!0),Nv=!0)}function $a(o,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var S in Ji)u.touches.push(Ji[S]);u.changedTouches=[u],o(u)}}function Mk(o,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&Mt(u),$a(o,u)}function Dk(o){var u={},S,R;for(R in o)S=o[R],u[R]=S&&S.bind?S.bind(o):S;return o=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var $k=200;function Fk(o,u){o.addEventListener("dblclick",u);var S=0,R;function I(D){if(D.detail!==1){R=D.detail;return}if(!(D.pointerType==="mouse"||D.sourceCapabilities&&!D.sourceCapabilities.firesTouchEvents)){var q=jv(D);if(!(q.some(function(X){return X instanceof HTMLLabelElement&&X.attributes.for})&&!q.some(function(X){return X instanceof HTMLInputElement||X instanceof HTMLSelectElement}))){var K=Date.now();K-S<=$k?(R++,R===2&&u(Dk(D))):R=1,S=K}}}return o.addEventListener("click",I),{dblclick:u,simDblclick:I}}function jk(o,u){o.removeEventListener("dblclick",u.dblclick),o.removeEventListener("click",u.simDblclick)}var vd=za(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),os=za(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Mv=os==="webkitTransition"||os==="OTransition"?os+"End":"transitionend";function Dv(o){return typeof o=="string"?document.getElementById(o):o}function ss(o,u){var S=o.style[u]||o.currentStyle&&o.currentStyle[u];if((!S||S==="auto")&&document.defaultView){var R=document.defaultView.getComputedStyle(o,null);S=R?R[u]:null}return S==="auto"?null:S}function Fe(o,u,S){var R=document.createElement(o);return R.className=u||"",S&&S.appendChild(R),R}function at(o){var u=o.parentNode;u&&u.removeChild(o)}function Fa(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function eo(o){var u=o.parentNode;u&&u.lastChild!==o&&u.appendChild(o)}function to(o){var u=o.parentNode;u&&u.firstChild!==o&&u.insertBefore(o,u.firstChild)}function yd(o,u){if(o.classList!==void 0)return o.classList.contains(u);var S=ja(o);return S.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(S)}function Pe(o,u){if(o.classList!==void 0)for(var S=v(u),R=0,I=S.length;R0?2*window.devicePixelRatio:1;function Bv(o){return we.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/Uk:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function Ld(o,u){var S=u.relatedTarget;if(!S)return!0;try{for(;S&&S!==o;)S=S.parentNode}catch{return!1}return S!==o}var Hk={__proto__:null,on:Ce,off:Ke,stopPropagation:bi,disableScrollPropagation:Ad,disableClickPropagation:cs,preventDefault:Mt,stop:Ti,getPropagationPath:jv,getMousePosition:zv,getWheelDelta:Bv,isExternalTarget:Ld,addListener:Ce,removeListener:Ke},Uv=B.extend({run:function(o,u,S,R){this.stop(),this._el=o,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(R||.5,.2),this._startPos=wi(o),this._offset=u.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=N(this._animate,this),this._step()},_step:function(o){var u=+new Date-this._startTime,S=this._duration*1e3;uthis.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,u){this._enforcingBounds=!0;var S=this.getCenter(),R=this._limitCenter(S,this._zoom,fe(o));return S.equals(R)||this.panTo(R,u),this._enforcingBounds=!1,this},panInside:function(o,u){u=u||{};var S=G(u.paddingTopLeft||u.padding||[0,0]),R=G(u.paddingBottomRight||u.padding||[0,0]),I=this.project(this.getCenter()),D=this.project(o),q=this.getPixelBounds(),K=oe([q.min.add(S),q.max.subtract(R)]),X=K.getSize();if(!K.contains(D)){this._enforcingBounds=!0;var re=D.subtract(K.getCenter()),he=K.extend(D).getSize().subtract(X);I.x+=re.x<0?-he.x:he.x,I.y+=re.y<0?-he.y:he.y,this.panTo(this.unproject(I),u),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),R=u.divideBy(2).round(),I=S.divideBy(2).round(),D=R.subtract(I);return!D.x&&!D.y?this:(o.animate&&o.pan?this.panBy(D):(o.pan&&this._rawPanBy(D),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=a(this._handleGeolocationResponse,this),S=a(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,S,o):navigator.geolocation.getCurrentPosition(u,S,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var u=o.code,S=o.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var u=o.coords.latitude,S=o.coords.longitude,R=new de(u,S),I=R.toBounds(o.coords.accuracy*2),D=this._locateOptions;if(D.setView){var q=this.getBoundsZoom(I);this.setView(R,D.maxZoom?Math.min(q,D.maxZoom):q)}var K={latlng:R,bounds:I,timestamp:o.timestamp};for(var X in o.coords)typeof o.coords[X]=="number"&&(K[X]=o.coords[X]);this.fire("locationfound",K)}},addHandler:function(o,u){if(!u)return this;var S=this[o]=new u(this);return this._handlers.push(S),this.options[o]&&S.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),at(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&($(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)at(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,u){var S="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),R=Fe("div",S,u||this._mapPane);return o&&(this._panes[o]=R),R},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),u=this.unproject(o.getBottomLeft()),S=this.unproject(o.getTopRight());return new ce(u,S)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,u,S){o=fe(o),S=G(S||[0,0]);var R=this.getZoom()||0,I=this.getMinZoom(),D=this.getMaxZoom(),q=o.getNorthWest(),K=o.getSouthEast(),X=this.getSize().subtract(S),re=oe(this.project(K,R),this.project(q,R)).getSize(),he=we.any3d?this.options.zoomSnap:1,Se=X.x/re.x,Re=X.y/re.y,En=u?Math.max(Se,Re):Math.min(Se,Re);return R=this.getScaleZoom(En,R),he&&(R=Math.round(R/(he/100))*(he/100),R=u?Math.ceil(R/he)*he:Math.floor(R/he)*he),Math.max(I,Math.min(D,R))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new W(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,u){var S=this._getTopLeftPoint(o,u);return new J(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,u){var S=this.options.crs;return u=u===void 0?this._zoom:u,S.scale(o)/S.scale(u)},getScaleZoom:function(o,u){var S=this.options.crs;u=u===void 0?this._zoom:u;var R=S.zoom(o*S.scale(u));return isNaN(R)?1/0:R},project:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(ue(o),u)},unproject:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(G(o),u)},layerPointToLatLng:function(o){var u=G(o).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(o){var u=this.project(ue(o))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(ue(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(fe(o))},distance:function(o,u){return this.options.crs.distance(ue(o),ue(u))},containerPointToLayerPoint:function(o){return G(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return G(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var u=this.containerPointToLayerPoint(G(o));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ue(o)))},mouseEventToContainerPoint:function(o){return zv(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var u=this._container=Dv(o);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ce(u,"scroll",this._onScroll,this),this._containerId=d(u)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&we.any3d,Pe(o,"leaflet-container"+(we.touch?" leaflet-touch":"")+(we.retina?" leaflet-retina":"")+(we.ielt9?" leaflet-oldie":"")+(we.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=ss(o,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Tt(this._mapPane,new W(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Pe(o.markerPane,"leaflet-zoom-hide"),Pe(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,u,S){Tt(this._mapPane,new W(0,0));var R=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var I=this._zoom!==u;this._moveStart(I,S)._move(o,u)._moveEnd(I),this.fire("viewreset"),R&&this.fire("load")},_moveStart:function(o,u){return o&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(o,u,S,R){u===void 0&&(u=this._zoom);var I=this._zoom!==u;return this._zoom=u,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),R?S&&S.pinch&&this.fire("zoom",S):((I||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return $(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){Tt(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[d(this._container)]=this;var u=o?Ke:Ce;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),we.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){$(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,u){for(var S=[],R,I=u==="mouseout"||u==="mouseover",D=o.target||o.srcElement,q=!1;D;){if(R=this._targets[d(D)],R&&(u==="click"||u==="preclick")&&this._draggableMoved(R)){q=!0;break}if(R&&R.listens(u,!0)&&(I&&!Ld(D,o)||(S.push(R),I))||D===this._container)break;D=D.parentNode}return!S.length&&!q&&!I&&this.listens(u,!0)&&(S=[this]),S},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var u=o.target||o.srcElement;if(!(!this._loaded||u._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(u))){var S=o.type;S==="mousedown"&&Ed(u),this._fireDOMEvent(o,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,u,S){if(o.type==="click"){var R=i({},o);R.type="preclick",this._fireDOMEvent(R,R.type,S)}var I=this._findEventTargets(o,u);if(S){for(var D=[],q=0;q0?Math.round(o-u)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(u))},_limitZoom:function(o){var u=this.getMinZoom(),S=this.getMaxZoom(),R=we.any3d?this.options.zoomSnap:1;return R&&(o=Math.round(o/R)*R),Math.max(u,Math.min(S,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,u){var S=this._getCenterOffset(o)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,u),!0)},_createAnimProxy:function(){var o=this._proxy=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(u){var S=vd,R=this._proxy.style[S];_i(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),R===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){at(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),u=this.getZoom();_i(this._proxy,this.project(o,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,u,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var R=this.getZoomScale(u),I=this._getCenterOffset(o)._divideBy(1-1/R);return S.animate!==!0&&!this.getSize().contains(I)?!1:(N(function(){this._moveStart(!0,!1)._animateZoom(o,u,!0)},this),!0)},_animateZoom:function(o,u,S,R){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=u,Pe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:u,noUpdate:R}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Wk(o,u){return new Oe(o,u)}var Mn=z.extend({options:{position:"topright"},initialize:function(o){p(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var u=this._map;return u&&u.removeControl(this),this.options.position=o,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var u=this._container=this.onAdd(o),S=this.getPosition(),R=o._controlCorners[S];return Pe(u,"leaflet-control"),S.indexOf("bottom")!==-1?R.insertBefore(u,R.firstChild):R.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(at(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),ds=function(o){return new Mn(o)};Oe.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},u="leaflet-",S=this._controlContainer=Fe("div",u+"control-container",this._container);function R(I,D){var q=u+I+" "+u+D;o[I+D]=Fe("div",q,S)}R("top","left"),R("top","right"),R("bottom","left"),R("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)at(this._controlCorners[o]);at(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Hv=Mn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,u,S,R){return S1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=u&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var u=this._getLayer(d(o.target)),S=u.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;S&&this._map.fire(S,u)},_createRadioElement:function(o,u){var S='",R=document.createElement("div");return R.innerHTML=S,R.firstChild},_addItem:function(o){var u=document.createElement("label"),S=this._map.hasLayer(o.layer),R;o.overlay?(R=document.createElement("input"),R.type="checkbox",R.className="leaflet-control-layers-selector",R.defaultChecked=S):R=this._createRadioElement("leaflet-base-layers_"+d(this),S),this._layerControlInputs.push(R),R.layerId=d(o.layer),Ce(R,"click",this._onInputClick,this);var I=document.createElement("span");I.innerHTML=" "+o.name;var D=document.createElement("span");u.appendChild(D),D.appendChild(R),D.appendChild(I);var q=o.overlay?this._overlaysList:this._baseLayersList;return q.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){var o=this._layerControlInputs,u,S,R=[],I=[];this._handlingClick=!0;for(var D=o.length-1;D>=0;D--)u=o[D],S=this._getLayer(u.layerId).layer,u.checked?R.push(S):u.checked||I.push(S);for(D=0;D=0;I--)u=o[I],S=this._getLayer(u.layerId).layer,u.disabled=S.options.minZoom!==void 0&&RS.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;Ce(o,"click",Mt),this.expand(),setTimeout(function(){Ke(o,"click",Mt)})}}),Vk=function(o,u,S){return new Hv(o,u,S)},Rd=Mn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(o){var u="leaflet-control-zoom",S=Fe("div",u+" leaflet-bar"),R=this.options;return this._zoomInButton=this._createButton(R.zoomInText,R.zoomInTitle,u+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(R.zoomOutText,R.zoomOutTitle,u+"-out",S,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,u,S,R,I){var D=Fe("a",S,R);return D.innerHTML=o,D.href="#",D.title=u,D.setAttribute("role","button"),D.setAttribute("aria-label",u),cs(D),Ce(D,"click",Ti),Ce(D,"click",I,this),Ce(D,"click",this._refocusOnMap,this),D},_updateDisabled:function(){var o=this._map,u="leaflet-disabled";_t(this._zoomInButton,u),_t(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(Pe(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(Pe(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});Oe.mergeOptions({zoomControl:!0}),Oe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Rd,this.addControl(this.zoomControl))});var qk=function(o){return new Rd(o)},Wv=Mn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var u="leaflet-control-scale",S=Fe("div",u),R=this.options;return this._addScales(R,u+"-line",S),o.on(R.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),S},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,u,S){o.metric&&(this._mScale=Fe("div",u,S)),o.imperial&&(this._iScale=Fe("div",u,S))},_update:function(){var o=this._map,u=o.getSize().y/2,S=o.distance(o.containerPointToLatLng([0,u]),o.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(S)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var u=this._getRoundNum(o),S=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,S,u/o)},_updateImperial:function(o){var u=o*3.2808399,S,R,I;u>5280?(S=u/5280,R=this._getRoundNum(S),this._updateScale(this._iScale,R+" mi",R/S)):(I=this._getRoundNum(u),this._updateScale(this._iScale,I+" ft",I/u))},_updateScale:function(o,u,S){o.style.width=Math.round(this.options.maxWidth*S)+"px",o.innerHTML=u},_getRoundNum:function(o){var u=Math.pow(10,(Math.floor(o)+"").length-1),S=o/u;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,u*S}}),Zk=function(o){return new Wv(o)},Gk='',Id=Mn.extend({options:{position:"bottomright",prefix:'
'+(we.inlineSvg?Gk+" ":"")+"Leaflet"},initialize:function(o){p(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),cs(this._container);for(var u in o._layers)o._layers[u].getAttribution&&this.addAttribution(o._layers[u].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var u in this._attributions)this._attributions[u]&&o.push(u);var S=[];this.options.prefix&&S.push(this.options.prefix),o.length&&S.push(o.join(", ")),this._container.innerHTML=S.join(' ')}}});Oe.mergeOptions({attributionControl:!0}),Oe.addInitHook(function(){this.options.attributionControl&&new Id().addTo(this)});var Yk=function(o){return new Id(o)};Mn.Layers=Hv,Mn.Zoom=Rd,Mn.Scale=Wv,Mn.Attribution=Id,ds.layers=Vk,ds.zoom=qk,ds.scale=Zk,ds.attribution=Yk;var er=z.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});er.addTo=function(o,u){return o.addHandler(u,this),this};var Kk={Events:H},Vv=we.touch?"touchstart mousedown":"mousedown",jr=B.extend({options:{clickTolerance:3},initialize:function(o,u,S,R){p(this,R),this._element=o,this._dragStartTarget=u||o,this._preventOutline=S},enable:function(){this._enabled||(Ce(this._dragStartTarget,Vv,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(jr._dragging===this&&this.finishDrag(!0),Ke(this._dragStartTarget,Vv,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!yd(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){jr._dragging===this&&this.finishDrag();return}if(!(jr._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(jr._dragging=this,this._preventOutline&&Ed(this._element),bd(),as(),!this._moving)){this.fire("down");var u=o.touches?o.touches[0]:o,S=$v(this._element);this._startPoint=new W(u.clientX,u.clientY),this._startPos=wi(this._element),this._parentScale=xd(S);var R=o.type==="mousedown";Ce(document,R?"mousemove":"touchmove",this._onMove,this),Ce(document,R?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var u=o.touches&&o.touches.length===1?o.touches[0]:o,S=new W(u.clientX,u.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)D&&(q=K,D=X);D>S&&(u[q]=1,Nd(o,u,S,R,q),Nd(o,u,S,q,I))}function Jk(o,u){for(var S=[o[0]],R=1,I=0,D=o.length;Ru&&(S.push(o[R]),I=R);return Iu.max.x&&(S|=2),o.yu.max.y&&(S|=8),S}function eC(o,u){var S=u.x-o.x,R=u.y-o.y;return S*S+R*R}function fs(o,u,S,R){var I=u.x,D=u.y,q=S.x-I,K=S.y-D,X=q*q+K*K,re;return X>0&&(re=((o.x-I)*q+(o.y-D)*K)/X,re>1?(I=S.x,D=S.y):re>0&&(I+=q*re,D+=K*re)),q=o.x-I,K=o.y-D,R?q*q+K*K:new W(I,D)}function Sn(o){return!h(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Kv(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Sn(o)}function Xv(o,u){var S,R,I,D,q,K,X,re;if(!o||o.length===0)throw new Error("latlngs not passed");Sn(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var he=[];for(var Se in o)he.push(u.project(ue(o[Se])));var Re=he.length;for(S=0,R=0;SR){X=(D-R)/I,re=[K.x-X*(K.x-q.x),K.y-X*(K.y-q.y)];break}return u.unproject(G(re))}var tC={__proto__:null,simplify:qv,pointToSegmentDistance:Zv,closestPointOnSegment:Xk,clipSegment:Yv,_getEdgeIntersection:Ha,_getBitCode:Si,_sqClosestPointOnSegment:fs,isFlat:Sn,_flat:Kv,polylineCenter:Xv};function Qv(o,u,S){var R,I=[1,4,2,8],D,q,K,X,re,he,Se,Re;for(D=0,he=o.length;D1e-7;K++)re=I*Math.sin(q),re=Math.pow((1-re)/(1+re),I/2),X=Math.PI/2-2*Math.atan(D*re)-q,q+=X;return new de(q*u,o.x*u/S)}},rC={__proto__:null,LonLat:Od,Mercator:Md,SphericalMercator:j},iC=i({},ne,{code:"EPSG:3395",projection:Md,transformation:function(){var o=.5/(Math.PI*Md.R);return Z(o,.5,-o,.5)}()}),ey=i({},ne,{code:"EPSG:4326",projection:Od,transformation:Z(1/180,1,-1/180,.5)}),oC=i({},be,{projection:Od,transformation:Z(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,u){var S=u.lng-o.lng,R=u.lat-o.lat;return Math.sqrt(S*S+R*R)},infinite:!0});be.Earth=ne,be.EPSG3395=iC,be.EPSG3857=Q,be.EPSG900913=te,be.EPSG4326=ey,be.Simple=oC;var Dn=B.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[d(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[d(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var u=o.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var S=this.getEvents();u.on(S,this),this.once("remove",function(){u.off(S,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});Oe.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var u=d(o);return this._layers[u]?this:(this._layers[u]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var u=d(o);return this._layers[u]?(this._loaded&&o.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return d(o)in this._layers},eachLayer:function(o,u){for(var S in this._layers)o.call(u,this._layers[S]);return this},_addLayers:function(o){o=o?h(o)?o:[o]:[];for(var u=0,S=o.length;uthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&u[0]instanceof de&&u[0].equals(u[S-1])&&u.pop(),u},_setLatLngs:function(o){mr.prototype._setLatLngs.call(this,o),Sn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Sn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,u=this.options.weight,S=new W(u,u);if(o=new J(o.min.subtract(S),o.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var R=0,I=this._rings.length,D;Ro.y!=I.y>o.y&&o.x<(I.x-R.x)*(o.y-R.y)/(I.y-R.y)+R.x&&(u=!u);return u||mr.prototype._containsPoint.call(this,o,!0)}});function hC(o,u){return new io(o,u)}var gr=pr.extend({initialize:function(o,u){p(this,u),this._layers={},o&&this.addData(o)},addData:function(o){var u=h(o)?o:o.features,S,R,I;if(u){for(S=0,R=u.length;S0?R:[u.src];return}h(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var D=0;DI?(u.height=I+"px",Pe(o,D)):_t(o,D),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),S=this._getAnchor();Tt(this._container,u.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,u=parseInt(ss(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+u,R=this._containerWidth,I=new W(this._containerLeft,-S-this._containerBottom);I._add(wi(this._container));var D=o.layerPointToContainerPoint(I),q=G(this.options.autoPanPadding),K=G(this.options.autoPanPaddingTopLeft||q),X=G(this.options.autoPanPaddingBottomRight||q),re=o.getSize(),he=0,Se=0;D.x+R+X.x>re.x&&(he=D.x+R-re.x+X.x),D.x-he-K.x<0&&(he=D.x-K.x),D.y+S+X.y>re.y&&(Se=D.y+S-re.y+X.y),D.y-Se-K.y<0&&(Se=D.y-K.y),(he||Se)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([he,Se]))}},_getAnchor:function(){return G(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),yC=function(o,u){return new Xa(o,u)};Oe.mergeOptions({closePopupOnClick:!0}),Oe.include({openPopup:function(o,u,S){return this._initOverlay(Xa,o,u,S).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),Dn.include({bindPopup:function(o,u){return this._popup=this._initOverlay(Xa,this._popup,o,u),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof pr||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Ti(o);var u=o.layer||o.target;if(this._popup._source===u&&!(u instanceof zr)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=u,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var Qa=tr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){tr.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){tr.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=tr.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",u=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Fe("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var u,S,R=this._map,I=this._container,D=R.latLngToContainerPoint(R.getCenter()),q=R.layerPointToContainerPoint(o),K=this.options.direction,X=I.offsetWidth,re=I.offsetHeight,he=G(this.options.offset),Se=this._getAnchor();K==="top"?(u=X/2,S=re):K==="bottom"?(u=X/2,S=0):K==="center"?(u=X/2,S=re/2):K==="right"?(u=0,S=re/2):K==="left"?(u=X,S=re/2):q.xthis.options.maxZoom||SR?this._retainParent(I,D,q,R):!1)},_retainChildren:function(o,u,S,R){for(var I=2*o;I<2*o+2;I++)for(var D=2*u;D<2*u+2;D++){var q=new W(I,D);q.z=S+1;var K=this._tileCoordsToKey(q),X=this._tiles[K];if(X&&X.active){X.retain=!0;continue}else X&&X.loaded&&(X.retain=!0);S+1this.options.maxZoom||this.options.minZoom!==void 0&&I1){this._setView(o,S);return}for(var Se=I.min.y;Se<=I.max.y;Se++)for(var Re=I.min.x;Re<=I.max.x;Re++){var En=new W(Re,Se);if(En.z=this._tileZoom,!!this._isValidTile(En)){var Ei=this._tiles[this._tileCoordsToKey(En)];Ei?Ei.current=!0:q.push(En)}}if(q.sort(function(Br,zd){return Br.distanceTo(D)-zd.distanceTo(D)}),q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var el=document.createDocumentFragment();for(Re=0;ReS.max.x)||!u.wrapLat&&(o.yS.max.y))return!1}if(!this.options.bounds)return!0;var R=this._tileCoordsToBounds(o);return fe(this.options.bounds).overlaps(R)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var u=this._map,S=this.getTileSize(),R=o.scaleBy(S),I=R.add(S),D=u.unproject(R,o.z),q=u.unproject(I,o.z);return[D,q]},_tileCoordsToBounds:function(o){var u=this._tileCoordsToNwSe(o),S=new ce(u[0],u[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var u=o.split(":"),S=new W(+u[0],+u[1]);return S.z=+u[2],S},_removeTile:function(o){var u=this._tiles[o];u&&(at(u.el),delete this._tiles[o],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){Pe(o,"leaflet-tile");var u=this.getTileSize();o.style.width=u.x+"px",o.style.height=u.y+"px",o.onselectstart=c,o.onmousemove=c,we.ielt9&&this.options.opacity<1&&Tn(o,this.options.opacity)},_addTile:function(o,u){var S=this._getTilePos(o),R=this._tileCoordsToKey(o),I=this.createTile(this._wrapCoords(o),a(this._tileReady,this,o));this._initTile(I),this.createTile.length<2&&N(a(this._tileReady,this,o,null,I)),Tt(I,S),this._tiles[R]={el:I,coords:o,current:!0},u.appendChild(I),this.fire("tileloadstart",{tile:I,coords:o})},_tileReady:function(o,u,S){u&&this.fire("tileerror",{error:u,tile:S,coords:o});var R=this._tileCoordsToKey(o);S=this._tiles[R],S&&(S.loaded=+new Date,this._map._fadeAnimated?(Tn(S.el,0),$(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),u||(Pe(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),we.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var u=new W(this._wrapX?_(o.x,this._wrapX):o.x,this._wrapY?_(o.y,this._wrapY):o.y);return u.z=o.z,u},_pxBoundsToTileRange:function(o){var u=this.getTileSize();return new J(o.min.unscaleBy(u).floor(),o.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function bC(o){return new ps(o)}var so=ps.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,u){this._url=o,u=p(this,u),u.detectRetina&&we.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,u){return this._url===o&&u===void 0&&(u=!0),this._url=o,u||this.redraw(),this},createTile:function(o,u){var S=document.createElement("img");return Ce(S,"load",a(this._tileOnLoad,this,u,S)),Ce(S,"error",a(this._tileOnError,this,u,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(o),S},getTileUrl:function(o){var u={r:we.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-o.y;this.options.tms&&(u.y=S),u["-y"]=S}return m(this._url,i(u,this.options))},_tileOnLoad:function(o,u){we.ielt9?setTimeout(a(o,this,null,u),0):o(null,u)},_tileOnError:function(o,u,S){var R=this.options.errorTileUrl;R&&u.getAttribute("src")!==R&&(u.src=R),o(S,u)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,u=this.options.maxZoom,S=this.options.zoomReverse,R=this.options.zoomOffset;return S&&(o=u-o),o+R},_getSubdomain:function(o){var u=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var o,u;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(u=this._tiles[o].el,u.onload=c,u.onerror=c,!u.complete)){u.src=x;var S=this._tiles[o].coords;at(u),delete this._tiles[o],this.fire("tileabort",{tile:u,coords:S})}},_removeTile:function(o){var u=this._tiles[o];if(u)return u.el.setAttribute("src",x),ps.prototype._removeTile.call(this,o)},_tileReady:function(o,u,S){if(!(!this._map||S&&S.getAttribute("src")===x))return ps.prototype._tileReady.call(this,o,u,S)}});function ay(o,u){return new so(o,u)}var ly=so.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,u){this._url=o;var S=i({},this.defaultWmsParams);for(var R in u)R in this.options||(S[R]=u[R]);u=p(this,u);var I=u.detectRetina&&we.retina?2:1,D=this.getTileSize();S.width=D.x*I,S.height=D.y*I,this.wmsParams=S},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,so.prototype.onAdd.call(this,o)},getTileUrl:function(o){var u=this._tileCoordsToNwSe(o),S=this._crs,R=oe(S.project(u[0]),S.project(u[1])),I=R.min,D=R.max,q=(this._wmsVersion>=1.3&&this._crs===ey?[I.y,I.x,D.y,D.x]:[I.x,I.y,D.x,D.y]).join(","),K=so.prototype.getTileUrl.call(this,o);return K+b(this.wmsParams,K,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+q},setParams:function(o,u){return i(this.wmsParams,o),u||this.redraw(),this}});function TC(o,u){return new ly(o,u)}so.WMS=ly,ay.wms=TC;var vr=Dn.extend({options:{padding:.1},initialize:function(o){p(this,o),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Pe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,u){var S=this._map.getZoomScale(u,this._zoom),R=this._map.getSize().multiplyBy(.5+this.options.padding),I=this._map.project(this._center,u),D=R.multiplyBy(-S).add(I).subtract(this._map._getNewPixelOrigin(o,u));we.any3d?_i(this._container,D,S):Tt(this._container,D)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,u=this._map.getSize(),S=this._map.containerPointToLayerPoint(u.multiplyBy(-o)).round();this._bounds=new J(S,S.add(u.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),uy=vr.extend({options:{tolerance:0},getEvents:function(){var o=vr.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){vr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");Ce(o,"mousemove",this._onMouseMove,this),Ce(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ce(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){$(this._redrawRequest),delete this._ctx,at(this._container),Ke(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var u in this._layers)o=this._layers[u],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vr.prototype._update.call(this);var o=this._bounds,u=this._container,S=o.getSize(),R=we.retina?2:1;Tt(u,o.min),u.width=R*S.x,u.height=R*S.y,u.style.width=S.x+"px",u.style.height=S.y+"px",we.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){vr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[d(o)]=o;var u=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var u=o._order,S=u.next,R=u.prev;S?S.prev=R:this._drawLast=R,R?R.next=S:this._drawFirst=S,delete o._order,delete this._layers[d(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var u=o.options.dashArray.split(/[, ]+/),S=[],R,I;for(I=0;I')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),SC={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(vr.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var u=o._container=ms("shape");Pe(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",o._path=ms("path"),u.appendChild(o._path),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){var u=o._container;this._container.appendChild(u),o.options.interactive&&o.addInteractiveTarget(u)},_removePath:function(o){var u=o._container;at(u),o.removeInteractiveTarget(u),delete this._layers[d(o)]},_updateStyle:function(o){var u=o._stroke,S=o._fill,R=o.options,I=o._container;I.stroked=!!R.stroke,I.filled=!!R.fill,R.stroke?(u||(u=o._stroke=ms("stroke")),I.appendChild(u),u.weight=R.weight+"px",u.color=R.color,u.opacity=R.opacity,R.dashArray?u.dashStyle=h(R.dashArray)?R.dashArray.join(" "):R.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=R.lineCap.replace("butt","flat"),u.joinstyle=R.lineJoin):u&&(I.removeChild(u),o._stroke=null),R.fill?(S||(S=o._fill=ms("fill")),I.appendChild(S),S.color=R.fillColor||R.color,S.opacity=R.fillOpacity):S&&(I.removeChild(S),o._fill=null)},_updateCircle:function(o){var u=o._point.round(),S=Math.round(o._radius),R=Math.round(o._radiusY||S);this._setPath(o,o._empty()?"M0 0":"AL "+u.x+","+u.y+" "+S+","+R+" 0,"+65535*360)},_setPath:function(o,u){o._path.v=u},_bringToFront:function(o){eo(o._container)},_bringToBack:function(o){to(o._container)}},Ja=we.vml?ms:ve,gs=vr.extend({_initContainer:function(){this._container=Ja("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ja("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){at(this._container),Ke(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vr.prototype._update.call(this);var o=this._bounds,u=o.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,S.setAttribute("width",u.x),S.setAttribute("height",u.y)),Tt(S,o.min),S.setAttribute("viewBox",[o.min.x,o.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(o){var u=o._path=Ja("path");o.options.className&&Pe(u,o.options.className),o.options.interactive&&Pe(u,"leaflet-interactive"),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){at(o._path),o.removeInteractiveTarget(o._path),delete this._layers[d(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var u=o._path,S=o.options;u&&(S.stroke?(u.setAttribute("stroke",S.color),u.setAttribute("stroke-opacity",S.opacity),u.setAttribute("stroke-width",S.weight),u.setAttribute("stroke-linecap",S.lineCap),u.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?u.setAttribute("stroke-dasharray",S.dashArray):u.removeAttribute("stroke-dasharray"),S.dashOffset?u.setAttribute("stroke-dashoffset",S.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),S.fill?(u.setAttribute("fill",S.fillColor||S.color),u.setAttribute("fill-opacity",S.fillOpacity),u.setAttribute("fill-rule",S.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(o,u){this._setPath(o,se(o._parts,u))},_updateCircle:function(o){var u=o._point,S=Math.max(Math.round(o._radius),1),R=Math.max(Math.round(o._radiusY),1)||S,I="a"+S+","+R+" 0 1,0 ",D=o._empty()?"M0 0":"M"+(u.x-S)+","+u.y+I+S*2+",0 "+I+-S*2+",0 ";this._setPath(o,D)},_setPath:function(o,u){o._path.setAttribute("d",u)},_bringToFront:function(o){eo(o._path)},_bringToBack:function(o){to(o._path)}});we.vml&&gs.include(SC);function dy(o){return we.svg||we.vml?new gs(o):null}Oe.include({getRenderer:function(o){var u=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var u=this._paneRenderers[o];return u===void 0&&(u=this._createRenderer({pane:o}),this._paneRenderers[o]=u),u},_createRenderer:function(o){return this.options.preferCanvas&&cy(o)||dy(o)}});var fy=io.extend({initialize:function(o,u){io.prototype.initialize.call(this,this._boundsToLatLngs(o),u)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=fe(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function EC(o,u){return new fy(o,u)}gs.create=Ja,gs.pointsToPath=se,gr.geometryToLayer=qa,gr.coordsToLatLng=$d,gr.coordsToLatLngs=Za,gr.latLngToCoords=Fd,gr.latLngsToCoords=Ga,gr.getFeature=oo,gr.asFeature=Ya,Oe.mergeOptions({boxZoom:!0});var hy=er.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){Ce(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){at(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),as(),bd(),this._startPoint=this._map.mouseEventToContainerPoint(o),Ce(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),Pe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var u=new J(this._point,this._startPoint),S=u.getSize();Tt(this._box,u.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(at(this._box),_t(this._container,"leaflet-crosshair")),ls(),Td(),Ke(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var u=new ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Oe.addInitHook("addHandler","boxZoom",hy),Oe.mergeOptions({doubleClickZoom:!0});var py=er.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var u=this._map,S=u.getZoom(),R=u.options.zoomDelta,I=o.originalEvent.shiftKey?S-R:S+R;u.options.doubleClickZoom==="center"?u.setZoom(I):u.setZoomAround(o.containerPoint,I)}});Oe.addInitHook("addHandler","doubleClickZoom",py),Oe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var my=er.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new jr(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}Pe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_t(this._map._container,"leaflet-grab"),_t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=fe(this._map.options.maxBounds);this._offsetLimit=oe(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var u=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(u),this._prunePositions(u)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,u){return o-(o-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;o.xu.max.x&&(o.x=this._viscousLimit(o.x,u.max.x)),o.y>u.max.y&&(o.y=this._viscousLimit(o.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,u=Math.round(o/2),S=this._initialWorldOffset,R=this._draggable._newPos.x,I=(R-u+S)%o+u-S,D=(R+u+S)%o-u-S,q=Math.abs(I+S)0?D:-D))-u;this._delta=0,this._startTime=null,q&&(o.options.scrollWheelZoom==="center"?o.setZoom(u+q):o.setZoomAround(this._lastMousePos,u+q))}});Oe.addInitHook("addHandler","scrollWheelZoom",vy);var xC=600;Oe.mergeOptions({tapHold:we.touchNative&&we.safari&&we.mobile,tapTolerance:15});var yy=er.extend({addHooks:function(){Ce(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var u=o.touches[0];this._startPos=this._newPos=new W(u.clientX,u.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ce(document,"touchend",Mt),Ce(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),xC),Ce(document,"touchend touchcancel contextmenu",this._cancel,this),Ce(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Ke(document,"touchend",Mt),Ke(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)},_onMove:function(o){var u=o.touches[0];this._newPos=new W(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,u){var S=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});S._simulated=!0,u.target.dispatchEvent(S)}});Oe.addInitHook("addHandler","tapHold",yy),Oe.mergeOptions({touchZoom:we.touch,bounceAtZoomLimits:!0});var _y=er.extend({addHooks:function(){Pe(this._map._container,"leaflet-touch-zoom"),Ce(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_t(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var u=this._map;if(!(!o.touches||o.touches.length!==2||u._animatingZoom||this._zooming)){var S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(S.add(R)._divideBy(2))),this._startDist=S.distanceTo(R),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),Ce(document,"touchmove",this._onTouchMove,this),Ce(document,"touchend touchcancel",this._onTouchEnd,this),Mt(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var u=this._map,S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]),I=S.distanceTo(R)/this._startDist;if(this._zoom=u.getScaleZoom(I,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoomu.getMaxZoom()&&I>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,I===1)return}else{var D=S._add(R)._divideBy(2)._subtract(this._centerPoint);if(I===1&&D.x===0&&D.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(D),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),$(this._animRequest);var q=a(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(q,this,!0),Mt(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,$(this._animRequest),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Oe.addInitHook("addHandler","touchZoom",_y),Oe.BoxZoom=hy,Oe.DoubleClickZoom=py,Oe.Drag=my,Oe.Keyboard=gy,Oe.ScrollWheelZoom=vy,Oe.TapHold=yy,Oe.TouchZoom=_y,n.Bounds=J,n.Browser=we,n.CRS=be,n.Canvas=uy,n.Circle=Dd,n.CircleMarker=Va,n.Class=z,n.Control=Mn,n.DivIcon=sy,n.DivOverlay=tr,n.DomEvent=Hk,n.DomUtil=Bk,n.Draggable=jr,n.Evented=B,n.FeatureGroup=pr,n.GeoJSON=gr,n.GridLayer=ps,n.Handler=er,n.Icon=ro,n.ImageOverlay=Ka,n.LatLng=de,n.LatLngBounds=ce,n.Layer=Dn,n.LayerGroup=no,n.LineUtil=tC,n.Map=Oe,n.Marker=Wa,n.Mixin=Kk,n.Path=zr,n.Point=W,n.PolyUtil=nC,n.Polygon=io,n.Polyline=mr,n.Popup=Xa,n.PosAnimation=Uv,n.Projection=rC,n.Rectangle=fy,n.Renderer=vr,n.SVG=gs,n.SVGOverlay=oy,n.TileLayer=so,n.Tooltip=Qa,n.Transformation=V,n.Util=F,n.VideoOverlay=iy,n.bind=a,n.bounds=oe,n.canvas=cy,n.circle=dC,n.circleMarker=cC,n.control=ds,n.divIcon=wC,n.extend=i,n.featureGroup=aC,n.geoJSON=ry,n.geoJson=pC,n.gridLayer=bC,n.icon=lC,n.imageOverlay=mC,n.latLng=ue,n.latLngBounds=fe,n.layerGroup=sC,n.map=Wk,n.marker=uC,n.point=G,n.polygon=hC,n.polyline=fC,n.popup=yC,n.rectangle=EC,n.setOptions=p,n.stamp=d,n.svg=dy,n.svgOverlay=vC,n.tileLayer=ay,n.tooltip=_C,n.transformation=Z,n.version=r,n.videoOverlay=gC;var kC=window.L;n.noConflict=function(){return window.L=kC,this},window.L=n})})(H4,Bp);function Up(e,t,n,r,i,s){if(i-r<=n)return;const a=r+i>>1;gx(e,t,a,r,i,s%2),Up(e,t,n,r,a-1,s+1),Up(e,t,n,a+1,i,s+1)}function gx(e,t,n,r,i,s){for(;i>r;){if(i-r>600){const y=i-r+1,_=n-r+1,c=Math.log(y),f=.5*Math.exp(2*c/3),w=.5*Math.sqrt(c*f*(y-f)/y)*(_-y/2<0?-1:1),v=Math.max(r,Math.floor(n-_*f/y+w)),p=Math.min(i,Math.floor(n+(y-_)*f/y+w));gx(e,t,n,v,p,s)}const a=t[2*n+s];let l=r,d=i;for(Is(e,t,r,n),t[2*i+s]>a&&Is(e,t,r,i);la;)d--}t[2*r+s]===a?Is(e,t,r,d):(d++,Is(e,t,d,i)),d<=n&&(r=d+1),n<=d&&(i=d-1)}}function Is(e,t,n,r){Sh(e,n,r),Sh(t,2*n,2*r),Sh(t,2*n+1,2*r+1)}function Sh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function W4(e,t,n,r,i,s,a){const l=[0,e.length-1,0],d=[];let y,_;for(;l.length;){const c=l.pop(),f=l.pop(),w=l.pop();if(f-w<=a){for(let b=w;b<=f;b++)y=t[2*b],_=t[2*b+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[b]);continue}const v=Math.floor((w+f)/2);y=t[2*v],_=t[2*v+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[v]);const p=(c+1)%2;(c===0?n<=y:r<=_)&&(l.push(w),l.push(v-1),l.push(p)),(c===0?i>=y:s>=_)&&(l.push(v+1),l.push(f),l.push(p))}return d}function V4(e,t,n,r,i,s){const a=[0,e.length-1,0],l=[],d=i*i;for(;a.length;){const y=a.pop(),_=a.pop(),c=a.pop();if(_-c<=s){for(let b=c;b<=_;b++)wb(t[2*b],t[2*b+1],n,r)<=d&&l.push(e[b]);continue}const f=Math.floor((c+_)/2),w=t[2*f],v=t[2*f+1];wb(w,v,n,r)<=d&&l.push(e[f]);const p=(y+1)%2;(y===0?n-i<=w:r-i<=v)&&(a.push(c),a.push(f-1),a.push(p)),(y===0?n+i>=w:r+i>=v)&&(a.push(f+1),a.push(_),a.push(p))}return l}function wb(e,t,n,r){const i=e-n,s=t-r;return i*i+s*s}const q4=e=>e[0],Z4=e=>e[1];class bb{constructor(t,n=q4,r=Z4,i=64,s=Float64Array){this.nodeSize=i,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),d=this.coords=new s(t.length*2);for(let y=0;ye},oc=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class Y4{constructor(t){this.options=Ks(Object.create(G4),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:n,minZoom:r,maxZoom:i,nodeSize:s}=this.options;n&&console.time("total time");const a=`prepare ${t.length} points`;n&&console.time(a),this.points=t;let l=[];for(let d=0;d=r;d--){const y=+Date.now();l=this._cluster(l,d),this.trees[d]=new bb(l,Sb,Eb,s,Float32Array),n&&console.log("z%d: %d clusters in %dms",d,l.length,+Date.now()-y)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const _=this.getClusters([r,i,180,a],n),c=this.getClusters([-180,i,s,a],n);return _.concat(c)}const l=this.trees[this._limitZoom(n)],d=l.range(Zl(r),Gl(a),Zl(s),Gl(i)),y=[];for(const _ of d){const c=l.points[_];y.push(c.numPoints?Tb(c):this.points[c.index])}return y}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),i="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(i);const a=s.points[n];if(!a)throw new Error(i);const l=this.options.radius/(this.options.extent*Math.pow(2,r-1)),d=s.within(a.x,a.y,l),y=[];for(const _ of d){const c=s.points[_];c.parentId===t&&y.push(c.numPoints?Tb(c):this.points[c.index])}if(y.length===0)throw new Error(i);return y}getLeaves(t,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,t,n,r,0),i}getTile(t,n,r){const i=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:a,radius:l}=this.options,d=l/a,y=(r-d)/s,_=(r+1+d)/s,c={features:[]};return this._addTileFeatures(i.range((n-d)/s,y,(n+1+d)/s,_),i.points,n,r,s,c),n===0&&this._addTileFeatures(i.range(1-d/s,y,1,_),i.points,s,r,s,c),n===s-1&&this._addTileFeatures(i.range(0,y,d/s,_),i.points,-1,r,s,c),c.features.length?c:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,i,s){const a=this.getChildren(n);for(const l of a){const d=l.properties;if(d&&d.cluster?s+d.point_count<=i?s+=d.point_count:s=this._appendLeaves(t,d.cluster_id,r,i,s):sn&&(v+=b.numPoints||1)}if(v>w&&v>=l){let p=_.x*w,b=_.y*w,g=a&&w>1?this._map(_,!0):null;const m=(y<<5)+(n+1)+this.points.length;for(const h of f){const T=c.points[h];if(T.zoom<=n)continue;T.zoom=n;const x=T.numPoints||1;p+=T.x*x,b+=T.y*x,T.parentId=m,a&&(g||(g=this._map(_,!0)),a(g,this._map(T)))}_.parentId=m,r.push(K4(p/v,b/v,m,v,g))}else if(r.push(_),v>1)for(const p of f){const b=c.points[p];b.zoom<=n||(b.zoom=n,r.push(b))}}return r}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n){if(t.numPoints)return n?Ks({},t.properties):t.properties;const r=this.points[t.index].properties,i=this.options.map(r);return n&&i===r?Ks({},i):i}}function K4(e,t,n,r,i){return{x:oc(e),y:oc(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function X4(e,t){const[n,r]=e.geometry.coordinates;return{x:oc(Zl(n)),y:oc(Gl(r)),zoom:1/0,index:t,parentId:-1}}function Tb(e){return{type:"Feature",id:e.id,properties:vx(e),geometry:{type:"Point",coordinates:[Q4(e.x),J4(e.y)]}}}function vx(e){const t=e.numPoints,n=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${Math.round(t/100)/10}k`:t;return Ks(Ks({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Zl(e){return e/360+.5}function Gl(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Q4(e){return(e-.5)*360}function J4(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Ks(e,t){for(const n in t)e[n]=t[n];return e}function Sb(e){return e.x}function Eb(e){return e.y}var ge={},sc={},ez={get exports(){return sc},set exports(e){sc=e}};(function(e,t){(function(n,r){var i="0.7.33",s="",a="?",l="function",d="undefined",y="object",_="string",c="major",f="model",w="name",v="type",p="vendor",b="version",g="architecture",m="console",h="mobile",T="tablet",x="smarttv",k="wearable",P="embedded",E=350,A="Amazon",C="Apple",N="ASUS",$="BlackBerry",F="Browser",z="Chrome",U="Edge",H="Firefox",B="Google",W="Huawei",Y="LG",G="Microsoft",J="Motorola",oe="Opera",ce="Samsung",fe="Sharp",de="Sony",ue="Xiaomi",be="Zebra",ne="Facebook",O=function(xe,Ne){var Ae={};for(var Je in xe)Ne[Je]&&Ne[Je].length%2===0?Ae[Je]=Ne[Je].concat(xe[Je]):Ae[Je]=xe[Je];return Ae},j=function(xe){for(var Ne={},Ae=0;Ae0?Ge.length===2?typeof Ge[1]==l?this[Ge[0]]=Ge[1].call(this,cn):this[Ge[0]]=Ge[1]:Ge.length===3?typeof Ge[1]===l&&!(Ge[1].exec&&Ge[1].test)?this[Ge[0]]=cn?Ge[1].call(this,cn,Ge[2]):r:this[Ge[0]]=cn?cn.replace(Ge[1],Ge[2]):r:Ge.length===4&&(this[Ge[0]]=cn?Ge[3].call(this,cn.replace(Ge[1],Ge[2])):r):this[Ge]=cn||r;Ae+=2}},se=function(xe,Ne){for(var Ae in Ne)if(typeof Ne[Ae]===y&&Ne[Ae].length>0){for(var Je=0;JeE?te(Le,E):Le,this},this.setUA(Ae),this};ze.VERSION=i,ze.BROWSER=j([w,b,c]),ze.CPU=j([g]),ze.DEVICE=j([f,p,v,m,h,x,T,k,P]),ze.ENGINE=ze.OS=j([w,b]),e.exports&&(t=e.exports=ze),t.UAParser=ze;var Be=typeof n!==d&&(n.jQuery||n.Zepto);if(Be&&!Be.ua){var qe=new ze;Be.ua=qe.getResult(),Be.ua.get=function(){return qe.getUA()},Be.ua.set=function(xe){qe.setUA(xe);var Ne=qe.getResult();for(var Ae in Ne)Be.ua[Ae]=Ne[Ae]}}})(typeof window=="object"?window:Kr)})(ez,sc);Object.defineProperty(ge,"__esModule",{value:!0});function tz(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Yt=ee,Qe=tz(Yt),yx=sc,gi=new yx,Xt=gi.getBrowser(),nz=gi.getCPU(),bn=gi.getDevice(),wv=gi.getEngine(),vi=gi.getOS(),Oa=gi.getUA(),_x=function(t){return gi.setUA(t)},Ma=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new yx(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},wx=Object.freeze({ClientUAInstance:gi,browser:Xt,cpu:nz,device:bn,engine:wv,os:vi,ua:Oa,setUa:_x,parseUserAgent:Ma});function xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rz(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function On(e,t){if(e==null)return{};var n=lz(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uz(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yl(e)}function cz(e,t){return dz(e)||fz(e,t)||hz(e,t)||pz()}function dz(e){if(Array.isArray(e))return e}function fz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){s=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function hz(e,t){if(e){if(typeof e=="string")return Cb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cb(e,t)}}function Cb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},bv=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Tv=function(t){var n=bv();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},yz=function(t,n,r,i,s){return{isBrowser:t,browserMajorVersion:Ee(n.major),browserFullVersion:Ee(n.version),browserName:Ee(n.name),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}},Pb=function(t,n,r,i){return rz({},t,{vendor:Ee(n.vendor),model:Ee(n.model),os:Ee(r.name),osVersion:Ee(r.version),ua:Ee(i)})},_z=function(t,n,r,i){return{isSmartTV:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},wz=function(t,n,r,i){return{isConsole:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},bz=function(t,n,r,i){return{isWearable:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},Tz=function(t,n,r,i,s){return{isEmbedded:t,vendor:Ee(n.vendor),model:Ee(n.model),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}};function Sz(e){var t=e?Ma(e):wx,n=t.device,r=t.browser,i=t.engine,s=t.os,a=t.ua,l=gz(n.type),d=l.isBrowser,y=l.isMobile,_=l.isTablet,c=l.isSmartTV,f=l.isConsole,w=l.isWearable,v=l.isEmbedded;if(d)return yz(d,r,i,s,a);if(c)return _z(c,i,s,a);if(f)return wz(f,i,s,a);if(y||_)return Pb(l,n,s,a);if(w)return bz(w,i,s,a);if(v)return Tz(v,n,i,s,a)}var bx=function(t){var n=t.type;return n===Vt.Mobile},Tx=function(t){var n=t.type;return n===Vt.Tablet},Sx=function(t){var n=t.type;return n===Vt.Mobile||n===Vt.Tablet},Ex=function(t){var n=t.type;return n===Vt.SmartTv},ac=function(t){var n=t.type;return n===Vt.Browser},xx=function(t){var n=t.type;return n===Vt.Wearable},kx=function(t){var n=t.type;return n===Vt.Console},Cx=function(t){var n=t.type;return n===Vt.Embedded},Px=function(t){var n=t.vendor;return Ee(n)},Ax=function(t){var n=t.model;return Ee(n)},Lx=function(t){var n=t.type;return Ee(n,"browser")},Rx=function(t){var n=t.name;return n===ns.Android},Ix=function(t){var n=t.name;return n===ns.Windows},Nx=function(t){var n=t.name;return n===ns.MAC_OS},Ox=function(t){var n=t.name;return n===ns.WindowsPhone},Mx=function(t){var n=t.name;return n===ns.IOS},Dx=function(t){var n=t.version;return Ee(n)},$x=function(t){var n=t.name;return Ee(n)},Fx=function(t){var n=t.name;return n===un.Chrome},jx=function(t){var n=t.name;return n===un.Firefox},zx=function(t){var n=t.name;return n===un.Chromium},lc=function(t){var n=t.name;return n===un.Edge},Bx=function(t){var n=t.name;return n===un.Yandex},Ux=function(t){var n=t.name;return n===un.Safari||n===un.MobileSafari},Hx=function(t){var n=t.name;return n===un.MobileSafari},Wx=function(t){var n=t.name;return n===un.Opera},Vx=function(t){var n=t.name;return n===un.InternetExplorer||n===un.Ie},qx=function(t){var n=t.name;return n===un.MIUI},Zx=function(t){var n=t.name;return n===un.SamsungBrowser},Gx=function(t){var n=t.version;return Ee(n)},Yx=function(t){var n=t.major;return Ee(n)},Kx=function(t){var n=t.name;return Ee(n)},Xx=function(t){var n=t.name;return Ee(n)},Qx=function(t){var n=t.version;return Ee(n)},Jx=function(){var t=bv(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},No=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},ek=function(){var t=bv();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},sr=function(){return Tv("iPad")},tk=function(){return Tv("iPhone")},nk=function(){return Tv("iPod")},rk=function(t){return Ee(t)};function ik(e){var t=e||wx,n=t.device,r=t.browser,i=t.os,s=t.engine,a=t.ua;return{isSmartTV:Ex(n),isConsole:kx(n),isWearable:xx(n),isEmbedded:Cx(n),isMobileSafari:Hx(r)||sr(),isChromium:zx(r),isMobile:Sx(n)||sr(),isMobileOnly:bx(n),isTablet:Tx(n)||sr(),isBrowser:ac(n),isDesktop:ac(n),isAndroid:Rx(i),isWinPhone:Ox(i),isIOS:Mx(i)||sr(),isChrome:Fx(r),isFirefox:jx(r),isSafari:Ux(r),isOpera:Wx(r),isIE:Vx(r),osVersion:Dx(i),osName:$x(i),fullBrowserVersion:Gx(r),browserVersion:Yx(r),browserName:Kx(r),mobileVendor:Px(n),mobileModel:Ax(n),engineName:Xx(s),engineVersion:Qx(s),getUA:rk(a),isEdge:lc(r)||No(a),isYandex:Bx(r),deviceType:Lx(n),isIOS13:ek(),isIPad13:sr(),isIPhone13:tk(),isIPod13:nk(),isElectron:Jx(),isEdgeChromium:No(a),isLegacyEdge:lc(r)&&!No(a),isWindows:Ix(i),isMacOs:Nx(i),isMIUI:qx(r),isSamsungBrowser:Zx(r)}}var ok=Ex(bn),sk=kx(bn),ak=xx(bn),Ez=Cx(bn),xz=Hx(Xt)||sr(),kz=zx(Xt),hd=Sx(bn)||sr(),lk=bx(bn),uk=Tx(bn)||sr(),ck=ac(bn),Cz=ac(bn),dk=Rx(vi),fk=Ox(vi),hk=Mx(vi)||sr(),Pz=Fx(Xt),Az=jx(Xt),Lz=Ux(Xt),Rz=Wx(Xt),pk=Vx(Xt),Iz=Dx(vi),Nz=$x(vi),Oz=Gx(Xt),Mz=Yx(Xt),Dz=Kx(Xt),$z=Px(bn),Fz=Ax(bn),jz=Xx(wv),zz=Qx(wv),Bz=rk(Oa),Uz=lc(Xt)||No(Oa),Hz=Bx(Xt),Wz=Lx(bn),Vz=ek(),qz=sr(),Zz=tk(),Gz=nk(),Yz=Jx(),Kz=No(Oa),Xz=lc(Xt)&&!No(Oa),Qz=Ix(vi),Jz=Nx(vi),e6=qx(Xt),t6=Zx(Xt),n6=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Ma(t),r=n.device,i=n.browser,s=n.os,a=n.engine,l=n.ua;return ik({device:r,browser:i,os:s,engine:a,ua:l})},r6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return dk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},i6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ck?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},o6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return pk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},s6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return hk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},a6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return hd?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},l6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return uk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},u6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return fk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},c6=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=On(t,["renderWithFragment","children","viewClassName","style"]);return lk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},d6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ok?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},f6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return sk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},h6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ak?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},p6=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=t.condition,s=On(t,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",s,r):null};function m6(e){return function(t){az(n,t);function n(r){var i;return iz(this,n),i=uz(this,Wp(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(Yl(i)),i.onOrientationChange=i.onOrientationChange.bind(Yl(i)),i.onPageLoad=i.onPageLoad.bind(Yl(i)),i.state={isLandscape:!1,isPortrait:!1},i}return oz(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Xs(window))!==void 0&&hd&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return Qe.createElement(e,Hp({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Qe.Component)}function g6(){var e=Yt.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=cz(e,2),n=t[0],r=t[1],i=Yt.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return Yt.useEffect(function(){return(typeof window>"u"?"undefined":Xs(window))!==void 0&&hd&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function mk(e){var t=e||window.navigator.userAgent;return Ma(t)}function v6(e){var t=e||window.navigator.userAgent,n=mk(t),r=ik(n);return[r,n]}ge.AndroidView=r6;ge.BrowserTypes=un;ge.BrowserView=i6;ge.ConsoleView=f6;ge.CustomView=p6;ge.IEView=o6;ge.IOSView=s6;ge.MobileOnlyView=c6;ge.MobileView=a6;ge.OsTypes=ns;ge.SmartTVView=d6;ge.TabletView=l6;ge.WearableView=h6;ge.WinPhoneView=u6;ge.browserName=Dz;ge.browserVersion=Mz;ge.deviceDetect=Sz;ge.deviceType=Wz;ge.engineName=jz;ge.engineVersion=zz;ge.fullBrowserVersion=Oz;ge.getSelectorsByUserAgent=n6;ge.getUA=Bz;ge.isAndroid=dk;ge.isBrowser=ck;ge.isChrome=Pz;ge.isChromium=kz;ge.isConsole=sk;ge.isDesktop=Cz;ge.isEdge=Uz;ge.isEdgeChromium=Kz;ge.isElectron=Yz;ge.isEmbedded=Ez;ge.isFirefox=Az;ge.isIE=pk;ge.isIOS=hk;ge.isIOS13=Vz;ge.isIPad13=qz;ge.isIPhone13=Zz;ge.isIPod13=Gz;ge.isLegacyEdge=Xz;ge.isMIUI=e6;ge.isMacOs=Jz;ge.isMobile=hd;var y6=ge.isMobileOnly=lk;ge.isMobileSafari=xz;ge.isOpera=Rz;ge.isSafari=Lz;ge.isSamsungBrowser=t6;ge.isSmartTV=ok;ge.isTablet=uk;ge.isWearable=ak;ge.isWinPhone=fk;ge.isWindows=Qz;ge.isYandex=Hz;ge.mobileModel=Fz;ge.mobileVendor=$z;ge.osName=Nz;ge.osVersion=Iz;ge.parseUserAgent=Ma;ge.setUserAgent=vz;ge.useDeviceData=mk;ge.useDeviceSelectors=v6;ge.useMobileOrientation=g6;ge.withOrientationChange=m6;function _6({sites:e,projectPoint:t}){function n(r){const{x:i,y:s}=t([r.latitude,r.longitude]);return M("div",{className:"leaflet-tooltip site-label leaflet-zoom-animated leaflet-tooltip-top",style:{opacity:1,transform:`translate3d(calc(${i}px - 50%), ${s-25}px, 0px)`},children:r.site})}return!e||!e.length?null:M("div",{className:"sites-layer",children:e.map(n)})}class qi extends ee.Component{render(){const{children:t,node:n}=this.props;return n?uL.createPortal(t,n):null}}function w6({svg:e,regions:t,projectPoint:n,styles:r}){function i(s){const a=[],l=s.points.map(n);return l.forEach((d,y)=>{if(y{const y=s.name in r?r[s.name]:r.default;return M("line",{id:`${s.name}_style`,markerStart:"none",...d,style:y})})}return!t||!t.length?null:M(qi,{node:e,children:M("g",{id:"regions-layer",className:"narrative",children:t.map(i)})})}function b6({getCategoryColor:e,categories:t,projectPoint:n,styleLocation:r,selected:i,narrative:s,onSelect:a,svg:l,locations:d,eventRadius:y,coloringSet:_,filterColors:c,features:f}){function w(g,m){const h=g.shiftKey?i.concat(m.events):m.events;a(h)}function v(){return M(Ln,{children:M("circle",{className:"event-hover",cx:"0",cy:"0",r:"10",stroke:qn.primaryHighlight,fillOpacity:"0.0"})})}function p(g){const m=gg([g],_),h={stroke:qn.darkBackground,strokeWidth:0,fillOpacity:s?1:mg(g.events.length)};return M(_v,{radius:y,colorPercentMap:fg(c,m),styles:{...h},className:"location-event-marker"})}function b(g){if(!g.latitude||!g.longitude)return null;const{x:m,y:h}=n([g.latitude,g.longitude]);if(s){const{steps:P}=s,E=C=>P.map(N=>N.id).includes(C.id);if(g.events.filter(E).length<=0)return null}const T=r?r(g):null,x=()=>M(Ln,{children:T[1]}),k=i.reduce((P,E)=>P||E.latitude===g.latitude&&E.longitude===g.longitude,!1);return M("svg",{children:ie("g",{className:`location-event ${s?"no-hover":""}`,transform:`translate(${m}, ${h})`,onClick:P=>w(P,g),children:[p(g),x?x():null,k?null:v()]})},Zt(g))}return M(qi,{node:l,children:M("svg",{children:M("g",{className:"event-locations",children:d.map(b)})})})}const T6=()=>M("defs",{children:ie("radialGradient",{id:"clusterGradient",children:[M("stop",{offset:"10%",stopColor:"red"}),M("stop",{offset:"90%",stopColor:"transparent"})]})});function S6({cluster:e,size:t,projectPoint:n,totalPoints:r,styles:i,renderHover:s,onClick:a,getClusterChildren:l,coloringSet:d,filterColors:y}){const{cluster_id:_}=e.properties,c=l(_),f=gg(c,d),{coordinates:w}=e.geometry,[v,p]=w,{x:b,y:g}=n([p,v]),[m,h]=ee.useState(!1);return!Ra(p)||!Ia(v)?null:M("svg",{children:ie("g",{className:"cluster-event",transform:`translate(${b}, ${g})`,onClick:T=>a({id:_,latitude:p,longitude:v}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[M(_v,{radius:t,colorPercentMap:fg(y,f),styles:{...i},className:"cluster-event-marker"}),m?s(e):null]})})}function E6({projectPoint:e,onSelect:t,getClusterChildren:n,coloringSet:r,isRadial:i,svg:s,clusters:a,filterColors:l,selected:d}){const y=US(a),_={fill:i?"url('#clusterGradient')":qn.fallbackEventColor,stroke:qn.darkBackground,strokeWidth:0};function c(f,w){return ie(Ln,{children:[M("text",{textAnchor:"middle",y:"3px",style:{fontWeight:"bold",fill:"black",zIndex:1e4},children:f}),M("circle",{className:"event-hover",cx:"0",cy:"0",r:w+2,stroke:qn.primaryHighlight,fillOpacity:"0.0"})]})}return M(qi,{node:s,children:M("svg",{children:ie("g",{className:"cluster-locations",children:[i?M(T6,{}):null,a.map((f,w)=>{const v=f.properties.point_count,p=BS(v,y);return M(S6,{onClick:t,getClusterChildren:n,coloringSet:r,cluster:f,filterColors:l,size:p,projectPoint:e,totalPoints:y,styles:{..._,fillOpacity:sD(v,y)},renderHover:()=>c(v,p)},w)})]})})})}class x6 extends ee.Component{renderMarker(t){const{x:n,y:r}=this.props.projectPoint([t.latitude,t.longitude]),i=this.props.styles,s=t.radius?t.radius+5:24;return M("g",{className:"location-marker",transform:`translate(${n-s}, ${r})`,children:M("path",{className:"leaflet-interactive",stroke:i?i.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:i?i["stroke-width"]:2,strokeLinecap:"",strokeLinejoin:"round",strokeDasharray:i?i["stroke-dasharray"]:"2,2",fill:"none",d:`M0,0a${s},${s} 0 1,0 ${s*2},0 a${s},${s} 0 1,0 -${s*2},0 `})},Zt(t))}render(){return M(qi,{node:this.props.svg,children:this.props.selected.map(t=>this.renderMarker(t))})}}const k6={strokeOpacity:1,strokeWidth:0,strokeDasharray:"none",stroke:"none"};function C6({styles:e,onSelectNarrative:t,svg:n,narrative:r,narratives:i,projectPoint:s,features:a}){function l(b){const g=b&&b in e?b:"default";return e[g]}const d=i&&i.length!==0;function y(b){return b.latitude===""||b.longitude===""}function _(b,g,m){const h=Math.sqrt((g.x-b.x)*(g.x-b.x)+(g.y-b.y)*(g.y-b.y)),T=Math.atan2(g.y-b.y,g.x-b.x),x=Math.atan2(1,2),k=10,P=h<24?h/2:24,E={x:g.x-P*Math.cos(T),y:g.y-P*Math.sin(T)},A={x:E.x-k*Math.cos(-T-x),y:E.y+k*Math.sin(-T-x)},C={x:E.x-k*Math.cos(-T+x),y:E.y+k*Math.sin(-T+x)};return M("path",{className:"narrative-step-arrow",d:` + */(function(e,t){(function(n,r){r(t)})(Kr,function(n){var r="1.9.3";function i(o){var u,S,R,I;for(S=1,R=arguments.length;S"u"||!L||!L.Mixin)){o=h(o)?o:[o];for(var u=0;u0?Math.floor(o):Math.ceil(o)};W.prototype={clone:function(){return new W(this.x,this.y)},add:function(o){return this.clone()._add(G(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(G(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new W(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new W(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Y(this.x),this.y=Y(this.y),this},distanceTo:function(o){o=G(o);var u=o.x-this.x,S=o.y-this.y;return Math.sqrt(u*u+S*S)},equals:function(o){return o=G(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=G(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function G(o,u,S){return o instanceof W?o:h(o)?new W(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new W(o.x,o.y):new W(o,u,S)}function J(o,u){if(o)for(var S=u?[o,u]:o,R=0,I=S.length;R=this.min.x&&S.x<=this.max.x&&u.y>=this.min.y&&S.y<=this.max.y},intersects:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>=u.x&&R.x<=S.x,q=I.y>=u.y&&R.y<=S.y;return D&&q},overlaps:function(o){o=oe(o);var u=this.min,S=this.max,R=o.min,I=o.max,D=I.x>u.x&&R.xu.y&&R.y=u.lat&&I.lat<=S.lat&&R.lng>=u.lng&&I.lng<=S.lng},intersects:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>=u.lat&&R.lat<=S.lat,q=I.lng>=u.lng&&R.lng<=S.lng;return D&&q},overlaps:function(o){o=fe(o);var u=this._southWest,S=this._northEast,R=o.getSouthWest(),I=o.getNorthEast(),D=I.lat>u.lat&&R.latu.lng&&R.lng1,Ek=function(){var o=!1;try{var u=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",c,u),window.removeEventListener("testPassiveEventSupport",c,u)}catch{}return o}(),xk=function(){return!!document.createElement("canvas").getContext}(),md=!!(document.createElementNS&&ve("svg").createSVGRect),kk=!!md&&function(){var o=document.createElement("div");return o.innerHTML="",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Ck=!md&&function(){try{var o=document.createElement("div");o.innerHTML='';var u=o.firstChild;return u.style.behavior="url(#default#VML)",u&&typeof u.adj=="object"}catch{return!1}}(),Ak=navigator.platform.indexOf("Mac")===0,Pk=navigator.platform.indexOf("Linux")===0;function Qn(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var we={ie:ft,ielt9:xt,edge:ze,webkit:Be,android:qe,android23:xe,androidStock:Pe,opera:Je,chrome:Le,gecko:yi,safari:Ge,phantom:Fr,opera12:cn,win:Da,ie3d:rs,webkit3d:pd,gecko3d:Ev,any3d:vk,mobile:is,mobileWebkit:yk,mobileWebkit3d:_k,msPointer:xv,pointer:kv,touch:wk,touchNative:Cv,mobileOpera:bk,mobileGecko:Tk,retina:Sk,passiveEvents:Ek,canvas:xk,svg:md,vml:Ck,inlineSvg:kk,mac:Ak,linux:Pk},Av=we.msPointer?"MSPointerDown":"pointerdown",Pv=we.msPointer?"MSPointerMove":"pointermove",Lv=we.msPointer?"MSPointerUp":"pointerup",Rv=we.msPointer?"MSPointerCancel":"pointercancel",gd={touchstart:Av,touchmove:Pv,touchend:Lv,touchcancel:Rv},Iv={touchstart:Mk,touchmove:$a,touchend:$a,touchcancel:$a},Ji={},Nv=!1;function Lk(o,u,S){return u==="touchstart"&&Ok(),Iv[u]?(S=Iv[u].bind(this,S),o.addEventListener(gd[u],S,!1),S):(console.warn("wrong event specified:",u),c)}function Rk(o,u,S){if(!gd[u]){console.warn("wrong event specified:",u);return}o.removeEventListener(gd[u],S,!1)}function Ik(o){Ji[o.pointerId]=o}function Nk(o){Ji[o.pointerId]&&(Ji[o.pointerId]=o)}function Ov(o){delete Ji[o.pointerId]}function Ok(){Nv||(document.addEventListener(Av,Ik,!0),document.addEventListener(Pv,Nk,!0),document.addEventListener(Lv,Ov,!0),document.addEventListener(Rv,Ov,!0),Nv=!0)}function $a(o,u){if(u.pointerType!==(u.MSPOINTER_TYPE_MOUSE||"mouse")){u.touches=[];for(var S in Ji)u.touches.push(Ji[S]);u.changedTouches=[u],o(u)}}function Mk(o,u){u.MSPOINTER_TYPE_TOUCH&&u.pointerType===u.MSPOINTER_TYPE_TOUCH&&Dt(u),$a(o,u)}function Dk(o){var u={},S,R;for(R in o)S=o[R],u[R]=S&&S.bind?S.bind(o):S;return o=u,u.type="dblclick",u.detail=2,u.isTrusted=!1,u._simulated=!0,u}var $k=200;function Fk(o,u){o.addEventListener("dblclick",u);var S=0,R;function I(D){if(D.detail!==1){R=D.detail;return}if(!(D.pointerType==="mouse"||D.sourceCapabilities&&!D.sourceCapabilities.firesTouchEvents)){var q=jv(D);if(!(q.some(function(X){return X instanceof HTMLLabelElement&&X.attributes.for})&&!q.some(function(X){return X instanceof HTMLInputElement||X instanceof HTMLSelectElement}))){var K=Date.now();K-S<=$k?(R++,R===2&&u(Dk(D))):R=1,S=K}}}return o.addEventListener("click",I),{dblclick:u,simDblclick:I}}function jk(o,u){o.removeEventListener("dblclick",u.dblclick),o.removeEventListener("click",u.simDblclick)}var vd=za(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),os=za(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Mv=os==="webkitTransition"||os==="OTransition"?os+"End":"transitionend";function Dv(o){return typeof o=="string"?document.getElementById(o):o}function ss(o,u){var S=o.style[u]||o.currentStyle&&o.currentStyle[u];if((!S||S==="auto")&&document.defaultView){var R=document.defaultView.getComputedStyle(o,null);S=R?R[u]:null}return S==="auto"?null:S}function Fe(o,u,S){var R=document.createElement(o);return R.className=u||"",S&&S.appendChild(R),R}function at(o){var u=o.parentNode;u&&u.removeChild(o)}function Fa(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function eo(o){var u=o.parentNode;u&&u.lastChild!==o&&u.appendChild(o)}function to(o){var u=o.parentNode;u&&u.firstChild!==o&&u.insertBefore(o,u.firstChild)}function yd(o,u){if(o.classList!==void 0)return o.classList.contains(u);var S=ja(o);return S.length>0&&new RegExp("(^|\\s)"+u+"(\\s|$)").test(S)}function Ae(o,u){if(o.classList!==void 0)for(var S=v(u),R=0,I=S.length;R0?2*window.devicePixelRatio:1;function Bv(o){return we.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/Uk:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function Ld(o,u){var S=u.relatedTarget;if(!S)return!0;try{for(;S&&S!==o;)S=S.parentNode}catch{return!1}return S!==o}var Hk={__proto__:null,on:Ce,off:Ke,stopPropagation:bi,disableScrollPropagation:Pd,disableClickPropagation:cs,preventDefault:Dt,stop:Ti,getPropagationPath:jv,getMousePosition:zv,getWheelDelta:Bv,isExternalTarget:Ld,addListener:Ce,removeListener:Ke},Uv=B.extend({run:function(o,u,S,R){this.stop(),this._el=o,this._inProgress=!0,this._duration=S||.25,this._easeOutPower=1/Math.max(R||.5,.2),this._startPos=wi(o),this._offset=u.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=N(this._animate,this),this._step()},_step:function(o){var u=+new Date-this._startTime,S=this._duration*1e3;uthis.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,u){this._enforcingBounds=!0;var S=this.getCenter(),R=this._limitCenter(S,this._zoom,fe(o));return S.equals(R)||this.panTo(R,u),this._enforcingBounds=!1,this},panInside:function(o,u){u=u||{};var S=G(u.paddingTopLeft||u.padding||[0,0]),R=G(u.paddingBottomRight||u.padding||[0,0]),I=this.project(this.getCenter()),D=this.project(o),q=this.getPixelBounds(),K=oe([q.min.add(S),q.max.subtract(R)]),X=K.getSize();if(!K.contains(D)){this._enforcingBounds=!0;var re=D.subtract(K.getCenter()),he=K.extend(D).getSize().subtract(X);I.x+=re.x<0?-he.x:he.x,I.y+=re.y<0?-he.y:he.y,this.panTo(this.unproject(I),u),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var u=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var S=this.getSize(),R=u.divideBy(2).round(),I=S.divideBy(2).round(),D=R.subtract(I);return!D.x&&!D.y?this:(o.animate&&o.pan?this.panBy(D):(o.pan&&this._rawPanBy(D),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:u,newSize:S}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var u=a(this._handleGeolocationResponse,this),S=a(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(u,S,o):navigator.geolocation.getCurrentPosition(u,S,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var u=o.code,S=o.message||(u===1?"permission denied":u===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:u,message:"Geolocation error: "+S+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var u=o.coords.latitude,S=o.coords.longitude,R=new de(u,S),I=R.toBounds(o.coords.accuracy*2),D=this._locateOptions;if(D.setView){var q=this.getBoundsZoom(I);this.setView(R,D.maxZoom?Math.min(q,D.maxZoom):q)}var K={latlng:R,bounds:I,timestamp:o.timestamp};for(var X in o.coords)typeof o.coords[X]=="number"&&(K[X]=o.coords[X]);this.fire("locationfound",K)}},addHandler:function(o,u){if(!u)return this;var S=this[o]=new u(this);return this._handlers.push(S),this.options[o]&&S.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),at(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&($(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)at(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,u){var S="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),R=Fe("div",S,u||this._mapPane);return o&&(this._panes[o]=R),R},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),u=this.unproject(o.getBottomLeft()),S=this.unproject(o.getTopRight());return new ce(u,S)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,u,S){o=fe(o),S=G(S||[0,0]);var R=this.getZoom()||0,I=this.getMinZoom(),D=this.getMaxZoom(),q=o.getNorthWest(),K=o.getSouthEast(),X=this.getSize().subtract(S),re=oe(this.project(K,R),this.project(q,R)).getSize(),he=we.any3d?this.options.zoomSnap:1,Se=X.x/re.x,Re=X.y/re.y,En=u?Math.max(Se,Re):Math.min(Se,Re);return R=this.getScaleZoom(En,R),he&&(R=Math.round(R/(he/100))*(he/100),R=u?Math.ceil(R/he)*he:Math.floor(R/he)*he),Math.max(I,Math.min(D,R))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new W(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,u){var S=this._getTopLeftPoint(o,u);return new J(S,S.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,u){var S=this.options.crs;return u=u===void 0?this._zoom:u,S.scale(o)/S.scale(u)},getScaleZoom:function(o,u){var S=this.options.crs;u=u===void 0?this._zoom:u;var R=S.zoom(o*S.scale(u));return isNaN(R)?1/0:R},project:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.latLngToPoint(ue(o),u)},unproject:function(o,u){return u=u===void 0?this._zoom:u,this.options.crs.pointToLatLng(G(o),u)},layerPointToLatLng:function(o){var u=G(o).add(this.getPixelOrigin());return this.unproject(u)},latLngToLayerPoint:function(o){var u=this.project(ue(o))._round();return u._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(ue(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(fe(o))},distance:function(o,u){return this.options.crs.distance(ue(o),ue(u))},containerPointToLayerPoint:function(o){return G(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return G(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var u=this.containerPointToLayerPoint(G(o));return this.layerPointToLatLng(u)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ue(o)))},mouseEventToContainerPoint:function(o){return zv(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var u=this._container=Dv(o);if(u){if(u._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ce(u,"scroll",this._onScroll,this),this._containerId=d(u)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&we.any3d,Ae(o,"leaflet-container"+(we.touch?" leaflet-touch":"")+(we.retina?" leaflet-retina":"")+(we.ielt9?" leaflet-oldie":"")+(we.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var u=ss(o,"position");u!=="absolute"&&u!=="relative"&&u!=="fixed"&&u!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Tt(this._mapPane,new W(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ae(o.markerPane,"leaflet-zoom-hide"),Ae(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,u,S){Tt(this._mapPane,new W(0,0));var R=!this._loaded;this._loaded=!0,u=this._limitZoom(u),this.fire("viewprereset");var I=this._zoom!==u;this._moveStart(I,S)._move(o,u)._moveEnd(I),this.fire("viewreset"),R&&this.fire("load")},_moveStart:function(o,u){return o&&this.fire("zoomstart"),u||this.fire("movestart"),this},_move:function(o,u,S,R){u===void 0&&(u=this._zoom);var I=this._zoom!==u;return this._zoom=u,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),R?S&&S.pinch&&this.fire("zoom",S):((I||S&&S.pinch)&&this.fire("zoom",S),this.fire("move",S)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return $(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){Tt(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[d(this._container)]=this;var u=o?Ke:Ce;u(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&u(window,"resize",this._onResize,this),we.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){$(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,u){for(var S=[],R,I=u==="mouseout"||u==="mouseover",D=o.target||o.srcElement,q=!1;D;){if(R=this._targets[d(D)],R&&(u==="click"||u==="preclick")&&this._draggableMoved(R)){q=!0;break}if(R&&R.listens(u,!0)&&(I&&!Ld(D,o)||(S.push(R),I))||D===this._container)break;D=D.parentNode}return!S.length&&!q&&!I&&this.listens(u,!0)&&(S=[this]),S},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var u=o.target||o.srcElement;if(!(!this._loaded||u._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(u))){var S=o.type;S==="mousedown"&&Ed(u),this._fireDOMEvent(o,S)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,u,S){if(o.type==="click"){var R=i({},o);R.type="preclick",this._fireDOMEvent(R,R.type,S)}var I=this._findEventTargets(o,u);if(S){for(var D=[],q=0;q0?Math.round(o-u)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(u))},_limitZoom:function(o){var u=this.getMinZoom(),S=this.getMaxZoom(),R=we.any3d?this.options.zoomSnap:1;return R&&(o=Math.round(o/R)*R),Math.max(u,Math.min(S,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_t(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,u){var S=this._getCenterOffset(o)._trunc();return(u&&u.animate)!==!0&&!this.getSize().contains(S)?!1:(this.panBy(S,u),!0)},_createAnimProxy:function(){var o=this._proxy=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(u){var S=vd,R=this._proxy.style[S];_i(this._proxy,this.project(u.center,u.zoom),this.getZoomScale(u.zoom,1)),R===this._proxy.style[S]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){at(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),u=this.getZoom();_i(this._proxy,this.project(o,u),this.getZoomScale(u,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,u,S){if(this._animatingZoom)return!0;if(S=S||{},!this._zoomAnimated||S.animate===!1||this._nothingToAnimate()||Math.abs(u-this._zoom)>this.options.zoomAnimationThreshold)return!1;var R=this.getZoomScale(u),I=this._getCenterOffset(o)._divideBy(1-1/R);return S.animate!==!0&&!this.getSize().contains(I)?!1:(N(function(){this._moveStart(!0,!1)._animateZoom(o,u,!0)},this),!0)},_animateZoom:function(o,u,S,R){this._mapPane&&(S&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=u,Ae(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:u,noUpdate:R}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_t(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Wk(o,u){return new Oe(o,u)}var Mn=z.extend({options:{position:"topright"},initialize:function(o){p(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var u=this._map;return u&&u.removeControl(this),this.options.position=o,u&&u.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var u=this._container=this.onAdd(o),S=this.getPosition(),R=o._controlCorners[S];return Ae(u,"leaflet-control"),S.indexOf("bottom")!==-1?R.insertBefore(u,R.firstChild):R.appendChild(u),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(at(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),ds=function(o){return new Mn(o)};Oe.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},u="leaflet-",S=this._controlContainer=Fe("div",u+"control-container",this._container);function R(I,D){var q=u+I+" "+u+D;o[I+D]=Fe("div",q,S)}R("top","left"),R("top","right"),R("bottom","left"),R("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)at(this._controlCorners[o]);at(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Hv=Mn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,u,S,R){return S1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=u&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var u=this._getLayer(d(o.target)),S=u.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;S&&this._map.fire(S,u)},_createRadioElement:function(o,u){var S='",R=document.createElement("div");return R.innerHTML=S,R.firstChild},_addItem:function(o){var u=document.createElement("label"),S=this._map.hasLayer(o.layer),R;o.overlay?(R=document.createElement("input"),R.type="checkbox",R.className="leaflet-control-layers-selector",R.defaultChecked=S):R=this._createRadioElement("leaflet-base-layers_"+d(this),S),this._layerControlInputs.push(R),R.layerId=d(o.layer),Ce(R,"click",this._onInputClick,this);var I=document.createElement("span");I.innerHTML=" "+o.name;var D=document.createElement("span");u.appendChild(D),D.appendChild(R),D.appendChild(I);var q=o.overlay?this._overlaysList:this._baseLayersList;return q.appendChild(u),this._checkDisabledLayers(),u},_onInputClick:function(){var o=this._layerControlInputs,u,S,R=[],I=[];this._handlingClick=!0;for(var D=o.length-1;D>=0;D--)u=o[D],S=this._getLayer(u.layerId).layer,u.checked?R.push(S):u.checked||I.push(S);for(D=0;D=0;I--)u=o[I],S=this._getLayer(u.layerId).layer,u.disabled=S.options.minZoom!==void 0&&RS.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;Ce(o,"click",Dt),this.expand(),setTimeout(function(){Ke(o,"click",Dt)})}}),Vk=function(o,u,S){return new Hv(o,u,S)},Rd=Mn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(o){var u="leaflet-control-zoom",S=Fe("div",u+" leaflet-bar"),R=this.options;return this._zoomInButton=this._createButton(R.zoomInText,R.zoomInTitle,u+"-in",S,this._zoomIn),this._zoomOutButton=this._createButton(R.zoomOutText,R.zoomOutTitle,u+"-out",S,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),S},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,u,S,R,I){var D=Fe("a",S,R);return D.innerHTML=o,D.href="#",D.title=u,D.setAttribute("role","button"),D.setAttribute("aria-label",u),cs(D),Ce(D,"click",Ti),Ce(D,"click",I,this),Ce(D,"click",this._refocusOnMap,this),D},_updateDisabled:function(){var o=this._map,u="leaflet-disabled";_t(this._zoomInButton,u),_t(this._zoomOutButton,u),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(Ae(this._zoomOutButton,u),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(Ae(this._zoomInButton,u),this._zoomInButton.setAttribute("aria-disabled","true"))}});Oe.mergeOptions({zoomControl:!0}),Oe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Rd,this.addControl(this.zoomControl))});var qk=function(o){return new Rd(o)},Wv=Mn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var u="leaflet-control-scale",S=Fe("div",u),R=this.options;return this._addScales(R,u+"-line",S),o.on(R.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),S},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,u,S){o.metric&&(this._mScale=Fe("div",u,S)),o.imperial&&(this._iScale=Fe("div",u,S))},_update:function(){var o=this._map,u=o.getSize().y/2,S=o.distance(o.containerPointToLatLng([0,u]),o.containerPointToLatLng([this.options.maxWidth,u]));this._updateScales(S)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var u=this._getRoundNum(o),S=u<1e3?u+" m":u/1e3+" km";this._updateScale(this._mScale,S,u/o)},_updateImperial:function(o){var u=o*3.2808399,S,R,I;u>5280?(S=u/5280,R=this._getRoundNum(S),this._updateScale(this._iScale,R+" mi",R/S)):(I=this._getRoundNum(u),this._updateScale(this._iScale,I+" ft",I/u))},_updateScale:function(o,u,S){o.style.width=Math.round(this.options.maxWidth*S)+"px",o.innerHTML=u},_getRoundNum:function(o){var u=Math.pow(10,(Math.floor(o)+"").length-1),S=o/u;return S=S>=10?10:S>=5?5:S>=3?3:S>=2?2:1,u*S}}),Zk=function(o){return new Wv(o)},Gk='',Id=Mn.extend({options:{position:"bottomright",prefix:''+(we.inlineSvg?Gk+" ":"")+"Leaflet"},initialize:function(o){p(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),cs(this._container);for(var u in o._layers)o._layers[u].getAttribution&&this.addAttribution(o._layers[u].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var u in this._attributions)this._attributions[u]&&o.push(u);var S=[];this.options.prefix&&S.push(this.options.prefix),o.length&&S.push(o.join(", ")),this._container.innerHTML=S.join(' ')}}});Oe.mergeOptions({attributionControl:!0}),Oe.addInitHook(function(){this.options.attributionControl&&new Id().addTo(this)});var Yk=function(o){return new Id(o)};Mn.Layers=Hv,Mn.Zoom=Rd,Mn.Scale=Wv,Mn.Attribution=Id,ds.layers=Vk,ds.zoom=qk,ds.scale=Zk,ds.attribution=Yk;var er=z.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});er.addTo=function(o,u){return o.addHandler(u,this),this};var Kk={Events:H},Vv=we.touch?"touchstart mousedown":"mousedown",jr=B.extend({options:{clickTolerance:3},initialize:function(o,u,S,R){p(this,R),this._element=o,this._dragStartTarget=u||o,this._preventOutline=S},enable:function(){this._enabled||(Ce(this._dragStartTarget,Vv,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(jr._dragging===this&&this.finishDrag(!0),Ke(this._dragStartTarget,Vv,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!yd(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){jr._dragging===this&&this.finishDrag();return}if(!(jr._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(jr._dragging=this,this._preventOutline&&Ed(this._element),bd(),as(),!this._moving)){this.fire("down");var u=o.touches?o.touches[0]:o,S=$v(this._element);this._startPoint=new W(u.clientX,u.clientY),this._startPos=wi(this._element),this._parentScale=xd(S);var R=o.type==="mousedown";Ce(document,R?"mousemove":"touchmove",this._onMove,this),Ce(document,R?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var u=o.touches&&o.touches.length===1?o.touches[0]:o,S=new W(u.clientX,u.clientY)._subtract(this._startPoint);!S.x&&!S.y||Math.abs(S.x)+Math.abs(S.y)D&&(q=K,D=X);D>S&&(u[q]=1,Nd(o,u,S,R,q),Nd(o,u,S,q,I))}function Jk(o,u){for(var S=[o[0]],R=1,I=0,D=o.length;Ru&&(S.push(o[R]),I=R);return Iu.max.x&&(S|=2),o.yu.max.y&&(S|=8),S}function eC(o,u){var S=u.x-o.x,R=u.y-o.y;return S*S+R*R}function fs(o,u,S,R){var I=u.x,D=u.y,q=S.x-I,K=S.y-D,X=q*q+K*K,re;return X>0&&(re=((o.x-I)*q+(o.y-D)*K)/X,re>1?(I=S.x,D=S.y):re>0&&(I+=q*re,D+=K*re)),q=o.x-I,K=o.y-D,R?q*q+K*K:new W(I,D)}function Sn(o){return!h(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Kv(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Sn(o)}function Xv(o,u){var S,R,I,D,q,K,X,re;if(!o||o.length===0)throw new Error("latlngs not passed");Sn(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var he=[];for(var Se in o)he.push(u.project(ue(o[Se])));var Re=he.length;for(S=0,R=0;SR){X=(D-R)/I,re=[K.x-X*(K.x-q.x),K.y-X*(K.y-q.y)];break}return u.unproject(G(re))}var tC={__proto__:null,simplify:qv,pointToSegmentDistance:Zv,closestPointOnSegment:Xk,clipSegment:Yv,_getEdgeIntersection:Ha,_getBitCode:Si,_sqClosestPointOnSegment:fs,isFlat:Sn,_flat:Kv,polylineCenter:Xv};function Qv(o,u,S){var R,I=[1,4,2,8],D,q,K,X,re,he,Se,Re;for(D=0,he=o.length;D1e-7;K++)re=I*Math.sin(q),re=Math.pow((1-re)/(1+re),I/2),X=Math.PI/2-2*Math.atan(D*re)-q,q+=X;return new de(q*u,o.x*u/S)}},rC={__proto__:null,LonLat:Od,Mercator:Md,SphericalMercator:j},iC=i({},ne,{code:"EPSG:3395",projection:Md,transformation:function(){var o=.5/(Math.PI*Md.R);return Z(o,.5,-o,.5)}()}),ey=i({},ne,{code:"EPSG:4326",projection:Od,transformation:Z(1/180,1,-1/180,.5)}),oC=i({},be,{projection:Od,transformation:Z(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,u){var S=u.lng-o.lng,R=u.lat-o.lat;return Math.sqrt(S*S+R*R)},infinite:!0});be.Earth=ne,be.EPSG3395=iC,be.EPSG3857=Q,be.EPSG900913=te,be.EPSG4326=ey,be.Simple=oC;var Dn=B.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[d(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[d(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var u=o.target;if(u.hasLayer(this)){if(this._map=u,this._zoomAnimated=u._zoomAnimated,this.getEvents){var S=this.getEvents();u.on(S,this),this.once("remove",function(){u.off(S,this)},this)}this.onAdd(u),this.fire("add"),u.fire("layeradd",{layer:this})}}});Oe.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var u=d(o);return this._layers[u]?this:(this._layers[u]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var u=d(o);return this._layers[u]?(this._loaded&&o.onRemove(this),delete this._layers[u],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return d(o)in this._layers},eachLayer:function(o,u){for(var S in this._layers)o.call(u,this._layers[S]);return this},_addLayers:function(o){o=o?h(o)?o:[o]:[];for(var u=0,S=o.length;uthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&u[0]instanceof de&&u[0].equals(u[S-1])&&u.pop(),u},_setLatLngs:function(o){mr.prototype._setLatLngs.call(this,o),Sn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Sn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,u=this.options.weight,S=new W(u,u);if(o=new J(o.min.subtract(S),o.max.add(S)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var R=0,I=this._rings.length,D;Ro.y!=I.y>o.y&&o.x<(I.x-R.x)*(o.y-R.y)/(I.y-R.y)+R.x&&(u=!u);return u||mr.prototype._containsPoint.call(this,o,!0)}});function hC(o,u){return new io(o,u)}var gr=pr.extend({initialize:function(o,u){p(this,u),this._layers={},o&&this.addData(o)},addData:function(o){var u=h(o)?o:o.features,S,R,I;if(u){for(S=0,R=u.length;S0?R:[u.src];return}h(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(u.style,"objectFit")&&(u.style.objectFit="fill"),u.autoplay=!!this.options.autoplay,u.loop=!!this.options.loop,u.muted=!!this.options.muted,u.playsInline=!!this.options.playsInline;for(var D=0;DI?(u.height=I+"px",Ae(o,D)):_t(o,D),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var u=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),S=this._getAnchor();Tt(this._container,u.add(S))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,u=parseInt(ss(this._container,"marginBottom"),10)||0,S=this._container.offsetHeight+u,R=this._containerWidth,I=new W(this._containerLeft,-S-this._containerBottom);I._add(wi(this._container));var D=o.layerPointToContainerPoint(I),q=G(this.options.autoPanPadding),K=G(this.options.autoPanPaddingTopLeft||q),X=G(this.options.autoPanPaddingBottomRight||q),re=o.getSize(),he=0,Se=0;D.x+R+X.x>re.x&&(he=D.x+R-re.x+X.x),D.x-he-K.x<0&&(he=D.x-K.x),D.y+S+X.y>re.y&&(Se=D.y+S-re.y+X.y),D.y-Se-K.y<0&&(Se=D.y-K.y),(he||Se)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([he,Se]))}},_getAnchor:function(){return G(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),yC=function(o,u){return new Xa(o,u)};Oe.mergeOptions({closePopupOnClick:!0}),Oe.include({openPopup:function(o,u,S){return this._initOverlay(Xa,o,u,S).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),Dn.include({bindPopup:function(o,u){return this._popup=this._initOverlay(Xa,this._popup,o,u),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof pr||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Ti(o);var u=o.layer||o.target;if(this._popup._source===u&&!(u instanceof zr)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=u,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var Qa=tr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){tr.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){tr.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=tr.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",u=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Fe("div",u),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+d(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var u,S,R=this._map,I=this._container,D=R.latLngToContainerPoint(R.getCenter()),q=R.layerPointToContainerPoint(o),K=this.options.direction,X=I.offsetWidth,re=I.offsetHeight,he=G(this.options.offset),Se=this._getAnchor();K==="top"?(u=X/2,S=re):K==="bottom"?(u=X/2,S=0):K==="center"?(u=X/2,S=re/2):K==="right"?(u=0,S=re/2):K==="left"?(u=X,S=re/2):q.xthis.options.maxZoom||SR?this._retainParent(I,D,q,R):!1)},_retainChildren:function(o,u,S,R){for(var I=2*o;I<2*o+2;I++)for(var D=2*u;D<2*u+2;D++){var q=new W(I,D);q.z=S+1;var K=this._tileCoordsToKey(q),X=this._tiles[K];if(X&&X.active){X.retain=!0;continue}else X&&X.loaded&&(X.retain=!0);S+1this.options.maxZoom||this.options.minZoom!==void 0&&I1){this._setView(o,S);return}for(var Se=I.min.y;Se<=I.max.y;Se++)for(var Re=I.min.x;Re<=I.max.x;Re++){var En=new W(Re,Se);if(En.z=this._tileZoom,!!this._isValidTile(En)){var Ei=this._tiles[this._tileCoordsToKey(En)];Ei?Ei.current=!0:q.push(En)}}if(q.sort(function(Br,zd){return Br.distanceTo(D)-zd.distanceTo(D)}),q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var el=document.createDocumentFragment();for(Re=0;ReS.max.x)||!u.wrapLat&&(o.yS.max.y))return!1}if(!this.options.bounds)return!0;var R=this._tileCoordsToBounds(o);return fe(this.options.bounds).overlaps(R)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var u=this._map,S=this.getTileSize(),R=o.scaleBy(S),I=R.add(S),D=u.unproject(R,o.z),q=u.unproject(I,o.z);return[D,q]},_tileCoordsToBounds:function(o){var u=this._tileCoordsToNwSe(o),S=new ce(u[0],u[1]);return this.options.noWrap||(S=this._map.wrapLatLngBounds(S)),S},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var u=o.split(":"),S=new W(+u[0],+u[1]);return S.z=+u[2],S},_removeTile:function(o){var u=this._tiles[o];u&&(at(u.el),delete this._tiles[o],this.fire("tileunload",{tile:u.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){Ae(o,"leaflet-tile");var u=this.getTileSize();o.style.width=u.x+"px",o.style.height=u.y+"px",o.onselectstart=c,o.onmousemove=c,we.ielt9&&this.options.opacity<1&&Tn(o,this.options.opacity)},_addTile:function(o,u){var S=this._getTilePos(o),R=this._tileCoordsToKey(o),I=this.createTile(this._wrapCoords(o),a(this._tileReady,this,o));this._initTile(I),this.createTile.length<2&&N(a(this._tileReady,this,o,null,I)),Tt(I,S),this._tiles[R]={el:I,coords:o,current:!0},u.appendChild(I),this.fire("tileloadstart",{tile:I,coords:o})},_tileReady:function(o,u,S){u&&this.fire("tileerror",{error:u,tile:S,coords:o});var R=this._tileCoordsToKey(o);S=this._tiles[R],S&&(S.loaded=+new Date,this._map._fadeAnimated?(Tn(S.el,0),$(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(S.active=!0,this._pruneTiles()),u||(Ae(S.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:S.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),we.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var u=new W(this._wrapX?_(o.x,this._wrapX):o.x,this._wrapY?_(o.y,this._wrapY):o.y);return u.z=o.z,u},_pxBoundsToTileRange:function(o){var u=this.getTileSize();return new J(o.min.unscaleBy(u).floor(),o.max.unscaleBy(u).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function bC(o){return new ps(o)}var so=ps.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,u){this._url=o,u=p(this,u),u.detectRetina&&we.retina&&u.maxZoom>0?(u.tileSize=Math.floor(u.tileSize/2),u.zoomReverse?(u.zoomOffset--,u.minZoom=Math.min(u.maxZoom,u.minZoom+1)):(u.zoomOffset++,u.maxZoom=Math.max(u.minZoom,u.maxZoom-1)),u.minZoom=Math.max(0,u.minZoom)):u.zoomReverse?u.minZoom=Math.min(u.maxZoom,u.minZoom):u.maxZoom=Math.max(u.minZoom,u.maxZoom),typeof u.subdomains=="string"&&(u.subdomains=u.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,u){return this._url===o&&u===void 0&&(u=!0),this._url=o,u||this.redraw(),this},createTile:function(o,u){var S=document.createElement("img");return Ce(S,"load",a(this._tileOnLoad,this,u,S)),Ce(S,"error",a(this._tileOnError,this,u,S)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(S.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(S.referrerPolicy=this.options.referrerPolicy),S.alt="",S.src=this.getTileUrl(o),S},getTileUrl:function(o){var u={r:we.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var S=this._globalTileRange.max.y-o.y;this.options.tms&&(u.y=S),u["-y"]=S}return m(this._url,i(u,this.options))},_tileOnLoad:function(o,u){we.ielt9?setTimeout(a(o,this,null,u),0):o(null,u)},_tileOnError:function(o,u,S){var R=this.options.errorTileUrl;R&&u.getAttribute("src")!==R&&(u.src=R),o(S,u)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,u=this.options.maxZoom,S=this.options.zoomReverse,R=this.options.zoomOffset;return S&&(o=u-o),o+R},_getSubdomain:function(o){var u=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[u]},_abortLoading:function(){var o,u;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(u=this._tiles[o].el,u.onload=c,u.onerror=c,!u.complete)){u.src=x;var S=this._tiles[o].coords;at(u),delete this._tiles[o],this.fire("tileabort",{tile:u,coords:S})}},_removeTile:function(o){var u=this._tiles[o];if(u)return u.el.setAttribute("src",x),ps.prototype._removeTile.call(this,o)},_tileReady:function(o,u,S){if(!(!this._map||S&&S.getAttribute("src")===x))return ps.prototype._tileReady.call(this,o,u,S)}});function ay(o,u){return new so(o,u)}var ly=so.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,u){this._url=o;var S=i({},this.defaultWmsParams);for(var R in u)R in this.options||(S[R]=u[R]);u=p(this,u);var I=u.detectRetina&&we.retina?2:1,D=this.getTileSize();S.width=D.x*I,S.height=D.y*I,this.wmsParams=S},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var u=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[u]=this._crs.code,so.prototype.onAdd.call(this,o)},getTileUrl:function(o){var u=this._tileCoordsToNwSe(o),S=this._crs,R=oe(S.project(u[0]),S.project(u[1])),I=R.min,D=R.max,q=(this._wmsVersion>=1.3&&this._crs===ey?[I.y,I.x,D.y,D.x]:[I.x,I.y,D.x,D.y]).join(","),K=so.prototype.getTileUrl.call(this,o);return K+b(this.wmsParams,K,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+q},setParams:function(o,u){return i(this.wmsParams,o),u||this.redraw(),this}});function TC(o,u){return new ly(o,u)}so.WMS=ly,ay.wms=TC;var vr=Dn.extend({options:{padding:.1},initialize:function(o){p(this,o),d(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Ae(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,u){var S=this._map.getZoomScale(u,this._zoom),R=this._map.getSize().multiplyBy(.5+this.options.padding),I=this._map.project(this._center,u),D=R.multiplyBy(-S).add(I).subtract(this._map._getNewPixelOrigin(o,u));we.any3d?_i(this._container,D,S):Tt(this._container,D)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,u=this._map.getSize(),S=this._map.containerPointToLayerPoint(u.multiplyBy(-o)).round();this._bounds=new J(S,S.add(u.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),uy=vr.extend({options:{tolerance:0},getEvents:function(){var o=vr.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){vr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");Ce(o,"mousemove",this._onMouseMove,this),Ce(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ce(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){$(this._redrawRequest),delete this._ctx,at(this._container),Ke(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var u in this._layers)o=this._layers[u],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vr.prototype._update.call(this);var o=this._bounds,u=this._container,S=o.getSize(),R=we.retina?2:1;Tt(u,o.min),u.width=R*S.x,u.height=R*S.y,u.style.width=S.x+"px",u.style.height=S.y+"px",we.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){vr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[d(o)]=o;var u=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=u),this._drawLast=u,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var u=o._order,S=u.next,R=u.prev;S?S.prev=R:this._drawLast=R,R?R.next=S:this._drawFirst=S,delete o._order,delete this._layers[d(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var u=o.options.dashArray.split(/[, ]+/),S=[],R,I;for(I=0;I')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),SC={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(vr.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var u=o._container=ms("shape");Ae(u,"leaflet-vml-shape "+(this.options.className||"")),u.coordsize="1 1",o._path=ms("path"),u.appendChild(o._path),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){var u=o._container;this._container.appendChild(u),o.options.interactive&&o.addInteractiveTarget(u)},_removePath:function(o){var u=o._container;at(u),o.removeInteractiveTarget(u),delete this._layers[d(o)]},_updateStyle:function(o){var u=o._stroke,S=o._fill,R=o.options,I=o._container;I.stroked=!!R.stroke,I.filled=!!R.fill,R.stroke?(u||(u=o._stroke=ms("stroke")),I.appendChild(u),u.weight=R.weight+"px",u.color=R.color,u.opacity=R.opacity,R.dashArray?u.dashStyle=h(R.dashArray)?R.dashArray.join(" "):R.dashArray.replace(/( *, *)/g," "):u.dashStyle="",u.endcap=R.lineCap.replace("butt","flat"),u.joinstyle=R.lineJoin):u&&(I.removeChild(u),o._stroke=null),R.fill?(S||(S=o._fill=ms("fill")),I.appendChild(S),S.color=R.fillColor||R.color,S.opacity=R.fillOpacity):S&&(I.removeChild(S),o._fill=null)},_updateCircle:function(o){var u=o._point.round(),S=Math.round(o._radius),R=Math.round(o._radiusY||S);this._setPath(o,o._empty()?"M0 0":"AL "+u.x+","+u.y+" "+S+","+R+" 0,"+65535*360)},_setPath:function(o,u){o._path.v=u},_bringToFront:function(o){eo(o._container)},_bringToBack:function(o){to(o._container)}},Ja=we.vml?ms:ve,gs=vr.extend({_initContainer:function(){this._container=Ja("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ja("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){at(this._container),Ke(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){vr.prototype._update.call(this);var o=this._bounds,u=o.getSize(),S=this._container;(!this._svgSize||!this._svgSize.equals(u))&&(this._svgSize=u,S.setAttribute("width",u.x),S.setAttribute("height",u.y)),Tt(S,o.min),S.setAttribute("viewBox",[o.min.x,o.min.y,u.x,u.y].join(" ")),this.fire("update")}},_initPath:function(o){var u=o._path=Ja("path");o.options.className&&Ae(u,o.options.className),o.options.interactive&&Ae(u,"leaflet-interactive"),this._updateStyle(o),this._layers[d(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){at(o._path),o.removeInteractiveTarget(o._path),delete this._layers[d(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var u=o._path,S=o.options;u&&(S.stroke?(u.setAttribute("stroke",S.color),u.setAttribute("stroke-opacity",S.opacity),u.setAttribute("stroke-width",S.weight),u.setAttribute("stroke-linecap",S.lineCap),u.setAttribute("stroke-linejoin",S.lineJoin),S.dashArray?u.setAttribute("stroke-dasharray",S.dashArray):u.removeAttribute("stroke-dasharray"),S.dashOffset?u.setAttribute("stroke-dashoffset",S.dashOffset):u.removeAttribute("stroke-dashoffset")):u.setAttribute("stroke","none"),S.fill?(u.setAttribute("fill",S.fillColor||S.color),u.setAttribute("fill-opacity",S.fillOpacity),u.setAttribute("fill-rule",S.fillRule||"evenodd")):u.setAttribute("fill","none"))},_updatePoly:function(o,u){this._setPath(o,se(o._parts,u))},_updateCircle:function(o){var u=o._point,S=Math.max(Math.round(o._radius),1),R=Math.max(Math.round(o._radiusY),1)||S,I="a"+S+","+R+" 0 1,0 ",D=o._empty()?"M0 0":"M"+(u.x-S)+","+u.y+I+S*2+",0 "+I+-S*2+",0 ";this._setPath(o,D)},_setPath:function(o,u){o._path.setAttribute("d",u)},_bringToFront:function(o){eo(o._path)},_bringToBack:function(o){to(o._path)}});we.vml&&gs.include(SC);function dy(o){return we.svg||we.vml?new gs(o):null}Oe.include({getRenderer:function(o){var u=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return u||(u=this._renderer=this._createRenderer()),this.hasLayer(u)||this.addLayer(u),u},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var u=this._paneRenderers[o];return u===void 0&&(u=this._createRenderer({pane:o}),this._paneRenderers[o]=u),u},_createRenderer:function(o){return this.options.preferCanvas&&cy(o)||dy(o)}});var fy=io.extend({initialize:function(o,u){io.prototype.initialize.call(this,this._boundsToLatLngs(o),u)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=fe(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function EC(o,u){return new fy(o,u)}gs.create=Ja,gs.pointsToPath=se,gr.geometryToLayer=qa,gr.coordsToLatLng=$d,gr.coordsToLatLngs=Za,gr.latLngToCoords=Fd,gr.latLngsToCoords=Ga,gr.getFeature=oo,gr.asFeature=Ya,Oe.mergeOptions({boxZoom:!0});var hy=er.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){Ce(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){at(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),as(),bd(),this._startPoint=this._map.mouseEventToContainerPoint(o),Ce(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),Ae(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var u=new J(this._point,this._startPoint),S=u.getSize();Tt(this._box,u.min),this._box.style.width=S.x+"px",this._box.style.height=S.y+"px"},_finish:function(){this._moved&&(at(this._box),_t(this._container,"leaflet-crosshair")),ls(),Td(),Ke(document,{contextmenu:Ti,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var u=new ce(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(u).fire("boxzoomend",{boxZoomBounds:u})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Oe.addInitHook("addHandler","boxZoom",hy),Oe.mergeOptions({doubleClickZoom:!0});var py=er.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var u=this._map,S=u.getZoom(),R=u.options.zoomDelta,I=o.originalEvent.shiftKey?S-R:S+R;u.options.doubleClickZoom==="center"?u.setZoom(I):u.setZoomAround(o.containerPoint,I)}});Oe.addInitHook("addHandler","doubleClickZoom",py),Oe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var my=er.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new jr(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}Ae(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_t(this._map._container,"leaflet-grab"),_t(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var u=fe(this._map.options.maxBounds);this._offsetLimit=oe(this._map.latLngToContainerPoint(u.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(u.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var u=this._lastTime=+new Date,S=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(S),this._times.push(u),this._prunePositions(u)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),u=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=u.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,u){return o-(o-u)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),u=this._offsetLimit;o.xu.max.x&&(o.x=this._viscousLimit(o.x,u.max.x)),o.y>u.max.y&&(o.y=this._viscousLimit(o.y,u.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,u=Math.round(o/2),S=this._initialWorldOffset,R=this._draggable._newPos.x,I=(R-u+S)%o+u-S,D=(R+u+S)%o-u-S,q=Math.abs(I+S)0?D:-D))-u;this._delta=0,this._startTime=null,q&&(o.options.scrollWheelZoom==="center"?o.setZoom(u+q):o.setZoomAround(this._lastMousePos,u+q))}});Oe.addInitHook("addHandler","scrollWheelZoom",vy);var xC=600;Oe.mergeOptions({tapHold:we.touchNative&&we.safari&&we.mobile,tapTolerance:15});var yy=er.extend({addHooks:function(){Ce(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var u=o.touches[0];this._startPos=this._newPos=new W(u.clientX,u.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ce(document,"touchend",Dt),Ce(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",u))},this),xC),Ce(document,"touchend touchcancel contextmenu",this._cancel,this),Ce(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Ke(document,"touchend",Dt),Ke(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)},_onMove:function(o){var u=o.touches[0];this._newPos=new W(u.clientX,u.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,u){var S=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:u.screenX,screenY:u.screenY,clientX:u.clientX,clientY:u.clientY});S._simulated=!0,u.target.dispatchEvent(S)}});Oe.addInitHook("addHandler","tapHold",yy),Oe.mergeOptions({touchZoom:we.touch,bounceAtZoomLimits:!0});var _y=er.extend({addHooks:function(){Ae(this._map._container,"leaflet-touch-zoom"),Ce(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_t(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var u=this._map;if(!(!o.touches||o.touches.length!==2||u._animatingZoom||this._zooming)){var S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=u.getSize()._divideBy(2),this._startLatLng=u.containerPointToLatLng(this._centerPoint),u.options.touchZoom!=="center"&&(this._pinchStartLatLng=u.containerPointToLatLng(S.add(R)._divideBy(2))),this._startDist=S.distanceTo(R),this._startZoom=u.getZoom(),this._moved=!1,this._zooming=!0,u._stop(),Ce(document,"touchmove",this._onTouchMove,this),Ce(document,"touchend touchcancel",this._onTouchEnd,this),Dt(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var u=this._map,S=u.mouseEventToContainerPoint(o.touches[0]),R=u.mouseEventToContainerPoint(o.touches[1]),I=S.distanceTo(R)/this._startDist;if(this._zoom=u.getScaleZoom(I,this._startZoom),!u.options.bounceAtZoomLimits&&(this._zoomu.getMaxZoom()&&I>1)&&(this._zoom=u._limitZoom(this._zoom)),u.options.touchZoom==="center"){if(this._center=this._startLatLng,I===1)return}else{var D=S._add(R)._divideBy(2)._subtract(this._centerPoint);if(I===1&&D.x===0&&D.y===0)return;this._center=u.unproject(u.project(this._pinchStartLatLng,this._zoom).subtract(D),this._zoom)}this._moved||(u._moveStart(!0,!1),this._moved=!0),$(this._animRequest);var q=a(u._move,u,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(q,this,!0),Dt(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,$(this._animRequest),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Oe.addInitHook("addHandler","touchZoom",_y),Oe.BoxZoom=hy,Oe.DoubleClickZoom=py,Oe.Drag=my,Oe.Keyboard=gy,Oe.ScrollWheelZoom=vy,Oe.TapHold=yy,Oe.TouchZoom=_y,n.Bounds=J,n.Browser=we,n.CRS=be,n.Canvas=uy,n.Circle=Dd,n.CircleMarker=Va,n.Class=z,n.Control=Mn,n.DivIcon=sy,n.DivOverlay=tr,n.DomEvent=Hk,n.DomUtil=Bk,n.Draggable=jr,n.Evented=B,n.FeatureGroup=pr,n.GeoJSON=gr,n.GridLayer=ps,n.Handler=er,n.Icon=ro,n.ImageOverlay=Ka,n.LatLng=de,n.LatLngBounds=ce,n.Layer=Dn,n.LayerGroup=no,n.LineUtil=tC,n.Map=Oe,n.Marker=Wa,n.Mixin=Kk,n.Path=zr,n.Point=W,n.PolyUtil=nC,n.Polygon=io,n.Polyline=mr,n.Popup=Xa,n.PosAnimation=Uv,n.Projection=rC,n.Rectangle=fy,n.Renderer=vr,n.SVG=gs,n.SVGOverlay=oy,n.TileLayer=so,n.Tooltip=Qa,n.Transformation=V,n.Util=F,n.VideoOverlay=iy,n.bind=a,n.bounds=oe,n.canvas=cy,n.circle=dC,n.circleMarker=cC,n.control=ds,n.divIcon=wC,n.extend=i,n.featureGroup=aC,n.geoJSON=ry,n.geoJson=pC,n.gridLayer=bC,n.icon=lC,n.imageOverlay=mC,n.latLng=ue,n.latLngBounds=fe,n.layerGroup=sC,n.map=Wk,n.marker=uC,n.point=G,n.polygon=hC,n.polyline=fC,n.popup=yC,n.rectangle=EC,n.setOptions=p,n.stamp=d,n.svg=dy,n.svgOverlay=vC,n.tileLayer=ay,n.tooltip=_C,n.transformation=Z,n.version=r,n.videoOverlay=gC;var kC=window.L;n.noConflict=function(){return window.L=kC,this},window.L=n})})(H4,Bp);function Up(e,t,n,r,i,s){if(i-r<=n)return;const a=r+i>>1;gx(e,t,a,r,i,s%2),Up(e,t,n,r,a-1,s+1),Up(e,t,n,a+1,i,s+1)}function gx(e,t,n,r,i,s){for(;i>r;){if(i-r>600){const y=i-r+1,_=n-r+1,c=Math.log(y),f=.5*Math.exp(2*c/3),w=.5*Math.sqrt(c*f*(y-f)/y)*(_-y/2<0?-1:1),v=Math.max(r,Math.floor(n-_*f/y+w)),p=Math.min(i,Math.floor(n+(y-_)*f/y+w));gx(e,t,n,v,p,s)}const a=t[2*n+s];let l=r,d=i;for(Is(e,t,r,n),t[2*i+s]>a&&Is(e,t,r,i);la;)d--}t[2*r+s]===a?Is(e,t,r,d):(d++,Is(e,t,d,i)),d<=n&&(r=d+1),n<=d&&(i=d-1)}}function Is(e,t,n,r){Sh(e,n,r),Sh(t,2*n,2*r),Sh(t,2*n+1,2*r+1)}function Sh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function W4(e,t,n,r,i,s,a){const l=[0,e.length-1,0],d=[];let y,_;for(;l.length;){const c=l.pop(),f=l.pop(),w=l.pop();if(f-w<=a){for(let b=w;b<=f;b++)y=t[2*b],_=t[2*b+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[b]);continue}const v=Math.floor((w+f)/2);y=t[2*v],_=t[2*v+1],y>=n&&y<=i&&_>=r&&_<=s&&d.push(e[v]);const p=(c+1)%2;(c===0?n<=y:r<=_)&&(l.push(w),l.push(v-1),l.push(p)),(c===0?i>=y:s>=_)&&(l.push(v+1),l.push(f),l.push(p))}return d}function V4(e,t,n,r,i,s){const a=[0,e.length-1,0],l=[],d=i*i;for(;a.length;){const y=a.pop(),_=a.pop(),c=a.pop();if(_-c<=s){for(let b=c;b<=_;b++)wb(t[2*b],t[2*b+1],n,r)<=d&&l.push(e[b]);continue}const f=Math.floor((c+_)/2),w=t[2*f],v=t[2*f+1];wb(w,v,n,r)<=d&&l.push(e[f]);const p=(y+1)%2;(y===0?n-i<=w:r-i<=v)&&(a.push(c),a.push(f-1),a.push(p)),(y===0?n+i>=w:r+i>=v)&&(a.push(f+1),a.push(_),a.push(p))}return l}function wb(e,t,n,r){const i=e-n,s=t-r;return i*i+s*s}const q4=e=>e[0],Z4=e=>e[1];class bb{constructor(t,n=q4,r=Z4,i=64,s=Float64Array){this.nodeSize=i,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new a(t.length),d=this.coords=new s(t.length*2);for(let y=0;ye},oc=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class Y4{constructor(t){this.options=Ks(Object.create(G4),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:n,minZoom:r,maxZoom:i,nodeSize:s}=this.options;n&&console.time("total time");const a=`prepare ${t.length} points`;n&&console.time(a),this.points=t;let l=[];for(let d=0;d=r;d--){const y=+Date.now();l=this._cluster(l,d),this.trees[d]=new bb(l,Sb,Eb,s,Float32Array),n&&console.log("z%d: %d clusters in %dms",d,l.length,+Date.now()-y)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const _=this.getClusters([r,i,180,a],n),c=this.getClusters([-180,i,s,a],n);return _.concat(c)}const l=this.trees[this._limitZoom(n)],d=l.range(Zl(r),Gl(a),Zl(s),Gl(i)),y=[];for(const _ of d){const c=l.points[_];y.push(c.numPoints?Tb(c):this.points[c.index])}return y}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),i="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(i);const a=s.points[n];if(!a)throw new Error(i);const l=this.options.radius/(this.options.extent*Math.pow(2,r-1)),d=s.within(a.x,a.y,l),y=[];for(const _ of d){const c=s.points[_];c.parentId===t&&y.push(c.numPoints?Tb(c):this.points[c.index])}if(y.length===0)throw new Error(i);return y}getLeaves(t,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,t,n,r,0),i}getTile(t,n,r){const i=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:a,radius:l}=this.options,d=l/a,y=(r-d)/s,_=(r+1+d)/s,c={features:[]};return this._addTileFeatures(i.range((n-d)/s,y,(n+1+d)/s,_),i.points,n,r,s,c),n===0&&this._addTileFeatures(i.range(1-d/s,y,1,_),i.points,s,r,s,c),n===s-1&&this._addTileFeatures(i.range(0,y,d/s,_),i.points,-1,r,s,c),c.features.length?c:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,i,s){const a=this.getChildren(n);for(const l of a){const d=l.properties;if(d&&d.cluster?s+d.point_count<=i?s+=d.point_count:s=this._appendLeaves(t,d.cluster_id,r,i,s):sn&&(v+=b.numPoints||1)}if(v>w&&v>=l){let p=_.x*w,b=_.y*w,g=a&&w>1?this._map(_,!0):null;const m=(y<<5)+(n+1)+this.points.length;for(const h of f){const T=c.points[h];if(T.zoom<=n)continue;T.zoom=n;const x=T.numPoints||1;p+=T.x*x,b+=T.y*x,T.parentId=m,a&&(g||(g=this._map(_,!0)),a(g,this._map(T)))}_.parentId=m,r.push(K4(p/v,b/v,m,v,g))}else if(r.push(_),v>1)for(const p of f){const b=c.points[p];b.zoom<=n||(b.zoom=n,r.push(b))}}return r}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n){if(t.numPoints)return n?Ks({},t.properties):t.properties;const r=this.points[t.index].properties,i=this.options.map(r);return n&&i===r?Ks({},i):i}}function K4(e,t,n,r,i){return{x:oc(e),y:oc(t),zoom:1/0,id:n,parentId:-1,numPoints:r,properties:i}}function X4(e,t){const[n,r]=e.geometry.coordinates;return{x:oc(Zl(n)),y:oc(Gl(r)),zoom:1/0,index:t,parentId:-1}}function Tb(e){return{type:"Feature",id:e.id,properties:vx(e),geometry:{type:"Point",coordinates:[Q4(e.x),J4(e.y)]}}}function vx(e){const t=e.numPoints,n=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${Math.round(t/100)/10}k`:t;return Ks(Ks({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:n})}function Zl(e){return e/360+.5}function Gl(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Q4(e){return(e-.5)*360}function J4(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Ks(e,t){for(const n in t)e[n]=t[n];return e}function Sb(e){return e.x}function Eb(e){return e.y}var ge={},sc={},ez={get exports(){return sc},set exports(e){sc=e}};(function(e,t){(function(n,r){var i="0.7.33",s="",a="?",l="function",d="undefined",y="object",_="string",c="major",f="model",w="name",v="type",p="vendor",b="version",g="architecture",m="console",h="mobile",T="tablet",x="smarttv",k="wearable",A="embedded",E=350,P="Amazon",C="Apple",N="ASUS",$="BlackBerry",F="Browser",z="Chrome",U="Edge",H="Firefox",B="Google",W="Huawei",Y="LG",G="Microsoft",J="Motorola",oe="Opera",ce="Samsung",fe="Sharp",de="Sony",ue="Xiaomi",be="Zebra",ne="Facebook",O=function(xe,Ne){var Pe={};for(var Je in xe)Ne[Je]&&Ne[Je].length%2===0?Pe[Je]=Ne[Je].concat(xe[Je]):Pe[Je]=xe[Je];return Pe},j=function(xe){for(var Ne={},Pe=0;Pe0?Ge.length===2?typeof Ge[1]==l?this[Ge[0]]=Ge[1].call(this,cn):this[Ge[0]]=Ge[1]:Ge.length===3?typeof Ge[1]===l&&!(Ge[1].exec&&Ge[1].test)?this[Ge[0]]=cn?Ge[1].call(this,cn,Ge[2]):r:this[Ge[0]]=cn?cn.replace(Ge[1],Ge[2]):r:Ge.length===4&&(this[Ge[0]]=cn?Ge[3].call(this,cn.replace(Ge[1],Ge[2])):r):this[Ge]=cn||r;Pe+=2}},se=function(xe,Ne){for(var Pe in Ne)if(typeof Ne[Pe]===y&&Ne[Pe].length>0){for(var Je=0;JeE?te(Le,E):Le,this},this.setUA(Pe),this};ze.VERSION=i,ze.BROWSER=j([w,b,c]),ze.CPU=j([g]),ze.DEVICE=j([f,p,v,m,h,x,T,k,A]),ze.ENGINE=ze.OS=j([w,b]),e.exports&&(t=e.exports=ze),t.UAParser=ze;var Be=typeof n!==d&&(n.jQuery||n.Zepto);if(Be&&!Be.ua){var qe=new ze;Be.ua=qe.getResult(),Be.ua.get=function(){return qe.getUA()},Be.ua.set=function(xe){qe.setUA(xe);var Ne=qe.getResult();for(var Pe in Ne)Be.ua[Pe]=Ne[Pe]}}})(typeof window=="object"?window:Kr)})(ez,sc);Object.defineProperty(ge,"__esModule",{value:!0});function tz(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Yt=ee,Qe=tz(Yt),yx=sc,gi=new yx,Xt=gi.getBrowser(),nz=gi.getCPU(),bn=gi.getDevice(),wv=gi.getEngine(),vi=gi.getOS(),Oa=gi.getUA(),_x=function(t){return gi.setUA(t)},Ma=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new yx(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(i){return n.setUA(i)}}},wx=Object.freeze({ClientUAInstance:gi,browser:Xt,cpu:nz,device:bn,engine:wv,os:vi,ua:Oa,setUa:_x,parseUserAgent:Ma});function xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rz(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function On(e,t){if(e==null)return{};var n=lz(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uz(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yl(e)}function cz(e,t){return dz(e)||fz(e,t)||hz(e,t)||pz()}function dz(e){if(Array.isArray(e))return e}function fz(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,s=!1,a,l;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(d){s=!0,l=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}return r}}function hz(e,t){if(e){if(typeof e=="string")return Cb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cb(e,t)}}function Cb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},bv=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Tv=function(t){var n=bv();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},yz=function(t,n,r,i,s){return{isBrowser:t,browserMajorVersion:Ee(n.major),browserFullVersion:Ee(n.version),browserName:Ee(n.name),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}},Ab=function(t,n,r,i){return rz({},t,{vendor:Ee(n.vendor),model:Ee(n.model),os:Ee(r.name),osVersion:Ee(r.version),ua:Ee(i)})},_z=function(t,n,r,i){return{isSmartTV:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},wz=function(t,n,r,i){return{isConsole:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},bz=function(t,n,r,i){return{isWearable:t,engineName:Ee(n.name),engineVersion:Ee(n.version),osName:Ee(r.name),osVersion:Ee(r.version),userAgent:Ee(i)}},Tz=function(t,n,r,i,s){return{isEmbedded:t,vendor:Ee(n.vendor),model:Ee(n.model),engineName:Ee(r.name),engineVersion:Ee(r.version),osName:Ee(i.name),osVersion:Ee(i.version),userAgent:Ee(s)}};function Sz(e){var t=e?Ma(e):wx,n=t.device,r=t.browser,i=t.engine,s=t.os,a=t.ua,l=gz(n.type),d=l.isBrowser,y=l.isMobile,_=l.isTablet,c=l.isSmartTV,f=l.isConsole,w=l.isWearable,v=l.isEmbedded;if(d)return yz(d,r,i,s,a);if(c)return _z(c,i,s,a);if(f)return wz(f,i,s,a);if(y||_)return Ab(l,n,s,a);if(w)return bz(w,i,s,a);if(v)return Tz(v,n,i,s,a)}var bx=function(t){var n=t.type;return n===qt.Mobile},Tx=function(t){var n=t.type;return n===qt.Tablet},Sx=function(t){var n=t.type;return n===qt.Mobile||n===qt.Tablet},Ex=function(t){var n=t.type;return n===qt.SmartTv},ac=function(t){var n=t.type;return n===qt.Browser},xx=function(t){var n=t.type;return n===qt.Wearable},kx=function(t){var n=t.type;return n===qt.Console},Cx=function(t){var n=t.type;return n===qt.Embedded},Ax=function(t){var n=t.vendor;return Ee(n)},Px=function(t){var n=t.model;return Ee(n)},Lx=function(t){var n=t.type;return Ee(n,"browser")},Rx=function(t){var n=t.name;return n===ns.Android},Ix=function(t){var n=t.name;return n===ns.Windows},Nx=function(t){var n=t.name;return n===ns.MAC_OS},Ox=function(t){var n=t.name;return n===ns.WindowsPhone},Mx=function(t){var n=t.name;return n===ns.IOS},Dx=function(t){var n=t.version;return Ee(n)},$x=function(t){var n=t.name;return Ee(n)},Fx=function(t){var n=t.name;return n===un.Chrome},jx=function(t){var n=t.name;return n===un.Firefox},zx=function(t){var n=t.name;return n===un.Chromium},lc=function(t){var n=t.name;return n===un.Edge},Bx=function(t){var n=t.name;return n===un.Yandex},Ux=function(t){var n=t.name;return n===un.Safari||n===un.MobileSafari},Hx=function(t){var n=t.name;return n===un.MobileSafari},Wx=function(t){var n=t.name;return n===un.Opera},Vx=function(t){var n=t.name;return n===un.InternetExplorer||n===un.Ie},qx=function(t){var n=t.name;return n===un.MIUI},Zx=function(t){var n=t.name;return n===un.SamsungBrowser},Gx=function(t){var n=t.version;return Ee(n)},Yx=function(t){var n=t.major;return Ee(n)},Kx=function(t){var n=t.name;return Ee(n)},Xx=function(t){var n=t.name;return Ee(n)},Qx=function(t){var n=t.version;return Ee(n)},Jx=function(){var t=bv(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},No=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},ek=function(){var t=bv();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},sr=function(){return Tv("iPad")},tk=function(){return Tv("iPhone")},nk=function(){return Tv("iPod")},rk=function(t){return Ee(t)};function ik(e){var t=e||wx,n=t.device,r=t.browser,i=t.os,s=t.engine,a=t.ua;return{isSmartTV:Ex(n),isConsole:kx(n),isWearable:xx(n),isEmbedded:Cx(n),isMobileSafari:Hx(r)||sr(),isChromium:zx(r),isMobile:Sx(n)||sr(),isMobileOnly:bx(n),isTablet:Tx(n)||sr(),isBrowser:ac(n),isDesktop:ac(n),isAndroid:Rx(i),isWinPhone:Ox(i),isIOS:Mx(i)||sr(),isChrome:Fx(r),isFirefox:jx(r),isSafari:Ux(r),isOpera:Wx(r),isIE:Vx(r),osVersion:Dx(i),osName:$x(i),fullBrowserVersion:Gx(r),browserVersion:Yx(r),browserName:Kx(r),mobileVendor:Ax(n),mobileModel:Px(n),engineName:Xx(s),engineVersion:Qx(s),getUA:rk(a),isEdge:lc(r)||No(a),isYandex:Bx(r),deviceType:Lx(n),isIOS13:ek(),isIPad13:sr(),isIPhone13:tk(),isIPod13:nk(),isElectron:Jx(),isEdgeChromium:No(a),isLegacyEdge:lc(r)&&!No(a),isWindows:Ix(i),isMacOs:Nx(i),isMIUI:qx(r),isSamsungBrowser:Zx(r)}}var ok=Ex(bn),sk=kx(bn),ak=xx(bn),Ez=Cx(bn),xz=Hx(Xt)||sr(),kz=zx(Xt),hd=Sx(bn)||sr(),lk=bx(bn),uk=Tx(bn)||sr(),ck=ac(bn),Cz=ac(bn),dk=Rx(vi),fk=Ox(vi),hk=Mx(vi)||sr(),Az=Fx(Xt),Pz=jx(Xt),Lz=Ux(Xt),Rz=Wx(Xt),pk=Vx(Xt),Iz=Dx(vi),Nz=$x(vi),Oz=Gx(Xt),Mz=Yx(Xt),Dz=Kx(Xt),$z=Ax(bn),Fz=Px(bn),jz=Xx(wv),zz=Qx(wv),Bz=rk(Oa),Uz=lc(Xt)||No(Oa),Hz=Bx(Xt),Wz=Lx(bn),Vz=ek(),qz=sr(),Zz=tk(),Gz=nk(),Yz=Jx(),Kz=No(Oa),Xz=lc(Xt)&&!No(Oa),Qz=Ix(vi),Jz=Nx(vi),e6=qx(Xt),t6=Zx(Xt),n6=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Ma(t),r=n.device,i=n.browser,s=n.os,a=n.engine,l=n.ua;return ik({device:r,browser:i,os:s,engine:a,ua:l})},r6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return dk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},i6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ck?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},o6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return pk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},s6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return hk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},a6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return hd?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},l6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return uk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},u6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return fk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},c6=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=On(t,["renderWithFragment","children","viewClassName","style"]);return lk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},d6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ok?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},f6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return sk?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},h6=function(t){var n=t.renderWithFragment,r=t.children,i=On(t,["renderWithFragment","children"]);return ak?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",i,r):null},p6=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var i=t.condition,s=On(t,["renderWithFragment","children","viewClassName","style","condition"]);return i?n?Qe.createElement(Yt.Fragment,null,r):Qe.createElement("div",s,r):null};function m6(e){return function(t){az(n,t);function n(r){var i;return iz(this,n),i=uz(this,Wp(n).call(this,r)),i.isEventListenerAdded=!1,i.handleOrientationChange=i.handleOrientationChange.bind(Yl(i)),i.onOrientationChange=i.onOrientationChange.bind(Yl(i)),i.onPageLoad=i.onPageLoad.bind(Yl(i)),i.state={isLandscape:!1,isPortrait:!1},i}return oz(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var i=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:i===0,isLandscape:i===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Xs(window))!==void 0&&hd&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return Qe.createElement(e,Hp({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Qe.Component)}function g6(){var e=Yt.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=cz(e,2),n=t[0],r=t[1],i=Yt.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return Yt.useEffect(function(){return(typeof window>"u"?"undefined":Xs(window))!==void 0&&hd&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n}function mk(e){var t=e||window.navigator.userAgent;return Ma(t)}function v6(e){var t=e||window.navigator.userAgent,n=mk(t),r=ik(n);return[r,n]}ge.AndroidView=r6;ge.BrowserTypes=un;ge.BrowserView=i6;ge.ConsoleView=f6;ge.CustomView=p6;ge.IEView=o6;ge.IOSView=s6;ge.MobileOnlyView=c6;ge.MobileView=a6;ge.OsTypes=ns;ge.SmartTVView=d6;ge.TabletView=l6;ge.WearableView=h6;ge.WinPhoneView=u6;ge.browserName=Dz;ge.browserVersion=Mz;ge.deviceDetect=Sz;ge.deviceType=Wz;ge.engineName=jz;ge.engineVersion=zz;ge.fullBrowserVersion=Oz;ge.getSelectorsByUserAgent=n6;ge.getUA=Bz;ge.isAndroid=dk;ge.isBrowser=ck;ge.isChrome=Az;ge.isChromium=kz;ge.isConsole=sk;ge.isDesktop=Cz;ge.isEdge=Uz;ge.isEdgeChromium=Kz;ge.isElectron=Yz;ge.isEmbedded=Ez;ge.isFirefox=Pz;ge.isIE=pk;ge.isIOS=hk;ge.isIOS13=Vz;ge.isIPad13=qz;ge.isIPhone13=Zz;ge.isIPod13=Gz;ge.isLegacyEdge=Xz;ge.isMIUI=e6;ge.isMacOs=Jz;ge.isMobile=hd;var y6=ge.isMobileOnly=lk;ge.isMobileSafari=xz;ge.isOpera=Rz;ge.isSafari=Lz;ge.isSamsungBrowser=t6;ge.isSmartTV=ok;ge.isTablet=uk;ge.isWearable=ak;ge.isWinPhone=fk;ge.isWindows=Qz;ge.isYandex=Hz;ge.mobileModel=Fz;ge.mobileVendor=$z;ge.osName=Nz;ge.osVersion=Iz;ge.parseUserAgent=Ma;ge.setUserAgent=vz;ge.useDeviceData=mk;ge.useDeviceSelectors=v6;ge.useMobileOrientation=g6;ge.withOrientationChange=m6;function _6({sites:e,projectPoint:t}){function n(r){const{x:i,y:s}=t([r.latitude,r.longitude]);return M("div",{className:"leaflet-tooltip site-label leaflet-zoom-animated leaflet-tooltip-top",style:{opacity:1,transform:`translate3d(calc(${i}px - 50%), ${s-25}px, 0px)`},children:r.site})}return!e||!e.length?null:M("div",{className:"sites-layer",children:e.map(n)})}class qi extends ee.Component{render(){const{children:t,node:n}=this.props;return n?uL.createPortal(t,n):null}}function w6({svg:e,regions:t,projectPoint:n,styles:r}){function i(s){const a=[],l=s.points.map(n);return l.forEach((d,y)=>{if(y{const y=s.name in r?r[s.name]:r.default;return M("line",{id:`${s.name}_style`,markerStart:"none",...d,style:y})})}return!t||!t.length?null:M(qi,{node:e,children:M("g",{id:"regions-layer",className:"narrative",children:t.map(i)})})}function b6({getCategoryColor:e,categories:t,projectPoint:n,styleLocation:r,selected:i,narrative:s,onSelect:a,svg:l,locations:d,eventRadius:y,coloringSet:_,filterColors:c,features:f}){function w(g,m){const h=g.shiftKey?i.concat(m.events):m.events;a(h)}function v(){return M(Ln,{children:M("circle",{className:"event-hover",cx:"0",cy:"0",r:"10",stroke:qn.primaryHighlight,fillOpacity:"0.0"})})}function p(g){const m=gg([g],_),h={stroke:qn.darkBackground,strokeWidth:0,fillOpacity:s?1:mg(g.events.length)};return M(_v,{radius:y,colorPercentMap:fg(c,m),styles:{...h},className:"location-event-marker"})}function b(g){if(!g.latitude||!g.longitude)return null;const{x:m,y:h}=n([g.latitude,g.longitude]);if(s){const{steps:A}=s,E=C=>A.map(N=>N.id).includes(C.id);if(g.events.filter(E).length<=0)return null}const T=r?r(g):null,x=()=>M(Ln,{children:T[1]}),k=i.reduce((A,E)=>A||E.latitude===g.latitude&&E.longitude===g.longitude,!1);return M("svg",{children:ie("g",{className:`location-event ${s?"no-hover":""}`,transform:`translate(${m}, ${h})`,onClick:A=>w(A,g),children:[p(g),x?x():null,k?null:v()]})},Gt(g))}return M(qi,{node:l,children:M("svg",{children:M("g",{className:"event-locations",children:d.map(b)})})})}const T6=()=>M("defs",{children:ie("radialGradient",{id:"clusterGradient",children:[M("stop",{offset:"10%",stopColor:"red"}),M("stop",{offset:"90%",stopColor:"transparent"})]})});function S6({cluster:e,size:t,projectPoint:n,totalPoints:r,styles:i,renderHover:s,onClick:a,getClusterChildren:l,coloringSet:d,filterColors:y}){const{cluster_id:_}=e.properties,c=l(_),f=gg(c,d),{coordinates:w}=e.geometry,[v,p]=w,{x:b,y:g}=n([p,v]),[m,h]=ee.useState(!1);return!Ra(p)||!Ia(v)?null:M("svg",{children:ie("g",{className:"cluster-event",transform:`translate(${b}, ${g})`,onClick:T=>a({id:_,latitude:p,longitude:v}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[M(_v,{radius:t,colorPercentMap:fg(y,f),styles:{...i},className:"cluster-event-marker"}),m?s(e):null]})})}function E6({projectPoint:e,onSelect:t,getClusterChildren:n,coloringSet:r,isRadial:i,svg:s,clusters:a,filterColors:l,selected:d}){const y=US(a),_={fill:i?"url('#clusterGradient')":qn.fallbackEventColor,stroke:qn.darkBackground,strokeWidth:0};function c(f,w){return ie(Ln,{children:[M("text",{textAnchor:"middle",y:"3px",style:{fontWeight:"bold",fill:"black",zIndex:1e4},children:f}),M("circle",{className:"event-hover",cx:"0",cy:"0",r:w+2,stroke:qn.primaryHighlight,fillOpacity:"0.0"})]})}return M(qi,{node:s,children:M("svg",{children:ie("g",{className:"cluster-locations",children:[i?M(T6,{}):null,a.map((f,w)=>{const v=f.properties.point_count,p=BS(v,y);return M(S6,{onClick:t,getClusterChildren:n,coloringSet:r,cluster:f,filterColors:l,size:p,projectPoint:e,totalPoints:y,styles:{..._,fillOpacity:sD(v,y)},renderHover:()=>c(v,p)},w)})]})})})}class x6 extends ee.Component{renderMarker(t){const{x:n,y:r}=this.props.projectPoint([t.latitude,t.longitude]),i=this.props.styles,s=t.radius?t.radius+5:24;return M("g",{className:"location-marker",transform:`translate(${n-s}, ${r})`,children:M("path",{className:"leaflet-interactive",stroke:i?i.stroke:qn.primaryHighlight,strokeOpacity:"1",strokeWidth:i?i["stroke-width"]:2,strokeLinecap:"",strokeLinejoin:"round",strokeDasharray:i?i["stroke-dasharray"]:"2,2",fill:"none",d:`M0,0a${s},${s} 0 1,0 ${s*2},0 a${s},${s} 0 1,0 -${s*2},0 `})},Gt(t))}render(){return M(qi,{node:this.props.svg,children:this.props.selected.map(t=>this.renderMarker(t))})}}const k6={strokeOpacity:1,strokeWidth:0,strokeDasharray:"none",stroke:"none"};function C6({styles:e,onSelectNarrative:t,svg:n,narrative:r,narratives:i,projectPoint:s,features:a}){function l(b){const g=b&&b in e?b:"default";return e[g]}const d=i&&i.length!==0;function y(b){return b.latitude===""||b.longitude===""}function _(b,g,m){const h=Math.sqrt((g.x-b.x)*(g.x-b.x)+(g.y-b.y)*(g.y-b.y)),T=Math.atan2(g.y-b.y,g.x-b.x),x=Math.atan2(1,2),k=10,A=h<24?h/2:24,E={x:g.x-A*Math.cos(T),y:g.y-A*Math.sin(T)},P={x:E.x-k*Math.cos(-T-x),y:E.y+k*Math.sin(-T-x)},C={x:E.x-k*Math.cos(-T+x),y:E.y+k*Math.sin(-T+x)};return M("path",{className:"narrative-step-arrow",d:` M ${E.x} ${E.y} - L ${A.x} ${A.y} + L ${P.x} ${P.y} L ${C.x} ${C.y} Z - `,style:{...m,fillOpacity:m.strokeOpacity,fill:m.stroke}})}function c(b,g,m){const{stroke:h,strokeWidth:T,strokeDasharray:x,strokeOpacity:k}=m;return ie("g",{children:[M("line",{className:"narrative-step",x1:b.x,x2:g.x,y1:b.y,y2:g.y,markerStart:"none",onClick:P=>t(P),style:{strokeWidth:T,strokeDasharray:x,strokeOpacity:k,stroke:h}}),h!=="none"?_(b,g,m):""]})}function f(b,g,m){if(y(b)||y(g)||!b||!g)return null;const h=s([b.latitude,b.longitude]),T=s([g.latitude,g.longitude]);return c(h,T,{...k6,...m||{}})}function w(b){if(b===null||b.id!==r.id)return null;const g=[];for(let m=0;mM("svg",{children:ie("defs",{children:[M("marker",{id:"arrow",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"red"}})}),M("marker",{id:"arrow-off",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"black",fillOpacity:.2}})})]})}),A6="/assets/map-98397b77.png",L6="/assets/sat-6c360e9c.png",R6=({isUsingSatellite:e,toggleSatellite:t})=>{const n=e?"satellite-overlay-toggle-map":"satellite-overlay-toggle-sat",r=e?A6:L6,i=e?Ue[ht].tiles.default:Ue[ht].tiles.satellite;return M("div",{id:"satellite-overlay-toggle",className:"satellite-overlay-toggle",children:M("button",{className:`satellite-overlay-toggle-button ${n}`,style:{backgroundImage:`url(${r}`},name:"satellite-toggle",onClick:t,children:M("div",{className:"label",children:i})})})},I6=["streets","satellite"],N6="your_token";let O6=class extends ee.Component{constructor(){super(),this.projectPoint=this.projectPoint.bind(this),this.onClusterSelect=this.onClusterSelect.bind(this),this.loadClusterData=this.loadClusterData.bind(this),this.getClusterChildren=this.getClusterChildren.bind(this),this.svgRef=ee.createRef(),this.map=null,this.superclusterIndex=null,this.tileLayer=null,this.state={mapTransformX:0,mapTransformY:0,indexLoaded:!1,clusters:[]},this.styleLocation=this.styleLocation.bind(this)}componentDidMount(){this.map===null&&(this.initializeMap(),this.initializeTileLayer()),window.dispatchEvent(new Event("resize"))}componentDidUpdate(t){t.ui.tile!==this.props.ui.tile&&this.map&&this.initializeTileLayer()}UNSAFE_componentWillReceiveProps(t){Pf(t.domain.locations,this.props.domain.locations)||this.loadClusterData(t.domain.locations);const{bounds:n}=t.app.map;if(!Pf(n,this.props.app.map.bounds)&&n!==null)this.map.fitBounds(n);else if(!Pf(t.app.selected,this.props.app.selected)){const r=t.app.selected.length>0?t.app.selected[0]:null;r!==null&&r.latitude&&r.longitude&&this.map.setView([r.latitude,r.longitude],this.map.getZoom(),{animate:!0,pan:{duration:.7}})}}getTileUrl(t){return I6.indexOf(this.props.ui.tiles)!==-1&&Gt.MAPBOX_TOKEN&&Gt.MAPBOX_TOKEN!==N6?`http://a.tiles.mapbox.com/v4/mapbox.${t}/{z}/{x}/{y}@2x.png?access_token=${Gt.MAPBOX_TOKEN}`:`https://api.mapbox.com/styles/v1/${t}/tiles/256/{z}/{x}/{y}@2x?access_token=${Gt.MAPBOX_TOKEN}`}initializeTileLayer(){if(!this.map)return;const t=this.getTileUrl(this.props.ui.tile);this.tileLayer?this.tileLayer.setUrl(t):(this.tileLayer=L.tileLayer(t),this.tileLayer.addTo(this.map))}initializeMap(){const{map:t,cluster:n}=this.props.app,r=L.map(this.props.ui.dom.map).setView(t.anchor,t.startZoom).setMinZoom(t.minZoom).setMaxZoom(t.maxZoom).setMaxBounds(t.maxBounds);r.attributionControl.addAttribution(`© Mapbox © OpenStreetMap Improve this map`),this.superclusterIndex=new Y4(n),r.keyboard.disable(),r.zoomControl.remove(),r.on("moveend",()=>{this.alignLayers(),this.updateClusters()}),r.on("zoomend viewreset",()=>{this.map.dragging.enable(),this.map.doubleClickZoom.enable(),this.map.scrollWheelZoom.enable(),Oo.flushSync(()=>{this.alignLayers(),this.updateClusters()})}),r.on("zoomstart",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.add("hide")}),r.on("zoomend",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.remove("hide")}),window.addEventListener("resize",()=>{this.alignLayers()}),this.map=r}getMapDetails(){const t=this.map.getBounds(),n=[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()],r=this.map.getZoom();return[n,r]}updateClusters(){const[t,n]=this.getMapDetails();this.superclusterIndex&&this.state.indexLoaded&&this.setState({clusters:this.superclusterIndex.getClusters(t,n)})}loadClusterData(t){if(t&&t.length>0&&this.superclusterIndex){const n=t.reduce((r,i)=>{const{longitude:s,latitude:a}=i;if(Ra(a)&&Ia(s)){const d={type:"Feature",properties:{cluster:!1,id:i.label},geometry:{type:"Point",coordinates:[s,a]}};r.push(d)}return r},[]);this.superclusterIndex.load(n),this.setState({indexLoaded:!0},()=>{this.updateClusters()})}else this.setState({clusters:[]})}getClusterChildren(t){if(this.superclusterIndex)try{const n=this.superclusterIndex.getLeaves(t,1/0,0);return x0(n,this.props.domain.locations)}catch{return[]}return[]}getSelectedClusters(){const{selected:t}=this.props.app,n=t.map(r=>r.id);return this.state.clusters&&this.state.clusters.length>0?this.state.clusters.reduce((r,i)=>{if(i.properties.cluster){const s=this.getClusterChildren(i.properties.cluster_id);s&&s.length>0&&s.forEach(a=>{const l=r.findIndex(d=>d.id===i.id)>=0;n.includes(a.id)&&!l&&r.push(i)})}return r},[]):[]}alignLayers(){const t=document.querySelector(".leaflet-map-pane");if(t===null)return{transformX:0,transformY:0};const n=window.getComputedStyle(t).getPropertyValue("transform");this.setState({mapTransformX:+n.split(",")[4],mapTransformY:+n.split(",")[5].split(")")[0]})}projectPoint(t){const n=new L.LatLng(t[0],t[1]);return{x:this.map.latLngToLayerPoint(n).x+this.state.mapTransformX,y:this.map.latLngToLayerPoint(n).y+this.state.mapTransformY}}onClusterSelect({id:t,latitude:n,longitude:r}){const i=Math.max(this.superclusterIndex.getClusterExpansionZoom(parseInt(t)),this.superclusterIndex.options.minZoom),a=Math.max(i+2,this.props.app.cluster.maxZoom);this.map.dragging.disable(),this.map.doubleClickZoom.disable(),this.map.scrollWheelZoom.disable(),this.map.flyTo(new L.LatLng(n,r),a)}getClientDims(){const t=document.querySelector(`#${this.props.ui.dom.map}`).getBoundingClientRect();return{width:t.width,height:t.height}}renderTiles(){const t=this.map.getPanes().overlayPane,{width:n,height:r}=this.getClientDims();return this.map?M(qi,{node:t,children:M("svg",{ref:this.svgRef,width:n,height:r,style:{transform:`translate3d(${-this.state.mapTransformX}px, ${-this.state.mapTransformY}px, 0)`},className:"leaflet-svg"})}):null}renderSites(){return M(_6,{sites:this.props.domain.sites,projectPoint:this.projectPoint,isEnabled:this.props.app.views.sites})}renderRegions(){return M(w6,{svg:this.svgRef.current,regions:this.props.domain.regions,projectPoint:this.projectPoint,styles:this.props.ui.regions})}renderNarratives(){const t=this.props.domain.narratives.length>0;return M(C6,{svg:this.svgRef.current,narratives:t?this.props.domain.narratives:[this.props.app.narrative],projectPoint:this.projectPoint,narrative:this.props.app.narrative,styles:this.props.ui.narratives,onSelectNarrative:this.props.methods.onSelectNarrative,features:this.props.features})}styleLocation(t){return[null,null]}styleCluster(t){return[null,null]}renderEvents(){const t=this.state.clusters.filter(r=>!r.properties.cluster),n=x0(t,this.props.domain.locations);return M(b6,{svg:this.svgRef.current,events:this.props.domain.events,locations:n,styleLocation:this.styleLocation,categories:this.props.domain.categories,projectPoint:this.projectPoint,selected:this.props.app.selected,narrative:this.props.app.narrative,onSelect:this.props.methods.onSelect,getCategoryColor:this.props.methods.getCategoryColor,eventRadius:this.props.ui.eventRadius,coloringSet:this.props.app.coloringSet,filterColors:this.props.ui.filterColors,features:this.props.features})}renderClusters(){const t=this.state.clusters.filter(n=>n.properties.cluster);return M(E6,{svg:this.svgRef.current,styleCluster:this.styleCluster,projectPoint:this.projectPoint,clusters:t,isRadial:this.props.ui.radial,onSelect:this.onClusterSelect,coloringSet:this.props.app.coloringSet,getClusterChildren:this.getClusterChildren,filterColors:this.props.ui.filterColors})}renderSelected(){const t=this.getSelectedClusters(),n=[];this.props.app.selected.forEach(i=>{const{latitude:s,longitude:a}=i;n.push({latitude:s,longitude:a,radius:this.props.ui.eventRadius})});const r=US(this.state.clusters);return t.forEach(i=>{if(i.properties.cluster){const{coordinates:s}=i.geometry;n.push({latitude:String(s[1]),longitude:String(s[0]),radius:BS(i.properties.point_count,r)})}}),M(x6,{svg:this.svgRef.current,selected:n,projectPoint:this.projectPoint,styles:this.props.ui.mapSelectedEvents})}renderMarkers(){return M(qi,{node:this.svgRef.current,children:M(P6,{})})}render(){const{isShowingSites:t,isFetchingDomain:n}=this.props.app.flags,r=y6||window.innerWidth<600,i=(this.props.app.narrative?"map-wrapper narrative-mode":"map-wrapper")+(r?" mobile":""),s=this.map?ie(Ln,{children:[this.renderTiles(),this.renderMarkers(),t?this.renderSites():null,this.renderRegions(),this.renderNarratives(),this.renderEvents(),this.renderClusters(),this.renderSelected()]}):null;return ie("div",{className:i,onKeyDown:this.props.onKeyDown,tabIndex:"0",children:[M("div",{id:this.props.ui.dom.map}),M(px,{isLoading:this.props.app.loading||n,ui:n,language:this.props.app.language}),this.props.features.USE_SATELLITE_OVERLAY_TOGGLE&&M(R6,{isUsingSatellite:this.props.ui.isUsingSatellite,toggleSatellite:this.props.actions.toggleTileOverlay}),s]})}};function M6(e){return{domain:{locations:g$(e),narratives:Kg(e),categories:eE(e),sites:c$(e),regions:d$(e)},app:{views:e.app.associations.views,selected:Xg(e),highlighted:e.app.highlighted,map:e.app.map,cluster:e.app.cluster,language:e.app.language,loading:e.app.loading,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,flags:{isShowingSites:e.app.flags.isShowingSites,isFetchingDomain:e.app.flags.isFetchingDomain}},ui:{tile:l$(e),isUsingSatellite:u$(e),dom:e.ui.dom,narratives:e.ui.style.narratives,mapSelectedEvents:e.ui.style.selectedEvents,regions:e.ui.style.regions,eventRadius:e.ui.eventRadius,radial:e.ui.style.clusters.radial,filterColors:e.ui.coloring.colors},features:fr(e)}}function D6(e){return{actions:Qo(rd,e)}}const $6=pi(M6,D6)(O6),F6=e=>{switch(e.kind){default:return M($6,{...e})}},j6=({query:e,eventObj:t,onSearchRowClick:n})=>{const{description:r,location:i,date:s}=t;function a(d,y){const _=d.split(new RegExp(`(${y})`,"gi"));return M("span",{children:_.map(c=>c.toLowerCase()===y.toLowerCase()?M("span",{style:{backgroundColor:"yellow",color:"black"},children:c}):c)})}function l(d,y){const _=new RegExp(`(([^ ]* ){0,6}[a-zA-Z]*${y.toLowerCase()}[a-zA-Z]*( [^ ]*){0,5})`,"gm"),c=d.toLowerCase().match(_);for(let w=0;w<(c?c.length:0);w++)c[w]="..."+c[w];const f=[d.match("(([^ ]* ){0,10})","m")[0]];return c||f}return ie("div",{className:"search-row",onClick:()=>n([t]),children:[ie("div",{className:"location-date-container",children:[ie("div",{className:"date-container",children:[M("i",{className:"material-icons",children:"event"}),M("p",{children:a(s,e)})]}),ie("div",{className:"location-container",children:[M("i",{className:"material-icons",children:"location_on"}),M("p",{children:a(i,e)})]})]}),M("p",{children:l(r,e).map(d=>ie("span",{children:[a(d,e),"...",M("br",{})]}))})]})};class z6 extends ee.Component{constructor(t){super(t),this.state={isFolded:!0},this.onButtonClick=this.onButtonClick.bind(this),this.updateSearchQuery=this.updateSearchQuery.bind(this)}onButtonClick(){this.setState(t=>({isFolded:!t.isFolded}))}updateSearchQuery(t){const n=t.target.value;this.props.actions.updateSearchQuery(n)}render(){let t;const n=["description","location","category","date"];return this.props.queryString?t=this.props.events.filter(r=>n.some(i=>r[i].toLowerCase().includes(this.props.queryString.toLowerCase()))):t=[],ie("div",{className:"search-outer-container"+(this.props.narrative?" narrative-mode ":""),children:[M("div",{id:"search-bar-icon-container",onClick:this.onButtonClick,children:M("i",{className:"material-icons",children:"search"})}),ie("div",{className:"search-bar-overlay"+(this.state.isFolded?" folded":""),children:[ie("div",{className:"search-input-container",children:[M("input",{className:"search-bar-input",onChange:this.updateSearchQuery,type:"text"}),M("i",{id:"close-search-overlay",className:"material-icons",onClick:this.onButtonClick,children:"close"})]}),M("div",{className:"search-results",children:t.map(r=>M(j6,{onSearchRowClick:this.props.onSearchRowClick,eventObj:r,query:this.props.queryString}))})]})]})}}function B6(e){return{actions:Qo(rd,e)}}const U6=pi(e=>e,B6)(z6),Ab=({title:e,value:t,hoverValue:n=null})=>{const[r,i]=ee.useState(!1);return ie("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{className:"card-cell__text",style:{width:"fit-content"},children:M("div",{onMouseOver:()=>n&&i(!0),onMouseOut:()=>n&&i(!1),children:r?M("span",{style:{pointerEvents:"none",opacity:.8},children:M("em",{children:n})}):M("div",{style:{pointerEvents:"none",display:"inline-block",height:"1.1rem",borderBottom:n&&"1px rgb(235, 68, 62) dashed"},children:t})})})]})},H6=({title:e="Timestamp",timelabel:t,language:n,precision:r})=>{const i=Ue[n].cardstack.unknown_time;return JM(t)?ie("div",{className:"card-cell",children:[M("h4",{children:e}),t,r&&r!==""?` - ${r}`:null]}):ie("div",{className:"card-cell",children:[M("h4",{children:e}),i]})},Sv=({primary:e,backgroundColor:t,borderRadius:n,size:r,label:i,normalCursor:s,...a})=>{const l=e?"button--primary":"button--secondary";return M("button",{type:"button",className:["button",`button--${r}`,l,s?"no-hover":""].join(" "),style:{backgroundColor:t,borderRadius:n},...a,children:i})};Sv.propTypes={primary:Tr.bool,backgroundColor:Tr.string,borderRadius:Tr.string,size:Tr.oneOf(["small","medium","large"]),label:Tr.string.isRequired,onClick:Tr.func};Sv.defaultProps={backgroundColor:"red",borderRadius:"0%",primary:!1,size:"medium",onClick:void 0};const W6=({text:e,color:t="#000",onClick:n=()=>{},normalCursor:r})=>M(Sv,{size:"small",backgroundColor:t,borderRadius:"12px",primary:!1,label:e,onClick:n,normalCursor:r}),V6=({isOpen:e,toggle:t})=>M("div",{className:"card-toggle",onClick:t,children:M("p",{children:M("i",{className:e?"arrow-down":"arrow-down folded"})})}),q6=({title:e,value:t})=>ie("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{dangerouslySetInnerHTML:{__html:_e(`${t}`)}})]});var qp={},Z6={get exports(){return qp},set exports(e){qp=e}};/*! + `,style:{...m,fillOpacity:m.strokeOpacity,fill:m.stroke}})}function c(b,g,m){const{stroke:h,strokeWidth:T,strokeDasharray:x,strokeOpacity:k}=m;return ie("g",{children:[M("line",{className:"narrative-step",x1:b.x,x2:g.x,y1:b.y,y2:g.y,markerStart:"none",onClick:A=>t(A),style:{strokeWidth:T,strokeDasharray:x,strokeOpacity:k,stroke:h}}),h!=="none"?_(b,g,m):""]})}function f(b,g,m){if(y(b)||y(g)||!b||!g)return null;const h=s([b.latitude,b.longitude]),T=s([g.latitude,g.longitude]);return c(h,T,{...k6,...m||{}})}function w(b){if(b===null||b.id!==r.id)return null;const g=[];for(let m=0;mM("svg",{children:ie("defs",{children:[M("marker",{id:"arrow",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"red"}})}),M("marker",{id:"arrow-off",viewBox:"0 0 6 6",refX:"3",refY:"3",markerWidth:"6",markerHeight:"6",orient:"auto",children:M("path",{d:"M0,3v-3l6,3l-6,3z",style:{fill:"black",fillOpacity:.2}})})]})}),P6="/assets/map-98397b77.png",L6="/assets/sat-6c360e9c.png",R6=({isUsingSatellite:e,toggleSatellite:t})=>{const n=e?"satellite-overlay-toggle-map":"satellite-overlay-toggle-sat",r=e?P6:L6,i=e?Ue[ht].tiles.default:Ue[ht].tiles.satellite;return M("div",{id:"satellite-overlay-toggle",className:"satellite-overlay-toggle",children:M("button",{className:`satellite-overlay-toggle-button ${n}`,style:{backgroundImage:`url(${r}`},name:"satellite-toggle",onClick:t,children:M("div",{className:"label",children:i})})})},I6=["streets","satellite"],N6="your_token";let O6=class extends ee.Component{constructor(){super(),this.projectPoint=this.projectPoint.bind(this),this.onClusterSelect=this.onClusterSelect.bind(this),this.loadClusterData=this.loadClusterData.bind(this),this.getClusterChildren=this.getClusterChildren.bind(this),this.svgRef=ee.createRef(),this.map=null,this.superclusterIndex=null,this.tileLayer=null,this.state={mapTransformX:0,mapTransformY:0,indexLoaded:!1,clusters:[]},this.styleLocation=this.styleLocation.bind(this)}componentDidMount(){this.map===null&&(this.initializeMap(),this.initializeTileLayer()),window.dispatchEvent(new Event("resize"))}componentDidUpdate(t){t.ui.tile!==this.props.ui.tile&&this.map&&this.initializeTileLayer()}UNSAFE_componentWillReceiveProps(t){Af(t.domain.locations,this.props.domain.locations)||this.loadClusterData(t.domain.locations);const{bounds:n}=t.app.map;if(!Af(n,this.props.app.map.bounds)&&n!==null)this.map.fitBounds(n);else if(!Af(t.app.selected,this.props.app.selected)){const r=t.app.selected.length>0?t.app.selected[0]:null;r!==null&&r.latitude&&r.longitude&&this.map.setView([r.latitude,r.longitude],this.map.getZoom(),{animate:!0,pan:{duration:.7}})}}getTileUrl(t){return I6.indexOf(this.props.ui.tiles)!==-1&&It.MAPBOX_TOKEN&&It.MAPBOX_TOKEN!==N6?`http://a.tiles.mapbox.com/v4/mapbox.${t}/{z}/{x}/{y}@2x.png?access_token=${It.MAPBOX_TOKEN}`:`https://api.mapbox.com/styles/v1/${t}/tiles/256/{z}/{x}/{y}@2x?access_token=${It.MAPBOX_TOKEN}`}initializeTileLayer(){if(!this.map)return;const t=this.getTileUrl(this.props.ui.tile);this.tileLayer?this.tileLayer.setUrl(t):(this.tileLayer=L.tileLayer(t),this.tileLayer.addTo(this.map))}initializeMap(){const{map:t,cluster:n}=this.props.app,r=L.map(this.props.ui.dom.map).setView(t.anchor,t.startZoom).setMinZoom(t.minZoom).setMaxZoom(t.maxZoom).setMaxBounds(t.maxBounds);r.attributionControl.addAttribution(`© Mapbox © OpenStreetMap Improve this map`),this.superclusterIndex=new Y4(n),r.keyboard.disable(),r.zoomControl.remove(),r.on("moveend",()=>{this.alignLayers(),this.updateClusters()}),r.on("zoomend viewreset",()=>{this.map.dragging.enable(),this.map.doubleClickZoom.enable(),this.map.scrollWheelZoom.enable(),Oo.flushSync(()=>{this.alignLayers(),this.updateClusters()})}),r.on("zoomstart",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.add("hide")}),r.on("zoomend",()=>{this.svgRef.current!==null&&this.svgRef.current.classList.remove("hide")}),window.addEventListener("resize",()=>{this.alignLayers()}),this.map=r}getMapDetails(){const t=this.map.getBounds(),n=[t.getWest(),t.getSouth(),t.getEast(),t.getNorth()],r=this.map.getZoom();return[n,r]}updateClusters(){const[t,n]=this.getMapDetails();this.superclusterIndex&&this.state.indexLoaded&&this.setState({clusters:this.superclusterIndex.getClusters(t,n)})}loadClusterData(t){if(t&&t.length>0&&this.superclusterIndex){const n=t.reduce((r,i)=>{const{longitude:s,latitude:a}=i;if(Ra(a)&&Ia(s)){const d={type:"Feature",properties:{cluster:!1,id:i.label},geometry:{type:"Point",coordinates:[s,a]}};r.push(d)}return r},[]);this.superclusterIndex.load(n),this.setState({indexLoaded:!0},()=>{this.updateClusters()})}else this.setState({clusters:[]})}getClusterChildren(t){if(this.superclusterIndex)try{const n=this.superclusterIndex.getLeaves(t,1/0,0);return x0(n,this.props.domain.locations)}catch{return[]}return[]}getSelectedClusters(){const{selected:t}=this.props.app,n=t.map(r=>r.id);return this.state.clusters&&this.state.clusters.length>0?this.state.clusters.reduce((r,i)=>{if(i.properties.cluster){const s=this.getClusterChildren(i.properties.cluster_id);s&&s.length>0&&s.forEach(a=>{const l=r.findIndex(d=>d.id===i.id)>=0;n.includes(a.id)&&!l&&r.push(i)})}return r},[]):[]}alignLayers(){const t=document.querySelector(".leaflet-map-pane");if(t===null)return{transformX:0,transformY:0};const n=window.getComputedStyle(t).getPropertyValue("transform");this.setState({mapTransformX:+n.split(",")[4],mapTransformY:+n.split(",")[5].split(")")[0]})}projectPoint(t){const n=new L.LatLng(t[0],t[1]);return{x:this.map.latLngToLayerPoint(n).x+this.state.mapTransformX,y:this.map.latLngToLayerPoint(n).y+this.state.mapTransformY}}onClusterSelect({id:t,latitude:n,longitude:r}){const i=Math.max(this.superclusterIndex.getClusterExpansionZoom(parseInt(t)),this.superclusterIndex.options.minZoom),a=Math.max(i+2,this.props.app.cluster.maxZoom);this.map.dragging.disable(),this.map.doubleClickZoom.disable(),this.map.scrollWheelZoom.disable(),this.map.flyTo(new L.LatLng(n,r),a)}getClientDims(){const t=document.querySelector(`#${this.props.ui.dom.map}`).getBoundingClientRect();return{width:t.width,height:t.height}}renderTiles(){const t=this.map.getPanes().overlayPane,{width:n,height:r}=this.getClientDims();return this.map?M(qi,{node:t,children:M("svg",{ref:this.svgRef,width:n,height:r,style:{transform:`translate3d(${-this.state.mapTransformX}px, ${-this.state.mapTransformY}px, 0)`},className:"leaflet-svg"})}):null}renderSites(){return M(_6,{sites:this.props.domain.sites,projectPoint:this.projectPoint,isEnabled:this.props.app.views.sites})}renderRegions(){return M(w6,{svg:this.svgRef.current,regions:this.props.domain.regions,projectPoint:this.projectPoint,styles:this.props.ui.regions})}renderNarratives(){const t=this.props.domain.narratives.length>0;return M(C6,{svg:this.svgRef.current,narratives:t?this.props.domain.narratives:[this.props.app.narrative],projectPoint:this.projectPoint,narrative:this.props.app.narrative,styles:this.props.ui.narratives,onSelectNarrative:this.props.methods.onSelectNarrative,features:this.props.features})}styleLocation(t){return[null,null]}styleCluster(t){return[null,null]}renderEvents(){const t=this.state.clusters.filter(r=>!r.properties.cluster),n=x0(t,this.props.domain.locations);return M(b6,{svg:this.svgRef.current,events:this.props.domain.events,locations:n,styleLocation:this.styleLocation,categories:this.props.domain.categories,projectPoint:this.projectPoint,selected:this.props.app.selected,narrative:this.props.app.narrative,onSelect:this.props.methods.onSelect,getCategoryColor:this.props.methods.getCategoryColor,eventRadius:this.props.ui.eventRadius,coloringSet:this.props.app.coloringSet,filterColors:this.props.ui.filterColors,features:this.props.features})}renderClusters(){const t=this.state.clusters.filter(n=>n.properties.cluster);return M(E6,{svg:this.svgRef.current,styleCluster:this.styleCluster,projectPoint:this.projectPoint,clusters:t,isRadial:this.props.ui.radial,onSelect:this.onClusterSelect,coloringSet:this.props.app.coloringSet,getClusterChildren:this.getClusterChildren,filterColors:this.props.ui.filterColors})}renderSelected(){const t=this.getSelectedClusters(),n=[];this.props.app.selected.forEach(i=>{const{latitude:s,longitude:a}=i;n.push({latitude:s,longitude:a,radius:this.props.ui.eventRadius})});const r=US(this.state.clusters);return t.forEach(i=>{if(i.properties.cluster){const{coordinates:s}=i.geometry;n.push({latitude:String(s[1]),longitude:String(s[0]),radius:BS(i.properties.point_count,r)})}}),M(x6,{svg:this.svgRef.current,selected:n,projectPoint:this.projectPoint,styles:this.props.ui.mapSelectedEvents})}renderMarkers(){return M(qi,{node:this.svgRef.current,children:M(A6,{})})}render(){const{isShowingSites:t,isFetchingDomain:n}=this.props.app.flags,r=y6||window.innerWidth<600,i=(this.props.app.narrative?"map-wrapper narrative-mode":"map-wrapper")+(r?" mobile":""),s=this.map?ie(Ln,{children:[this.renderTiles(),this.renderMarkers(),t?this.renderSites():null,this.renderRegions(),this.renderNarratives(),this.renderEvents(),this.renderClusters(),this.renderSelected()]}):null;return ie("div",{className:i,onKeyDown:this.props.onKeyDown,tabIndex:"0",children:[M("div",{id:this.props.ui.dom.map}),M(px,{isLoading:this.props.app.loading||n,ui:n,language:this.props.app.language}),this.props.features.USE_SATELLITE_OVERLAY_TOGGLE&&M(R6,{isUsingSatellite:this.props.ui.isUsingSatellite,toggleSatellite:this.props.actions.toggleTileOverlay}),s]})}};function M6(e){return{domain:{locations:g$(e),narratives:Kg(e),categories:eE(e),sites:c$(e),regions:d$(e)},app:{views:e.app.associations.views,selected:Xg(e),highlighted:e.app.highlighted,map:e.app.map,cluster:e.app.cluster,language:e.app.language,loading:e.app.loading,narrative:e.app.associations.narrative,coloringSet:e.app.associations.coloringSet,flags:{isShowingSites:e.app.flags.isShowingSites,isFetchingDomain:e.app.flags.isFetchingDomain}},ui:{tile:l$(e),isUsingSatellite:u$(e),dom:e.ui.dom,narratives:e.ui.style.narratives,mapSelectedEvents:e.ui.style.selectedEvents,regions:e.ui.style.regions,eventRadius:e.ui.eventRadius,radial:e.ui.style.clusters.radial,filterColors:e.ui.coloring.colors},features:fr(e)}}function D6(e){return{actions:Qo(rd,e)}}const $6=pi(M6,D6)(O6),F6=e=>{switch(e.kind){default:return M($6,{...e})}},j6=({query:e,eventObj:t,onSearchRowClick:n})=>{const{description:r,location:i,date:s}=t;function a(d,y){const _=d.split(new RegExp(`(${y})`,"gi"));return M("span",{children:_.map(c=>c.toLowerCase()===y.toLowerCase()?M("span",{style:{backgroundColor:"yellow",color:"black"},children:c}):c)})}function l(d,y){const _=new RegExp(`(([^ ]* ){0,6}[a-zA-Z]*${y.toLowerCase()}[a-zA-Z]*( [^ ]*){0,5})`,"gm"),c=d.toLowerCase().match(_);for(let w=0;w<(c?c.length:0);w++)c[w]="..."+c[w];const f=[d.match("(([^ ]* ){0,10})","m")[0]];return c||f}return ie("div",{className:"search-row",onClick:()=>n([t]),children:[ie("div",{className:"location-date-container",children:[ie("div",{className:"date-container",children:[M("i",{className:"material-icons",children:"event"}),M("p",{children:a(s,e)})]}),ie("div",{className:"location-container",children:[M("i",{className:"material-icons",children:"location_on"}),M("p",{children:a(i,e)})]})]}),M("p",{children:l(r,e).map(d=>ie("span",{children:[a(d,e),"...",M("br",{})]}))})]})};class z6 extends ee.Component{constructor(t){super(t),this.state={isFolded:!0},this.onButtonClick=this.onButtonClick.bind(this),this.updateSearchQuery=this.updateSearchQuery.bind(this)}onButtonClick(){this.setState(t=>({isFolded:!t.isFolded}))}updateSearchQuery(t){const n=t.target.value;this.props.actions.updateSearchQuery(n)}render(){let t;const n=["description","location","category","date"];return this.props.queryString?t=this.props.events.filter(r=>n.some(i=>r[i].toLowerCase().includes(this.props.queryString.toLowerCase()))):t=[],ie("div",{className:"search-outer-container"+(this.props.narrative?" narrative-mode ":""),children:[M("div",{id:"search-bar-icon-container",onClick:this.onButtonClick,children:M("i",{className:"material-icons",children:"search"})}),ie("div",{className:"search-bar-overlay"+(this.state.isFolded?" folded":""),children:[ie("div",{className:"search-input-container",children:[M("input",{className:"search-bar-input",onChange:this.updateSearchQuery,type:"text"}),M("i",{id:"close-search-overlay",className:"material-icons",onClick:this.onButtonClick,children:"close"})]}),M("div",{className:"search-results",children:t.map(r=>M(j6,{onSearchRowClick:this.props.onSearchRowClick,eventObj:r,query:this.props.queryString}))})]})]})}}function B6(e){return{actions:Qo(rd,e)}}const U6=pi(e=>e,B6)(z6),Pb=({title:e,value:t,hoverValue:n=null})=>{const[r,i]=ee.useState(!1);return ie("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{className:"card-cell__text",style:{width:"fit-content"},children:M("div",{onMouseOver:()=>n&&i(!0),onMouseOut:()=>n&&i(!1),children:r?M("span",{style:{pointerEvents:"none",opacity:.8},children:M("em",{children:n})}):M("div",{style:{pointerEvents:"none",display:"inline-block",height:"1.1rem",borderBottom:n&&"1px rgb(235, 68, 62) dashed"},children:t})})})]})},H6=({title:e="Timestamp",timelabel:t,language:n,precision:r})=>{const i=Ue[n].cardstack.unknown_time;return JM(t)?ie("div",{className:"card-cell",children:[M("h4",{children:e}),t,r&&r!==""?` - ${r}`:null]}):ie("div",{className:"card-cell",children:[M("h4",{children:e}),i]})},Sv=({primary:e,backgroundColor:t,borderRadius:n,size:r,label:i,normalCursor:s,...a})=>{const l=e?"button--primary":"button--secondary";return M("button",{type:"button",className:["button",`button--${r}`,l,s?"no-hover":""].join(" "),style:{backgroundColor:t,borderRadius:n},...a,children:i})};Sv.propTypes={primary:Tr.bool,backgroundColor:Tr.string,borderRadius:Tr.string,size:Tr.oneOf(["small","medium","large"]),label:Tr.string.isRequired,onClick:Tr.func};Sv.defaultProps={backgroundColor:"red",borderRadius:"0%",primary:!1,size:"medium",onClick:void 0};const W6=({text:e,color:t="#000",onClick:n=()=>{},normalCursor:r})=>M(Sv,{size:"small",backgroundColor:t,borderRadius:"12px",primary:!1,label:e,onClick:n,normalCursor:r}),V6=({isOpen:e,toggle:t})=>M("div",{className:"card-toggle",onClick:t,children:M("p",{children:M("i",{className:e?"arrow-down":"arrow-down folded"})})}),q6=({title:e,value:t})=>ie("div",{className:"card-cell",children:[e?M("h4",{children:e}):null,M("div",{dangerouslySetInnerHTML:{__html:_e(`${t}`)}})]});var qp={},Z6={get exports(){return qp},set exports(e){qp=e}};/*! * $script.js JS loader & dependency manager * https://github.com/ded/script.js * (c) Dustin Diaz 2014 | License MIT - */(function(e){(function(t,n){e.exports?e.exports=n():this[t]=n()})("$script",function(){var t=document,n=t.getElementsByTagName("head")[0],r=!1,i="push",s="readyState",a="onreadystatechange",l={},d={},y={},_,c;function f(b,g){for(var m=0,h=b.length;m{var t=wt.useRef(null),n=wt.useState(!0),r=n[0],i=n[1];return wt.useEffect(function(){var s=!0;return G6(Y6,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(s){if(!window.twttr.widgets[Eh]){console.error("Method "+Eh+" is not present anymore in twttr.widget api");return}window.twttr.widgets[Eh](e.tweetId,t==null?void 0:t.current,e.options).then(function(a){i(!1),e.onLoad&&e.onLoad(a)})}}),function(){s=!1}},[]),wt.createElement(wt.Fragment,null,r&&wt.createElement(wt.Fragment,null,e.placeholder),wt.createElement("div",{ref:t}))},X6={width:"100%",frameBorder:"0",scrolling:"no",border:"none",overflow:"hidden"},Q6={};class J6 extends ee.Component{constructor(t){super(t),this.state={src:this.props.src,id:"",height:"80px"},this.messageHandler=this.messageHandler.bind(this),this.urlObj=document.createElement("a")}componentDidMount(){window.addEventListener("message",this.messageHandler),this.iFrame.addEventListener("load",()=>{this.checkFrame(this.state.id)})}componentWillUnmount(){window.removeEventListener("message",this.messageHandler)}messageHandler({data:t,source:n}){if(!t||typeof t!="string"||n!==this.iFrame.contentWindow)return;const r=JSON.parse(t);r.event==="resize"&&r.height&&this.setState({height:r.height+"px"})}checkFrame(t){this.iFrame.contentWindow.postMessage(JSON.stringify({event:"visible",frame:t}),"*")}UNSAFE_componentWillReceiveProps({src:t}){if(this.state.src!==t){this.urlObj.href=t;const n=`telegram-post${this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-")}`;this.setState({src:t,id:n},()=>this.checkFrame(n))}}render(){const{src:t,height:n}=this.state,{container:r}=this.props,i=new URL(t);return i.searchParams.append("embed","1"),M("div",{"data-sharing-id":r,style:Q6,children:M("iframe",{title:t,ref:s=>this.iFrame=s,src:i.toString(),height:n,id:"telegram-post"+this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-"),style:X6})})}}const Lb=50,eB=({cardIdx:e,src:t,title:n,graphic:r})=>{const i=_=>{if(!r)return _;const c=`graphic${e}`,f=`overlay-${c}`;return ie("div",{children:[M("div",{className:`card-cell media source-graphic ${f}`,children:ie("h4",{onClick:()=>{Array.from(document.querySelectorAll("."+c)).map(w=>w.style.display="block"),Array.from(document.querySelectorAll("."+f)).map(w=>w.style.display="none")},children:["Graphic content",M("br",{}),"Click here to show"]})}),M("span",{className:c,style:{display:"none"},children:_})]})},s=ee.useRef(),a=ee.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.play()},[]),l=ee.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.pause()},[]),d=zS(t),y=n&&n.length>Lb?`${n.slice(0,Lb+1)}...`:n;switch(d){case"Video":return i(ie("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("video",{onMouseEnter:a,onMouseLeave:l,ref:s,disablePictureInPicture:!0,children:M("source",{src:t})})]}));case"Image":return i(ie("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("div",{className:"img-wrapper",children:M("img",{src:t,alt:"an inline photograph for the event card component"})})]}));case"Telegram":if(t.includes("https://t.me/c/"))return ie("div",{children:["Private ",M("a",{href:t,children:"telegram post"})]});try{return i(M("div",{className:"card-cell media embedded",children:M(J6,{src:t})}))}catch{return ie("div",{children:["Unable to display ",M("a",{href:t,children:"telegram post"})]})}case"Tweet":const c=/https?:\/\/(mobile\.){0,1}twitter.com\/[0-9a-zA-Z_]{1,20}\/status\/([0-9]*)/.exec(t);if(!c||c.length<2)return null;const f=c[c.length-1];try{return i(M("div",{className:"card-cell media embedded",children:M(K6,{tweetId:f,options:{conversation:"none"}})}))}catch{return ie("div",{children:["Unable to display ",M("a",{href:t,children:"tweet"})]})}default:return t==="HIDDEN"?M("div",{className:"card-cell media source-hidden",children:ie("h4",{children:["Source hidden",M("br",{}),"Privacy concerns"]})}):M("div",{children:M("a",{href:t,children:"other source"})})}},tB={basic:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"line-break",times:.4}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}]],sourced:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}],[{kind:"sources",values:e.sources.flatMap(t=>[t.paths.map(n=>({kind:"media",title:"Media",value:[{src:n,title:null,graphic:e.graphic==="TRUE"}]}))])}]]},nB=({content:e=[],isLoading:t=!0,cardIdx:n=-1,onSelect:r=()=>{},sources:i=[],isSelected:s=!1,language:a="en-US"})=>{const[l,d]=ee.useState(!1),y=()=>d(!l),_=p=>M(H6,{language:a,timelabel:Op(p.value),...p}),c=()=>i.length===0&&M(V6,{toggle:()=>y(),isOpen:l}),f=({media:p,idx:b,cardIdx:g})=>M(eB,{cardIdx:g,src:p.src,title:p.title,graphic:p.graphic},b);function w(p,b){switch(p.kind){case"media":return M("div",{className:"card-cell",children:p.value.map((m,h)=>f({media:m,idx:h,cardIdx:b}))});case"line":return M("div",{style:{height:"1rem",width:"100%"},children:M("hr",{})});case"line-break":return M("div",{style:{height:`${p.times||1}rem`,width:"100%"}});case"item":return null;case"markdown":return M(q6,{...p});case"tag":return M("div",{className:"card-cell m0",style:{textTransform:"uppercase",fontSize:".8em",lineHeight:".8em"},children:M("div",{style:{display:"flex",justifyContent:`flex-${p.align||"start"}`},children:p.value})});case"button":return ie("div",{className:"card-cell",children:[p.title&&M("h4",{children:p.title}),p.value.map((m,h)=>M(W6,{...m},`card-button-${h}`))]});case"text":return!C0(p.value)&&M(Ab,{...p});case"date":return _(p);case"links":return ie("div",{className:"card-cell",children:[p.title&&M("h4",{children:p.title}),M("div",{className:"card-row m0",children:p.value.map(({text:m,href:h},T)=>M("a",{href:h,children:m},`card-links-url-${T}`))})]});case"list":return!!p.value.length&&!!p.value.filter(m=>!C0(m)).length?ie("div",{children:[p.title&&M("h4",{children:p.title}),M("div",{className:"card-row m0",children:p.value.map((m,h)=>M(Ab,{value:m,...m},`card-list-text-${h}`))})]}):null;default:return null}}function v(p,b,g){return M("div",{className:"card-row",children:p.map(m=>M("span",{children:w(m,b)},Zt({...m,row:p})))},Zt({...p,salt:g}))}return i=[],ie("li",{className:`event-card ${s?"selected":""}`,onClick:r,children:[e.map((p,b)=>p[0].kind==="sources"&&p[0].values.length>0?M("div",{children:ie("details",{open:!0,children:[ie("summary",{children:[M("span",{className:"summary-line"}),ie("span",{className:"summary-text",children:[M("span",{className:"summary-show",children:"Show"})," ",M("span",{className:"summary-hide",children:"Hide"})," sources (",p[0].values.length,")"]}),M("span",{className:"summary-line"})]}),p[0].values.map(g=>v(g,n,p[0]))]})},b):v(p,n)),i.length>0?c():null]},Zt(e))};class rB extends ee.Component{constructor(){super(),this.refs={},this.refCardStack=ee.createRef(),this.refCardStackContent=ee.createRef()}componentDidUpdate(){!!this.props.narrative&&this.scrollToCard()}scrollToCard(){const n=this.refCardStack.current,r=this.refs[this.props.narrative.current].current.offsetTop,i=n.scrollTop,s=r-i;let a=0;const l=20;Math.easeInOutQuad=function(y,_,c,f){return y/=f/2,y<1?c/2*y*y+_:(y-=1,-c/2*(y*(y-2)-1)+_)};const d=function(){a+=l;const y=Math.easeInOutQuad(a,i,s,500);n.scrollTop=y,a<500&&setTimeout(d,l)};d()}renderCards(t,n){n||(n=t.map(i=>!0)),this.refs=[];const r=tB[this.props.cardUI.layout.template];return t.map((i,s)=>{const a=ee.createRef();this.refs[s]=a;const l=r({event:i,colors:this.props.colors,coloringSet:this.props.coloringSet,getFilterIdxFromColorSet:HS});return M(nB,{cardIdx:s,content:l,language:this.props.language,isLoading:this.props.isLoading,isSelected:n[s]},s)})}renderSelectedCards(){const{selected:t}=this.props;return t.length>0?this.renderCards(t):null}renderNarrativeCards(){const{narrative:t}=this.props,n=t.steps,r=n.map((i,s)=>s===t.current);return this.renderCards(n,r)}renderCardStackHeader(){const t=Ue[this.props.language].cardstack.header;return ie("div",{id:"card-stack-header",className:"card-stack-header",onClick:()=>this.props.onToggleCardstack(),children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("p",{className:"header-copy top",children:`${this.props.selected.length} ${t}`})]})}renderCardStackContent(){return M("div",{id:"card-stack-content",className:"card-stack-content scrollbar-black",children:M("ul",{children:this.renderSelectedCards()})})}renderNarrativeContent(){return M("div",{id:"card-stack-content",className:"card-stack-content",ref:this.refCardStackContent,children:M("ul",{children:this.renderNarrativeCards()})})}render(){const{isCardstack:t,selected:n,narrative:r}=this.props;return n.length>0?r?M("div",{id:"card-stack",ref:this.refCardStack,className:`card-stack narrative-mode + */(function(e){(function(t,n){e.exports?e.exports=n():this[t]=n()})("$script",function(){var t=document,n=t.getElementsByTagName("head")[0],r=!1,i="push",s="readyState",a="onreadystatechange",l={},d={},y={},_,c;function f(b,g){for(var m=0,h=b.length;m{var t=wt.useRef(null),n=wt.useState(!0),r=n[0],i=n[1];return wt.useEffect(function(){var s=!0;return G6(Y6,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(s){if(!window.twttr.widgets[Eh]){console.error("Method "+Eh+" is not present anymore in twttr.widget api");return}window.twttr.widgets[Eh](e.tweetId,t==null?void 0:t.current,e.options).then(function(a){i(!1),e.onLoad&&e.onLoad(a)})}}),function(){s=!1}},[]),wt.createElement(wt.Fragment,null,r&&wt.createElement(wt.Fragment,null,e.placeholder),wt.createElement("div",{ref:t}))},X6={width:"100%",frameBorder:"0",scrolling:"no",border:"none",overflow:"hidden"},Q6={};class J6 extends ee.Component{constructor(t){super(t),this.state={src:this.props.src,id:"",height:"80px"},this.messageHandler=this.messageHandler.bind(this),this.urlObj=document.createElement("a")}componentDidMount(){window.addEventListener("message",this.messageHandler),this.iFrame.addEventListener("load",()=>{this.checkFrame(this.state.id)})}componentWillUnmount(){window.removeEventListener("message",this.messageHandler)}messageHandler({data:t,source:n}){if(!t||typeof t!="string"||n!==this.iFrame.contentWindow)return;const r=JSON.parse(t);r.event==="resize"&&r.height&&this.setState({height:r.height+"px"})}checkFrame(t){this.iFrame.contentWindow.postMessage(JSON.stringify({event:"visible",frame:t}),"*")}UNSAFE_componentWillReceiveProps({src:t}){if(this.state.src!==t){this.urlObj.href=t;const n=`telegram-post${this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-")}`;this.setState({src:t,id:n},()=>this.checkFrame(n))}}render(){const{src:t,height:n}=this.state,{container:r}=this.props,i=new URL(t);return i.searchParams.append("embed","1"),M("div",{"data-sharing-id":r,style:Q6,children:M("iframe",{title:t,ref:s=>this.iFrame=s,src:i.toString(),height:n,id:"telegram-post"+this.urlObj.pathname.replace(/[^a-z0-9_]/gi,"-"),style:X6})})}}const Lb=50,eB=({cardIdx:e,src:t,title:n,graphic:r})=>{const i=_=>{if(!r)return _;const c=`graphic${e}`,f=`overlay-${c}`;return ie("div",{children:[M("div",{className:`card-cell media source-graphic ${f}`,children:ie("h4",{onClick:()=>{Array.from(document.querySelectorAll("."+c)).map(w=>w.style.display="block"),Array.from(document.querySelectorAll("."+f)).map(w=>w.style.display="none")},children:["Graphic content",M("br",{}),"Click here to show"]})}),M("span",{className:c,style:{display:"none"},children:_})]})},s=ee.useRef(),a=ee.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.play()},[]),l=ee.useCallback(()=>{var _;return(_=s.current)==null?void 0:_.pause()},[]),d=zS(t),y=n&&n.length>Lb?`${n.slice(0,Lb+1)}...`:n;switch(d){case"Video":return i(ie("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("video",{onMouseEnter:a,onMouseLeave:l,ref:s,disablePictureInPicture:!0,children:M("source",{src:t})})]}));case"Image":return i(ie("div",{className:"card-cell media",children:[n&&M("h4",{title:n,children:y}),M("div",{className:"img-wrapper",children:M("img",{src:t,alt:"an inline photograph for the event card component"})})]}));case"Telegram":if(t.includes("https://t.me/c/"))return ie("div",{children:["Private ",M("a",{href:t,children:"telegram post"})]});try{return i(M("div",{className:"card-cell media embedded",children:M(J6,{src:t})}))}catch{return ie("div",{children:["Unable to display ",M("a",{href:t,children:"telegram post"})]})}case"Tweet":const c=/https?:\/\/(mobile\.){0,1}twitter.com\/[0-9a-zA-Z_]{1,20}\/status\/([0-9]*)/.exec(t);if(!c||c.length<2)return null;const f=c[c.length-1];try{return i(M("div",{className:"card-cell media embedded",children:M(K6,{tweetId:f,options:{conversation:"none"}})}))}catch{return ie("div",{children:["Unable to display ",M("a",{href:t,children:"tweet"})]})}default:return t==="HIDDEN"?M("div",{className:"card-cell media source-hidden",children:ie("h4",{children:["Source hidden",M("br",{}),"Privacy concerns"]})}):M("div",{children:M("a",{href:t,children:"other source"})})}},tB={basic:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"line-break",times:.4}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}]],sourced:({event:e})=>[[{kind:"date",title:"Reported Incident Date",value:e.datetime||e.date||""},{kind:"text",title:"Location",value:e.location||"—"},{kind:"text",title:"id",value:e.civId||"—"}],[{kind:"text",title:"Summary",value:e.description||"",scaleFont:1.1}],[{kind:"sources",values:e.sources.flatMap(t=>[t.paths.map(n=>({kind:"media",title:"Media",value:[{src:n,title:null,graphic:e.graphic==="TRUE"}]}))])}]]},nB=({content:e=[],isLoading:t=!0,cardIdx:n=-1,onSelect:r=()=>{},sources:i=[],isSelected:s=!1,language:a="en-US"})=>{const[l,d]=ee.useState(!1),y=()=>d(!l),_=p=>M(H6,{language:a,timelabel:Op(p.value),...p}),c=()=>i.length===0&&M(V6,{toggle:()=>y(),isOpen:l}),f=({media:p,idx:b,cardIdx:g})=>M(eB,{cardIdx:g,src:p.src,title:p.title,graphic:p.graphic},b);function w(p,b){switch(p.kind){case"media":return M("div",{className:"card-cell",children:p.value.map((m,h)=>f({media:m,idx:h,cardIdx:b}))});case"line":return M("div",{style:{height:"1rem",width:"100%"},children:M("hr",{})});case"line-break":return M("div",{style:{height:`${p.times||1}rem`,width:"100%"}});case"item":return null;case"markdown":return M(q6,{...p});case"tag":return M("div",{className:"card-cell m0",style:{textTransform:"uppercase",fontSize:".8em",lineHeight:".8em"},children:M("div",{style:{display:"flex",justifyContent:`flex-${p.align||"start"}`},children:p.value})});case"button":return ie("div",{className:"card-cell",children:[p.title&&M("h4",{children:p.title}),p.value.map((m,h)=>M(W6,{...m},`card-button-${h}`))]});case"text":return!C0(p.value)&&M(Pb,{...p});case"date":return _(p);case"links":return ie("div",{className:"card-cell",children:[p.title&&M("h4",{children:p.title}),M("div",{className:"card-row m0",children:p.value.map(({text:m,href:h},T)=>M("a",{href:h,children:m},`card-links-url-${T}`))})]});case"list":return!!p.value.length&&!!p.value.filter(m=>!C0(m)).length?ie("div",{children:[p.title&&M("h4",{children:p.title}),M("div",{className:"card-row m0",children:p.value.map((m,h)=>M(Pb,{value:m,...m},`card-list-text-${h}`))})]}):null;default:return null}}function v(p,b,g){return M("div",{className:"card-row",children:p.map(m=>M("span",{children:w(m,b)},Gt({...m,row:p})))},Gt({...p,salt:g}))}return i=[],ie("li",{className:`event-card ${s?"selected":""}`,onClick:r,children:[e.map((p,b)=>p[0].kind==="sources"&&p[0].values.length>0?M("div",{children:ie("details",{open:!0,children:[ie("summary",{children:[M("span",{className:"summary-line"}),ie("span",{className:"summary-text",children:[M("span",{className:"summary-show",children:"Show"})," ",M("span",{className:"summary-hide",children:"Hide"})," sources (",p[0].values.length,")"]}),M("span",{className:"summary-line"})]}),p[0].values.map(g=>v(g,n,p[0]))]})},b):v(p,n)),i.length>0?c():null]},Gt(e))};class rB extends ee.Component{constructor(){super(),this.refs={},this.refCardStack=ee.createRef(),this.refCardStackContent=ee.createRef()}componentDidUpdate(){!!this.props.narrative&&this.scrollToCard()}scrollToCard(){const n=this.refCardStack.current,r=this.refs[this.props.narrative.current].current.offsetTop,i=n.scrollTop,s=r-i;let a=0;const l=20;Math.easeInOutQuad=function(y,_,c,f){return y/=f/2,y<1?c/2*y*y+_:(y-=1,-c/2*(y*(y-2)-1)+_)};const d=function(){a+=l;const y=Math.easeInOutQuad(a,i,s,500);n.scrollTop=y,a<500&&setTimeout(d,l)};d()}renderCards(t,n){n||(n=t.map(i=>!0)),this.refs=[];const r=tB[this.props.cardUI.layout.template];return t.map((i,s)=>{const a=ee.createRef();this.refs[s]=a;const l=r({event:i,colors:this.props.colors,coloringSet:this.props.coloringSet,getFilterIdxFromColorSet:HS});return M(nB,{cardIdx:s,content:l,language:this.props.language,isLoading:this.props.isLoading,isSelected:n[s]},s)})}renderSelectedCards(){const{selected:t}=this.props;return t.length>0?this.renderCards(t):null}renderNarrativeCards(){const{narrative:t}=this.props,n=t.steps,r=n.map((i,s)=>s===t.current);return this.renderCards(n,r)}renderCardStackHeader(){const t=Ue[this.props.language].cardstack.header;return ie("div",{id:"card-stack-header",className:"card-stack-header",onClick:()=>this.props.onToggleCardstack(),children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("p",{className:"header-copy top",children:`${this.props.selected.length} ${t}`})]})}renderCardStackContent(){return M("div",{id:"card-stack-content",className:"card-stack-content scrollbar-black",children:M("ul",{children:this.renderSelectedCards()})})}renderNarrativeContent(){return M("div",{id:"card-stack-content",className:"card-stack-content",ref:this.refCardStackContent,children:M("ul",{children:this.renderNarrativeCards()})})}render(){const{isCardstack:t,selected:n,narrative:r}=this.props;return n.length>0?r?M("div",{id:"card-stack",ref:this.refCardStack,className:`card-stack narrative-mode ${t?"":" folded"}`,children:this.renderNarrativeContent()}):ie("div",{id:"card-stack",className:`card-stack ${t?"":" folded"}`,children:[this.renderCardStackHeader(),this.renderCardStackContent()]}):M("div",{})}}function iB(e){return{narrative:aE(e),selected:Xg(e),sourceError:e.app.errors.source,language:e.app.language,isCardstack:e.app.flags.isCardstack,isLoading:e.app.flags.isFetchingSources,cardUI:e.ui.card,colors:e.ui.coloring.colors,coloringSet:e.app.associations.coloringSet,features:e.features}}const oB=pi(iB)(rB);function sB({narrative:e}){const{steps:t,current:n}=e;return t[n]?ie("div",{className:"narrative-info",children:[ie("div",{className:"narrative-info-header",children:[M("div",{className:"count-container",children:ie("div",{className:"count",children:[n+1,"/",t.length]})}),M("div",{children:M("h3",{children:e.label})})]}),M("div",{className:"narrative-info-desc",children:M("p",{children:e.description})})]}):null}function aB(e){return{narrative:aE(e)}}const lB=pi(aB)(sB),Rb=({isDisabled:e,direction:t,onClickHandler:n})=>M("div",{className:`narrative-adjust ${t}`,onClick:e?null:n,children:M("i",{className:`material-icons ${e?"disabled":""}`,children:`chevron_${t}`})}),uB=({onClickHandler:e,closeMsg:t})=>ie("div",{className:"narrative-close",onClick:e,children:[M("button",{className:"side-menu-burg is-active",children:M("span",{})}),M("div",{className:"close-text",children:t})]}),cB=({narrative:e,methods:t})=>{if(!e)return null;const{current:n,steps:r}=e,i=n!==0,s=nt.onSelectNarrative(null),closeMsg:"-- exit from narrative --"})]})};class dB extends ee.Component{constructor(t){super(t),this.handleViewSource=this.handleViewSource.bind(this),this.handleHighlight=this.handleHighlight.bind(this),this.setNarrative=this.setNarrative.bind(this),this.setNarrativeFromFilters=this.setNarrativeFromFilters.bind(this),this.handleSelect=this.handleSelect.bind(this),this.getCategoryColor=this.getCategoryColor.bind(this),this.findEventIdx=this.findEventIdx.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectNarrativeStep=this.selectNarrativeStep.bind(this)}componentDidMount(){this.props.actions.fetchDomain().then(t=>{this.props.actions.updateDomain({domain:t,features:this.props.features}),this.props.actions.rehydrateState()}),window.dispatchEvent(new Event("resize"))}handleHighlight(t){this.props.actions.updateHighlighted(t||null)}handleViewSource(t){this.props.actions.updateSource(t)}findEventIdx(t){const{events:n}=this.props.domain;return uD(n,t,(r,i)=>r.datetime-i.datetime)}handleSelect(t,n){if(t.length<=0){this.props.actions.updateSelected([]);return}const r=[];if(n===0){r.push(t);const{events:s}=this.props.domain,a=this.findEventIdx(t);s[a].id!==t.id&&r.push(s[a]);let l=a-1;for(;l>=0&&s[a].datetime.getTime()===s[l].datetime.getTime();)s[l].id!==t.id&&r.push(s[l]),l-=1;for(l=a+1;lr.push(a))}this.props.actions.updateSelected(r)}getCategoryColor(t){if(!this.props.features.USE_CATEGORIES)return qn.fallbackEventColor;const n=this.props.ui.style.categories[t];return n||this.props.ui.style.categories.default}setNarrative(t){t&&t.steps.length>=1&&this.handleSelect([t.steps[0]]),this.props.actions.updateNarrative(t)}setNarrativeFromFilters(t){const{app:n,domain:r}=this.props;let i=n.associations.filters;if(i.length===0){alert("No filters selected, cant narrativise");return}i=i.map(d=>({name:d}));const s=r.events.filter(d=>{let y=!1;for(let _=0;_d.name).join("-"),l=i.map(d=>d.description).join(` `);this.setNarrative({id:a,label:a,description:l,withLines:t,steps:s.map(pg(r.sources))})}selectNarrativeStep(t){if(typeof t!="number"){const r=t[0]||t;if(this.props.app.associations.narrative){const{steps:i}=this.props.app.associations.narrative,s=r.id,a=i.find(d=>d.id===s),l=i.indexOf(a);l>-1&&(t=l)}}const{narrative:n}=this.props.app.associations;if(n!==null&&t=0){const r=n.steps[t];this.handleSelect([r]),this.props.actions.updateNarrativeStepIdx(t)}}onKeyDown(t){const{narrative:n,selected:r}=this.props.app,{events:i}=this.props.domain,s=l=>{n===null?this.handleSelect(i[l-1],0):this.selectNarrativeStep(this.props.narrativeIdx-1)},a=l=>{n===null?this.handleSelect(i[l+1],0):this.selectNarrativeStep(this.props.narrativeIdx+1)};if(r.length>0){const l=r[r.length-1],d=this.findEventIdx(l);switch(t.keyCode){case 37:case 38:if(d<=0)return;s(d);break;case 39:case 40:if(d<0||d>=this.props.domain.length-1)return;a(d);break}}}renderIntroPopup(t){const{app:n,actions:r}=this.props,i="rememberDismissedIntro2";let s=new URLSearchParams(window.location.href.split("?")[1]),a=localStorage.getItem(i)==="true";return(s.get("cover")==="true"||!a)&&!s.has("id")?M(DE,{title:"Introduction to the platform",theme:"dark",isOpen:n.flags.isIntropopup&&s.get("cover")!=="false",onClose:()=>{r.toggleIntroPopup(),localStorage.setItem(i,"true")},content:n.intro,styles:t}):null}render(){const{actions:t,app:n,domain:r,timeline:i,features:s}=this.props,a={};return ie("div",{children:[M(cj,{isNarrative:!!n.associations.narrative,domain:r,methods:{onTitle:t.toggleCover,onSelectFilter:l=>t.toggleAssociations("filters",l),onCategoryFilter:l=>t.toggleAssociations("categories",l),onShapeFilter:t.toggleShapes,onSelectNarrative:this.setNarrative}}),M(F6,{kind:"map"in n?"map":"space3d",onKeyDown:this.onKeyDown,methods:{onSelectNarrative:this.setNarrative,getCategoryColor:this.getCategoryColor,onSelect:n.associations.narrative?this.selectNarrativeStep:l=>this.handleSelect(l,1)}}),M(U4,{onKeyDown:this.onKeyDown,methods:{onSelect:n.associations.narrative?this.selectNarrativeStep:l=>this.handleSelect(l,0),onUpdateTimerange:t.updateTimeRange,getCategoryColor:this.getCategoryColor}}),M(oB,{timelineDims:i.dimensions,onViewSource:this.handleViewSource,onSelect:n.associations.narrative?this.selectNarrativeStep:()=>null,onHighlight:this.handleHighlight,onToggleCardstack:()=>t.updateSelected([]),getCategoryColor:this.getCategoryColor}),M(cB,{narrative:n.associations.narrative?{...n.associations.narrative,current:this.props.narrativeIdx}:null,methods:{onNext:()=>this.selectNarrativeStep(this.props.narrativeIdx+1),onPrev:()=>this.selectNarrativeStep(this.props.narrativeIdx-1),onSelectNarrative:this.setNarrative}}),M(fj,{language:n.language,styles:a,isOpen:n.flags.isInfopopup,onClose:t.toggleInfoPopup}),this.renderIntroPopup(a),n.debug?M(hj,{isNotification:n.flags.isNotification,notifications:r.notifications,onToggle:t.markNotificationsRead}):null,s.USE_SEARCH&&M(U6,{narrative:n.narrative,queryString:n.searchQuery,events:r.events,onSearchRowClick:this.handleSelect}),n.source?M(hx,{source:n.source,onCancel:()=>{t.updateSource(null)}}):null,M(px,{isLoading:n.loading||n.flags.isFetchingDomain,ui:n.flags.isFetchingDomain,language:n.language}),s.USE_COVER&&M(y4,{showing:n.flags.isCover,children:M(v4,{showing:n.flags.isCover,showAppHandler:t.toggleCover})})]})}}function fB(e){return{actions:Qo(rd,e)}}const hB=pi(e=>({...e,timeline:{dimensions:$p(e)},narrativeIdx:sE(e),narratives:Kg(e),selected:Xg(e)}),fB)(dB);class pB extends ee.Component{render(){return M(hB,{})}}const mB=xh.createRoot(document.getElementById("explore-app"));mB.render(M(h2,{store:E3,children:M(pB,{})}));window.opr&&opr.addons||window.opera||navigator.userAgent.indexOf(" OPR/")>=0;/constructor/i.test(window.HTMLElement)||function(e){return e.toString()==="[object SafariRemoteNotification]"}(!window.safari||typeof safari<"u"&&safari.pushNotification);const gk=!!document.documentMode,gB=!gk&&!!window.StyleMedia;window.chrome&&window.chrome.webstore;(gB||gk)&&alert("Please view this website in Opera for best viewing. It is untested in your browser."); diff --git a/index.html b/index.html index e7dfe8f..7e0efaa 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ } } - +