vendor: 5,331 bytes, lines 1-17
1var ww=Object.defineProperty;var Sw=(e,t,n)=>t in e?ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ft=(e,t,n)=>(Sw(e,typeof t!="symbol"?t+"":t,n),n),kw=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var eh=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var cs=(e,t,n)=>(kw(e,t,"access private method"),n);import{r as ee,a as Tw,g as ec,R as Os,c as Jo}from"./vendor-7ae7f5a9.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Ox={exports:{}},tc={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Ew=Symbol.for("react.transitional.element"),Aw=Symbol.for("react.fragment");function jx(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:Ew,type:e,key:i,ref:t!==void 0?t:null,props:n}}tc.Fragment=Aw;tc.jsx=jx;tc.jsxs=jx;Ox.exports=tc;var y=Ox.exports,Bx={exports:{}},nc={},Px={exports:{}},Fx={};/** 10 * @license React 11 * scheduler.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */(function(e){function t(C,F){var M=C.length;C.push(F);e:for(;0<M;){var V=M-1>>>1,k=C[V];if(0<a(k,F))C[V]=F,C[M]=k,M=V;else break e}}function n(C){return C.length===0?null:C[0]}function i(C){if(C.length===0)return null;var F=C[0],M=C.pop();if(M!==F){C[0]=M;e:for(var V=0,k=C.length,Q=k>>>1;V<Q;){var ie=2*(V+1)-1,z=C[ie],ye=ie+1,X=C[ye];if(0>a(z,M))ye<k&&0>a(X,z)?(C[V]=X,C[ye]=M,V=ye):(C[V]=z,C[ie]=M,V=ie);else if(ye<k&&0>a(X,M))C[V]=X,C[ye]=M,V=ye;else break e}}return F}function a(C,F){var M=C.sortIndex-F.sortIndex;return M!==0?M:C.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var h=[],f=[],d=1,m=null,g=3,x=!1,b=!1,E=!1,H=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(C){for(var F=n(f);F!==null;){if(F.callback===null)i(f);else if(F.startTime<=C)i(f),F.sortIndex=F.expirationTime,t(h,F);else break;F=n(f)}}function G(C){if(E=!1,D(C),!b)if(n(h)!==null)b=!0,j||(j=!0,O());else{var F=n(f);F!==null&&N(G,F.startTime-C)}}var j=!1,Z=-1,Y=5,q=-1;function te(){return H?!0:!(e.unstable_now()-q<Y)}function $(){if(H=!1,j){var C=e.unstable_now();q=C;var F=!0;try{e:{b=!1,E&&(E=!1,w(Z),Z=-1),x=!0;var M=g;try{t:{for(D(C),m=n(h);m!==null&&!(m.expirationTime>C&&te());){var V=m.callback;if(typeof V=="function"){m.callback=null,g=m.priorityLevel;var k=V(m.expirationTime<=C);if(C=e.unstable_now(),typeof k=="function"){m.callback=k,D(C),F=!0;break t}m===n(h)&&i(h),D(C)}else i(h);m=n(h)}if(m!==null)F=!0;else{var Q=n(f);Q!==null&&N(G,Q.startTime-C),F=!1}}break e}finally{m=null,g=M,x=!1}F=void 0}}finally{F?O():j=!1}}}var O;if(typeof A=="function")O=function(){A($)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,T=U.port2;U.port1.onmessage=$,O=function(){T.postMessage(null)}}else O=function(){v($,0)};function N(C,F){Z=v(function(){C(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(C){switch(g){case 1:case 2:case 3:var F=3;break;default:F=g}var M=g;g=F;try{return C()}finally{g=M}},e.unstable_requestPaint=function(){H=!0},e.unstable_runWithPriority=function(C,F){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=g;g=C;try{return F()}finally{g=M}},e.unstable_scheduleCallback=function(C,F,M){var V=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?V+M:V):M=V,C){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=M+k,C={id:d++,callback:F,priorityLevel:C,startTime:M,expirationTime:k,sortIndex:-1},M>
vendor: 20,278 bytes, lines 17-32
17V?(C.sortIndex=M,t(f,C),n(h)===null&&C===n(f)&&(E?(w(Z),Z=-1):E=!0,N(G,M-V))):(C.sortIndex=k,t(h,C),b||x||(b=!0,j||(j=!0,O()))),C},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(C){var F=g;return function(){var M=g;g=F;try{return C.apply(this,arguments)}finally{g=M}}}})(Fx);Px.exports=Fx;var zw=Px.exports;/** 18 * @license React 19 * react-dom-client.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var Mt=zw,Ix=ee,Cw=Tw;function fe(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function $x(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wl(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ux(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function qm(e){if(wl(e)!==e)throw Error(fe(188))}function Lw(e){var t=e.alternate;if(!t){if(t=wl(e),t===null)throw Error(fe(188));return t!==e?null:e}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return qm(a),e;if(o===i)return qm(a),t;o=o.sibling}throw Error(fe(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,u=a.child;u;){if(u===n){s=!0,n=a,i=o;break}if(u===i){s=!0,i=a,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,i=a;break}if(u===i){s=!0,i=o,n=a;break}u=u.sibling}if(!s)throw Error(fe(189))}}if(n.alternate!==i)throw Error(fe(190))}if(n.tag!==3)throw Error(fe(188));return n.stateNode.current===n?e:t}function Hx(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Hx(e),t!==null)return t;e=e.sibling}return null}var dt=Object.assign,Dw=Symbol.for("react.element"),hs=Symbol.for("react.transitional.element"),zo=Symbol.for("react.portal"),cr=Symbol.for("react.fragment"),Gx=Symbol.for("react.strict_mode"),rf=Symbol.for("react.profiler"),Mw=Symbol.for("react.provider"),Zx=Symbol.for("react.consumer"),xi=Symbol.for("react.context"),Ed=Symbol.for("react.forward_ref"),of=Symbol.for("react.suspense"),lf=Symbol.for("react.suspense_list"),Ad=Symbol.for("react.memo"),Fi=Symbol.for("react.lazy"),sf=Symbol.for("react.activity"),Nw=Symbol.for("react.memo_cache_sentinel"),Vm=Symbol.iterator;function po(e){return e===null||typeof e!="object"?null:(e=Vm&&e[Vm]||e["@@iterator"],typeof e=="function"?e:null)}var Rw=Symbol.for("react.client.reference");function uf(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Rw?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case cr:return"Fragment";case rf:return"Profiler";case Gx:return"StrictMode";case of:return"Suspense";case lf:return"SuspenseList";case sf:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case zo:return"Portal";case xi:return(e.displayName||"Context")+".Provider";case Zx:return(e._context.displayName||"Context")+".Consumer";case Ed:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ad:return t=e.displayName||null,t!==null?t:uf(e.type)||"Memo";case Fi:t=e._payload,e=e._init;try{return uf(e(t))}catch{}}return null}var Co=Array.isArray,Be=Ix.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Je=Cw.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Aa={pending:!1,data:null,method:null,action:null},cf=[],hr=-1;function oi(e){return{current:e}}function Bt(e){0>hr||(e.current=cf[hr],cf[hr]=null,hr--)}function gt(e,t){hr++,cf[hr]=e.current,e.current=t}var ei=oi(null),el=oi(null),Xi=oi(null),fu=oi(null);function du(e,t){switch(gt(Xi,t),gt(el,e),gt(ei,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qg(t),e=sv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Bt(ei),gt(ei,e)}function Nr(){Bt(ei),Bt(el),Bt(Xi)}function hf(e){e.memoizedState!==null&>(fu,e);var t=ei.current,n=sv(t,e.type);t!==n&&(gt(el,e),gt(ei,n))}function pu(e){el.current===e&&(Bt(ei),Bt(el)),fu.current===e&&(Bt(fu),cl._currentValue=Aa)}var ff=Object.prototype.hasOwnProperty,zd=Mt.unstable_scheduleCallback,th=Mt.unstable_cancelCallback,Ow=Mt.unstable_shouldYield,jw=Mt.unstable_requestPaint,ti=Mt.unstable_now,Bw=Mt.unstable_getCurrentPriorityLevel,qx=Mt.unstable_ImmediatePriority,Vx=Mt.unstable_UserBlockingPriority,mu=Mt.unstable_NormalPriority,Pw=Mt.unstable_LowPriority,Yx=Mt.unstable_IdlePriority,Fw=Mt.log,Iw=Mt.unstable_setDisableYieldValue,Sl=null,pn=null;function qi(e){if(typeof Fw=="function"&&Iw(e),pn&&typeof pn.setStrictMode=="function")try{pn.setStrictMode(Sl,e)}catch{}}var mn=Math.clz32?Math.clz32:Hw,$w=Math.log,Uw=Math.LN2;function Hw(e){return e>>>=0,e===0?32:31-($w(e)/Uw|0)|0}var fs=256,ds=4194304;function va(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ic(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var a=0,o=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var u=i&134217727;return u!==0?(i=u&~o,i!==0?a=va(i):(s&=u,s!==0?a=va(s):n||(n=u&~e,n!==0&&(a=va(n))))):(u=i&~o,u!==0?a=va(u):s!==0?a=va(s):n||(n=i&~e,n!==0&&(a=va(n)))),a===0?0:t!==0&&t!==a&&!(t&o)&&(o=a&-a,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:a}function kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Gw(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kx(){var e=fs;return fs<<=1,!(fs&4194048)&&(fs=256),e}function Xx(){var e=ds;return ds<<=1,!(ds&62914560)&&(ds=4194304),e}function nh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zw(e,t,n,i,a,o){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var u=e.entanglements,h=e.expirationTimes,f=e.hiddenUpdates;for(n=s&~n;0<n;){var d=31-mn(n),m=1<<d;u[d]=0,h[d]=-1;var g=f[d];if(g!==null)for(f[d]=null,d=0;d<g.length;d++){var x=g[d];x!==null&&(x.lane&=-536870913)}n&=~m}i!==0&&Wx(e,i,0),o!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=o&~(s&~t))}function Wx(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-mn(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&4194090}function Qx(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-mn(n),a=1<<i;a&t|e[i]&t&&(e[i]|=t),n&=~a}}function Cd(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ld(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Jx(){var e=Je.p;return e!==0?e:(e=window.event,e===void 0?32:xv(e.type))}function qw(e,t){var n=Je.p;try{return Je.p=e,t()}finally{Je.p=n}}var sa=Math.random().toString(36).slice(2),Ht="__reactFiber$"+sa,nn="__reactProps$"+sa,qr="__reactContainer$"+sa,df="__reactEvents$"+sa,Vw="__reactListeners$"+sa,Yw="__reactHandles$"+sa,Ym="__reactResources$"+sa,El="__reactMarker$"+sa;function Dd(e){delete e[Ht],delete e[nn],delete e[df],delete e[Vw],delete e[Yw]}function fr(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qr]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ty(e);e!==null;){if(n=e[Ht])return n;e=ty(e)}return t}e=n,n=e.parentNode}return null}function Vr(e){if(e=e[Ht]||e[qr]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Lo(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(fe(33))}function wr(e){var t=e[Ym];return t||(t=e[Ym]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[El]=!0}var e0=new Set,t0={};function $a(e,t){Rr(e,t),Rr(e+"Capture",t)}function Rr(e,t){for(t0[e]=t,e=0;e<t.length;e++)e0.add(t[e])}var Kw=RegExp("^[: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]*$"),Km={},Xm={};function Xw(e){return ff.call(Xm,e)?!0:ff.call(Km,e)?!1:Kw.test(e)?Xm[e]=!0:(Km[e]=!0,!1)}function js(e,t,n){if(Xw(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ps(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function di(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}var ih,Wm;function lr(e){if(ih===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ih=t&&t[1]||"",Wm=-1<n.stack.indexOf(` 26 at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return` 27`+ih+e+Wm}var ah=!1;function rh(e,t){if(!e||ah)return"";ah=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(x){var g=x}Reflect.construct(e,[],m)}else{try{m.call()}catch(x){g=x}e.call(m.prototype)}}else{try{throw Error()}catch(x){g=x}(m=e())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(x){if(x&&g&&typeof x.stack=="string")return[x.stack,g.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),s=o[0],u=o[1];if(s&&u){var h=s.split(` 28`),f=u.split(` 29`);for(a=i=0;i<h.length&&!h[i].includes("DetermineComponentFrameRoot");)i++;for(;a<f.length&&!f[a].includes("DetermineComponentFrameRoot");)a++;if(i===h.length||a===f.length)for(i=h.length-1,a=f.length-1;1<=i&&0<=a&&h[i]!==f[a];)a--;for(;1<=i&&0<=a;i--,a--)if(h[i]!==f[a]){if(i!==1||a!==1)do if(i--,a--,0>a||h[i]!==f[a]){var d=` 30`+h[i].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=i&&0<=a);break}}}finally{ah=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?lr(n):""}function Ww(e){switch(e.tag){case 26:case 27:case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 15:return rh(e.type,!1);case 11:return rh(e.type.render,!1);case 1:return rh(e.type,!0);case 31:return lr("Activity");default:return""}}function Qm(e){try{var t="";do t+=Ww(e),e=e.return;while(e);return t}catch(n){return` 31Error generating stack: `+n.message+` 32`+n.stack}}function Tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function n0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qw(e){var t=n0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gu(e){e._valueTracker||(e._valueTracker=Qw(e))}function i0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=n0(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function yu(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}}var Jw=/[\n"\\]/g;function Cn(e){return e.replace(Jw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pf(e,t,n,i,a,o,s,u){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tn(t)):e.value!==""+Tn(t)&&(e.value=""+Tn(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?mf(e,s,Tn(t)):n!=null?mf(e,s,Tn(n)):i!=null&&e.removeAttribute("value"),a==null&&o!=null&&(e.defaultChecked=!!o),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.name=""+Tn(u):e.removeAttribute("name")}function a0(e,t,n,i,a,o,s,u){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null))return;n=n!=null?""+Tn(n):"",t=t!=null?""+Tn(t):n,u||t===e.value||(e.value=t),e.defaultValue=t}i=i??a,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=u?e.checked:!!i,e.defaultChecked=!!i,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s)}function mf(e,t,n){t==="number"&&yu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Sr(e,t,n,i){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+Tn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function r0(e,t,n){if(t!=null&&(t=""+Tn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Tn(n):""}function o0(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(fe(92));if(Co(i)){if(1<i.length)throw Error(fe(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=Tn(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i)}function Or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var eS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jm(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||eS.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function l0(e,t,n){if(t!=null&&typeof t!="object")throw Error(fe(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var a in t)i=t[a],t.hasOwnProperty(a)&&n[a]!==i&&Jm(e,a,i)}else for(var o in t)t.hasOwnProperty(o)&&Jm(e,o,t[o])}function Md(e){if(e.indexOf("-")===-1)return!1;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 tS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
32-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),nS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bs(e){return nS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var gf=null;function Nd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dr=null,kr=null;function eg(e){var t=Vr(e);if(t&&(e=t.stateNode)){var n=e[nn]||null;e:switch(e=t.stateNode,t.type){case"input":if(pf(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Cn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=i[nn]||null;if(!a)throw Error(fe(90));pf(i,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&i0(i)}break e;case"textarea":r0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Sr(e,!!n.multiple,t,!1)}}}var oh=!1;function s0(e,t,n){if(oh)return e(t,n);oh=!0;try{var i=e(t);return i}finally{if(oh=!1,(dr!==null||kr!==null)&&(dc(),dr&&(t=dr,e=kr,kr=dr=null,eg(t),e)))for(t=0;t<e.length;t++)eg(e[t])}}function tl(e,t){var n=e.stateNode;if(n===null)return null;var i=n[nn]||null;if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(fe(231,t,typeof n));return n}var Ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yf=!1;if(Ai)try{var mo={};Object.defineProperty(mo,"passive",{get:function(){yf=!0}}),window.addEventListener("test",mo,mo),window.removeEventListener("test",mo,mo)}catch{yf=!1}var Vi=null,Rd=null,Ps=null;function u0(){if(Ps)return Ps;var e,t=Rd,n=t.length,i,a="value"in Vi?Vi.value:Vi.textContent,o=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(i=1;i<=s&&t[n-i]===a[o-i];i++);return Ps=a.slice(e,1<i?1-i:void 0)}function Fs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ms(){return!0}function tg(){return!1}function an(e){function t(n,i,a,o,s){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(o):o[u]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ms:tg,this.isPropagationStopped=tg,this}return dt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ms)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ms)},persist:function(){},isPersistent:ms}),t}var Ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ac=an(Ua),Al=dt({},Ua,{view:0,detail:0}),iS=an(Al),lh,sh,go,rc=dt({},Al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Od,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==go&&(go&&e.type==="mousemove"?(lh=e.screenX-go.screenX,sh=e.screenY-go.screenY):sh=lh=0,go=e),lh)},movementY:function(e){return"movementY"in e?e.movementY:sh}}),ng=an(rc),aS=dt({},rc,{dataTransfer:0}),rS=an(aS),oS=dt({},Al,{relatedTarget:0}),uh=an(oS),lS=dt({},Ua,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=an(lS),uS=dt({},Ua,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cS=an(uS),hS=dt({},Ua,{data:0}),ig=an(hS),fS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pS[e])?!!t[e]:!1}function Od(){return mS}var gS=dt({},Al,{key:function(e){if(e.key){var t=fS[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 5,211 bytes, line 32
32return e.type==="keypress"?(e=Fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Od,charCode:function(e){return e.type==="keypress"?Fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yS=an(gS),xS=dt({},rc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ag=an(xS),_S=dt({},Al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Od}),vS=an(_S),bS=dt({},Ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),wS=an(bS),SS=dt({},rc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kS=an(SS),TS=dt({},Ua,{newState:0,oldState:0}),ES=an(TS),AS=[9,13,27,32],jd=Ai&&"CompositionEvent"in window,Ro=null;Ai&&"documentMode"in document&&(Ro=document.documentMode);var zS=Ai&&"TextEvent"in window&&!Ro,c0=Ai&&(!jd||Ro&&8<Ro&&11>=Ro),rg=String.fromCharCode(32),og=!1;function h0(e,t){switch(e){case"keyup":return AS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pr=!1;function CS(e,t){switch(e){case"compositionend":return f0(t);case"keypress":return t.which!==32?null:(og=!0,rg);case"textInput":return e=t.data,e===rg&&og?null:e;default:return null}}function LS(e,t){if(pr)return e==="compositionend"||!jd&&h0(e,t)?(e=u0(),Ps=Rd=Vi=null,pr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return c0&&t.locale!=="ko"?null:t.data;default:return null}}var DS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!DS[e.type]:t==="textarea"}function d0(e,t,n,i){dr?kr?kr.push(i):kr=[i]:dr=i,t=Ou(t,"onChange"),0<t.length&&(n=new ac("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Oo=null,nl=null;function MS(e){rv(e,0)}function oc(e){var t=Lo(e);if(i0(t))return e}function sg(e,t){if(e==="change")return t}var p0=!1;if(Ai){var ch;if(Ai){var hh="oninput"in document;if(!hh){var ug=document.createElement("div");ug.setAttribute("oninput","return;"),hh=typeof ug.oninput=="function"}ch=hh}else ch=!1;p0=ch&&(!document.documentMode||9<document.documentMode)}function cg(){Oo&&(Oo.detachEvent("onpropertychange",m0),nl=Oo=null)}function m0(e){if(e.propertyName==="value"&&oc(nl)){var t=[];d0(t,nl,e,Nd(e)),s0(MS,t)}}function NS(e,t,n){e==="focusin"?(cg(),Oo=t,nl=n,Oo.attachEvent("onpropertychange",m0)):e==="focusout"&&cg()}function RS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oc(nl)}function OS(e,t){if(e==="click")return oc(t)}function jS(e,t){if(e==="input"||e==="change")return oc(t)}function BS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:BS;function il(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!ff.call(t,a)||!xn(e[a],t[a]))return!1}return!0}function hg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fg(e,t){var n=hg(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hg(n)}}function g0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?g0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function y0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yu(e.document)}return t}function Bd(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")}var PS=Ai&&"documentMode"in document&&11>=document.documentMode,mr=null,xf=null,jo=null,_f=!1;function dg(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_f||mr==null||mr!==yu(i)||(i=mr,"selectionStart"in i&&Bd(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focu
vendor: 74,358 bytes, line 32
32sNode:i.focusNode,focusOffset:i.focusOffset}),jo&&il(jo,i)||(jo=i,i=Ou(xf,"onSelect"),0<i.length&&(t=new ac("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=mr)))}function ga(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gr={animationend:ga("Animation","AnimationEnd"),animationiteration:ga("Animation","AnimationIteration"),animationstart:ga("Animation","AnimationStart"),transitionrun:ga("Transition","TransitionRun"),transitionstart:ga("Transition","TransitionStart"),transitioncancel:ga("Transition","TransitionCancel"),transitionend:ga("Transition","TransitionEnd")},fh={},x0={};Ai&&(x0=document.createElement("div").style,"AnimationEvent"in window||(delete gr.animationend.animation,delete gr.animationiteration.animation,delete gr.animationstart.animation),"TransitionEvent"in window||delete gr.transitionend.transition);function Ha(e){if(fh[e])return fh[e];if(!gr[e])return e;var t=gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in x0)return fh[e]=t[n];return e}var _0=Ha("animationend"),v0=Ha("animationiteration"),b0=Ha("animationstart"),FS=Ha("transitionrun"),IS=Ha("transitionstart"),$S=Ha("transitioncancel"),w0=Ha("transitionend"),S0=new Map,vf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vf.push("scrollEnd");function $n(e,t){S0.set(e,t),$a(t,[e])}var pg=new WeakMap;function Ln(e,t){if(typeof e=="object"&&e!==null){var n=pg.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Qm(t)},pg.set(e,t),t)}return{value:e,source:t,stack:Qm(t)}}var kn=[],yr=0,Pd=0;function lc(){for(var e=yr,t=Pd=yr=0;t<e;){var n=kn[t];kn[t++]=null;var i=kn[t];kn[t++]=null;var a=kn[t];kn[t++]=null;var o=kn[t];if(kn[t++]=null,i!==null&&a!==null){var s=i.pending;s===null?a.next=a:(a.next=s.next,s.next=a),i.pending=a}o!==0&&k0(n,a,o)}}function sc(e,t,n,i){kn[yr++]=e,kn[yr++]=t,kn[yr++]=n,kn[yr++]=i,Pd|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Fd(e,t,n,i){return sc(e,t,n,i),xu(e)}function Yr(e,t){return sc(e,null,null,t),xu(e)}function k0(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var a=!1,o=e.return;o!==null;)o.childLanes|=n,i=o.alternate,i!==null&&(i.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(a=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,a&&t!==null&&(a=31-mn(n),e=o.hiddenUpdates,i=e[a],i===null?e[a]=[t]:i.push(t),t.lane=n|536870912),o):null}function xu(e){if(50<qo)throw qo=0,$f=null,Error(fe(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xr={};function US(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(e,t,n,i){return new US(e,t,n,i)}function Id(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ti(e,t){var n=e.alternate;return n===null?(n=fn(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&65011712,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.refCleanup=e.refCleanup,n}function T0(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Is(e,t,n,i,a,o){var s=0;if(i=e,typeof e=="function")Id(e)&&(s=1);else if(typeof e=="string")s=Gk(e,n,ei.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case sf:return e=fn(31,n,t,a),e.elementType=sf,e.lanes=o,e;case cr:return za(n.children,a,o,t);case Gx:s=8,a|=24;break;case rf:return e=fn(12,n,t,a|2),e.elementType=rf,e.lanes=o,e;case of:return e=fn(13,n,t,a),e.elementType=of,e.lanes=o,e;case lf:return e=fn(19,n,t,a),e.elementType=lf,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Mw:case xi:s=10;break e;case Zx:s=9;break e;case Ed:s=11;break e;case Ad:s=14;break e;case Fi:s=16,i=null;break e}s=29,n=Error(fe(130,e===null?"null":typeof e,"")),i=null}return t=fn(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function za(e,t,n,i){return e=fn(7,e,i,t),e.lanes=n,e}function dh(e,t,n){return e=fn(6,e,null,t),e.lanes=n,e}function ph(e,t,n){return t=fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _r=[],vr=0,_u=null,vu=0,En=[],An=0,Ca=null,_i=1,vi="";function ba(e,t){_r[vr++]=vu,_r[vr++]=_u,_u=e,vu=t}function E0(e,t,n){En[An++]=_i,En[An++]=vi,En[An++]=Ca,Ca=e;var i=_i;e=vi;var a=32-mn(i)-1;i&=~(1<<a),n+=1;var o=32-mn(t)+a;if(30<o){var s=a-a%5;o=(i&(1<<s)-1).toString(32),i>>=s,a-=s,_i=1<<32-mn(t)+a|n<<a|i,vi=o+e}else _i=1<<o|n<<a|i,vi=e}function $d(e){e.return!==null&&(ba(e,1),E0(e,1,0))}function Ud(e){for(;e===_u;)_u=_r[--vr],_r[vr]=null,vu=_r[--vr],_r[vr]=null;for(;e===Ca;)Ca=En[--An],En[An]=null,vi=En[--An],En[An]=null,_i=En[--An],En[An]=null}var Vt=null,vt=null,We=!1,La=null,Kn=!1,bf=Error(fe(519));function Oa(e){var t=Error(fe(418,""));throw al(Ln(t,e)),bf}function mg(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Ht]=e,t[nn]=i,n){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(n=0;n<ll.length;n++)qe(ll[n],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),a0(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),gu(t);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),o0(t,i.value,i.defaultValue,i.children),gu(t)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||lv(t.textContent,n)?(i.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),i.onScroll!=null&&qe("scroll",t),i.onScrollEnd!=null&&qe("scrollend",t),i.onClick!=null&&(t.onclick=gc),t=!0):t=!1,t||Oa(e)}function gg(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Vt=Vt.return}}function yo(e){if(e!==Vt)return!1;if(!We)return gg(e),We=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Vf(e.type,e.memoizedProps)),n=!n),n&&vt&&Oa(e),gg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(fe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){vt=In(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}vt=null}}else t===27?(t=vt,ua(e.type)?(e=Xf,Xf=null,vt=e):vt=t):vt=Vt?In(e.stateNode.nextSibling):null;return!0}function zl(){vt=Vt=null,We=!1}function yg(){var e=La;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),La=null),e}function al(e){La===null?La=[e]:La.push(e)}var wf=oi(null),Ga=null,bi=null;function Ui(e,t,n){gt(wf,t._currentValue),t._currentValue=n}function Ei(e){e._currentValue=wf.current,Bt(wf)}function Sf(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function kf(e,t,n,i){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;e:for(;o!==null;){var u=o;o=a;for(var h=0;h<t.length;h++)if(u.context===t[h]){o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Sf(o.return,n,e),i||(s=null);break e}o=u.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(fe(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Sf(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Cl(e,t,n,i){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(fe(387));if(s=s.memoizedProps,s!==null){var u=a.type;xn(a.pendingProps.value,s.value)||(e!==null?e.push(u):e=[u])}}else if(a===fu.current){if(s=a.alternate,s===null)throw Error(fe(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(cl):e=[cl])}a=a.return}e!==null&&kf(t,e,n,i),t.flags|=262144}function bu(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ja(e){Ga=e,bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return A0(Ga,e)}function gs(e,t){return Ga===null&&ja(e),A0(e,t)}function A0(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},bi===null){if(e===null)throw Error(fe(308));bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else bi=bi.next=t;return n}var HS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},GS=Mt.unstable_scheduleCallback,ZS=Mt.unstable_NormalPriority,Lt={$$typeof:xi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hd(){return{controller:new HS,data:new Map,refCount:0}}function Ll(e){e.refCount--,e.refCount===0&&GS(ZS,function(){e.controller.abort()})}var Bo=null,Tf=0,jr=0,Tr=null;function qS(e,t){if(Bo===null){var n=Bo=[];Tf=0,jr=fp(),Tr={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Tf++,t.then(xg,xg),t}function xg(){if(--Tf===0&&Bo!==null){Tr!==null&&(Tr.status="fulfilled");var e=Bo;Bo=null,jr=0,Tr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function VS(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(i.status="rejected",i.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),i}var _g=Be.S;Be.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&qS(e,t),_g!==null&&_g(e,t)};var Da=oi(null);function Gd(){var e=Da.current;return e!==null?e:ht.pooledCache}function $s(e,t){t===null?gt(Da,Da.current):gt(Da,t.pool)}function z0(){var e=Gd();return e===null?null:{parent:Lt._currentValue,pool:e}}var Dl=Error(fe(460)),C0=Error(fe(474)),uc=Error(fe(542)),Ef={then:function(){}};function vg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ys(){}function L0(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ys,ys),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wg(e),e;default:if(typeof t.status=="string")t.then(ys,ys);else{if(e=ht,e!==null&&100<e.shellSuspendCounter)throw Error(fe(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=i}},function(i){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wg(e),e}throw Po=t,Dl}}var Po=null;function bg(){if(Po===null)throw Error(fe(459));var e=Po;return Po=null,e}function wg(e){if(e===Dl||e===uc)throw Error(fe(483))}var Ii=!1;function Zd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Af(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Qi(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,it&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,t=xu(e),k0(e,null,n),t}return sc(e,i,t,n),xu(e)}function Fo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Qx(e,n)}}function mh(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?a=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?a=o=t:o=o.next=t}else a=o=t;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var zf=!1;function Io(){if(zf){var e=Tr;if(e!==null)throw e}}function $o(e,t,n,i){zf=!1;var a=e.updateQueue;Ii=!1;var o=a.firstBaseUpdate,s=a.lastBaseUpdate,u=a.shared.pending;if(u!==null){a.shared.pending=null;var h=u,f=h.next;h.next=null,s===null?o=f:s.next=f,s=h;var d=e.alternate;d!==null&&(d=d.updateQueue,u=d.lastBaseUpdate,u!==s&&(u===null?d.firstBaseUpdate=f:u.next=f,d.lastBaseUpdate=h))}if(o!==null){var m=a.baseState;s=0,d=f=h=null,u=o;do{var g=u.lane&-536870913,x=g!==u.lane;if(x?(Ke&g)===g:(i&g)===g){g!==0&&g===jr&&(zf=!0),d!==null&&(d=d.next={lane:0,tag:u.tag,payload:u.payload,callback:null,next:null});e:{var b=e,E=u;g=t;var H=n;switch(E.tag){case 1:if(b=E.payload,typeof b=="function"){m=b.call(H,m,g);break e}m=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=E.payload,g=typeof b=="function"?b.call(H,m,g):b,g==null)break e;m=dt({},m,g);break e;case 2:Ii=!0}}g=u.callback,g!==null&&(e.flags|=64,x&&(e.flags|=8192),x=a.callbacks,x===null?a.callbacks=[g]:x.push(g))}else x={lane:g,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(f=d=x,h=m):d=d.next=x,s|=g;if(u=u.next,u===null){if(u=a.shared.pending,u===null)break;x=u,u=x.next,x.next=null,a.lastBaseUpdate=x,a.shared.pending=null}}while(1);d===null&&(h=m),a.baseState=h,a.firstBaseUpdate=f,a.lastBaseUpdate=d,o===null&&(a.shared.lanes=0),la|=s,e.lanes=s,e.memoizedState=m}}function D0(e,t){if(typeof e!="function")throw Error(fe(191,e));e.call(t)}function M0(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)D0(n[e],t)}var Br=oi(null),wu=oi(0);function Sg(e,t){e=Li,gt(wu,e),gt(Br,t),Li=e|t.baseLanes}function Cf(){gt(wu,Li),gt(Br,Br.current)}function qd(){Li=wu.current,Bt(Br),Bt(wu)}var ra=0,Ge=null,rt=null,zt=null,Su=!1,Er=!1,Ba=!1,ku=0,rl=0,Ar=null,YS=0;function St(){throw Error(fe(321))}function Vd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function Yd(e,t,n,i,a,o){return ra=o,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Be.H=e===null||e.memoizedState===null?u_:c_,Ba=!1,o=n(i,a),Ba=!1,Er&&(o=R0(t,n,i,a)),N0(e),o}function N0(e){Be.H=Tu;var t=rt!==null&&rt.next!==null;if(ra=0,zt=rt=Ge=null,Su=!1,rl=0,Ar=null,t)throw Error(fe(300));e===null||jt||(e=e.dependencies,e!==null&&bu(e)&&(jt=!0))}function R0(e,t,n,i){Ge=e;var a=0;do{if(Er&&(Ar=null),rl=0,Er=!1,25<=a)throw Error(fe(301));if(a+=1,zt=rt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}Be.H=tk,o=t(n,i)}while(Er);return o}function KS(){var e=Be.H,t=e.useState()[0];return t=typeof t.then=="function"?Ml(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ge.flags|=1024),t}function Kd(){var e=ku!==0;return ku=0,e}function Xd(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Wd(e){if(Su){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Su=!1}ra=0,zt=rt=Ge=null,Er=!1,rl=ku=0,Ar=null}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Ge.memoizedState=zt=e:zt=zt.next=e,zt}function Ct(){if(rt===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=zt===null?Ge.memoizedState:zt.next;if(t!==null)zt=t,rt=e;else{if(e===null)throw Ge.alternate===null?Error(fe(467)):Error(fe(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},zt===null?Ge.memoizedState=zt=e:zt=zt.next=e}return zt}function Qd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ml(e){var t=rl;return rl+=1,Ar===null&&(Ar=[]),e=L0(Ar,e,t),t=Ge,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,Be.H=t===null||t.memoizedState===null?u_:c_),e}function cc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ml(e);if(e.$$typeof===xi)return Gt(e)}throw Error(fe(438,String(e)))}function Jd(e){var t=null,n=Ge.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=Ge.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Qd(),Ge.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=Nw;return t.index++,n}function zi(e,t){return typeof t=="function"?t(e):t}function Us(e){var t=Ct();return ep(t,rt,e)}function ep(e,t,n){var i=e.queue;if(i===null)throw Error(fe(311));i.lastRenderedReducer=n;var a=e.baseQueue,o=i.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,i.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var u=s=null,h=null,f=t,d=!1;do{var m=f.lane&-536870913;if(m!==f.lane?(Ke&m)===m:(ra&m)===m){var g=f.revertLane;if(g===0)h!==null&&(h=h.next={lane:0,revertLane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),m===jr&&(d=!0);else if((ra&g)===g){f=f.next,g===jr&&(d=!0);continue}else m={lane:0,revertLane:f.revertLane,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},h===null?(u=h=m,s=o):h=h.next=m,Ge.lanes|=g,la|=g;m=f.action,Ba&&n(o,m),o=f.hasEagerState?f.eagerState:n(o,m)}else g={lane:m,revertLane:f.revertLane,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},h===null?(u=h=g,s=o):h=h.next=g,Ge.lanes|=m,la|=m;f=f.next}while(f!==null&&f!==t);if(h===null?s=o:h.next=u,!xn(o,e.memoizedState)&&(jt=!0,d&&(n=Tr,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=h,i.lastRenderedState=o}return a===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function gh(e){var t=Ct(),n=t.queue;if(n===null)throw Error(fe(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);xn(o,t.memoizedState)||(jt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function O0(e,t,n){var i=Ge,a=Ct(),o=We;if(o){if(n===void 0)throw Error(fe(407));n=n()}else n=t();var s=!xn((rt||a).memoizedState,n);s&&(a.memoizedState=n,jt=!0),a=a.queue;var u=P0.bind(null,i,a,e);if(Nl(2048,8,u,[e]),a.getSnapshot!==t||s||zt!==null&&zt.memoizedState.tag&1){if(i.flags|=2048,Pr(9,hc(),B0.bind(null,i,a,n,t),null),ht===null)throw Error(fe(349));o||ra&124||j0(i,t,n)}return n}function j0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t=Qd(),Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function B0(e,t,n,i){t.value=n,t.getSnapshot=i,F0(t)&&I0(e)}function P0(e,t,n){return n(function(){F0(t)&&I0(e)})}function F0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function I0(e){var t=Yr(e,2);t!==null&&yn(t,e,2)}function Lf(e){var t=Wt();if(typeof e=="function"){var n=e;if(e=n(),Ba){qi(!0);try{n()}finally{qi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t}function $0(e,t,n,i){return e.baseState=n,ep(e,rt,typeof i=="function"?i:zi)}function XS(e,t,n,i,a){if(fc(e))throw Error(fe(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){o.listeners.push(s)}};Be.T!==null?n(!0):o.isTransition=!1,i(o),n=t.pending,n===null?(o.next=t.pending=o,U0(t,o)):(o.next=n.next,t.pending=n.next=o)}}function U0(e,t){var n=t.action,i=t.payload,a=e.state;if(t.isTransition){var o=Be.T,s={};Be.T=s;try{var u=n(a,i),h=Be.S;h!==null&&h(s,u),kg(e,t,u)}catch(f){Df(e,t,f)}finally{Be.T=o}}else try{o=n(a,i),kg(e,t,o)}catch(f){Df(e,t,f)}}function kg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Tg(e,t,i)},function(i){return Df(e,t,i)}):Tg(e,t,n)}function Tg(e,t,n){t.status="fulfilled",t.value=n,H0(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,U0(e,n)))}function Df(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,H0(t),t=t.next;while(t!==i)}e.action=null}function H0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function G0(e,t){return t}function Eg(e,t){if(We){var n=ht.formState;if(n!==null){e:{var i=Ge;if(We){if(vt){t:{for(var a=vt,o=Kn;a.nodeType!==8;){if(!o){a=null;break t}if(a=In(a.nextSibling),a===null){a=null;break t}}o=a.data,a=o==="F!"||o==="F"?a:null}if(a){vt=In(a.nextSibling),i=a.data==="F!";break e}}Oa(i)}i=!1}i&&(t=n[0])}}return n=Wt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G0,lastRenderedState:t},n.queue=i,n=o_.bind(null,Ge,i),i.dispatch=n,i=Lf(!1),o=ap.bind(null,Ge,!1,i.queue),i=Wt(),a={state:t,dispatch:null,action:e,pending:null},i.queue=a,n=XS.bind(null,Ge,a,o,n),a.dispatch=n,i.memoizedState=e,[t,n,!1]}function Ag(e){var t=Ct();return Z0(t,rt,e)}function Z0(e,t,n){if(t=ep(e,t,G0)[0],e=Us(zi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ml(t)}catch(s){throw s===Dl?uc:s}else i=t;t=Ct();var a=t.queue,o=a.dispatch;return n!==t.memoizedState&&(Ge.flags|=2048,Pr(9,hc(),WS.bind(null,a,n),null)),[i,o,e]}function WS(e,t){e.action=t}function zg(e){var t=Ct(),n=rt;if(n!==null)return Z0(t,n,e);Ct(),t=t.memoizedState,n=Ct();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Pr(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=Ge.updateQueue,t===null&&(t=Qd(),Ge.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function hc(){return{destroy:void 0,resource:void 0}}function q0(){return Ct().memoizedState}function Hs(e,t,n,i){var a=Wt();i=i===void 0?null:i,Ge.flags|=e,a.memoizedState=Pr(1|t,hc(),n,i)}function Nl(e,t,n,i){var a=Ct();i=i===void 0?null:i;var o=a.memoizedState.inst;rt!==null&&i!==null&&Vd(i,rt.memoizedState.deps)?a.memoizedState=Pr(t,o,n,i):(Ge.flags|=e,a.memoizedState=Pr(1|t,o,n,i))}function Cg(e,t){Hs(8390656,8,e,t)}function V0(e,t){Nl(2048,8,e,t)}function Y0(e,t){return Nl(4,2,e,t)}function K0(e,t){return Nl(4,4,e,t)}function X0(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function W0(e,t,n){n=n!=null?n.concat([e]):null,Nl(4,4,X0.bind(null,t,e),n)}function tp(){}function Q0(e,t){var n=Ct();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&Vd(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function J0(e,t){var n=Ct();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&Vd(t,i[1]))return i[0];if(i=e(),Ba){qi(!0);try{e()}finally{qi(!1)}}return n.memoizedState=[i,t],i}function np(e,t,n){return n===void 0||ra&1073741824?e.memoizedState=t:(e.memoizedState=n,e=H_(),Ge.lanes|=e,la|=e,n)}function e_(e,t,n,i){return xn(n,t)?n:Br.current!==null?(e=np(e,n,i),xn(e,t)||(jt=!0),e):ra&42?(e=H_(),Ge.lanes|=e,la|=e,t):(jt=!0,e.memoizedState=n)}function t_(e,t,n,i,a){var o=Je.p;Je.p=o!==0&&8>o?o:8;var s=Be.T,u={};Be.T=u,ap(e,!1,t,n);try{var h=a(),f=Be.S;if(f!==null&&f(u,h),h!==null&&typeof h=="object"&&typeof h.then=="function"){var d=VS(h,i);Uo(e,t,d,gn(e))}else Uo(e,t,i,gn(e))}catch(m){Uo(e,t,{then:function(){},status:"rejected",reason:m},gn())}finally{Je.p=o,Be.T=s}}function QS(){}function Mf(e,t,n,i){if(e.tag!==5)throw Error(fe(476));var a=n_(e).queue;t_(e,a,t,Aa,n===null?QS:function(){return i_(e),n(i)})}function n_(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Aa,baseState:Aa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:Aa},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function i_(e){var t=n_(e).next.queue;Uo(e,t,{},gn())}function ip(){return Gt(cl)}function a_(){return Ct().memoizedState}function r_(){return Ct().memoizedState}function JS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gn();e=Wi(n);var i=Qi(t,e,n);i!==null&&(yn(i,t,n),Fo(i,t,n)),t={cache:Hd()},e.payload=t;return}t=t.return}}function ek(e,t,n){var i=gn();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?l_(t,n):(n=Fd(e,t,n,i),n!==null&&(yn(n,e,i),s_(n,t,i)))}function o_(e,t,n){var i=gn();Uo(e,t,n,i)}function Uo(e,t,n,i){var a={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))l_(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,u=o(s,n);if(a.hasEagerState=!0,a.eagerState=u,xn(u,s))return sc(e,t,a,0),ht===null&&lc(),!1}catch{}finally{}if(n=Fd(e,t,a,i),n!==null)return yn(n,e,i),s_(n,t,i),!0}return!1}function ap(e,t,n,i){if(i={lane:2,revertLane:fp(),action:i,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(fe(479))}else t=Fd(e,n,i,2),t!==null&&yn(t,e,2)}function fc(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function l_(e,t){Er=Su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function s_(e,t,n){if(n&4194048){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Qx(e,n)}}var Tu={readContext:Gt,use:cc,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St},u_={readContext:Gt,use:cc,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:Cg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hs(4194308,4,X0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){Hs(4,2,e,t)},useMemo:function(e,t){var n=Wt();t=t===void 0?null:t;var i=e();if(Ba){qi(!0);try{e()}finally{qi(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Wt();if(n!==void 0){var a=n(t);if(Ba){qi(!0);try{n(t)}finally{qi(!1)}}}else a=t;return i.memoizedState=i.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},i.queue=e,e=e.dispatch=ek.bind(null,Ge,e),[i.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:function(e){e=Lf(e);var t=e.queue,n=o_.bind(null,Ge,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:tp,useDeferredValue:function(e,t){var n=Wt();return np(n,e,t)},useTransition:function(){var e=Lf(!1);return e=t_.bind(null,Ge,e.queue,!0,!1),Wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Ge,a=Wt();if(We){if(n===void 0)throw Error(fe(407));n=n()}else{if(n=t(),ht===null)throw Error(fe(349));Ke&124||j0(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Cg(P0.bind(null,i,o,e),[e]),i.flags|=2048,Pr(9,hc(),B0.bind(null,i,o,n,t),null),n},useId:function(){var e=Wt(),t=ht.identifierPrefix;if(We){var n=vi,i=_i;n=(i&~(1<<32-mn(i)-1)).toString(32)+n,t="«"+t+"R"+n,n=ku++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=YS++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ip,useFormState:Eg,useActionState:Eg,useOptimistic:function(e){var t=Wt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ap.bind(null,Ge,!0,n),n.dispatch=t,[e,t]},useMemoCache:Jd,useCacheRefresh:function(){return Wt().memoizedState=JS.bind(null,Ge)}},c_={readContext:Gt,use:cc,useCallback:Q0,useContext:Gt,useEffect:V0,useImperativeHandle:W0,useInsertionEffect:Y0,useLayoutEffect:K0,useMemo:J0,useReducer:Us,useRef:q0,useState:function(){return Us(zi)},useDebugValue:tp,useDeferredValue:function(e,t){var n=Ct();return e_(n,rt.memoizedState,e,t)},useTransition:function(){var e=Us(zi)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Ml(e),t]},useSyncExternalStore:O0,useId:a_,useHostTransitionStatus:ip,useFormState:Ag,useActionState:Ag,useOptimistic:function(e,t){var n=Ct();return $0(n,rt,e,t)},useMemoCache:Jd,useCacheRefresh:r_},tk={readContext:Gt,use:cc,useCallback:Q0,useContext:Gt,useEffect:V0,useImperativeHandle:W0,useInsertionEffect:Y0,useLayoutEffect:K0,useMemo:J0,useReducer:gh,useRef:q0,useState:function(){return gh(zi)},useDebugValue:tp,useDeferredValue:function(e,t){var n=Ct();return rt===null?np(n,e,t):e_(n,rt.memoizedState,e,t)},useTransition:function(){var e=gh(zi)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Ml(e),t]},useSyncExternalStore:O0,useId:a_,useHostTransitionStatus:ip,useFormState:zg,useActionState:zg,useOptimistic:function(e,t){var n=Ct();return rt!==null?$0(n,rt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Jd,useCacheRefresh:r_},zr=null,ol=0;function xs(e){var t=ol;return ol+=1,zr===null&&(zr=[]),L0(zr,e,t)}function xo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _s(e,t){throw t.$$typeof===Dw?Error(fe(525)):(e=Object.prototype.toString.call(t),Error(fe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Lg(e){var t=e._init;return t(e._payload)}function h_(e){function t(v,w){if(e){var A=v.deletions;A===null?(v.deletions=[w],v.flags|=16):A.push(w)}}function n(v,w){if(!e)return null;for(;w!==null;)t(v,w),w=w.sibling;return null}function i(v){for(var w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function a(v,w){return v=Ti(v,w),v.index=0,v.sibling=null,v}function o(v,w,A){return v.index=A,e?(A=v.alternate,A!==null?(A=A.index,A<w?(v.flags|=67108866,w):A):(v.flags|=67108866,w)):(v.flags|=1048576,w)}function s(v){return e&&v.alternate===null&&(v.flags|=67108866),v}function u(v,w,A,D){return w===null||w.tag!==6?(w=dh(A,v.mode,D),w.return=v,w):(w=a(w,A),w.return=v,w)}function h(v,w,A,D){var G=A.type;return G===cr?d(v,w,A.props.children,D,A.key):w!==null&&(w.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===Fi&&Lg(G)===w.type)?(w=a(w,A.props),xo(w,A),w.return=v,w):(w=Is(A.type,A.key,A.props,null,v.mode,D),xo(w,A),w.return=v,w)}function f(v,w,A,D){return w===null||w.tag!==4||w.stateNode.containerInfo!==A.containerInfo||w.stateNode.implementation!==A.implementation?(w=ph(A,v.mode,D),w.return=v,w):(w=a(w,A.children||[]),w.return=v,w)}function d(v,w,A,D,G){return w===null||w.tag!==7?(w=za(A,v.mode,D,G),w.return=v,w):(w=a(w,A),w.return=v,w)}function m(v,w,A){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=dh(""+w,v.mode,A),w.return=v,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case hs:return A=Is(w.type,w.key,w.props,null,v.mode,A),xo(A,w),A.return=v,A;case zo:return w=ph(w,v.mode,A),w.return=v,w;case Fi:var D=w._init;return w=D(w._payload),m(v,w,A)}if(Co(w)||po(w))return w=za(w,v.mode,A,null),w.return=v,w;if(typeof w.then=="function")return m(v,xs(w),A);if(w.$$typeof===xi)return m(v,gs(v,w),A);_s(v,w)}return null}function g(v,w,A,D){var G=w!==null?w.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return G!==null?null:u(v,w,""+A,D);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case hs:return A.key===G?h(v,w,A,D):null;case zo:return A.key===G?f(v,w,A,D):null;case Fi:return G=A._init,A=G(A._payload),g(v,w,A,D)}if(Co(A)||po(A))return G!==null?null:d(v,w,A,D,null);if(typeof A.then=="function")return g(v,w,xs(A),D);if(A.$$typeof===xi)return g(v,w,gs(v,A),D);_s(v,A)}return null}function x(v,w,A,D,G){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return v=v.get(A)||null,u(w,v,""+D,G);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case hs:return v=v.get(D.key===null?A:D.key)||null,h(w,v,D,G);case zo:return v=v.get(D.key===null?A:D.key)||null,f(w,v,D,G);case Fi:var j=D._init;return D=j(D._payload),x(v,w,A,D,G)}if(Co(D)||po(D))return v=v.get(A)||null,d(w,v,D,G,null);if(typeof D.then=="function")return x(v,w,A,xs(D),G);if(D.$$typeof===xi)return x(v,w,A,gs(w,D),G);_s(w,D)}return null}function b(v,w,A,D){for(var G=null,j=null,Z=w,Y=w=0,q=null;Z!==null&&Y<A.length;Y++){Z.index>Y?(q=Z,Z=null):q=Z.sibling;var te=g(v,Z,A[Y],D);if(te===null){Z===null&&(Z=q);break}e&&Z&&te.alternate===null&&t(v,Z),w=o(te,w,Y),j===null?G=te:j.sibling=te,j=te,Z=q}if(Y===A.length)return n(v,Z),We&&ba(v,Y),G;if(Z===null){for(;Y<A.length;Y++)Z=m(v,A[Y],D),Z!==null&&(w=o(Z,w,Y),j===null?G=Z:j.sibling=Z,j=Z);return We&&ba(v,Y),G}for(Z=i(Z);Y<A.length;Y++)q=x(Z,v,Y,A[Y],D),q!==null&&(e&&q.alternate!==null&&Z.delete(q.key===null?Y:q.key),w=o(q,w,Y),j===null?G=q:j.sibling=q,j=q);return e&&Z.forEach(function($){return t(v,$)}),We&&ba(v,Y),G}function E(v,w,A,D){if(A==null)throw Error(fe(151));for(var G=null,j=null,Z=w,Y=w=0,q=null,te=A.next();Z!==null&&!te.done;Y++,te=A.next()){Z.index>Y?(q=Z,Z=null):q=Z.sibling;var $=g(v,Z,te.value,D);if($===null){Z===null&&(Z=q);break}e&&Z&&$.alternate===null&&t(v,Z),w=o($,w,Y),j===null?G=$:j.sibling=$,j=$,Z=q}if(te.done)return n(v,Z),We&&ba(v,Y),G;if(Z===null){for(;!te.done;Y++,te=A.next())te=m(v,te.value,D),te!==null&&(w=o(te,w,Y),j===null?G=te:j.sibling=te,j=te);return We&&ba(v,Y),G}for(Z=i(Z);!te.done;Y++,te=A.next())te=x(Z,v,Y,te.value,D),te!==null&&(e&&te.alternate!==null&&Z.delete(te.key===null?Y:te.key),w=o(te,w,Y),j===null?G=te:j.sibling=te,j=te);return e&&Z.forEach(function(O){return t(v,O)}),We&&ba(v,Y),G}function H(v,w,A,D){if(typeof A=="object"&&A!==null&&A.type===cr&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case hs:e:{for(var G=A.key;w!==null;){if(w.key===G){if(G=A.type,G===cr){if(w.tag===7){n(v,w.sibling),D=a(w,A.props.children),D.return=v,v=D;break e}}else if(w.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===Fi&&Lg(G)===w.type){n(v,w.sibling),D=a(w,A.props),xo(D,A),D.return=v,v=D;break e}n(v,w);break}else t(v,w);w=w.sibling}A.type===cr?(D=za(A.props.children,v.mode,D,A.key),D.return=v,v=D):(D=Is(A.type,A.key,A.props,null,v.mode,D),xo(D,A),D.return=v,v=D)}return s(v);case zo:e:{for(G=A.key;w!==null;){if(w.key===G)if(w.tag===4&&w.stateNode.containerInfo===A.containerInfo&&w.stateNode.implementation===A.implementation){n(v,w.sibling),D=a(w,A.children||[]),D.return=v,v=D;break e}else{n(v,w);break}else t(v,w);w=w.sibling}D=ph(A,v.mode,D),D.return=v,v=D}return s(v);case Fi:return G=A._init,A=G(A._payload),H(v,w,A,D)}if(Co(A))return b(v,w,A,D);if(po(A)){if(G=po(A),typeof G!="function")throw Error(fe(150));return A=G.call(A),E(v,w,A,D)}if(typeof A.then=="function")return H(v,w,xs(A),D);if(A.$$typeof===xi)return H(v,w,gs(v,A),D);_s(v,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,w!==null&&w.tag===6?(n(v,w.sibling),D=a(w,A),D.return=v,v=D):(n(v,w),D=dh(A,v.mode,D),D.return=v,v=D),s(v)):n(v,w)}return function(v,w,A,D){try{ol=0;var G=H(v,w,A,D);return zr=null,G}catch(Z){if(Z===Dl||Z===uc)throw Z;var j=fn(29,Z,null,v.mode);return j.lanes=D,j.return=v,j}finally{}}}var Fr=h_(!0),f_=h_(!1),Mn=oi(null),ni=null;function Hi(e){var t=e.alternate;gt(Dt,Dt.current&1),gt(Mn,e),ni===null&&(t===null||Br.current!==null||t.memoizedState!==null)&&(ni=e)}function d_(e){if(e.tag===22){if(gt(Dt,Dt.current),gt(Mn,e),ni===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(ni=e)}}else Gi()}function Gi(){gt(Dt,Dt.current),gt(Mn,Mn.current)}function wi(e){Bt(Mn),ni===e&&(ni=null),Bt(Dt)}var Dt=oi(0);function Eu(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==="$?"||Kf(n)))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}function yh(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:dt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nf={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=gn(),a=Wi(i);a.payload=t,n!=null&&(a.callback=n),t=Qi(e,a,i),t!==null&&(yn(t,e,i),Fo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=gn(),a=Wi(i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Qi(e,a,i),t!==null&&(yn(t,e,i),Fo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gn(),i=Wi(n);i.tag=2,t!=null&&(i.callback=t),t=Qi(e,i,n),t!==null&&(yn(t,e,n),Fo(t,e,n))}};function Dg(e,t,n,i,a,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,s):t.prototype&&t.prototype.isPureReactComponent?!il(n,i)||!il(a,o):!0}function Mg(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Nf.enqueueReplaceState(t,t.state,null)}function Pa(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=dt({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}var Au=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function p_(e){Au(e)}function m_(e){console.error(e)}function g_(e){Au(e)}function zu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Ng(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Rf(e,t,n){return n=Wi(n),n.tag=3,n.payload={element:null},n.callback=function(){zu(e,t)},n}function y_(e){return e=Wi(e),e.tag=3,e}function x_(e,t,n,i){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var o=i.value;e.payload=function(){return a(o)},e.callback=function(){Ng(t,n,i)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Ng(t,n,i),typeof a!="function"&&(Ji===null?Ji=new Set([this]):Ji.add(this));var u=i.stack;this.componentDidCatch(i.value,{componentStack:u!==null?u:""})})}function nk(e,t,n,i,a){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Cl(t,n,a,!0),n=Mn.current,n!==null){switch(n.tag){case 13:return ni===null?Uf():n.alternate===null&&bt===0&&(bt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===Ef?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),zh(e,i,a)),!1;case 22:return n.flags|=65536,i===Ef?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),zh(e,i,a)),!1}throw Error(fe(435,n.tag))}return zh(e,i,a),Uf(),!1}if(We)return t=Mn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==bf&&(e=Error(fe(422),{cause:i}),al(Ln(e,n)))):(i!==bf&&(t=Error(fe(423),{cause:i}),al(Ln(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=Ln(i,n),a=Rf(e.stateNode,i,a),mh(e,a),bt!==4&&(bt=2)),!1;var o=Error(fe(520),{cause:i});if(o=Ln(o,n),Zo===null?Zo=[o]:Zo.push(o),bt!==4&&(bt=2),t===null)return!0;i=Ln(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Rf(n.stateNode,i,e),mh(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Ji===null||!Ji.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=y_(a),x_(a,e,n,i),mh(n,a),!1}n=n.return}while(n!==null);return!1}var __=Error(fe(461)),jt=!1;function Ft(e,t,n,i){t.child=e===null?f_(t,null,n,i):Fr(t,e.child,n,i)}function Rg(e,t,n,i,a){n=n.render;var o=t.ref;if("ref"in i){var s={};for(var u in i)u!=="ref"&&(s[u]=i[u])}else s=i;return ja(t),i=Yd(e,t,n,s,o,a),u=Kd(),e!==null&&!jt?(Xd(e,t,a),Ci(e,t,a)):(We&&u&&$d(t),t.flags|=1,Ft(e,t,i,a),t.child)}function Og(e,t,n,i,a){if(e===null){var o=n.type;return typeof o=="function"&&!Id(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,v_(e,t,o,i,a)):(e=Is(n.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!rp(e,a)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:il,n(s,i)&&e.ref===t.ref)return Ci(e,t,a)}return t.flags|=1,e=Ti(o,i),e.ref=t.ref,e.return=t,t.child=e}function v_(e,t,n,i,a){if(e!==null){var o=e.memoizedProps;if(il(o,i)&&e.ref===t.ref)if(jt=!1,t.pendingProps=i=o,rp(e,a))e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,Ci(e,t,a)}return Of(e,t,n,i,a)}function b_(e,t,n){var i=t.pendingProps,a=i.children,o=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if(t.flags&128){if(i=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;t.childLanes=o&~i}else t.childLanes=0,t.child=null;return jg(e,t,i,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$s(t,o!==null?o.cachePool:null),o!==null?Sg(t,o):Cf(),d_(t);else return t.lanes=t.childLanes=536870912,jg(e,t,o!==null?o.baseLanes|n:n,n)}else o!==null?($s(t,o.cachePool),Sg(t,o),Gi(),t.memoizedState=null):(e!==null&&$s(t,null),Cf(),Gi());return Ft(e,t,a,n),t.child}function jg(e,t,n,i){var a=Gd();return a=a===null?null:{parent:Lt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&$s(t,null),Cf(),d_(t),e!==null&&Cl(e,t,i,!0),null}function Gs(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(fe(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Of(e,t,n,i,a){return ja(t),n=Yd(e,t,n,i,void 0,a),i=Kd(),e!==null&&!jt?(Xd(e,t,a),Ci(e,t,a)):(We&&i&&$d(t),t.flags|=1,Ft(e,t,n,a),t.child)}function Bg(e,t,n,i,a,o){return ja(t),t.updateQueue=null,n=R0(t,i,n,a),N0(e),i=Kd(),e!==null&&!jt?(Xd(e,t,o),Ci(e,t,o)):(We&&i&&$d(t),t.flags|=1,Ft(e,t,n,o),t.child)}function Pg(e,t,n,i,a){if(ja(t),t.stateNode===null){var o=xr,s=n.contextType;typeof s=="object"&&s!==null&&(o=Gt(s)),o=new n(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Nf,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},Zd(t),s=n.contextType,o.context=typeof s=="object"&&s!==null?Gt(s):xr,o.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(yh(t,n,s,i),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(s=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),s!==o.state&&Nf.enqueueReplaceState(o,o.state,null),$o(t,i,o,a),Io(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var u=t.memoizedProps,h=Pa(n,u);o.props=h;var f=o.context,d=n.contextType;s=xr,typeof d=="object"&&d!==null&&(s=Gt(d));var m=n.getDerivedStateFromProps;d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function",u=t.pendingProps!==u,d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u||f!==s)&&Mg(t,o,i,s),Ii=!1;var g=t.memoizedState;o.state=g,$o(t,i,o,a),Io(),f=t.memoizedState,u||g!==f||Ii?(typeof m=="function"&&(yh(t,n,m,i),f=t.memoizedState),(h=Ii||Dg(t,n,h,i,g,f,s))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=f),o.props=i,o.state=f,o.context=s,i=h):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,Af(e,t),s=t.memoizedProps,d=Pa(n,s),o.props=d,m=t.pendingProps,g=o.context,f=n.contextType,h=xr,typeof f=="object"&&f!==null&&(h=Gt(f)),u=n.getDerivedStateFromProps,(f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==m||g!==h)&&Mg(t,o,i,h),Ii=!1,g=t.memoizedState,o.state=g,$o(t,i,o,a),Io();var x=t.memoizedState;s!==m||g!==x||Ii||e!==null&&e.dependencies!==null&&bu(e.dependencies)?(typeof u=="function"&&(yh(t,n,u,i),x=t.memoizedState),(d=Ii||Dg(t,n,d,i,g,x,h)||e!==null&&e.dependencies!==null&&bu(e.dependencies))?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,x,h),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,x,h)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=x),o.props=i,o.state=x,o.context=h,i=d):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,Gs(e,t),i=(t.flags&128)!==0,o||i?(o=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&i?(t.child=Fr(t,e.child,null,a),t.child=Fr(t,null,n,a)):Ft(e,t,n,a),t.memoizedState=o.state,e=t.child):e=Ci(e,t,a),e}function Fg(e,t,n,i){return zl(),t.flags|=256,Ft(e,t,n,i),t.child}var xh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _h(e){return{baseLanes:e,cachePool:z0()}}function vh(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Dn),e}function w_(e,t,n){var i=t.pendingProps,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(We){if(a?Hi(t):Gi(),We){var u=vt,h;if(h=u){e:{for(h=u,u=Kn;h.nodeType!==8;){if(!u){u=null;break e}if(h=In(h.nextSibling),h===null){u=null;break e}}u=h}u!==null?(t.memoizedState={dehydrated:u,treeContext:Ca!==null?{id:_i,overflow:vi}:null,retryLane:536870912,hydrationErrors:null},h=fn(18,null,null,0),h.stateNode=u,h.return=t,t.child=h,Vt=t,vt=null,h=!0):h=!1}h||Oa(t)}if(u=t.memoizedState,u!==null&&(u=u.dehydrated,u!==null))return Kf(u)?t.lanes=32:t.lanes=536870912,null;wi(t)}return u=i.children,i=i.fallback,a?(Gi(),a=t.mode,u=Cu({mode:"hidden",children:u},a),i=za(i,a,n,null),u.return=t,i.return=t,u.sibling=i,t.child=u,a=t.child,a.memoizedState=_h(n),a.childLanes=vh(e,s,n),t.memoizedState=xh,i):(Hi(t),jf(t,u))}if(h=e.memoizedState,h!==null&&(u=h.dehydrated,u!==null)){if(o)t.flags&256?(Hi(t),t.flags&=-257,t=bh(e,t,n)):t.memoizedState!==null?(Gi(),t.child=e.child,t.flags|=128,t=null):(Gi(),a=i.fallback,u=t.mode,i=Cu({mode:"visible",children:i.children},u),a=za(a,u,n,null),a.flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,Fr(t,e.child,null,n),i=t.child,i.memoizedState=_h(n),i.childLanes=vh(e,s,n),t.memoizedState=xh,t=a);else if(Hi(t),Kf(u)){if(s=u.nextSibling&&u.nextSibling.dataset,s)var f=s.dgst;s=f,i=Error(fe(419)),i.stack="",i.digest=s,al({value:i,source:null,stack:null}),t=bh(e,t,n)}else if(jt||Cl(e,t,n,!1),s=(n&e.childLanes)!==0,jt||s){if(s=ht,s!==null&&(i=n&-n,i=i&42?1:Cd(i),i=i&(s.suspendedLanes|n)?0:i,i!==0&&i!==h.retryLane))throw h.retryLane=i,Yr(e,i),yn(s,e,i),__;u.data==="$?"||Uf(),t=bh(e,t,n)}else u.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=h.treeContext,vt=In(u.nextSibling),Vt=t,We=!0,La=null,Kn=!1,e!==null&&(En[An++]=_i,En[An++]=vi,En[An++]=Ca,_i=e.id,vi=e.overflow,Ca=t),t=jf(t,i.children),t.flags|=4096);return t}return a?(Gi(),a=i.fallback,u=t.mode,h=e.child,f=h.sibling,i=Ti(h,{mode:"hidden",children:i.children}),i.subtreeFlags=h.subtreeFlags&65011712,f!==null?a=Ti(f,a):(a=za(a,u,n,null),a.flags|=2),a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,u=e.child.memoizedState,u===null?u=_h(n):(h=u.cachePool,h!==null?(f=Lt._currentValue,h=h.parent!==f?{parent:f,pool:f}:h):h=z0(),u={baseLanes:u.baseLanes|n,cachePool:h}),a.memoizedState=u,a.childLanes=vh(e,s,n),t.memoizedState=xh,i):(Hi(t),n=e.child,e=n.sibling,n=Ti(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function jf(e,t){return t=Cu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Cu(e,t){return e=fn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function bh(e,t,n){return Fr(t,e.child,null,n),e=jf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ig(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Sf(e.return,t,n)}function wh(e,t,n,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=a)}function S_(e,t,n){var i=t.pendingProps,a=i.revealOrder,o=i.tail;if(Ft(e,t,i.children,n),i=Dt.current,i&2)i=i&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&&Ig(e,n,t);else if(e.tag===19)Ig(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}i&=1}switch(gt(Dt,i),a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Eu(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),wh(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Eu(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}wh(t,!0,n,null,o);break;case"together":wh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ci(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),la|=t.lanes,!(n&t.childLanes))if(e!==null){if(Cl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(fe(153));if(t.child!==null){for(e=t.child,n=Ti(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ti(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rp(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&bu(e)))}function ik(e,t,n){switch(t.tag){case 3:du(t,t.stateNode.containerInfo),Ui(t,Lt,e.memoizedState.cache),zl();break;case 27:case 5:hf(t);break;case 4:du(t,t.stateNode.containerInfo);break;case 10:Ui(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Hi(t),t.flags|=128,null):n&t.child.childLanes?w_(e,t,n):(Hi(t),e=Ci(e,t,n),e!==null?e.sibling:null);Hi(t);break;case 19:var a=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Cl(e,t,n,!1),i=(n&t.childLanes)!==0),a){if(i)return S_(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),gt(Dt,Dt.current),i)break;return null;case 22:case 23:return t.lanes=0,b_(e,t,n);case 24:Ui(t,Lt,e.memoizedState.cache)}return Ci(e,t,n)}function k_(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!rp(e,n)&&!(t.flags&128))return jt=!1,ik(e,t,n);jt=!!(e.flags&131072)}else jt=!1,We&&t.flags&1048576&&E0(t,vu,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,a=i._init;if(i=a(i._payload),t.type=i,typeof i=="function")Id(i)?(e=Pa(i,e),t.tag=1,t=Pg(null,t,i,e,n)):(t.tag=0,t=Of(null,t,i,e,n));else{if(i!=null){if(a=i.$$typeof,a===Ed){t.tag=11,t=Rg(null,t,i,e,n);break e}else if(a===Ad){t.tag=14,t=Og(null,t,i,e,n);break e}}throw t=uf(i)||i,Error(fe(306,t,""))}}return t;case 0:return Of(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,a=Pa(i,t.pendingProps),Pg(e,t,i,a,n);case 3:e:{if(du(t,t.stateNode.containerInfo),e===null)throw Error(fe(387));i=t.pendingProps;var o=t.memoizedState;a=o.element,Af(e,t),$o(t,i,null,n);var s=t.memoizedState;if(i=s.cache,Ui(t,Lt,i),i!==o.cache&&kf(t,[Lt],n,!0),Io(),i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Fg(e,t,i,n);break e}else if(i!==a){a=Ln(Error(fe(424)),t),al(a),t=Fg(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(vt=In(e.firstChild),Vt=t,We=!0,La=null,Kn=!0,n=f_(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zl(),i===a){t=Ci(e,t,n);break e}Ft(e,t,i,n)}t=t.child}return t;case 26:return Gs(e,t),e===null?(n=iy(t.type,null,t.pendingProps,null))?t.memoizedState=n:We||(n=t.type,e=t.pendingProps,i=ju(Xi.current).createElement(n),i[Ht]=t,i[nn]=e,$t(i,n,e),Ot(i),t.stateNode=i):t.memoizedState=iy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return hf(t),e===null&&We&&(i=t.stateNode=cv(t.type,t.pendingProps,Xi.current),Vt=t,Kn=!0,a=vt,ua(t.type)?(Xf=a,vt=In(i.firstChild)):vt=a),Ft(e,t,t.pendingProps.children,n),Gs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&We&&((a=i=vt)&&(i=Dk(i,t.type,t.pendingProps,Kn),i!==null?(t.stateNode=i,Vt=t,vt=In(i.firstChild),Kn=!1,a=!0):a=!1),a||Oa(t)),hf(t),a=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Vf(a,o)?i=null:s!==null&&Vf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Yd(e,t,KS,null,null,n),cl._currentValue=a),Gs(e,t),Ft(e,t,i,n),t.child;case 6:return e===null&&We&&((e=n=vt)&&(n=Mk(n,t.pendingProps,Kn),n!==null?(t.stateNode=n,Vt=t,vt=null,e=!0):e=!1),e||Oa(t)),null;case 13:return w_(e,t,n);case 4:return du(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Fr(t,null,i,n):Ft(e,t,i,n),t.child;case 11:return Rg(e,t,t.type,t.pendingProps,n);case 7:return Ft(e,t,t.pendingProps,n),t.child;case 8:return Ft(e,t,t.pendingProps.children,n),t.child;case 12:return Ft(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Ui(t,t.type,i.value),Ft(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,ja(t),a=Gt(a),i=i(a),t.flags|=1,Ft(e,t,i,n),t.child;case 14:return Og(e,t,t.type,t.pendingProps,n);case 15:return v_(e,t,t.type,t.pendingProps,n);case 19:return S_(e,t,n);case 31:return i=t.pendingProps,n=t.mode,i={mode:i.mode,children:i.children},e===null?(n=Cu(i,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=Ti(e.child,i),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return b_(e,t,n);case 24:return ja(t),i=Gt(Lt),e===null?(a=Gd(),a===null&&(a=ht,o=Hd(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:i,cache:a},Zd(t),Ui(t,Lt,a)):(e.lanes&n&&(Af(e,t),$o(t,null,null,n),Io()),a=e.memoizedState,o=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ui(t,Lt,i)):(i=o.cache,Ui(t,Lt,i),i!==a.cache&&kf(t,[Lt],n,!0))),Ft(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(fe(156,t.tag))}function pi(e){e.flags|=4}function $g(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!dv(t)){if(t=Mn.current,t!==null&&((Ke&4194048)===Ke?ni!==null:(Ke&62914560)!==Ke&&!(Ke&536870912)||t!==ni))throw Po=Ef,C0;e.flags|=8192}}function vs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xx():536870912,e.lanes|=t,Ir|=t)}function _o(e,t){if(!We)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&65011712,i|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function ak(e,t,n){var i=t.pendingProps;switch(Ud(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return xt(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ei(Lt),Nr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(yo(t)?pi(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yg())),xt(t),null;case 26:return n=t.memoizedState,e===null?(pi(t),n!==null?(xt(t),$g(t,n)):(xt(t),t.flags&=-16777217)):n?n!==e.memoizedState?(pi(t),xt(t),$g(t,n)):(xt(t),t.flags&=-16777217):(e.memoizedProps!==i&&pi(t),xt(t),t.flags&=-16777217),null;case 27:pu(t),n=Xi.current;var a=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&pi(t);else{if(!i){if(t.stateNode===null)throw Error(fe(166));return xt(t),null}e=ei.current,yo(t)?mg(t):(e=cv(a,i,n),t.stateNode=e,pi(t))}return xt(t),null;case 5:if(pu(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&pi(t);else{if(!i){if(t.stateNode===null)throw Error(fe(166));return xt(t),null}if(e=ei.current,yo(t))mg(t);else{switch(a=ju(Xi.current),e){case 1:e=a.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=a.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=a.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?a.createElement("select",{is:i.is}):a.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?a.createElement(n,{is:i.is}):a.createElement(n)}}e[Ht]=t,e[nn]=i;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=e;e:switch($t(e,n,i),n){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&pi(t)}}return xt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&pi(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(fe(166));if(e=Xi.current,yo(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,a=Vt,a!==null)switch(a.tag){case 27:case 5:i=a.memoizedProps}e[Ht]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||lv(e.nodeValue,n)),e||Oa(t)}else e=ju(e).createTextNode(i),e[Ht]=t,t.stateNode=e}return xt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=yo(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(fe(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(fe(317));a[Ht]=t}else zl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xt(t),a=!1}else a=yg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wi(t),t):(wi(t),null)}if(wi(t),t.flags&128)return t.lanes=n,t;if(n=i!==null,e=e!==null&&e.memoizedState!==null,n){i=t.child,a=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(a=i.alternate.memoizedState.cachePool.pool);var o=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==a&&(i.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),vs(t,t.updateQueue),xt(t),null;case 4:return Nr(),e===null&&dp(t.stateNode.containerInfo),xt(t),null;case 10:return Ei(t.type),xt(t),null;case 19:if(Bt(Dt),a=t.memoizedState,a===null)return xt(t),null;if(i=(t.flags&128)!==0,o=a.rendering,o===null)if(i)_o(a,!1);else{if(bt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eu(e),o!==null){for(t.flags|=128,_o(a,!1),e=o.updateQueue,t.updateQueue=e,vs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)T0(n,e),n=n.sibling;return gt(Dt,Dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&ti()>Du&&(t.flags|=128,i=!0,_o(a,!1),t.lanes=4194304)}else{if(!i)if(e=Eu(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,vs(t,e),_o(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!We)return xt(t),null}else 2*ti()-a.renderingStartTime>Du&&n!==536870912&&(t.flags|=128,i=!0,_o(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ti(),t.sibling=null,e=Dt.current,gt(Dt,i?e&1|2:e&1),t):(xt(t),null);case 22:case 23:return wi(t),qd(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),n=t.updateQueue,n!==null&&vs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&Bt(Da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ei(Lt),xt(t),null;case 25:return null;case 30:return null}throw Error(fe(156,t.tag))}function rk(e,t){switch(Ud(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(Lt),Nr(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pu(t),null;case 13:if(wi(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(fe(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bt(Dt),null;case 4:return Nr(),null;case 10:return Ei(t.type),null;case 22:case 23:return wi(t),qd(),e!==null&&Bt(Da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ei(Lt),null;case 25:return null;default:return null}}function T_(e,t){switch(Ud(t),t.tag){case 3:Ei(Lt),Nr();break;case 26:case 27:case 5:pu(t);break;case 4:Nr();break;case 13:wi(t);break;case 19:Bt(Dt);break;case 10:Ei(t.type);break;case 22:case 23:wi(t),qd(),e!==null&&Bt(Da);break;case 24:Ei(Lt)}}function Rl(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var a=i.next;n=a;do{if((n.tag&e)===e){i=void 0;var o=n.create,s=n.inst;i=o(),s.destroy=i}n=n.next}while(n!==a)}}catch(u){lt(t,t.return,u)}}function oa(e,t,n){try{var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var o=a.next;i=o;do{if((i.tag&e)===e){var s=i.inst,u=s.destroy;if(u!==void 0){s.destroy=void 0,a=t;var h=n,f=u;try{f()}catch(d){lt(a,h,d)}}}i=i.next}while(i!==o)}}catch(d){lt(t,t.return,d)}}function E_(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{M0(t,n)}catch(i){lt(e,e.return,i)}}}function A_(e,t,n){n.props=Pa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){lt(e,t,i)}}function Ho(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(a){lt(e,t,a)}}function Wn(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(a){lt(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){lt(e,t,a)}else n.current=null}function z_(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(a){lt(e,e.return,a)}}function Sh(e,t,n){try{var i=e.stateNode;Ek(i,e.type,n,t),i[nn]=t}catch(a){lt(e,e.return,a)}}function C_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ua(e.type)||e.tag===4}function kh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C_(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.tag===27&&ua(e.type)||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 Bf(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gc));else if(i!==4&&(i===27&&ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Bf(e,t,n),e=e.sibling;e!==null;)Bf(e,t,n),e=e.sibling}function Lu(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Lu(e,t,n),e=e.sibling;e!==null;)Lu(e,t,n),e=e.sibling}function L_(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);$t(t,i,n),t[Ht]=e,t[nn]=n}catch(o){lt(e,e.return,o)}}var yi=!1,kt=!1,Th=!1,Ug=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function ok(e,t){if(e=e.containerInfo,Zf=Iu,e=y0(e),Bd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,u=-1,h=-1,f=0,d=0,m=e,g=null;t:for(;;){for(var x;m!==n||a!==0&&m.nodeType!==3||(u=s+a),m!==o||i!==0&&m.nodeType!==3||(h=s+i),m.nodeType===3&&(s+=m.nodeValue.length),(x=m.firstChild)!==null;)g=m,m=x;for(;;){if(m===e)break t;if(g===n&&++f===a&&(u=s),g===o&&++d===i&&(h=s),(x=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=x}n=u===-1||h===-1?null:{start:u,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(qf={focusedElem:e,selectionRange:n},Iu=!1,Rt=t;Rt!==null;)if(t=Rt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Rt=e;else for(;Rt!==null;){switch(t=Rt,o=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,i=n.stateNode;try{var b=Pa(n.type,a,n.elementType===n.type);e=i.getSnapshotBeforeUpdate(b,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(E){lt(n,n.return,E)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Yf(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(fe(163))}if(e=t.sibling,e!==null){e.return=t.return,Rt=e;break}Rt=t.return}}function D_(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:ji(e,n),i&4&&Rl(5,n);break;case 1:if(ji(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){lt(n,n.return,s)}else{var a=Pa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){lt(n,n.return,s)}}i&64&&E_(n),i&512&&Ho(n,n.return);break;case 3:if(ji(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{M0(e,t)}catch(s){lt(n,n.return,s)}}break;case 27:t===null&&i&4&&L_(n);case 26:case 5:ji(e,n),t===null&&i&4&&z_(n),i&512&&Ho(n,n.return);break;case 12:ji(e,n);break;case 13:ji(e,n),i&4&&R_(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=mk.bind(null,n),Nk(e,n))));break;case 22:if(i=n.memoizedState!==null||yi,!i){t=t!==null&&t.memoizedState!==null||kt,a=yi;var o=kt;yi=i,(kt=t)&&!o?Pi(e,n,(n.subtreeFlags&8772)!==0):ji(e,n),yi=a,kt=o}break;case 30:break;default:ji(e,n)}}function M_(e){var t=e.alternate;t!==null&&(e.alternate=null,M_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dd(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,Qt=!1;function mi(e,t,n){for(n=n.child;n!==null;)N_(e,t,n),n=n.sibling}function N_(e,t,n){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(Sl,n)}catch{}switch(n.tag){case 26:kt||Wn(n,t),mi(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:kt||Wn(n,t);var i=pt,a=Qt;ua(n.type)&&(pt=n.stateNode,Qt=!1),mi(e,t,n),Vo(n.stateNode),pt=i,Qt=a;break;case 5:kt||Wn(n,t);case 6:if(i=pt,a=Qt,pt=null,mi(e,t,n),pt=i,Qt=a,pt!==null)if(Qt)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(n.stateNode)}catch(o){lt(n,t,o)}else try{pt.removeChild(n.stateNode)}catch(o){lt(n,t,o)}break;case 18:pt!==null&&(Qt?(e=pt,ey(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),dl(e)):ey(pt,n.stateNode));break;case 4:i=pt,a=Qt,pt=n.stateNode.containerInfo,Qt=!0,mi(e,t,n),pt=i,Qt=a;break;case 0:case 11:case 14:case 15:kt||oa(2,n,t),kt||oa(4,n,t),mi(e,t,n);break;case 1:kt||(Wn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&A_(n,t,i)),mi(e,t,n);break;case 21:mi(e,t,n);break;case 22:kt=(i=kt)||n.memoizedState!==null,mi(e,t,n),kt=i;break;default:mi(e,t,n)}}function R_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{dl(e)}catch(n){lt(t,t.return,n)}}function lk(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ug),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ug),t;default:throw Error(fe(435,e.tag))}}function Eh(e,t){var n=lk(e);t.forEach(function(i){var a=gk.bind(null,e,i);n.has(i)||(n.add(i),i.then(a,a))})}function ln(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i],o=e,s=t,u=s;e:for(;u!==null;){switch(u.tag){case 27:if(ua(u.type)){pt=u.stateNode,Qt=!1;break e}break;case 5:pt=u.stateNode,Qt=!1;break e;case 3:case 4:pt=u.stateNode.containerInfo,Qt=!0;break e}u=u.return}if(pt===null)throw Error(fe(160));N_(o,s,a),pt=null,Qt=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)O_(t,e),t=t.sibling}var Bn=null;function O_(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ln(t,e),sn(e),i&4&&(oa(3,e,e.return),Rl(3,e),oa(5,e,e.return));break;case 1:ln(t,e),sn(e),i&512&&(kt||n===null||Wn(n,n.return)),i&64&&yi&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var a=Bn;if(ln(t,e),sn(e),i&512&&(kt||n===null||Wn(n,n.return)),i&4){var o=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(i){case"title":o=a.getElementsByTagName("title")[0],(!o||o[El]||o[Ht]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=a.createElement(i),a.head.insertBefore(o,a.querySelector("head > title"))),$t(o,i,n),o[Ht]=e,Ot(o),i=o;break e;case"link":var s=ry("link","href",a).get(i+(n.href||""));if(s){for(var u=0;u<s.length;u++)if(o=s[u],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(u,1);break t}}o=a.createElement(i),$t(o,i,n),a.head.appendChild(o);break;case"meta":if(s=ry("meta","content",a).get(i+(n.content||""))){for(u=0;
vendor: 4,445 bytes, line 32
32u<s.length;u++)if(o=s[u],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(u,1);break t}}o=a.createElement(i),$t(o,i,n),a.head.appendChild(o);break;default:throw Error(fe(468,i))}o[Ht]=e,Ot(o),i=o}e.stateNode=i}else oy(a,e.type,e.stateNode);else e.stateNode=ay(a,i,e.memoizedProps);else o!==i?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,i===null?oy(a,e.type,e.stateNode):ay(a,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Sh(e,e.memoizedProps,n.memoizedProps)}break;case 27:ln(t,e),sn(e),i&512&&(kt||n===null||Wn(n,n.return)),n!==null&&i&4&&Sh(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ln(t,e),sn(e),i&512&&(kt||n===null||Wn(n,n.return)),e.flags&32){a=e.stateNode;try{Or(a,"")}catch(x){lt(e,e.return,x)}}i&4&&e.stateNode!=null&&(a=e.memoizedProps,Sh(e,a,n!==null?n.memoizedProps:a)),i&1024&&(Th=!0);break;case 6:if(ln(t,e),sn(e),i&4){if(e.stateNode===null)throw Error(fe(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(x){lt(e,e.return,x)}}break;case 3:if(Vs=null,a=Bn,Bn=Bu(t.containerInfo),ln(t,e),Bn=a,sn(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{dl(t.containerInfo)}catch(x){lt(e,e.return,x)}Th&&(Th=!1,j_(e));break;case 4:i=Bn,Bn=Bu(e.stateNode.containerInfo),ln(t,e),sn(e),Bn=i;break;case 12:ln(t,e),sn(e);break;case 13:ln(t,e),sn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(cp=ti()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Eh(e,i)));break;case 22:a=e.memoizedState!==null;var h=n!==null&&n.memoizedState!==null,f=yi,d=kt;if(yi=f||a,kt=d||h,ln(t,e),kt=d,yi=f,sn(e),i&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||h||yi||kt||wa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){h=n=t;try{if(o=h.stateNode,a)s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{u=h.stateNode;var m=h.memoizedProps.style,g=m!=null&&m.hasOwnProperty("display")?m.display:null;u.style.display=g==null||typeof g=="boolean"?"":(""+g).trim()}}catch(x){lt(h,h.return,x)}}}else if(t.tag===6){if(n===null){h=t;try{h.stateNode.nodeValue=a?"":h.memoizedProps}catch(x){lt(h,h.return,x)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,Eh(e,n))));break;case 19:ln(t,e),sn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Eh(e,i)));break;case 30:break;case 21:break;default:ln(t,e),sn(e)}}function sn(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(C_(i)){n=i;break}i=i.return}if(n==null)throw Error(fe(160));switch(n.tag){case 27:var a=n.stateNode,o=kh(e);Lu(e,o,a);break;case 5:var s=n.stateNode;n.flags&32&&(Or(s,""),n.flags&=-33);var u=kh(e);Lu(e,u,s);break;case 3:case 4:var h=n.stateNode.containerInfo,f=kh(e);Bf(e,f,h);break;default:throw Error(fe(161))}}catch(d){lt(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function j_(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;j_(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ji(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)D_(e,t.alternate,t),t=t.sibling}function wa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:oa(4,t,t.return),wa(t);break;case 1:Wn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&A_(t,t.return,n),wa(t);break;case 27:Vo(t.stateNode);case 26:case 5:Wn(t,t.return),wa(t);break;case 22:t.memoizedState===null&&wa(t);break;case 30:wa(t);break;default:wa(t)}e=e.sibling}}function Pi(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,a=e,o=t,s=o.flags;switch(o.tag){case 0:case 11:case 15:Pi(a,o,n),Rl(4,o);break;case 1:if(Pi(a,o,n),i=o,a=i.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(f){lt(i,i.return,f)}if(i=o,a=i.updateQueue,a!==null){var u=i.stateNode;try{var h=a.shared.hiddenCallbacks;
vendor: 9,196 bytes, line 32
32if(h!==null)for(a.shared.hiddenCallbacks=null,a=0;a<h.length;a++)D0(h[a],u)}catch(f){lt(i,i.return,f)}}n&&s&64&&E_(o),Ho(o,o.return);break;case 27:L_(o);case 26:case 5:Pi(a,o,n),n&&i===null&&s&4&&z_(o),Ho(o,o.return);break;case 12:Pi(a,o,n);break;case 13:Pi(a,o,n),n&&s&4&&R_(a,o);break;case 22:o.memoizedState===null&&Pi(a,o,n),Ho(o,o.return);break;case 30:break;default:Pi(a,o,n)}t=t.sibling}}function op(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ll(n))}function lp(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ll(e))}function Vn(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)B_(e,t,n,i),t=t.sibling}function B_(e,t,n,i){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Vn(e,t,n,i),a&2048&&Rl(9,t);break;case 1:Vn(e,t,n,i);break;case 3:Vn(e,t,n,i),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ll(e)));break;case 12:if(a&2048){Vn(e,t,n,i),e=t.stateNode;try{var o=t.memoizedProps,s=o.id,u=o.onPostCommit;typeof u=="function"&&u(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(h){lt(t,t.return,h)}}else Vn(e,t,n,i);break;case 13:Vn(e,t,n,i);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState!==null?o._visibility&2?Vn(e,t,n,i):Go(e,t):o._visibility&2?Vn(e,t,n,i):(o._visibility|=2,sr(e,t,n,i,(t.subtreeFlags&10256)!==0)),a&2048&&op(s,t);break;case 24:Vn(e,t,n,i),a&2048&&lp(t.alternate,t);break;default:Vn(e,t,n,i)}}function sr(e,t,n,i,a){for(a=a&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var o=e,s=t,u=n,h=i,f=s.flags;switch(s.tag){case 0:case 11:case 15:sr(o,s,u,h,a),Rl(8,s);break;case 23:break;case 22:var d=s.stateNode;s.memoizedState!==null?d._visibility&2?sr(o,s,u,h,a):Go(o,s):(d._visibility|=2,sr(o,s,u,h,a)),a&&f&2048&&op(s.alternate,s);break;case 24:sr(o,s,u,h,a),a&&f&2048&&lp(s.alternate,s);break;default:sr(o,s,u,h,a)}t=t.sibling}}function Go(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,a=i.flags;switch(i.tag){case 22:Go(n,i),a&2048&&op(i.alternate,i);break;case 24:Go(n,i),a&2048&&lp(i.alternate,i);break;default:Go(n,i)}t=t.sibling}}var Do=8192;function ar(e){if(e.subtreeFlags&Do)for(e=e.child;e!==null;)P_(e),e=e.sibling}function P_(e){switch(e.tag){case 26:ar(e),e.flags&Do&&e.memoizedState!==null&&qk(Bn,e.memoizedState,e.memoizedProps);break;case 5:ar(e);break;case 3:case 4:var t=Bn;Bn=Bu(e.stateNode.containerInfo),ar(e),Bn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Do,Do=16777216,ar(e),Do=t):ar(e));break;default:ar(e)}}function F_(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function vo(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Rt=i,$_(i,e)}F_(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)I_(e),e=e.sibling}function I_(e){switch(e.tag){case 0:case 11:case 15:vo(e),e.flags&2048&&oa(9,e,e.return);break;case 3:vo(e);break;case 12:vo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zs(e)):vo(e);break;default:vo(e)}}function Zs(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Rt=i,$_(i,e)}F_(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:oa(8,t,t.return),Zs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zs(t));break;default:Zs(t)}e=e.sibling}}function $_(e,t){for(;Rt!==null;){var n=Rt;switch(n.tag){case 0:case 11:case 15:oa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Ll(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Rt=i;else e:for(n=e;Rt!==null;){i=Rt;var a=i.sibling,o=i.return;if(M_(i),i===n){Rt=null;break e}if(a!==null){a.return=o,Rt=a;break e}Rt=o}}}var sk={getCacheForType:function(e){var t=Gt(Lt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},uk=typeof WeakMap=="function"?WeakMap:Map,it=0,ht=null,Ve=null,Ke=0,nt=0,cn=null,Yi=!1,Kr=!1,sp=!1,Li=0,bt=0,la=0,Ma=0,up=0,Dn=0,Ir=0,Zo=null,Jt=null,Pf=!1,cp=0,Du=1/0,Mu=null,Ji=null,It=0,ea=null,$r=null,Cr=0,Ff=0,If=null,U_=null,qo=0,$f=null;function gn(){if(it&2&&Ke!==0)return Ke&-Ke;if(Be.T!==null){var e=jr;return e!==0?e:fp()}return Jx()}function H_(){Dn===0&&(Dn=!(Ke&536870912)||We?Kx():536870912);var e=Mn.current;return e!==null&&(e.flags|=32),Dn}function yn(e,t,n){(e===ht&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Ur(e,0),Ki(e,Ke,Dn,!1)),Tl(e,n),(!(it&2)||e!==ht)&&(e===ht&&(!(it&2)&&(Ma|=n),bt===4&&Ki(e,Ke,Dn,!1)),li(e))}function G_(e,t,n){if(it&6)throw Error(fe(327));var i=!n&&(t&124)===0&&(t&e.expiredLanes)===0||kl(e,t),a=i?fk(e,t):Ah(e,t,!0),o=i;do{if(a===0){Kr&&!i&&Ki(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ck(n)){a=Ah(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var u=e;a=Zo;var h=u.current.memoizedState.isDehydrated;if(h&&(Ur(u,s).flags|=256),s=Ah(u,s,!1),s!==2){if(sp&&!h){u.errorRecoveryDisabledLanes|=o,Ma|=o,a=4;break e}o=Jt,Jt=a,o!==null&&(Jt===null?Jt=o:Jt.push.apply(Jt,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ur(e,0),Ki(e,t,0,!0);break}e:{switch(i=e,o=a,o){case 0:case 1:throw Error(fe(345));case 4:if((t&4194048)!==t)break;case 6:Ki(i,t,Dn,!Yi);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(fe(329))}if((t&62914560)===t&&(a=cp+300-ti(),10<a)){if(Ki(i,t,Dn,!Yi),ic(i,0,!0)!==0)break e;i.timeoutHandle=uv(Hg.bind(null,i,n,Jt,Mu,Pf,t,Dn,Ma,Ir,Yi,o,2,-0,0),a);break e}Hg(i,n,Jt,Mu,Pf,t,Dn,Ma,Ir,Yi,o,0,-0,0)}}break}while(1);li(e)}function Hg(e,t,n,i,a,o,s,u,h,f,d,m,g,x){if(e.timeoutHandle=-1,m=t.subtreeFlags,(m&8192||(m&16785408)===16785408)&&(ul={stylesheets:null,count:0,unsuspend:Zk},P_(t),m=Vk(),m!==null)){e.cancelPendingCommit=m(Zg.bind(null,e,t,o,n,i,a,s,u,h,d,1,g,x)),Ki(e,o,s,!f);return}Zg(e,t,o,n,i,a,s,u,h)}function ck(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var a=n[i],o=a.getSnapshot;a=a.value;try{if(!xn(o(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ki(e,t,n,i){t&=~up,t&=~Ma,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var a=t;0<a;){var o=31-mn(a),s=1<<o;i[o]=-1,a&=~s}n!==0&&Wx(e,n,t)}function dc(){return it&6?!0:(Ol(0,!1),!1)}function hp(){if(Ve!==null){if(nt===0)var e=Ve.return;else e=Ve,bi=Ga=null,Wd(e),zr=null,ol=0,e=Ve;for(;e!==null;)T_(e.alternate,e),e=e.return;Ve=null}}function Ur(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zk(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hp(),ht=e,Ve=n=Ti(e.current,null),Ke=t,nt=0,cn=null,Yi=!1,Kr=kl(e,t),sp=!1,Ir=Dn=up=Ma=la=bt=0,Jt=Zo=null,Pf=!1,t&8&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var a=31-mn(i),o=1<<a;t|=e[a],i&=~o}return Li=t,lc(),n}function Z_(e,t){Ge=null,Be.H=Tu,t===Dl||t===uc?(t=bg(),nt=3):t===C0?(t=bg(),nt=4):nt=t===__?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cn=t,Ve===null&&(bt=1,zu(e,Ln(t,e.current)))}function q_(){var e=Be.H;return Be.H=Tu,e===null?Tu:e}function V_(){var e=Be.A;return Be.A=sk,e}function Uf(){bt=4,Yi||(Ke&4194048)!==Ke&&Mn.current!==null||(Kr=!0),!(la&134217727)&&!(Ma&134217727)||ht===null||Ki(ht,Ke,Dn,!1)}function Ah(e,t,n){var i=it;it|=2;var a=q_(),o=V_();(ht!==e||Ke!==t)&&(Mu=null,Ur(e,t)),t=!1;var s=bt;e:do try{if(nt!==0&&Ve!==null){var u=Ve,h=cn;switch(nt){case 8:hp(),s=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(t=!0);var f=nt;if(nt=0,cn=null,br(e,u,h,f),n&&Kr){s=0;break e}break;default:f=nt,nt=0,cn=null,br(e,u,h,f)}}hk(),s=bt;break}catch(d){Z_(e,d)}while(1);return t&&e.shellSuspendCounter++,bi=Ga=null,it=i,Be.H=a,Be.A=o,Ve===null&&(ht=null,Ke=0,lc()),s}function hk(){for(;Ve!==null;)Y_(Ve)}function fk(e,t){var n=it;it|=2;var i=q_(),a=V_();ht!==e||Ke!==t?(Mu=null,Du=ti()+500,Ur(e,t)):Kr=kl(e,t);e:do try{if(nt!==0&&Ve!==null){t=Ve;var o=cn;t:switch(nt){case 1:nt=0,cn=null,br(e,t,o,1);break;case 2:case 9:if(vg(o)){nt=0,cn=null,Gg(t);break}t=function(){nt!==2&&nt!==9||ht!==e||(nt=7),li(e)},o.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:vg(o)?(nt=0,cn=null,Gg(t)):(nt=0,cn=null,br(e,t,o,7));break;case 5:var s=null;switch(Ve.tag){case 26:s=Ve.memoizedState;case 5:case 27:var u=Ve;if(!s||dv(s)){nt=0,cn=null;var h=u.sibling;if(h!==null)Ve=h;else{var f=u.return;f!==null?(Ve=f,pc(f)):Ve=null}break t}}nt=0,cn=null,br(e,t,o,5);break;case 6:nt=0,cn=null,br(e,t,o,6);break;
vendor: 6,473 bytes, line 32
32case 8:hp(),bt=6;break e;default:throw Error(fe(462))}}dk();break}catch(d){Z_(e,d)}while(1);return bi=Ga=null,Be.H=i,Be.A=a,it=n,Ve!==null?0:(ht=null,Ke=0,lc(),bt)}function dk(){for(;Ve!==null&&!Ow();)Y_(Ve)}function Y_(e){var t=k_(e.alternate,e,Li);e.memoizedProps=e.pendingProps,t===null?pc(e):Ve=t}function Gg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Bg(n,t,t.pendingProps,t.type,void 0,Ke);break;case 11:t=Bg(n,t,t.pendingProps,t.type.render,t.ref,Ke);break;case 5:Wd(t);default:T_(n,t),t=Ve=T0(t,Li),t=k_(n,t,Li)}e.memoizedProps=e.pendingProps,t===null?pc(e):Ve=t}function br(e,t,n,i){bi=Ga=null,Wd(t),zr=null,ol=0;var a=t.return;try{if(nk(e,a,t,n,Ke)){bt=1,zu(e,Ln(n,e.current)),Ve=null;return}}catch(o){if(a!==null)throw Ve=a,o;bt=1,zu(e,Ln(n,e.current)),Ve=null;return}t.flags&32768?(We||i===1?e=!0:Kr||Ke&536870912?e=!1:(Yi=e=!0,(i===2||i===9||i===3||i===6)&&(i=Mn.current,i!==null&&i.tag===13&&(i.flags|=16384))),K_(t,e)):pc(t)}function pc(e){var t=e;do{if(t.flags&32768){K_(t,Yi);return}e=t.return;var n=ak(t.alternate,t,Li);if(n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);bt===0&&(bt=5)}function K_(e,t){do{var n=rk(e.alternate,e);if(n!==null){n.flags&=32767,Ve=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=n}while(e!==null);bt=6,Ve=null}function Zg(e,t,n,i,a,o,s,u,h){e.cancelPendingCommit=null;do mc();while(It!==0);if(it&6)throw Error(fe(327));if(t!==null){if(t===e.current)throw Error(fe(177));if(o=t.lanes|t.childLanes,o|=Pd,Zw(e,n,o,s,u,h),e===ht&&(Ve=ht=null,Ke=0),$r=t,ea=e,Cr=n,Ff=o,If=a,U_=i,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,yk(mu,function(){return ev(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,t.subtreeFlags&13878||i){i=Be.T,Be.T=null,a=Je.p,Je.p=2,s=it,it|=4;try{ok(e,t,n)}finally{it=s,Je.p=a,Be.T=i}}It=1,X_(),W_(),Q_()}}function X_(){if(It===1){It=0;var e=ea,t=$r,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=Be.T,Be.T=null;var i=Je.p;Je.p=2;var a=it;it|=4;try{O_(t,e);var o=qf,s=y0(e.containerInfo),u=o.focusedElem,h=o.selectionRange;if(s!==u&&u&&u.ownerDocument&&g0(u.ownerDocument.documentElement,u)){if(h!==null&&Bd(u)){var f=h.start,d=h.end;if(d===void 0&&(d=f),"selectionStart"in u)u.selectionStart=f,u.selectionEnd=Math.min(d,u.value.length);else{var m=u.ownerDocument||document,g=m&&m.defaultView||window;if(g.getSelection){var x=g.getSelection(),b=u.textContent.length,E=Math.min(h.start,b),H=h.end===void 0?E:Math.min(h.end,b);!x.extend&&E>H&&(s=H,H=E,E=s);var v=fg(u,E),w=fg(u,H);if(v&&w&&(x.rangeCount!==1||x.anchorNode!==v.node||x.anchorOffset!==v.offset||x.focusNode!==w.node||x.focusOffset!==w.offset)){var A=m.createRange();A.setStart(v.node,v.offset),x.removeAllRanges(),E>H?(x.addRange(A),x.extend(w.node,w.offset)):(A.setEnd(w.node,w.offset),x.addRange(A))}}}}for(m=[],x=u;x=x.parentNode;)x.nodeType===1&&m.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<m.length;u++){var D=m[u];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}Iu=!!Zf,qf=Zf=null}finally{it=a,Je.p=i,Be.T=n}}e.current=t,It=2}}function W_(){if(It===2){It=0;var e=ea,t=$r,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=Be.T,Be.T=null;var i=Je.p;Je.p=2;var a=it;it|=4;try{D_(e,t.alternate,t)}finally{it=a,Je.p=i,Be.T=n}}It=3}}function Q_(){if(It===4||It===3){It=0,jw();var e=ea,t=$r,n=Cr,i=U_;t.subtreeFlags&10256||t.flags&10256?It=5:(It=0,$r=ea=null,J_(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Ji=null),Ld(n),t=t.stateNode,pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(Sl,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=Be.T,a=Je.p,Je.p=2,Be.T=null;try{for(var o=e.onRecoverableError,s=0;s<i.length;s++){var u=i[s];o(u.value,{componentStack:u.stack})}}finally{Be.T=t,Je.p=a}}Cr&3&&mc(),li(e),a=e.pendingLanes,n&4194090&&a&42?e===$f?qo++:(qo=0,$f=e):qo=0,Ol(0,!1)}}function J_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ll(t)))}function mc(e){return X_(),W_(),Q_(),ev()}function ev(){if(It!==5)return!1;var e=ea,t=Ff;Ff=0;var n=Ld(Cr),i=Be.T,a=Je.p;try{Je.p=32>n?32:n,Be.T=null,n=If,If=null;var o=ea,s=Cr;if(It=0,$r=ea=null,Cr=0,it&6)throw Error(fe(331));var u=it;if(it|=4,I_(o.current),B_(o,o.current,s,n),it=u,Ol(0,!1),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(Sl,o)}catch{}return!0}finally{Je.p=a,Be.T=i,J_(e,t)}}function qg(e,t,n){t=Ln(n,t),t=Rf(e.stateNode,t,2),e=Qi(e,t,2),e!==null&&(Tl(e,2),li(e))}function lt(e,t,n){if(e.tag===3)qg(e,e,n);else for(;t!==null;){if(t.tag===3){qg(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ji===null||!Ji.has(i))){e=Ln(n,e),n=y_(2),i=Qi(t,n,2),i!==null&&(x_(n,i,t,e),Tl(i,2),li(i));break}}t=t.return}}function zh(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new uk;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(n)||(sp=!0,a.add(n),e=pk.bind(null,e,t,n),t.then(e,e))}function pk(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ht===e&&(Ke&n)===n&&(bt===4||bt===3&&(Ke&62914560)===Ke&&300>ti()-cp?!(it&2)&&Ur(e,0):up|=n,Ir===Ke&&(Ir=0)),li(e)}function tv(e,t){t===0&&(t=Xx()),e=Yr(e,t),e!==null&&(Tl(e,t),li(e))}function mk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),tv(e,n)}function gk(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(fe(314))}i!==null&&i.delete(t),tv(e,n)}function yk(e,t){return zd(e,t)}var Nu=null,ur=null,Hf=!1,Ru=!1,Ch=!1,Na=0;function li(e){e!==ur&&e.next===null&&(ur===null?Nu=ur=e:ur=ur.next=e),Ru=!0,Hf||(Hf=!0,_k())}function Ol(e,t){if(!Ch&&Ru){Ch=!0;do for(var n=!1,i=Nu;i!==null;){if(!t)if(e!==0){var a=i.pendingLanes;if(a===0)var o=0;else{var s=i.suspendedLanes,u=i.pingedLanes;o=(1<<31-mn(42|e)+1)-1,o&=a&~(s&~u),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,Vg(i,o))}else o=Ke,o=ic(i,i===ht?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),!(o&3)||kl(i,o)||(n=!0,Vg(i,o));i=i.next}while(n);Ch=!1}}function xk(){nv()}function nv(){Ru=Hf=!1;var e=0;Na!==0&&(Ak()&&(e=Na),Na=0);for(var t=ti(),n=null,i=Nu;i!==null;){var a=i.next,o=iv(i,t);
vendor: 4,445 bytes, line 32
32o===0?(i.next=null,n===null?Nu=a:n.next=a,a===null&&(ur=n)):(n=i,(e!==0||o&3)&&(Ru=!0)),i=a}Ol(e,!1)}function iv(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var s=31-mn(o),u=1<<s,h=a[s];h===-1?(!(u&n)||u&i)&&(a[s]=Gw(u,t)):h<=t&&(e.expiredLanes|=u),o&=~u}if(t=ht,n=Ke,n=ic(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&th(i),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||kl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&th(i),Ld(n)){case 2:case 8:n=Vx;break;case 32:n=mu;break;case 268435456:n=Yx;break;default:n=mu}return i=av.bind(null,e),n=zd(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&th(i),e.callbackPriority=2,e.callbackNode=null,2}function av(e,t){if(It!==0&&It!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mc()&&e.callbackNode!==n)return null;var i=Ke;return i=ic(e,e===ht?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(G_(e,i,t),iv(e,ti()),e.callbackNode!=null&&e.callbackNode===n?av.bind(null,e):null)}function Vg(e,t){if(mc())return null;G_(e,t,!0)}function _k(){Ck(function(){it&6?zd(qx,xk):nv()})}function fp(){return Na===0&&(Na=Kx()),Na}function Yg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Bs(""+e)}function Kg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function vk(e,t,n,i,a){if(t==="submit"&&n&&n.stateNode===a){var o=Yg((a[nn]||null).action),s=i.submitter;s&&(t=(t=s[nn]||null)?Yg(t.formAction):s.getAttribute("formAction"),t!==null&&(o=t,s=null));var u=new ac("action","action",null,i,a);e.push({event:u,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Na!==0){var h=s?Kg(a,s):new FormData(a);Mf(n,{pending:!0,data:h,method:a.method,action:o},null,h)}}else typeof o=="function"&&(u.preventDefault(),h=s?Kg(a,s):new FormData(a),Mf(n,{pending:!0,data:h,method:a.method,action:o},o,h))},currentTarget:a}]})}}for(var Lh=0;Lh<vf.length;Lh++){var Dh=vf[Lh],bk=Dh.toLowerCase(),wk=Dh[0].toUpperCase()+Dh.slice(1);$n(bk,"on"+wk)}$n(_0,"onAnimationEnd");$n(v0,"onAnimationIteration");$n(b0,"onAnimationStart");$n("dblclick","onDoubleClick");$n("focusin","onFocus");$n("focusout","onBlur");$n(FS,"onTransitionRun");$n(IS,"onTransitionStart");$n($S,"onTransitionCancel");$n(w0,"onTransitionEnd");Rr("onMouseEnter",["mouseout","mouseover"]);Rr("onMouseLeave",["mouseout","mouseover"]);Rr("onPointerEnter",["pointerout","pointerover"]);Rr("onPointerLeave",["pointerout","pointerover"]);$a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$a("onBeforeInput",["compositionend","keypress","textInput","paste"]);$a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ll="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ll));function rv(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var s=i.length-1;0<=s;s--){var u=i[s],h=u.instance,f=u.currentTarget;if(u=u.listener,h!==o&&a.isPropagationStopped())break e;o=u,a.currentTarget=f;try{o(a)}catch(d){Au(d)}a.currentTarget=null,o=h}else for(s=0;s<i.length;s++){if(u=i[s],h=u.instance,f=u.currentTarget,u=u.listener,h!==o&&a.isPropagationStopped())break e;o=u,a.currentTarget=f;try{o(a)}catch(d){Au(d)}a.currentTarget=null,o=h}}}}function qe(e,t){var n=t[df];n===void 0&&(n=t[df]=new Set);var i=e+"__bubble";n.has(i)||(ov(t,e,2,!1),n.add(i))}function Mh(e,t,n){var i=0;t&&(i|=4),ov(n,e,i,t)}var bs="_reactListening"+Math.random().toString(36).slice(2);
vendor: 21,187 bytes, lines 32-33
32function dp(e){if(!e[bs]){e[bs]=!0,e0.forEach(function(n){n!=="selectionchange"&&(Sk.has(n)||Mh(n,!1,e),Mh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bs]||(t[bs]=!0,Mh("selectionchange",!1,t))}}function ov(e,t,n,i){switch(xv(t)){case 2:var a=Xk;break;case 8:a=Wk;break;default:a=yp}n=a.bind(null,t,n,e),a=void 0,!yf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Nh(e,t,n,i,a){var o=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var s=i.tag;if(s===3||s===4){var u=i.stateNode.containerInfo;if(u===a)break;if(s===4)for(s=i.return;s!==null;){var h=s.tag;if((h===3||h===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;u!==null;){if(s=fr(u),s===null)return;if(h=s.tag,h===5||h===6||h===26||h===27){i=o=s;continue e}u=u.parentNode}}i=i.return}s0(function(){var f=o,d=Nd(n),m=[];e:{var g=S0.get(e);if(g!==void 0){var x=ac,b=e;switch(e){case"keypress":if(Fs(n)===0)break e;case"keydown":case"keyup":x=yS;break;case"focusin":b="focus",x=uh;break;case"focusout":b="blur",x=uh;break;case"beforeblur":case"afterblur":x=uh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=ng;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=rS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=vS;break;case _0:case v0:case b0:x=sS;break;case w0:x=wS;break;case"scroll":case"scrollend":x=iS;break;case"wheel":x=kS;break;case"copy":case"cut":case"paste":x=cS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=ag;break;case"toggle":case"beforetoggle":x=ES}var E=(t&4)!==0,H=!E&&(e==="scroll"||e==="scrollend"),v=E?g!==null?g+"Capture":null:g;E=[];for(var w=f,A;w!==null;){var D=w;if(A=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||A===null||v===null||(D=tl(w,v),D!=null&&E.push(sl(w,D,A))),H)break;w=w.return}0<E.length&&(g=new x(g,b,null,n,d),m.push({event:g,listeners:E}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",g&&n!==gf&&(b=n.relatedTarget||n.fromElement)&&(fr(b)||b[qr]))break e;if((x||g)&&(g=d.window===d?d:(g=d.ownerDocument)?g.defaultView||g.parentWindow:window,x?(b=n.relatedTarget||n.toElement,x=f,b=b?fr(b):null,b!==null&&(H=wl(b),E=b.tag,b!==H||E!==5&&E!==27&&E!==6)&&(b=null)):(x=null,b=f),x!==b)){if(E=ng,D="onMouseLeave",v="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(E=ag,D="onPointerLeave",v="onPointerEnter",w="pointer"),H=x==null?g:Lo(x),A=b==null?g:Lo(b),g=new E(D,w+"leave",x,n,d),g.target=H,g.relatedTarget=A,D=null,fr(d)===f&&(E=new E(v,w+"enter",b,n,d),E.target=A,E.relatedTarget=H,D=E),H=D,x&&b)t:{for(E=x,v=b,w=0,A=E;A;A=rr(A))w++;for(A=0,D=v;D;D=rr(D))A++;for(;0<w-A;)E=rr(E),w--;for(;0<A-w;)v=rr(v),A--;for(;w--;){if(E===v||v!==null&&E===v.alternate)break t;E=rr(E),v=rr(v)}E=null}else E=null;x!==null&&Xg(m,g,x,E,!1),b!==null&&H!==null&&Xg(m,H,b,E,!0)}}e:{if(g=f?Lo(f):window,x=g.nodeName&&g.nodeName.toLowerCase(),x==="select"||x==="input"&&g.type==="file")var G=sg;else if(lg(g))if(p0)G=jS;else{G=RS;var j=NS}else x=g.nodeName,!x||x.toLowerCase()!=="input"||g.type!=="checkbox"&&g.type!=="radio"?f&&Md(f.elementType)&&(G=sg):G=OS;if(G&&(G=G(e,f))){d0(m,G,n,d);break e}j&&j(e,g,f),e==="focusout"&&f&&g.type==="number"&&f.memoizedProps.value!=null&&mf(g,"number",g.value)}switch(j=f?Lo(f):window,e){case"focusin":(lg(j)||j.contentEditable==="true")&&(mr=j,xf=f,jo=null);break;case"focusout":jo=xf=mr=null;break;case"mousedown":_f=!0;break;case"contextmenu":case"mouseup":case"dragend":_f=!1,dg(m,n,d);break;case"selectionchange":if(PS)break;case"keydown":case"keyup":dg(m,n,d)}var Z;if(jd)e:{switch(e){case"compositionstart":var Y="onCompositionStart";break e;case"compositionend":Y="onCompositionEnd";break e;case"compositionupdate":Y="onCompositionUpdate";break e}Y=void 0}else pr?h0(e,n)&&(Y="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Y="onCompositionStart");Y&&(c0&&n.locale!=="ko"&&(pr||Y!=="onCompositionStart"?Y==="onCompositionEnd"&&pr&&(Z=u0()):(Vi=d,Rd="value"in Vi?Vi.value:Vi.textContent,pr=!0)),j=Ou(f,Y),0<j.length&&(Y=new ig(Y,e,null,n,d),m.push({event:Y,listeners:j}),Z?Y.data=Z:(Z=f0(n),Z!==null&&(Y.data=Z)))),(Z=zS?CS(e,n):LS(e,n))&&(Y=Ou(f,"onBeforeInput"),0<Y.length&&(j=new ig("onBeforeInput","beforeinput",null,n,d),m.push({event:j,listeners:Y}),j.data=Z)),vk(m,e,f,n,d)}rv(m,t)})}function sl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ou(e,t){for(var n=t+"Capture",i=[];e!==null;){var a=e,o=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||o===null||(a=tl(e,n),a!=null&&i.unshift(sl(e,a,o)),a=tl(e,t),a!=null&&i.push(sl(e,a,o))),e.tag===3)return i;e=e.return}return[]}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xg(e,t,n,i,a){for(var o=t._reactName,s=[];n!==null&&n!==i;){var u=n,h=u.alternate,f=u.stateNode;if(u=u.tag,h!==null&&h===i)break;u!==5&&u!==26&&u!==27||f===null||(h=f,a?(f=tl(n,o),f!=null&&s.unshift(sl(n,f,h))):a||(f=tl(n,o),f!=null&&s.push(sl(n,f,h)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var kk=/\r\n?/g,Tk=/\u0000|\uFFFD/g;function Wg(e){return(typeof e=="string"?e:""+e).replace(kk,` 33`).replace(Tk,"")}function lv(e,t){return t=Wg(t),Wg(e)===t}function gc(){}function at(e,t,n,i,a,o){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Or(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Or(e,""+i);break;case"className":ps(e,"class",i);break;case"tabIndex":ps(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ps(e,n,i);break;case"style":l0(e,i,o);break;case"data":if(t!=="object"){ps(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Bs(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&at(e,t,"name",a.name,a,null),at(e,t,"formEncType",a.formEncType,a,null),at(e,t,"formMethod",a.formMethod,a,null),at(e,t,"formTarget",a.formTarget,a,null)):(at(e,t,"encType",a.encType,a,null),at(e,t,"method",a.method,a,null),at(e,t,"target",a.target,a,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Bs(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=gc);break;case"onScroll":i!=null&&qe("scroll",e);break;case"onScrollEnd":i!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(fe(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(fe(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=Bs(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":qe("beforetoggle",e),qe("toggle",e),js(e,"popover",i);break;case"xlinkActuate":di(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":di(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":di(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":di(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":di(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":di(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":di(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":di(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":di(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":js(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=tS.get(n)||n,js(e,n,i))}}function Gf(e,t,n,i,a,o){switch(n){case"style":l0(e,i,o);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(fe(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(fe(60));e.innerHTML=n}}break;case"children":typeof i=="string"?Or(e,i):(typeof i=="number"||typeof i=="bigint")&&Or(e,""+i);break;case"onScroll":i!=null&&qe("scroll",e);break;case"onScrollEnd":i!=null&&qe("scrollend",e);break;case"onClick":i!=null&&(e.onclick=gc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!t0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),o=e[nn]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,a),typeof i=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,a);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):js(e,n,i)}}}function $t(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var i=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(fe(137,t));default:at(e,t,o,s,n,null)}}a&&at(e,t,"srcSet",n.srcSet,n,null),i&&at(e,t,"src",n.src,n,null);return;case"input":qe("invalid",e);var u=o=s=a=null,h=null,f=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(d!=null)switch(i){case"name":a=d;break;case"type":s=d;break;case"checked":h=d;break;case"defaultChecked":f=d;break;case"value":o=d;break;case"defaultValue":u=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(fe(137,t));break;default:at(e,t,i,d,n,null)}}a0(e,o,u,h,f,s,a,!1),gu(e);return;case"select":qe("invalid",e),i=s=o=null;for(a in n)if(n.hasOwnProperty(a)&&(u=n[a],u!=null))switch(a){case"value":o=u;break;case"defaultValue":s=u;break;case"multiple":i=u;default:at(e,t,a,u,n,null)}t=o,n=s,e.multiple=!!i,t!=null?Sr(e,!!i,t,!1):n!=null&&Sr(e,!!i,n,!0);return;case"textarea":qe("invalid",e),o=a=i=null;for(s in n)if(n.hasOwnProperty(s)&&(u=n[s],u!=null))switch(s){case"value":i=u;break;case"defaultValue":a=u;break;case"children":o=u;break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(fe(91));break;default:at(e,t,s,u,n,null)}o0(e,i,a,o),gu(e);return;case"option":for(h in n)if(n.hasOwnProperty(h)&&(i=n[h],i!=null))switch(h){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:at(e,t,h,i,n,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(i=0;i<ll.length;i++)qe(ll[i],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(f in n)if(n.hasOwnProperty(f)&&(i=n[f],i!=null))switch(f){case"children":case"dangerouslySetInnerHTML":throw Error(fe(137,t));default:at(e,t,f,i,n,null)}return;default:if(Md(t)){for(d in n)n.hasOwnProperty(d)&&(i=n[d],i!==void 0&&Gf(e,t,d,i,n,void 0));return}}for(u in n)n.hasOwnProperty(u)&&(i=n[u],i!=null&&at(e,t,u,i,n,null))}function Ek(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,s=null,u=null,h=null,f=null,d=null;for(x in n){var m=n[x];if(n.hasOwnProperty(x)&&m!=null)switch(x){case"checked":break;case"value":break;case"defaultValue":h=m;default:i.hasOwnProperty(x)||at(e,t,x,null,i,m)}}for(var g in i){var x=i[g];if(m=n[g],i.hasOwnProperty(g)&&(x!=null||m!=null))switch(g){case"type":o=x;break;case"name":a=x;break;case"checked":f=x;break;case"defaultChecked":d=x;break;case"value":s=x;break;case"defaultValue":u=x;break;case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(fe(137,t));break;default:x!==m&&at(e,t,g,x,i,m)}}pf(e,s,u,h,f,d,o,a);return;case"select":x=s=u=g=null;for(o in n)if(h=n[o],n.hasOwnProperty(o)&&h!=null)switch(o){case"value":break;case"multiple":x=h;default:i.hasOwnProperty(o)||at(e,t,o,null,i,h)}for(a in i)if(o=i[a],h=n[a],i.hasOwnProperty(a)&&(o!=null||h!=null))switch(a){case"value":g=o;break;case"defaultValue":u=o;break;case"multiple":s=o;default:o!==h&&at(e,t,a,o,i,h)}t=u,n=s,i=x,g!=null?Sr(e,!!n,g,!1):!!i!=!!n&&(t!=null?Sr(e,!!n,t,!0):Sr(e,!!n,n?[]:"",!1));return;case"textarea":x=g=null;for(u in n)if(a=n[u],n.hasOwnProperty(u)&&a!=null&&!i.hasOwnProperty(u))switch(u){case"value":break;case"children":break;default:at(e,t,u,null,i,a)}for(s in i)if(a=i[s],o=n[s],i.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case"value":g=a;break;case"defaultValue":x=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(fe(91));break;default:a!==o&&at(e,t,s,a,i,o)}r0(e,g,x);return;case"option":for(var b in n)if(g=n[b],n.hasOwnProperty(b)&&g!=null&&!i.hasOwnProperty(b))switch(b){case"selected":e.selected=!1;break;default:at(e,t,b,null,i,g)}for(h in i)if(g=i[h],x=n[h],i.hasOwnProperty(h)&&g!==x&&(g!=null||x!=null))switch(h){case"selected":e.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:at(e,t,h,g,i,x)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var E in n)g=n[E],n.hasOwnProperty(E)&&g!=null&&!i.hasOwnProperty(E)&&at(e,t,E,null,i,g);for(f in i)if(g=i[f],x=n[f],i.hasOwnProperty(f)&&g!==x&&(g!=null||x!=null))switch(f){case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(fe(137,t));break;default:at(e,t,f,g,i,x)}return;default:if(Md(t)){for(var H in n)g=n[H],n.hasOwnProperty(H)&&g!==void 0&&!i.hasOwnProperty(H)&&Gf(e,t,H,void 0,i,g);for(d in i)g=i[d],x=n[d],!i.hasOwnProperty(d)||g===x||g===void 0&&x===void 0||Gf(e,t,d,g,i,x);return}}for(var v in n)g=n[v],n.hasOwnProperty(v)&&g!=null&&!i.hasOwnProperty(v)&&at(e,t,v,null,i,g);for(m in i)g=i[m],x=n[m],!i.hasOwnProperty(m)||g===x||g==null&&x==null||at(e,t,m,g,i,x)}var Zf=null,qf=null;function ju(e){return e.nodeType===9?e:e.ownerDocument}function Qg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Vf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rh=null;function Ak(){var e=window.event;return e&&e.type==="popstate"?e===Rh?!1:(Rh=e,!0):(Rh=null,!1)}var uv=typeof setTimeout=="function"?setTimeout:void 0,zk=typeof clearTimeout=="function"?clearTimeout:void 0,Jg=typeof Promise=="function"?Promise:void 0,Ck=typeof queueMicrotask=="function"?queueMicrotask:typeof Jg<"u"?function(e){return Jg.resolve(null).then(e).catch(Lk)}:uv;function Lk(e){setTimeout(function(){throw e})}function ua(e){return e==="head"}function ey(e,t){var n=t,i=0,a=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(0<i&&8>i){n=i;var s=e.ownerDocument;if(n&1&&Vo(s.documentElement),n&2&&Vo(s.body),n&4)for(n=s.head,Vo(n),s=n.firstChild;s;){var u=s.nextSibling,h=s.nodeName;s[El]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=u}}if(a===0){e.removeChild(o),dl(t);return}a--}else n==="$"||n==="$?"||n==="$!"?a++:i=n.charCodeAt(0)-48;else i=0;n=o}while(n);dl(t)}function Yf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Yf(n),Dd(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Dk(e,t,n,i){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[El])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=In(e.nextSibling),e===null)break}return null}function Mk(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=In(e.nextSibling),e===null))return null;return e}function Kf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Nk(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function In(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Xf=null;function ty(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function cv(e,t,n){switch(t=ju(n),e){case"html":if(e=t.documentElement,!e)throw Error(fe(452));return e;case"head":if(e=t.head,!e)throw Error(fe(453));return e;case"body":if(e=t.body,!e)throw Error(fe(454));return e;default:throw Error(fe(451))}}function Vo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dd(e)}var Nn=new Map,ny=new Set;function Bu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Mi=Je.d;Je.d={f:Rk,r:Ok,D:jk,C:Bk,L:Pk,m:Fk,X:$k,S:Ik,M:Uk};function Rk(){var e=Mi.f(),t=dc();return e||t}function Ok(e){var t=Vr(e);t!==null&&t.tag===5&&t.type==="form"?i_(t):Mi.r(e)}var Xr=typeof document>"u"?null:document;function hv(e,t,n){var i=Xr;if(i&&typeof t=="string"&&t){var a=Cn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),ny.has(a)||(ny.add(a),e={rel:e,crossOrigin:n,href:t},i.querySelector(a)===null&&(t=i.createElement("link"),$t(t,"link",e),Ot(t),i.head.appendChild(t)))}}function jk(e){Mi.D(e),hv("dns-prefetch",e,null)}
vendor: 5,390 bytes, line 33
33function Bk(e,t){Mi.C(e,t),hv("preconnect",e,t)}function Pk(e,t,n){Mi.L(e,t,n);var i=Xr;if(i&&e&&t){var a='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Cn(n.imageSizes)+'"]')):a+='[href="'+Cn(e)+'"]';var o=a;switch(t){case"style":o=Hr(e);break;case"script":o=Wr(e)}Nn.has(o)||(e=dt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Nn.set(o,e),i.querySelector(a)!==null||t==="style"&&i.querySelector(jl(o))||t==="script"&&i.querySelector(Bl(o))||(t=i.createElement("link"),$t(t,"link",e),Ot(t),i.head.appendChild(t)))}}function Fk(e,t){Mi.m(e,t);var n=Xr;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Cn(i)+'"][href="'+Cn(e)+'"]',o=a;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Wr(e)}if(!Nn.has(o)&&(e=dt({rel:"modulepreload",href:e},t),Nn.set(o,e),n.querySelector(a)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Bl(o)))return}i=n.createElement("link"),$t(i,"link",e),Ot(i),n.head.appendChild(i)}}}function Ik(e,t,n){Mi.S(e,t,n);var i=Xr;if(i&&e){var a=wr(i).hoistableStyles,o=Hr(e);t=t||"default";var s=a.get(o);if(!s){var u={loading:0,preload:null};if(s=i.querySelector(jl(o)))u.loading=5;else{e=dt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Nn.get(o))&&pp(e,n);var h=s=i.createElement("link");Ot(h),$t(h,"link",e),h._p=new Promise(function(f,d){h.onload=f,h.onerror=d}),h.addEventListener("load",function(){u.loading|=1}),h.addEventListener("error",function(){u.loading|=2}),u.loading|=4,qs(s,t,i)}s={type:"stylesheet",instance:s,count:1,state:u},a.set(o,s)}}}function $k(e,t){Mi.X(e,t);var n=Xr;if(n&&e){var i=wr(n).hoistableScripts,a=Wr(e),o=i.get(a);o||(o=n.querySelector(Bl(a)),o||(e=dt({src:e,async:!0},t),(t=Nn.get(a))&&mp(e,t),o=n.createElement("script"),Ot(o),$t(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(a,o))}}function Uk(e,t){Mi.M(e,t);var n=Xr;if(n&&e){var i=wr(n).hoistableScripts,a=Wr(e),o=i.get(a);o||(o=n.querySelector(Bl(a)),o||(e=dt({src:e,async:!0,type:"module"},t),(t=Nn.get(a))&&mp(e,t),o=n.createElement("script"),Ot(o),$t(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(a,o))}}function iy(e,t,n,i){var a=(a=Xi.current)?Bu(a):null;if(!a)throw Error(fe(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Hr(n.href),n=wr(a).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Hr(n.href);var o=wr(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jl(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Nn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Nn.set(e,n),o||Hk(a,e,n,s.state))),t&&i===null)throw Error(fe(528,""));return s}if(t&&i!==null)throw Error(fe(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wr(n),n=wr(a).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(fe(444,e))}}function Hr(e){return'href="'+Cn(e)+'"'}function jl(e){return'link[rel="stylesheet"]['+e+"]"}function fv(e){return dt({},e,{"data-precedence":e.precedence,precedence:null})}function Hk(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),$t(t,"link",n),Ot(t),e.head.appendChild(t))}function Wr(e){return'[src="'+Cn(e)+'"]'}function Bl(e){return"script[async]"+e}function ay(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Cn(n.href)+'"]');if(i)return t.instance=i,Ot(i),i;var a=dt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ot(i),$t(i,"style",a),qs(i,n.precedence,e),t.instance=i;case"stylesheet":a=Hr(n.href);var o=e.querySelector(jl(a));if(o)return t.state.loading|=4,t.instance=o,Ot(o),o;i=fv(n),(a=Nn.get(a))&&pp(i,a),o=(e.ownerDocument||e).createElement("link"),Ot(o);var s=o;return s._p=new Promise(function(u,h){s.onload=u,s.onerror=h}),$t(o,"link",i),t.state.loading|=4,qs(o,n.precedence,e),t.instance=o;case"script":return o=Wr(n.src),(a=e.querySelector(Bl(o)))?(t.instance=a,Ot(a),a):(i=n,(a=Nn.get(o))&&(i=dt({},n),mp(i,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ot(a),$t(a,"link",i),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(fe(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,qs(i,n.precedence,e));return t.instance}
vendor: 12,075 bytes, line 33
33function qs(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=i.length?i[i.length-1]:null,o=a,s=0;s<i.length;s++){var u=i[s];if(u.dataset.precedence===t)o=u;else if(o!==a)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function pp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function mp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Vs=null;function ry(e,t,n){if(Vs===null){var i=new Map,a=Vs=new Map;a.set(n,i)}else a=Vs,i=a.get(n),i||(i=new Map,a.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var o=n[a];if(!(o[El]||o[Ht]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var s=o.getAttribute(t)||"";s=e+s;var u=i.get(s);u?u.push(o):i.set(s,[o])}}return i}function oy(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Gk(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function dv(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var ul=null;function Zk(){}function qk(e,t,n){if(ul===null)throw Error(fe(475));var i=ul;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var a=Hr(n.href),o=e.querySelector(jl(a));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Pu.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=o,Ot(o);return}o=e.ownerDocument||e,n=fv(n),(a=Nn.get(a))&&pp(n,a),o=o.createElement("link"),Ot(o);var s=o;s._p=new Promise(function(u,h){s.onload=u,s.onerror=h}),$t(o,"link",n),t.instance=o}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(i.count++,t=Pu.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function Vk(){if(ul===null)throw Error(fe(475));var e=ul;return e.stylesheets&&e.count===0&&Wf(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Wf(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function Pu(){if(this.count--,this.count===0){if(this.stylesheets)Wf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fu=null;function Wf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fu=new Map,t.forEach(Yk,e),Fu=null,Pu.call(e))}function Yk(e,t){if(!(t.state.loading&4)){var n=Fu.get(e);if(n)var i=n.get(null);else{n=new Map,Fu.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<a.length;o++){var s=a[o];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),i=s)}i&&n.set(null,i)}a=t.instance,s=a.getAttribute("data-precedence"),o=n.get(s)||i,o===i&&n.set(null,a),n.set(s,a),this.count++,i=Pu.bind(this),a.addEventListener("load",i),a.addEventListener("error",i),o?o.parentNode.insertBefore(a,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var cl={$$typeof:xi,Provider:null,Consumer:null,_currentValue:Aa,_currentValue2:Aa,_threadCount:0};function Kk(e,t,n,i,a,o,s,u){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nh(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nh(0),this.hiddenUpdates=nh(null),this.identifierPrefix=i,this.onUncaughtError=a,this.onCaughtError=o,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function pv(e,t,n,i,a,o,s,u,h,f,d,m){return e=new Kk(e,t,n,s,u,h,f,m),t=1,o===!0&&(t|=24),o=fn(3,null,null,t),e.current=o,o.stateNode=e,t=Hd(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:n,cache:t},Zd(o),e}function mv(e){return e?(e=xr,e):xr}function gv(e,t,n,i,a,o){a=mv(a),i.context===null?i.context=a:i.pendingContext=a,i=Wi(t),i.payload={element:n},o=o===void 0?null:o,o!==null&&(i.callback=o),n=Qi(e,i,t),n!==null&&(yn(n,e,t),Fo(n,e,t))}function ly(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){ly(e,t),(e=e.alternate)&&ly(e,t)}function yv(e){if(e.tag===13){var t=Yr(e,67108864);t!==null&&yn(t,e,67108864),gp(e,67108864)}}var Iu=!0;function Xk(e,t,n,i){var a=Be.T;Be.T=null;var o=Je.p;try{Je.p=2,yp(e,t,n,i)}finally{Je.p=o,Be.T=a}}function Wk(e,t,n,i){var a=Be.T;Be.T=null;var o=Je.p;try{Je.p=8,yp(e,t,n,i)}finally{Je.p=o,Be.T=a}}function yp(e,t,n,i){if(Iu){var a=Qf(i);if(a===null)Nh(e,t,i,$u,n),sy(e,i);else if(Jk(a,e,t,n,i))i.stopPropagation();else if(sy(e,i),t&4&&-1<Qk.indexOf(e)){for(;a!==null;){var o=Vr(a);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var s=va(o.pendingLanes);if(s!==0){var u=o;for(u.pendingLanes|=2,u.entangledLanes|=2;s;){var h=1<<31-mn(s);u.entanglements[1]|=h,s&=~h}li(o),!(it&6)&&(Du=ti()+500,Ol(0,!1))}}break;case 13:u=Yr(o,2),u!==null&&yn(u,o,2),dc(),gp(o,2)}if(o=Qf(i),o===null&&Nh(e,t,i,$u,n),o===a)break;a=o}a!==null&&i.stopPropagation()}else Nh(e,t,i,null,n)}}function Qf(e){return e=Nd(e),xp(e)}var $u=null;function xp(e){if($u=null,e=fr(e),e!==null){var t=wl(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Ux(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return $u=e,null}function xv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Bw()){case qx:return 2;case Vx:return 8;case mu:case Pw:return 32;case Yx:return 268435456;default:return 32}default:return 32}}var Jf=!1,ta=null,na=null,ia=null,hl=new Map,fl=new Map,Zi=[],Qk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function sy(e,t){switch(e){case"focusin":case"focusout":ta=null;break;case"dragenter":case"dragleave":na=null;break;case"mouseover":case"mouseout":ia=null;break;case"pointerover":case"pointerout":hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fl.delete(t.pointerId)}}function bo(e,t,n,i,a,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[a]},t!==null&&(t=Vr(t),t!==null&&yv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Jk(e,t,n,i,a){switch(t){case"focusin":return ta=bo(ta,e,t,n,i,a),!0;case"dragenter":return na=bo(na,e,t,n,i,a),!0;case"mouseover":return ia=bo(ia,e,t,n,i,a),!0;case"pointerover":var o=a.pointerId;return hl.set(o,bo(hl.get(o)||null,e,t,n,i,a)),!0;case"gotpointercapture":return o=a.pointerId,fl.set(o,bo(fl.get(o)||null,e,t,n,i,a)),!0}return!1}function _v(e){var t=fr(e.target);if(t!==null){var n=wl(t);if(n!==null){if(t=n.tag,t===13){if(t=Ux(n),t!==null){e.blockedOn=t,qw(e.priority,function(){if(n.tag===13){var i=gn();i=Cd(i);var a=Yr(n,i);a!==null&&yn(a,n,i),gp(n,i)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qf(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);gf=i,n.target.dispatchEvent(i),gf=null}else return t=Vr(n),t!==null&&yv(t),e.blockedOn=n,!1;t.shift()}return!0}function uy(e,t,n){Ys(e)&&n.delete(t)}function eT(){Jf=!1,ta!==null&&Ys(ta)&&(ta=null),na!==null&&Ys(na)&&(na=null),ia!==null&&Ys(ia)&&(ia=null),hl.forEach(uy),fl.forEach(uy)}function ws(e,t){e.blockedOn===t&&(e.blockedOn=null,Jf||(Jf=!0,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,eT)))}var Ss=null;function cy(e){Ss!==e&&(Ss=e,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,function(){Ss===e&&(Ss=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],a=e[t+2];if(typeof i!="function"){if(xp(i||n)===null)continue;break}var o=Vr(n);o!==null&&(e.splice(t,3),t-=3,Mf(o,{pending:!0,data:a,method:n.method,action:i},i,a))}}))}function dl(e){function t(h){return ws(h,e)}ta!==null&&ws(ta,e),na!==null&&ws(na,e),ia!==null&&ws(ia,e),hl.forEach(t),fl.forEach(t);for(var n=0;n<Zi.length;n++){var i=Zi[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Zi.length&&(n=Zi[0],n.blockedOn===null);)_v(n),n.blockedOn===null&&Zi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var a=n[i],o=n[i+1],s=a[nn]||null;if(typeof o=="function")s||cy(n);else if(s){var u=null;if(o&&o.hasAttribute("formAction")){if(a=o,s=o[nn]||null)u=s.formAction;else if(xp(a)!==null)continue}else u=s.action;typeof u=="function"?n[i+1]=u:(n.splice(i,3),i-=3),cy(n)}}}function _p(e){this._internalRoot=e}yc.prototype.render=_p.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(fe(409));var n=t.current,i=gn();gv(n,i,e,t,null,null)};yc.prototype.unmount=_p.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gv(e.current,2,null,e,null,null),dc(),t[qr]=null}};function yc(e){this._internalRoot=e}yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zi.length&&t!==0&&t<Zi[n].priority;n++);Zi.splice(n,0,e),n===0&&_v(e)}};var hy=Ix.version;if(hy!=="19.1.0")throw Error(fe(527,hy,"19.1.0"));Je.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(fe(188)):(e=Object.keys(e).join(","),Error(fe(268,e)));return e=Lw(t),e=e!==null?Hx(e):null,e=e===null?null:e.stateNode,e};var tT={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Be,reconcilerVersion:"19.1.0"};
33if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ks.isDisabled&&ks.supportsFiber)try{Sl=ks.inject(tT),pn=ks}catch{}}nc.createRoot=function(e,t){if(!$x(e))throw Error(fe(299));var n=!1,i="",a=p_,o=m_,s=g_,u=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(u=t.unstable_transitionCallbacks)),t=pv(e,1,!1,null,null,n,i,a,o,s,u,null),e[qr]=t.current,dp(e),new _p(t)};nc.hydrateRoot=function(e,t,n){if(!$x(e))throw Error(fe(299));var i=!1,a="",o=p_,s=m_,u=g_,h=null,f=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(u=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(h=n.unstable_transitionCallbacks),n.formState!==void 0&&(f=n.formState)),t=pv(e,1,!0,t,n??null,i,a,o,s,u,h,f),t.context=mv(null),n=t.current,i=gn(),i=Cd(i),a=Wi(i),a.callback=null,Qi(n,a,i),n=i,t.current.lanes=n,Tl(t,n),li(t),e[qr]=t.current,dp(e),new yc(t)};nc.version="19.1.0";function vv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vv)}catch(e){console.error(e)}}vv(),Bx.exports=nc;var nT=Bx.exports;const iT=ec(nT);function aT(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n<a||n===void 0&&a>=a)&&(n=a)}return n}function rT(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}var oT={value:()=>{}};function vp(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Ks(n)}function Ks(e){this._=e}function lT(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",a=n.indexOf(".");if(a>=0&&(i=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Ks.prototype=vp.prototype={constructor:Ks,on:function(e,t){var n=this._,i=lT(e+"",n),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=sT(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(a=(e=i[o]).type)n[a]=fy(n[a],e.name,t);else if(t==null)for(a in n)n[a]=fy(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ks(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),i=0,a,o;i<a;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(t,n)}};function sT(e,t){for(var n=0,i=e.length,a;n<i;++n)if((a=e[n]).name===t)return a.value}function fy(e,t,n){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=oT,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var ed="http://www.w3.org/1999/xhtml";const dy={svg:"http://www.w3.org/2000/svg",xhtml:ed,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function xc(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),dy.hasOwnProperty(t)?{space:dy[t],local:e}:e}function uT(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ed&&t.documentElement.namespaceURI===ed?t.createElement(e):t.createElementNS(n,e)}}function cT(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bv(e){var t=xc(e);return(t.local?cT:uT)(t)}function hT(){}function bp(e){return e==null?hT:function(){return this.querySelector(e)}}function fT(e){typeof e!="function"&&(e=bp(e));for(var t=this._groups,n=t.length,i=new Array(n),a=0;a<n;++a)for(var o=t[a],s=o.length,u=i[a]=new Array(s),h,f,d=0;d<s;++d)(h=o[d])&&(f=e.call(h,h.__data__,d,o))&&("__data__"in h&&(f.__data__=h.__data__),u[d]=f);return new _n(i,this._parents)}function dT(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pT(){return[]}function wv(e){return e==null?pT:function(){return this.querySelectorAll(e)}}function mT(e){return function(){return dT(e.apply(this,arguments))}}function gT(e){typeof e=="function"?e=mT(e):e=wv(e);for(var t=this._groups,n=t.length,i=[],a=[],o=0;o<n;++o)for(var s=t[o],u=s.length,h,f=0;f<u;++f)(h=s[f])&&(i.push(e.call(h,h.__data__,f,s)),a.push(h));return new _n(i,a)}function Sv(e){return function(){return this.matches(e)}}function kv(e){return function(t){return t.matches(e)}}var yT=Array.prototype.find;function xT(e){return function(){return yT.call(this.children,e)}}function _T(){return this.firstElementChild}function vT(e){return this.select(e==null?_T:xT(typeof e=="function"?e:kv(e)))}var bT=Array.prototype.filter;function wT(){return Array.from(this.children)}function ST(e){return function(){return bT.call(this.children,e)}}function kT(e){return this.selectAll(e==null?wT:ST(typeof e=="function"?e:kv(e)))}function TT(e){typeof e!="function"&&(e=Sv(e));for(var t=this._groups,n=t.length,i=new Array(n),a=0;a<n;++a)for(var o=t[a],s=o.length,u=i[a]=[],h,f=0;f<s;++f)(h=o[f])&&e.call(h,h.__data__,f,o)&&u.push(h);return new _n(i,this._parents)}function Tv(e){return new Array(e.length)}function ET(){return new _n(this._enter||this._groups.map(Tv),this._parents)}function Uu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Uu.prototype={constructor:Uu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function AT(e){return function(){return e}}function zT(e,t,n,i,a,o){for(var s=0,u,h=t.length,f=o.length;s<f;++s)(u=t[s])?(u.__data__=o[s],i[s]=u):n[s]=new Uu(e,o[s]);for(;s<h;++s)(u=t[s])&&(a[s]=u)}function CT(e,t,n,i,a,o,s){var u,h,f=new Map,d=t.length,m=o.length,g=new Array(d),x;for(u=0;
vendor: 8,288 bytes, line 33
33u<d;++u)(h=t[u])&&(g[u]=x=s.call(h,h.__data__,u,t)+"",f.has(x)?a[u]=h:f.set(x,h));for(u=0;u<m;++u)x=s.call(e,o[u],u,o)+"",(h=f.get(x))?(i[u]=h,h.__data__=o[u],f.delete(x)):n[u]=new Uu(e,o[u]);for(u=0;u<d;++u)(h=t[u])&&f.get(g[u])===h&&(a[u]=h)}function LT(e){return e.__data__}function DT(e,t){if(!arguments.length)return Array.from(this,LT);var n=t?CT:zT,i=this._parents,a=this._groups;typeof e!="function"&&(e=AT(e));for(var o=a.length,s=new Array(o),u=new Array(o),h=new Array(o),f=0;f<o;++f){var d=i[f],m=a[f],g=m.length,x=MT(e.call(d,d&&d.__data__,f,i)),b=x.length,E=u[f]=new Array(b),H=s[f]=new Array(b),v=h[f]=new Array(g);n(d,m,E,H,v,x,t);for(var w=0,A=0,D,G;w<b;++w)if(D=E[w]){for(w>=A&&(A=w+1);!(G=H[A])&&++A<b;);D._next=G||null}}return s=new _n(s,i),s._enter=u,s._exit=h,s}function MT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NT(){return new _n(this._exit||this._groups.map(Tv),this._parents)}function RT(e,t,n){var i=this.enter(),a=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?o.remove():n(o),i&&a?i.merge(a).order():a}function OT(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,a=n.length,o=i.length,s=Math.min(a,o),u=new Array(a),h=0;h<s;++h)for(var f=n[h],d=i[h],m=f.length,g=u[h]=new Array(m),x,b=0;b<m;++b)(x=f[b]||d[b])&&(g[b]=x);for(;h<a;++h)u[h]=n[h];return new _n(u,this._parents)}function jT(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],a=i.length-1,o=i[a],s;--a>=0;)(s=i[a])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function BT(e){e||(e=PT);function t(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,i=n.length,a=new Array(i),o=0;o<i;++o){for(var s=n[o],u=s.length,h=a[o]=new Array(u),f,d=0;d<u;++d)(f=s[d])&&(h[d]=f);h.sort(t)}return new _n(a,this._parents).order()}function PT(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function FT(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function IT(){return Array.from(this)}function $T(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],a=0,o=i.length;a<o;++a){var s=i[a];if(s)return s}return null}function UT(){let e=0;for(const t of this)++e;return e}function HT(){return!this.node()}function GT(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var a=t[n],o=0,s=a.length,u;o<s;++o)(u=a[o])&&e.call(u,u.__data__,o,a);return this}function ZT(e){return function(){this.removeAttribute(e)}}function qT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VT(e,t){return function(){this.setAttribute(e,t)}}function YT(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function KT(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function XT(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function WT(e,t){var n=xc(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?qT:ZT:typeof t=="function"?n.local?XT:KT:n.local?YT:VT)(n,t))}function Ev(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function QT(e){return function(){this.style.removeProperty(e)}}function JT(e,t,n){return function(){this.style.setProperty(e,t,n)}}function e2(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function t2(e,t,n){return arguments.length>1?this.each((t==null?QT:typeof t=="function"?e2:JT)(e,t,n??"")):Gr(this.node(),e)}function Gr(e,t){return e.style.getPropertyValue(t)||Ev(e).getComputedStyle(e,null).getPropertyValue(t)}function n2(e){return function(){delete this[e]}}function i2(e,t){return function(){this[e]=t}}function a2(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function r2(e,t){return arguments.length>1?this.each((t==null?n2:typeof t=="function"?a2:i2)(e,t)):this.node()[e]}function Av(e){return e.trim().split(/^|\s+/)}function wp(e){return e.classList||new zv(e)}function zv(e){this._node=e,this._names=Av(e.getAttribute("class")||"")}zv.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 Cv(e,t){for(var n=wp(e),i=-1,a=t.length;++i<a;)n.add(t[i])}function Lv(e,t){for(var n=wp(e),i=-1,a=t.length;++i<a;)n.remove(t[i])}function o2(e){return function(){Cv(this,e)}}function l2(e){return function(){Lv(this,e)}}function s2(e,t){return function(){(t.apply(this,arguments)?Cv:Lv)(this,e)}}function u2(e,t){var n=Av(e+"");if(arguments.length<2){for(var i=wp(this.node()),a=-1,o=n.length;++a<o;)if(!i.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?s2:t?o2:l2)(n,t))}function c2(){this.textContent=""}function h2(e){return function(){this.textContent=e}}function f2(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function d2(e){return arguments.length?this.each(e==null?c2:(typeof e=="function"?f2:h2)(e)):this.node().textContent}function p2(){this.innerHTML=""}function m2(e){return function(){this.innerHTML=e}}function g2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function y2(e){return arguments.length?this.each(e==null?p2:(typeof e=="function"?g2:m2)(e)):this.node().innerHTML}function x2(){this.nextSibling&&this.parentNode.appendChild(this)}function _2(){return this.each(x2)}function v2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function b2(){return this.each(v2)}function w2(e){var t=typeof e=="function"?e:bv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function S2(){return null}function k2(e,t){var n=typeof e=="function"?e:bv(e),i=t==null?S2:typeof t=="function"?t:bp(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function T2(){var e=this.parentNode;e&&e.removeChild(this)}function E2(){return this.each(T2)}function A2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function z2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function C2(e){return this.select(e?z2:A2)}function L2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function D2(e){return function(t){e.call(this,t,this.__data__)}}function M2(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function N2(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,a=t.length,o;n<a;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function R2(e,t,n){return function(){var i=this.__on,a,o=D2(t);if(i){for(var s=0,u=i.length;s<u;++s)if((a=i[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=o,a.options=n),a.value=t;return}}this.addEventListener(e.type,o,n),a={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(a):this.__on=[a]}}function O2(e,t,n){var i=M2(e+""),a,o=i.length,s;if(arguments.length<2){var u=this.node().__on;if(u){for(var h=0,f=u.length,d;h<f;++h)for(a=0,d=u[h];a<o;++a)if((s=i[a]).type===d.type&&s.name===d.name)return d.value}return}for(u=t?R2:N2,a=0;a<o;++a)this.each(u(i[a],t,n));return this}function Dv(e,t,n){var i=Ev(e),a=i.CustomEvent;typeof a=="function"?a=new a(t,n):(a=i.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function j2(e,t){return function(){return Dv(this,e,t)}}function B2(e,t){return function(){return Dv(this,e,t.apply(this,arguments))}}function P2(e,t){return this.each((typeof t=="function"?B2:j2)(e,t))}
vendor: 16,378 bytes, line 33
33function*F2(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],a=0,o=i.length,s;a<o;++a)(s=i[a])&&(yield s)}var Mv=[null];function _n(e,t){this._groups=e,this._parents=t}function Pl(){return new _n([[document.documentElement]],Mv)}function I2(){return this}_n.prototype=Pl.prototype={constructor:_n,select:fT,selectAll:gT,selectChild:vT,selectChildren:kT,filter:TT,data:DT,enter:ET,exit:NT,join:RT,merge:OT,selection:I2,order:jT,sort:BT,call:FT,nodes:IT,node:$T,size:UT,empty:HT,each:GT,attr:WT,style:t2,property:r2,classed:u2,text:d2,html:y2,raise:_2,lower:b2,append:w2,insert:k2,remove:E2,clone:C2,datum:L2,on:O2,dispatch:P2,[Symbol.iterator]:F2};function Pn(e){return typeof e=="string"?new _n([[document.querySelector(e)]],[document.documentElement]):new _n([[e]],Mv)}function $2(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ya(e,t){if(e=$2(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const td={capture:!0,passive:!1};function nd(e){e.preventDefault(),e.stopImmediatePropagation()}function U2(e){var t=e.document.documentElement,n=Pn(e).on("dragstart.drag",nd,td);"onselectstart"in t?n.on("selectstart.drag",nd,td):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function H2(e,t){var n=e.document.documentElement,i=Pn(e).on("dragstart.drag",null);t&&(i.on("click.drag",nd,td),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Sp(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Nv(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Fl(){}var pl=.7,Hu=1/pl,Lr="\\s*([+-]?\\d+)\\s*",ml="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",G2=/^#([0-9a-f]{3,8})$/,Z2=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),q2=new RegExp(`^rgb\\(${ii},${ii},${ii}\\)$`),V2=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${ml}\\)$`),Y2=new RegExp(`^rgba\\(${ii},${ii},${ii},${ml}\\)$`),K2=new RegExp(`^hsl\\(${ml},${ii},${ii}\\)$`),X2=new RegExp(`^hsla\\(${ml},${ii},${ii},${ml}\\)$`),py={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Sp(Fl,gl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:my,formatHex:my,formatHex8:W2,formatHsl:Q2,formatRgb:gy,toString:gy});function my(){return this.rgb().formatHex()}function W2(){return this.rgb().formatHex8()}function Q2(){return Rv(this).formatHsl()}function gy(){return this.rgb().formatRgb()}function gl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=G2.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?yy(t):n===3?new en(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ts(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ts(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=Z2.exec(e))?new en(t[1],t[2],t[3],1):(t=q2.exec(e))?new en(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=V2.exec(e))?Ts(t[1],t[2],t[3],t[4]):(t=Y2.exec(e))?Ts(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=K2.exec(e))?vy(t[1],t[2]/100,t[3]/100,1):(t=X2.exec(e))?vy(t[1],t[2]/100,t[3]/100,t[4]):py.hasOwnProperty(e)?yy(py[e]):e==="transparent"?new en(NaN,NaN,NaN,0):null}function yy(e){return new en(e>>16&255,e>>8&255,e&255,1)}function Ts(e,t,n,i){return i<=0&&(e=t=n=NaN),new en(e,t,n,i)}function J2(e){return e instanceof Fl||(e=gl(e)),e?(e=e.rgb(),new en(e.r,e.g,e.b,e.opacity)):new en}function id(e,t,n,i){return arguments.length===1?J2(e):new en(e,t,n,i??1)}function en(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Sp(en,id,Nv(Fl,{brighter(e){return e=e==null?Hu:Math.pow(Hu,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new en(Ra(this.r),Ra(this.g),Ra(this.b),Gu(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:xy,formatHex:xy,formatHex8:eE,formatRgb:_y,toString:_y}));function xy(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function eE(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}${Ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function _y(){const e=Gu(this.opacity);return`${e===1?"rgb(":"rgba("}${Ra(this.r)}, ${Ra(this.g)}, ${Ra(this.b)}${e===1?")":`, ${e})`}`}function Gu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ra(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ta(e){return e=Ra(e),(e<16?"0":"")+e.toString(16)}function vy(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fn(e,t,n,i)}function Rv(e){if(e instanceof Fn)return new Fn(e.h,e.s,e.l,e.opacity);if(e instanceof Fl||(e=gl(e)),!e)return new Fn;if(e instanceof Fn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,a=Math.min(t,n,i),o=Math.max(t,n,i),s=NaN,u=o-a,h=(o+a)/2;return u?(t===o?s=(n-i)/u+(n<i)*6:n===o?s=(i-t)/u+2:s=(t-n)/u+4,u/=h<.5?o+a:2-o-a,s*=60):u=h>0&&h<1?0:s,new Fn(s,u,h,e.opacity)}function tE(e,t,n,i){return arguments.length===1?Rv(e):new Fn(e,t,n,i??1)}function Fn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Sp(Fn,tE,Nv(Fl,{brighter(e){return e=e==null?Hu:Math.pow(Hu,e),new Fn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new Fn(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,i=n+(n<.5?n:1-n)*t,a=2*n-i;return new en(Oh(e>=240?e-240:e+120,a,i),Oh(e,a,i),Oh(e<120?e+240:e-120,a,i),this.opacity)},clamp(){return new Fn(by(this.h),Es(this.s),Es(this.l),Gu(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=Gu(this.opacity);return`${e===1?"hsl(":"hsla("}${by(this.h)}, ${Es(this.s)*100}%, ${Es(this.l)*100}%${e===1?")":`, ${e})`}`}}));function by(e){return e=(e||0)%360,e<0?e+360:e}function Es(e){return Math.max(0,Math.min(1,e||0))}function Oh(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 Ov=e=>()=>e;function nE(e,t){return function(n){return e+n*t}}function iE(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function aE(e){return(e=+e)==1?jv:function(t,n){return n-t?iE(t,n,e):Ov(isNaN(t)?n:t)}}function jv(e,t){var n=t-e;return n?nE(e,n):Ov(isNaN(e)?t:e)}const wy=function e(t){var n=aE(t);function i(a,o){var s=n((a=id(a)).r,(o=id(o)).r),u=n(a.g,o.g),h=n(a.b,o.b),f=jv(a.opacity,o.opacity);return function(d){return a.r=s(d),a.g=u(d),a.b=h(d),a.opacity=f(d),a+""}}return i.gamma=e,i}(1);function $i(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var ad=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jh=new RegExp(ad.source,"g");function rE(e){return function(){return e}}function oE(e){return function(t){return e(t)+""}}function lE(e,t){var n=ad.lastIndex=jh.lastIndex=0,i,a,o,s=-1,u=[],h=[];for(e=e+"",t=t+"";(i=ad.exec(e))&&(a=jh.exec(t));)(o=a.index)>n&&(o=t.slice(n,o),u[s]?u[s]+=o:u[++s]=o),(i=i[0])===(a=a[0])?u[s]?u[s]+=a:u[++s]=a:(u[++s]=null,h.push({i:s,x:$i(i,a)})),n=jh.lastIndex;return n<t.length&&(o=t.slice(n),u[s]?u[s]+=o:u[++s]=o),u.length<2?h[0]?oE(h[0].x):rE(t):(t=h.length,function(f){for(var d=0,m;d<t;++d)u[(m=h[d]).i]=m.x(f);return u.join("")})}var Sy=180/Math.PI,rd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bv(e,t,n,i,a,o){var s,u,h;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(h=e*n+t*i)&&(n-=e*h,i-=t*h),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,h/=u),e*i<t*n&&(e=-e,t=-t,h=-h,s=-s),{translateX:a,translateY:o,rotate:Math.atan2(t,e)*Sy,skewX:Math.atan(h)*Sy,scaleX:s,scaleY:u}}var As;function sE(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?rd:Bv(t.a,t.b,t.c,t.d,t.e,t.f)}function uE(e){return e==null||(As||(As=document.createElementNS("http://www.w3.org/2000/svg","g")),As.setAttribute("transform",e),!(e=As.transform.baseVal.consolidate()))?rd:(e=e.matrix,Bv(e.a,e.b,e.c,e.d,e.e,e.f))}function Pv(e,t,n,i){function a(f){return f.length?f.pop()+" ":""}function o(f,d,m,g,x,b){if(f!==m||d!==g){var E=x.push("translate(",null,t,null,n);b.push({i:E-4,x:$i(f,m)},{i:E-2,x:$i(d,g)})}else(m||g)&&x.push("translate("+m+t+g+n)}function s(f,d,m,g){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),g.push({i:m.push(a(m)+"rotate(",null,i)-2,x:$i(f,d)})):d&&m.push(a(m)+"rotate("+d+i)}function u(f,d,m,g){f!==d?g.push({i:m.push(a(m)+"skewX(",null,i)-2,x:$i(f,d)}):d&&m.push(a(m)+"skewX("+d+i)}function h(f,d,m,g,x,b){if(f!==m||d!==g){var E=x.push(a(x)+"scale(",null,",",null,")");b.push({i:E-4,x:$i(f,m)},{i:E-2,x:$i(d,g)})}else(m!==1||g!==1)&&x.push(a(x)+"scale("+m+","+g+")")}return function(f,d){var m=[],g=[];return f=e(f),d=e(d),o(f.translateX,f.translateY,d.translateX,d.translateY,m,g),s(f.rotate,d.rotate,m,g),u(f.skewX,d.skewX,m,g),h(f.scaleX,f.scaleY,d.scaleX,d.scaleY,m,g),f=d=null,function(x){for(var b=-1,E=g.length,H;++b<E;)m[(H=g[b]).i]=H.x(x);return m.join("")}}}var cE=Pv(sE,"px, ","px)","deg)"),hE=Pv(uE,", ",")",")"),fE=1e-12;function ky(e){return((e=Math.exp(e))+1/e)/2}function dE(e){return((e=Math.exp(e))-1/e)/2}function pE(e){return((e=Math.exp(2*e))-1)/(e+1)}const mE=function e(t,n,i){function a(o,s){var u=o[0],h=o[1],f=o[2],d=s[0],m=s[1],g=s[2],x=d-u,b=m-h,E=x*x+b*b,H,v;if(E<fE)v=Math.log(g/f)/t,H=function(Z){return[u+Z*x,h+Z*b,f*Math.exp(t*Z*v)]};else{var w=Math.sqrt(E),A=(g*g-f*f+i*E)/(2*f*n*w),D=(g*g-f*f-i*E)/(2*g*n*w),G=Math.log(Math.sqrt(A*A+1)-A),j=Math.log(Math.sqrt(D*D+1)-D);v=(j-G)/t,H=function(Z){var Y=Z*v,q=ky(G),te=f/(n*w)*(q*pE(t*Y+G)-dE(G));return[u+te*x,h+te*b,f*q/ky(t*Y+G)]}}return H.duration=v*1e3*t/Math.SQRT2,H}return a.rho=function(o){var s=Math.max(.001,+o),u=s*s,h=u*u;return e(s,u,h)},a}(Math.SQRT2,2,4);var Zr=0,Mo=0,wo=0,Fv=1e3,Zu,No,qu=0,Fa=0,_c=0,yl=typeof performance=="object"&&performance.now?performance:Date,Iv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kp(){return Fa||(Iv(gE),Fa=yl.now()+_c)}function gE(){Fa=0}function Vu(){this._call=this._time=this._next=null}Vu.prototype=$v.prototype={constructor:Vu,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?kp():+n)+(t==null?0:+t),!this._next&&No!==this&&(No?No._next=this:Zu=this,No=this),this._call=e,this._time=n,od()},stop:function(){this._call&&(this._call=null,this._time=1/0,od())}};function $v(e,t,n){var i=new Vu;return i.restart(e,t,n),i}function yE(){kp(),++Zr;for(var e=Zu,t;e;)(t=Fa-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zr}function Ty(){Fa=(qu=yl.now())+_c,Zr=Mo=0;try{yE()}finally{Zr=0,_E(),Fa=0}}function xE(){var e=yl.now(),t=e-qu;t>Fv&&(_c-=t,qu=e)}function _E(){for(var e,t=Zu,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Zu=n);No=e,od(i)}function od(e){if(!Zr){Mo&&(Mo=clearTimeout(Mo));var t=e-Fa;t>24?(e<1/0&&(Mo=setTimeout(Ty,e-yl.now()-_c)),wo&&(wo=clearInterval(wo))):(wo||(qu=yl.now(),wo=setInterval(xE,Fv)),Zr=1,Iv(Ty))}}function Ey(e,t,n){var i=new Vu;return t=t==null?0:+t,i.restart(a=>{i.stop(),e(a+t)},t,n),i}var vE=vp("start","end","cancel","interrupt"),bE=[],Uv=0,Ay=1,ld=2,Xs=3,zy=4,sd=5,Ws=6;function vc(e,t,n,i,a,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;wE(e,n,{name:t,index:i,group:a,on:vE,tween:bE,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Uv})}function Tp(e,t){var n=Un(e,t);if(n.state>Uv)throw new Error("too late; already scheduled");return n}function si(e,t){var n=Un(e,t);if(n.state>Xs)throw new Error("too late; already running");return n}function Un(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function wE(e,t,n){var i=e.__transition,a;i[t]=n,n.timer=$v(o,0,n.time);function o(f){n.state=Ay,n.timer.restart(s,n.delay,n.time),n.delay<=f&&s(f-n.delay)}function s(f){var d,m,g,x;if(n.state!==Ay)return h();for(d in i)if(x=i[d],x.name===n.name){if(x.state===Xs)return Ey(s);x.state===zy?(x.state=Ws,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete i[d]):+d<t&&(x.state=Ws,x.timer.stop(),x.on.call("cancel",e,e.__data__,x.index,x.group),delete i[d])}if(Ey(function(){n.state===Xs&&(n.state=zy,n.timer.restart(u,n.delay,n.time),u(f))}),n.state=ld,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ld){for(n.state=Xs,a=new Array(g=n.tween.length),d=0,m=-1;d<g;++d)(x=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(a[++m]=x);a.length=m+1}}function u(f){for(var d=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(h),n.state=sd,1),m=-1,g=a.length;++m<g;)a[m].call(e,d);n.state===sd&&(n.on.call("end",e,e.__data__,n.index,n.group),h())}function h(){n.state=Ws,n.timer.stop(),delete i[t];for(var f in i)return;delete e.__transition}}function Qs(e,t){var n=e.__transition,i,a,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((i=n[s]).name!==t){o=!1;continue}a=i.state>ld&&i.state<sd,i.state=Ws,i.timer.stop(),i.on.call(a?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[s]}o&&delete e.__transition}}function SE(e){return this.each(function(){Qs(this,e)})}function kE(e,t){var n,i;return function(){var a=si(this,e),o=a.tween;if(o!==n){i=n=o;for(var s=0,u=i.length;s<u;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}a.tween=i}}
vendor: 7,269 bytes, line 33
33function TE(e,t,n){var i,a;if(typeof n!="function")throw new Error;return function(){var o=si(this,e),s=o.tween;if(s!==i){a=(i=s).slice();for(var u={name:t,value:n},h=0,f=a.length;h<f;++h)if(a[h].name===t){a[h]=u;break}h===f&&a.push(u)}o.tween=a}}function EE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=Un(this.node(),n).tween,a=0,o=i.length,s;a<o;++a)if((s=i[a]).name===e)return s.value;return null}return this.each((t==null?kE:TE)(n,e,t))}function Ep(e,t,n){var i=e._id;return e.each(function(){var a=si(this,i);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return Un(a,i).value[t]}}function Hv(e,t){var n;return(typeof t=="number"?$i:t instanceof gl?wy:(n=gl(t))?(t=n,wy):lE)(e,t)}function AE(e){return function(){this.removeAttribute(e)}}function zE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CE(e,t,n){var i,a=n+"",o;return function(){var s=this.getAttribute(e);return s===a?null:s===i?o:o=t(i=s,n)}}function LE(e,t,n){var i,a=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===i?o:o=t(i=s,n)}}function DE(e,t,n){var i,a,o;return function(){var s,u=n(this),h;return u==null?void this.removeAttribute(e):(s=this.getAttribute(e),h=u+"",s===h?null:s===i&&h===a?o:(a=h,o=t(i=s,u)))}}function ME(e,t,n){var i,a,o;return function(){var s,u=n(this),h;return u==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),h=u+"",s===h?null:s===i&&h===a?o:(a=h,o=t(i=s,u)))}}function NE(e,t){var n=xc(e),i=n==="transform"?hE:Hv;return this.attrTween(e,typeof t=="function"?(n.local?ME:DE)(n,i,Ep(this,"attr."+e,t)):t==null?(n.local?zE:AE)(n):(n.local?LE:CE)(n,i,t))}function RE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function OE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function jE(e,t){var n,i;function a(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&OE(e,o)),n}return a._value=t,a}function BE(e,t){var n,i;function a(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&RE(e,o)),n}return a._value=t,a}function PE(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=xc(e);return this.tween(n,(i.local?jE:BE)(i,t))}function FE(e,t){return function(){Tp(this,e).delay=+t.apply(this,arguments)}}function IE(e,t){return t=+t,function(){Tp(this,e).delay=t}}function $E(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FE:IE)(t,e)):Un(this.node(),t).delay}function UE(e,t){return function(){si(this,e).duration=+t.apply(this,arguments)}}function HE(e,t){return t=+t,function(){si(this,e).duration=t}}function GE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?UE:HE)(t,e)):Un(this.node(),t).duration}function ZE(e,t){if(typeof t!="function")throw new Error;return function(){si(this,e).ease=t}}function qE(e){var t=this._id;return arguments.length?this.each(ZE(t,e)):Un(this.node(),t).ease}function VE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;si(this,e).ease=n}}function YE(e){if(typeof e!="function")throw new Error;return this.each(VE(this._id,e))}function KE(e){typeof e!="function"&&(e=Sv(e));for(var t=this._groups,n=t.length,i=new Array(n),a=0;a<n;++a)for(var o=t[a],s=o.length,u=i[a]=[],h,f=0;f<s;++f)(h=o[f])&&e.call(h,h.__data__,f,o)&&u.push(h);return new Di(i,this._parents,this._name,this._id)}function XE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,a=n.length,o=Math.min(i,a),s=new Array(i),u=0;u<o;++u)for(var h=t[u],f=n[u],d=h.length,m=s[u]=new Array(d),g,x=0;x<d;++x)(g=h[x]||f[x])&&(m[x]=g);for(;u<i;++u)s[u]=t[u];return new Di(s,this._parents,this._name,this._id)}function WE(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function QE(e,t,n){var i,a,o=WE(t)?Tp:si;return function(){var s=o(this,e),u=s.on;u!==i&&(a=(i=u).copy()).on(t,n),s.on=a}}function JE(e,t){var n=this._id;return arguments.length<2?Un(this.node(),n).on.on(e):this.each(QE(n,e,t))}function eA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function tA(){return this.on("end.remove",eA(this._id))}function nA(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bp(e));for(var i=this._groups,a=i.length,o=new Array(a),s=0;s<a;++s)for(var u=i[s],h=u.length,f=o[s]=new Array(h),d,m,g=0;g<h;++g)(d=u[g])&&(m=e.call(d,d.__data__,g,u))&&("__data__"in d&&(m.__data__=d.__data__),f[g]=m,vc(f[g],t,n,g,f,Un(d,n)));return new Di(o,this._parents,t,n)}function iA(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wv(e));for(var i=this._groups,a=i.length,o=[],s=[],u=0;u<a;++u)for(var h=i[u],f=h.length,d,m=0;m<f;++m)if(d=h[m]){for(var g=e.call(d,d.__data__,m,h),x,b=Un(d,n),E=0,H=g.length;E<H;++E)(x=g[E])&&vc(x,t,n,E,g,b);o.push(g),s.push(d)}return new Di(o,s,t,n)}var aA=Pl.prototype.constructor;function rA(){return new aA(this._groups,this._parents)}function oA(e,t){var n,i,a;return function(){var o=Gr(this,e),s=(this.style.removeProperty(e),Gr(this,e));return o===s?null:o===n&&s===i?a:a=t(n=o,i=s)}}function Gv(e){return function(){this.style.removeProperty(e)}}function lA(e,t,n){var i,a=n+"",o;return function(){var s=Gr(this,e);return s===a?null:s===i?o:o=t(i=s,n)}}function sA(e,t,n){var i,a,o;return function(){var s=Gr(this,e),u=n(this),h=u+"";return u==null&&(h=u=(this.style.removeProperty(e),Gr(this,e))),s===h?null:s===i&&h===a?o:(a=h,o=t(i=s,u))}}function uA(e,t){var n,i,a,o="style."+t,s="end."+o,u;return function(){var h=si(this,e),f=h.on,d=h.value[o]==null?u||(u=Gv(t)):void 0;(f!==n||a!==d)&&(i=(n=f).copy()).on(s,a=d),h.on=i}}function cA(e,t,n){var i=(e+="")=="transform"?cE:Hv;return t==null?this.styleTween(e,oA(e,i)).on("end.style."+e,Gv(e)):typeof t=="function"?this.styleTween(e,sA(e,i,Ep(this,"style."+e,t))).each(uA(this._id,e)):this.styleTween(e,lA(e,i,t),n).on("end.style."+e,null)}function hA(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function fA(e,t,n){var i,a;function o(){var s=t.apply(this,arguments);return s!==a&&(i=(a=s)&&hA(e,s,n)),i}return o._value=t,o}function dA(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,fA(e,t,n??""))}function pA(e){return function(){this.textContent=e}}function mA(e){return function(){var t=e(this);this.textContent=t??""}}function gA(e){return this.tween("text",typeof e=="function"?mA(Ep(this,"text",e)):pA(e==null?"":e+""))}function yA(e){return function(t){this.textContent=e.call(this,t)}}function xA(e){var t,n;function i(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&yA(a)),t}return i._value=e,i}function _A(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,xA(e))}function vA(){for(var e=this._name,t=this._id,n=Zv(),i=this._groups,a=i.length,o=0;o<a;++o)for(var s=i[o],u=s.length,h,f=0;f<u;++f)if(h=s[f]){var d=Un(h,t);
33vc(h,e,n,f,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Di(i,this._parents,e,n)}function bA(){var e,t,n=this,i=n._id,a=n.size();return new Promise(function(o,s){var u={value:s},h={value:function(){--a===0&&o()}};n.each(function(){var f=si(this,i),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(h)),f.on=t}),a===0&&o()})}var wA=0;function Di(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Zv(){return++wA}var gi=Pl.prototype;Di.prototype={constructor:Di,select:nA,selectAll:iA,selectChild:gi.selectChild,selectChildren:gi.selectChildren,filter:KE,merge:XE,selection:rA,transition:vA,call:gi.call,nodes:gi.nodes,node:gi.node,size:gi.size,empty:gi.empty,each:gi.each,on:JE,attr:NE,attrTween:PE,style:cA,styleTween:dA,text:gA,textTween:_A,remove:tA,tween:EE,delay:$E,duration:GE,ease:qE,easeVarying:YE,end:bA,[Symbol.iterator]:gi[Symbol.iterator]};function SA(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var kA={time:null,delay:0,duration:250,ease:SA};function TA(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function EA(e){var t,n;e instanceof Di?(t=e._id,e=e._name):(t=Zv(),(n=kA).time=kp(),e=e==null?null:e+"");for(var i=this._groups,a=i.length,o=0;o<a;++o)for(var s=i[o],u=s.length,h,f=0;f<u;++f)(h=s[f])&&vc(h,e,t,f,s,n||TA(h,t));return new Di(i,this._parents,e,t)}Pl.prototype.interrupt=SE;Pl.prototype.transition=EA;const ud=Math.PI,cd=2*ud,Sa=1e-6,AA=cd-Sa;function qv(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function zA(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qv;const n=10**t;return function(i){this._+=i[0];for(let a=1,o=i.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+i[a]}}class CA{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qv:zA(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,i,a){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+a}`}bezierCurveTo(t,n,i,a,o,s){this._append`C${+t},${+n},${+i},${+a},${this._x1=+o},${this._y1=+s}`}arcTo(t,n,i,a,o){if(t=+t,n=+n,i=+i,a=+a,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,u=this._y1,h=i-t,f=a-n,d=s-t,m=u-n,g=d*d+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Sa)if(!(Math.abs(m*h-f*d)>Sa)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=i-s,b=a-u,E=h*h+f*f,H=x*x+b*b,v=Math.sqrt(E),w=Math.sqrt(g),A=o*Math.tan((ud-Math.acos((E+g-H)/(2*v*w)))/2),D=A/w,G=A/v;Math.abs(D-1)>Sa&&this._append`L${t+D*d},${n+D*m}`,this._append`A${o},${o},0,0,${+(m*x>d*b)},${this._x1=t+G*h},${this._y1=n+G*f}`}}arc(t,n,i,a,o,s){if(t=+t,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let u=i*Math.cos(a),h=i*Math.sin(a),f=t+u,d=n+h,m=1^s,g=s?a-o:o-a;this._x1===null?this._append`M${f},${d}`:(Math.abs(this._x1-f)>Sa||Math.abs(this._y1-d)>Sa)&&this._append`L${f},${d}`,i&&(g<0&&(g=g%cd+cd),g>AA?this._append`A${i},${i},0,1,${m},${t-u},${n-h}A${i},${i},0,1,${m},${this._x1=f},${this._y1=d}`:g>Sa&&this._append`A${i},${i},0,${+(g>=ud)},${m},${this._x1=t+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(t,n,i,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+a}h${-i}Z`}toString(){return this._}}var Cy={},Bh={},Ph=34,So=10,Fh=13;function Vv(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function LA(e,t){var n=Vv(e);return function(i,a){return t(n(i),a,e)}}function Ly(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var a in i)a in t||n.push(t[a]=a)}),n}function Xt(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function DA(e){return e<0?"-"+Xt(-e,6):e>9999?"+"+Xt(e,6):Xt(e,4)}function MA(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),a=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":DA(e.getUTCFullYear())+"-"+Xt(e.getUTCMonth()+1,2)+"-"+Xt(e.getUTCDate(),2)+(a?"T"+Xt(t,2)+":"+Xt(n,2)+":"+Xt(i,2)+"."+Xt(a,3)+"Z":i?"T"+Xt(t,2)+":"+Xt(n,2)+":"+Xt(i,2)+"Z":n||t?"T"+Xt(t,2)+":"+Xt(n,2)+"Z":"")}function NA(e){var t=new RegExp('["'+e+` 34\r]`),n=e.charCodeAt(0);function i(m,g){var x,b,E=a(m,function(H,v){if(x)return x(H,v-1);b=H,x=g?LA(H,g):Vv(H)});return E.columns=b||[],E}function a(m,g){var x=[],b=m.length,E=0,H=0,v,w=b<=0,A=!1;m.charCodeAt(b-1)===So&&--b,m.charCodeAt(b-1)===Fh&&--b;function D(){if(w)return Bh;if(A)return A=!1,Cy;var j,Z=E,Y;if(m.charCodeAt(Z)===Ph){for(;E++<b&&m.charCodeAt(E)!==Ph||m.charCodeAt(++E)===Ph;);return(j=E)>=b?w=!0:(Y=m.charCodeAt(E++))===So?A=!0:Y===Fh&&(A=!0,m.charCodeAt(E)===So&&++E),m.slice(Z+1,j-1).replace(/""/g,'"')}for(;E<b;){if((Y=m.charCodeAt(j=E++))===So)A=!0;else if(Y===Fh)A=!0,m.charCodeAt(E)===So&&++E;else if(Y!==n)continue;return m.slice(Z,j)}return w=!0,m.slice(Z,b)}for(;(v=D())!==Bh;){for(var G=[];v!==Cy&&v!==Bh;)G.push(v),v=D();g&&(G=g(G,H++))==null||x.push(G)}return x}function o(m,g){return m.map(function(x){return g.map(function(b){return d(x[b])}).join(e)})}function s(m,g){return g==null&&(g=Ly(m)),[g.map(d).join(e)].concat(o(m,g)).join(` 35`)}function u(m,g){return g==null&&(g=Ly(m)),o(m,g).join(` 36`)}function h(m){return m.map(f).join(` 37`)}function f(m){return m.map(d).join(e)}function d(m){return m==null?"":m instanceof Date?MA(m):t.test(m+="")?'"'+m.replace(/"/g,'""')+'"':m}return{parse:i,parseRows:a,format:s,formatBody:u,formatRows:h,formatRow:f,formatValue:d}}
37var RA=NA(","),mt=RA.parse;function OA(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function jA(){return this.eachAfter(OA)}function BA(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function PA(e,t){for(var n=this,i=[n],a,o,s=-1;n=i.pop();)if(e.call(t,n,++s,this),a=n.children)for(o=a.length-1;o>=0;--o)i.push(a[o]);return this}function FA(e,t){for(var n=this,i=[n],a=[],o,s,u,h=-1;n=i.pop();)if(a.push(n),o=n.children)for(s=0,u=o.length;s<u;++s)i.push(o[s]);for(;n=a.pop();)e.call(t,n,++h,this);return this}function IA(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function $A(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,a=i&&i.length;--a>=0;)n+=i[a].value;t.value=n})}function UA(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function HA(e){for(var t=this,n=GA(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var a=i.length;e!==n;)i.splice(a,0,e),e=e.parent;return i}function GA(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),a=null;for(e=n.pop(),t=i.pop();e===t;)a=e,e=n.pop(),t=i.pop();return a}function ZA(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function qA(){return Array.from(this)}function VA(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function YA(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*KA(){var e=this,t,n=[e],i,a,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(a=0,o=i.length;a<o;++a)n.push(i[a]);while(n.length)}function Ap(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=QA)):t===void 0&&(t=WA);for(var n=new xl(e),i,a=[n],o,s,u,h;i=a.pop();)if((s=t(i.data))&&(h=(s=Array.from(s)).length))for(i.children=s,u=h-1;u>=0;--u)a.push(o=s[u]=new xl(s[u])),o.parent=i,o.depth=i.depth+1;return n.eachBefore(ez)}function XA(){return Ap(this).eachBefore(JA)}function WA(e){return e.children}function QA(e){return Array.isArray(e)?e[1]:null}function JA(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function ez(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function xl(e){this.data=e,this.depth=this.height=0,this.parent=null}xl.prototype=Ap.prototype={constructor:xl,count:jA,each:BA,eachAfter:FA,eachBefore:PA,find:IA,sum:$A,sort:UA,path:HA,ancestors:ZA,descendants:qA,leaves:VA,links:YA,copy:XA,[Symbol.iterator]:KA};function tz(e,t){return e.parent===t.parent?1:2}function Ih(e){var t=e.children;return t?t[0]:e.t}function $h(e){var t=e.children;return t?t[t.length-1]:e.t}function nz(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function iz(e){for(var t=0,n=0,i=e.children,a=i.length,o;--a>=0;)o=i[a],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function az(e,t,n){return e.a.parent===t.parent?e.a:n}function Js(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Js.prototype=Object.create(xl.prototype);function rz(e){for(var t=new Js(e,0),n,i=[t],a,o,s,u;n=i.pop();)if(o=n._.children)for(n.children=new Array(u=o.length),s=u-1;s>=0;--s)i.push(a=n.children[s]=new Js(o[s],s)),a.parent=n;return(t.parent=new Js(null,0)).children=[t],t}function oz(){var e=tz,t=1,n=1,i=null;function a(f){var d=rz(f);if(d.eachAfter(o),d.parent.m=-d.z,d.eachBefore(s),i)f.eachBefore(h);else{var m=f,g=f,x=f;f.eachBefore(function(w){w.x<m.x&&(m=w),w.x>g.x&&(g=w),w.depth>x.depth&&(x=w)});var b=m===g?1:e(m,g)/2,E=b-m.x,H=t/(g.x+b+E),v=n/(x.depth||1);f.eachBefore(function(w){w.x=(w.x+E)*H,w.y=w.depth*v})}return f}function o(f){var d=f.children,m=f.parent.children,g=f.i?m[f.i-1]:null;if(d){iz(f);var x=(d[0].z+d[d.length-1].z)/2;g?(f.z=g.z+e(f._,g._),f.m=f.z-x):f.z=x}else g&&(f.z=g.z+e(f._,g._));f.parent.A=u(f,g,f.parent.A||m[0])}function s(f){f._.x=f.z+f.parent.m,f.m+=f.parent.m}function u(f,d,m){if(d){for(var g=f,x=f,b=d,E=g.parent.children[0],H=g.m,v=x.m,w=b.m,A=E.m,D;b=$h(b),g=Ih(g),b&&g;)E=Ih(E),x=$h(x),x.a=f,D=b.z+w-g.z-H+e(b._,g._),D>0&&(nz(az(b,f,m),f,D),H+=D,v+=D),w+=b.m,H+=g.m,A+=E.m,v+=x.m;b&&!$h(x)&&(x.t=b,x.m+=w-v),g&&!Ih(E)&&(E.t=g,E.m+=H-A,m=f)}return m}function h(f){f.x*=t,f.y=f.depth*n}return a.separation=function(f){return arguments.length?(e=f,a):e},a.size=function(f){return arguments.length?(i=!1,t=+f[0],n=+f[1],a):i?null:[t,n]},a.nodeSize=function(f){return arguments.length?(i=!0,t=+f[0],n=+f[1],a):i?[t,n]:null},a}function Dy(e){return function(){return e}}function lz(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new CA(t)}var sz=Array.prototype.slice;function uz(e){return e[0]}function cz(e){return e[1]}class hz{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}
vendor: 10,249 bytes, line 37
37point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function fz(e){return new hz(e,!0)}function dz(e){return e.source}function pz(e){return e.target}function mz(e){let t=dz,n=pz,i=uz,a=cz,o=null,s=null,u=lz(h);function h(){let f;const d=sz.call(arguments),m=t.apply(this,d),g=n.apply(this,d);if(o==null&&(s=e(f=u())),s.lineStart(),d[0]=m,s.point(+i.apply(this,d),+a.apply(this,d)),d[0]=g,s.point(+i.apply(this,d),+a.apply(this,d)),s.lineEnd(),f)return s=null,f+""||null}return h.source=function(f){return arguments.length?(t=f,h):t},h.target=function(f){return arguments.length?(n=f,h):n},h.x=function(f){return arguments.length?(i=typeof f=="function"?f:Dy(+f),h):i},h.y=function(f){return arguments.length?(a=typeof f=="function"?f:Dy(+f),h):a},h.context=function(f){return arguments.length?(f==null?o=s=null:s=e(o=f),h):o},h}function gz(){return mz(fz)}const zs=e=>()=>e;function yz(e,{sourceEvent:t,target:n,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Si(e,t,n){this.k=e,this.x=t,this.y=n}Si.prototype={constructor:Si,scale:function(e){return e===1?this:new Si(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Si(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Yv=new Si(1,0,0);Si.prototype;function Uh(e){e.stopImmediatePropagation()}function ko(e){e.preventDefault(),e.stopImmediatePropagation()}function xz(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function _z(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function My(){return this.__zoom||Yv}function vz(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function bz(){return navigator.maxTouchPoints||"ontouchstart"in this}function wz(e,t,n){var i=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function Sz(){var e=xz,t=_z,n=wz,i=vz,a=bz,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,h=mE,f=vp("start","zoom","end"),d,m,g,x=500,b=150,E=0,H=10;function v(T){T.property("__zoom",My).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",te).filter(a).on("touchstart.zoom",$).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(T,N,C,F){var M=T.selection?T.selection():T;M.property("__zoom",My),T!==M?G(T,N,C,F):M.interrupt().each(function(){j(this,arguments).event(F).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},v.scaleBy=function(T,N,C,F){v.scaleTo(T,function(){var M=this.__zoom.k,V=typeof N=="function"?N.apply(this,arguments):N;return M*V},C,F)},v.scaleTo=function(T,N,C,F){v.transform(T,function(){var M=t.apply(this,arguments),V=this.__zoom,k=C==null?D(M):typeof C=="function"?C.apply(this,arguments):C,Q=V.invert(k),ie=typeof N=="function"?N.apply(this,arguments):N;return n(A(w(V,ie),k,Q),M,s)},C,F)},v.translateBy=function(T,N,C,F){v.transform(T,function(){return n(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof C=="function"?C.apply(this,arguments):C),t.apply(this,arguments),s)},null,F)},v.translateTo=function(T,N,C,F,M){v.transform(T,function(){var V=t.apply(this,arguments),k=this.__zoom,Q=F==null?D(V):typeof F=="function"?F.apply(this,arguments):F;return n(Yv.translate(Q[0],Q[1]).scale(k.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof C=="function"?-C.apply(this,arguments):-C),V,s)},F,M)};function w(T,N){return N=Math.max(o[0],Math.min(o[1],N)),N===T.k?T:new Si(N,T.x,T.y)}function A(T,N,C){var F=N[0]-C[0]*T.k,M=N[1]-C[1]*T.k;return F===T.x&&M===T.y?T:new Si(T.k,F,M)}function D(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function G(T,N,C,F){T.on("start.zoom",function(){j(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(F).end()}).tween("zoom",function(){var M=this,V=arguments,k=j(M,V).event(F),Q=t.apply(M,V),ie=C==null?D(Q):typeof C=="function"?C.apply(M,V):C,z=Math.max(Q[1][0]-Q[0][0],Q[1][1]-Q[0][1]),ye=M.__zoom,X=typeof N=="function"?N.apply(M,V):N,ae=h(ye.invert(ie).concat(z/ye.k),X.invert(ie).concat(z/X.k));return function(_e){if(_e===1)_e=X;else{var pe=ae(_e),Re=z/pe[2];_e=new Si(Re,ie[0]-pe[0]*Re,ie[1]-pe[1]*Re)}k.zoom(null,_e)}})}function j(T,N,C){return!C&&T.__zooming||new Z(T,N)}function Z(T,N){this.that=T,this.args=N,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,N),this.taps=0}Z.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,N){return this.mouse&&T!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var N=Pn(this.that).datum();f.call(T,this.that,new yz(T,{sourceEvent:this.sourceEvent,target:v,type:T,transform:this.that.__zoom,dispatch:f}),N)}};function Y(T,...N){if(!e.apply(this,arguments))return;var C=j(this,N).event(T),F=this.__zoom,M=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,i.apply(this,arguments)))),V=ya(T);if(C.wheel)(C.mouse[0][0]!==V[0]||C.mouse[0][1]!==V[1])&&(C.mouse[1]=F.invert(C.mouse[0]=V)),clearTimeout(C.wheel);else{if(F.k===M)return;C.mouse=[V,F.invert(V)],Qs(this),C.start()}ko(T),C.wheel=setTimeout(k,b),C.zoom("mouse",n(A(w(F,M),C.mouse[0],C.mouse[1]),C.extent,s));function k(){C.wheel=null,C.end()}}function q(T,...N){if(g||!e.apply(this,arguments))return;var C=T.currentTarget,F=j(this,N,!0).event(T),M=Pn(T.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",z,!0),V=ya(T,C),k=T.clientX,Q=T.clientY;U2(T.view),Uh(T),F.mouse=[V,this.__zoom.invert(V)],Qs(this),F.start();function ie(ye){if(ko(ye),!F.moved){var X=ye.clientX-k,ae=ye.clientY-Q;F.moved=X*X+ae*ae>E}F.event(ye).zoom("mouse",n(A(F.that.__zoom,F.mouse[0]=ya(ye,C),F.mouse[1]),F.extent,s))}function z(ye){M.on("mousemove.zoom mouseup.zoom",null),H2(ye.view,F.moved),ko(ye),F.event(ye).end()}}function te(T,...N){if(e.apply(this,arguments)){var C=this.__zoom,F=ya(T.changedTouches?T.changedTouches[0]:T,this),M=C.invert(F),V=C.k*(T.shiftKey?.5:2),k=n(A(w(C,V),F,M),t.apply(this,N),s);ko(T),u>0?Pn(this).transition().duration(u).call(G,k,F,T):Pn(this).call(v.transform,k,F,T)}}function $(T,...N){if(e.apply(this,arguments)){var C=T.touches,F=C.length,M=j(this,N,T.changedTouches.length===F).event(T),V,k,Q,ie;for(Uh(T),k=0;k<F;++k)Q=C[k],ie=ya(Q,this),ie=[ie,this.__zoom.invert(ie),Q.identifier],M.touch0?!M.touch1&&M.touch0[2]!==ie[2]&&(M.touch1=ie,M.taps=0):(M.touch0=ie,V=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),V&&(M.taps<2&&(m=ie[0],d=setTimeout(function(){d=null},x)),Qs(this),M.start())}}function O(T,...N){if(this.__zooming){var C=j(this,N).event(T),F=T.changedTouches,M=F.length,V,k,Q,ie;for(ko(T),V=0;V<M;++V)k=F[V],Q=ya(k,this),C.touch0&&C.touch0[2]===k.identifier?C.touch0[0]=Q:C.touch1&&C.touch1[2]===k.identifier&&(C.touch1[0]=Q);if(k=C.that.__zoom,C.touch1){var z=C.touch0[0],ye=C.touch0[1],X=C.touch1[0],ae=C.touch1[1],_e=(_e=X[0]-z[0])*_e+(_e=X[1]-z[1])*_e,pe=(pe=ae[0]-ye[0])*pe+(pe=ae[1]-ye[1])*pe;k=w(k,Math.sqrt(_e/pe)),Q=[(z[0]+X[0])/2,(z[1]+X[1])/2],ie=[(ye[0]+ae[0])/2,(ye[1]+ae[1])/2]}else if(C.touch0)Q=C.touch0[0],ie=C.touch0[1];else return;C.zoom("touch",n(A(k,Q,ie),C.extent,s))}}function U(T,...N){if(this.__zooming){var C=j(this,N).event(T),F=T.changedTouches,M=F.length,V,k;for(Uh(T),g&&clearTimeout(g),g=setTimeout(function(){g=null},x),V=0;V<M;++V)k=F[V],C.touch0&&C.touch0[2]===k.identifier?delete C.touch0:C.touch1&&C.touch1[2]===k.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(k=ya(k,this),Math.hypot(m[0]-k[0],m[1]-k[1])<H)){var Q=Pn(this).on("dblclick.zoom");Q&&Q.apply(this,arguments)}}}return v.wheelDelta=function(T){return arguments.length?(i=typeof T=="function"?T:zs(+T),v):i},v.filter=function(T){return arguments.length?(e=typeof T=="function"?T:zs(!!T),v):e},v.touchable=function(T){return arguments.length?(a=typeof T=="function"?T:zs(!!T),v):a},v.extent=function(T){return arguments.length?(t=typeof T=="function"?T:zs([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),v):t},v.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],v):[o[0],o[1]]},v.translateExtent=function(T){return arguments.length?(s[0][0]=+T[0][0],s[1][0]=+T[1][0],s[0][1]=+T[0][1],s[1][1]=+T[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(T){return arguments.length?(n=T,v):n},v.duration=function(T){return arguments.length?(u=+T,v):u},v.interpolate=function(T){return arguments.length?(h=T,v):h},v.on=function(){var T=f.on.apply(f,arguments);return T===f?v:T}
37,v.clickDistance=function(T){return arguments.length?(E=(T=+T)*T,v):Math.sqrt(E)},v.tapDistance=function(T){return arguments.length?(H=+T,v):H},v}const kz={featureSelection:"Feature Selection",correlationAnalysis:"Correlation Analysis",applySelection:"Apply Selection",clearAll:"Clear All",colorLegend:"Color Legend",updateMap:"Update Map & Calculate Correlation",correlationResults:"Correlation Results",featureCorrelationMatrix:"Feature Correlation Matrix",gbGender:"Gender Features (Cyan)",gbClassifier:"Classifier Features (Orange)",value1Cyan:"Value = 1 (Cyan)",value0Blue:"Value = 0 (Light Blue)",naGray:"NA (Gray Border)",value1Orange:"Value = 1 (Orange)",value0Orange:"Value = 0 (Light Orange)",selectAll:"Select All",deselectAll:"Deselect All",selectedHint:"Selected ",chatTitle:"AI Assistant",send:"Send",suggestions:["What are the most important gender features?","Recommend features for social analysis","Show correlations between feature groups","Analyze geographical distribution","Propose a research question","Suggest analysis approaches"],apiKeyTitle:"Set Gemini API Key",apiKey:"API Key",apiKeyPlaceholder:"Please enter your Gemini API Key",apiKeyNote1:"⢠API Key is only saved in your local browser, not uploaded to server",apiKeyNote2:"⢠You can get a free API Key at ",apiKeyNote3:"⢠After setting, you can use the AI assistant feature",apiKeySave:"Save",apiKeyCancel:"Cancel",apiKeyDesc:"Instructions",apiKeyGet:"Google AI Studio",eaSocial:"D-PLACE Features (Social)",eaEcological:"D-PLACE Features (Ecological)",treeTitle:"Phylogenetic Tree Visualization",loadTree:"Load Tree",selectTree:"Select a tree file...",mapTitle:"Language Map",welcome:"Hello! I'm your AI language analysis assistant. I can help you analyze linguistic features, recommend analysis approaches, and provide insights about your dataset. Ask me anything about the language data!",langToggle:"䏿/English",gbFeatureType:"Grambank (GB) Feature",eaFeatureType:"D-PLACE Feature",dplaceFeatureType:"D-PLACE Feature",ecologicalFeatureType:"Environmental/Biodiversity Feature",otherFeatureType:"Other Feature",featureInfoTitle:"Feature Information",close:"Close",noDescription:"No description available for this feature.",featureType:"Feature Type",knowledgeBaseTitle:"ð Linguistic Knowledge Base",knowledgeBaseDesc:"Click on any concept to get AI explanation and connections to your data:",all:"All",typology:"Typology",universals:"Universals",areal:"Areal",methods:"Methods",correlation:"Correlation",phylogenetic:"Phylogenetic",spatial:"Spatial",sociolinguistics:"Sociolinguistics",ecolinguistics:"Ecolinguistics",historical:"Historical",low:"Low",medium:"Medium",high:"High",selected:"Selected",checkAI:"Check the AI Assistant for detailed explanation and connections to your data.",examples:"Examples",keyTheories:"Key Theories",relevance:"Relevance",useCase:"Use Case",category:"Category",complexity:"Complexity",aiExplanation:"AI Explanation",selectGroupsToAnalyze:"Select {type} to analyze:",languageFamily:"Language Family",region:"Region",macroarea:"Macro Area",selectedCount:"Selected: {count}",correlationMethodPearson:"Pearson Correlation",correlationMethodSpearman:"Spearman Rank Correlation",correlationMethodKendall:"Kendall's Tau",groupAnalysisType:"Group Analysis Type",groupAnalysisNone:"No Grouping (Overall Analysis)",groupAnalysisByFamily:"Group by Language Family",groupAnalysisByRegion:"Group by Region",groupAnalysisByMacroarea:"Group by Macro Area",groupCorrelationTitle:"Group Correlations ({method})",groupCorrelationTitleFallback:"Group Correlations",groupCorrelationSampleSize:"Sample size: {size} languages",groupedCorrelationTitle:"Grouped Correlation Analysis",groupedCorrelationByType:"Grouped by {type}",groupOverviewTitle:"Group Overview",sampleSize:"Sample size",sampleSizeTooSmall:"Sample size too small",languages:"languages",correlationMatrixTitle:"Correlation Matrix",vs:"vs",pValue:"p-value",groupDifferencesTitle:"Group Correlation Differences Analysis",compareCorrelationPatterns:"Compare correlation pattern differences between different {type}",cannotCalculateDifferences:"Cannot calculate differences (need at least 2 valid groups)",maxDifferencesTitle:"Maximum Difference Feature Pairs",featurePair:"Feature Pair",maxDifference:"Max Difference",groupsWithMaxDiff:"Groups with Max Difference",featureCorrelationTitle:"Feature Correlations",featureCorrelationSampleSize:"Sample size: {size} languages",clickToGetAIExplanation:"Click to get AI explanation of this correlation",calculating:"Calculating...",calculateCorrelations:"Calculate Correlations",dynamicFeatureSelectorTitle:"Dynamic Feature Selection",clearAllFeatures:"Clear All",selectAllGbFeatures:"All GB",selectAllEaFeatures:"All D-PLACE",selectedFeaturesCount:"Selected",gbFeatures:"GB features",eaFeatures:"D-PLACE features",hideSelector:"Hide",showSelector:"Show",searchGbPlaceholder:"Search GB features...",searchEaPlaceholder:"Search EA features...",loadingData:"Loading...",applyFeatures:"Apply Selection",selectAtLeastOneFeature:"Please select at least one feature first",noDataToDownload:"No data to download, please apply feature selection first",downloadDataError:"Error downloading data, please check console",downloadFormatError:"Error downloading {format} format data, please check console",loadFamilyMappingError:"Failed to load family mapping",dataModeTitle:"Data Mode",staticDataLabel:"Static Data (Preprocessed CSV)",dynamicDataLabel:"Dynamic Data (Real-time Database Query)",currentDataPoints:"Current data points: {count} languages",reloadData:"Reload Data",downloadStaticData:"Download Static Data",unavailableDownload:"Unavailable",chooseDownloadFormat:"Cho
37ose download format",csvFormat:"CSV",tsvFormat:"TSV",jsonFormat:"JSON",summaryFormat:"Summary",csvFormatDescription:"CSV format, Excel compatible",tsvFormatDescription:"TSV format, Excel friendly",jsonFormatDescription:"JSON format, good for program processing",summaryFormatDescription:"Data summary report",loadingDataMessage:"â³ Processing data...",downloadSuccess:"Successfully downloaded {count} rows of static data",smartFeatureRecommendationsTitle:"Feature Recommendation",aiSmartRecommendations:"AI Recommendations",enterResearchQuestionOrKeywords:"Enter research question or keywords...",generateRecommendations:"Generate",currentSelection:"Current Selection",successfullyAddedFeatures:"Successfully added {count} new features to selection!",databaseOverviewTitle:"Database Overview",grammarFeatures:"grammar features",socialCulturalFeatures:"social-cultural features",total:"Total",features:"features",researchIdeasTitle:"ð¬ Research Ideas",exploreThisIdea:"Explore This Idea",discoveredFeaturesTitle:"ð Discovered Features from Database",getAIExplanation:"Get AI Explanation",languageId:"Language ID",none:"none",sizeValue:"Size Value",na:"N/A",clickToSeeDetails:"Click to see details",doubleClickToGetAIExplanation:"Double click to get AI explanation",recommendedFeaturesTitle:"ð Recommended Features",hide:"Hide",browse:"Browse",showingRecommendedFeatures:"Showing {count} recommended features",generateRecommendationsError:"Failed to generate recommendations"},Tz={featureSelection:"ç¹å¾éæ©",correlationAnalysis:"ç¸å
³æ§åæ",applySelection:"åºç¨éæ©",clearAll:"å
¨é¨æ¸
é¤",colorLegend:"é¢è²å¾ä¾",updateMap:"æ´æ°å°å¾å¹¶è®¡ç®ç¸å
³æ§",correlationResults:"ç¸å
³æ§ç»æ",featureCorrelationMatrix:"ç¹å¾ç¸å
³æ§ç©éµ",gbGender:"æ§å«ç¹å¾ï¼éè²ï¼",gbClassifier:"åç±»è¯ç¹å¾ï¼æ©è²ï¼",value1Cyan:"å¼=1ï¼éè²ï¼",value0Blue:"å¼=0ï¼æµ
èï¼",naGray:"NAï¼ç°è¾¹ï¼",value1Orange:"å¼=1ï¼æ©è²ï¼",value0Orange:"å¼=0ï¼æµ
æ©ï¼",selectAll:"å
¨é",deselectAll:"å
¨ä¸é",selectedHint:"å·²é",chatTitle:"AI婿",send:"åé",suggestions:["æéè¦çæ§å«ç¹å¾æåªäºï¼","æ¨è社ä¼åæç¹å¾","å±ç¤ºç¹å¾ç»ç¸å
³æ§","åæå°çåå¸","æåºç ç©¶é®é¢","å»ºè®®åææ¹æ³"],apiKeyTitle:"设置 Gemini API Key",apiKey:"APIå¯é¥",apiKeyPlaceholder:"请è¾å
¥ä½ çGemini API Key",apiKeyNote1:"⢠API Keyåªä¿å卿¬å°æµè§å¨ï¼ä¸ä¼ä¸ä¼ å°æå¡å¨",apiKeyNote2:"â¢ ä½ å¯ä»¥å¨ ",apiKeyNote3:"⢠设置åå³å¯ä½¿ç¨AI婿åè½",apiKeySave:"ä¿å",apiKeyCancel:"åæ¶",apiKeyDesc:"说æ",apiKeyGet:"Google AI Studio",eaSocial:"D-PLACEç¹å¾ï¼ç¤¾ä¼ï¼",eaEcological:"D-PLACEç¹å¾ï¼çæï¼",treeTitle:"ç³»ç»åè²æ å¯è§å",loadTree:"å è½½æ ",selectTree:"è¯·éæ©æ æä»¶...",mapTitle:"è¯è¨å°å¾",welcome:"ä½ å¥½ï¼ææ¯ä½ çAIè¯è¨åæå©æãæå¯ä»¥å¸®å©ä½ åæè¯è¨ç¹å¾ãæ¨èåææ¹æ³ï¼å¹¶ä¸ºä½ çæ°æ®éæä¾è§è§£ã欢è¿éæ¶æé®ï¼",langToggle:"䏿/English",gbFeatureType:"Grambank (GB) ç¹å¾",eaFeatureType:"D-PLACE ç¹å¾",dplaceFeatureType:"D-PLACE ç¹å¾",ecologicalFeatureType:"ç¯å¢/çç©å¤æ ·æ§ç¹å¾",otherFeatureType:"å
¶ä»ç¹å¾",featureInfoTitle:"ç¹å¾ä¿¡æ¯",close:"å
³é",noDescription:"æ¤ç¹å¾ææ æè¿°ã",featureType:"ç¹å¾ç±»å",knowledgeBaseTitle:"ð è¯è¨å¦ç¥è¯åº",knowledgeBaseDesc:"ç¹å»ä»»ä½æ¦å¿µè·åAIè§£éåä¸å½åæ°æ®çå
³èï¼",all:"å
¨é¨",typology:"ç±»åå¦",universals:"æ®éæ§",areal:"åºå",methods:"æ¹æ³",correlation:"ç¸å
³æ§",phylogenetic:"ç³»ç»åè²",spatial:"空é´",sociolinguistics:"社ä¼è¯è¨å¦",ecolinguistics:"çæè¯è¨å¦",historical:"åå²",low:"ç®å",medium:"ä¸ç",high:"夿",selected:"已鿩",checkAI:"æ¥çAI婿è·å详ç»è§£éå䏿°æ®çå
³èã",examples:"ä¾å",keyTheories:"主è¦ç论",relevance:"ç¸å
³æ§",useCase:"ç¨é",category:"åç±»",complexity:"å¤æåº¦",aiExplanation:"AIè§£é",selectGroupsToAnalyze:"éæ©è¦åæç{type}:",languageFamily:"è¯ç³»",region:"å°åº",macroarea:"大åºå",selectedCount:"已鿩: {c
37ount}",correlationMethodPearson:"ç®å°éç¸å
³ç³»æ°",correlationMethodSpearman:"æ¯ç®å°æ¼ç级ç¸å
³ç³»æ°",correlationMethodKendall:"è¯å¾·å°ç级ç¸å
³ç³»æ°",groupAnalysisType:"åç»åæç±»å",groupAnalysisNone:"ä¸åç»ï¼æ´ä½åæï¼",groupAnalysisByFamily:"æè¯ç³»åç»",groupAnalysisByRegion:"æå°åºåç»",groupAnalysisByMacroarea:"æå¤§åºååç»",groupCorrelationTitle:"ç»é´ç¸å
³æ§ ({method})",groupCorrelationTitleFallback:"ç»é´ç¸å
³æ§",groupCorrelationSampleSize:"æ ·æ¬é: {size} è¯è¨",groupedCorrelationTitle:"åç»ç¸å
³æ§åæ",groupedCorrelationByType:"æ{type}åç»",groupOverviewTitle:"åç»æ¦è§",sampleSize:"æ ·æ¬é",sampleSizeTooSmall:"æ ·æ¬é太å°",languages:"è¯è¨",correlationMatrixTitle:"ç¸å
³æ§ç©éµ",vs:"vs",pValue:"på¼",groupDifferencesTitle:"åç»é´ç¸å
³æ§å·®å¼åæ",compareCorrelationPatterns:"æ¯è¾ä¸å{type}é´çç¸å
³æ§æ¨¡å¼å·®å¼",cannotCalculateDifferences:"æ æ³è®¡ç®å·®å¼ï¼éè¦è³å°2个ææåç»ï¼",maxDifferencesTitle:"æå¤§å·®å¼ç¹å¾å¯¹",featurePair:"ç¹å¾å¯¹",maxDifference:"æå¤§å·®å¼",groupsWithMaxDiff:"差弿大çåç»",featureCorrelationTitle:"ç¹å¾ç¸å
³æ§",featureCorrelationSampleSize:"æ ·æ¬é: {size} è¯è¨",clickToGetAIExplanation:"ç¹å»è·åAIè§£é",calculating:"计ç®ä¸...",calculateCorrelations:"计ç®ç¸å
³æ§",dynamicFeatureSelectorTitle:"卿ç¹å¾éæ©",clearAllFeatures:"æ¸
餿æ",selectAllGbFeatures:"å
¨éGB",selectAllEaFeatures:"å
¨éD-PLACE",selectedFeaturesCount:"已鿩",gbFeatures:"个GBç¹å¾",eaFeatures:"个D-PLACEç¹å¾",hideSelector:"éè",showSelector:"æ¾ç¤º",searchGbPlaceholder:"æç´¢GBç¹å¾...",searchEaPlaceholder:"æç´¢EAç¹å¾...",loadingData:"å è½½ä¸...",applyFeatures:"åºç¨éæ©",selectAtLeastOneFeature:"请å
éæ©è³å°ä¸ä¸ªç¹å¾",noDataToDownload:"没æå¯ä¸è½½çæ°æ®ï¼è¯·å
åºç¨ç¹å¾éæ©",downloadDataError:"ä¸è½½æ°æ®æ¶åºéï¼è¯·æ£æ¥æ§å¶å°",downloadFormatError:"ä¸è½½{format}æ ¼å¼æ°æ®æ¶åºéï¼è¯·æ£æ¥æ§å¶å°",loadFamilyMappingError:"å è½½è¯ç³»æ å°å¤±è´¥",dataModeTitle:"æ°æ®æ¨¡å¼",staticDataLabel:"éææ°æ® (é¢å¤ççCSV)",dynamicDataLabel:"å¨ææ°æ® (宿¶æ¥è¯¢æ°æ®åº)",currentDataPoints:"å½åæ°æ®ç¹: {count} 个è¯è¨",reloadData:"éæ°å è½½æ°æ®",downloadStaticData:"ä¸è½½éææ°æ®",unavailableDownload:"ä¸å¯ä¸è½½",chooseDownloadFormat:"éæ©ä¸è½½æ ¼å¼",csvFormat:"CSV",tsvFormat:"TSV",jsonFormat:"JSON",summaryFormat:"æè¦",csvFormatDescription:"CSVæ ¼å¼ï¼å
¼å®¹Excel",tsvFormatDescription:"TSVæ ¼å¼ï¼Excelå好",jsonFormatDescription:"JSONæ ¼å¼ï¼ä¾¿äºç¨åºå¤ç",summaryFormatDescription:"æ°æ®æè¦æ¥å",loadingDataMessage:"â³ æ£å¨å¤çæ°æ®...",downloadSuccess:"æåä¸è½½ {count} è¡éææ°æ®",smartFeatureRecommendationsTitle:"ç¹å¾æ¨è",aiSmartRecommendations:"AIæºè½æ¨è",enterResearchQuestionOrKeywords:"è¾å
¥ç ç©¶é®é¢æå
³é®è¯...",generateRecommendations:"çææ¨è",currentSelection:"å½åéæ©",successfullyAddedFeatures:"æåæ·»å äº {count} 个æ°ç¹å¾å°éæ©ä¸ï¼",databaseOverviewTitle:"æ°æ®åºæ¦è§",grammarFeatures:"ä¸ªè¯æ³ç¹å¾",socialCulturalFeatures:"ä¸ªç¤¾ä¼æåç¹å¾",total:"æ»è®¡",features:"个ç¹å¾",researchIdeasTitle:"ð¬ ç 究建议",exploreThisIdea:"æ¢ç´¢è¿ä¸ªæ³æ³",discoveredFeaturesTitle:"ð 仿°æ®åºä¸åç°çç¹å¾",getAIExplanation:"è·åAIè§£é",languageId:"è¯è¨ID",none:"æ ",sizeValue:"大å°å¼",na:"N/A",clickToSeeDetails:"ç¹å»æ¥ç详æ
",doubleClickToGetAIExplanation:"åå»è·åAIè§£é",recommendedFeaturesTitle:"ð æ¨èç¹å¾",hide:"éè",browse:"æµè§",showingRecommendedFeatures:"æ¾ç¤º{count}个æ¨èç¹å¾",generateRecommendationsError:"çææ¨è失败"},aa=["GB030","GB051","GB052","GB053","GB054","GB170","GB171","GB172","GB177","GB192","GB198","GB314","GB315","GB321"],ai=["GB038","GB057","GB058"],Ny=["EA044","EA045","EA046","EA047","EA048","EA049","EA050","EA051","EA052","EA053","EA054","EA066","EA067","EA030","EA031","EA032","EA033","AmphibianRichness","BirdRichness","MammalRichness","VascularPlantsRichness"],Cs={gender:{name:"Gender Features",features:aa,color:"cyan"},classifier:{name:"Classifier Features",features:ai,color:"orange"},social:{name:"EA Social Features",features:Ny.filter(e=>e.startsWith("EA")&&!e.includes("Richness")),color:"blue"},ecological:{name:"EA Ecological Features",features:Ny.filter(e=>e.includes("Richness")),color:"green"}};let eu=null,tu=null,nu=null,iu=null,au=null,ru=null,ou=null,lu=null,su=null;async function Ez(){if(eu)return eu;
37try{const t=await(await fetch("grambank-grambank-7ae000c/cldf/languages.csv")).text(),i=mt(t).map(a=>({id:a.ID,name:a.Name,glottocode:a.Glottocode,family:a.Family_level_ID,macroarea:a.Macroarea,latitude:parseFloat(a.Latitude)||0,longitude:parseFloat(a.Longitude)||0})).filter(a=>a.glottocode&&a.latitude&&a.longitude);return eu=i,i}catch(e){return console.error("Failed to load Grambank languages:",e),[]}}async function Az(){if(tu)return tu;try{const t=await(await fetch("dplace-cldf/cldf/societies.csv")).text(),i=mt(t).map(a=>({id:a.ID,name:a.Name,glottocode:a.Glottocode,latitude:parseFloat(a.Latitude)||0,longitude:parseFloat(a.Longitude)||0,region:a.region,type:a.type})).filter(a=>a.glottocode&&a.latitude&&a.longitude);return tu=i,i}catch(e){return console.error("Failed to load D-PLACE societies:",e),[]}}async function zz(){if(nu)return nu;try{const t=await(await fetch("grambank-grambank-7ae000c/cldf/values.csv")).text(),n=mt(t),i={};return n.forEach(a=>{a.Language_ID&&a.Parameter_ID&&a.Value!==void 0&&a.Value!==""&&a.Value!=="NA"&&(i[a.Language_ID]||(i[a.Language_ID]={}),i[a.Language_ID][a.Parameter_ID]=a.Value)}),nu=i,i}catch(e){return console.error("Failed to load Grambank values:",e),{}}}async function Cz(){if(iu)return iu;try{const t=await(await fetch("dplace-cldf/cldf/data.csv")).text(),n=mt(t),i={};return n.forEach((a,o)=>{if(a.Society_ID&&a.Var_ID&&(a.Value!==void 0&&a.Value!==""||a.Code_ID)){i[a.Society_ID]||(i[a.Society_ID]={});let s;a.Code_ID?s=a.Code_ID.replace(a.Var_ID+"-",""):a.Value!==void 0&&a.Value!==""&&(s=a.Value),s!==void 0&&(i[a.Society_ID][a.Var_ID]=s)}}),iu=i,i}catch(e){return console.error("Failed to load D-PLACE values:",e),{}}}async function Kv(){if(au)return au;try{const t=await(await fetch("grambank-grambank-7ae000c/cldf/parameters.csv")).text(),i=mt(t).map(a=>({id:a.ID,name:a.Name,description:a.Description||""}));return au=i,i}catch(e){return console.error("Failed to load Grambank parameters:",e),[]}}async function Xv(){if(ru)return ru;try{const t=await(await fetch("dplace-cldf/cldf/variables.csv")).text(),i=mt(t).map(a=>({id:a.ID,name:a.Name,description:a.Description||"",type:a.type||"Unknown",category:a.category||"",unit:a.unit||""}));return ru=i,i}catch(e){return console.error("Failed to load D-PLACE variables:",e),[]}}async function Lz(){if(ou)return ou;try{const t=await(await fetch("cldf-datasets-wals-014143f/cldf/languages.csv")).text(),i=mt(t).map(a=>({id:a.ID,name:a.Name,glottocode:a.Glottocode,family:a.Family,macroarea:a.Macroarea,latitude:parseFloat(a.Latitude)||0,longitude:parseFloat(a.Longitude)||0})).filter(a=>a.latitude&&a.longitude);return ou=i,i}catch(e){return console.error("Failed to load WALS languages:",e),[]}}async function Dz(){if(lu)return lu;try{const t=await(await fetch("cldf-datasets-wals-014143f/cldf/values.csv")).text(),n=mt(t),i={};return n.forEach(a=>{a.Language_ID&&a.Parameter_ID&&a.Value!==void 0&&a.Value!==""&&a.Value!=="NA"&&(i[a.Language_ID]||(i[a.Language_ID]={}),i[a.Language_ID][a.Parameter_ID]=a.Code_ID||a.Value)}),lu=i,i}catch(e){return console.error("Failed to load WALS values:",e),{}}}async function Wv(){if(su)return su;try{const t=await(await fetch("cldf-datasets-wals-014143f/cldf/parameters.csv")).text(),n=mt(t),i={};return n.forEach(a=>{a.ID&&(i[a.ID]={id:a.ID,name:a.Name,description:a.Description||a.Name,area:a.Area,chapter:a.Chapter})}),su=i,i}catch(e){return console.error("Failed to load WALS parameters:",e),{}}}async function Mz(e,t,n=[],i="intersection"){try{const[a,o,s,u,h,f,d,m,g]=await Promise.all([Ez(),Az(),Lz(),zz(),Cz(),Dz(),Kv(),Xv(),Wv()]),x={};o.forEach(D=>{D.glottocode&&(x[D.glottocode]||(x[D.glottocode]=[]),x[D.glottocode].push(D))});const b={},E={};s.forEach(D=>{D.id&&(b[D.id]=D.glottocode,D.glottocode&&(E[D.glottocode]||(E[D.glottocode]=[]),E[D.glottocode].push(D.id)))});const H=[];let v=0,w=0,A=0;return a.forEach(D=>{var U,T,N,C;v++;const G=u[D.glottocode]||{},j=x[D.glottocode]||[];let Z=!1;e.length>0&&(i==="intersection"?Z=e.every(F=>{const M=G[F];return M!==void 0&&M!=="NA"&&M!==null&&M!==""}):Z=e.some(F=>{const M=G[F];return M!==void 0&&M!=="NA"&&M!==null&&M!==""}));let Y=!1,q={};const te=E[D.glottocode]||[];n.length>0&&te.length>0&&(i==="intersection"?n.every(M=>te.some(V=>{const Q=(f[V]||{})[M];return Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""}
37))&&(Y=!0,n.forEach(M=>{for(const V of te){const Q=(f[V]||{})[M];if(Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""){q[M]=Q;break}}})):n.some(M=>te.some(V=>{const Q=(f[V]||{})[M];return Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""}))&&(Y=!0,n.forEach(M=>{for(const V of te){const Q=(f[V]||{})[M];if(Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""){q[M]=Q;break}}})));let $=!1,O={};if(t.length>0&&j.length>0?i==="intersection"?t.every(M=>j.some(V=>{const Q=(h[V.id]||{})[M];return Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""}))?($=!0,t.forEach(M=>{for(const V of j){const Q=(h[V.id]||{})[M];if(Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""){O[M]=Q;break}}})):w++:t.some(M=>j.some(V=>{const Q=(h[V.id]||{})[M];return Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""}))?($=!0,t.forEach(M=>{for(const V of j){const Q=(h[V.id]||{})[M];if(Q!==void 0&&Q!=="NA"&&Q!==null&&Q!==""){O[M]=Q;break}}})):w++:t.length>0&&($=!1,w++),e.length>0&&!Z&&w++,i==="intersection"){const F=e.length===0||Z,M=t.length===0||$,V=n.length===0||Y;if(F&&M&&V){const Q={Language_ID:D.glottocode,Name:D.name,Latitude:D.latitude,Longitude:D.longitude,Family_level_ID:D.family,Macroarea:D.macroarea,region:((U=j[0])==null?void 0:U.region)||"",Soc_ID:((T=j[0])==null?void 0:T.id)||""};e.forEach(ie=>{const z=G[ie];z!==void 0&&z!=="NA"&&z!==null&&z!==""?Q[ie]=z:Q[ie]="NA"}),t.forEach(ie=>{const z=O[ie];z!==void 0&&z!=="NA"&&z!==null&&z!==""?Q[ie]=z:Q[ie]="NA"}),n.forEach(ie=>{const z=q[ie];z!==void 0&&z!=="NA"&&z!==null&&z!==""?Q[ie]=z:Q[ie]="NA"}),H.push(Q),A++}}else if(Z||$||Y){const F={Language_ID:D.glottocode,Name:D.name,Latitude:D.latitude,Longitude:D.longitude,Family_level_ID:D.family,Macroarea:D.macroarea,region:((N=j[0])==null?void 0:N.region)||"",Soc_ID:((C=j[0])==null?void 0:C.id)||""};e.forEach(M=>{const V=G[M];V!==void 0&&V!=="NA"&&V!==null&&V!==""?F[M]=V:F[M]="NA"}),t.forEach(M=>{const V=O[M];V!==void 0&&V!=="NA"&&V!==null&&V!==""?F[M]=V:F[M]="NA"}),n.forEach(M=>{const V=q[M];V!==void 0&&V!=="NA"&&V!==null&&V!==""?F[M]=V:F[M]="NA"}),H.push(F),A++}}),H}catch(a){return console.error("Error building dynamic data:",a),[]}}async function Nz(){const[e,t,n]=await Promise.all([Kv(),Xv(),Wv()]),i={};return e.forEach(a=>{i[a.id]={name:a.name,description:a.description}}),t.forEach(a=>{i[a.id]={name:a.name,description:a.description,type:a.type,category:a.category,unit:a.unit}}),Object.values(n).forEach(a=>{i[a.id]={name:a.name,description:a.description,area:a.area,chapter:a.chapter}}),i}function Ry(){eu=null,tu=null,nu=null,iu=null,au=null,ru=null,ou=null,lu=null,su=null}const Ut=ee.createContext(),Rz={en:kz,zh:Tz},Oz=({children:e})=>{const[t,n]=ee.useState([]),[i,a]=ee.useState([]),[o,s]=ee.useState({}),[u,h]=ee.useState({}),[f,d]=ee.useState([...aa,...ai]),[m,g]=ee.useState([]),[x,b]=ee.useState([]),[E,H]=ee.useState({}),[v,w]=ee.useState({}),[A,D]=ee.useState({}),[G,j]=ee.useState(!0),[Z,Y]=ee.useState("en"),[q,te]=ee.useState(!1),[$,O]=ee.useState({visible:!1,featureId:null}),[U,T]=ee.useState([]),[N,C]=ee.useState(null),[F,M]=ee.useState([]),[V,k]=ee.useState({}),[Q,ie]=ee.useState("intersection");ee.useEffect(()=>{if(!t||t.length===0){a([]);return}if(!N||N.length===0)a(t);else{const ve=t.filter(R=>{const ce=R.Glottocode||R.glottocode||R.Language_ID;return ce&&N.includes(ce)});a(ve)}},[t,N]),ee.useEffect(()=>{const ve={};[...aa,...ai].forEach(R=>{ve[R]=1}),H(ve)},[]),ee.useEffect(()=>{const ve={};m.forEach(R=>{v[R]||(ve[R]=1)}),Object.keys(ve).length>0&&w(R=>({...R,...ve}))},[m,v]);const z=async()=>{j(!0);try{const ve=await Mz(f,m,x,Q),R={};ve.forEach(ce=>{ce.Name&&ce.Language_ID&&(R[ce.Name]=ce.Language_ID)}),n(ve),s(R)}catch(ve){console.error("Error loading dynamic data:",ve),n([]),s({})}finally{j(!1)}},ye=async()=>{j(!0);try{const R=await(await fetch("data_gb_dplace_edge.csv")).text(),ce=mt(R);let Me={};try{const Se=await(await fetch("grambank-grambank-7ae000c/cldf/languages.csv")).text();mt(Se).forEach(he=>{he.Glottocode&&he.Name&&(Me[he.Glottocode]=he.Name)});const De=await(await fetch("dplace-cldf/cldf/societies.csv")).text();mt(De).forEach(he=>{he.Glottocode&&he.Name&&!Me[he.Glottocode]&&(Me[he.Glottocode]=he.Name)})}catch{console.warn("Could not load language names, using Language_ID as fallback")}const we={};ce.forEach(ke=>{ke.Latitude=parseFloat(ke.Latitude),ke.Longitude=parseFloat(ke.Longitude),ke.Language_ID&&(Me[ke.Language_ID]?ke.Name=Me[ke.Language_ID]:ke.Name=ke.Language_ID,ke.Name&&ke.Language_ID&&(we[ke.Name]=ke.Language_ID))}),n(ce),s(we)}catch{n([]),s({})}finally{j(!1)}};ee.useEffect(()=>{q?z():ye()},[q]),ee.useEffect(()=>{q&&z()},[f,m,x,q,Q]),ee.useEffect(()=>{async function ve(){if(q){const R=await Nz();h(R)}else{const R={};try{const Me=await(await fetch("grambank-grambank-7ae000c/cldf/parameters.csv")).text();mt(Me).forEach(he=>{he.ID&&he.Name&&he.Description&&(R[he.ID]={name:he.Name,description:he.Description})});const Se=await(await fetch("dplace-cldf/cldf/variables.csv")).text();mt(Se).forEach(he=>{he.ID&&he.Name&&(R[he.ID]||(R[he.ID]={name:he.Name,description:he.Description||"",type:he.type||"Unknown",category:he.category||"",unit:he.unit||""}))});const De=await(await fetch("cldf-datasets-wals-014143f/cldf/parameters.csv")).text();mt(De).forEach(he=>{he.ID&&he.Name&&(R[he.ID]||(R[he.ID]={name:he.Name,description:he.Description||he.Name,area:he.Area,chapter:he.Chapter}))}),h(R)}catch(ce){console.error("Failed to load feature descriptions:",ce),h({})}}}ve()},[q]);const Re={languageData:t,filteredLanguageData:i,languageMapping:o,featureDescriptions:u,selectedGBFeatures:f,setSelectedGBFeatures:d,selectedEAFeatures:m,setSelectedEAFeatures:g,selectedWALSFeatures:x,setSelectedWALSFeatures:b,gbWeights:E,setGbWeights:H,eaWeights:v,setEaWeights:w,walsWeights:A,setWalsWeights:D,loading:G,lang:Z,setLang:Y,langs:Rz,useDynamicData:q,toggleDataMode:()=>{te(!q),q&&Ry()},reloadData:()=>{q?(Ry(),z()):ye()},featureInfoModal:$,showFeatureInfo:ve=>{O({visible:!0,featureId:ve})},hideFeatureInfo:()=>{O({visible:!1,featureId:null})},highlightedLanguages:U,setHighlightedLanguages:T,languageFilter:N,setLanguageFilter:C,featureFilterMode:Q,setFeatureFilterMode:ie,dorecoHighlightedLanguages:F,setDorecoHighlightedLanguages:M,categoricalFilters:V,setCategoricalFilters:k};return y.jsx(Ut.Provider,{value:Re,children:e})},jz=()=>{const{featureDescriptions:e,selectedGBFeatures:t,setSelectedGBFeatures:n,selectedEAFeatures:i,setSelectedEAFeatures:a,selectedWALSFeatures:o,setSelectedWALSFeatures:s,gbWeights:u,setGbWeights:h,eaWeights:f,setEaWeights:d,walsWeights:m,setWalsWeights:g,showFeatureInfo:x,lang:b,langs:E,featureFilterMode:H,setFeatureFilterMode:v}=ee.useContext(Ut);ee.useEffect(()=>{const O={},U={};
37[...aa,...ai].forEach(T=>{O[T]=1}),[...Cs.social.features,...Cs.ecological.features].forEach(T=>{U[T]=""}),h(O),d(U)},[]);const w=(O,U)=>{const T=new Set(t);U?(T.add(O),h(N=>({...N,[O]:N[O]||1}))):(T.delete(O),h(N=>({...N,[O]:""}))),n(Array.from(T))},A=(O,U)=>{const T=parseFloat(U);if(h(N=>({...N,[O]:U})),T>0){const N=new Set(t);N.add(O),n(Array.from(N))}else{const N=new Set(t);N.delete(O),n(Array.from(N))}},D=(O,U)=>{const T=new Set(i);U?(T.add(O),d(N=>({...N,[O]:N[O]||1}))):(T.delete(O),d(N=>({...N,[O]:""}))),a(Array.from(T))},G=(O,U)=>{const T=parseFloat(U);if(d(N=>({...N,[O]:U})),T>0){const N=new Set(i);N.add(O),a(Array.from(N))}else{const N=new Set(i);N.delete(O),a(Array.from(N))}},j=O=>{if(window.explainFeature){const U=e[O],T={id:O,name:(U==null?void 0:U.name)||O,description:(U==null?void 0:U.description)||"æ æè¿°",database:O.startsWith("GB")?"Grambank":"D-PLACE",type:"linguistic_feature"};window.explainFeature(T)}},Z=(O,U)=>{const T=O==="gender"?aa:ai,N=new Set(t),C={...u};T.forEach(F=>{U?(N.add(F),C[F]=1):(N.delete(F),C[F]="")}),n(Array.from(N)),h(C)},Y=(O,U)=>{const T=Cs[O].features,N=new Set(i),C={...f};T.forEach(F=>{U?(N.add(F),C[F]=1):(N.delete(F),C[F]="")}),a(Array.from(N)),d(C)},q=(O,U)=>{O.preventDefault(),O.stopPropagation(),x(U)},te=O=>{const U=O==="gender"?aa:ai,T=U.filter(N=>t.includes(N)).length;return y.jsxs("div",{className:"feature-group",children:[y.jsx("h4",{children:O==="gender"?E[b].gbGender:E[b].gbClassifier}),y.jsxs("div",{style:{marginBottom:"8px",display:"flex",alignItems:"center",gap:"8px"},children:[y.jsx("button",{onClick:()=>Z(O,!0),style:{padding:"4px 8px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"11px"},children:E[b].selectAll}),y.jsx("button",{onClick:()=>Z(O,!1),style:{padding:"4px 8px",background:"#666",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"11px"},children:E[b].deselectAll}),y.jsxs("span",{style:{fontSize:"11px",color:"#666"},children:[E[b].selectedHint,T,"/",U.length]})]}),y.jsx("div",{style:{maxHeight:"120px",overflowY:"auto",border:"1px solid #ddd",padding:"8px",borderRadius:"4px",background:"#f9f9f9"},children:U.map(N=>{var C;return y.jsxs("div",{className:"feature-checkbox",style:{marginBottom:"4px"},children:[y.jsx("input",{type:"checkbox",id:`gb_${N}`,"data-feature":N,"data-type":O,checked:t.includes(N),onChange:F=>w(N,F.target.checked),style:{marginRight:"5px"}}),y.jsx("label",{htmlFor:`gb_${N}`,style:{cursor:"help",fontSize:"11px",marginRight:"5px"},"data-feature":N,title:`${((C=e[N])==null?void 0:C.description)||N} 38 39ç¹å»æ¥ç详æ `,onClick:F=>q(F,N),children:N}),y.jsx("button",{onClick:F=>{F.preventDefault(),F.stopPropagation(),j(N)},style:{padding:"2px 6px",background:"#007bff",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px",marginLeft:"4px"},title:E[b].aiExplanation||"AIè§£é",children:"ð¤"}),y.jsx("input",{type:"number",className:"weight-input","data-weight":N,value:u[N]||"",onChange:F=>A(N,F.target.value),min:"0",max:"10",step:"0.1",style:{width:"50px",marginLeft:"5px",fontSize:"11px"}})]},N)})})]})},$=O=>{const U=Cs[O].features,T=U.filter(N=>i.includes(N)).length;return y.jsxs("div",{className:"feature-group",children:[y.jsx("h4",{children:O==="social"?E[b].eaSocial:E[b].eaEcological}),y.jsxs("div",{style:{marginBottom:"8px",display:"flex",alignItems:"center",gap:"8px"},children:[y.jsx("button",{onClick:()=>Y(O,!0),style:{padding:"4px 8px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"11px"},children:E[b].selectAll}),y.jsx("button",{onClick:()=>Y(O,!1),style:{padding:"4px 8px",background:"#666",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"11px"},children:E[b].deselectAll}),y.jsxs("span",{style:{fontSize:"11px",color:"#666"},children:[E[b].selectedHint,T,"/",U.length]})]}),y.jsx("div",{style:{maxHeight:"120px",overflowY:"auto",border:"1px solid #ddd",padding:"8px",borderRadius:"4px",background:"#f9f9f9"},children:U.map(N=>{var C;return y.jsxs("div",{className:"feature-checkbox",style:{marginBottom:"4px"},children:[y.jsx("input",{type:"checkbox",id:`ea_${N}`,"data-feature":N,"data-type":O,checked:i.includes(N),onChange:F=>D(N,F.target.checked),style:{marginRight:"5px"}}),y.jsx("label",{htmlFor:`ea_${N}`,style:{cursor:"help",fontSize:"11px",marginRight:"5px"},"data-feature":N,title:`${((C=e[N])==null?void 0:C.description)||N} 40 41ç¹å»æ¥ç详æ `,onClick:F=>q(F,N),children:N}),y.jsx("button",{onClick:F=>{F.preventDefault(),F.stopPropagation(),j(N)},style:{padding:"2px 6px",background:"#007bff",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px",marginLeft:"4px"},title:E[b].aiExplanation||"AIè§£é",children:"ð¤"}),y.jsx("input",{type:"number",className:"weight-input","data-weight":N,value:f[N]||"",onChange:F=>G(N,F.target.value),min:"0",max:"10",step:"0.1",style:{width:"50px",marginLeft:"5px",fontSize:"11px"}})]},N)})})]})};return y.jsxs("div",{className:"chart-container",children:[y.jsx("div",{className:"chart-title",children:E[b].featureSelection}),y.jsxs("div",{style:{fontSize:"12px",color:"#666",marginBottom:"8px",padding:"4px",background:"#f0f0f0",borderRadius:"4px"},children:["已鿩: GBç¹å¾(",t.length,") D-PLACEç¹å¾(",i.length,") WALSç¹å¾(",o.length,")",t.length>0&&y.jsxs("div",{style:{marginTop:"4px",fontSize:"10px"},children:["GB: ",t.slice(0,5).join(", "),t.length>5?"...":""]}),i.length>0&&y.jsxs("div",{style:{marginTop:"2px",fontSize:"10px"},children:["D-PLACE: ",i.slice(0,5).join(", "),i.length>5?"...":""]}),o.length>0&&y.jsxs("div",{style:{marginTop:"2px",fontSize:"10px"},children:["WALS: ",o.slice(0,5).join(", "),o.length>5?"...":""]})]}),y.jsxs("div",{style:{marginBottom:"12px",padding:"8px",background:"#f8f9fa",borderRadius:"4px",border:"1px solid #dee2e6"},children:[y.jsxs("div",{style:{fontSize:"12px",fontWeight:"bold",marginBottom:"6px",color:"#495057"},children:[b==="zh"?"ç鿍¡å¼":"Filter Mode",":"]}),y.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[y.jsx("button",{onClick:()=>v("intersection"),style:{padding:"6px 12px",background:H==="intersection"?"#2c7c6c":"#6c757d",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"11px",fontWeight:"bold"},children:b==="zh"?"交é (ææç¹å¾)":"Intersection (All Features)"}),y.jsx("button",{onClick:()=>v("union"),style:{padding:"6px 12px",background:H==="union"?"#2c7c6c":"#6c757d",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"11px",fontWeight:"bold"},children:b==="zh"?"å¹¶é (ä»»æç¹å¾)":"Union (Any Feature)"})]}),y.jsx("div",{style:{fontSize:"10px",color:"#6c757d",marginTop:"4px"},children:H==="intersection"?b==="zh"?"è¯è¨å¿ é¡»æ¥æææéä¸ç¹å¾çæ°æ®ï¼GBåEAç¹å¾é½é满足ï¼":"Languages must have data for ALL selected features (both GB and EA features required)":b==="zh"?"è¯è¨åªéæ¥æä»»æä¸ä¸ªéä¸ç¹å¾çæ°æ®ï¼GBåEAç¹å¾ä¹é´ä¹æ¯åå¹¶éï¼":"Languages need data for ANY selected feature (union between GB and EA features)"})]}),y.jsxs("div",{className:"feature-selector",children:[$("social"),$("ecological"),y.jsxs("div",{className:"feature-group",style:{marginTop:20,borderTop:"1px solid #eee",paddingTop:20},children:[y.jsx("h4",{children:"GB Features Selection"}),y.jsxs("div",{style:{display:"flex",gap:"20px"},children:[y.jsx("div",{style:{flex:1},children:te("gender")}),y.jsx("div",{style:{flex:1},children:te("classifier")})]}),y.jsxs("div",{style:{marginTop:15,paddingTop:15,borderTop:"1px solid #eee"},children:[y.jsx("h5",{style:{margin:"0 0 10px 0",fontSize:"12px",color:"#666"},children:E[b].colorLegend}),y.jsxs("div",{style:{display:"flex",gap:"20px",fontSize:"11px"},children:[y.jsxs("div",{style:{flex:1},children:[y.jsxs("div",{style:{marginBottom:"3px"},children:[y.jsx("div",{style:{display:"inline-block",width:"10px",height:"10px",background:"rgba(0, 188, 212, 1)",marginRight:"6px"}}),y.jsx("span",{children:E[b].value1Cyan})]}),y.jsxs("div",{style:{marginBottom:"3px"},children:[y.jsx("div",{style:{display:"inline-block",width:"10px",height:"10px",background:"rgba(173, 216, 230, 0.4)",marginRight:"6px"}}),y.jsx("span",{children:E[b].value0Blue})]}),y.jsxs("div",{style:{marginBottom:"3px"},children:[y.jsx("div",{style:{display:"inline-block",width:"10px",height:"10px",background:"rgba(0, 0, 0, 0)",border:"1px solid rgba(200, 200, 200, 0.5)",marginRight:"6px"}}),y.jsx("span",{children:E[b].naGray})]})]}),y.jsxs("div",{style:{flex:1},children:[y.jsxs("div",{style:{marginBottom:"3px"},children:[y.jsx("div",{style:{display:"inline-block",width:"10px",height:"10px",background:"rgba(255, 140, 0, 1)",marginRight:"6px"}}),y.jsx("span",{children:E[b].value1Orange})]}),y.jsxs("div",{style:{marginBottom:"3px"},children:[y.jsx("div",{style:{display:"inline-block",width:"10px",height:"10px",background:"rgba(255, 165, 0, 0.2)",marginRight:"6px"}}),y.jsx("span",{children:E[b].value0Orange})]}),y.jsxs("div",{style:{marginBottom:"3px"},children:[y.jsx("div",{style:{display:"inline-block",width:"10px",height:"10px",background:"rgba(0, 0, 0, 0)",border:"1px solid rgba(200, 200, 200, 0.5)",marginRight:"6px"}}),y.jsx("span",{children:E[b].naGray})]})]})]})]})]}),(t.length>0||i.length>0)&&y.jsxs("div",{className:"feature-group newly-selected-features",style:{marginTop:20,borderTop:"1px solid #eee",paddingTop:20},children:[y.jsxs("h4",{children:["ð¯ ",E[b].newlySelectedFeatures||"Newly Selected Features"]}),t.length>0&&y.jsxs("div",{style:{marginBottom:20},children:[y.jsxs("h5",{children:["ðµ ",E[b].grambankFeatures||"Grambank Features"," (",t.length,")"]}),y.jsx("div",{className:"features-grid",children:t.map(O=>{var U;return y.jsxs("div",{className:"feature-item",children:[y.jsxs("div",{className:"feature-info",children:[y.jsx("div",{className:"feature-id",children:O}),y.jsx("div",{className:"feature-name",children:((U=e[O])==null?void 0:U.name)||O})]}),y.jsxs("div",{className:"feature-actions",children:[y.jsx("button",{onClick:()=>j(O),className:"ai-explain-btn",title:E[b].aiExplanation||"AIè§£é",children:"ð¤"}),y.jsx("button",{onClick:()=>{const T=t.filter(N=>N!==O);n(T),h(N=>({...N,[O]:""}))},className:"remove-feature-btn",title:E[b].removeFeature||"ç§»é¤ç¹å¾",children:"â"})]})]},O)})})]}),i.length>0&&y.jsxs("div",{children:[y.jsxs("h5",{children:["ð ",E[b].dplaceFeatures||"D-PLACE Features"," (",i.length,")"]}),y.jsx("div",{className:"features-grid",children:i.map(O=>{var U;return y.jsxs("div",{className:"feature-item",children:[y.jsxs("div",{className:"feature-info",children:[y.jsx("div",{className:"feature-id",children:O}),y.jsx("div",{className:"feature-name",children:((U=e[O])==null?void 0:U.name)||O})]}),y.jsxs("div",{className:"feature-actions",children:[y.jsx("button",{onClick:()=>j(O),className:"ai-explain-btn",title:E[b].aiExplanation||"AIè§£é",children:"ð¤"}),y.jsx("button",{onClick:()=>{const T=i.filter(N=>N!==O);a(T),d(N=>({...N,[O]:""}))},className:"remove-feature-btn",title:E[b].removeFeature||"ç§»é¤ç¹å¾",children:"â"})]})]},O)})})]}),o.length>0&&y.jsxs("div",{children:[y.jsxs("h5",{children:["ð¢ WALS Features (",o.length,")"]}),y.jsx("div",{className:"features-grid",children:o.map(O=>{var U;return y.jsxs("div",{className:"feature-item",children:[y.jsxs("div",{className:"feature-info",children:[y.jsx("div",{className:"feature-id",children:O}),y.jsx("div",{className:"feature-name",children:((U=e[O])==null?void 0:U.name)||O})]}),y.jsxs("div",{className:"feature-actions",children:[y.jsx("button",{onClick:()=>j(O),className:"ai-explain-btn",title:E[b].aiExplanation||"AIè§£é",children:"ð¤"}),y.jsx("button",{onClick:()=>{const T=o.filter(N=>N!==O);s(T),g(N=>({...N,[O]:""}))},className:"remove-feature-btn",title:E[b].removeFeature||"ç§»é¤ç¹å¾",children:"â"})]})]},O)})})]})]})]})]})},bc={baseURL:{}.VITE_API_BASE_URL||"https://yutong-yang-globalmosaic-backend.hf.space",timeout:3e4,headers:{"Content-Type":"application/json"},upload:{maxFileSize:50*1024*1024,allowedTypes:["pdf","docx","txt"],chunkSize:1024*1024},retry:{maxRetries:3,retryDelay:1e3,retryStatusCodes:[408,429,500,502,503,504]}},vn={knowledgeBase:{init:"/api/init",info:"/api/info",status:"/api/status",search:"/api/search",addDocument:"/api/add-document",uploadPaper:"/api/upload-paper",addDocumentsBatch:"/api/add-documents-batch",clear:"/api/clear",health:"/api/health",progress:"/api/progress",taskStatus:"/api/task-status",cancelTask:"/api/cancel-task"},featureRecommendation:"/api/feature-recommendation",geminiChat:"/api/gemini/chat",qianwenChat:"/api/qianwen/chat"};function Rn(e){return`${bc.baseURL}
41${e}`}function Bz(){return bc}function Pz(){return vn}function Fz(){return!1}function Iz(){return{isDev:!1,isProd:!0,mode:"production",baseURL:bc.baseURL,apiBaseURL:{}.VITE_API_BASE_URL}}const Qv=Object.freeze(Object.defineProperty({__proto__:null,API_CONFIG:bc,API_ENDPOINTS:vn,buildApiUrl:Rn,getApiConfig:Bz,getApiEndpoints:Pz,getEnvironmentInfo:Iz,isDevelopment:Fz},Symbol.toStringTag,{value:"Module"})),$z="modulepreload",Uz=function(e){return"/linguistic-data-visualization/"+e},Oy={},ki=function(t,n,i){if(!n||n.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Uz(o),o in Oy)return;Oy[o]=!0;const s=o.endsWith(".css"),u=s?'[rel="stylesheet"]':"";if(!!i)for(let d=a.length-1;d>=0;d--){const m=a[d];if(m.href===o&&(!s||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${u}`))return;const f=document.createElement("link");if(f.rel=s?"stylesheet":$z,s||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),s)return new Promise((d,m)=>{f.addEventListener("load",d),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};async function Jv(e=null){try{return{message:"ç®åç¥è¯åºå·²åå¤å°±ç»ª",type:"simple_kb"}}catch(t){throw console.error("åå§åç¥è¯åºå¤±è´¥:",t),t}}async function eb(){try{const e=await fetch(Rn(vn.knowledgeBase.info));if(!e.ok)throw new Error(`è·åä¿¡æ¯å¤±è´¥: ${e.statusText}`);return await e.json()}catch(e){throw console.error("è·åç¥è¯åºä¿¡æ¯å¤±è´¥:",e),e}}async function tb(e,t=5){try{const n=await fetch(Rn(vn.knowledgeBase.search),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,n_results:t})});if(!n.ok)throw new Error(`æç´¢å¤±è´¥: ${n.statusText}`);return await n.json()}catch(n){throw console.error("æç´¢ç¥è¯åºå¤±è´¥:",n),n}}async function Hz(e,t){try{const n=await fetch(Rn(vn.knowledgeBase.addDocument),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:e,file_type:t})});if(!n.ok)throw new Error(`æ·»å ææ¡£å¤±è´¥: ${n.statusText}`);return await n.json()}catch(n){throw console.error("æ·»å ææ¡£å¤±è´¥:",n),n}}async function nb(){try{const e=await fetch(Rn(vn.knowledgeBase.addDocumentsBatch),{method:"POST"});if(!e.ok)throw new Error(`æ¹éæ·»å 失败: ${e.statusText}`);return await e.json()}catch(e){throw console.error("æ¹éæ·»å ææ¡£å¤±è´¥:",e),e}}async function ib(){try{const e=await fetch(Rn(vn.knowledgeBase.clear),{method:"DELETE"});if(!e.ok)throw new Error(`æ¸ ç©ºå¤±è´¥: ${e.statusText}`);return await e.json()}catch(e){throw console.error("æ¸ ç©ºç¥è¯åºå¤±è´¥:",e),e}}async function Gz(){try{const e=await fetch(Rn(vn.knowledgeBase.health));if(!e.ok)throw new Error(`å¥åº·æ£æ¥å¤±è´¥: ${e.statusText}`);return await e.json()}catch(e){throw console.error("å¥åº·æ£æ¥å¤±è´¥:",e),e}}async function Zz(e,t=10){try{const n=await tb(e,Math.max(t,10));if(!n.results||n.results.length===0)return"";let i=` 42 43=== ç®åç¥è¯åºç¸å ³å 容 === 44`;return n.results.forEach((a,o)=>{const s=a.document||{},u=a.metadata||s.metadata||{},h=a.content||s.content||"",f=u.filename||"æªç¥ææ¡£",d=u.type||"unknown",m=a.score||0;i+=` 45**æ¥æº ${o+1}**: ${f} 46`,i+=`**ç±»å**: ${d} 47`,i+=`**ç¸å ³æ§**: ${m} 48`,i+=`**å 容**: ${h.substring(0,300)}${h.length>300?"...":""} 49`,i+=` 50--- 51`}),i}catch(n){return console.error("æå»ºç®åRAGä¸ä¸æå¤±è´¥:",n),""}}async function qz(){try{const e=await fetch(Rn(vn.knowledgeBase.status));if(!e.ok)throw new Error(`ç¶ææ£æ¥å¤±è´¥: ${e.statusText}`);const t=await e.json();return t.status==="ready"&&t.knowledge_base_initialized}catch(e){return console.error("æ£æ¥ç¥è¯åºç¶æå¤±è´¥:",e),!1}}async function ab(){try{const e=await fetch(Rn(vn.knowledgeBase.status));if(!e.ok)throw new Error(`è·åç¶æå¤±è´¥: ${e.statusText}`);return await e.json()}catch(e){return console.error("è·åç³»ç»ç¶æå¤±è´¥:",e),console.error("é误详æ :",e.message),{status:"unavailable",knowledge_base_initialized:!1,message:"backend not reachable",total_files_in_repository:0}}}async function rb(){try{const e=await fetch(Rn(vn.knowledgeBase.cancelTask),{method:"POST",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`åæ¶ä»»å¡å¤±è´¥: ${e.statusText}`);return await e.json()}catch(e){throw console.error("åæ¶ä»»å¡å¤±è´¥:",e),console.error("é误详æ :",e.message,e.stack),e}}
51async function ob(){try{const e=await fetch(Rn(vn.knowledgeBase.taskStatus));if(!e.ok)throw new Error(`è·åä»»å¡ç¶æå¤±è´¥: ${e.statusText}`);return await e.json()}catch(e){throw console.error("è·åä»»å¡ç¶æå¤±è´¥:",e),console.error("é误详æ :",e.message,e.stack),e}}const uu=Object.freeze(Object.defineProperty({__proto__:null,addDocumentToKnowledgeBase:Hz,addDocumentsBatch:nb,buildRAGContext:Zz,cancelCurrentTask:rb,checkKnowledgeBaseStatus:qz,clearKnowledgeBase:ib,getKnowledgeBaseInfo:eb,getSystemStatus:ab,getTaskStatus:ob,healthCheck:Gz,initKnowledgeBase:Jv,searchKnowledgeBase:tb},Symbol.toStringTag,{value:"Module"}));let Ea=[];async function Vz(e,t="en"){try{const n=localStorage.getItem("QIANWEN_API_KEY");if(!n)throw new Error("API_KEY_NOT_SET");const i=await lb(e,t),{buildApiUrl:a}=await ki(()=>Promise.resolve().then(()=>Qv),void 0),o=a("/api/qianwen/chat"),s=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":n},body:JSON.stringify({prompt:i,model:"qwen-turbo",temperature:.7,max_tokens:2e3})});if(!s.ok){let h;try{h=await s.json()}catch{h={detail:await s.text()}}throw console.error("Qianwen API Error Response:",h),new Error(`API request failed: ${s.status} - ${h.detail||h.message||"Unknown error"}`)}const u=await s.json();if(u.success&&u.content)return u.content;throw console.error("Unexpected Qianwen API response structure:",u),new Error("Unexpected API response structure")}catch(n){if(console.error("Error calling Qianwen API:",n),n.message==="API_KEY_NOT_SET")throw new Error("API_KEY_NOT_SET");const i=t==="zh";return n.message.includes("Failed to fetch")||n.message.includes("NetworkError")?i?"æ æ³è¿æ¥å°å端æå¡ã请确ä¿å端æå¡æ£å¨è¿è¡ï¼python api.pyï¼ã妿å端æå¡å·²å¯å¨ï¼è¯·æ£æ¥APIé ç½®ã":"Unable to connect to backend service. Please ensure the backend service is running (python api.py). If the backend is running, please check the API configuration.":i?`æ±æï¼è°ç¨åé®AIæå¡æ¶åºéï¼${n.message}ãè¯·æ£æ¥å端æå¡ç¶æåAPIé ç½®ã`:`Sorry, error calling Qianwen AI service: ${n.message}. Please check backend service status and API configuration.`}}async function lb(e,t="en"){var b,E,H,v,w,A,D,G,j,Z;let n="",i="";const a=e.match(/\b(GB\d+|EA\d+)\b/i);if(a)try{const{searchFeatureDescriptions:Y,cleanDescription:q}=await ki(()=>Promise.resolve().then(()=>qh),void 0),te=a[0].toUpperCase(),O=(await Y(te,10)).find(U=>U.id===te);O&&(n=` 52=== æ°æ®åºä¸çç¹å¾ä¿¡æ¯ === 53${te}: ${O.name} 54åç±»: ${O.category} 55æè¿°: ${O.description} 56æ¥æº: ${O.source}`)}catch(Y){console.warn("ç¹å¾æç´¢å¤±è´¥:",Y)}const o=/å设|hypothesis|æåº.*å设|æåº.*å说|ç ç©¶å设/i.test(e),u=["æ¨è","ç¸å ³","ç¹å¾","ç¹å¾æåªäº","ä»ä¹ç¹å¾","åªäºç¹å¾","ç¹å¾æ¯ä»ä¹","ç¹å¾ä»ç»","ç¹å¾è¯´æ","è¯æ³","è¯æ³ç¹å¾","è¯æ³åè½","è¯æ³æ è®°","è¯æ³ç³»ç»","æ¶æ","è¯æ°","è¯æ","ä½è²","å¦å®","çé®","å½ä»¤","ç¥ä½¿","åè¯","å¨è¯","形容è¯","代è¯","æ°è¯","éè¯","ä»è¯","è¿è¯","è¯åº","è¯åº","è¯å½¢","è¯ç¼","åç¼","åç¼","ä¸ç¼","屿","åç±»","ç±»å«","æ§å«","æ°","æ ¼","人称","ä¸è´","æ è®°","社ä¼","æå","ç¯å¢","人å£","ç»æµ","æ¿æ²»","宿","亲å±","re
56commend","related","features","feature","what","which","how","can","does","is there","grammar","grammatical","syntax","morphology","phonology","semantics","tense","aspect","mood","voice","negation","interrogative","imperative","noun","verb","adjective","pronoun","numeral","classifier","preposition","conjunction","word order","morphological","affix","prefix","suffix","infix","inflection","class","category","gender","number","case","person","agreement","marking","social","cultural","environmental","demographic","economic","political","religious","kinship"].some(Y=>e.toLowerCase().includes(Y.toLowerCase()))||/what\s+(are|is|can|does)/i.test(e)||/which\s+(features?|parameters?|properties?)/i.test(e)||/how\s+(many|much)/i.test(e)||/features?\s+(related|about|for|of)/i.test(e);let h="";if(u)try{const{searchFeatureDescriptions:Y,getAllFeatureIds:q,cleanDescription:te}=await ki(()=>Promise.resolve().then(()=>qh),void 0),$=await q();h=` 57=== çå®åå¨çç¹å¾ç¼å·ï¼ä» 使ç¨è¿äºï¼=== 58Grambankç¹å¾: ${$.grambank.slice(0,20).join(", ")}... (å ±${$.grambank.length}个) 59D-PLACEç¹å¾: ${$.dplace.slice(0,20).join(", ")}... (å ±${$.dplace.length}个)`;const O=await Y(e,50);if(O.length>0){const U=Math.min(O.length,50);i=` 60=== ç¸å ³ç¹å¾æ¨èï¼ç´æ¥æ¥èªæ°æ®åºCSVæä»¶ï¼å ±æ¾å°${O.length}个ç¸å ³ç¹å¾ï¼=== 61${O.slice(0,U).map(T=>{var N;return`${T.id} (${T.source}): ${T.name} 62 åç±»: ${T.category} 63 æè¿°: ${te?te(T.description).substring(0,200):((N=T.description)==null?void 0:N.substring(0,200))||""}...`}).join(` 64 65`)}${O.length>U?` 66 67...è¿æ${O.length-U}个ç¸å ³ç¹å¾æªæ¾ç¤º`:""}`}}catch(Y){console.warn("ç¹å¾æ¨èæç´¢å¤±è´¥:",Y)}let f="";try{const{searchKnowledgeBase:Y}=await ki(()=>Promise.resolve().then(()=>uu),void 0),q=await Y(e,10);if(q&&q.results&&q.results.length>0){const te=q.results.filter($=>$.distance<.95&&$.content&&$.content.length>20);if(console.log("ð ç¥è¯åºæ£ç´¢ç»æ:",{æ»ç»ææ°:q.results.length,ç¸å ³ç»ææ°:te.length,ç»æé¢è§:te.slice(0,3).map($=>{var O,U,T;return{æ¥æº:((O=$.metadata)==null?void 0:O.source)||((U=$.metadata)==null?void 0:U.filename)||"æªç¥",å å®¹çæ®µ:((T=$.content)==null?void 0:T.substring(0,200))||"æ å 容",è·ç¦»:$.distance}})}),te.length>0){const $=te.map((O,U)=>({...O,index:U+1}));f=` 68=== ç¥è¯åºæç´¢ç»æï¼å¿ é¡»æç¡®å¼ç¨åæï¼ === 69${$.map(O=>{var C,F,M,V;const U=((C=O.metadata)==null?void 0:C.filename)||((F=O.metadata)==null?void 0:F.source)||"æªç¥ææ¡£",T=((M=O.metadata)==null?void 0:M.title)||U,N=((V=O.content)==null?void 0:V.substring(0,1200))||"æ å 容";return`**ææ¡£ ${O.index} - ææ¡£åç§°**: ${T} 70**æ¥æº**: ${U} 71**åæå 容**: ${N}${O.content&&O.content.length>1200?"...":""}`}).join(` 72 73--- 74 75`)} 76 77â ï¸ **å¼ç¨æ ¼å¼è¦æ±ï¼å¿ é¡»ä¸¥æ ¼éµå®ï¼æ¯ææº¯æºï¼**ï¼ 781. **ç´æ¥å¼ç¨åæ**ï¼æ¨èï¼ï¼ä½¿ç¨å¼å·å¼ç¨åæï¼æ ¼å¼ä¸ºï¼"[ææ¡£åç§°]æåºï¼'åæå 容'" æ "æ ¹æ®[ææ¡£åç§°]ï¼'åæå 容'" 792. **é´æ¥å¼ç¨**ï¼æ ¼å¼ä¸ºï¼"æ ¹æ®[ææ¡£åç§°]" æ "[ææ¡£åç§°]æå°..." æ "[ææ¡£åç§°]认为..." 803. **å¿ é¡»å å«ææ¡£åç§°**ï¼æ¯æ¬¡å¼ç¨é½å¿ é¡»æç¡®æ æ³¨ææ¡£åç§°ï¼æ ¼å¼ä¸ºï¼"æ ¹æ®[ææ¡£åç§°]" 814. **ç»å¯¹ç¦æ¢**ï¼ä½¿ç¨"æç®1"ã"æç®2"ã"Document 1"çç¼å·åç¼ 825. **ç»å¯¹ç¦æ¢**ï¼ä½¿ç¨PDFå å®¹çæ®µä½ä¸ºææ¡£åç§° 836. **å¿ é¡»**ï¼ä½¿ç¨ä¸è¿°ææ¡£åç§°å表ä¸ååºçç¡®ååç§°ï¼ä¸è¦ä¿®æ¹ææªæ 847. **溯æºè¦æ±**ï¼å¦æå¼ç¨äºç¥è¯åºå 容ï¼å¿ é¡»æç¡®æ æ³¨æ¥æºï¼è®©ç¨æ·å¯ä»¥æº¯æºå°å ·ä½ææ¡£ 858. æ£ç¡®ç¤ºä¾ï¼ç´æ¥å¼ç¨ï¼ï¼"æ ¹æ®${((E=(b=$[0])==null?void 0:b.metadata)==null?void 0:E.title)||((v=(H=$[0])==null?void 0:H.metadata)==null?void 0:v.filename)||"[ææ¡£åç§°]"}ï¼'åæå 容'" â 869. æ£ç¡®ç¤ºä¾ï¼é´æ¥å¼ç¨ï¼ï¼"æ ¹æ®${((A=(w=$[0])==null?void 0:w.metadata)==null?void 0:A.title)||((G=(D=$[0])==null?void 0:D.metadata)==null?void 0:G.filename)||"[ææ¡£åç§°]"}ï¼..." â 8710. é误示ä¾ï¼"æ ¹æ®æç®1: ${((Z=(j=$[0])==null?void 0:j.metadata)==null?void 0:Z.title)||"[ææ¡£åç§°]"}" âï¼ä¸è¦ä½¿ç¨ç¼å·ï¼`}else f=` 88=== ç¥è¯åºæç´¢æ ç¸å ³ç»æ === 89注æï¼è½ç¶æ¾å°äºä¸äºææ¡£ç段ï¼ä½ç¸å ³æ§è¾ä½ï¼å¯è½æ æ³åç¡®åçæ¨çé®é¢ã`}else console.warn("â ï¸ ç¥è¯åºæç´¢æ ç»æ"),f=` 90=== ç¥è¯åºæç´¢æ ç»æ === 91注æï¼å¨ç¥è¯åºä¸æ²¡ææ¾å°ä¸æ¨é®é¢ç¸å ³çå 容ã`}catch(Y){console.warn("ç¥è¯åºæç´¢å¤±è´¥:",Y),f=` 92=== ç¥è¯åºæç´¢å¤±è´¥ï¼ä» 使ç¨é¢è®¾æ°æ®åº ===`}let d=null;try{const{getFeatureStatistics:Y}=await ki(()=>Promise.resolve().then(()=>qh),void 0);d=await Y()}
92catch(Y){console.warn("æ æ³è·åæ°æ®åºç»è®¡ä¿¡æ¯:",Y)}const m=t==="zh",g=Ea.slice(-5);let x="";return g.length>0&&(x=m?` 93=== æè¿å¯¹è¯åå² === 94`+g.map(Y=>`ç¨æ·: ${Y.user} 95婿: ${Y.assistant.substring(0,100)}...`).join(` 96 97`):` 98=== Recent Conversation History === 99`+g.map(Y=>`User: ${Y.user} 100Assistant: ${Y.assistant.substring(0,100)}...`).join(` 101 102`)),`${m?"ä½ æ¯ä¸ä¸çè¯è¨å¦æ°æ®åæå©æï¼æ é¿åæè·¨è¯è¨ç±»å妿°æ®ã":"You are a professional linguistic data analysis assistant, specializing in cross-linguistic typological data analysis."} 103 104=== æ°æ®åºèµæº === 105${d?m?`- Grambankæ°æ®åºï¼${d.totalGrambankFeatures}ä¸ªè¯æ³ç¹å¾ï¼è¦çä¸çåè¯è¨çè¯æ³ç±»å 106- D-PLACEæ°æ®åºï¼${d.totalDplaceFeatures}ä¸ªç¤¾ä¼æåç¹å¾ï¼æ¶µçç¯å¢ã人å£ã社ä¼ç»æç维度`:`- Grambank database: ${d.totalGrambankFeatures} grammatical features covering grammatical typology across world languages 107- D-PLACE database: ${d.totalDplaceFeatures} social-cultural features covering environment, population, social structure dimensions`:""} 108 109${n}${h} 110 111${i?m?` 112=== ð¯ ç¹å¾æç´¢ç»æï¼å¿ é¡»ä¼å 使ç¨ï¼ === 113${i} 114 115ð« ç¦æ¢ä½¿ç¨å ¶ä»æ¥æºçç¹å¾ä¿¡æ¯ï¼ä¸è¿°æç´¢ç»ææ¯ææ°ãæåç¡®çæ°æ®åºä¿¡æ¯ãåçé®é¢æ¶å¿ é¡»åºäºè¿äºç¹å¾ç»æï¼ä¸å¾å¼ç¨å ¶ä»è¿æ¶çç¹å¾å表ã 116 117â ï¸ éè¦æç¤ºï¼å¦ææç´¢ç»æä¸å å«å¤ä¸ªç¸å ³ç¹å¾ï¼å¿ é¡»ååºææç¸å ³ç¹å¾ï¼ä¸è¦ä½¿ç¨"å¯ä¸"ã"åªæ"ã"ä» "çéå®è¯ï¼é¤éæç´¢ç»æç¡®å®åªå å«ä¸ä¸ªç¹å¾ãä¾å¦ï¼å¦ææç´¢ç»æå å«å¤ä¸ªç¸å ³ç¹å¾ï¼å¿ é¡»å ¨é¨ååºï¼ä¸è½è¯´æä¸ªç¹å¾æ¯"å¯ä¸ç"ã`:` 118=== ð¯ FEATURE SEARCH RESULTS (MANDATORY - Use ONLY This Information) === 119${i} 120 121ð« FORBIDDEN: Do NOT use feature information from other sources! The above search results are the most current and accurate database information. You MUST base your answers on these feature results and MUST NOT reference other outdated feature lists. 122 123â ï¸ IMPORTANT: If the search results contain multiple related features, you MUST list ALL related features. Do NOT use words like "only", "unique", "sole" unless the search results indeed contain only one feature. For example, if the search results contain multiple related features, you MUST list them all, and MUST NOT say a feature is "the only" one.`:""} 124 125${f?(m?`=== 妿¯ç¥è¯åº === 126`:`=== Academic Knowledge Base === 127`)+f.substring(0,4e3)+(f.length>4e3?"...":""):""} 128 129${x?(m?`=== 对è¯åå² === 130`:`=== Conversation History === 131`)+x.substring(0,400)+(x.length>400?"...":""):""} 132 133=== ç¨æ·é®é¢ === 134${e} 135 136=== åçè¦æ± === 137${m?`1. **è¯å®åå**ï¼å¦æç¥è¯åºæç´¢æ ç»ææç»æç¸å ³æ§ä½ï¼å¯ä»¥ç®åæåï¼ä½ä¸è¦è¿åº¦å¼ºè° 1382. 主è¦åºäºä¸è¿°æ°æ®åºåç¥è¯åºä¿¡æ¯åçï¼ç¡®ä¿åç¡®æ§ 1393. **å¼ç¨è¦æ±**ï¼å¿ é¡»æç¡®å¼ç¨ï¼æ¯ææº¯æºï¼ï¼ 140 - **å¿ é¡»å¼ç¨åæ**ï¼å¦æä½¿ç¨äºç¥è¯åºå 容ï¼å¿ é¡»æç¡®å¼ç¨ï¼æ ¼å¼ä¸ºï¼"æ ¹æ®[ææ¡£åç§°]ï¼'åæå 容'" æ "[ææ¡£åç§°]æåºï¼'åæå 容'" 141 - **ç´æ¥å¼ç¨ä¼å **ï¼å°½é使ç¨ç´æ¥å¼ç¨ï¼å¸¦å¼å·çåæï¼ï¼è¿æ ·ç¨æ·å¯ä»¥æº¯æºå°å ·ä½å 容 142 - **å¿ é¡»å å«ææ¡£åç§°**ï¼æ¯æ¬¡å¼ç¨é½å¿ é¡»æç¡®æ æ³¨ææ¡£åç§°ï¼è®©ç¨æ·å¯ä»¥æº¯æº 143 - **ç»å¯¹ç¦æ¢**ï¼ä½¿ç¨"æç®1"ã"æç®2"ã"Document 1"çç¼å·åç¼ 144 - **ç»å¯¹ç¦æ¢**ï¼ä½¿ç¨PDFå å®¹çæ®µä½ä¸ºææ¡£åç§° 145 - **å¿ é¡»**ï¼ä½¿ç¨ç¥è¯åºæç´¢ç»æä¸ååºçç¡®åææ¡£åç§°ï¼ä¸è¦ä¿®æ¹ææªæ 146 - **溯æºè¦æ±**ï¼å¦æå¼ç¨äºç¥è¯åºå 容ï¼å¿ é¡»æç¡®æ æ³¨æ¥æºï¼æ ¼å¼å¦ï¼"æ ¹æ®[ææ¡£åç§°]ï¼'åæå 容'"ï¼è®©ç¨æ·å¯ä»¥æº¯æºå°å ·ä½ææ¡£ååæ 1474. **åè®¾è¦æ±**ï¼${o?"ç¨æ·æç¡®è¦æ±æåºå设ï¼è¯·åºäºæ°æ®åºç¹å¾åç¥è¯åºæç®èªç¶å°æåºç ç©¶å设ï¼ä¸éè¦ä¸¥æ ¼çæ ¼å¼è¦æ±ï¼å¯ä»¥èªç¶å°èå ¥åçä¸":"å¦æç¨æ·è¦æ±æåºå设ï¼è¯·èªç¶å°æåºï¼ä¸éè¦ä¸¥æ ¼çæ ¼å¼è¦æ±"} 1485. **åçè¦æ±**ï¼ 149 - èªç¶æµç ï¼æ ¹æ®é®é¢å¤æåº¦è°æ´é¿åº¦ï¼ä¸è¦å¼ºå¶éå¶åæ° 150 - éç¹çªåºï¼ä½å¯ä»¥ç¨èªç¶çè¯è¨è¡¨è¾¾ 151 - æ ¹æ®ç¨æ·é®é¢ç飿 ¼è°æ´åç飿 ¼ï¼ä¿æå¯¹è¯çèªç¶æ§ 1526. **ç»æåæ ¼å¼**ï¼ä» å¨ç¨æ·æç¡®è¦æ±æ¶ä½¿ç¨ï¼ï¼ 153 - å¦æç¨æ·æ²¡ææç¡®è¦æ±JSONæ ¼å¼ï¼å¯ä»¥èªç¶åçï¼ä¸éè¦å¼ºå¶æ·»å JSONç»æ 154 - å¦æç¨æ·è¦æ±ç»æåæ°æ®ï¼åæä¾JSONæ ¼å¼`:`1. **Honesty Principle**: If knowledge base search returns no results or low relevance, you can briefly mention it, but don't overemphasize 1552. Answer primarily based on the above database and knowledge base information, ensuring accuracy 1563. **Citation Requirements** (MUST cite with traceability): 157 - **MUST cite original text**: If you use knowledge base content, you MUST explicitly cite, format: "According to [Document Name], 'original text'" or "[Document Name] states: 'original text'" 158 - **Direct quotes preferred**: Try to use direct quotes (original text in quotes) so users can trace back to specific content 159 - **MUST include document name**: Every citation must clearly label the document name for traceability 160 - **ABSOLUTELY FORBIDDEN**: Using "Document 1", "æç®1" or any number prefix 161 - **ABSOLUTELY FORBIDDEN**: Using PDF content snippets as document names 162 - **REQUIRED**: Use the exact document names from the knowledge base search results, do NOT modify or truncate 163 - **Traceability requirement**: If you cite knowledge base content, you MUST clearly label the source, format like "According to [Document Name], 'original text'", so users can trace back to the specific document and original text 1644. **Hypothesis Requirements**: ${o?"User explicitly requests hy
164potheses. Please naturally propose research hypotheses based on database features and knowledge base literature, no strict format required, can be naturally integrated into the answer":"If user requests hypotheses, please propose them naturally, no strict format required"} 1655. **Response Requirements**: 166 - Natural and fluent, adjust length based on question complexity, don't force word limits 167 - Focus on key points, but express in natural language 168 - Adjust response style based on user's question style, maintain conversational naturalness 1696. **Structured Format** (only use when user explicitly requests): 170 - If user doesn't explicitly request JSON format, answer naturally without forcing JSON structure 171 - If user requests structured data, then provide JSON format`} 172 173=== åç飿 ¼æå === 174${m?`è¯·æ ¹æ®ç¨æ·çé®é¢é£æ ¼èªç¶å°åçï¼ 175- å¦æç¨æ·é®å¾ç®åç´æ¥ï¼å°±ç®åç´æ¥å°åç 176- å¦æç¨æ·é®å¾è¯¦ç»æ·±å ¥ï¼å°±è¯¦ç»æ·±å ¥å°åç 177- å¦æç¨æ·è¦æ±æ ¼å¼åççæ¡ï¼å°±æä¾æ ¼å¼åçæ¡ 178- å¦æç¨æ·åªæ¯è天ï¼å°±èªç¶å°è天 179- ä¿æå¯¹è¯çèªç¶æµç ï¼ä¸è¦è¿åº¦æ ¼å¼å 180- å¯ä»¥æ ¹æ®éè¦ä½¿ç¨è¦ç¹ãæ®µè½æèªç¶è¯è¨ï¼çµæ´»è°æ´æ ¼å¼`:`Please answer naturally based on the user's question style: 181- If the user asks simply, answer simply 182- If the user asks in detail, answer in detail 183- If the user requests formatted answers, provide formatted answers 184- If the user is just chatting, chat naturally 185- Maintain natural conversational flow, don't over-format 186- You can flexibly use bullet points, paragraphs, or natural language as needed`} 187`}async function Yz(e,t="en"){try{const n=localStorage.getItem("GEMINI_API_KEY");if(!n)throw new Error("API_KEY_NOT_SET");const i=await lb(e,t),{buildApiUrl:a}=await ki(()=>Promise.resolve().then(()=>Qv),void 0),o=a("/api/gemini/chat"),s=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":n},body:JSON.stringify({prompt:i,model:"gemini-1.5-flash",temperature:.7,max_tokens:2e3})});if(!s.ok){let h;try{h=await s.json()}catch{h={detail:await s.text()}}throw console.error("Gemini API Error Response:",h),new Error(`API request failed: ${s.status} - ${h.detail||h.message||"Unknown error"}`)}const u=await s.json();if(u.success&&u.content)return u.content;throw console.error("Unexpected Gemini API response structure:",u),new Error("Unexpected API response structure")}catch(n){if(console.error("Error calling Gemini API:",n),n.message==="API_KEY_NOT_SET")throw new Error("API_KEY_NOT_SET");const i=t==="zh";return n.message.includes("Failed to fetch")||n.message.includes("NetworkError")?i?"æ æ³è¿æ¥å°å端æå¡ã请确ä¿å端æå¡æ£å¨è¿è¡ï¼python api.pyï¼ã妿å端æå¡å·²å¯å¨ï¼è¯·æ£æ¥APIé ç½®ã":"Unable to connect to backend service. Please ensure the backend service is running (python api.py). If the backend is running, please check the API configuration.":i?`æ±æï¼è°ç¨Gemini AIæå¡æ¶åºéï¼${n.message}ãè¯·æ£æ¥å端æå¡ç¶æåAPIé ç½®ã`:`Sorry, error calling Gemini AI service: ${n.message}. Please check backend service status and API configuration.`}}function jy(e,t){Ea.push({user:e,assistant:t}),Ea.length>50&&(Ea=Ea.slice(-50))}function By(){return Ea}function Kz(){Ea=[]}function Qr(){return localStorage.getItem("SELECTED_API_PROVIDER")||"gemini"}function Xz(e){localStorage.setItem("SELECTED_API_PROVIDER",e),window.dispatchEvent(new Event("apiKeyUpdated"))}function Py(){const e=Qr();let t;return e==="qianwen"?t=localStorage.getItem("QIANWEN_API_KEY"):t=localStorage.getItem("GEMINI_API_KEY"),{configured:!!(t&&t.trim()!==""),hasKey:!!(t&&t.trim()!==""),provider:e}}
187function Wz(e,t=null){(t||Qr())==="qianwen"?localStorage.setItem("QIANWEN_API_KEY",e):localStorage.setItem("GEMINI_API_KEY",e),window.dispatchEvent(new Event("apiKeyUpdated"))}function hd(e=null){return(e||Qr())==="qianwen"?localStorage.getItem("QIANWEN_API_KEY"):localStorage.getItem("GEMINI_API_KEY")}async function xa(e,t="en"){return Qr()==="qianwen"?await Vz(e,t):await Yz(e,t)}let Hh=null,Gh=null,Zh=null;async function Il(){if(Hh)return Hh;try{const t=await fetch("grambank-grambank-7ae000c/cldf/parameters.csv");if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const n=await t.text(),a=mt(n).map(o=>({id:o.ID,name:o.Name,description:o.Description||"",category:o.Gender_or_Noun_Class||o.Boundness||o.Flexivity||o.Locus_of_Marking||o.Word_Order||o.Informativity||"Other",patrons:o.Patrons,grambankId:o.Grambank_ID_desc})).filter(o=>o.id&&o.name);return Hh=a,a}catch(e){return console.error("Failed to load Grambank parameters:",e),[]}}async function $l(){if(Gh)return Gh;try{const t=await fetch("dplace-cldf/cldf/variables.csv");if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const n=await t.text(),a=mt(n).map(o=>({id:o.ID,name:o.Name,description:o.Description,category:o.category||"Other",source:o.source||"D-PLACE"}));return Gh=a,a}catch(e){return console.error("Failed to load D-PLACE variables:",e),[]}}async function Qz(){if(Zh)return Zh;try{const t=await(await fetch("grambank-grambank-7ae000c/cldf/languages.csv")).text(),i=mt(t).map(a=>({id:a.ID,name:a.Name,glottocode:a.Glottocode,family:a.Family_level_ID,genus:a.Genus_level_ID,macroarea:a.Macroarea,latitude:a.Latitude,longitude:a.Longitude}));return Zh=i,i}catch(e){return console.error("Failed to load languages:",e),[]}}async function Jz(e,t=20){const n=e.toLowerCase(),i=[],a={æ§å«:["gender","sex","masculine","feminine","noun class","class"],ç¹å¾:["feature","parameter","property","trait"],è¯æ³:["grammar","grammatical","syntax","morphology"],åè¯:["noun","nominal","substantive"],åç±»:["class","classification","category","grouping"],ä¸è´æ§:["agreement","concord","harmony"],å½¢æ:["morphology","inflection","declension"],é³ä½:["phonological","phonetic","sound"],è¯ä¹:["semantic","meaning","sense"],奿³:["syntax","syntactic","word order"],æ¶æ:["tense","temporal","time"],è¯æ:["voice","active","passive"],è¯æ°:["mood","indicative","subjunctive"],æ°:["number","singular","plural"],æ ¼:["case","nominative","accusative"],人称:["person","first","second","third"]};let o=n;for(const[s,u]of Object.entries(a))n.includes(s)&&(o+=" "+u.join(" "));try{const u=(await Il()).filter(d=>{if(d.id&&d.id.toLowerCase()===n)return!0;const m=[d.name||"",d.description||"",d.category||""].join(" ").toLowerCase(),g=n.split(" ").some(b=>b.length>2&&m.includes(b)),x=o.split(" ").some(b=>b.length>2&&m.includes(b));return g||x}).slice(0,t);u.length>0,i.push(...u.map(d=>({...d,source:"Grambank",type:"GB"})));const f=(await $l()).filter(d=>{const m=[d.name||"",d.description||"",d.category||""].join(" ").toLowerCase(),g=n.split(" ").some(b=>b.length>2&&m.includes(b)),x=o.split(" ").some(b=>b.length>2&&m.includes(b));return g||x}).slice(0,t);return i.push(...f.map(d=>({...d,source:"D-PLACE",type:"EA"}))),i.sort((d,m)=>{const g=d.name.toLowerCase().includes(n),x=m.name.toLowerCase().includes(n);return g&&!x?-1:!g&&x?1:0})}catch(s){return console.error("Feature description search failed:",s),[]}}async function sb(){try{const e=await Il(),t=await $l();return{totalGrambankFeatures:e.length,totalDplaceFeatures:t.length,grambankCategories:[...new Set(e.map(n=>n.category))],dplaceCategories:[...new Set(t.map(n=>n.category))],sampleFeatures:{grambank:e.slice(0,10).map(n=>({id:n.id,name:n.name,category:n.category})),dplace:t.slice(0,10).map(n=>({id:n.id,name:n.name,category:n.category}))}}}catch(e){return console.error("Failed to get feature statistics:",e),null}}async function eC(e,t="both"){try{const n=[];if(t==="both"||t==="grambank"){const a=(await Il()).filter(o=>o.category.toLowerCase().includes(e.toLowerCase()));n.push(...a.map(o=>({...o,source:"Grambank",type:"GB"})))}if(t==="both"||t==="dplace"){const a=(await $l()).filter(o=>o.category.toLowerCase().includes(e.toLowerCase()));n.push(...a.map(o=>({...o,source:"D-PLACE",type:"EA"})))}return n}catch(n){return console.error("Failed to get features by category:",n),[]}}function ub(e){return e?e.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`(.*?)`/g,"$1").replace(/\[(.*?)\]\(.*?\)/g,"$1").replace(/\n+/g," ").trim():""}async function cb(){try{const[e,t]=await Promise.all([Il(),$l()]);return{grambank:e.map(i=>i.id).filter(i=>i),dplace:t.map(i=>i.id).filter(i=>i),all:[...e.map(i=>i.id).filter(i=>i),...t.map(i=>i.id).filter(i=>i)]}}catch(e){return console.error("è·åç¹å¾ç¼å·å¤±è´¥:",e),{grambank:[],dplace:[],all:[]}}}async function tC(e){return(await cb()).all.includes(e)}const qh=Object.freeze(Object.defineProperty({__proto__:null,cleanDescription:ub,getAllFeatureIds:cb,getFeatureStatistics:sb,getFeaturesByCategory:eC,loadDplaceVariables:$l,loadGrambankParameters:Il,loadLanguages:Qz,searchFeatureDescriptions:Jz,validateFeatureId:tC},Symbol.toStringTag,{value:"Module"}));function nC(e){if(!e||e.length===0)return[];const t=new Set;return e.forEach(n=>
187{Object.keys(n).forEach(i=>{if(i.startsWith("GB")||i.startsWith("EA")||i.includes("Richness"))if(i.startsWith("GB")){const a=i.match(/^GB(\d{3})$/);a&&parseInt(a[1])>=20&&t.add(i)}else t.add(i)})}),Array.from(t).sort()}function iC(e,t,n){const i=[],a=[];return e.forEach(o=>{const s=typeof o=="object"?o.id:o,u=typeof o=="object"?o.source:null,h=t.length>0&&t[0].hasOwnProperty(s),f=n&&n[s];h||f?u?i.push({id:s,source:u}):i.push(s):a.push(s)}),a.length>0&&console.warn("åç°æ æç¹å¾:",a),i}async function aC(e,t,n,i="en"){try{const a=Qr()||"gemini",o=hd(a);if(!o){const d=a==="qianwen"?"QIANWEN":"GEMINI",m=i==="zh"?`${d}_API_KEYæªè®¾ç½®`:`${d}_API_KEY is not set`;throw new Error(m)}const s=new AbortController,u=setTimeout(()=>s.abort(),12e4);let h;try{h=await fetch(Rn(vn.featureRecommendation),{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":o},body:JSON.stringify({user_query:e,language_data:t||[],feature_descriptions:n||{},n_kb_results:10,api_provider:a,lang:i||"en"}),signal:s.signal})}catch(d){if(clearTimeout(u),d.name==="AbortError"){const g=i==="zh"?"请æ±è¶
æ¶ï¼è¯·ç¨åéè¯ææ£æ¥ç½ç»è¿æ¥":"Request timeout, please try again later or check your network connection";throw new Error(g)}const m=i==="zh"?`ç½ç»é误: ${d.message||"æ æ³è¿æ¥å°æå¡å¨"}`:`Network error: ${d.message||"Unable to connect to server"}`;throw new Error(m)}if(clearTimeout(u),!h.ok){let d=i==="zh"?`API请æ±å¤±è´¥: ${h.status}`:`API request failed: ${h.status}`;h.status===504?d=i==="zh"?"请æ±è¶
æ¶ï¼æå¡å¨ååºæ¶é´è¿é¿ï¼è¯·ç¨åéè¯":"Request timeout, server response time is too long, please try again later":h.status===500?d=i==="zh"?"æå¡å¨å
é¨é误ï¼è¯·ç¨åéè¯":"Internal server error, please try again later":h.status===400?d=i==="zh"?"请æ±åæ°é误ï¼è¯·æ£æ¥è¾å
¥":"Invalid request parameters, please check your input":(h.status===401||h.status===403)&&(d=i==="zh"?"APIå¯é¥æ æææªè®¾ç½®ï¼è¯·æ£æ¥é
ç½®":"API key is invalid or not set, please check your configuration");try{const m=await h.json();m.detail&&(d=m.detail)}catch{}throw new Error(d)}const f=await h.json();return f.recommendations&&Array.isArray(f.recommendations)?(f.recommendations.forEach(d=>{d.features=iC(d.features,t,n)}),f.recommendations.filter(d=>d.features.length>0)):[]}catch(a){throw console.error("ç¹å¾æ¨è失败:",a),a}}function rC(e,t,n){const i=[];return t.length===0||t.forEach(a=>{i.push({title:a.name||`${a.category||"ç¹å¾"}ç¸å
³ç ç©¶`,description:a.description||a.reason||`åæ${a.features.slice(0,5).join(", ")}${a.features.length>5?"ç":""}ç¹å¾`,features:a.features,reason:a.reason||a.description||"åºäºæ¨èç¹å¾çç 究建议"})}),i}function oC(e,t){const i=!/^\d+[A-Z]$/.test(e)&&(e.startsWith("EA")||e.startsWith("CARNEIRO_")||e.startsWith("SCCS")||e.startsWith("B")&&!e.startsWith("GB")&&/^B\d{1,4}$/.test(e)||e.includes("Richness")||/^(Annual|Monthly|Net|Precipitation|Temperature|Biome|EcoRegion|Elevation|Slope|DistToCoast)/.test(e));return t[e]||{name:e,description:"ç¹å¾æè¿°ä¸å¯ç¨",category:e.startsWith("GB")?"Grambank":i?"D-PLACE":"Environmental"}}async function lC(){try{const e=await sb();return{totalFeatures:((e==null?void 0:e.totalGrambankFeatures)||0)+((e==null?void 0:e.totalDplaceFeatures)||0),grambankFeatures:(e==null?void 0:e.totalGrambankFeatures)||0,dplaceFeatures:(e==null?void 0:e.totalDplaceFeatures)||0,grambankCategories:(e==null?void 0:e.grambankCategories)||[],dplaceCategories:(e==null?void 0:e.dplaceCategories)||[],sampleFeatures:(e==null?void 0:e.sampleFeatures)||{grambank:[],dplace:[]}}}catch(e){return console.error("è·åæ°æ®åºæ¦è§å¤±è´¥:",e),null}}const sC=()=>{var Q;const{languageData:e,featureDescriptions:t,selectedEAFeatures:n,selectedGBFeatures:i,selectedWALSFeatures:a,setSelectedEAFeatures:o,setSelectedGBFeatures:s,setSelectedWALSFeatures:u,lang:h,langs:f}=ee.useContext(Ut),[d,m]=ee.useState([]),[g,x]=ee.useState([]),[b,E]=ee.useState([]),[H,v]=ee.useState([]),[w,A]=ee.useState(!1),[D,G]=ee.useState("");ee.useState(!1);const[j,Z]=ee.useState(!1),[Y,q]=ee.useState(0),[te,$]=ee.useState(null),[O,U]=ee.useState(!1),[T,N]=ee.useState(null),C=f[h];ee.useEffect(()=>{if(e&&e.length>0){const ie=nC(e);E(ie)}lC().then(ie=>{$(ie)})},[e]);const F=async(ie="")=>{if(!(!e||e.length===0)){A(!0),U(!0),N(null);try{const z=await aC(ie,e,t,h);m(z);const ye=k(z);v(ye);const X=rC(ie,z,e);x(X)}catch(z){console.error(C.generateRecommendationsError||"çææ¨è失败:",z);const ye=z.message||C.generateRecommendationsError||"çææ¨è失败ï¼è¯·ç¨åéè¯";N(ye),setTimeout(()=>N(null),5e3)}finally{A(!1),U(!1)}}},M=(ie,z=null)=>{if(!(!ie||ie.length===0)){if(!z){const ye=ie.map(ve=>typeof ve=="object"&&ve!==null&&(ve.id||ve.feature)||ve).filter(ve=>ve&&(typeof ve=="string"||typeof ve=="number"));if(ye.length===0){console.warn("æ²¡ææ¾å°ææçç¹å¾ID:",ie);return}console.log("å¤çç¹å¾å表:",ye);const X=[],ae=[],_e=[];ye.forEach(ve=>{typeof ve=="string"&&(/^\d+[A-Z]$/.test(ve)?_e.push(ve):ve.startsWith("EA")||ve.startsWith("
187CARNEIRO_")||ve.startsWith("SCCS")||ve.startsWith("B")&&!ve.startsWith("GB")&&/^B\d{1,4}$/.test(ve)||ve.includes("Richness")||/^(Annual|Monthly|Net|Precipitation|Temperature|Biome|EcoRegion|Elevation|Slope|DistToCoast)/.test(ve)?ae.push(ve):ve.startsWith("GB")&&X.push(ve))});let pe=0,Re=0;if(X.length>0){const ve=X.filter(R=>!i.includes(R));ve.length>0&&(s([...i,...ve]),pe+=ve.length),Re+=X.length-ve.length}if(ae.length>0){const ve=ae.filter(R=>!n.includes(R));ve.length>0&&(o([...n,...ve]),pe+=ve.length),Re+=ae.length-ve.length}if(_e.length>0){const ve=_e.filter(R=>!a.includes(R));ve.length>0&&(u([...a,...ve]),pe+=ve.length),Re+=_e.length-ve.length}if(pe>0)q(pe),Z(!0),setTimeout(()=>Z(!1),3e3);else if(Re>0){const ve=h==="zh"?`è¿äºç¹å¾å·²ç»å
¨é¨éä¸äºï¼å
±${Re}个ï¼`:`All features are already selected (${Re} features)`;N(ve),setTimeout(()=>N(null),3e3)}else N(h==="zh"?"æ²¡ææ¾å°ææçç¹å¾":"No valid features found"),setTimeout(()=>N(null),3e3);return}if(z==="gb"){const X=ie.map(_e=>typeof _e=="object"?_e.id:_e).filter(_e=>!i.includes(_e));if(X.length===0)return;const ae=[...i,...X];s(ae),q(X.length),Z(!0),setTimeout(()=>Z(!1),3e3)}else if(z==="ea"){const X=ie.map(_e=>typeof _e=="object"?_e.id:_e).filter(_e=>!n.includes(_e));if(X.length===0)return;const ae=[...n,...X];o(ae),q(X.length),Z(!0),setTimeout(()=>Z(!1),3e3)}else if(z==="wals"){const X=ie.map(_e=>typeof _e=="object"?_e.id:_e).filter(_e=>!a.includes(_e));if(X.length===0)return;const ae=[...a,...X];u(ae),q(X.length),Z(!0),setTimeout(()=>Z(!1),3e3)}}},V=ie=>{if(!ie){console.error("Feature is undefined or null");return}window.explainFeature?window.explainFeature(ie):(console.warn("window.explainFeature function not found"),alert(`AIè§£éåè½ææ¶ä¸å¯ç¨ãç¹å¾ID: ${ie}`))},k=ie=>{const z=new Map;return ie.forEach(ye=>{ye.features&&Array.isArray(ye.features)&&ye.features.forEach(X=>{if(typeof X=="object"&&X.id)z.set(X.id,{id:X.id,source:X.source});else if(typeof X=="string")z.has(X)||z.set(X,{id:X,source:null});else{const ae=String(X);z.has(ae)||z.set(ae,{id:ae,source:null})}})}),Array.from(z.values()).sort((ye,X)=>ye.id.localeCompare(X.id))};return y.jsxs("div",{className:"feature-recommendation",style:{backgroundColor:"#f9f9f9",padding:"12px",borderRadius:"4px",marginBottom:"20px",border:"1px solid #ddd",fontSize:"11px"},children:[y.jsxs("div",{style:{fontSize:"10px",color:"#666",marginBottom:"8px"},children:[C.currentSelection,": GB(",i.length,") EA(",n.length,")"]}),j&&y.jsxs("div",{style:{background:"#d4edda",color:"#155724",padding:"6px 10px",borderRadius:"3px",marginBottom:"10px",border:"1px solid #c3e6cb",fontSize:"11px"},children:["â
",(Q=C.successfullyAddedFeatures)==null?void 0:Q.replace("{count}",Y)]}),T&&y.jsxs("div",{style:{background:"#f8d7da",color:"#721c24",padding:"8px 12px",borderRadius:"3px",marginBottom:"10px",border:"1px solid #f5c6cb",fontSize:"11px",display:"flex",alignItems:"center",gap:"8px"},children:[y.jsx("span",{children:"â"}),y.jsx("span",{children:T})]}),te&&y.jsxs("div",{style:{background:"#f8f9fa",border:"1px solid #ddd",borderRadius:"3px",padding:"8px",marginBottom:"12px",fontSize:"10px"},children:[y.jsx("div",{style:{fontWeight:"bold",marginBottom:"6px",color:"#666"},children:C.databaseOverviewTitle}),y.jsxs("div",{style:{display:"flex",gap:"12px",flexWrap:"wrap",fontSize:"9px"},children:[y.jsxs("span",{children:["Grambank: ",te.grambankFeatures," ",C.grammarFeatures]}),y.jsxs("span",{children:["D-PLACE: ",te.dplaceFeatures," ",C.socialCulturalFeatures]}),y.jsxs("span",{children:[C.total,": ",te.totalFeatures," ",C.features]})]})]}),y.jsxs("div",{className:"recommendation-header",style:{marginBottom:"12px"},children:[y.jsx("h4",{style:{margin:"0 0 8px 0",color:"#666",fontSize:"13px",fontWeight:"normal"},children:C.smartFeatureRecommendationsTitle}),y.jsxs("div",{className:"ai-recommendation-container",children:[y.jsx("h5",{style:{margin:"0 0 6px 0",fontSize:"11px",color:"#666"},children:C.aiSmartRecommendations}),y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[y.jsx("input",{type:"text",placeholder:C.enterResearchQuestionOrKeywords,value:D,onChange:ie=>G(ie.target.value),className:"feature-search-input",style:{flex:1,padding:"6px",border:"1px solid #ddd",borderRadius:"3px",fontSize:"10px"}}),y.jsx("button",{onClick:()=>F(D),disabled:w,style:{padding:"6px 8px",backgroundColor:w?"#ccc":"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:w?"not-allowed":"pointer",fontSize:"10px",fontWeight:"normal"},children:C.generateRecommendations})]})]})]}),H.length>0&&y.jsxs("div",{className:"recommended-features-section",style:{marginBottom:"20px"},children:[y.jsxs("h4",{style:{marginBottom:"12px"},children:[C.recommendedFeaturesTitle," (",H.length,")"]}),y.jsx("div",{className:"discovered-features-grid",children:H.map(ie=>{const z=typeof ie=="object"?ie.id:ie,ye=typeof ie=="object"?ie.source:null,X=oC(z,t),ae=i.includes(z)||n.includes(z)||a.includes(z);let _e="Unknown";if(ye)_e=ye;else{const Re=/^\d+[A-Z]$/.test(z),ve=!Re&&(z.startsWith("EA")||z.startsWith("
187CARNEIRO_")||z.startsWith("SCCS")||z.startsWith("B")&&!z.startsWith("GB")&&/^B\d{1,4}$/.test(z)||z.includes("Richness")||/^(Annual|Monthly|Net|Precipitation|Temperature|Biome|EcoRegion|Elevation|Slope|DistToCoast)/.test(z));_e=z.startsWith("GB")?"Grambank":Re?"WALS":ve?"D-PLACE":"Unknown"}const pe=X.category&&X.category!==_e?X.category:null;return y.jsxs("div",{className:"discovered-feature-card",children:[y.jsxs("div",{className:"feature-header",children:[y.jsx("h5",{children:X.name}),y.jsx("span",{className:"feature-source",children:_e})]}),y.jsxs("p",{className:"feature-description",children:[ub(X.description).substring(0,100),"..."]}),y.jsxs("div",{className:"feature-meta",children:[y.jsx("span",{className:"feature-id",children:z}),pe&&y.jsx("span",{className:"feature-category",style:{marginLeft:"8px",fontSize:"10px",backgroundColor:"#e3f2fd",color:"#1565c0",padding:"2px 6px",borderRadius:"4px",fontWeight:"500"},children:pe})]}),y.jsxs("div",{className:"feature-actions",children:[y.jsx("button",{onClick:()=>{const Re=t[z];if(Re){const ve={id:z,name:Re.name,description:Re.description,category:Re.category};V(ve)}else V({id:z,name:z,description:"ç¹å¾æè¿°ä¸å¯ç¨",category:_e})},className:"ai-explain-btn",title:C.getAIExplanation,children:"AI"}),y.jsx("button",{onClick:()=>{ae?i.includes(z)?s(i.filter(Re=>Re!==z)):n.includes(z)?o(n.filter(Re=>Re!==z)):a.includes(z)&&u(a.filter(Re=>Re!==z)):_e==="D-PLACE"?M([z],"ea"):_e==="WALS"?u([...a,z]):M([z],"gb")},className:`feature-toggle-btn ${ae?"remove":"add"}`,children:ae?"â":"â"})]})]},z)})})]}),g.length>0&&y.jsxs("div",{className:"research-ideas-section",children:[y.jsx("h4",{children:C.researchIdeasTitle}),y.jsx("div",{className:"ideas-grid",children:g.map((ie,z)=>{const ye=(ie.features||[]).map(X=>typeof X=="object"?X.id:X);return y.jsxs("div",{className:"idea-card",children:[y.jsx("h5",{children:ie.title}),y.jsx("p",{children:ie.description}),ie.reason&&y.jsx("div",{className:"idea-meta",children:y.jsx("span",{className:"idea-reason",children:ie.reason})}),ye.length>0&&y.jsxs("div",{style:{marginTop:"10px",marginBottom:"10px",padding:"8px",background:"#f8f9fa",borderRadius:"4px",border:"1px solid #e0e0e0"},children:[y.jsxs("div",{style:{fontSize:"10px",fontWeight:"bold",color:"#666",marginBottom:"6px"},children:[h==="zh"?"å°éæ©çç¹å¾":"Features to be selected"," (",ye.length,"):"]}),y.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",fontSize:"9px"},children:[ye.slice(0,10).map((X,ae)=>{let _e="#e3f2fd",pe="#1565c0";return/^\d+[A-Z]$/.test(X)?(_e="#fff3e0",pe="#e65100"):(X.startsWith("EA")||X.startsWith("CARNEIRO_")||X.startsWith("SCCS")||X.startsWith("B")&&!X.startsWith("GB")&&/^B\d{1,4}$/.test(X)||X.includes("Richness")||/^(Annual|Monthly|Net|Precipitation|Temperature|Biome|EcoRegion|Elevation|Slope|DistToCoast)/.test(X))&&(_e="#f3e5f5",pe="#6a1b9a"),y.jsx("span",{style:{padding:"2px 6px",borderRadius:"3px",backgroundColor:_e,color:pe,fontWeight:"500",border:`1px solid ${pe}20`},children:X},ae)}),ye.length>10&&y.jsxs("span",{style:{padding:"2px 6px",color:"#999",fontSize:"9px"},children:["+",ye.length-10," ",h==="zh"?"æ´å¤":"more"]})]})]}),y.jsx("button",{onClick:X=>{X.preventDefault(),X.stopPropagation();try{if(console.log("ç¹å»Explore This Ideaï¼ç¹å¾å表:",ie.features),!ie.features||ie.features.length===0){N(h==="zh"?"该ç ç©¶æ³æ³æ²¡æå ³èçç¹å¾":"This research idea has no associated features"),setTimeout(()=>N(null),3e3);return}M(ie.features||[])}catch(ae){console.error("æ·»å ç¹å¾å¤±è´¥:",ae);const _e=h==="zh"?`æ·»å ç¹å¾å¤±è´¥: ${ae.message||"æªç¥é误"}`:`Failed to add features: ${ae.message||"Unknown error"}`;N(_e),setTimeout(()=>N(null),5e3)}},className:"explore-idea-btn",style:{cursor:"pointer"},children:C.exploreThisIdea})]},z)})})]})]})},uC=()=>{const{useDynamicData:e,selectedGBFeatures:t,setSelectedGBFeatures:n,selectedEAFeatures:i,setSelectedEAFeatures:a,selectedWALSFeatures:o,setSelectedWALSFeatures:s,reloadData:u,loading:h,lang:f,langs:d}=ee.useContext(Ut),[m,g]=ee.useState("select"),[x,b]=ee.useState([]),[E,H]=ee.useState([]),[v,w]=ee.useState([]),[A,D]=ee.useState(""),[G,j]=ee.useState(""),[Z,Y]=ee.useState(""),[q,te]=ee.useState(!1),[$,O]=ee.useState(!1),[U,T]=ee.useState(!1),N=d[f];ee.useEffect(()=>{e&&C()},[e]);const C=async()=>{try{const Re=await(await fetch("grambank-grambank-7ae000c/cldf/parameters.csv")).text(),R=mt(Re).filter(xe=>xe.ID&&xe.Name).map(xe=>({id:xe.ID,name:xe.Name,description:xe.Description||""})).sort((xe,he)=>xe.id.localeCompare(he.id)),Me=await(await fetch("dplace-cldf/cldf/variables.csv")).text(),ke=mt(Me).filter(xe=>xe.ID&&xe.Name).map(xe=>({id:xe.ID,name:xe.Name,description:xe.Description||""})).sort((xe,he)=>xe.id.localeCompare(he.id)),de=await(await fetch("cldf-datasets-wals-014143f/cldf/parameters.csv")).text(),De=mt(de).filter(xe=>xe.ID&&xe.Name).map(xe=>({id:xe.ID,name:xe.Name,description:xe.Description||"",area:xe.Area||""})).sort((xe,he)=>{var J,oe;const Oe=parseInt(((J=xe.id.match(/\d+/))==null?void 0:J[0])||0),I=parseInt(((oe=he.id.match(/\d+/))==null?void 0:oe[0])||0);return Oe!==I?Oe-I:xe.id.localeCompare(he.id)});b(R),H(ke),w(De)}catch(pe){console.error("Error loading available features:",pe)}},F=x.filter(pe=>pe.id.toLowerCase().includes(A.toLowerCase())||pe.name.toLowerCase().includes(A.toLowerCase())),M=E.filter(pe=>pe.id.toLowerCase().includes(G.toLowerCase())||pe.name.toLowerCase().includes(G.toLowerCase())),V=v.filter(pe=>pe.id.toLowerCase().includes(Z.toLowerCase())||pe.name.toLowerCase().includes(Z.toLowerCase())||pe.area&&pe.area.toLowerCase().includes(Z.toLowerCase())),k=pe=>{t.includes(pe)?n(t.filter(Re=>Re!==pe)):n([...t,pe])},Q=pe=>{i.includes(pe)?a(i.filter(Re=>Re!==pe)):a([...i,pe])},ie=pe=>{o.includes(pe)?s(o.filter(Re=>Re!==pe)):s([...o,pe])},z=()=>{n([]),a([]),s([])},ye=()=>{n(x.map(pe=>pe.id))},X=()=>{a(E.map(pe=>pe.id))},ae=()=>{s(v.map(pe=>pe.id))},_e=()=>e?y.jsxs("div",{style:{backgroundColor:"#f9f9f9",padding:"12px",borderRadius:"4px",marginBottom:"12px",border:"1px solid #ddd",fontSize:"11px"},children:[y.jsx("h4",{style:{marginTop:0,marginBottom:"10px",color:"#666",fontSize:"13px",fontWeight:"normal"},children:N.dynamicFeatureSelectorTitle||"Dynamic Feature Selection"}),y.jsxs("div",{style:{marginBottom:"10px"},children:[y.jsxs("div",{style:{display:"flex",gap:"6px",marginBottom:"8px",flexWrap:"wrap"},children:[y.jsx("button",{onClick:z,style:{padding:"4px 8px",backgroundColor:"#dc3545",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},children:N.clearAllFeatures||"Clear All"}),y.jsx("button",{onClick:ye,style:{padding:"4px 8px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},children:N.selectAllGbFeatures||"Select All GB"}),y.jsx("button",{onClick:X,style:{padding:"4px 8px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},children:N.selectAllEaFeatures||"Select All EA"}),y.jsx("button",{onClick:ae,style:{padding:"4px 8px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},children:"All WALS"})]}),y.jsxs("div",{style:{fontSize:"10px",color:"#666"},children:[N.selectedFeaturesCount||"Selected",": ",t.length," ",N.gbFeatures||"GB features",", ",i.length," ",N.eaFeatures||"EA features",", ",o.length," WALS features"]})]}),y.jsxs("div",{style:{marginBottom:"15px"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[y.jsx("span",{style:{color:"#666",fontSize:"11px",fontWeight:"bold"},children:N.gbFeatures||"Grambank Features"}),y.jsx("button",{onClick:()=>te(!q),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},children:q?N.hideSelector||"Hide":N.showSelector||"Show"})]}),q&&y.jsxs("div",{children:[y.jsx("input",{type:"text",placeholder:N.searchGbPlaceholder||"Search GB features...",value:A,onChange:pe=>D(pe.target.value),style:{width:"100%",padding:"6px",border:"1px solid #ddd",borderRadius:"3px",marginBottom:"8px",fontSize:"10px"}}),y.jsx("div",{style:{maxHeight:"150px",overflowY:"auto",border:"1px solid #ddd",borderRadius:"3px",padding:"6px",backgroundColor:"#fff"},children:F.map(pe=>y.jsxs("label",{style:{display:"flex",alignItems:"center",marginBottom:"6px",cursor:"pointer",fontSize:"10px"},children:[y.jsx("input",{type:"checkbox",checked:t.includes(pe.id),onChange:()=>k(pe.id),style:{marginRight:"6px"}}),y.jsxs("span",{children:[y.jsx("strong",{children:pe.id}),": ",pe.name]})]},pe.id))})]})]}),y.jsxs("div",{style:{marginBottom:"15px"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[y.jsx("span",{style:{color:"#666",fontSize:"11px",fontWeight:"bold"},children:N.eaFeatures||"D-PLACE Features"}),y.jsx("button",{onClick:()=>O(!$),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},children:$?N.hideSelector||"Hide":N.showSelector||"Show"})]}),$&&y.jsxs("div",{children:[y.jsx("input",{type:"text",placeholder:N.searchEaPlaceholder||"Search EA features...",value:G,onChange:pe=>j(pe.target.value),style:{width:"100%",padding:"6px",border:"1px solid #ddd",borderRadius:"3px",marginBottom:"8px",fontSize:"10px"}}),y.jsx("div",{style:{maxHeight:"150px",overflowY:"auto",border:"1px solid #ddd",borderRadius:"3px",padding:"6px",backgroundColor:"#fff"},children:M.map(pe=>y.jsxs("label",{style:{display:"flex",alignItems:"center",marginBottom:"6px",cursor:"pointer",fontSize:"10px"},children:[y.jsx("input",{type:"checkbox",checked:i.includes(pe.id),onChange:()=>Q(pe.id),style:{marginRight:"6px"}}),y.jsxs("span",{children:[y.jsx("strong",{children:pe.id}),": ",pe.name]})]},pe.id))})]})]}),y.jsxs("div",{style:{marginBottom:"15px"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[y.jsx("span",{style:{color:"#666",fontSize:"11px",fontWeight:"bold"},children:"WALS features"}),y.jsx("button",{onClick:()=>T(!U),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},children:U?N.hideSelector||"Hide":N.showSelector||"Show"})]}),U&&y.jsxs("div",{children:[y.jsx("input",{type:"text",placeholder:"Search WALS features...",value:Z,onChange:pe=>Y(pe.target.value),style:{width:"100%",padding:"6px",border:"1px solid #ddd",borderRadius:"3px",marginBottom:"8px",fontSize:"10px"}}),y.jsxs("div",{style:{fontSize:"10px",color:"#666",marginBottom:"4px"},children:["Found ",V.length," features"]}),y.jsx("div",{style:{maxHeight:"150px",overflowY:"auto",border:"1px solid #ddd",borderRadius:"3px",padding:"6px",backgroundColor:"#fff"},children:V.map(pe=>y.jsxs("label",{style:{display:"flex",alignItems:"center",marginBottom:"6px",cursor:"pointer",fontSize:"10px"},children:[y.jsx("input",{type:"checkbox",checked:o.includes(pe.id),onChange:()=>ie(pe.id),style:{marginRight:"6px"}}),y.jsxs("span",{children:[y.jsx("strong",{children:pe.id}),": ",pe.name]})]},pe.id))})]})]}),y.jsx("button",{onClick:u,disabled:h,style:{width:"100%",padding:"8px",backgroundColor:h?"#ccc":"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:h?"not-allowed":"pointer",fontSize:"11px",fontWeight:"normal"},children:h?N.loadingData||"Loading...":N.applyFeatures||"Apply Features"})]}):null;return y.jsxs("div",{className:"feature-workbench",style:{backgroundColor:"#fff",border:"1px solid #ddd",borderRadius:"6px",marginTop:"12px"},children:[y.jsxs("div",{style:{display:"flex",borderBottom:"1px solid #eee"},children:[y.jsx("button",{onClick:()=>g("select"),className:`tab-btn ${m==="select"?"active":""}`,style:{flex:1,padding:"8px 10px",background:m==="select"?"#2c7c6c":"transparent",color:m==="select"?"#fff":"#2c7c6c",border:"none",cursor:"pointer",fontSize:"12px",fontWeight:600},children:N.featureSelection||"Feature Selection"}),y.jsx("button",{onClick:()=>g("recommend"),className:`tab-btn ${m==="recommend"?"active":""}`,style:{flex:1,padding:"8px 10px",background:m==="recommend"?"#2c7c6c":"transparent",color:m==="recommend"?"#fff":"#2c7c6c",border:"none",cursor:"pointer",fontSize:"12px",fontWeight:600},children:N.smartFeatureRecommendationsTitle||"Recommendations"})]}),y.jsxs("div",{style:{padding:10},children:[y.jsxs("div",{style:{display:m==="select"?"block":"none"},children:[y.jsx(_e,{}),y.jsx(jz,{})]}),y.jsx("div",{style:{display:m==="recommend"?"block":"none"},children:y.jsx(sC,{})})]})]})},cC=async()=>{try{const n=(await(await fetch("cldf-datasets-wals-014143f/cldf/languages.csv")).text()).split(` 188`),i=n[0].split(","),a=i.indexOf("Family"),o=i.indexOf("Glottocode");if(a===-1||o===-1)return console.error("CSVæä»¶ä¸æªæ¾å°FamilyæGlottocodeå"),{};const s={};for(let u=1;u<n.length;u++){const h=n[u];if(!h.trim())continue;const f=h.split(","),d=f[a],m=f[o];if(d&&m&&d!==""){const g=m.substring(0,8);g&&!s[g]&&(s[g]=d)}}return s}catch(e){return console.error("å è½½è¯ç³»æ å°å¤±è´¥:",e),{}}},hC=async()=>{try{const n=(await(await fetch("grambank-grambank-7ae000c/cldf/languages.csv")).text()).split(` 189`),i=n[0].split(","),a=i.indexOf("Family_name"),o=i.indexOf("Family_level_ID");if(a===-1||o===-1)return console.error("CSVæä»¶ä¸æªæ¾å°Family_nameæFamily_level_IDå"),{};const s={};for(let u=1;u<n.length;u++){const h=n[u];if(!h.trim())continue;const f=h.split(","),d=f[a],m=f[o];d&&m&&d!==""&&m!==""&&(s[m]=d)}return s}catch(e){return console.error("å è½½Grambankè¯ç³»æ å°å¤±è´¥:",e),{}}},zp=async()=>{try{const[e,t]=await Promise.all([cC(),hC()]);return{...e,...t}}catch(e){return console.error("å è½½åå¹¶è¯ç³»æ å°å¤±è´¥:",e),{}}},_l=(e,t={})=>e?t[e]?t[e]:e:"Unknown",fC=()=>{var Se,de,Te,De,xe,he,Oe;const{languageData:e,filteredLanguageData:t,selectedGBFeatures:n,selectedEAFeatures:i,selectedWALSFeatures:a,gbWeights:o,eaWeights:s,walsWeights:u,lang:h,langs:f,featureFilterMode:d,featureDescriptions:m}=ee.useContext(Ut),[g,x]=ee.useState(null),[b,E]=ee.useState(null),[H,v]=ee.useState(!1),[w,A]=ee.useState("pearson"),[D,G]=ee.useState("none"),[j,Z]=ee.useState(null),[Y,q]=ee.useState([]),[te,$]=ee.useState([]),[O,U]=ee.useState({}),T=f[h],N=[{value:"pearson",label:T.correlationMethodPearson||"Pearson Correlation"},{value:"spearman",label:T.correlationMethodSpearman||"Spearman Rank Correlation"},{value:"kendall",label:T.correlationMethodKendall||"Kendall's Tau"}],C=[{value:"none",label:T.groupAnalysisNone||"No Grouping (Overall Analysis)"},{value:"family",label:T.groupAnalysisByFamily||"Group by Language Family"},{value:"region",label:T.groupAnalysisByRegion||"Group by Region"},{value:"macroarea",label:T.groupAnalysisByMacroarea||"Group by Macro Area"}],F=(I,J)=>{const oe=I.length;let P=0,K=0,re=0,le=0,se=0,ue=0;const Ae=[],me=[];for(let Ie=0;Ie<oe;Ie++)I[Ie]!==null&&J[Ie]!==null&&!isNaN(I[Ie])&&!isNaN(J[Ie])&&(P+=I[Ie],K+=J[Ie],re+=I[Ie]*J[Ie],le+=I[Ie]*I[Ie],se+=J[Ie]*J[Ie],Ae.push(I[Ie]),me.push(J[Ie]),ue++);if(ue<2)return{correlation:0,pValue:1};const Le=ue*re-P*K,Ee=Math.sqrt((ue*le-P*P)*(ue*se-K*K)),Ce=Ee===0?0:Le/Ee,He=M(Ce,ue);return{correlation:Ce,pValue:He}},M=(I,J)=>{if(J<3)return 1;const oe=Math.abs(I)*Math.sqrt((J-2)/(1-I*I));function P(Ae,me,Le){let Ee=1e-30,Ce=1,He=me+Le,Ie=me+1,tt=me-1,on=1,_t=1-He*Ae/Ie;Math.abs(_t)<Ee&&(_t=Ee),_t=1/_t;let Va=_t;for(;Ce<=100;Ce++){let Ya=2*Ce,Ni=Ce*(Le-Ce)*Ae/((tt+Ya)*(me+Ya));if(_t=1+Ni*_t,Math.abs(_t)<Ee&&(_t=Ee),on=1+Ni/on,Math.abs(on)<Ee&&(on=Ee),_t=1/_t,Va*=_t*on,Ni=-(me+Ce)*(He+Ce)*Ae/((me+Ya)*(Ie+Ya)),_t=1+Ni*_t,Math.abs(_t)<Ee&&(_t=Ee),on=1+Ni/on,Math.abs(on)<Ee&&(on=Ee),_t=1/_t,Va*=_t*on,Math.abs(Ni)<1e-10)break}return Va}function K(Ae,me,Le){let Ee=Ae===0||Ae===1?0:Math.exp(re(me+Le)-re(me)-re(Le)+me*Math.log(Ae)+Le*Math.log(1-Ae));return Ae<0||Ae>1?0:Ae<(me+1)/(me+Le+2)?Ee*P(Ae,me,Le)/me:1-Ee*P(1-Ae,Le,me)/Le}
189function re(Ae){const me=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];let Le=Ae-1,Ee=Le+5.5;Ee-=(Le+.5)*Math.log(Ee);let Ce=1.000000000190015;for(let He=0;He<6;He++)Ce+=me[He]/++Le;return-Ee+Math.log(2.5066282746310007*Ce)}const le=J-2,se=le/(le+oe*oe),ue=K(se,le/2,.5);return Math.min(1,2*ue)},V=(I,J)=>{const oe=I.length,P=[];for(let me=0;me<oe;me++)I[me]!==null&&J[me]!==null&&!isNaN(I[me])&&!isNaN(J[me])&&P.push([I[me],J[me]]);if(P.length<2)return{correlation:0,pValue:1};function K(me){const Le=me.slice().sort((Ee,Ce)=>Ee-Ce);return me.map(Ee=>Le.indexOf(Ee)+1)}const re=K(P.map(me=>me[0])),le=K(P.map(me=>me[1])),{correlation:se}=F(re,le),ue=se*Math.sqrt(P.length-1),Ae=Q(ue);return{correlation:se,pValue:Ae}},k=(I,J)=>{const oe=I.length,P=[];for(let me=0;me<oe;me++)I[me]!==null&&J[me]!==null&&!isNaN(I[me])&&!isNaN(J[me])&&P.push([I[me],J[me]]);const K=P.length;if(K<2)return{correlation:0,pValue:1};let re=0,le=0;for(let me=0;me<K-1;me++)for(let Le=me+1;Le<K;Le++){const Ee=P[me][0]-P[Le][0],Ce=P[me][1]-P[Le][1],He=Ee*Ce;He>0?re++:He<0&&le++}const se=(re-le)/(.5*K*(K-1)),ue=se*Math.sqrt(9*K*(K-1)/(2*(2*K+5))),Ae=Q(ue);return{correlation:se,pValue:Ae}},Q=I=>2*(1-ie(Math.abs(I))),ie=I=>.5*(1+z(I/Math.sqrt(2))),z=I=>{const J=I>=0?1:-1;I=Math.abs(I);const oe=.254829592,P=-.284496736,K=1.421413741,re=-1.453152027,le=1.061405429,ue=1/(1+.3275911*I),Ae=1-((((le*ue+re)*ue+K)*ue+P)*ue+oe)*ue*Math.exp(-I*I);return J*Ae},ye={pearson:{name:"Pearson",function:(I,J)=>{const oe=F(I,J);return{r:oe.correlation,p:oe.pValue}}},spearman:{name:"Spearman",function:(I,J)=>{const oe=V(I,J);return{r:oe.correlation,p:oe.pValue}}},kendall:{name:"Kendall",function:(I,J)=>{const oe=k(I,J);return{r:oe.correlation,p:oe.pValue}}}},X=I=>I==="0"||I===0?0:I==="1"||I===1?1:null,ae=I=>{if(I==null||I==="")return null;if(typeof I=="number")return I;const J=String(I),oe=J.match(/-(\d+)$/);if(oe)return parseInt(oe[1],10);const P=parseFloat(J);return isNaN(P)?null:P},_e=(I,J,oe)=>{const P=ye[oe].function,K={},re={ea_social:{name:"EA Social Features",features:J.filter(ue=>ue.startsWith("EA")&&!ue.includes("Richness"))},ea_ecological:{name:"EA Ecological Features",features:J.filter(ue=>ue.includes("Richness"))},gb_gender:{name:"GB Gender Features",features:J.filter(ue=>aa.includes(ue))},gb_classifier:{name:"GB Classifier Features",features:J.filter(ue=>ai.includes(ue))}},le={};Object.entries(re).forEach(([ue,Ae])=>{Ae.features.length>0&&(le[ue]=I.map(me=>{let Le=0,Ee=0;return Ae.features.forEach(Ce=>{let He=1;if(Ce.startsWith("GB")){const tt=o[Ce];He=tt===""||tt===null||tt===void 0?1:parseFloat(tt)||1}else{const tt=s[Ce];He=tt===""||tt===null||tt===void 0?1:parseFloat(tt)||1}let Ie=me[Ce];Ce.startsWith("GB")&&(Ie=X(Ie)),Ie!==null&&!isNaN(Ie)&&(Le+=Ie*He,Ee+=He)}),Ee>0?Le/Ee:null}))});const se=Object.keys(le);return se.length<2?{}:(se.forEach(ue=>{K[ue]={},se.forEach(Ae=>{if(ue===Ae)K[ue][Ae]={r:1,p:0};else{const me=[];for(let Ce=0;Ce<le[ue].length;Ce++)le[ue][Ce]!==null&&le[Ae][Ce]!==null&&me.push(Ce);const Le=me.map(Ce=>le[ue][Ce]),Ee=me.map(Ce=>le[Ae][Ce]);if(Le.length>0&&Ee.length>0){const Ce=P(Le,Ee);K[ue][Ae]=Ce}else K[ue][Ae]={r:0,p:1}}})}),K._groupNames=re,K)},pe=()=>{v(!0);const I=[...n,...i,...a||[]];if(I.length<2){x(null),E(null),Z(null),v(!1);return}const J=t.filter(le=>d==="intersection"?I.every(se=>{const ue=le[se];return se.startsWith("GB")?ue==="0"||ue===0||ue==="1"||ue===1:se.match(/^\d+[A-Z]$/)?ue!=null&&ue!=="":ue!=null&&ue!==""&&!isNaN(ue)}):I.some(se=>{const ue=le[se];return se.startsWith("GB")?ue==="0"||ue===0||ue==="1"||ue===1:se.match(/^\d+[A-Z]$/)?ue!=null&&ue!=="":ue!=null&&ue!==""&&!isNaN(ue)}));if(J.length<10){alert(`Not enough data for correlation analysis. Found ${J.length} languages with valid data, but need at least 10.`),x(null),E(null),Z(null),v(!1);return}const oe={},P={};I.forEach(le=>{oe[le]={},P[le]={},I.forEach(se=>{if(le===se)oe[le][se]=1,P[le][se]=0;else{const ue=J.map(Le=>{let Ee=Le[le];return le.startsWith("GB")?Ee=X(Ee):le.match(/^\d+[A-Z]$/)?Ee=ae(Ee):Ee=parseFloat(Ee),Ee}),Ae=J.map(Le=>{let Ee=Le[se];return se.startsWith("GB")?Ee=X(Ee):se.match(/^\d+[A-Z]$/)?Ee=ae(Ee):Ee=parseFloat(Ee),Ee}),me=ye[w].function(ue,Ae);oe[le][se]=me.r,P[le][se]=me.p}})});const K=_e(J,I,w);let re=null;D!=="none"&&Y.length>0&&(re=ce(J,I,w,D,Y)),x({correlations:oe,pValues:P,features:I,sampleSize:J.length,method:w}),E({correlations:K,sampleSize:J.length,method:w}),Z(re),v(!1)},Re=I=>I==null||typeof I!="number"?"":I<.001?"***":I<.01?"**":I<.05?"*":"";Os.useEffect(()=>{if(e&&e.length>0){const I=ve();if($(I),D!=="none"){const J=Y.filter(oe=>I.includes(oe));J.length!==Y.length&&q(J)}}},[e,D]),Os.useEffect(()=>{if(e&&e.length>0){const I=ve();$(I)}},[]),Os.useEffect(()=>{(async()=>{try{const J=await zp();U(J)}catch(J){console.error("å è½½è¯ç³»æ å°å¤±è´¥:",J)}})()},[]);const ve=()=>{if(!t||t.length===0)return[];const I=new Set;return t.forEach(J=>{D==="family"&&J.Family_level_ID?I.add(J.Family_level_ID):D==="region"&&J.region?I.add(J.region):D==="macroarea"&&J.Macroarea&&I.add(J.Macroarea)}),Array.from(I).sort()},R=I=>D==="family"&&_l(I,O)||I,ce=(I,J,oe,P,K)=>{if(P==="none"||K.length===0)return null;const re={};
189return K.forEach(le=>{let se;if(P==="family"?se=I.filter(me=>me.Family_level_ID===le):P==="region"?se=I.filter(me=>me.region===le):P==="macroarea"&&(se=I.filter(me=>me.Macroarea===le)),se.length<5){re[le]={error:T.sampleSizeTooSmall||"Sample size too small",sampleSize:se.length};return}const ue={},Ae={};J.forEach(me=>{ue[me]={},Ae[me]={},J.forEach(Le=>{if(me===Le)ue[me][Le]=1,Ae[me][Le]=0;else{const Ee=se.map(Ie=>{let tt=Ie[me];return me.startsWith("GB")?tt=X(tt):me.match(/^\d+[A-Z]$/)?tt=ae(tt):tt=parseFloat(tt),tt}),Ce=se.map(Ie=>{let tt=Ie[Le];return Le.startsWith("GB")?tt=X(tt):Le.match(/^\d+[A-Z]$/)?tt=ae(tt):tt=parseFloat(tt),tt}),He=ye[oe].function(Ee,Ce);ue[me][Le]=He.r,Ae[me][Le]=He.p}})}),re[le]={correlations:ue,pValues:Ae,sampleSize:se.length,features:J}}),re},Me=(I,J)=>{if(!I||Object.keys(I).length<2)return null;const oe=Object.keys(I).filter(K=>!I[K].error);if(oe.length<2)return null;const P={};return J.forEach(K=>{P[K]={},J.forEach(re=>{if(K===re){P[K][re]={maxDiff:0,groups:[]};return}const le=oe.map(ue=>({group:ue,correlation:I[ue].correlations[K][re],pValue:I[ue].pValues[K][re]})),se=le.filter(ue=>typeof ue.correlation=="number"&&!isNaN(ue.correlation));if(se.length>=2){const ue=Math.max(...se.map(Ee=>Ee.correlation)),Ae=Math.min(...se.map(Ee=>Ee.correlation)),me=ue-Ae;let Le=[];for(let Ee=0;Ee<se.length;Ee++)for(let Ce=Ee+1;Ce<se.length;Ce++)Math.abs(se[Ee].correlation-se[Ce].correlation)===me&&(Le=[{name:se[Ee].group,correlation:se[Ee].correlation},{name:se[Ce].group,correlation:se[Ce].correlation}]);P[K][re]={maxDiff:me,groups:Le,allCorrelations:le}}else P[K][re]={maxDiff:0,groups:[]}})}),P},we=I=>{if(I==null||typeof I!="number")return"#f5f5f5";const J=Math.abs(I);return I>0?J>.7?"#ffcccc":J>.5?"#ffdddd":J>.3?"#ffeeee":"#fff5f5":J>.7?"#ccffcc":J>.5?"#ddffdd":J>.3?"#eeffee":"#f5fff5"},ke=I=>{if(I==null||typeof I!="number")return"#999";const J=Math.abs(I);return J>.5?"#000":J>.3?"#333":"#666"};return y.jsxs("div",{className:"chart-container analysis-section",children:[y.jsx("div",{className:"chart-title",children:f[h].correlationAnalysis}),y.jsxs("div",{className:"correlation-controls",children:[y.jsx("select",{value:w,onChange:I=>A(I.target.value),style:{width:"100%",padding:"8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",marginBottom:"8px"},children:N.map(I=>y.jsx("option",{value:I.value,children:I.label},I.value))}),y.jsxs("div",{style:{marginBottom:"8px"},children:[y.jsxs("label",{style:{fontSize:"11px",color:"#666",display:"block",marginBottom:"4px"},children:[T.groupAnalysisType,":"]}),y.jsx("select",{value:D,onChange:I=>{G(I.target.value),q([]),Z(null)},style:{width:"100%",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px"},children:C.map(I=>y.jsx("option",{value:I.value,children:I.label},I.value))})]}),D!=="none"&&y.jsxs("div",{style:{marginBottom:"8px"},children:[y.jsx("label",{style:{fontSize:"11px",color:"#666",display:"block",marginBottom:"4px"},children:((Se=T.selectGroupsToAnalyze)==null?void 0:Se.replace("{type}",D==="family"?T.languageFamily:D==="region"?T.region:T.macroarea))||`Select ${D==="family"?"language families":D==="region"?"regions":"macro areas"} to analyze:`}),y.jsxs("div",{style:{marginBottom:"8px",display:"flex",gap:"8px"},children:[y.jsx("button",{onClick:()=>{const I=ve();q(I)},style:{padding:"4px 8px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},title:T.selectAll,children:T.selectAll}),y.jsx("button",{onClick:()=>q([]),style:{padding:"4px 8px",background:"#666",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},title:T.deselectAll,children:T.deselectAll}),y.jsx("span",{style:{fontSize:"10px",color:"#666",lineHeight:"24px"},children:((de=T.selectedCount)==null?void 0:de.replace("{count}",Y.length))||`Selected: ${Y.length}`})]}),y.jsx("div",{style:{maxHeight:"100px",overflowY:"auto",border:"1px solid #ddd",padding:"4px",borderRadius:"4px",background:"#f9f9f9"},children:(()=>ve().map(J=>y.jsxs("label",{style:{display:"block",fontSize:"11px",marginBottom:"2px"},children:[y.jsx("input",{type:"checkbox",checked:Y.includes(J),onChange:oe=>{oe.target.checked?q([...Y,J]):q(Y.filter(P=>P!==J))},style:{marginRight:"4px"}}),R(J)]},J)))()})]}),y.jsx("button",{onClick:pe,disabled:H||n.length+i.length+(a||[]).length<2,style:{width:"100%",padding:"8px",background:H?"#ccc":"#2c7c6c",color:"white",border:"none",borderRadius:"4px",cursor:H?"not-allowed":"pointer",fontSize:"12px"},children:H?T.calculating||"Calculating...":T.calculateCorrelations||"Calculate Correlations"})]}),(n.length>0||i.length>0||(a||[]).length>
1890)&&y.jsxs("div",{style:{marginTop:"15px",padding:"12px",background:"#f8f9fa",borderRadius:"4px",border:"1px solid #dee2e6"},children:[y.jsxs("h4",{style:{margin:"0 0 10px 0",fontSize:"13px",color:"#495057"},children:[h==="zh"?"已鿩çç¹å¾":"Selected Features"," (",n.length+i.length+(a||[]).length,")"]}),n.length>0&&y.jsxs("div",{style:{marginBottom:"12px"},children:[y.jsxs("h5",{style:{margin:"0 0 6px 0",fontSize:"12px",color:"#2c7c6c",fontWeight:"bold"},children:["Grambank (",n.length,")"]}),y.jsx("div",{style:{display:"grid",gap:"6px"},children:n.map(I=>{const J=m[I];return y.jsxs("div",{style:{padding:"6px 8px",background:"white",borderRadius:"3px",border:"1px solid #dee2e6",fontSize:"11px"},children:[y.jsx("strong",{style:{color:"#2c7c6c"},children:I}),J&&y.jsx("div",{style:{marginTop:"2px",color:"#666"},children:J.name||J.description||(h==="zh"?"æ æè¿°":"No description")}),!J&&y.jsx("div",{style:{marginTop:"2px",color:"#999",fontSize:"10px"},children:h==="zh"?"æ æè¿°":"No description"})]},I)})})]}),i.length>0&&y.jsxs("div",{style:{marginBottom:"12px"},children:[y.jsxs("h5",{style:{margin:"0 0 6px 0",fontSize:"12px",color:"#ff6b35",fontWeight:"bold"},children:["D-PLACE (",i.length,")"]}),y.jsx("div",{style:{display:"grid",gap:"6px"},children:i.map(I=>{const J=m[I];return y.jsxs("div",{style:{padding:"6px 8px",background:"white",borderRadius:"3px",border:"1px solid #dee2e6",fontSize:"11px"},children:[y.jsx("strong",{style:{color:"#ff6b35"},children:I}),J&&y.jsxs("div",{style:{marginTop:"2px",color:"#666"},children:[J.name||J.description||(h==="zh"?"æ æè¿°":"No description"),J.type&&y.jsxs("span",{style:{marginLeft:"6px",color:"#999",fontSize:"10px"},children:["[",J.type,"]"]})]}),!J&&y.jsx("div",{style:{marginTop:"2px",color:"#999",fontSize:"10px"},children:h==="zh"?"æ æè¿°":"No description"})]},I)})})]}),(a||[]).length>0&&y.jsxs("div",{style:{marginBottom:"0"},children:[y.jsxs("h5",{style:{margin:"0 0 6px 0",fontSize:"12px",color:"#6f42c1",fontWeight:"bold"},children:["WALS (",(a||[]).length,")"]}),y.jsx("div",{style:{display:"grid",gap:"6px"},children:(a||[]).map(I=>{const J=m[I];return y.jsxs("div",{style:{padding:"6px 8px",background:"white",borderRadius:"3px",border:"1px solid #dee2e6",fontSize:"11px"},children:[y.jsx("strong",{style:{color:"#6f42c1"},children:I}),J&&y.jsxs("div",{style:{marginTop:"2px",color:"#666"},children:[J.name||J.description||(h==="zh"?"æ æè¿°":"No description"),J.area&&y.jsxs("span",{style:{marginLeft:"6px",color:"#999",fontSize:"10px"},children:["[",J.area,"]"]})]}),!J&&y.jsx("div",{style:{marginTop:"2px",color:"#999",fontSize:"10px"},children:h==="zh"?"æ æè¿°":"No description"})]},I)})})]})]}),b&&y.jsxs("div",{id:"group-correlation-results",className:"correlation-results",style:{display:"block",marginTop:"15px"},children:[y.jsx("h4",{children:((Te=T.groupCorrelationTitle)==null?void 0:Te.replace("{method}",b.method.toUpperCase()))||`${T.groupCorrelationTitleFallback||"Group Correlations"} (${b.method.toUpperCase()})`}),y.jsx("p",{style:{fontSize:"11px",color:"#666",marginBottom:"10px"},children:(De=T.groupCorrelationSampleSize)==null?void 0:De.replace("{size}",b.sampleSize)}),y.jsx("div",{id:"group-correlation-matrix",className:"correlation-matrix",children:y.jsxs("table",{style:{borderCollapse:"collapse",width:"100%"},children:[y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{style:{background:"#f0f0f0",padding:"6px",border:"1px solid #ddd"}}),Object.entries(b.correlations._groupNames||{}).map(([I,J])=>y.jsx("th",{className:"correlation-header",style:{background:"#f0f0f0",textAlign:"center",padding:"6px",border:"1px solid #ddd",fontSize:"10px"},children:J.name},I))]})}),y.jsx("tbody",{children:Object.entries(b.correlations._groupNames||{}).map(([I,J])=>y.jsxs("tr",{children:[y.jsx("th",{className:"correlation-header",style:{background:"#f0f0f0",textAlign:"left",padding:"6px",border:"1px solid #ddd",fontSize:"10px"},children:J.name}),Object.entries(b.correlations._groupNames||{}).map(([oe,P])=>{var me,Le,Ee,Ce;const K=((Le=(me=b.correlations[I])==null?void 0:me[oe])==null?void 0:Le.r)||0,re=((Ce=(Ee=b.correlations[I])==null?void 0:Ee[oe])==null?void 0:Ce.p)||1,le=Re(re),se=we(K),ue=ke(K),Ae=typeof re=="number"&&re<.05;return y.jsxs("td",{className:"correlation-cell",style:{textAlign:"center",padding:"4px",background:se,fontWeight:Ae?"bold":"normal",border:"1px solid #ddd",fontSize:"10px",borderRadius:"2px",margin:"1px",color:ue,cursor:"pointer",transition:"all 0.2s ease"},onClick:()=>{window.explainCorrelation&&typeof K=="number"&&window.explainCorrelation(J.name,P.name,K,re,b.method)},onMouseEnter:He=>{He.target.style.transform="scale(1.05)",He.target.style.boxShadow="0 2px 8px rgba(0,0,0,0.2)"},onMouseLeave:He=>{He.target.style.transform="scale(1)",He.target.style.boxShadow="none"},title:T.clickToGetAIExplanation||"Click to get AI explanation of this correlation",children:[typeof K=="number"?K.toFixed(3):"0.000",le&&y.jsx("span",{style:{fontSize:"9px",color:Ae?"#d63384":"#888",fontWeight:"bold"},children:le})]},oe)})]},I))})]})})]}),j&&y.jsxs("div",{id:"grouped-correlation-results",className:"correlation-results",style:{display:"block",marginTop:"15p
189x"},children:[y.jsxs("h4",{children:[T.groupedCorrelationTitle," (",w.toUpperCase(),") - ",(xe=T.groupedCorrelationByType)==null?void 0:xe.replace("{type}",D==="family"?T.languageFamily:D==="region"?T.region:T.macroarea)]}),y.jsxs("div",{style:{marginBottom:"15px"},children:[y.jsx("h5",{style:{fontSize:"14px",marginBottom:"8px"},children:T.groupOverviewTitle}),y.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"10px"},children:Object.entries(j).map(([I,J])=>y.jsxs("div",{style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",background:J.error?"#fff3cd":"#f8f9fa"},children:[y.jsx("div",{style:{fontWeight:"bold",fontSize:"12px",marginBottom:"4px"},children:R(I)}),J.error?y.jsxs("div",{style:{fontSize:"11px",color:"#856404"},children:[J.error," (",T.sampleSize,": ",J.sampleSize,")"]}):y.jsxs("div",{style:{fontSize:"11px",color:"#666"},children:[T.sampleSize,": ",J.sampleSize," ",T.languages]})]},I))})]}),Object.entries(j).map(([I,J])=>J.error?null:y.jsxs("div",{style:{marginBottom:"20px"},children:[y.jsxs("h5",{style:{fontSize:"13px",marginBottom:"8px",color:"#2c7c6c"},children:[R(I)," - ",T.correlationMatrixTitle," (",T.sampleSize,": ",J.sampleSize,")"]}),y.jsx("div",{className:"correlation-matrix",style:{overflowX:"auto"},children:y.jsxs("table",{style:{borderCollapse:"collapse",minWidth:"300px"},children:[y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{style:{background:"#f0f0f0",padding:"4px",border:"1px solid #ddd",fontSize:"9px"}}),J.features.map(oe=>y.jsx("th",{style:{background:"#f0f0f0",textAlign:"center",padding:"4px",border:"1px solid #ddd",fontSize:"9px"},children:oe},oe))]})}),y.jsx("tbody",{children:J.features.map(oe=>y.jsxs("tr",{children:[y.jsx("th",{style:{background:"#f0f0f0",textAlign:"left",padding:"4px",border:"1px solid #ddd",fontSize:"9px"},children:oe}),J.features.map(P=>{var me,Le;const K=((me=J.correlations[oe])==null?void 0:me[P])||0,re=((Le=J.pValues[oe])==null?void 0:Le[P])||1,le=Re(re),se=we(K),ue=ke(K),Ae=typeof re=="number"&&re<.05;return y.jsxs("td",{style:{textAlign:"center",padding:"2px",background:se,fontWeight:Ae?"bold":"normal",border:"1px solid #ddd",fontSize:"8px",borderRadius:"2px",color:ue},title:`${oe} ${T.vs} ${P}: ${K.toFixed(3)} (${T.pValue}: ${re.toFixed(4)})`,children:[typeof K=="number"?K.toFixed(3):"0.000",le&&y.jsx("span",{style:{fontSize:"7px",color:Ae?"#d63384":"#888",fontWeight:"bold"},children:le})]},P)})]},oe))})]})})]},I))]}),j&&Object.keys(j).length>=2&&y.jsxs("div",{id:"group-differences",className:"correlation-results",style:{display:"block",marginTop:"15px"},children:[y.jsx("h4",{children:T.groupDifferencesTitle}),y.jsx("p",{style:{fontSize:"11px",color:"#666",marginBottom:"10px"},children:(he=T.compareCorrelationPatterns)==null?void 0:he.replace("{type}",D==="family"?T.languageFamily:D==="region"?T.region:T.macroarea)}),(()=>{const I=Me(j,n.concat(i));if(!I)return y.jsx("div",{style:{color:"#666",fontSize:"11px"},children:T.cannotCalculateDifferences||"æ æ³è®¡ç®å·®å¼ï¼éè¦è³å°2个ææåç»ï¼"});const J=[];return Object.entries(I).forEach(([oe,P])=>{Object.entries(P).forEach(([K,re])=>{oe!==K&&re.maxDiff>0&&J.push({feature1:oe,feature2:K,maxDiff:re.maxDiff,groups:re.groups})})}),J.sort((oe,P)=>P.maxDiff-oe.maxDiff),y.jsxs("div",{children:[y.jsxs("h5",{style:{fontSize:"13px",marginBottom:"8px",color:"#dc3545"},children:[T.maxDifferencesTitle," (10)"]}),y.jsx("div",{style:{maxHeight:"300px",overflowY:"auto"},children:y.jsxs("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:"10px"},children:[y.jsx("thead",{children:y.jsxs("tr",{style:{background:"#f8f9fa"},children:[y.jsx("th",{style:{padding:"6px",border:"1px solid #ddd",textAlign:"left"},children:T.featurePair}),y.jsx("th",{style:{padding:"6px",border:"1px solid #ddd",textAlign:"center"},children:T.maxDifference}),y.jsx("th",{style:{padding:"6px",border:"1px solid #ddd",textAlign:"left"},children:T.groupsWithMaxDiff})]})}),y.jsx("tbody",{children:J.slice(0,10).map((oe,P)=>y.jsxs("tr",{style:{background:P%2===0?"#fff":"#f8f9fa"},children:[y.jsxs("td",{style:{padding:"6px",border:"1px solid #ddd",fontWeight:"bold"},children:[oe.feature1," ",T.vs," ",oe.feature2]}),y.jsx("td",{style:{padding:"6px",border:"1px solid #ddd",textAlign:"center",color:"#dc3545",fontWeight:"bold"},children:oe.maxDiff.toFixed(3)}),y.jsx("td",{style:{padding:"6px",border:"1px solid #ddd"},children:oe.groups.map((K,re)=>y.jsxs("span",{children:[R(K.name),": ",K.correlation.toFixed(3),re<oe.groups.length-1?" vs ":""]},re))})]},P))})]})})]})})()]}),g&&y.jsxs("div",{id:"correlation-results",className:"correlation-results",style:{display:"block",marginTop:"15p
189x"},children:[y.jsxs("h4",{children:[T.featureCorrelationTitle," (",g.method.toUpperCase(),")"]}),y.jsx("p",{style:{fontSize:"11px",color:"#666",marginBottom:"10px"},children:(Oe=T.featureCorrelationSampleSize)==null?void 0:Oe.replace("{size}",g.sampleSize)}),y.jsx("div",{id:"correlation-matrix",className:"correlation-matrix",children:y.jsxs("table",{style:{borderCollapse:"collapse",width:"100%"},children:[y.jsx("thead",{children:y.jsxs("tr",{children:[y.jsx("th",{style:{background:"#f0f0f0",padding:"6px",border:"1px solid #ddd"}}),g.features.map(I=>y.jsx("th",{className:"correlation-header",style:{background:"#f0f0f0",textAlign:"center",padding:"6px",border:"1px solid #ddd",fontSize:"10px"},children:I},I))]})}),y.jsx("tbody",{children:g.features.map(I=>y.jsxs("tr",{children:[y.jsx("th",{className:"correlation-header",style:{background:"#f0f0f0",textAlign:"left",padding:"6px",border:"1px solid #ddd",fontSize:"10px"},children:I}),g.features.map(J=>{var ue,Ae;const oe=((ue=g.correlations[I])==null?void 0:ue[J])||0,P=((Ae=g.pValues[I])==null?void 0:Ae[J])||1,K=Re(P),re=we(oe),le=ke(oe),se=typeof P=="number"&&P<.05;return y.jsxs("td",{className:"correlation-cell",style:{textAlign:"center",padding:"4px",background:re,fontWeight:se?"bold":"normal",border:"1px solid #ddd",fontSize:"10px",borderRadius:"2px",margin:"1px",color:le,cursor:"pointer",transition:"all 0.2s ease"},onClick:()=>{window.explainCorrelation&&typeof oe=="number"&&window.explainCorrelation(I,J,oe,P,g.method)},onMouseEnter:me=>{me.target.style.transform="scale(1.05)",me.target.style.boxShadow="0 2px 8px rgba(0,0,0,0.2)"},onMouseLeave:me=>{me.target.style.transform="scale(1)",me.target.style.boxShadow="none"},title:T.clickToGetAIExplanation||"Click to get AI explanation of this correlation",children:[typeof oe=="number"?oe.toFixed(3):"0.000",K&&y.jsx("span",{style:{fontSize:"9px",color:se?"#d63384":"#888",fontWeight:"bold"},children:K})]},J)})]},I))})]})})]})]})},Fy=[{value:"EDGE_tree.nex",label:"EDGE Tree (566 languages) - Clean NEXUS format"},{value:"abkh1242.trees",label:"Abkhaz-Adyge (abkh1242)"},{value:"afro1255.trees",label:"Afro-Asiatic (afro1255)"},{value:"algi1248.trees",label:"Algic (algi1248)"},{value:"araw1281.trees",label:"Arawakan (araw1281)"},{value:"atha1245.trees",label:"Athabaskan (atha1245)"},{value:"atkinson2006.trees",label:"Mayan (atkinson2006)"},{value:"atla1278.trees",label:"Atlantic-Congo (atla1278)"},{value:"aust1305.trees",label:"Austronesian (aust1305)"},{value:"aust1307.trees",label:"Austronesian (aust1307)"},{value:"ayma1253.trees",label:"Aymaran (ayma1253)"},{value:"boro1281.trees",label:"Bora-Witoto (boro1281)"},{value:"bouckaert_et_al2012.trees",label:"Indo-European (bouckaert_et_al2012)"},{value:"bouckaert_et_al2018.trees",label:"Indo-European (bouckaert_et_al2018)"},{value:"bowern_and_atkinson2012.trees",label:"Pama-Nyungan (bowern_and_atkinson2012)"},{value:"cadd1255.trees",label:"Caddoan (cadd1255)"},{value:"cari1283.trees",label:"Cariban (cari1283)"},{value:"cent2225.trees",label:"Central Sudanic (cent2225)"},{value:"chacon_and_list2015.trees",label:"Tupian (chacon_and_list2015)"},{value:"chang_et_al2015.trees",label:"Sino-Tibetan (chang_et_al2015)"},{value:"chib1249.trees",label:"Chibchan (chib1249)"},{value:"chin1490.trees",label:"Chinese (chin1490)"},{value:"chon1288.trees",label:"Chonan (chon1288)"},{value:"chuk1271.trees",label:"Chukotko-Kamchatkan (chuk1271)"},{value:"coch1271.trees",label:"Cochimi-Yuman (coch1271)"},{value:"defilippo_et_al2012.trees",label:"Niger-Congo (defilippo_et_al2012)"},{value:"dizo1235.trees",label:"Dizoid (dizo1235)"},{value:"drav1251.trees",label:"Dravidian (drav1251)"},{value:"dunn_et_al2011.trees",label:"Uralic (dunn_et_al2011)"},{value:"eski1264.trees",label:"Eskimo-Aleut (eski1264)"},{value:"gong1255.trees",label:"Gongduk (gong1255)"},{value:"gray_et_al2009.trees",label:"Austronesian (gray_et_al2009)"},{value:"greenhill2015.trees",label:"Austronesian (greenhill2015)"},{value:"grollemund_et_al2015.trees",label:"Bantu (grollemund_et_al2015)"},{value:"guai1249.trees",label:"Guajiboan (guai1249)"},{value:"gunw1250.trees",label:"Gunwinyguan (gunw1250)"},{value:"haid1248.trees",label:"Haida (haid1248)"},{value:"heib1242.trees",label:"Heiban (heib1242)"},{value:"hmon1336.trees",label:"Hmong-Mien (hmon1336)"}
189,{value:"honkola_et_al2013.trees",label:"Uralic (honkola_et_al2013)"},{value:"hruschka_et_al2015.trees",label:"Sino-Tibetan (hruschka_et_al2015)"},{value:"indo1319.trees",label:"Indo-European (indo1319)"},{value:"iroq1247.trees",label:"Iroquoian (iroq1247)"},{value:"japo1237.trees",label:"Japonic (japo1237)"},{value:"jara1244.trees",label:"Jarawa-Onge (jara1244)"},{value:"jarr1235.trees",label:"Jarrakan (jarr1235)"},{value:"kadu1256.trees",label:"Kadu (kadu1256)"},{value:"kart1248.trees",label:"Kartvelian (kart1248)"},{value:"kere1287.trees",label:"Keresan (kere1287)"},{value:"khoe1240.trees",label:"Khoe-Kwadi (khoe1240)"},{value:"kiow1265.trees",label:"Kiowa-Tanoan (kiow1265)"},{value:"kitchen_et_al2009.trees",label:"Bantu (kitchen_et_al2009)"},{value:"koia1260.trees",label:"Koian (koia1260)"},{value:"kolipakam_et_al2018.trees",label:"Dravidian (kolipakam_et_al2018)"},{value:"krua1234.trees",label:"Kru (krua1234)"},{value:"kwer1242.trees",label:"Kwerba (kwer1242)"},{value:"kxaa1236.trees",label:"Kx'a (kxaa1236)"},{value:"lee2015.trees",label:"Korean (lee2015)"},{value:"lee_and_hasegawa2011.trees",label:"Japonic (lee_and_hasegawa2011)"},{value:"lee_and_hasegawa2013.trees",label:"Ainu (lee_and_hasegawa2013)"},{value:"maid1262.trees",label:"Maiduan (maid1262)"},{value:"mand1469.trees",label:"Mande (mand1469)"},{value:"mata1289.trees",label:"Matacoan (mata1289)"},{value:"maya1287.trees",label:"Mayan (maya1287)"},{value:"miwo1274.trees",label:"Miwok (miwo1274)"},{value:"mixe1284.trees",label:"Mixe-Zoque (mixe1284)"},{value:"mong1349.trees",label:"Mongolic (mong1349)"},{value:"musk1252.trees",label:"Muskogean (musk1252)"},{value:"nduu1242.trees",label:"Ndu (nduu1242)"},{value:"nilo1247.trees",label:"Nilotic (nilo1247)"},{value:"nubi1251.trees",label:"Nubian (nubi1251)"},{value:"nucl1708.trees",label:"Nuclear Trans New Guinea (nucl1708)"},{value:"nucl1709.trees",label:"Nuclear Trans New Guinea (nucl1709)"},{value:"nucl1710.trees",label:"Nuclear Trans New Guinea (nucl1710)"},{value:"otom1299.trees",label:"Otomanguean (otom1299)"},{value:"pala1350.trees",label:"Palaungic (pala1350)"},{value:"pama1250.trees",label:"Pama-Nyungan (pama1250)"},{value:"pano1259.trees",label:"Panoan (pano1259)"},{value:"pomo1273.trees",label:"Pomoan (pomo1273)"},{value:"quec1387.trees",label:"Quechuan (quec1387)"},{value:"robinson_and_holton2012.trees",label:"Alor-Pantar (robinson_and_holton2012)"},{value:"sagart_et_al2019.trees",label:"Sino-Tibetan (sagart_et_al2019)"},{value:"saha1239.trees",label:"Saharan (saha1239)"},{value:"saha1256.trees",label:"Saharan (saha1256)"},{value:"sali1255.trees",label:"Salishan (sali1255)"},{value:"sicoli_and_holton2014.trees",label:"Na-Dene (sicoli_and_holton2014)"},{value:"sino1245.trees",label:"Sino-Tibetan (sino1245)"},{value:"siou1252.trees",label:"Siouan (siou1252)"},{value:"song1307.trees",label:"Songhay (song1307)"},{value:"sout2845.trees",label:"South Bougainville (sout2845)"},{value:"surm1244.trees",label:"Surmic (surm1244)"},{value:"taik1256.trees",label:"Tai-Kadai (taik1256)"},{value:"tang1340.trees",label:"Tangkic (tang1340)"},{value:"tsim1258.trees",label:"Tsimshianic (tsim1258)"},{value:"tuca1253.trees",label:"Tucanoan (tuca1253)"},{value:"tung1282.trees",label:"Tungusic (tung1282)"},{value:"tupi1275.trees",label:"Tupian (tupi1275)"},{value:"turk1311.trees",label:"Turkic (turk1311)"},{value:"tuuu1241.trees",label:"Tuu (tuuu1241)"},{value:"ural1272.trees",label:"Uralic (ural1272)"},{value:"utoa1244.trees",label:"Uto-Aztecan (utoa1244)"},{value:"waka1280.trees",label:"Wakashan (waka1280)"},{value:"walker_and_ribeiro2011.trees",label:"Tupian (walker_and_ribeiro2011)"},{value:"wint1258.trees",label:"Wintuan (wint1258)"},{value:"worr1236.trees",label:"Worrorran (worr1236)"},{value:"yano1268.trees",label:"Yanomaman (yano1268)"},{value:"yoku1255.trees",label:"Yokutsan (yoku1255)"},{value:"yuki1242.trees",label:"Yuki (yuki1242)"},{value:"zhang_et_al2019.trees",label:"Sino-Tibetan (zhang_et_al2019)"}];function dC(e){try{let t=e.match(/TREE summary = \[.*\] (.*);/);
189if(t||(t=e.match(/TREE \* UNTITLED = \[&R\] (.*)/)),t||(t=e.match(/TREE.*=.*\[.*\] (.*)/)),!t)throw new Error("No valid tree found in NEXUS file");return t[1]}catch(t){return console.error("Error parsing NEXUS tree:",t),null}}function pC(e){try{let i=function(){const o={name:"",children:[],length:0};if(t[n]==="("){for(n++;t[n]!==")";)t[n]===","?n++:o.children.push(i());n++}if(n<t.length&&t[n]!==","&&t[n]!==")"&&t[n]!==";"){const s=t[n].split(":");o.name=s[0],s[1]&&(o.length=parseFloat(s[1])),n++}return o};const t=e.match(/[(),;]|[^(),;\s]+/g)||[];let n=0;return i()}catch(t){return console.error("Error parsing Newick:",t),null}}function mC(e,t){const n=[];function i(a){if(!a.children||a.children.length===0){const o=a.data.name;if(o){for(const[s,u]of Object.entries(t))if(u===o){n.push(s);break}}}else a.children.forEach(o=>i(o))}return i(e),n}function hb(e,t,n,i){const a=t.getBoundingClientRect(),o=a.width-16,s=a.height-16,u=oz().size([s,o-100]),h=Ap(e,w=>w.children),f=u(h);Pn(t).selectAll("*").remove();const d=Pn(t).append("svg").attr("width",o).attr("height",s).style("background","transparent"),m=d.append("g").attr("class","tree-group"),g=Sz().scaleExtent([.5,3]).translateExtent([[0,0],[o,s]]).on("zoom",function(w){m.attr("transform",w.transform)});d.call(g);const x=f.descendants(),b=rT(x,w=>w.x),E=aT(x,w=>w.x),H=(b+E)/2;m.attr("transform",`translate(40,${s/2-H})`),m.selectAll(".link").data(f.links()).enter().append("path").attr("class","link").attr("d",gz().x(w=>w.y).y(w=>w.x)).style("fill","none").style("stroke","#333").style("stroke-width","1.5px");const v=m.selectAll(".node").data(f.descendants()).enter().append("g").attr("class","node").attr("transform",w=>`translate(${w.y},${w.x})`).style("cursor","pointer").on("click",function(w,A){if(n){const D=mC(A,i);n(A,D)}}).on("mouseover",function(w,A){Pn(this).select("circle").style("fill","#ff6b6b")}).on("mouseout",function(w,A){Pn(this).select("circle").style("fill","#fff")});return v.append("circle").attr("r",3).style("fill","#fff").style("stroke","#666").style("stroke-width","2px"),v.append("text").attr("dy","0.3em").attr("x",w=>w.children?-8:8).attr("text-anchor",w=>w.children?"end":"start").style("font-size","10px").style("font-family","Arial, sans-serif").text(w=>w.data.name?w.data.name.replace(/^[^_]*_/,""):""),f}async function fb(e){if(!e)throw new Error("No tree file selected");try{let t;e==="EDGE_tree.nex"?t=`${e}`:t=`dplace-cldf/cldf/trees/${e}`;const n=await fetch(t);if(!n.ok)throw new Error(`Failed to load tree file: ${n.status}`);const i=await n.text(),a=dC(i);if(!a)throw new Error("Could not parse tree from NEXUS file");const o=pC(a);if(!o)throw new Error("Could not parse Newick string");return{treeData:o,newickString:a}}catch(t){throw console.error("Error loading tree:",t),t}}const gC=({selectedTreeProp:e,autoLoad:t=!1,controlOnly:n=!1,onSelectChange:i,onLoad:a,hideTitle:o=!1})=>{const{languageData:s,languageMapping:u,setHighlightedLanguages:h,lang:f,langs:d}=ee.useContext(Ut),[m,g]=ee.useState(""),[x,b]=ee.useState(""),[E,H]=ee.useState(!1),[v,w]=ee.useState(""),A=ee.useRef(null),D=ee.useRef(null),G=(Z,Y)=>{Y.length>0?(b(` 190 <strong>Selected Node:</strong> ${Z.data.name||"Internal node"}<br> 191 <strong>Languages highlighted:</strong> ${Y.length}<br> 192 <strong>Languages:</strong> ${Y.join(", ")} 193 `),h(Y)):(b("No matching languages found for this node."),h([]))},j=async()=>{if(!m){b("Select a tree file...");return}H(!0),w(""),b("");try{const{treeData:Z}=await fb(m);A.current&&(A.current.innerHTML="");try{if(A.current){const Y=hb(Z,A.current,G,u);D.current=Y}if(D.current){const Y=D.current.descendants().filter(te=>!te.children||te.children.length===0),q=Math.max(...D.current.descendants().map(te=>te.depth));b(` 194 <strong>Tree Information:</strong><br> 195 ⢠File: ${m}<br> 196 ⢠Number of tips (languages): ${Y.length}<br> 197 ⢠Maximum depth: ${q}<br> 198 ⢠Tree type: Phylogenetic tree from D-PLACE database<br> 199 ⢠Visualization: D3.js tree layout<br> 200 ⢠<strong>Interaction:</strong> Click on tree nodes to highlight corresponding languages on the map 201 `)}}catch(Y){console.error("Error rendering tree with D3:",Y),n||w("Error rendering tree visualization. Please try another tree file.")}}catch(Z){console.error("Error loading tree:",Z),w(`Error loading tree: ${Z.message}`)}finally{H(!1)}};return ee.useEffect(()=>{e&&e!==m&&(g(e),t&&setTimeout(()=>{j()},0))},[e,t]),n?y.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[y.jsxs("label",{style:{fontSize:"12px",fontWeight:"bold",color:"#2c7c6c",whiteSpace:"nowrap"},children:[f==="zh"?"å®¶æçé":"Family Filter",":"]}),y.jsxs("select",{id:"tree-selector",value:m,onChange:Z=>{g(Z.target.value),i&&i(Z.target.value)},style:{padding:"6px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",minWidth:120},children:[y.jsx("option",{value:"",children:d[f].selectFamily||"Select a family"}),Fy.map(Z=>y.jsx("option",{value:Z.value,children:Z.label},Z.value))]}),y.jsx("button",{id:"load-tree",onClick:async()=>{await j(),a&&a(m)},disabled:E||!m,style:{padding:"6px 10px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"12px",whiteSpace:"nowrap"},children:E?"Loading...":d[f].loadTree})]}):y.jsxs("div",{className:"chart-container analysis-section",children:[!
201o&&y.jsx("div",{className:"chart-title",children:d[f].treeTitle}),y.jsxs("div",{className:"tree-controls",children:[y.jsxs("select",{id:"tree-selector",value:m,onChange:Z=>g(Z.target.value),style:{width:"100%",padding:"8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",marginBottom:"8px"},children:[y.jsx("option",{value:"",children:d[f].selectFamily||"Select a family"}),Fy.map(Z=>y.jsx("option",{value:Z.value,children:Z.label},Z.value))]}),y.jsx("button",{id:"load-tree",onClick:async()=>{await j(),a&&a(m)},disabled:E||!m,style:{width:"100%",padding:"8px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:E?"Loading...":d[f].loadTree})]}),v&&y.jsx("div",{style:{marginTop:10,padding:10,background:"#ffebee",border:"1px solid #f44336",borderRadius:4,color:"#c62828",fontSize:"12px"},children:v}),y.jsx("div",{ref:A,id:"tree-visualization",children:!m&&y.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#666",fontSize:"14px"},children:d[f].selectFamily||"Select a family"})}),x&&y.jsx("div",{id:"tree-info",className:"tree-info",dangerouslySetInnerHTML:{__html:x}})]})},yC=()=>{const{lang:e,langs:t,languageFilter:n,setLanguageFilter:i,languageData:a,setDorecoHighlightedLanguages:o}=ee.useContext(Ut),[s,u]=ee.useState("all"),[h,f]=ee.useState([]),[d,m]=ee.useState(""),[g,x]=ee.useState([]),[b,E]=ee.useState(!1);ee.useEffect(()=>{(async()=>{try{const Y=(await(await fetch("doreco.csv")).text()).split(` 202`).slice(1).filter(q=>q.trim()).map(q=>{const[te,$,O,U,T,N]=q.split(",");return{id:te.trim(),name:$.trim(),glottocode:N.trim(),latitude:parseFloat(U),longitude:parseFloat(T),macroarea:O.trim()}});f(Y)}catch(G){console.error("Failed to load DoReCo languages:",G)}})()},[]),ee.useEffect(()=>{const D=G=>{b&&!G.target.closest(".language-search-container")&&E(!1)};return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[b]);const H=async D=>{if(!D||D.length<2){x([]),E(!1);return}try{const G=a.filter(j=>{const Z=(j.Name||j.name||"").toLowerCase(),Y=(j.Glottocode||j.glottocode||j.Language_ID||"").toLowerCase(),q=D.toLowerCase();return Z.includes(q)||Y.includes(q)}).slice(0,10);x(G),E(!0)}catch(G){console.error("Error searching languages:",G),x([]),E(!1)}},v=D=>{const G=D.target.value;m(G),H(G)},w=D=>{const G=D.Glottocode||D.glottocode||D.Language_ID;G&&(i([G]),u("custom"),m(D.Name||D.name),E(!1))},A=D=>{if(u(D),D==="all")i(null),m(""),o([]);else if(D==="doreco"){const G=h.map(Z=>Z.glottocode);i(G),m("");const j=[];G.forEach(Z=>{const Y=a.find(q=>(q.Glottocode||q.glottocode||q.Language_ID)===Z);Y&&Y.Name&&j.push(Y.Name)}),o(j),setTimeout(()=>{},100)}else D==="custom"&&o([])};return y.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",position:"relative"},children:[y.jsxs("label",{style:{fontSize:"12px",fontWeight:"bold",color:"#2c7c6c",whiteSpace:"nowrap"},children:[e==="zh"?"è¯è¨çé":"Language Filter",":"]}),y.jsxs("div",{className:"language-search-container",style:{position:"relative"},children:[y.jsx("input",{type:"text",placeholder:e==="zh"?"æç´¢è¯è¨...":"Search language...",value:d,onChange:v,style:{padding:"6px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",minWidth:150,outline:"none"}}),b&&g.length>0&&y.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,background:"white",border:"1px solid #ddd",borderRadius:"4px",boxShadow:"0 2px 8px rgba(0,0,0,0.1)",zIndex:1e3,maxHeight:200,overflowY:"auto"},children:g.map((D,G)=>y.jsxs("div",{onClick:()=>w(D),style:{padding:"8px",cursor:"pointer",borderBottom:G<g.length-1?"1px solid #eee":"none",fontSize:"12px"},onMouseEnter:j=>j.target.style.background="#f5f5f5",onMouseLeave:j=>j.target.style.background="white",children:[y.jsx("div",{style:{fontWeight:"bold"},children:D.Name||D.name}),y.jsx("div",{style:{color:"#666",fontSize:"10px"},children:D.Glottocode||D.glottocode||D.Language_ID})]},G))})]}),y.jsxs("select",{value:s,onChange:D=>A(D.target.value),style:{padding:"6px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",minWidth:120},children:[y.jsx("option",{value:"all",children:e==="zh"?"å ¨é":"All Languages"}),y.jsxs("option",{value:"doreco",children:["DoReCo (",h.length,")"]}),s==="custom"&&y.jsx("option",{value:"custom",children:e==="zh"?"èªå®ä¹":"Custom"})]})]})},xC=()=>{var j,Z,Y;const{lang:e,langs:t,selectedEAFeatures:n,featureDescriptions:i,categoricalFilters:a,setCategoricalFilters:o}=ee.useContext(Ut),s=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999","#66c2a5","#fc8d62","#8da0cb"],[u,h]=ee.useState([]),[f,d]=ee.useState({}),[m,g]=ee.useState(""),[x,b]=ee.useState(!1);ee.useState(!1);const[E,H]=ee.useState([]),v=q=>{let te=0;for(let O=0;O<q.length;O++)te=(te<<5)-te+q.charCodeAt(O),te=te&te;const $=Math.abs(te)%s.length;return s[$]},w=(q,te)=>{const $={};return q.forEach(O=>{const U=te[O];if(!U||U.length===0)return;const T=U.map(N=>`${N.name}|${N.description}`).sort().join("||");$[T]||($[T]={features:[],codes:[...U].sort((N,C)=>N.name.localeCompare(C.name))}),$[T].features.push(O)}),Object.values($).filter(O=>O.features.length>1).map(O=>({...O,features:O.features.sort()})).sort((O,U)=>U.features.length-O.features.length)},A=(q,te)=>{o($=>{const O={...$},U=te.every(T=>{var F;const C=(f[T]||[]).find(M=>M.name===q);return C&&((F=$[T])==null?void 0:F.includes(C.id))});return te.forEach(T=>{const C=(f[T]||[]).find(F=>F.name===q);C&&(O[T]||(O[T]=[]),U?(O[T]=O[T].filter(F=>F!==C.id),O[T].length===0&&delete O[T]):O[T].includes(C.id)||(O[T]=[...O[T],C.id]))}),O})};ee.useEffect(()=>{const q=async()=>{try{const $=await(await fetch("dplace-cldf/cldf/codes.csv")).text(),O=mt($),U={};O.forEach(C=>{C.Var_ID&&C.ID&&(U[C.Var_ID]||(U[C.Var_ID]=[]),U[C.Var_ID].push({id:C.ID,name:C.Name,description:C.Description||C.Name,number:C.Number}))}),d(U);const T=n.filter(C=>
202{const F=i[C];return F&&F.type==="Categorical"&&U[C]});h(T);const N=w(T,U);H(N)}catch(te){console.error("Failed to load categorical data:",te)}};n.length>0&&q()},[n,i]);const D=(q,te)=>{o($=>{const O={...$};return O[q]||(O[q]=[]),O[q].indexOf(te)>-1?(O[q]=O[q].filter(T=>T!==te),O[q].length===0&&delete O[q]):O[q]=[...O[q],te],O})},G=(q,te)=>{o($=>{const O={...$};return te?O[q]=f[q].map(U=>U.id):delete O[q],O})};return u.length===0?null:y.jsxs("div",{style:{marginBottom:"12px",padding:"12px",background:"#f8f9fa",borderRadius:"4px",border:"1px solid #dee2e6"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:x?"10px":"0"},children:[y.jsxs("h4",{style:{margin:0,fontSize:"13px",color:"#495057"},children:[e==="zh"?"åç±»ç¹å¾çé":"Categorical Feature Filter",Object.keys(a).length>0&&y.jsxs("span",{style:{marginLeft:"6px",fontSize:"10px",color:"#666",fontWeight:"normal"},children:["(",Object.keys(a).length," ",e==="zh"?"ä¸ªæ¿æ´»":"active",")"]})]}),y.jsx("button",{onClick:()=>b(!x),style:{padding:"4px 8px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"10px"},children:x?e==="zh"?"æ¶èµ·":"Collapse":e==="zh"?"å±å¼":"Expand"})]}),x&&y.jsxs("div",{children:[E.length>0&&y.jsxs("div",{style:{marginBottom:"12px",padding:"8px",background:"#e7f3ff",borderRadius:"4px",border:"1px solid #b3d9ff",fontSize:"10px"},children:[y.jsx("div",{style:{fontWeight:"bold",marginBottom:"6px",fontSize:"11px"},children:e==="zh"?"ç¸åç±»å«ç¹å¾ç» (ä¸é®éæ©):":"Identical Category Groups (Bulk Select):"}),E.map((q,te)=>y.jsxs("div",{style:{marginBottom:"8px",padding:"6px",background:"white",borderRadius:"3px",border:"1px solid #ddd"},children:[y.jsxs("div",{style:{marginBottom:"4px",fontSize:"10px",fontWeight:"bold",color:"#2c7c6c"},children:[q.features.join(", "),y.jsxs("span",{style:{marginLeft:"6px",fontSize:"9px",color:"#666",fontWeight:"normal"},children:["(",q.features.length," ",e==="zh"?"个ç¹å¾":"features",")"]})]}),y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginTop:"4px"},children:q.codes.map(($,O)=>{const U=q.features.every(T=>{var F;const C=(f[T]||[]).find(M=>M.name===$.name);return C&&((F=a[T])==null?void 0:F.includes(C.id))});return y.jsxs("button",{onClick:()=>A($.name,q.features),style:{padding:"3px 8px",background:U?"#2c7c6c":"#6c757d",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px",whiteSpace:"nowrap"},title:$.description!==$.name?$.description:"",children:[$.name,U&&" â"]},`${te}-${O}-${$.name}`)})})]},te))]}),y.jsxs("select",{value:m,onChange:q=>g(q.target.value),style:{width:"100%",padding:"6px",marginBottom:"8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px"},children:[y.jsx("option",{value:"",children:e==="zh"?"éæ©ä¸ä¸ªåç±»ç¹å¾...":"Select a categorical feature..."}),u.map(q=>{var U,T,N;const te=i[q],$=((U=a[q])==null?void 0:U.length)||0,O=((T=f[q])==null?void 0:T.length)||0;return y.jsxs("option",{value:q,children:[q," - ",((N=te==null?void 0:te.name)==null?void 0:N.substring(0,40))||q,$>0?` (${$}/${O})`:""]},q)})]}),m&&f[m]&&y.jsxs("div",{style:{marginTop:"8px",padding:"8px",background:"white",borderRadius:"4px",border:"1px solid #ddd"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px"},children:[y.jsx("span",{style:{fontSize:"11px",fontWeight:"bold"},children:((j=i[m])==null?void 0:j.name)||m}),y.jsxs("div",{style:{display:"flex",gap:"4px"},children:[y.jsx("button",{onClick:()=>G(m,!0),style:{padding:"2px 6px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},children:e==="zh"?"å
¨é":"All"}),y.jsx("button",{onClick:()=>G(m,!1),style:{padding:"2px 6px",background:"#666",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},children:e==="zh"?"æ¸
é¤":"Clear"})]})]}),y.jsx("div",{style:{maxHeight:"150px",overflowY:"auto",fontSize:"10px"},children:f[m].map(q=>{var $;const te=(($=a[m])==null?void 0:$.includes(q.id))||!1;return y.jsxs("label",{style:{display:"flex",alignItems:"center",padding:"4px",marginBottom:"2px",cursor:"pointer",background:te?"#e3f2fd":"transparent",borderRadius:"3px"},children:[y.jsx("input",{type:"checkbox",checked:te,onChange:()=>D(m,q.id),style:{marginRight:"6px"}}),y.jsxs("span",{style:{flex:1},children:[y.jsx("strong",{children:q.name}
202),q.description!==q.name&&y.jsxs("span",{style:{color:"#666",fontSize:"9px",marginLeft:"4px"},children:["- ",q.description.substring(0,50),q.description.length>50?"...":""]})]})]},q.id)})}),y.jsx("div",{style:{marginTop:"8px",fontSize:"9px",color:"#666"},children:e==="zh"?`已鿩 ${((Z=a[m])==null?void 0:Z.length)||0} 个类å«`:`Selected ${((Y=a[m])==null?void 0:Y.length)||0} categories`})]}),Object.keys(a).length>0&&y.jsxs("div",{style:{marginTop:"12px",padding:"8px",background:"#fff3cd",borderRadius:"4px",border:"1px solid #ffc107",fontSize:"10px"},children:[y.jsx("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:e==="zh"?"æ¿æ´»ççé (å°å¾è¾¹æ¡é¢è²):":"Active Filters (Map Border Colors):"}),Object.keys(a).sort().map(q=>{const te=a[q],$=v(q);return y.jsxs("div",{style:{marginBottom:"4px",display:"flex",alignItems:"center",gap:"6px"},children:[y.jsx("div",{style:{width:"16px",height:"16px",borderRadius:"50%",border:`3px solid ${$}`,background:"white",flexShrink:0}}),y.jsxs("span",{style:{flex:1},children:[y.jsx("strong",{children:q}),": ",te.length," ",e==="zh"?"个类å«":"categories"]}),y.jsx("button",{onClick:()=>{o(O=>{const U={...O};return delete U[q],U})},style:{padding:"1px 4px",background:"#dc3545",color:"white",border:"none",borderRadius:"2px",cursor:"pointer",fontSize:"9px"},children:"â"})]},q)})]})]})]})};function _C(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wC={};function Iy(e,t){return((t||wC).jsx?bC:vC).test(e)}const SC=/[ \t\n\f\r]/g;function kC(e){return typeof e=="object"?e.type==="text"?$y(e.value):!1:$y(e)}function $y(e){return e.replace(SC,"")===""}class Ul{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Ul.prototype.normal={};Ul.prototype.property={};Ul.prototype.space=void 0;function db(e,t){const n={},i={};for(const a of e)Object.assign(n,a.property),Object.assign(i,a.normal);return new Ul(n,i,t)}function fd(e){return e.toLowerCase()}class rn{constructor(t,n){this.attribute=n,this.property=t}}rn.prototype.attribute="";rn.prototype.booleanish=!1;rn.prototype.boolean=!1;rn.prototype.commaOrSpaceSeparated=!1;rn.prototype.commaSeparated=!1;rn.prototype.defined=!1;rn.prototype.mustUseProperty=!1;rn.prototype.number=!1;rn.prototype.overloadedBoolean=!1;rn.prototype.property="";rn.prototype.spaceSeparated=!1;rn.prototype.space=void 0;let TC=0;const $e=Za(),At=Za(),dd=Za(),be=Za(),ut=Za(),Dr=Za(),un=Za();function Za(){return 2**++TC}const pd=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:At,commaOrSpaceSeparated:un,commaSeparated:Dr,number:be,overloadedBoolean:dd,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Vh=Object.keys(pd);class Cp extends rn{constructor(t,n,i,a){let o=-1;if(super(t,n),Uy(this,"space",a),typeof i=="number")for(;++o<Vh.length;){const s=Vh[o];Uy(this,Vh[o],(i&pd[s])===pd[s])}}}Cp.prototype.defined=!0;function Uy(e,t,n){n&&(e[t]=n)}function Jr(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const o=new Cp(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,n[fd(i)]=i,n[fd(o.attribute)]=i}return new Ul(t,n,e.space)}const pb=Jr({properties:{ariaActiveDescendant:null,ariaAtomic:At,ariaAutoComplete:null,ariaBusy:At,ariaChecked:At,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:At,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:At,ariaFlowTo:ut,ariaGrabbed:At,ariaHasPopup:null,ariaHidden:At,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:be,ariaLive:null,ariaModal:At,ariaMultiLine:At,ariaMultiSelectable:At,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:At,ariaReadOnly:At,ariaRelevant:null,ariaRequired:At,ariaRoleDescription:ut,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:At,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function mb(e,t){return t in e?e[t]:t}function gb(e,t){return mb(e,t.toLowerCase())}const EC=Jr({attributes:{acceptcharset:"accept-charset",classname:"
202class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dr,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ut,autoFocus:$e,autoPlay:$e,blocking:ut,capture:null,charSet:null,checked:$e,cite:null,className:ut,cols:be,colSpan:null,content:null,contentEditable:At,controls:$e,controlsList:ut,coords:be|Dr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:dd,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ut,height:be,hidden:dd,high:be,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ut,itemRef:ut,itemScope:$e,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:be,pattern:null,ping:ut,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ut,required:$e,reversed:$e,rows:be,rowSpan:be,sandbox:ut,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:At,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:At,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:At,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:gb}),AC=Jr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
202dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:un,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
202dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dr,g2:Dr,glyphName:Dr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:un,rev:un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:un,requiredFeatures:un,requiredFonts:un,requiredFormats:un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:un,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:mb}),yb=Jr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 4,742 bytes, lines 202-203
202,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),xb=Jr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gb}),_b=Jr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},CC=/[A-Z]/g,Hy=/-[a-z]/g,LC=/^data[-\w.:]+$/i;function DC(e,t){const n=fd(t);let i=t,a=rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&LC.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Hy,NC);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Hy.test(o)){let s=o.replace(CC,MC);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=Cp}return new a(i,t)}function MC(e){return"-"+e.toLowerCase()}function NC(e){return e.charAt(1).toUpperCase()}const RC=db([pb,EC,yb,xb,_b],"html"),Lp=db([pb,AC,yb,xb,_b],"svg");function OC(e){return e.join(" ").trim()}var Dp={},Gy=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,jC=/\n/g,BC=/^\s*/,PC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,FC=/^:\s*/,IC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$C=/^[;\s]*/,UC=/^\s+|\s+$/g,HC=` 203`,Zy="/",qy="*",ka="",GC="comment",ZC="declaration",qC=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function a(b){var E=b.match(jC);E&&(n+=E.length);var H=b.lastIndexOf(HC);i=~H?b.length-H:i+b.length}function o(){var b={line:n,column:i};return function(E){return E.position=new s(b),f(),E}}function s(b){this.start=b,this.end={line:n,column:i},this.source=t.source}s.prototype.content=e;function u(b){var E=new Error(t.source+":"+n+":"+i+": "+b);if(E.reason=b,E.filename=t.source,E.line=n,E.column=i,E.source=e,!t.silent)throw E}function h(b){var E=b.exec(e);if(E){var H=E[0];return a(H),e=e.slice(H.length),E}}function f(){h(BC)}function d(b){var E;for(b=b||[];E=m();)E!==!1&&b.push(E);return b}function m(){var b=o();if(!(Zy!=e.charAt(0)||qy!=e.charAt(1))){for(var E=2;ka!=e.charAt(E)&&(qy!=e.charAt(E)||Zy!=e.charAt(E+1));)++E;if(E+=2,ka===e.charAt(E-1))return u("End of comment missing");var H=e.slice(2,E-2);return i+=2,a(H),e=e.slice(E),i+=2,b({type:GC,comment:H})}}function g(){var b=o(),E=h(PC);if(E){if(m(),!h(FC))return u("property missing ':'");var H=h(IC),v=b({type:ZC,property:Vy(E[0].replace(Gy,ka)),value:H?Vy(H[0].replace(Gy,ka)):ka});return h($C),v}}function x(){var b=[];d(b);for(var E;E=g();)E!==!1&&(b.push(E),d(b));return b}return f(),x()};function Vy(e){return e?e.replace(UC,ka):ka}var VC=Jo&&Jo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dp,"__esModule",{value:!0});Dp.default=KC;var YC=VC(qC);function KC(e,t){var n=null;if(!e||typeof e!="string")return n;var i=(0,YC.default)(e),a=typeof t=="function";return i.forEach(function(o){if(o.type==="declaration"){var s=o.property,u=o.value;a?t(s,u,o):u&&(n=n||{},n[s]=u)}}),n}var wc={};Object.defineProperty(wc,"__esModule",{value:!0});wc.camelCase=void 0;var XC=/^--[a-zA-Z0-9_-]+$/,WC=/-([a-z])/g,QC=/^[^-]+$/,JC=/^-(webkit|moz|ms|o|khtml)-/,eL=/^-(ms)-/,tL=function(e){return!e||QC.test(e)||XC.test(e)},nL=function(e,t){return t.toUpperCase()},Yy=function(e,t){return"".concat(t,"-")},iL=function(e,t){return t===void 0&&(t={}),tL(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(eL,Yy):e=e.replace(JC,Yy),e.replace(WC,nL))};wc.camelCase=iL;var aL=Jo&&Jo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rL=aL(Dp),oL=wc;function md(e,t){var n={};return!e||typeof e!="string"||(0,rL.default)(e,function(i,a){i&&a&&(n[(0,oL.camelCase)(i,t)]=a)}),n}md.default=md;var lL=md;const sL=ec(lL),vb=bb("end"),Mp=bb("start");function bb(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function uL(e){const t=Mp(e),n=vb(e);if(t&&n)return{start:t,end:n}}function Yo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ky(e.position):"start"in e||"end"in e?Ky(e):"line"in e||"column"in e?gd(e):""}function gd(e){return Xy(e&&e.line)+":"+Xy(e&&e.column)}function Ky(e){return gd(e&&e.start)+"-"+gd(e&&e.end)}function Xy(e){return e&&typeof e=="number"?e:1}
vendor: 1,921 bytes, line 203
203class Zt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(s=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?o.ruleId=i:(o.source=i.slice(0,h),o.ruleId=i.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=Yo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const Np={}.hasOwnProperty,cL=new Map,hL=/[A-Z]/g,fL=new Set(["table","tbody","thead","tfoot","tr"]),dL=new Set(["td","th"]),wb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pL(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=wL(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 1,235 bytes, line 203
203if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=bL(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Lp:RC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Sb(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Sb(e,t,n){if(t.type==="element")return mL(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return gL(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xL(e,t,n);if(t.type==="mdxjsEsm")return yL(e,t);if(t.type==="root")return _L(e,t,n);if(t.type==="text")return vL(e,t)}function mL(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=Lp,e.schema=a),e.ancestors.push(t);const o=Tb(e,t.tagName,!1),s=SL(e,t);let u=Op(e,t);return fL.has(t.tagName)&&(u=u.filter(function(h){return typeof h=="string"?!kC(h):!0}
vendor: 5,070 bytes, line 203
203)),kb(e,s,o,t),Rp(s,u),e.ancestors.pop(),e.schema=i,e.create(t,o,s,n)}function gL(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}vl(e,t.position)}function yL(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vl(e,t.position)}function xL(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=Lp,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Tb(e,t.name,!0),s=kL(e,t),u=Op(e,t);return kb(e,s,o,t),Rp(s,u),e.ancestors.pop(),e.schema=i,e.create(t,o,s,n)}function _L(e,t,n){const i={};return Rp(i,Op(e,t)),e.create(t,e.Fragment,i,n)}function vL(e,t){return t.value}function kb(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Rp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bL(e,t,n){return i;function i(a,o,s,u){const f=Array.isArray(s.children)?n:t;return u?f(o,s,u):f(o,s)}}function wL(e,t){return n;function n(i,a,o,s){const u=Array.isArray(o.children),h=Mp(i);return t(a,o,s,u,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function SL(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Np.call(t.properties,a)){const o=TL(e,a,t.properties[a]);if(o){const[s,u]=o;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&dL.has(t.tagName)?i=u:n[s]=u}}if(i){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function kL(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const o=i.data.estree.body[0];o.type;const s=o.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else vl(e,t.position);else{const a=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const u=i.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else vl(e,t.position);else o=i.value===null?!0:i.value;n[a]=o}return n}function Op(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:cL;for(;++i<t.children.length;){const o=t.children[i];let s;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const f=a.get(h)||0;s=h+"-"+f,a.set(h,f+1)}}const u=Sb(e,o,s);u!==void 0&&n.push(u)}return n}function TL(e,t,n){const i=DC(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?_C(n):OC(n)),i.property==="style"){let a=typeof n=="object"?n:EL(e,String(n));return e.stylePropertyNameCase==="css"&&(a=AL(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?zC[i.property]||i.property:i.attribute,n]}}function EL(e,t){try{return sL(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new Zt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=wb+"#cannot-parse-style-attribute",a}}function Tb(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,s;for(;++o<a.length;){const u=Iy(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}i=s}else i=Iy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Np.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);vl(e)}function vl(e,t){const n=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=wb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function AL(e){const t={};let n;for(n in e)Np.call(e,n)&&(t[zL(n)]=e[n]);return t}function zL(e){let t=e.replace(hL,CL);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CL(e){return"-"+e.toLowerCase()}const Yh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},LL={};function DL(e,t){const n=t||LL,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Eb(e,i,a)}function Eb(e,t,n){if(ML(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wy(e.children,t,n)}return Array.isArray(e)?Wy(e,t,n):""}function Wy(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=Eb(e[a],t,n);return i.join("")}function ML(e){return!!(e&&typeof e=="object")}const Qy=document.createElement("i");function jp(e){const t="&"+e+";";Qy.innerHTML=t;const n=Qy.textContent;
vendor: 11,473 bytes, line 203
203return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ri(e,t,n,i){const a=e.length;let o=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,i.length<1e4)s=Array.from(i),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<i.length;)s=i.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function zn(e,t){return e.length>0?(ri(e,e.length,0,t),e):t}const Jy={}.hasOwnProperty;function NL(e){const t={};let n=-1;for(;++n<e.length;)RL(t,e[n]);return t}function RL(e,t){let n;for(n in t){const a=(Jy.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Jy.call(a,s)||(a[s]=[]);const u=o[s];OL(a[s],Array.isArray(u)?u:u?[u]:[])}}}function OL(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);ri(e,0,0,i)}function Ab(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=ca(/[A-Za-z]/),dn=ca(/[\dA-Za-z]/),jL=ca(/[#-'*+\--9=?A-Z^-~]/);function yd(e){return e!==null&&(e<32||e===127)}const xd=ca(/\d/),BL=ca(/[\dA-Fa-f]/),PL=ca(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function tn(e){return e!==null&&(e<0||e===32)}function Qe(e){return e===-2||e===-1||e===32}const FL=ca(/\p{P}|\p{S}/u),IL=ca(/\s/);function ca(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function eo(e){const t=[];let n=-1,i=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&dn(e.charCodeAt(n+1))&&dn(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(s=String.fromCharCode(o,u),a=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(i,n),encodeURIComponent(s)),i=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(i)}function ct(e,t,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(h){return Qe(h)?(e.enter(n),u(h)):t(h)}function u(h){return Qe(h)&&o++<a?(e.consume(h),u):(e.exit(n),t(h))}}const $L={tokenize:UL};function UL(e){const t=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return t;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ct(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),o(u)}function o(u){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Pe(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),s)}}const HL={tokenize:GL},ex={tokenize:ZL};function GL(e){const t=this,n=[];let i=0,a,o,s;return u;function u(A){if(i<n.length){const D=n[i];return t.containerState=D[1],e.attempt(D[0].continuation,h,f)(A)}return f(A)}function h(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&w();const D=t.events.length;let G=D,j;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){j=t.events[G][1].end;break}v(i);let Z=D;for(;Z<t.events.length;)t.events[Z][1].end={...j},Z++;return ri(t.events,G+1,0,t.events.slice(D)),t.events.length=Z,f(A)}return u(A)}function f(A){if(i===n.length){if(!a)return g(A);if(a.currentConstruct&&a.currentConstruct.concrete)return b(A);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ex,d,m)(A)}function d(A){return a&&w(),v(i),g(A)}function m(A){return t.parser.lazy[t.now().line]=i!==n.length,s=t.now().offset,b(A)}function g(A){return t.containerState={},e.attempt(ex,x,b)(A)}function x(A){return i++,n.push([t.currentConstruct,t.containerState]),g(A)}function b(A){if(A===null){a&&w(),v(0),e.consume(A);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),E(A)}function E(A){if(A===null){H(e.exit("chunkFlow"),!0),v(0),e.consume(A);return}return Pe(A)?(e.consume(A),H(e.exit("chunkFlow")),i=0,t.interrupt=void 0,u):(e.consume(A),E)}function H(A,D){const G=t.sliceStream(A);if(D&&G.push(null),A.previous=o,o&&(o.next=A),o=A,a.defineSkip(A.start),a.write(G),t.parser.lazy[A.start.line]){let j=a.events.length;for(;j--;)if(a.events[j][1].start.offset<s&&(!a.events[j][1].end||a.events[j][1].end.offset>s))return;const Z=t.events.length;let Y=Z,q,te;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(q){te=t.events[Y][1].end;break}q=!0}for(v(i),j=Z;j<t.events.length;)t.events[j][1].end={...te},j++;ri(t.events,Y+1,0,t.events.slice(Z)),t.events.length=j}}function v(A){let D=n.length;for(;D-- >A;){const G=n[D];t.containerState=G[1],G[0].exit.call(t,e)}n.length=A}function w(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function ZL(e,t,n){return ct(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tx(e){if(e===null||tn(e)||IL(e))return 1;if(FL(e))return 2}function Bp(e,t,n){const i=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!i.includes(o)&&(t=o(t,n),i.push(o))}return t}const _d={name:"attention",resolveAll:qL,tokenize:VL};function qL(e,t){let n=-1,i,a,o,s,u,h,f,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},g={...e[n][1].start};nx(m,-h),nx(g,h),s={type:h>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},u={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},o={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},a={type:h>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[i][1].end={...s.start},e[n][1].start={...u.end},f=[],e[i][1].end.offset-e[i][1].start.offset&&(f=zn(f,[["enter",e[i][1],t],["exit",e[i][1],t]])),f=zn(f,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",o,t]]),f=zn(f,Bp(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),f=zn(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,f=zn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ri(e,i-1,n-i+3,f),n=i+f.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function VL(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=tx(i);let o;return s;function s(h){return o=h,e.enter("attentionSequence"),u(h)}function u(h){if(h===o)return e.consume(h),u;const f=e.exit("attentionSequence"),d=tx(h),m=!d||d===2&&a||n.includes(h),g=!a||a===2&&d||n.includes(i);return f._open=!!(o===42?m:m&&(a||!g)),f._close=!!(o===42?g:g&&(d||!m)),t(h)}}function nx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const YL={name:"autolink",tokenize:KL};function KL(e,t,n){let i=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return Xn(x)?(e.consume(x),s):x===64?n(x):f(x)}function s(x){return x===43||x===45||x===46||dn(x)?(i=1,u(x)):f(x)}function u(x){return x===58?(e.consume(x),i=0,h):(x===43||x===45||x===46||dn(x))&&i++<32?(e.consume(x),u):(i=0,f(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||yd(x)?n(x):(e.consume(x),h)}function f(x){return x===64?(e.consume(x),d):jL(x)?(e.consume(x),f):n(x)}function d(x){return dn(x)?m(x):n(x)}function m(x){return x===46?(e.consume(x),i=0,d):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):g(x)}function g(x){if((x===45||dn(x))&&i++<63){const b=x===45?g:m;return e.consume(x),b}return n(x)}}const Sc={partial:!0,tokenize:XL};function XL(e,t,n){return i;function i(o){return Qe(o)?ct(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||Pe(o)?t(o):n(o)}}const zb={continuation:{tokenize:QL},exit:JL,name:"blockQuote",tokenize:WL};function WL(e,t,n){const i=this;return a;function a(s){if(s===62){const u=i.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Qe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function QL(e,t,n){const i=this;return a;function a(s){return Qe(s)?ct(e,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(zb,t,n)(s)}}function JL(e){e.exit("blockQuote")}const Cb={name:"characterEscape",tokenize:eD};function eD(e,t,n){return i;function i(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return PL(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Lb={name:"characterReference",tokenize:tD};function tD(e,t,n){const i=this;let a=0,o,s;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),h}function h(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,s=dn,d(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=BL,d):(e.enter("characterReferenceValue"),o=7,s=xd,d(m))}function d(m){if(m===59&&a){const g=e.exit("characterReferenceValue");return s===dn&&!jp(i.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&a++<o?(e.consume(m),d):n(m)}}const ix={partial:!0,tokenize:iD},ax={concrete:!0,name:"codeFenced",tokenize:nD};function nD(e,t,n){const i=this,a={partial:!0,tokenize:G};let o=0,s=0,u;return h;function h(j){return f(j)}function f(j){const Z=i.events[i.events.length-1];return o=Z&&Z[1].type==="linePrefix"?Z[2].sliceSerialize(Z[1],!0).length:0,u=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(j)}function d(j){return j===u?(s++,e.consume(j),d):s<3?n(j):(e.exit("codeFencedFenceSequence"),Qe(j)?ct(e,m,"whitespace")(j):m(j))}function m(j){return j===null||Pe(j)?(e.exit("codeFencedFence"),i.interrupt?t(j):e.check(ix,E,D)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(j))}function g(j){return j===null||Pe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(j)):Qe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,x,"whitespace")(j)):j===96&&j===u?n(j):(e.consume(j),g)}
vendor: 12,323 bytes, line 203
203function x(j){return j===null||Pe(j)?m(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||Pe(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(j)):j===96&&j===u?n(j):(e.consume(j),b)}function E(j){return e.attempt(a,D,H)(j)}function H(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),v}function v(j){return o>0&&Qe(j)?ct(e,w,"linePrefix",o+1)(j):w(j)}function w(j){return j===null||Pe(j)?e.check(ix,E,D)(j):(e.enter("codeFlowValue"),A(j))}function A(j){return j===null||Pe(j)?(e.exit("codeFlowValue"),w(j)):(e.consume(j),A)}function D(j){return e.exit("codeFenced"),t(j)}function G(j,Z,Y){let q=0;return te;function te(N){return j.enter("lineEnding"),j.consume(N),j.exit("lineEnding"),$}function $(N){return j.enter("codeFencedFence"),Qe(N)?ct(j,O,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):O(N)}function O(N){return N===u?(j.enter("codeFencedFenceSequence"),U(N)):Y(N)}function U(N){return N===u?(q++,j.consume(N),U):q>=s?(j.exit("codeFencedFenceSequence"),Qe(N)?ct(j,T,"whitespace")(N):T(N)):Y(N)}function T(N){return N===null||Pe(N)?(j.exit("codeFencedFence"),Z(N)):Y(N)}}}function iD(e,t,n){const i=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return i.parser.lazy[i.now().line]?n(s):t(s)}}const Kh={name:"codeIndented",tokenize:rD},aD={partial:!0,tokenize:oD};function rD(e,t,n){const i=this;return a;function a(f){return e.enter("codeIndented"),ct(e,o,"linePrefix",4+1)(f)}function o(f){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(f):n(f)}function s(f){return f===null?h(f):Pe(f)?e.attempt(aD,s,h)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Pe(f)?(e.exit("codeFlowValue"),s(f)):(e.consume(f),u)}function h(f){return e.exit("codeIndented"),t(f)}}function oD(e,t,n){const i=this;return a;function a(s){return i.parser.lazy[i.now().line]?n(s):Pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):ct(e,o,"linePrefix",4+1)(s)}function o(s){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Pe(s)?a(s):n(s)}}const lD={name:"codeText",previous:uD,resolve:sD,tokenize:cD};function sD(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function uD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cD(e,t,n){let i=0,a,o;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),i++,u):(e.exit("codeTextSequence"),h(m))}function h(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),h):m===96?(o=e.enter("codeTextSequence"),a=0,d(m)):Pe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Pe(m)?(e.exit("codeTextData"),h(m)):(e.consume(m),f)}function d(m){return m===96?(e.consume(m),a++,d):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",f(m))}}class hD{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&To(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),To(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),To(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);To(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);To(this.left,n.reverse())}}}function To(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Db(e){const t={};let n=-1,i,a,o,s,u,h,f;const d=new hD(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(i=d.get(n),n&&i[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,fD(d,n)),n=t[n],f=!0);else if(i[1]._container){for(o=n,a=void 0;o--;)if(s=d.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(i[1].end={...d.get(a)[1].start},u=d.slice(a,n),u.unshift(i),d.splice(a,n-a+1,u))}}return ri(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!f}function fD(e,t){const n=e.get(t)[1],i=e.get(t)[2];let a=t-1;const o=[];let s=n._tokenizer;s||(s=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,h=[],f={};let d,m,g=-1,x=n,b=0,E=0;const H=[E];for(;x;){for(;e.get(++a)[1]!==x;);o.push(a),x._tokenizer||(d=i.sliceStream(x),x.next||d.push(null),m&&s.defineSkip(x.start),x._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),x._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=x,x=x.next}for(x=n;++g<u.length;)u[g][0]==="exit"&&u[g-1][0]==="enter"&&u[g][1].type===u[g-1][1].type&&u[g][1].start.line!==u[g][1].end.line&&(E=g+1,H.push(E),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(s.events=[],x?(x._tokenizer=void 0,x.previous=void 0):H.pop(),g=H.length;g--;){const v=u.slice(H[g],H[g+1]),w=o.pop();h.push([w,w+v.length-1]),e.splice(w,2,v)}for(h.reverse(),g=-1;++g<h.length;)f[b+h[g][0]]=b+h[g][1],b+=h[g][1]-h[g][0]-1;return f}const dD={resolve:mD,tokenize:gD},pD={partial:!0,tokenize:yD};function mD(e){return Db(e),e}function gD(e,t){let n;return i;function i(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?o(u):Pe(u)?e.check(pD,s,o)(u):(e.consume(u),a)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function yD(e,t,n){const i=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ct(e,o,"linePrefix")}function o(s){if(s===null||Pe(s))return n(s);const u=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(i.parser.constructs.flow,n,t)(s)}}function Mb(e,t,n,i,a,o,s,u,h){const f=h||Number.POSITIVE_INFINITY;let d=0;return m;function m(v){return v===60?(e.enter(i),e.enter(a),e.enter(o),e.consume(v),e.exit(o),g):v===null||v===32||v===41||yd(v)?n(v):(e.enter(i),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(v))}function g(v){return v===62?(e.enter(o),e.consume(v),e.exit(o),e.exit(a),e.exit(i),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===62?(e.exit("chunkString"),e.exit(u),g(v)):v===null||v===60||Pe(v)?n(v):(e.consume(v),v===92?b:x)}function b(v){return v===60||v===62||v===92?(e.consume(v),x):x(v)}function E(v){return!d&&(v===null||v===41||tn(v))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(i),t(v)):d<f&&v===40?(e.consume(v),d++,E):v===41?(e.consume(v),d--,E):v===null||v===32||v===40||yd(v)?n(v):(e.consume(v),v===92?H:E)}function H(v){return v===40||v===41||v===92?(e.consume(v),E):E(v)}}function Nb(e,t,n,i,a,o){const s=this;let u=0,h;return f;function f(x){return e.enter(i),e.enter(a),e.consume(x),e.exit(a),e.enter(o),d}function d(x){return u>999||x===null||x===91||x===93&&!h||x===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(x):x===93?(e.exit(o),e.enter(a),e.consume(x),e.exit(a),e.exit(i),t):Pe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||x===91||x===93||Pe(x)||u++>999?(e.exit("chunkString"),d(x)):(e.consume(x),h||(h=!Qe(x)),x===92?g:m)}function g(x){return x===91||x===92||x===93?(e.consume(x),u++,m):m(x)}}function Rb(e,t,n,i,a,o){let s;return u;function u(g){return g===34||g===39||g===40?(e.enter(i),e.enter(a),e.consume(g),e.exit(a),s=g===40?41:g,h):n(g)}function h(g){return g===s?(e.enter(a),e.consume(g),e.exit(a),e.exit(i),t):(e.enter(o),f(g))}function f(g){return g===s?(e.exit(o),h(s)):g===null?n(g):Pe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ct(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===s||g===null||Pe(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?m:d)}function m(g){return g===s||g===92?(e.consume(g),d):d(g)}}function Ko(e,t){let n;return i;function i(a){return Pe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):Qe(a)?ct(e,i,n?"linePrefix":"lineSuffix")(a):t(a)}}const xD={name:"definition",tokenize:vD},_D={partial:!0,tokenize:bD};function vD(e,t,n){const i=this;let a;return o;function o(x){return e.enter("definition"),s(x)}function s(x){return Nb.call(i,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function u(x){return a=Mr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):n(x)}function h(x){return tn(x)?Ko(e,f)(x):f(x)}function f(x){return Mb(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function d(x){return e.attempt(_D,m,m)(x)}function m(x){return Qe(x)?ct(e,g,"whitespace")(x):g(x)}function g(x){return x===null||Pe(x)?(e.exit("definition"),i.parser.defined.push(a),t(x)):n(x)}}function bD(e,t,n){return i;function i(u){return tn(u)?Ko(e,a)(u):n(u)}function a(u){return Rb(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return Qe(u)?ct(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Pe(u)?t(u):n(u)}}const wD={name:"hardBreakEscape",tokenize:SD};function SD(e,t,n){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return Pe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const kD={name:"headingAtx",resolve:TD,tokenize:ED};function TD(e,t){let n=e.length-2,i=3,a,o;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},o={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},ri(e,i,n-i+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]]
vendor: 14,920 bytes, line 203
203)),e}function ED(e,t,n){let i=0;return a;function a(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&i++<6?(e.consume(d),s):d===null||tn(d)?(e.exit("atxHeadingSequence"),u(d)):n(d)}function u(d){return d===35?(e.enter("atxHeadingSequence"),h(d)):d===null||Pe(d)?(e.exit("atxHeading"),t(d)):Qe(d)?ct(e,u,"whitespace")(d):(e.enter("atxHeadingText"),f(d))}function h(d){return d===35?(e.consume(d),h):(e.exit("atxHeadingSequence"),u(d))}function f(d){return d===null||d===35||tn(d)?(e.exit("atxHeadingText"),u(d)):(e.consume(d),f)}}const AD=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rx=["pre","script","style","textarea"],zD={concrete:!0,name:"htmlFlow",resolveTo:DD,tokenize:MD},CD={partial:!0,tokenize:RD},LD={partial:!0,tokenize:ND};function DD(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function MD(e,t,n){const i=this;let a,o,s,u,h;return f;function f(z){return d(z)}function d(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),g):z===47?(e.consume(z),o=!0,E):z===63?(e.consume(z),a=3,i.interrupt?t:k):Xn(z)?(e.consume(z),s=String.fromCharCode(z),H):n(z)}function g(z){return z===45?(e.consume(z),a=2,x):z===91?(e.consume(z),a=5,u=0,b):Xn(z)?(e.consume(z),a=4,i.interrupt?t:k):n(z)}function x(z){return z===45?(e.consume(z),i.interrupt?t:k):n(z)}function b(z){const ye="CDATA[";return z===ye.charCodeAt(u++)?(e.consume(z),u===ye.length?i.interrupt?t:O:b):n(z)}function E(z){return Xn(z)?(e.consume(z),s=String.fromCharCode(z),H):n(z)}function H(z){if(z===null||z===47||z===62||tn(z)){const ye=z===47,X=s.toLowerCase();return!ye&&!o&&rx.includes(X)?(a=1,i.interrupt?t(z):O(z)):AD.includes(s.toLowerCase())?(a=6,ye?(e.consume(z),v):i.interrupt?t(z):O(z)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(z):o?w(z):A(z))}return z===45||dn(z)?(e.consume(z),s+=String.fromCharCode(z),H):n(z)}function v(z){return z===62?(e.consume(z),i.interrupt?t:O):n(z)}function w(z){return Qe(z)?(e.consume(z),w):te(z)}function A(z){return z===47?(e.consume(z),te):z===58||z===95||Xn(z)?(e.consume(z),D):Qe(z)?(e.consume(z),A):te(z)}function D(z){return z===45||z===46||z===58||z===95||dn(z)?(e.consume(z),D):G(z)}function G(z){return z===61?(e.consume(z),j):Qe(z)?(e.consume(z),G):A(z)}function j(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),h=z,Z):Qe(z)?(e.consume(z),j):Y(z)}function Z(z){return z===h?(e.consume(z),h=null,q):z===null||Pe(z)?n(z):(e.consume(z),Z)}function Y(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||tn(z)?G(z):(e.consume(z),Y)}function q(z){return z===47||z===62||Qe(z)?A(z):n(z)}function te(z){return z===62?(e.consume(z),$):n(z)}function $(z){return z===null||Pe(z)?O(z):Qe(z)?(e.consume(z),$):n(z)}function O(z){return z===45&&a===2?(e.consume(z),C):z===60&&a===1?(e.consume(z),F):z===62&&a===4?(e.consume(z),Q):z===63&&a===3?(e.consume(z),k):z===93&&a===5?(e.consume(z),V):Pe(z)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(CD,ie,U)(z)):z===null||Pe(z)?(e.exit("htmlFlowData"),U(z)):(e.consume(z),O)}function U(z){return e.check(LD,T,ie)(z)}function T(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),N}function N(z){return z===null||Pe(z)?U(z):(e.enter("htmlFlowData"),O(z))}function C(z){return z===45?(e.consume(z),k):O(z)}function F(z){return z===47?(e.consume(z),s="",M):O(z)}function M(z){if(z===62){const ye=s.toLowerCase();return rx.includes(ye)?(e.consume(z),Q):O(z)}return Xn(z)&&s.length<8?(e.consume(z),s+=String.fromCharCode(z),M):O(z)}function V(z){return z===93?(e.consume(z),k):O(z)}function k(z){return z===62?(e.consume(z),Q):z===45&&a===2?(e.consume(z),k):O(z)}function Q(z){return z===null||Pe(z)?(e.exit("htmlFlowData"),ie(z)):(e.consume(z),Q)}function ie(z){return e.exit("htmlFlow"),t(z)}}function ND(e,t,n){const i=this;return a;function a(s){return Pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return i.parser.lazy[i.now().line]?n(s):t(s)}}function RD(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Sc,t,n)}}const OD={name:"htmlText",tokenize:jD};function jD(e,t,n){const i=this;let a,o,s;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),h}function h(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),G):k===63?(e.consume(k),A):Xn(k)?(e.consume(k),Y):n(k)}function f(k){return k===45?(e.consume(k),d):k===91?(e.consume(k),o=0,b):Xn(k)?(e.consume(k),w):n(k)}function d(k){return k===45?(e.consume(k),x):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),g):Pe(k)?(s=m,F(k)):(e.consume(k),m)}function g(k){return k===45?(e.consume(k),x):m(k)}function x(k){return k===62?C(k):k===45?g(k):m(k)}function b(k){const Q="CDATA[";return k===Q.charCodeAt(o++)?(e.consume(k),o===Q.length?E:b):n(k)}function E(k){return k===null?n(k):k===93?(e.consume(k),H):Pe(k)?(s=E,F(k)):(e.consume(k),E)}function H(k){return k===93?(e.consume(k),v):E(k)}function v(k){return k===62?C(k):k===93?(e.consume(k),v):E(k)}function w(k){return k===null||k===62?C(k):Pe(k)?(s=w,F(k)):(e.consume(k),w)}function A(k){return k===null?n(k):k===63?(e.consume(k),D):Pe(k)?(s=A,F(k)):(e.consume(k),A)}function D(k){return k===62?C(k):A(k)}function G(k){return Xn(k)?(e.consume(k),j):n(k)}function j(k){return k===45||dn(k)?(e.consume(k),j):Z(k)}function Z(k){return Pe(k)?(s=Z,F(k)):Qe(k)?(e.consume(k),Z):C(k)}function Y(k){return k===45||dn(k)?(e.consume(k),Y):k===47||k===62||tn(k)?q(k):n(k)}function q(k){return k===47?(e.consume(k),C):k===58||k===95||Xn(k)?(e.consume(k),te):Pe(k)?(s=q,F(k)):Qe(k)?(e.consume(k),q):C(k)}function te(k){return k===45||k===46||k===58||k===95||dn(k)?(e.consume(k),te):$(k)}function $(k){return k===61?(e.consume(k),O):Pe(k)?(s=$,F(k)):Qe(k)?(e.consume(k),$):q(k)}function O(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,U):Pe(k)?(s=O,F(k)):Qe(k)?(e.consume(k),O):(e.consume(k),T)}function U(k){return k===a?(e.consume(k),a=void 0,N):k===null?n(k):Pe(k)?(s=U,F(k)):(e.consume(k),U)}function T(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||tn(k)?q(k):(e.consume(k),T)}function N(k){return k===47||k===62||tn(k)?q(k):n(k)}function C(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function F(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),M}function M(k){return Qe(k)?ct(e,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):V(k)}function V(k){return e.enter("htmlTextData"),s(k)}}const Pp={name:"labelEnd",resolveAll:ID,resolveTo:$D,tokenize:UD},BD={tokenize:HD},PD={tokenize:GD},FD={tokenize:ZD};function ID(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",t+=a}}return e.length!==n.length&&ri(e,0,e.length,n),e}function $D(e,t){let n=e.length,i=0,a,o,s,u;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(s=n);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[o+i+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",h,t],["enter",f,t]],u=zn(u,e.slice(o+1,o+i+3)),u=zn(u,[["enter",d,t]]),u=zn(u,Bp(t.parser.constructs.insideSpan.null,e.slice(o+i+4,s-3),t)),u=zn(u,[["exit",d,t],e[s-2],e[s-1],["exit",f,t]]),u=zn(u,e.slice(s+1)),u=zn(u,[["exit",h,t]]),ri(e,o,e.length,u),e}function UD(e,t,n){const i=this;let a=i.events.length,o,s;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){o=i.events[a][1];break}return u;function u(g){return o?o._inactive?m(g):(s=i.parser.defined.includes(Mr(i.sliceSerialize({start:o.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),h):n(g)}function h(g){return g===40?e.attempt(BD,d,s?d:m)(g):g===91?e.attempt(PD,d,s?f:m)(g):s?d(g):m(g)}function f(g){return e.attempt(FD,d,m)(g)}function d(g){return t(g)}function m(g){return o._balanced=!0,n(g)}}function HD(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return tn(m)?Ko(e,o)(m):o(m)}function o(m){return m===41?d(m):Mb(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return tn(m)?Ko(e,h)(m):d(m)}function u(m){return n(m)}function h(m){return m===34||m===39||m===40?Rb(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):d(m)}function f(m){return tn(m)?Ko(e,d)(m):d(m)}function d(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function GD(e,t,n){const i=this;return a;function a(u){return Nb.call(i,e,o,s,"reference","referenceMarker","referenceString")(u)}function o(u){return i.parser.defined.includes(Mr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function ZD(e,t,n){return i;function i(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const qD={name:"labelStartImage",resolveAll:Pp.resolveAll,tokenize:VD};function VD(e,t,n){const i=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):t(u)}}const YD={name:"labelStartLink",resolveAll:Pp.resolveAll,tokenize:KD};function KD(e,t,n){const i=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(s):t(s)}}const Xh={name:"lineEnding",tokenize:XD};function XD(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ct(e,t,"linePrefix")}}const cu={name:"thematicBreak",tokenize:WD};function WD(e,t,n){let i=0,a;return o;function o(f){return e.enter("thematicBreak"),s(f)}function s(f){return a=f,u(f)}function u(f){return f===a?(e.enter("thematicBreakSequence"),h(f)):i>=3&&(f===null||Pe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function h(f){return f===a?(e.consume(f),i++,h):(e.exit("thematicBreakSequence"),Qe(f)?ct(e,u,"whitespace")(f):u(f))}}const Kt={continuation:{tokenize:tM},exit:iM,name:"list",tokenize:eM},QD={partial:!0,tokenize:aM},JD={partial:!0,tokenize:nM};function eM(e,t,n){const i=this,a=i.events[i.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return u;function u(x){const b=i.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||x===i.containerState.marker:xd(x)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(cu,n,f)(x):f(x);if(!i.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return n(x)}function h(x){return xd(x)&&++s<10?(e.consume(x),h):(!i.interrupt||s<2)&&(i.containerState.marker?x===i.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),f(x)):n(x)}function f(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||x,e.check(Sc,i.interrupt?n:d,e.attempt(QD,g,m))}function d(x){return i.containerState.initialBlankLine=!0,o++,g(x)}function m(x){return Qe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),g):n(x)}function g(x){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function tM(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Sc,a,o);function a(u){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ct(e,t,"listItemIndent",i.containerState.size+1)(u)}function o(u){return i.containerState.furtherBlankLines||!Qe(u)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,s(u)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(JD,t,s)(u))}function s(u){return i.containerState._closeFlow=!0,i.interrupt=void 0,ct(e,e.attempt(Kt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function nM(e,t,n){const i=this;return ct(e,a,"listItemIndent",i.containerState.size+1);function a(o){const s=i.events[i.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===i.containerState.size?t(o):n(o)}}function iM(e){e.exit(this.containerState.type)}function aM(e,t,n){const i=this;return ct(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function a(o){const s=i.events[i.events.length-1];return!Qe(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const ox={name:"setextUnderline",resolveTo:rM,tokenize:oM};function rM(e,t){let n=e.length,i,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",s,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end={...e[o][1].end}):e[i][1]=s,e.push(["exit",s,t]),e}
vendor: 4,616 bytes, line 203
203function oM(e,t,n){const i=this;let a;return o;function o(f){let d=i.events.length,m;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){m=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),a=f,s(f)):n(f)}function s(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===a?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),Qe(f)?ct(e,h,"lineSuffix")(f):h(f))}function h(f){return f===null||Pe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const lM={tokenize:sM};function sM(e){const t=this,n=e.attempt(Sc,i,e.attempt(this.parser.constructs.flowInitial,a,ct(e,e.attempt(this.parser.constructs.flow,a,e.attempt(dD,a)),"linePrefix")));return n;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const uM={resolveAll:jb()},cM=Ob("string"),hM=Ob("text");function Ob(e){return{resolveAll:jb(e==="text"?fM:void 0),tokenize:t};function t(n){const i=this,a=this.parser.constructs[e],o=n.attempt(a,s,u);return s;function s(d){return f(d)?o(d):u(d)}function u(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),h}function h(d){return f(d)?(n.exit("data"),o(d)):(n.consume(d),h)}function f(d){if(d===null)return!0;const m=a[d];let g=-1;if(m)for(;++g<m.length;){const x=m[g];if(!x.previous||x.previous.call(i,i.previous))return!0}return!1}}}function jb(e){return t;function t(n,i){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,i):n}}function fM(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],a=t.sliceStream(i);let o=a.length,s=-1,u=0,h;for(;o--;){const f=a[o];if(typeof f=="string"){for(s=f.length;f.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(f===-2)h=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||h||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const dM={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:zb},pM={91:xD},mM={[-2]:Kh,[-1]:Kh,32:Kh},gM={35:kD,42:cu,45:[ox,cu],60:zD,61:ox,95:cu,96:ax,126:ax},yM={38:Lb,92:Cb},xM={[-5]:Xh,[-4]:Xh,[-3]:Xh,33:qD,38:Lb,42:_d,60:[YL,OD],91:YD,92:[wD,Cb],93:Pp,95:_d,96:lD},_M={null:[_d,uM]},vM={null:[42,95]},bM={null:[]},wM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vM,contentInitial:pM,disable:bM,document:dM,flow:gM,flowInitial:mM,insideSpan:_M,string:yM,text:xM},Symbol.toStringTag,{value:"Module"}));function SM(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let s=[],u=[];const h={attempt:Z(G),check:Z(j),consume:w,enter:A,exit:D,interrupt:Z(j,{interrupt:!0})},f={code:null,containerState:{},defineSkip:E,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:x,write:m};let d=t.tokenize.call(f,h);return t.resolveAll&&o.push(t),f;function m($){return s=zn(s,$),H(),s[s.length-1]!==null?[]:(Y(t,0),f.events=Bp(o,f.events,f),f.events)}function g($,O){return TM(x($),O)}function x($){return kM(s,$)}function b(){const{_bufferIndex:$,_index:O,line:U,column:T,offset:N}=i;return{_bufferIndex:$,_index:O,line:U,column:T,offset:N}}function E($){a[$.line]=$.column,te()}function H(){let $;for(;i._index<s.length;){const O=s[i._index];if(typeof O=="string")for($=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===$&&i._bufferIndex<O.length;)v(O.charCodeAt(i._bufferIndex));else v(O)}}function v($){d=d($)}function w($){Pe($)?(i.line++,i.column=1,i.offset+=$===-3?2:1,te()):$!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===s[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=$}function A($,O){const U=O||{};return U.type=$,U.start=b(),f.events.push(["enter",U,f]),u.push(U),U}function D($){const O=u.pop();return O.end=b(),f.events.push(["exit",O,f]),O}function G($,O){Y($,O.from)}
vendor: 18,384 bytes, lines 203-209
203function j($,O){O.restore()}function Z($,O){return U;function U(T,N,C){let F,M,V,k;return Array.isArray(T)?ie(T):"tokenize"in T?ie([T]):Q(T);function Q(ae){return _e;function _e(pe){const Re=pe!==null&&ae[pe],ve=pe!==null&&ae.null,R=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return ie(R)(pe)}}function ie(ae){return F=ae,M=0,ae.length===0?C:z(ae[M])}function z(ae){return _e;function _e(pe){return k=q(),V=ae,ae.partial||(f.currentConstruct=ae),ae.name&&f.parser.constructs.disable.null.includes(ae.name)?X():ae.tokenize.call(O?Object.assign(Object.create(f),O):f,h,ye,X)(pe)}}function ye(ae){return $(V,k),N}function X(ae){return k.restore(),++M<F.length?z(F[M]):C}}}function Y($,O){$.resolveAll&&!o.includes($)&&o.push($),$.resolve&&ri(f.events,O,f.events.length-O,$.resolve(f.events.slice(O),f)),$.resolveTo&&(f.events=$.resolveTo(f.events,f))}function q(){const $=b(),O=f.previous,U=f.currentConstruct,T=f.events.length,N=Array.from(u);return{from:T,restore:C};function C(){i=$,f.previous=O,f.currentConstruct=U,f.events.length=T,u=N,te()}}function te(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function kM(e,t){const n=t.start._index,i=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(i,o)];else{if(s=e.slice(n,a),i>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(i):s.shift()}o>0&&s.push(e[a].slice(0,o))}return s}function TM(e,t){let n=-1;const i=[];let a;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=` 204`;break}case-3:{s=`\r 205`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(o)}a=o===-2,i.push(s)}return i.join("")}function EM(e){const i={constructs:NL([wM,...(e||{}).extensions||[]]),content:a($L),defined:[],document:a(HL),flow:a(lM),lazy:{},string:a(cM),text:a(hM)};return i;function a(o){return s;function s(u){return SM(i,o,u)}}}function AM(e){for(;!Db(e););return e}const lx=/[\0\t\n\r]/g;function zM(){let e=1,t="",n=!0,i;return a;function a(o,s,u){const h=[];let f,d,m,g,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(lx.lastIndex=m,f=lx.exec(o),g=f&&f.index!==void 0?f.index:o.length,x=o.charCodeAt(g),!f){t=o.slice(m);break}if(x===10&&m===g&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),m<g&&(h.push(o.slice(m,g)),e+=g-m),x){case 0:{h.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,h.push(-2);e++<d;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}m=g+1}return u&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const CM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LM(e){return e.replace(CM,DM)}function DM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return Ab(n.slice(o?2:1),o?16:10)}return jp(n)||e}const Bb={}.hasOwnProperty;function MM(e,t,n){return typeof t!="string"&&(n=t,t=void 0),NM(n)(AM(EM(n).document().write(zM()(e,t,!0))))}function NM(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(De),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(ke),blockQuote:o(ve),characterEscape:q,characterReference:q,codeFenced:o(R),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(R,s),codeText:o(ce,s),codeTextData:q,data:q,codeFlowValue:q,definition:o(Me),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(we),hardBreakEscape:o(Se),hardBreakTrailing:o(Se),htmlFlow:o(de,s),htmlFlowData:q,htmlText:o(de,s),htmlTextData:q,image:o(Te),label:s,link:o(De),listItem:o(he),listItemValue:g,listOrdered:o(xe,m),listUnordered:o(xe),paragraph:o(Oe),reference:z,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(ke),strong:o(I),thematicBreak:o(oe)},exit:{atxHeading:h(),atxHeadingSequence:G,autolink:h(),autolinkEmail:Re,autolinkProtocol:pe,blockQuote:h(),characterEscapeValue:te,characterReferenceMarkerHexadecimal:X,characterReferenceMarkerNumeric:X,characterReferenceValue:ae,characterReference:_e,codeFenced:h(H),codeFencedFence:E,codeFencedFenceInfo:x,codeFencedFenceMeta:b,codeFlowValue:te,codeIndented:h(v),codeText:h(N),codeTextData:te,data:te,definition:h(),definitionDestinationString:D,definitionLabelString:w,definitionTitleString:A,emphasis:h(),hardBreakEscape:h(O),hardBreakTrailing:h(O),htmlFlow:h(U),htmlFlowData:te,htmlText:h(T),htmlTextData:te,image:h(F),label:V,labelText:M,lineEnding:$,link:h(C),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ye,resourceDestinationString:k,resourceTitleString:Q,resource:ie,setextHeading:h(Y),setextHeadingLineSequence:Z,setextHeadingText:j,strong:h(),thematicBreak:h()}};Pb(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(P){let K={type:"root",children:[]};const re={stack:[K],tokenStack:[],config:t,enter:u,exit:f,buffer:s,resume:d,data:n},le=[];let se=-1;for(;++se<P.length;)if(P[se][1].type==="listOrdered"||P[se][1].type==="listUnordered")if(P[se][0]==="enter")le.push(se);else{const ue=le.pop();se=a(P,ue,se)}for(se=-1;++se<P.length;){const ue=t[P[se][0]];Bb.call(ue,P[se][1].type)&&ue[P[se][1].type].call(Object.assign({sliceSerialize:P[se][2].sliceSerialize},re),P[se][1])}if(re.tokenStack.length>0){const ue=re.tokenStack[re.tokenStack.length-1];(ue[1]||sx).call(re,void 0,ue[0])}for(K.position={start:Bi(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Bi(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)K=t.transforms[se](K)||K;return K}function a(P,K,re){let le=K-1,se=-1,ue=!1,Ae,me,Le,Ee;for(;++le<=re;){const Ce=P[le];switch(Ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ce[0]==="enter"?se++:se--,Ee=void 0;break}case"lineEndingBlank":{Ce[0]==="enter"&&(Ae&&!Ee&&!se&&!Le&&(Le=le),Ee=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ee=void 0}if(!se&&Ce[0]==="enter"&&Ce[1].type==="listItemPrefix"||se===-1&&Ce[0]==="exit"&&(Ce[1].type==="listUnordered"||Ce[1].type==="listOrdered")){if(Ae){let He=le;for(me=void 0;He--;){const Ie=P[He];if(Ie[1].type==="lineEnding"||Ie[1].type==="lineEndingBlank"){if(Ie[0]==="exit")continue;me&&(P[me][1].type="lineEndingBlank",ue=!0),Ie[1].type="lineEnding",me=He}else if(!(Ie[1].type==="linePrefix"||Ie[1].type==="blockQuotePrefix"||Ie[1].type==="blockQuotePrefixWhitespace"||Ie[1].type==="blockQuoteMarker"||Ie[1].type==="listItemIndent"))break}Le&&(!me||Le<me)&&(Ae._spread=!0),Ae.end=Object.assign({},me?P[me][1].start:Ce[1].end),P.splice(me||le,0,["exit",Ae,Ce[2]]),le++,re++}if(Ce[1].type==="listItemPrefix"){const He={type:"listItem",_spread:!1,start:Object.assign({},Ce[1].start),end:void 0};Ae=He,P.splice(le,0,["enter",He,Ce[2]]),le++,re++,Le=void 0,Ee=!0}}}return P[K][1]._spread=ue,re}function o(P,K){return re;function re(le){u.call(this,P(le),le),K&&K.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(P,K,re){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([K,re||void 0]),P.position={start:Bi(K.start),end:void 0}}function h(P){return K;function K(re){P&&P.call(this,re),f.call(this,re)}}function f(P,K){const re=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==P.type&&(K?K.call(this,P,le[0]):(le[1]||sx).call(this,P,le[0]));else throw new Error("Cannot close `"+P.type+"` ("+Yo({start:P.start,end:P.end})+"): itâs not open");re.position.end=Bi(P.end)}function d(){return DL(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(P){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0}}function x(){const P=this.resume(),K=this.stack[this.stack.length-1];K.lang=P}function b(){const P=this.resume(),K=this.stack[this.stack.length-1];K.meta=P}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function H(){const P=this.resume(),K=this.stack[this.stack.length-1];K.value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const P=this.resume(),K=this.stack[this.stack.length-1];K.value=P.replace(/(\r?\n|\r)$/g,"")}function w(P){const K=this.resume(),re=this.stack[this.stack.length-1];re.label=K,re.identifier=Mr(this.sliceSerialize(P)).toLowerCase()}function A(){const P=this.resume(),K=this.stack[this.stack.length-1];K.title=P}function D(){const P=this.resume(),K=this.stack[this.stack.length-1];K.url=P}function G(P){const K=this.stack[this.stack.length-1];if(!K.depth){const re=this.sliceSerialize(P).length;K.depth=re}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function Z(P){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function q(P){const re=this.stack[this.stack.length-1].children;let le=re[re.length-1];(!le||le.type!=="text")&&(le=J(),le.position={start:Bi(P.start),end:void 0},re.push(le)),this.stack.push(le)}function te(P){const K=this.stack.pop();K.value+=this.sliceSerialize(P),K.position.end=Bi(P.end)}function $(P){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=K.children[K.children.length-1];re.position.end=Bi(P.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(q.call(this,P),te.call(this,P))}function O(){this.data.atHardBreak=!0}function U(){const P=this.resume(),K=this.stack[this.stack.length-1];K.value=P}function T(){const P=this.resume(),K=this.stack[this.stack.length-1];K.value=P}function N(){const P=this.resume(),K=this.stack[this.stack.length-1];K.value=P}function C(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=K,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function F(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=K,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function M(P){const K=this.sliceSerialize(P),re=this.stack[this.stack.length-2];re.label=LM(K),re.identifier=Mr(K).toLowerCase()}function V(){const P=this.stack[this.stack.length-1],K=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const le=P.children;re.children=le}else re.alt=K}function k(){const P=this.resume(),K=this.stack[this.stack.length-1];K.url=P}function Q(){const P=this.resume(),K=this.stack[this.stack.length-1];K.title=P}function ie(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function ye(P){const K=this.resume(),re=this.stack[this.stack.length-1];re.label=K,re.identifier=Mr(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function X(P){this.data.characterReferenceType=P.type}function ae(P){const K=this.sliceSerialize(P),re=this.data.characterReferenceType;let le;re?(le=Ab(K,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=jp(K);const se=this.stack[this.stack.length-1];se.value+=le}function _e(P){const K=this.stack.pop();K.position.end=Bi(P.end)}function pe(P){te.call(this,P);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(P)}function Re(P){te.call(this,P);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(P)}function ve(){return{type:"blockquote",children:[]}}function R(){return{type:"code",lang:null,meta:null,value:""}}function ce(){return{type:"inlineCode",value:""}}function Me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function ke(){return{type:"heading",depth:0,children:[]}}function Se(){return{type:"break"}}function de(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function xe(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function he(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function I(){return{type:"strong",children:[]}}function J(){return{type:"text",value:""}}function oe(){return{type:"thematicBreak"}}}function Bi(e){return{line:e.line,column:e.column,offset:e.offset}}function Pb(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Pb(e,i):RM(e,i)}}function RM(e,t){let n;for(n in t)if(Bb.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function sx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is still open")}function OM(e){const t=this;t.parser=n;function n(i){return MM(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jM(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function BM(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 206`}]}function PM(e,t){const n=t.value?t.value+` 207`:"",i={};t.lang&&(i.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function FM(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IM(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $M(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=eo(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let s,u=e.footnoteCounts.get(i);u===void 0?(u=0,e.footnoteOrder.push(i),s=e.footnoteOrder.length):s=o+1,u+=1,e.footnoteCounts.set(i,u);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,h);const f={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,f),e.applyData(t,f)}function UM(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HM(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Fb(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=i:a.push({type:"text",value:i}),a}function GM(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Fb(e,t);const a={src:eo(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function ZM(e,t){const n={src:eo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function qM(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function VM(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Fb(e,t);const a={href:eo(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function YM(e,t){const n={href:eo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function KM(e,t,n){const i=e.all(t),a=n?XM(n):Ib(t),o={},s=[];if(typeof t.checked=="boolean"){const d=i[0];let m;d&&d.type==="element"&&d.tagName==="p"?m=d:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<i.length;){const d=i[u];(a||u!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:` 208`}),d.type==="element"&&d.tagName==="p"&&!a?s.push(...d.children):s.push(d)}const h=i[i.length-1];h&&(a||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:` 209`});const f={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,f),e.applyData(t,f)}function XM(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Ib(n[i])}return t}function Ib(e){const t=e.spread;return t??e.children.length>1}function WM(e,t){const n={},i=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<i.length;){const s=i[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,
vendor: 4,284 bytes, line 209
209!0)};return e.patch(t,o),e.applyData(t,o)}function QM(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JM(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function e3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function t3(e,t){const n=e.all(t),i=n.shift(),a=[];if(i){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Mp(t.children[1]),h=vb(t.children[t.children.length-1]);u&&h&&(s.position={start:u,end:h}),a.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function n3(e,t,n){const i=n?n.children:void 0,o=(i?i.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let h=-1;const f=[];for(;++h<u;){const m=t.children[h],g={},x=s?s[h]:void 0;x&&(g.align=x);let b={type:"element",tagName:o,properties:g,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),f.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,d),e.applyData(t,d)}function i3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ux=9,cx=32;function a3(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const o=[];for(;i;)o.push(hx(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return o.push(hx(t.slice(a),a>0,!1)),o.join("")}function hx(e,t,n){let i=0,a=e.length;if(t){let o=e.codePointAt(i);for(;o===ux||o===cx;)i++,o=e.codePointAt(i)}if(n){let o=e.codePointAt(a-1);for(;o===ux||o===cx;)a--,o=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function r3(e,t){const n={type:"text",value:a3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function o3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const l3={blockquote:jM,break:BM,code:PM,delete:FM,emphasis:IM,footnoteReference:$M,heading:UM,html:HM,imageReference:GM,image:ZM,inlineCode:qM,linkReference:VM,link:YM,listItem:KM,list:WM,paragraph:QM,root:JM,strong:e3,table:t3,tableCell:i3,tableRow:n3,text:r3,thematicBreak:o3,toml:Ls,yaml:Ls,definition:Ls,footnoteDefinition:Ls};function Ls(){}const $b=-1,kc=0,Xo=1,Yu=2,Fp=3,Ip=4,$p=5,Up=6,Ub=7,Hb=8,fx=typeof self=="object"?self:globalThis,s3=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),i=a=>{if(e.has(a))return e.get(a);const[o,s]=t[a];switch(o){case kc:case $b:return n(s,a);case Xo:{const u=n([],a);for(const h of s)u.push(i(h));return u}case Yu:{const u=n({},a);for(const[h,f]of s)u[i(h)]=i(f);return u}case Fp:return n(new Date(s),a);case Ip:{const{source:u,flags:h}=s;return n(new RegExp(u,h),a)}case $p:{const u=n(new Map,a);for(const[h,f]of s)u.set(i(h),i(f));return u}case Up:{const u=n(new Set,a);for(const h of s)u.add(i(h));return u}case Ub:{const{name:u,message:h}=s;return n(new fx[u](h),a)}case Hb:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new fx[o](s),a)};return i},dx=e=>s3(new Map,e)(0),or="",{toString:u3}={},{keys:c3}=Object,Eo=e=>{const t=typeof e;if(t!=="object"||!e)return[kc,t];const n=u3.call(e).slice(8,-1);switch(n){case"Array":return[Xo,or];case"Object":return[Yu,or];case"Date":return[Fp,or];case"RegExp":return[Ip,or];case"Map":return[$p,or];case"Set":return[Up,or];case"DataView":return[Xo,n]}return n.includes("Array")?[Xo,n]:n.includes("Error")?[Ub,n]:[Yu,n]},Ds=([e,t])=>e===kc&&(t==="function"||t==="symbol"),h3=(e,t,n,i)=>{const a=(s,u)=>{const h=i.push(s)-1;return n.set(u,h),h},o=s=>{if(n.has(s))return n.get(s);let[u,h]=Eo(s);switch(u){case kc:{let d=s;switch(h){case"bigint":u=Hb,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);d=null;break;case"undefined":return a([$b],s)}return a([u,d],s)}case Xo:{if(h){let g=s;return h==="DataView"?g=new Uint8Array(s.buffer):h==="ArrayBuffer"&&(g=ne
vendor: 5,314 bytes, lines 209-211
209w Uint8Array(s)),a([h,[...g]],s)}const d=[],m=a([u,d],s);for(const g of s)d.push(o(g));return m}case Yu:{if(h)switch(h){case"BigInt":return a([h,s.toString()],s);case"Boolean":case"Number":case"String":return a([h,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const d=[],m=a([u,d],s);for(const g of c3(s))(e||!Ds(Eo(s[g])))&&d.push([o(g),o(s[g])]);return m}case Fp:return a([u,s.toISOString()],s);case Ip:{const{source:d,flags:m}=s;return a([u,{source:d,flags:m}],s)}case $p:{const d=[],m=a([u,d],s);for(const[g,x]of s)(e||!(Ds(Eo(g))||Ds(Eo(x))))&&d.push([o(g),o(x)]);return m}case Up:{const d=[],m=a([u,d],s);for(const g of s)(e||!Ds(Eo(g)))&&d.push(o(g));return m}}const{message:f}=s;return a([u,{name:h,message:f}],s)};return o},px=(e,{json:t,lossy:n}={})=>{const i=[];return h3(!(t||n),!!t,new Map,i)(e),i},Ku=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?dx(px(e,t)):structuredClone(e):(e,t)=>dx(px(e,t));function f3(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function d3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function p3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||f3,i=e.options.footnoteBackLabel||d3,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let h=-1;for(;++h<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[h]);if(!f)continue;const d=e.all(f),m=String(f.identifier).toUpperCase(),g=eo(m.toLowerCase());let x=0;const b=[],E=e.footnoteCounts.get(m);for(;E!==void 0&&++x<=E;){b.length>0&&b.push({type:"text",value:" "});let w=typeof n=="string"?n:n(h,x);typeof w=="string"&&(w={type:"text",value:w}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,x),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const H=d[d.length-1];if(H&&H.type==="element"&&H.tagName==="p"){const w=H.children[H.children.length-1];w&&w.type==="text"?w.value+=" ":H.children.push({type:"text",value:" "}),H.children.push(...b)}else d.push(...b);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(d,!0)};e.patch(f,v),u.push(v)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ku(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:` 210`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:` 211`}]}}const Gb=function(e){if(e==null)return x3;if(typeof e=="function")return Tc(e);if(typeof e=="object")return Array.isArray(e)?m3(e):g3(e);if(typeof e=="string")return y3(e);throw new Error("Expected function, string, or object as test")};function m3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gb(e[n]);return Tc(i);function i(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function g3(e){const t=e;return Tc(n);function n(i){const a=i;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function y3(e){return Tc(t);function t(n){return n&&n.type===e}}function Tc(e){return t;function t(n,i,a){return!!(_3(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function x3(){return!0}function _3(e){return e!==null&&typeof e=="object"&&"type"in e}const Zb=[],v3=!0,mx=!1,b3="skip";function w3(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const o=Gb(a),s=i?-1:1;u(e,void 0,[])();function u(h,f,d){const m=h&&typeof h=="object"?h:{};if(typeof m.type=="string"){const x=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return g;function g(){let x=Zb,b,E,H;if((!t||o(h,f,d[d.length-1]||void 0))&&(x=S3(n(h,d)),x[0]===mx))return x;if("children"in h&&h.children){const v=h;if(v.children&&x[0]!==b3)for(E=(i?v.children.length:-1)+s,H=d.concat(v);E>-1&&E<v.children.length;){const w=v.children[E];if(b=u(w,E,H)(),b[0]===mx)return b;E=typeof b[1]=="number"?b[1]:E+s}}return x}}}function S3(e){return Array.isArray(e)?e:typeof e=="number"?[v3,e]:e==null?Zb:[e]}function qb(e,t,n,i){let a,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,a=n):(o=t,s=n,a=i),w3(e,o,u,a);function u(h,f){const d=f[f.length-1],m=d?d.children.indexOf(h):void 0;return s(h,m,d)}}const vd={}.hasOwnProperty,k3={};function T3(e,t){const n=t||k3,i=new Map,a=new Map,o=new Map,s={...l3,...n.handlers},u={all:f,applyData:A3,definitionById:i,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:s,one:h,options:n,patch:E3,wrap:C3};return qb(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const m=d.type==="definition"?i:a,g=String(d.identifier).toUpperCase();m.has(g)||m.set(g,d)}}),u;function h(d,m){const g=d.type,x=u.handlers[g];if(vd.call(u.handlers,g)&&x)return x(u,d,m);if(u.options.passThrough&&u.options.passThrough.includes(g)){if("children"in d){const{children:E,...H}=d,v=Ku(H);return v.children=u.all(d),v}return Ku(d)}return(u.options.unknownHandler||z3)(u,d,m)}function f(d){const m=[];
vendor: 17,193 bytes, lines 211-215
211if("children"in d){const g=d.children;let x=-1;for(;++x<g.length;){const b=u.one(g[x],d);if(b){if(x&&g[x-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=gx(b.value)),!Array.isArray(b)&&b.type==="element")){const E=b.children[0];E&&E.type==="text"&&(E.value=gx(E.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function E3(e,t){e.position&&(t.position=uL(e))}function A3(e,t){let n=t;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const s="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Ku(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function z3(e,t){const n=t.data||{},i="value"in t&&!(vd.call(n,"hProperties")||vd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function C3(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:` 212`});++i<e.length;)i&&n.push({type:"text",value:` 213`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:` 214`}),n}function gx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function yx(e,t){const n=T3(e,t),i=n.one(e,void 0),a=p3(n),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&o.children.push({type:"text",value:` 215`},a),o}function L3(e,t){return e&&"run"in e?async function(n,i){const a=yx(n,{file:i,...t});await e.run(a,i)}:function(n,i){return yx(n,{file:i,...e||t})}}function xx(e){if(e)throw e}var hu=Object.prototype.hasOwnProperty,Vb=Object.prototype.toString,_x=Object.defineProperty,vx=Object.getOwnPropertyDescriptor,bx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Vb.call(t)==="[object Array]"},wx=function(t){if(!t||Vb.call(t)!=="[object Object]")return!1;var n=hu.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&hu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var a;for(a in t);return typeof a>"u"||hu.call(t,a)},Sx=function(t,n){_x&&n.name==="__proto__"?_x(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},kx=function(t,n){if(n==="__proto__")if(hu.call(t,n)){if(vx)return vx(t,n).value}else return;return t[n]},D3=function e(){var t,n,i,a,o,s,u=arguments[0],h=1,f=arguments.length,d=!1;for(typeof u=="boolean"&&(d=u,u=arguments[1]||{},h=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});h<f;++h)if(t=arguments[h],t!=null)for(n in t)i=kx(u,n),a=kx(t,n),u!==a&&(d&&a&&(wx(a)||(o=bx(a)))?(o?(o=!1,s=i&&bx(i)?i:[]):s=i&&wx(i)?i:{},Sx(u,{name:n,newValue:e(d,s,a)})):typeof a<"u"&&Sx(u,{name:n,newValue:a}));return u};const Wh=ec(D3);function bd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function M3(){const e=[],t={run:n,use:i};return t;function n(...a){let o=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...a);function u(h,...f){const d=e[++o];let m=-1;if(h){s(h);return}for(;++m<a.length;)(f[m]===null||f[m]===void 0)&&(f[m]=a[m]);a=f,d?N3(d,u)(...f):s(null,...f)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function N3(e,t){let n;return i;function i(...s){const u=e.length>s.length;let h;u&&s.push(a);try{h=e.apply(this,s)}catch(f){const d=f;if(u&&n)throw d;return a(d)}u||(h&&h.then&&typeof h.then=="function"?h.then(o,a):h instanceof Error?a(h):o(h))}function a(s,...u){n||(n=!0,t(s,...u))}function o(s){a(null,s)}}const Yn={basename:R3,dirname:O3,extname:j3,join:B3,sep:"/"};function R3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Hl(e);let n=0,i=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else i<0&&(o=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let s=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else s<0&&(o=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(i=a):(u=-1,i=s));return n===i?i=s:i<0&&(i=e.length),e.slice(n,i)}function O3(e){if(Hl(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function j3(e){Hl(e);let t=e.length,n=-1,i=0,a=-1,o=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){i=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function B3(...e){let t=-1,n;for(;++t<e.length;)Hl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":P3(n)}function P3(e){Hl(e);const t=e.codePointAt(0)===47;let n=F3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function F3(e,t){let n="",i=0,a=-1,o=0,s=-1,u,h;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),a=s,o=0;continue}}else if(n.length>0){n="",i=0,a=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),i=s-a-1;a=s,o=0}else u===46&&o>-1?o++:o=-1}return n}function Hl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const I3={cwd:$3};function $3(){return"/"}function wd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function U3(e){if(typeof e=="string")e=new URL(e);else if(!wd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return H3(e)}function H3(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Qh=["history","path","basename","stem","extname","dirname"];class Yb{constructor(t){let n;t?wd(t)?n={path:t}:typeof t=="string"||G3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":I3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Qh.length;){const o=Qh[i];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)Qh.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Yn.basename(this.path):void 0}set basename(t){ef(t,"basename"),Jh(t,"basename"),this.path=Yn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yn.dirname(this.path):void 0}set dirname(t){Tx(this.basename,"dirname"),this.path=Yn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yn.extname(this.path):void 0}set extname(t){if(Jh(t,"extname"),Tx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){wd(t)&&(t=U3(t)),ef(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yn.basename(this.path,this.extname):void 0}set stem(t){ef(t,"stem"),Jh(t,"stem"),this.path=Yn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const a=this.message(t,n,i);throw a.fatal=!0,a}info(t,n,i){const a=this.message(t,n,i);return a.fatal=void 0,a}message(t,n,i){const a=new Zt(t,n,i);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Jh(e,t){if(e&&e.includes(Yn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yn.sep+"`")}function ef(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Tx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function G3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Z3=function(e){const i=this.constructor.prototype,a=i[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},q3={}.hasOwnProperty;class Hp extends Z3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=M3()}copy(){const t=new Hp;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Wh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(af("data",this.frozen),this.namespace[t]=n,this):q3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(af("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const a=n.call(t,...i);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ms(t),i=this.parser||this.Parser;return tf("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),tf("process",this.parser||this.Parser),nf("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,s){const u=Ms(t),h=i.parse(u);i.run(h,u,function(d,m,g){if(d||!m||!g)return f(d);const x=m,b=i.stringify(x,g);K3(b)?g.value=b:g.result=b,f(d,g)});function f(d,m){d||!m?s(d):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),tf("processSync",this.parser||this.Parser),nf("processSync",this.compiler||this.Compiler),this.process(t,a),Ax("processSync","process",n),i;function a(o,s){n=!0,xx(o),i=s}}run(t,n,i){Ex(t),this.freeze();const a=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?o(void 0,i):new Promise(o);function o(s,u){const h=Ms(n);a.run(t,h,f);function f(d,m,g){const x=m||t;d?u(d):s?s(x):i(void 0,x,g)}}}runSync(t,n){let i=!1,a;return this.run(t,n,o),Ax("runSync","run",i),a;function o(s,u){xx(s),a=u,i=!0}}stringify(t,n){this.freeze();const i=Ms(n),a=this.compiler||this.Compiler;return nf("stringify",a),Ex(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(af("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")h(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[d,...m]=f;h(d,m)}else s(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function s(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(a.settings=Wh(!0,a.settings,f.settings))}function u(f){let d=-1;if(f!=null)if(Array.isArray(f))for(;++d<f.length;){const m=f[d];o(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function h(f,d){let m=-1,g=-1;for(;++m<i.length;)if(i[m][0]===f){g=m;break}if(g===-1)i.push([f,...d]);else if(d.length>0){let[x,...b]=d;const E=i[g][1];bd(E)&&bd(x)&&(x=Wh(!0,E,x)),i[g]=[f,x,...b]}}}}const V3=new Hp().freeze();function tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function af(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ex(e){if(!bd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ax(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ms(e){return Y3(e)?e:new Yb(e)}function Y3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function K3(e){return typeof e=="string"||X3(e)}function X3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const W3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zx=[],Cx={allowDangerousHtml:!0},Q3=/^(https?|ircs?|mailto|xmpp)$/i,J3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function eN(e){const t=tN(e),n=nN(e);return iN(t.runSync(t.parse(n),n),e)}function tN(e){const t=e.rehypePlugins||zx,n=e.remarkPlugins||zx,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Cx}:Cx;return V3().use(OM).use(n).use(L3,i).use(t)}function nN(e){const t=e.children||"",n=new Yb;return typeof t=="string"&&(n.value=t),n}function iN(e,t){const n=t.allowedElements,i=t.allowElement,a=t.components,o=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,h=t.urlTransform||aN;for(const d of J3)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+W3+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),qb(e,f),pL(e,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function f(d,m,g){if(d.type==="raw"&&g&&typeof m=="number")return s?g.children.splice(m,1):g.children[m]={type:"text",value:d.value},m;if(d.type==="element"){let x;for(x in Yh)if(Object.hasOwn(Yh,x)&&Object.hasOwn(d.properties,x)){const b=d.properties[x],E=Yh[x];(E===null||E.includes(d.tagName))&&(d.properties[x]=h(String(b||""),x,d))}}if(d.type==="element"){let x=n?!n.includes(d.tagName):o?o.includes(d.tagName):!1;if(!x&&i&&typeof m=="number"&&(x=!i(d,m,g)),x&&g&&typeof m=="number")return u&&d.children?g.children.splice(m,1,...d.children):g.children.splice(m,1),m}}}function aN(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||i!==-1&&t>i||Q3.test(e.slice(0,t))?e:""}const rN=({onShowApiKeyModal:e})=>{const{languageData:t,featureDescriptions:n,selectedEAFeatures:i,selectedGBFeatures:a,selectedWALSFeatures:o,setSelectedEAFeatures:s,setSelectedGBFeatures:u,setSelectedWALSFeatures:h,lang:f,langs:d}=ee.useContext(Ut),[m,g]=ee.useState(()=>[{id:`welcome-${Date.now()}`,text:d[f].welcome,isUser:!1,timestamp:new Date().toLocaleTimeString()}]),[x,b]=ee.useState(""),[E,H]=ee.useState(!1),[v,w]=ee.useState(!1),[A,D]=ee.useState({configured:!1,hasKey:!1}),[G,j]=ee.useState(!1),[Z,Y]=ee.useState(!1),[q,te]=ee.useState(!1),$=ee.useRef(null),O=ee.useRef(null),U=d[f].suggestions,T=R=>{if(!R)return[];const ce=new Set,Me=R.match(/\bGB\d{3}\b/gi);Me&&Me.forEach(de=>{const Te=parseInt(de.substring(2));Te>=20&&Te<=999&&ce.add({id:de.toUpperCase(),type:"gb"})});const we=R.match(/\bEA\d{3}\b/gi);we&&we.forEach(de=>{ce.add({id:de.toUpperCase(),type:"ea"})});const ke=R.match(/\b\d+[A-Z]\b/g);return ke&&ke.forEach(de=>{ce.add({id:de.toUpperCase(),type:"wals"})}),[/\bCARNEIRO_\w+\b/gi,/\bSCCS\d+\b/gi,/\bB\d{1,4}\b/g,/\b\w+Richness\b/gi,/\b(Annual|Monthly|Net|Precipitation|Temperature|Biome|EcoRegion|Elevation|Slope|DistToCoast)\w*\b/gi].forEac
215h(de=>{const Te=R.match(de);Te&&Te.forEach(De=>{De.toUpperCase().startsWith("GB")||ce.add({id:De,type:"ea"})})}),Array.from(ce)},N=ee.useCallback((R,ce,Me)=>ce==="gb"?Me?(u(we=>we.filter(ke=>ke!==R)),{action:"removed",wasSelected:!0}):(u(we=>we.includes(R)?we:[...we,R]),{action:"added",wasSelected:!1}):ce==="ea"?Me?(s(we=>we.filter(ke=>ke!==R)),{action:"removed",wasSelected:!0}):(s(we=>we.includes(R)?we:[...we,R]),{action:"added",wasSelected:!1}):ce==="wals"?Me?(h(we=>we.filter(ke=>ke!==R)),{action:"removed",wasSelected:!0}):(h(we=>we.includes(R)?we:[...we,R]),{action:"added",wasSelected:!1}):{action:"none",wasSelected:!1},[]);ee.useEffect(()=>{const ce=setTimeout(()=>{document.querySelectorAll('.ai-message-content[data-processed="false"]').forEach(we=>{const ke=we.textContent||"",Se=T(ke);if(Se.length===0){we.dataset.processed="true";return}const de=document.createTreeWalker(we,NodeFilter.SHOW_TEXT,{acceptNode:xe=>{let he=xe.parentElement;for(;he&&he!==we;){if(he.tagName==="CODE"||he.tagName==="PRE"||he.classList.contains("feature-select-btn")||he.closest("code")||he.closest("pre")||he.closest(".feature-select-btn"))return NodeFilter.FILTER_REJECT;he=he.parentElement}return NodeFilter.FILTER_ACCEPT}},!1),Te=[];let De;for(;De=de.nextNode();)Te.push(De);Te.forEach(xe=>{const he=xe.textContent,Oe=[];if(Se.forEach(I=>{const J=new RegExp(`\\b${I.id.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");let oe;const P=new Set;for(;(oe=J.exec(he))!==null;){const K=`${oe.index}-${oe.index+oe[0].length}`;if(!Oe.some(le=>oe.index>=le.start&&oe.index<le.end)&&!P.has(K)){P.add(K);const le=I.type==="gb"&&a.includes(I.id)||I.type==="ea"&&i.includes(I.id)||I.type==="wals"&&o.includes(I.id);Oe.push({start:oe.index,end:oe.index+oe[0].length,feature:I,isSelected:le})}}}),Oe.sort((I,J)=>I.start-J.start),Oe.length>0){const I=document.createDocumentFragment();let J=0;Oe.forEach(oe=>{oe.start>J&&I.appendChild(document.createTextNode(he.substring(J,oe.start)));const P=document.createElement("button");P.className="feature-select-btn",P.dataset.featureId=oe.feature.id,P.dataset.featureType=oe.feature.type,P.dataset.selected=oe.isSelected,P.textContent=oe.feature.id+(oe.isSelected?" â":" +"),P.style.cssText=` 216 display: inline-block; 217 margin: 0 2px; 218 padding: 2px 6px; 219 background-color: ${oe.isSelected?"#4caf50":"#2196f3"}; 220 color: white; 221 border: none; 222 border-radius: 4px; 223 cursor: pointer; 224 font-size: 11px; 225 font-weight: bold; 226 vertical-align: baseline; 227 `,P.title=f==="zh"?oe.isSelected?"å·²éä¸ï¼ç¹å»ç§»é¤":"ç¹å»æ·»å å°æ°æ®é":oe.isSelected?"Selected, click to remove":"Click to add to dataset",(()=>{const K=oe.feature.id,re=oe.feature.type;P.onclick=le=>{le.preventDefault(),le.stopPropagation();const se=P.dataset.selected==="true",ue=N(K,re,se);ue.action==="added"?(P.textContent=K+" â",P.style.backgroundColor="#4caf50",P.dataset.selected="true",P.title=f==="zh"?"å·²éä¸ï¼ç¹å»ç§»é¤":"Selected, click to remove"):ue.action==="removed"&&(P.textContent=K+" +",P.style.backgroundColor="#2196f3",P.dataset.selected="false",P.title=f==="zh"?"ç¹å»æ·»å å°æ°æ®é":"Click to add to dataset")}})(),I.appendChild(P),J=oe.end}),J<he.length&&I.appendChild(document.createTextNode(he.substring(J))),xe.parentNode&&xe.parentNode.replaceChild(I,xe)}}),we.dataset.processed="true"})},200);return()=>clearTimeout(ce)},[m,a,i,o,f,N]),ee.useEffect(()=>{const R=Py();D(R);const ce=()=>{const Me=Py();D(Me)};return window.addEventListener("storage",ce),window.addEventListener("apiKeyUpdated",ce),()=>{window.removeEventListener("storage",ce),window.removeEventListener("apiKeyUpdated",ce)}},[]),ee.useEffect(()=>{var R;(R=$.current)==null||R.scrollIntoView({behavior:"smooth"})},[m]),ee.useEffect(()=>{m.length>0&&m[0]&&!m[0].isUser&&g(R=>{const ce=[...R];return ce[0]={...ce[0],text:d[f].welcome},ce})},[f,d]);const C=(R,ce=!1)=>{const Me={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,text:R,isUser:ce,timestamp:new Date().toLocaleTimeString()};g(we=>[...we,Me]),ce||jy(ce?R:"",R)},F=async(R,ce,Me,we,ke)=>{var oe,P,K,re;if(!A.configured){C(f==="zh"?"请é ç½®API Key以è·åç¸å ³æ§è§£éã":"Please configure your API Key to get correlation explanations.",!1),e&&e();return}const Se=f==="zh",de=le=>{const se=n[le];if(!(se!=null&&se.description))return"";const Ae=se.description.split(` 228`)[0];return Ae.startsWith("##")?Ae.replace(/^##\s*/,"").trim():se.description.substring(0,60)+(se.description.length>60?"...":"")},Te=de(R),De=de(ce),xe=Se?`请解éç¸å ³æ§ (r=${Me.toFixed(3)}, p=${we.toFixed(4)})ï¼ 229⢠${R}${Te?` (${Te})`:""} 230⢠${ce}${De?` (${De})`:""}`:`Please explain correlation (r=${Me.toFixed(3)}, p=${we.toFixed(4)}): 231⢠${R}${Te?` (${Te})`:""} 232⢠${ce}${De?` (${De})`:""}`;let he="";try{const{checkKnowledgeBaseStatus:le,buildRAGContext:se}=await ki(()=>Promise.resolve().then(()=>uu),void 0);if(await le()){const Ae=`${R} ${ce} feature definition correlation relationship`;he=await se(Ae,10)}}catch(le){console.warn("ç¥è¯åºæ£ç´¢å¤±è´¥ï¼å°ä½¿ç¨åºç¡åæ:",le)}const Oe=Se?`åºäºæ°æ®åæ${R}å${ce}çç¸å ³æ§ï¼r=${Me.toFixed(3)}, p=${we.toFixed(4)} (${ke}æ¹æ³) 233 234=== ç¹å¾1: ${R} === 235${((oe=n[R])==null?void 0:oe.description)||"æ°æ®åºä¸æ æè¿°"} 236 237=== ç¹å¾2: ${ce} === 238${((P=n[ce])==null?void 0:P.description)||"æ°æ®åºä¸æ æè¿°"} 239 240${he?"=== ç¥è¯åºç¸å ³ç ç©¶ ==="+he:""} 241 242**åæè¦æ±ï¼** 2431. 主è¦åºäºä¸è¿°ç¹å¾å®ä¹ãç»è®¡ç»æåç¥è¯åºè¿è¡è¯¦ç»åæ 2442. æä¾å ¨é¢çè¯è¨å¦è§£éåçè®ºèæ¯ 2453. 䏿¨æµæ°æ®åºå¤çä¿¡æ¯ï¼ä½å¯åºäºç¥è¯åºè¿è¡åçæ¨è®º 2464. åçè¦è¯¦å®å åï¼ä¸è¬æ§å¶å¨300-400å 2475. **ç»æåæ ¼å¼**ï¼åçå¿ é¡»å å«ä»¥ä¸JSONç»æï¼æ¾å¨åççæåï¼ 248 249\`\`\`json 250{ 251 "feature_pair": ["${R}", "${ce}"], 252 "correlation": { 253 "coefficient": ${Me.toFixed(3)}, 254 "p_value": ${we.toFixed(4)}, 255 "method": "${ke}", 256 "significance": "${we<.05?"æ¾è":"䏿¾è"}" 257 }, 258 "summary": "ç®è¦æ»ç»", 259 "statistical_interpretation": "ç»è®¡è§£é", 260 "feature_relationship": "ç¹å¾å ³ç³»åæ", 261 "typological_significance": "ç±»å妿ä¹", 262 "research_evidence": "ç ç©¶è¯æ®", 263 "research_value": "ç ç©¶ä»·å¼", 264 "methodology_suggestions": "æ¹æ³å»ºè®®" 265} 266\`\`\` 267 268**åçæ ¼å¼ï¼** 269**ç»è®¡è§£é**ï¼[详ç»è§£éç¸å ³ç³»æ°åpå¼çè¯è¨å¦æä¹] 270**ç¹å¾å ³ç³»**ï¼[åºäºå®ä¹æ·±å ¥åæä¸¤ç¹å¾ççè®ºå ³ç³»åå¯è½æºå¶]
271**ç±»å妿ä¹**ï¼[è§£éæ¤å ³èå¨è·¨è¯è¨ç ç©¶ä¸çéè¦æ§] 272${he?"**ç ç©¶è¯æ®**ï¼[ç¥è¯åºä¸çç¸å ³ç论åå®è¯åç°]":""} 273**ç ç©¶ä»·å¼**ï¼[æ¤åç°å¯¹è¯è¨ç±»åå¦ç ç©¶çè´¡ç®] 274 275**ð æ°æ®æ¥æºï¼** 276- ç¸å ³æ§æ°æ®ï¼æ¬å°æ°æ®åºå®æ¶ç»è®¡è®¡ç® 277- ç¹å¾ç¼å·ï¼${R}, ${ce}ï¼æ¥èªæ¬å°CSVæä»¶ï¼ 278- ç»è®¡æ¹æ³ï¼${ke}æ¹æ³ï¼r=${Me.toFixed(3)}, p=${we.toFixed(4)} 279- 计ç®åºç¡ï¼å½åå è½½çè¯è¨æ°æ®é 280 281è¦æ±ï¼è¯¦å®ãåºäºæ°æ®åç¥è¯åºï¼å¿ é¡»å å«å®æ´çJSONç»æã`:`Analyze correlation based on data: ${R} vs ${ce}, r=${Me.toFixed(3)}, p=${we.toFixed(4)} (${ke} method) 282 283=== Feature 1: ${R} === 284${((K=n[R])==null?void 0:K.description)||"No description in database"} 285 286=== Feature 2: ${ce} === 287${((re=n[ce])==null?void 0:re.description)||"No description in database"} 288 289${he?"=== Related Research from Knowledge Base ==="+he:""} 290 291**Analysis Requirements:** 2921. Provide detailed analysis based primarily on above feature definitions, statistical results, and knowledge base 2932. Include comprehensive linguistic explanations and theoretical background 2943. Do not speculate beyond database information, but may make reasonable inferences based on knowledge base 2954. Answer should be informative and comprehensive, generally 180-220 words 296 297**Response Format:** 298**Statistical Interpretation**: [Detailed explanation of correlation coefficient and p-value linguistic significance] 299**Feature Relationship**: [In-depth analysis of theoretical relationship and possible mechanisms between features] 300**Typological Significance**: [Explain the importance of this correlation in cross-linguistic research] 301${he?"**Research Evidence**: [Related theories and empirical findings from knowledge base]":""} 302**Research Value**: [Contribution of this finding to linguistic typology research] 303 304**ð Data Sources:** 305- Correlation Data: Real-time statistical calculation from local database 306- Feature Codes: ${R}, ${ce} (from local CSV files) 307- Statistical Method: ${ke} method, r=${Me.toFixed(3)}, p=${we.toFixed(4)} 308- Calculation Basis: Currently loaded language dataset 309 310Requirements: Comprehensive, based on data and knowledge base.`;C(xe,!0),H(!0);const I=`loading-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,J=Se?"æ£å¨åæç¸å ³æ§...":"Analyzing correlation...";g(le=>[...le,{id:I,text:J,isUser:!1,timestamp:new Date().toLocaleTimeString()}]);try{const le=await xa(Oe,f);g(se=>se.filter(ue=>ue.id!==I)),C(le,!1)}catch(le){console.error("Correlation explanation error:",le),g(ue=>ue.filter(Ae=>Ae.id!==I));let se=Se?"æ±æï¼åæç¸å ³æ§æ¶éå°é误ã":"Sorry, I encountered an error while analyzing the correlation.";le.message==="API_KEY_NOT_SET"&&(se=Se?"请é ç½®API Key以è·åç¸å ³æ§è§£éã":"Please configure your API Key to get correlation explanations.",e&&e()),C(se,!1)}finally{H(!1)}},M=async R=>{if(!A.configured){C(f==="zh"?"请é ç½®API Key以è·åæ¹æ³è§£éã":"Please configure your API Key to get method explanations.",!1),e&&e();return}const ce=f==="zh",Me=ce?`请解éåææ¹æ³ï¼${R.name}`:`Please explain analysis method: ${R.name}`,we=ce?`请解éè¯è¨å¦åææ¹æ³ï¼${R.name}ã 311 312æ¹æ³è¯¦æ ï¼ 313- æè¿°ï¼${R.description} 314- åç±»ï¼${R.category} 315- å¤æåº¦ï¼${R.complexity} 316- ç¨éï¼${R.useCase} 317 318请æä»¥ä¸ç»æåçï¼ 319**æ¹æ³æ¦è¿°** 320- æ ¸å¿æ¦å¿µåçè®ºèæ¯ 321- è¯è¨å¦æä¹ 322 323**æ°æ®éåºç¨** 324- å¦ä½ä¸å½åæ°æ®å®æ½ 325- 颿è§è§£åç»æ 326 327**宿½æå** 328- éæ¥æ¹æ³ 329- æéå·¥å ·åèèå ç´ 330 331**çè®ºèæ¯** 332- ç¸å ³è¯è¨å¦ç论 333- è·¨è¯è¨åºç¨ 334 335**ð æ¹æ³æ¥æºï¼** 336- æ¹æ³åç§°ï¼${R.name} 337- åç±»ï¼${R.category} 338- å¤æåº¦ï¼${R.complexity} 339- åºç¨æ°æ®ï¼æ¬å°Grambank & D-PLACEæ°æ®åºæä»¶ 340 341请使ç¨markdownæ ¼å¼ä»¥æé«å¯è¯»æ§ã`:`Please explain the linguistic analysis method: ${R.name}. 342 343Method details: 344- Description: ${R.description} 345- Category: ${R.category} 346- Complexity: ${R.complexity} 347- Use case: ${R.useCase} 348 349Please structure your response with: 350**Method Overview** 351- Core concepts and theoretical background 352- Linguistic significance 353 354**Application to Dataset** 355- How to implement with current data 356- Expected insights and outcomes 357 358**Implementation Guide** 359- Step-by-step approach 360- Required tools and considerations 361 362**Theoretical Context** 363- Related linguistic theories 364- Cross-linguistic applications 365 366**ð Method Source:** 367- Method Name: ${R.name} 368- Category: ${R.category} 369- Complexity: ${R.complexity} 370- Applied Data: Local Grambank & D-PLACE database files 371 372Use markdown formatting for better readability.`;C(Me,!0),H(!0);const ke=`loading-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,Se=ce?"æ£å¨åææ¹æ³...":"Analyzing method...";g(de=>[...de,{id:ke,text:Se,isUser:!1,timestamp:new Date().toLocaleTimeString()}]);try{const de=await xa(we,f);g(Te=>Te.filter(De=>De.id!==ke)),C(de,!1)}catch(de){console.error("Method explanation error:",de),g(De=>De.filter(xe=>xe.id!==ke));let Te=ce?"æ±æï¼åææ¹æ³æ¶éå°é误ã":"Sorry, I encountered an error while analyzing the method.";de.message==="API_KEY_NOT_SET"&&(Te=ce?"请é ç½®API Key以è·åæ¹æ³è§£éã":"Please configure your API Key to get method explanations.",e&&e()),C(Te,!1)}finally{H(!1)}},V=async R=>{var de,Te,De,xe,he,Oe;if(!A.configured){C(f==="zh"?"请é ç½®API Key以è·åæ¦å¿µè§£éã":"Please configure your API Key to get concept explanations.",!1),e&&e();return}const ce=f==="zh",Me=ce?`请解éè¯è¨å¦æ¦å¿µï¼${R.name}`:`Please explain linguistic concept: ${R.name}`,we=ce?`请解éè¯è¨å¦æ¦å¿µï¼${R.name}ã 373 374æ¦å¿µè¯¦æ ï¼ 375- æè¿°ï¼${R.description} 376- åç±»ï¼${R.category} 377- ä¾åï¼${((de=R.examples)==null?void 0:de.join(", "))||"æ "} 378- 主è¦ç论ï¼${((Te=R.theories)==null?void 0:Te.join(", "))||"æ "} 379- 䏿°æ®çç¸å ³æ§ï¼${R.relevance||"æ "} 380 381请æä»¥ä¸ç»æåçï¼ 382**æ¦å¿µå®ä¹** 383- æ ¸å¿å«ä¹åè¯è¨å¦æä¹ 384- çè®ºæ¡æ¶ 385 386**è·¨è¯è¨æ¨¡å¼** 387- ä¾ååç±»åå¦åå¸ 388- å°ååéä¼ å ç´ 389 390**åæåºç¨** 391- ä¸å½åæ°æ®éçå ³ç³» 392- ç±»åå¦ç ç©¶çè§è§£ 393 394**ç ç©¶èæ¯** 395- åå²åå± 396- å½åç ç©¶æ¹å 397 398**ð æ¦å¿µæ¥æºï¼** 399- æ¦å¿µåç§°ï¼${R.name} 400- åç±»ï¼${R.category} 401- ç论åºç¡ï¼${((De=R.theories)==null?void 0:De.join(", "))||"æ "} 402- æ¬å°æ°æ®ç¸å ³æ§ï¼${R.relevance||"æ "} 403 404请使ç¨markdownæ ¼å¼ä»¥æé«å¯è¯»æ§ã`:`Please explain the linguistic concept: ${R.name}. 405 406Concept details: 407- Description: ${R.description} 408- Category: ${R.category} 409- Examples: ${((xe=R.examples)==null?void 0:xe.join(", "))||"N/A"} 410- Key Theories: ${((he=R.theories)==null?void 0:he.join(", "))||"N/A"} 411- Relevance to our data: ${R.relevance||"N/A"} 412 413Please structure your response with: 414**Concept Definition** 415- Core meaning and linguistic significance 416- Theoretical framework 417 418**Cross-Linguistic Patterns** 419- Examples and typological distribution 420- Areal and genetic factors 421 422**Application to Analysis** 423- How it relates to current dataset 424- Insights for typological research 425 426**Research Context** 427- Historical development 428- Current research directions 429 430**ð Concept Source:** 431- Concept Name: ${R.name} 432- Category: ${R.category} 433- Theoretical Foundation: ${((Oe=R.theories)==null?void 0:Oe.join(", "))||"N/A"} 434- Local Data Relevance: ${R.relevance||"N/A"} 435 436Use markdown formatting for better readability.`;C(Me,!0),H(!0);const ke=`loading-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,Se=ce?"æ£å¨åææ¦å¿µ...":"Analyzing concept...";g(I=>[...I,{id:ke,text:Se,isUser:!1,timestamp:new Date().toLocaleTimeString()}]);try{const I=await xa(we,f);g(J=>J.filter(oe=>oe.id!==ke)),C(I,!1)}catch(I){console.error("Concept explanation error:",I),g(oe=>oe.filter(P=>P.id!==ke));let J=ce?"æ±æï¼åææ¦å¿µæ¶éå°é误ã":"Sorry, I encountered an error while analyzing the concept.";I.message==="API_KEY_NOT_SET"&&(J=ce?"请é ç½®API Key以è·åæ¦å¿µè§£éã":"Please configure your API Key to get concept explanations.",e&&e()),C(J,!1)}finally{H(!1)}},k=async R=>{if(!A.configured){C(f==="zh"?"请é ç½®API Key以è·åç¹å¾è§£éã":"Please configure your API Key to get feature explanations.",!1),e&&e();return}const ce=f==="zh",we=(xe=>{if(!xe)return"";const Oe=xe.split(` 437`)[0];return Oe.startsWith("##")?Oe.replace(/^##\s*/,"").trim():xe.substring(0,100)+(xe.length>100?"...":"")})(R.description),ke=ce?`请解éç¹å¾ï¼${R.id||R.name}${we?` (${we})`:""}`:`Please explain feature: ${R.id||R.name}${we?` (${we})`:""}`;let Se="";try{const{checkKnowledgeBaseStatus:xe,buildRAGContext:he}=await ki(()=>Promise.resolve().then(()=>uu),void 0);if(await xe()){const I=`${R.id||""} ${R.name||""} feature definition explanation`;Se=await he(I,10)}}catch(xe){console.warn("ç¥è¯åºæ£ç´¢å¤±è´¥ï¼å°ä½¿ç¨åºç¡ä¿¡æ¯:",xe)}const de=ce?`åºäºæ°æ®åºä¿¡æ¯è§£éç¹å¾ï¼${R.id||R.name} 438 439=== æ°æ®åºä¸çç¹å¾å®ä¹ === 440${R.description?R.description:"æ°æ®åºä¸æªæä¾æè¿°"} 441 442${Se?"=== ç¥è¯åºä¸çç¸å ³ç ç©¶ ==="+Se:""} 443 444**åçè¦æ±ï¼** 4451. 主è¦åºäºä¸è¿°æ°æ®åºå®ä¹åç¥è¯åºä¿¡æ¯è¿è¡è¯¦ç»è§£é 4462. æä¾å ¨é¢çè¯è¨å¦èæ¯åç论æä¹ 4473. å¦æä¿¡æ¯ä¸è¶³ï¼è¯´æ"æ°æ®åº/ç¥è¯åºä¸æªæä¾æ¤ä¿¡æ¯" 4484. åçè¦è¯¦å®å åï¼ä¸è¬æ§å¶å¨300-400å 4495. **ç»æåæ ¼å¼**ï¼åçå¿ é¡»å å«ä»¥ä¸JSONç»æï¼æ¾å¨åççæåï¼ 450 451\`\`\`json 452{ 453 "feature_id": "${R.id||R.name}", 454 "feature_name": "ç¹å¾åç§°", 455 "summary": "ç®è¦æ»ç»", 456 "definition": "详ç»å®ä¹è§£é", 457 "classification": "åç±»å½å±", 458 "measurement": "æµéæ¹æ³", 459 "cross_linguistic_distribution": "è·¨è¯è¨åå¸", 460 "theoretical_significance": "ç论æä¹", 461 "related_features": ["ç¸å ³ç¹å¾1", "ç¸å ³ç¹å¾2"], 462 "research_applications": "ç ç©¶åºç¨", 463 "knowledge_base_insights": "ç¥è¯åºä¸çç ç©¶åç°" 464} 465\`\`\` 466 467**åçæ ¼å¼ï¼** 468**å®ä¹**ï¼[详ç»è§£éæ°æ®åºå®ä¹çè¯è¨å¦å«ä¹] 469**åç±»ä¸æµé**ï¼[说æç¹å¾çåç±»å½å±ãç¼ç æ¹å¼åæµéæ å] 470**è·¨è¯è¨åå¸**ï¼[åºäºç¥è¯åºæè¿°å ¸åçå叿¨¡å¼] 471**ç论æä¹**ï¼[è§£é该ç¹å¾å¨è¯è¨ç±»åå¦ä¸çéè¦æ§] 472**ç¸å ³ç¹å¾**ï¼[å¯è½ä¸ä¹ç¸å ³çå ¶ä»è¯æ³æç¤¾ä¼ç¹å¾] 473${Se?"**ç ç©¶èæ¯**ï¼[åºäºç¥è¯åºç妿¯ç ç©¶åç°]":""} 474 475**ð æ°æ®æ¥æºï¼** 476- æ°æ®åºï¼æ¬å°Grambank/D-PLACEæ°æ®åº 477- ç¹å¾ç¼å·ï¼${R.id||R.name}ï¼æ¥èªæ¬å°æ°æ®åºCSVæä»¶ï¼ 478- ç¹å¾å®ä¹ï¼${R.description?"æ¥èªæ°æ®åºåå§æè¿°":"æ°æ®åºä¸ææ æè¿°"} 479 480è¦æ±ï¼è¯¦å®ãåç¡®ãåºäºæ°æ®åºåç¥è¯åºï¼å¿ é¡»å å«å®æ´çJSONç»æã`:`Explain feature based on database information: ${R.id||R.name} 481 482=== Database Feature Definition === 483${R.description?R.description:"No description provided in database"} 484 485${Se?"=== Related Research from Knowledge Base ==="+Se:""} 486 487**Response Requirements:** 4881. Provide detailed explanation based primarily on the above database definition and knowledge base information 4892. Include comprehensive linguistic background and theoretical significance 4903. If information is insufficient, state "not provided in database/knowledge base" 4914. Answer should be informative and comprehensive, generally 200-250 words 492 493**Response Format:** 494**Definition**: [Detailed explanation of the linguistic meaning of the database definition] 495**Classification & Measurement**: [Explain feature's categorical classification, coding method, and measurement standards] 496**Cross-linguistic Distribution**: [Describe typical distribution patterns based on knowledge base] 497**Theoretical Significance**: [Explain the importance of this feature in linguistic typology] 498**Related Features**: [Other grammatical or social features that may be related]
499${Se?"**Research Background**: [Based only on knowledge base information]":""} 500 501**ð Data Sources:** 502- Database: Local Grambank/D-PLACE database 503- Feature Code: ${R.id||R.name} (from local database CSV files) 504- Feature Definition: ${R.description?"From database original description":"No description in database"} 505 506Requirements: Concise, accurate, data-based.`;C(ke,!0),H(!0);const Te=`loading-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,De=ce?"æ£å¨åæç¹å¾...":"Analyzing feature...";g(xe=>[...xe,{id:Te,text:De,isUser:!1,timestamp:new Date().toLocaleTimeString()}]);try{const xe=await xa(de,f);g(he=>he.filter(Oe=>Oe.id!==Te)),C(xe,!1)}catch(xe){console.error("Feature explanation error:",xe),g(Oe=>Oe.filter(I=>I.id!==Te));let he=ce?"æ±æï¼åæç¹å¾æ¶éå°é误ã":"Sorry, I encountered an error while analyzing the feature.";xe.message==="API_KEY_NOT_SET"&&(he=ce?"请é ç½®API Key以è·åç¹å¾è§£éã":"Please configure your API Key to get feature explanations.",e&&e()),C(he,!1)}finally{H(!1)}},Q=async R=>{if(!A.configured){C(f==="zh"?"请é ç½®API Key以è·åè¯è¨è§£éã":"Please configure your API Key to get language explanations.",!1),e&&e();return}const ce=f==="zh",Me=ce?`请åæè¯è¨ï¼${R.name} (${R.id})`:`Please analyze language: ${R.name} (${R.id})`;let we="";try{const{checkKnowledgeBaseStatus:de,buildRAGContext:Te}=await ki(()=>Promise.resolve().then(()=>uu),void 0);if(await de()){const xe=`${R.name} ${R.family} language typology features analysis`;we=await Te(xe,10)}}catch(de){console.warn("ç¥è¯åºæ£ç´¢å¤±è´¥ï¼å°ä½¿ç¨åºç¡ä¿¡æ¯:",de)}const ke=R.features.map(de=>{var Oe;const Te=((Oe=n[de.id])==null?void 0:Oe.description)||"æ æè¿°",De=de.value!==null&&de.value!==void 0?de.value:"N/A",xe=de.weight?`(æé: ${de.weight})`:"",he=de.isOrange?"æ©è²ç¹å¾":"éè²ç¹å¾";return`⢠${de.id}: ${De} ${xe} [${he}] 507 ${Te}`}).join(` 508 509`),Se=ce?`åºäºå°å¾æ°æ®åæå讲解è¯è¨ï¼${R.name} 510 511=== è¯è¨åºæ¬ä¿¡æ¯ === 512è¯è¨åç§°: ${R.name} 513è¯è¨ID: ${R.id} 514è¯ç³»: ${R.family||"æªç¥"} 515å°çåºå: ${R.region||"æªç¥"} 516å®è§åºå: ${R.macroarea||"æªç¥"} 517åæ : ${R.coordinates.latitude}, ${R.coordinates.longitude} 518 519=== å½åéä¸çç¹å¾åæ === 520${ke} 521 522${we?"=== ç¥è¯åºä¸çç¸å ³ç ç©¶ ==="+we:""} 523 524**åæè¦æ±ï¼** 5251. éç¹åæè¯¥è¯è¨çç°æç¹å¾ç¹å¾ï¼è§£éå ¶è¯è¨å¦æä¹ 5262. åºäºç¹å¾å¼åæè¯¥è¯è¨å¨ç±»åå¦ä¸çä½ç½®åç¹ç¹ 5273. ç»åå°çåè¯ç³»ä¿¡æ¯ï¼åæç¹å¾åå¸çå¯è½åå 5284. åçè¦è¯¦å®å åï¼ä¸è¬æ§å¶å¨400-500å 5295. **ç»æåæ ¼å¼**ï¼åçå¿ é¡»å å«ä»¥ä¸JSONç»æï¼æ¾å¨åççæåï¼ 530 531\`\`\`json 532{ 533 "language_id": "${R.id}", 534 "language_name": "${R.name}", 535 "summary": "ç®è¦æ»ç»", 536 "geographic_context": "å°çèæ¯åæ", 537 "family_characteristics": "è¯ç³»ç¹å¾åæ", 538 "feature_analysis": "ç¹å¾è¯¦ç»åæ", 539 "typological_position": "ç±»åå¦ä½ç½®", 540 "cross_linguistic_comparison": "è·¨è¯è¨æ¯è¾", 541 "research_insights": "ç ç©¶åç°", 542 "knowledge_base_evidence": "ç¥è¯åºè¯æ®", 543 "methodological_notes": "æ¹æ³è¯´æ" 544} 545\`\`\` 546 547**åçæ ¼å¼ï¼** 548**å°çä¸è¯ç³»èæ¯**ï¼[åæè¯¥è¯è¨çå°çä½ç½®åè¯ç³»å½å±çè¯è¨å¦æä¹] 549**ç¹å¾ç¹å¾åæ**ï¼[详ç»åæè¯¥è¯è¨å¨éä¸ç¹å¾ä¸ç表ç°ï¼éç¹è§£éç¹å¾å¼çè¯è¨å¦å«ä¹] 550**ç±»åå¦å®ä½**ï¼[åºäºç¹å¾åæï¼ç¡®å®è¯¥è¯è¨å¨è¯è¨ç±»åå¦ä¸çä½ç½®åç¹ç¹] 551**è·¨è¯è¨æ¯è¾**ï¼[ä¸å ¶ä»ç¸å ³è¯è¨çæ¯è¾ï¼çªåºè¯¥è¯è¨çç¬ç¹æ§] 552${we?"**ç ç©¶è¯æ®**ï¼[åºäºç¥è¯åºçç¸å ³ç论åå®è¯åç°]":""} 553**ç ç©¶ä»·å¼**ï¼[该è¯è¨åæå¯¹è¯è¨ç±»åå¦ç ç©¶çè´¡ç®] 554 555**ð æ°æ®æ¥æºï¼** 556- å°å¾æ°æ®ï¼æ¥èªæ¬å°Grambank/D-PLACEæ°æ®åº 557- ç¹å¾æ°æ®ï¼å½åéä¸ç${R.features.length}个ç¹å¾ 558- åæ ä¿¡æ¯ï¼${R.coordinates.latitude}, ${R.coordinates.longitude} 559- ç¥è¯åºï¼${we?"å·²æ£ç´¢ç¸å ³ç ç©¶":"æªæ£ç´¢å°ç¸å ³ç ç©¶"} 560 561è¦æ±ï¼è¯¦å®ãåºäºæ°æ®ãéç¹åæç°æç¹å¾ï¼å¿ é¡»å å«å®æ´çJSONç»æã`:`Analyze and explain language based on map data: ${R.name} 562 563=== Basic Language Information === 564Language Name: ${R.name} 565Language ID: ${R.id} 566Language Family: ${R.family||"Unknown"} 567Geographic Region: ${R.region||"Unknown"} 568Macro Area: ${R.macroarea||"Unknown"} 569Coordinates: ${R.coordinates.latitude}, ${R.coordinates.longitude} 570 571=== Current Selected Features Analysis === 572${ke} 573 574${we?"=== Related Research from Knowledge Base ==="+we:""} 575 576**Analysis Requirements:** 5771. Focus on analyzing the current features of this language and explain their linguistic significance 5782. Based on feature values, analyze the language's position and characteristics in typology 5793. Combine geographic and family information to analyze possible reasons for feature distribution 5804. Response should be detailed and comprehensive, generally 400-500 words 5815. **Structured Format**: Response must include the following JSON structure at the end: 582 583\`\`\`json 584{ 585 "language_id": "${R.id}", 586 "language_name": "${R.name}", 587 "summary": "Brief Summary", 588 "geographic_context": "Geographic Context Analysis", 589 "family_characteristics": "Family Characteristics Analysis", 590 "feature_analysis": "Detailed Feature Analysis", 591 "typological_position": "Typological Position", 592 "cross_linguistic_comparison": "Cross-linguistic Comparison", 593 "research_insights": "Research Insights", 594 "knowledge_base_evidence": "Knowledge Base Evidence", 595 "methodological_notes": "Methodological Notes" 596} 597\`\`\` 598 599**Response Format:**
600**Geographic & Family Background**: [Analyze the linguistic significance of the language's geographic location and family affiliation] 601**Feature Analysis**: [Detailed analysis of the language's performance on selected features, focusing on explaining the linguistic meaning of feature values] 602**Typological Positioning**: [Based on feature analysis, determine the language's position and characteristics in linguistic typology] 603**Cross-linguistic Comparison**: [Comparison with other related languages, highlighting the uniqueness of this language] 604${we?"**Research Evidence**: [Related theories and empirical findings based on knowledge base]":""} 605**Research Value**: [The contribution of this language analysis to linguistic typology research] 606 607**ð Data Sources:** 608- Map Data: From local Grambank/D-PLACE database 609- Feature Data: Currently selected ${R.features.length} features 610- Coordinate Information: ${R.coordinates.latitude}, ${R.coordinates.longitude} 611- Knowledge Base: ${we?"Related research retrieved":"No related research retrieved"} 612 613Requirements: Detailed, data-based, focus on analyzing current features, must include complete JSON structure.`;C(Me,!0);try{const de=await xa(Se);C(de,!1)}catch(de){console.error("Language explanation error:",de),C(ce?"è·åè¯è¨è§£éæ¶åºéï¼è¯·ç¨åéè¯ã":"Error getting language explanation, please try again later.",!1)}},ie=async R=>{var de,Te,De,xe;if(!A.configured){C(f==="zh"?"请é ç½®API Key以è·åæ¨èè§£éã":"Please configure your API Key to get recommendation explanations.",!1),e&&e();return}const ce=f==="zh",Me=ce?`è¯·è§£éæ¨èï¼${R.name||R.reason}`:`Please explain recommendation: ${R.name||R.reason}`,we=ce?`请解éç¹å¾æ¨èï¼${R.reason}ã 614 615æ¨èç¹å¾ï¼${((de=R.features)==null?void 0:de.join(", "))||"æªæå®"} 616æ¨èçç±ï¼${R.reason||"æªæä¾"} 617ç¸å ³æ§ï¼${R.correlation||"æªç¥"} 618 619请æä»¥ä¸ç»æåçï¼ 620**æ¨èçç±åæ** 621- 为ä»ä¹æ¨èè¿äºç¹å¾ 622- ç论åç»éªä¾æ® 623 624**ç¹å¾å ³èæ§** 625- ç¹å¾é´çæ½å¨èç³» 626- è¯è¨å¦çè®ºæ¯æ 627 628**ç ç©¶ä»·å¼** 629- 对å½åç ç©¶çè´¡ç® 630- å¯è½çåç°åè§è§£ 631 632**宿½å»ºè®®** 633- å¦ä½ææä½¿ç¨è¿äºç¹å¾ 634- åææ¹æ³å»ºè®® 635 636**ð æ¨èæ¥æºï¼** 637- æ¨èç¹å¾ï¼${((Te=R.features)==null?void 0:Te.join(", "))||"æªæå®"} 638- æ¨èçç±ï¼${R.reason||"æªæä¾"} 639- ç¸å ³æ§è¯åï¼${R.correlation||"æªç¥"} 640- æ°æ®æ¥æºï¼æ¬å°Grambank & D-PLACEæ°æ®åºæä»¶ 641 642请使ç¨markdownæ ¼å¼ä»¥æé«å¯è¯»æ§ã`:`Please explain the feature recommendation: ${R.reason}. 643 644Recommended features: ${((De=R.features)==null?void 0:De.join(", "))||"Not specified"} 645Recommendation reason: ${R.reason||"Not provided"} 646Correlation: ${R.correlation||"Unknown"} 647 648Please structure your response with: 649**Recommendation Analysis** 650- Why these features are recommended 651- Theoretical and empirical basis 652 653**Feature Relationships** 654- Potential connections between features 655- Linguistic theory support 656 657**Research Value** 658- Contribution to current research 659- Possible discoveries and insights 660 661**Implementation Suggestions** 662- How to effectively use these features 663- Analysis method recommendations 664 665**ð Recommendation Source:** 666- Recommended Features: ${((xe=R.features)==null?void 0:xe.join(", "))||"Not specified"} 667- Recommendation Reason: ${R.reason||"Not provided"} 668- Correlation Score: ${R.correlation||"Unknown"} 669- Data Source: Local Grambank & D-PLACE database files 670 671Use markdown formatting for better readability.`;C(Me,!0),H(!0);const ke=`loading-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,Se=ce?"æ£å¨åææ¨è...":"Analyzing recommendation...";g(he=>[...he,{id:ke,text:Se,isUser:!1,timestamp:new Date().toLocaleTimeString()}]);try{const he=await xa(we,f);g(Oe=>Oe.filter(I=>I.id!==ke)),C(he,!1)}catch(he){console.error("Recommendation explanation error:",he),g(I=>I.filter(J=>J.id!==ke));let Oe=ce?"æ±æï¼åææ¨èæ¶éå°é误ã":"Sorry, I encountered an error while analyzing the recommendation.";he.message==="API_KEY_NOT_SET"&&(Oe=ce?"请é ç½®API Key以è·åæ¨èè§£éã":"Please configure your API Key to get recommendation explanations.",e&&e()),C(Oe,!1)}finally{H(!1)}};ee.useEffect(()=>(window.explainCorrelation=(R,ce,Me,we,ke)=>{F(R,ce,Me,we,ke)},window.explainMethod=R=>{M(R)},window.explainConcept=R=>{V(R)},window.explainFeature=R=>{k(R)},window.explainLanguage=R=>{Q(R)},window.explainRecommendation=R=>{ie(R)},()=>{delete window.explainCorrelation,delete window.explainMethod,delete window.explainConcept,delete window.explainFeature,delete window.explainLanguage,delete window.explainRecommendation}),[F,M,V,k,Q,ie]);const z=async()=>{const R=x.trim();if(!R||E)return;C(R,!0),b(""),H(!0);const ce=`loading-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,Me=f==="zh"?"æ£å¨åææ¨çé®é¢...":"Analyzing your question...";g(we=>[...we,{id:ce,text:Me,isUser:!1,timestamp:new Date().toLocaleTimeString()}]);try{const we=await xa(R,f);g(ke=>ke.filter(Se=>Se.id!==ce)),C(we,!1),jy(R,we)}catch(we){console.error("Chat error:",we),g(Se=>
671Se.filter(de=>de.id!==ce));let ke=f==="zh"?"æ±æï¼å¤çæ¨çè¯·æ±æ¶éå°é误ã":"Sorry, I encountered an error while processing your request.";we.message==="API_KEY_NOT_SET"&&(ke=f==="zh"?"请é
ç½®API Key以使ç¨AI婿ã":"Please configure your API Key to use the AI assistant.",e&&e()),C(ke,!1)}finally{H(!1)}},ye=R=>{b(R)},X=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),z())},ae=()=>{w(!v)},_e=R=>{R.preventDefault(),R.stopPropagation(),e&&e()},pe=R=>{R.preventDefault(),R.stopPropagation(),Kz(),g([{id:`welcome-${Date.now()}`,text:d[f].welcome,isUser:!1,timestamp:new Date().toLocaleTimeString()}])},Re=R=>{R.preventDefault(),R.stopPropagation(),te(!0)},ve=R=>{if(R.target.classList.contains("resize-handle")){R.preventDefault(),j(!0);const ce=R.clientX,Me=R.clientY,we=O.current.offsetWidth,ke=O.current.offsetHeight,Se=Te=>{if(!G)return;const De=Te.clientX-ce,xe=Te.clientY-Me,he=Math.max(300,Math.min(600,we-De)),Oe=Math.max(400,Math.min(700,ke-xe));O.current.style.width=`${he}px`,O.current.style.height=`${Oe}px`},de=()=>{j(!1),document.removeEventListener("mousemove",Se),document.removeEventListener("mouseup",de)};document.addEventListener("mousemove",Se),document.addEventListener("mouseup",de)}};return y.jsxs("div",{ref:O,id:"chat-widget",className:`chat-widget ${v?"minimized":""}`,onMouseDown:ve,children:[y.jsxs("div",{className:"chat-widget-header",onClick:ae,children:[y.jsx("span",{className:"chat-widget-title",children:d[f].chatTitle}),y.jsxs("div",{className:"chat-widget-controls",children:[y.jsx("span",{id:"api-status",className:A.configured?"configured":"",children:A.configured?"API: Configured":"API: Not Configured"}),y.jsx("button",{id:"api-key-btn",onClick:_e,title:"设置API Key",className:"chat-toggle-btn",style:{marginRight:"8px"},children:"ð"}),y.jsx("button",{onClick:Re,title:f==="zh"?"æ¥ç对è¯åå²":"View chat history",className:"chat-toggle-btn",style:{marginRight:"8px"},children:"ð"}),y.jsx("button",{onClick:pe,title:f==="zh"?"æ¸
é¤å¯¹è¯åå²":"Clear chat history",className:"chat-toggle-btn",style:{marginRight:"8px"},children:"ðï¸"}),y.jsx("button",{id:"chat-toggle",className:"chat-toggle-btn",children:v?"+":"â"})]})]}),!v&&y.jsxs("div",{id:"chat-widget-content",className:"chat-widget-content",children:[y.jsxs("div",{id:"chat-messages",className:"chat-messages",children:[m.map(R=>y.jsxs("div",{className:`chat-message ${R.isUser?"user":"assistant"}`,children:[R.isUser?y.jsx("div",{children:R.text}):y.jsx("div",{className:"ai-message-content","data-message-id":R.id,"data-processed":"false",children:y.jsx(eN,{components:{code:({n
671ode:ce,inline:Me,className:we,children:ke,...Se})=>{const de=/language-(\w+)/.exec(we||"");return!Me&&de?y.jsx("pre",{style:{background:"#f6f8fa",padding:"12px",borderRadius:"6px",overflow:"auto",fontSize:"12px",border:"1px solid #e1e4e8"},children:y.jsx("code",{className:we,...Se,children:ke})}):y.jsx("code",{className:we,...Se,children:ke})},pre:({children:ce})=>y.jsx("pre",{style:{background:"#f6f8fa",padding:"12px",borderRadius:"6px",overflow:"auto",fontSize:"12px",border:"1px solid #e1e4e8",margin:"8px 0"},children:ce})},children:R.text})}),y.jsx("div",{style:{fontSize:"10px",color:R.isUser?"rgba(255,255,255,0.7)":"#999",marginTop:"4px"},children:R.timestamp})]},R.id)),y.jsx("div",{ref:$})]}),y.jsxs("div",{className:"chat-input-container",children:[y.jsx("input",{id:"chat-input",type:"text",value:x,onChange:R=>b(R.target.value),onKeyPress:X,placeholder:"Ask about language features...",disabled:E,className:"chat-input"}),y.jsx("button",{id:"send-chat",onClick:z,disabled:E||!x.trim(),className:"chat-send-btn",children:E?"Sending...":d[f].send})]}),y.jsxs("div",{className:"chat-suggestions",children:[(Z?U:U.slice(0,6)).map((R,ce)=>y.jsx("button",{className:"suggestion-btn",onClick:()=>ye(R),children:R},ce)),U.length>6&&y.jsx("button",{className:"suggestion-btn",onClick:()=>Y(!Z),style:{background:"#2c7c6c",color:"white",borderColor:"#2c7c6c"},children:Z?"æ¶èµ·":"æ´å¤..."})]}),y.jsx("div",{className:"resize-handle"})]}),q&&y.jsx("div",{className:"modal-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},children:y.jsxs("div",{className:"modal-content",style:{backgroundColor:"white",borderRadius:"8px",padding:"20px",maxWidth:"80%",maxHeight:"80%",overflow:"auto",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.3)"},children:[y.jsxs("div",{className:"modal-header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",borderBottom:"1px solid #eee",paddingBottom:"10px"},children:[y.jsx("h3",{style:{margin:0,color:"#333"},children:f==="zh"?"对è¯åå²":"Chat History"}),y.jsx("button",{onClick:()=>te(!1),style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"#666",padding:"0",lineHeight:"1"},children:"Ã"})]}),y.jsx("div",{className:"history-content",style:{minHeight:"200px"},children:By().length===0?y.jsx("p",{style:{textAlign:"center",color:"#666",fontStyle:"italic"},children:f==="zh"?"ææ å¯¹è¯åå²":"No chat history"}):By().map((R,ce)=>y.jsxs("div",{style:{marginBottom:"20px",padding:"15px",border:"1px solid #eee",borderRadius:"6px",backgroundColor:"#fafafa"},children:[y.jsx("div",{style:{marginBottom:"10px",fontSize:"14px",fontWeight:"bold",color:"#2c7c6c"},children:f==="zh"?"ç¨æ·ï¼":"User: "}),y.jsx("div",{style:{marginBottom:"15px",padding:"10px",backgroundColor:"#e3f2fd",borderRadius:"4px",borderLeft:"4px solid #2196f3"},children:R.user}),y.jsx("div",{style:{marginBottom:"10px",fontSize:"14px",fontWeight:"bold",color:"#f57c00"},children:f==="zh"?"AI婿ï¼":"AI Assistant: "}),y.jsx("div",{style:{padding:"10px",backgroundColor:"#f3e5f5",borderRadius:"4px",borderLeft:"4px solid #9c27b0",lineHeight:"1.5"},children:R.assistant})]},ce))})]})})]})};function Gp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let qa=Gp();function Kb(e){qa=e}const Xb=/[&<>"']/,oN=new RegExp(Xb.source,"g"),Wb=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,lN=new RegExp(Wb.source,"g"),sN={"&":"&","<":"<",">":">",'"':""","'":"'"},Lx=e=>sN[e];function hn(e,t){if(t){if(Xb.test(e))return e.replace(oN,Lx)}else if(Wb.test(e))return e.replace(lN,Lx);return e}const uN=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function cN(e){return e.replace(uN,(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 hN=/(^|[^\[])\^/g;function ot(e,t){let n=typeof e=="string"?e:e.source;t=t||"";const i={replace:(a,o)=>
vendor: 6,968 bytes, lines 671-685
671{let s=typeof o=="string"?o:o.source;return s=s.replace(hN,"$1"),n=n.replace(a,s),i},getRegex:()=>new RegExp(n,t)};return i}function Dx(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Wo={exec:()=>null};function Mx(e,t){const n=e.replace(/\|/g,(o,s,u)=>{let h=!1,f=s;for(;--f>=0&&u[f]==="\\";)h=!h;return h?"|":" |"}),i=n.split(/ \|/);let a=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(/\\\|/g,"|");return i}function Ns(e,t,n){const i=e.length;if(i===0)return"";let a=0;for(;a<i;){const o=e.charAt(i-a-1);if(o===t&&!n)a++;else if(o!==t&&n)a++;else break}return e.slice(0,i-a)}function fN(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return-1}function Nx(e,t,n,i){const a=t.href,o=t.title?hn(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){i.state.inLink=!0;const u={type:"link",raw:n,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,u}return{type:"image",raw:n,href:a,title:o,text:hn(s)}}function dN(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const i=n[1];return t.split(` 672`).map(a=>{const o=a.match(/^\s+/);if(o===null)return a;const[s]=o;return s.length>=i.length?a.slice(i.length):a}).join(` 673`)}class Xu{constructor(t){ft(this,"options");ft(this,"rules");ft(this,"lexer");this.options=t||qa}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 i=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ns(i,` 674`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const i=n[0],a=dN(i,n[3]||"");return{type:"code",raw:i,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:a}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let i=n[2].trim();if(/#$/.test(i)){const a=Ns(i,"#");(this.options.pedantic||!a||/ $/.test(a))&&(i=a.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:this.lexer.inline(i)}}}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){let i=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` 675 $1`);i=Ns(i.replace(/^ *>[ \t]?/gm,""),` 676`);const a=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(i);return this.lexer.state.top=a,{type:"blockquote",raw:n[0],tokens:o,text:i}}}list(t){let n=this.rules.block.list.exec(t);if(n){let i=n[1].trim();const a=i.length>1,o={type:"list",raw:"",ordered:a,start:a?+i.slice(0,-1):"",loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:"[*+-]");const s=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let u="",h="",f=!1;for(;t;){let d=!1;if(!(n=s.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let m=n[2].split(` 677`,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),g=t.split(` 678`,1)[0],x=0;this.options.pedantic?(x=2,h=m.trimStart()):(x=n[2].search(/[^ ]/),x=x>4?1:x,h=m.slice(x),x+=n[1].length);let b=!1;if(!m&&/^ *$/.test(g)&&(u+=g+` 679`,t=t.substring(g.length+1),d=!0),!d){const v=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),w=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),A=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),D=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;t;){const G=t.split(` 680`,1)[0];if(g=G,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),A.test(g)||D.test(g)||v.test(g)||w.test(t))break;if(g.search(/[^ ]/)>=x||!g.trim())h+=` 681`+g.slice(x);else{if(b||m.search(/[^ ]/)>=4||A.test(m)||D.test(m)||w.test(m))break;h+=` 682`+g}!b&&!g.trim()&&(b=!0),u+=G+` 683`,t=t.substring(G.length+1),m=g.slice(x)}}o.loose||(f?o.loose=!0:/\n *\n *$/.test(u)&&(f=!0));let E=null,H;this.options.gfm&&(E=/^\[[ xX]\] /.exec(h),E&&(H=E[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:u,task:!!E,checked:H,loose:!1,text:h,tokens:[]}),o.raw+=u}o.items[o.items.length-1].raw=u.trimEnd(),o.items[o.items.length-1].text=h.trimEnd(),o.raw=o.raw.trimEnd();for(let d=0;d<o.items.length;d++)if(this.lexer.state.top=!1,o.items[d].tokens=this.lexer.blockTokens(o.items[d].text,[]),!o.loose){const m=o.items[d].tokens.filter(x=>x.type==="space"),g=m.length>0&&m.some(x=>/\n.*\n/.test(x.raw));o.loose=g}if(o.loose)for(let d=0;d<o.items.length;d++)o.items[d].loose=!0;return o}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const i=n[1].toLowerCase().replace(/\s+/g," "),a=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:i,raw:n[0],href:a,title:o}}}table(t){const n=this.rules.block.table.exec(t);if(!n||!/[:|]/.test(n[2]))return;const i=Mx(n[1]),a=n[2].replace(/^\||\| *$/g,"").split("|"),o=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` 684`):[],s={type:"table",raw:n[0],header:[],align:[],rows:[]};if(i.length===a.length){for(const u of a)/^ *-+: *$/.test(u)?s.align.push("right"):/^ *:-+: *$/.test(u)?s.align.push("center"):/^ *:-+ *$/.test(u)?s.align.push("left"):s.align.push(null);for(const u of i)s.header.push({text:u,tokens:this.lexer.inline(u)});for(const u of o)s.rows.push(Mx(u,s.header.length).map(h=>({text:h,tokens:this.lexer.inline(h)})));return s}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const i=n[1].charAt(n[1].length-1)===` 685`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:i,tokens:this.lexer.inline(i)}}}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:hn(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/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:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const i=n[2].trim();
vendor: 4,604 bytes, line 685
685if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const s=Ns(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{const s=fN(n[2],"()");if(s>-1){const h=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,h).trim(),n[3]=""}}let a=n[2],o="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);s&&(a=s[1],o=s[3])}else o=n[3]?n[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(this.options.pedantic&&!/>$/.test(i)?a=a.slice(1):a=a.slice(1,-1)),Nx(n,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(t,n){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const a=(i[2]||i[1]).replace(/\s+/g," "),o=n[a.toLowerCase()];if(!o){const s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Nx(i,o,i[0],this.lexer)}}emStrong(t,n,i=""){let a=this.rules.inline.emStrongLDelim.exec(t);if(!a||a[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(a[1]||a[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const s=[...a[0]].length-1;let u,h,f=s,d=0;const m=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,n=n.slice(-1*t.length+s);(a=m.exec(n))!=null;){if(u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!u)continue;if(h=[...u].length,a[3]||a[4]){f+=h;continue}else if((a[5]||a[6])&&s%3&&!((s+h)%3)){d+=h;continue}if(f-=h,f>0)continue;h=Math.min(h,h+f+d);const g=[...a[0]][0].length,x=t.slice(0,s+a.index+g+h);if(Math.min(s,h)%2){const E=x.slice(1,-1);return{type:"em",raw:x,text:E,tokens:this.lexer.inlineTokens(E)}}const b=x.slice(2,-2);return{type:"strong",raw:x,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let i=n[2].replace(/\n/g," ");const a=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return a&&o&&(i=i.substring(1,i.length-1)),i=hn(i,!0),{type:"codespan",raw:n[0],text:i}}}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){const n=this.rules.inline.autolink.exec(t);if(n){let i,a;return n[2]==="@"?(i=hn(n[1]),a="mailto:"+i):(i=hn(n[1]),a=i),{type:"link",raw:n[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let n;if(n=this.rules.inline.url.exec(t)){let a,o;if(n[2]==="@")a=hn(n[0]),o="mailto:"+a;else{let s;do s=n[0],n[0]=((i=this.rules.inline._backpedal.exec(n[0]))==null?void 0:i[0])??"";while(s!==n[0]);a=hn(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:a,href:o,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let i;return this.lexer.state.inRawBlock?i=n[0]:i=hn(n[0]),{type:"text",raw:n[0],text:i}}}}const pN=/^(?: *(?:\n|$))+/,mN=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,gN=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yN=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qb=/(?:[*+-]|\d{1,9}[.)])/,Jb=ot(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Qb).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Zp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xN=/^[^\n]+/,qp=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_N=ot(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",qp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vN=ot(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Qb).getRegex(),Ec="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Vp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bN=ot("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
685)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Vp).replace("tag",Ec).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),e1=ot(Zp).replace("hr",Gl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ec).getRegex(),wN=ot(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",e1).getRegex(),Yp={blockquote:wN,code:mN,def:_N,fences:gN,heading:yN,hr:Gl,html:bN,lheading:Jb,list:vN,newline:pN,paragraph:e1,table:Wo,text:xN},Rx=ot("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ec).getRegex(),SN={...Yp,table:Rx,paragraph:ot(Zp).replace("hr",Gl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Rx).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ec).getRegex()},kN={...Yp,html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Vp).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ot(Zp).replace("hr",Gl).replace("heading",` *#{1,6} *[^ 686]`).replace("lheading",Jb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},t1=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,TN=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,n1=/^( {2,}|\\)\n(?!\s*$)/,EN=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Zl="\\p{P}\\p{S}",AN=ot(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Zl).getRegex(),zN=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,CN=ot(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Zl).getRegex(),LN=ot("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Zl).getRegex(),DN=ot("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Zl).getRegex(),MN=ot(/\\([punct])/,"gu").replace(/punct/g,Zl).getRegex(),NN=ot(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),RN=ot(Vp).replace("(?:-->|$)","-->").getRegex(),ON=ot("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",RN).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wu=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,jN=ot(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Wu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),i1=ot(/^!?\[(label)\]\[(ref)\]/).replace("label",Wu).replace("ref",qp).getRegex(),a1=ot
vendor: 2,203 bytes, lines 686-687
686(/^!?\[(ref)\](?:\[\])?/).replace("ref",qp).getRegex(),BN=ot("reflink|nolink(?!\\()","g").replace("reflink",i1).replace("nolink",a1).getRegex(),Kp={_backpedal:Wo,anyPunctuation:MN,autolink:NN,blockSkip:zN,br:n1,code:TN,del:Wo,emStrongLDelim:CN,emStrongRDelimAst:LN,emStrongRDelimUnd:DN,escape:t1,link:jN,nolink:a1,punctuation:AN,reflink:i1,reflinkSearch:BN,tag:ON,text:EN,url:Wo},PN={...Kp,link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",Wu).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Wu).getRegex()},Sd={...Kp,escape:ot(t1).replace("])","~|])").getRegex(),url:ot(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},FN={...Sd,br:ot(n1).replace("{2,}","*").getRegex(),text:ot(Sd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Rs={normal:Yp,gfm:SN,pedantic:kN},Ao={normal:Kp,gfm:Sd,breaks:FN,pedantic:PN};class Qn{constructor(t){ft(this,"tokens");ft(this,"options");ft(this,"state");ft(this,"tokenizer");ft(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||qa,this.options.tokenizer=this.options.tokenizer||new Xu,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:Rs.normal,inline:Ao.normal};this.options.pedantic?(n.block=Rs.pedantic,n.inline=Ao.pedantic):this.options.gfm&&(n.block=Rs.gfm,this.options.breaks?n.inline=Ao.breaks:n.inline=Ao.gfm),this.tokenizer.rules=n}static get rules(){return{block:Rs,inline:Ao}}static lex(t,n){return new Qn(n).lex(t)}static lexInline(t,n){return new Qn(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` 687`),this.blockTokens(t,this.tokens);for(let n=0;
vendor: 11,816 bytes, lines 687-715
687n<this.inlineQueue.length;n++){const i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(u,h,f)=>h+" ".repeat(f.length));let i,a,o,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(u=>(i=u.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=` 688`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` 689`+i.raw,a.text+=` 690`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` 691`+i.raw,a.text+=` 692`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let u=1/0;const h=t.slice(1);let f;this.options.extensions.startBlock.forEach(d=>{f=d.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(o=t.substring(0,u+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){a=n[n.length-1],s&&a.type==="paragraph"?(a.raw+=` 693`+i.raw,a.text+=` 694`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(i),s=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&a.type==="text"?(a.raw+=` 695`+i.raw,a.text+=` 696`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):n.push(i);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let i,a,o,s=t,u,h,f;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(u=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)d.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(u=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(u=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,u.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(h||(f=""),h=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(i=d.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.escape(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.tag(t)){t=t.substring(i.raw.length),a=n[n.length-1],a&&i.type==="text"&&a.type==="text"?(a.raw+=i.raw,a.text+=i.text):n.push(i);continue}if(i=this.tokenizer.link(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(i.raw.length),a=n[n.length-1],a&&i.type==="text"&&a.type==="text"?(a.raw+=i.raw,a.text+=i.text):n.push(i);continue}if(i=this.tokenizer.emStrong(t,s,f)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.codespan(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.br(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.del(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.autolink(t)){t=t.substring(i.raw.length),n.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(t))){t=t.substring(i.raw.length),n.push(i);continue}if(o=t,this.options.extensions&&this.options.extensions.startInline){let d=1/0;const m=t.slice(1);let g;this.options.extensions.startInline.forEach(x=>{g=x.call({lexer:this},m),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),d<1/0&&d>=0&&(o=t.substring(0,d+1))}if(i=this.tokenizer.inlineText(o)){t=t.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(f=i.raw.slice(-1)),h=!0,a=n[n.length-1],a&&a.type==="text"?(a.raw+=i.raw,a.text+=i.text):n.push(i);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}}class Qu{constructor(t){ft(this,"options");this.options=t||qa}code(t,n,i){var o;const a=(o=(n||"").match(/^\S*/))==null?void 0:o[0];return t=t.replace(/\n$/,"")+` 697`,a?'<pre><code class="language-'+hn(a)+'">'+(i?t:hn(t,!0))+`</code></pre> 698`:"<pre><code>"+(i?t:hn(t,!0))+`</code></pre> 699`}blockquote(t){return`<blockquote> 700${t}</blockquote> 701`}html(t,n){return t}heading(t,n,i){return`<h${n}>${t}</h${n}> 702`}hr(){return`<hr> 703`}list(t,n,i){const a=n?"ol":"ul",o=n&&i!==1?' start="'+i+'"':"";return"<"+a+o+`> 704`+t+"</"+a+`> 705`}listitem(t,n,i){return`<li>${t}</li> 706`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p> 707`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table> 708<thead> 709`+t+`</thead> 710`+n+`</table> 711`}tablerow(t){return`<tr> 712${t}</tr> 713`}tablecell(t,n){const i=n.header?"th":"td";return(n.align?`<${i} align="${n.align}">`:`<${i}>`)+t+`</${i}> 714`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,i){const a=Dx(t);if(a===null)return i;t=a;let o='<a href="'+t+'"';return n&&(o+=' title="'+n+'"'),o+=">"+i+"</a>",o}image(t,n,i){const a=Dx(t);if(a===null)return i;t=a;let o=`<img src="${t}" alt="${i}"`;return n&&(o+=` title="${n}"`),o+=">",o}text(t){return t}}class Xp{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,i){return""+i}image(t,n,i){return""+i}br(){return""}}class Jn{constructor(t){ft(this,"options");ft(this,"renderer");ft(this,"textRenderer");this.options=t||qa,this.options.renderer=this.options.renderer||new Qu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xp}static parse(t,n){return new Jn(n).parse(t)}static parseInline(t,n){return new Jn(n).parseInline(t)}parse(t,n=!0){let i="";for(let a=0;a<t.length;a++){const o=t[a];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const s=o,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){i+=u||"";continue}}switch(o.type){case"space":continue;case"hr":{i+=this.renderer.hr();continue}case"heading":{const s=o;i+=this.renderer.heading(this.parseInline(s.tokens),s.depth,cN(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{const s=o;i+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{const s=o;let u="",h="";for(let d=0;d<s.header.length;d++)h+=this.renderer.tablecell(this.parseInline(s.header[d].tokens),{header:!0,align:s.align[d]});u+=this.renderer.tablerow(h);let f="";for(let d=0;d<s.rows.length;d++){const m=s.rows[d];h="";for(let g=0;g<m.length;g++)h+=this.renderer.tablecell(this.parseInline(m[g].tokens),{header:!1,align:s.align[g]});f+=this.renderer.tablerow(h)}i+=this.renderer.table(u,f);continue}case"blockquote":{const s=o,u=this.parse(s.tokens);i+=this.renderer.blockquote(u);continue}case"list":{const s=o,u=s.ordered,h=s.start,f=s.loose;let d="";for(let m=0;m<s.items.length;m++){const g=s.items[m],x=g.checked,b=g.task;let E="";if(g.task){const H=this.renderer.checkbox(!!x);f?g.tokens.length>0&&g.tokens[0].type==="paragraph"?(g.tokens[0].text=H+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&g.tokens[0].tokens[0].type==="text"&&(g.tokens[0].tokens[0].text=H+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:H+" "}):E+=H+" "}E+=this.parse(g.tokens,f),d+=this.renderer.listitem(E,b,!!x)}i+=this.renderer.list(d,u,h);continue}case"html":{const s=o;i+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=o;i+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=o,u=s.tokens?this.parseInline(s.tokens):s.text;for(;a+1<t.length&&t[a+1].type==="text";)s=t[++a],u+=` 715`+(s.tokens?this.parseInline(s.tokens):s.text);i+=n?this.renderer.paragraph(u):u;continue}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}parseInline(t,n){n=n||this.renderer;let i="";for(let a=0;a<t.length;a++){const o=t[a];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=s||"";continue}}switch(o.type){case"escape":{const s=o;i+=n.text(s.text);break}case"html":{const s=o;i+=n.html(s.text);break}case"link":{const s=o;i+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{const s=o;i+=n.image(s.href,s.title,s.text);break}case"strong":{const s=o;i+=n.strong(this.parseInline(s.tokens,n));break}case"em":{const s=o;i+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{const s=o;i+=n.codespan(s.text);break}case"br":{i+=n.br();break}case"del":{const s=o;i+=n.del(this.parseInline(s.tokens,n));break}case"text":{const s=o;i+=n.text(s.text);break}default:{const s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}}class Qo{constructor(t){ft(this,"options");this.options=t||qa}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}ft(Qo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var bl,kd,Ju,r1;class IN{constructor(...t){eh(this,bl);eh(this,Ju);ft(this,"defaults",Gp());ft(this,"options",this.setOptions);ft(this,"parse",cs(this,bl,kd).call(this,Qn.lex,Jn.parse));ft(this,"parseInline",cs(this,bl,kd).call(this,Qn.lexInline,Jn.parseInline));ft(this,"Parser",Jn);ft(this,"Renderer",Qu);ft(this,"TextRenderer",Xp);ft(this,"Lexer",Qn);ft(this,"Tokenizer",Xu);ft(this,"Hooks",Qo);this.use(...t)}walkTokens(t,n){var a,o;let i=[];for(const s of t)switch(i=i.concat(n.call(this,s)),s.type){case"table":{const u=s;for(const h of u.header)i=i.concat(this.walkTokens(h.tokens,n));for(const h of u.rows)for(const f of h)i=i.concat(this.walkTokens(f.tokens,n));break}case"list":{const u=s;i=i.concat(this.walkTokens(u.items,n));break}default:{const u=s;(o=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&o[u.type]?this.defaults.extensions.childTokens[u.type].forEach(h=>{const f=u[h].flat(1/0);i=i.concat(this.walkTokens(f,n))}):u.tokens&&(i=i.concat(this.walkTokens(u.tokens,n)))}}return i}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>
715{const a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const s=n.renderers[o.name];s?n.renderers[o.name]=function(...u){let h=o.renderer.apply(this,u);return h===!1&&(h=s.apply(this,u)),h}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[o.level];s?s.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),a.extensions=n),i.renderer){const o=this.defaults.renderer||new Qu(this.defaults);for(const s in i.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const u=s,h=i.renderer[u],f=o[u];o[u]=(...d)=>{let m=h.apply(o,d);return m===!1&&(m=f.apply(o,d)),m||""}}a.renderer=o}if(i.tokenizer){const o=this.defaults.tokenizer||new Xu(this.defaults);for(const s in i.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const u=s,h=i.tokenizer[u],f=o[u];o[u]=(...d)=>{let m=h.apply(o,d);return m===!1&&(m=f.apply(o,d)),m}}a.tokenizer=o}if(i.hooks){const o=this.defaults.hooks||new Qo;for(const s in i.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const u=s,h=i.hooks[u],f=o[u];Qo.passThroughHooks.has(s)?o[u]=d=>{if(this.defaults.async)return Promise.resolve(h.call(o,d)).then(g=>f.call(o,g));const m=h.call(o,d);return f.call(o,m)}:o[u]=(...d)=>{let m=h.apply(o,d);return m===!1&&(m=f.apply(o,d)),m}}a.hooks=o}if(i.walkTokens){const o=this.defaults.walkTokens,s=i.walkTokens;a.walkTokens=function(u){let h=[];return h.push(s.call(this,u)),o&&(h=h.concat(o.call(this,u))),h}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Qn.lex(t,n??this.defaults)}parser(t,n){return Jn.parse(t,n??this.defaults)}}bl=new WeakSet,kd=function(t,n){return(i,a)=>{const o={...a},s={...this.defaults,...o};this.defaults.async===!0&&o.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const u=cs(this,Ju,r1).call(this,!!s.silent,!!s.async);if(typeof i>"u"||i===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(i):i).then(h=>t(h,s)).then(h=>s.hooks?s.hooks.processAllTokens(h):h).then(h=>s.walkTokens?Promise.all(this.walkTokens(h,s.walkTokens)).then(()=>h):h).then(h=>n(h,s)).then(h=>s.hooks?s.hooks.postprocess(h):h).catch(u);try{s.hooks&&(i=s.hooks.preprocess(i));let h=t(i,s);s.hooks&&(h=s.hooks.processAllTokens(h)),s.walkTokens&&this.walkTokens(h,s.walkTokens);let f=n(h,s);return s.hooks&&(f=s.hooks.postprocess(f)),f}catch(h){return u(h)}}},Ju=new WeakSet,r1=function(t,n){return i=>{if(i.message+=` 716Please report this to https://github.com/markedjs/marked.`,t){const a="<p>An error occurred:</p><pre>"+hn(i.message+"",!0)+"</pre>";return n?Promise.resolve(a):a}if(n)return Promise.reject(i);throw i}};const Ia=new IN;function et(e,t){return Ia.parse(e,t)}et.options=et.setOptions=function(e){return Ia.setOptions(e),et.defaults=Ia.defaults,Kb(et.defaults),et};et.getDefaults=Gp;et.defaults=qa;et.use=function(...e){return Ia.use(...e),et.defaults=Ia.defaults,Kb(et.defaults),et};et.walkTokens=function(e,t){return Ia.walkTokens(e,t)};et.parseInline=Ia.parseInline;et.Parser=Jn;et.parser=Jn.parse;et.Renderer=Qu;et.TextRenderer=Xp;et.Lexer=Qn;et.lexer=Qn.lex;et.Tokenizer=Xu;et.Hooks=Qo;et.parse=et;et.options;et.setOptions;et.use;et.walkTokens;et.parseInline;Jn.parse;Qn.lex;const $N=()=>{const{featureInfoModal:e,hideFeatureInfo:t,featureDescriptions:n,lang:i,langs:a}=ee.useContext(Ut);if(!e.visible||!e.featureId)return null;const o=e.featureId;n[o];const s=m=>{m.target===m.currentTarget&&t()},u=()=>{t()},h=m=>{if(!m)return"";try{et.setOptions({breaks:!0,gfm:!0,sanitize:!1,smartLists:!0,smartypants:!0});let g=et.parse(m);return g=g.replace(/<p><\/p>/g,"").replace(/<p>(<ul>.*?<\/ul>)<\/p>/g,"$1").replace(/<p>(<ol>.*?<\/ol>)<\/p>/g,"$1"),g}catch(g){return console.error("Markdown parsing error:",g),m.replace(/\n/g,"<br>")}},d=(m=>{var x;let g="";if(m.startsWith("GB")){const b=n[m];b?g=` 717 <div class="feature-info-section"> 718 <div class="description-content">${h(b.description)}</div> 719 </div> 720 <div class="feature-info-section"> 721 <h4>Feature Type</h4> 722 <p>Grambank (GB) Feature</p> 723 </div> 724 `:g=` 725 <div class="feature-info-section"> 726 <h4>Feature ID</h4> 727 <p><strong>${m}</strong></p> 728 </div> 729 <div class="feature-info-section"> 730 <h4>Description</h4> 731 <p>This is a Grambank (GB) feature. Detailed description not available.</p> 732 </div> 733 `}else if(m.startsWith("EA")){const b=n[m];b?g=` 734 <div class="feature-info-section"> 735 <h4>Name</h4> 736 <p><strong>${b.name}</strong></p> 737 </div> 738 <div class="feature-info-section"> 739 <h4>Description</h4> 740 <div class="description-content">${h(b.description)}</div> 741 </div> 742 <div class="feature-info-section"> 743 <h4>Feature Type</h4> 744 <p>D-PLACE (EA) Feature</p> 745 </div> 746 `:g=` 747 <div class="feature-info-section"> 748 <h4>Feature ID</h4> 749 <p><strong>${m}</strong></p> 750 </div> 751 <div class="feature-info-section"> 752 <h4>Description</h4> 753 <p>This is a D-PLACE (EA) feature. Detailed description not available.</p> 754 </div> 755 `}else if(m.includes("Richness")){const b=n[m];b?g=` 756 <div class="feature-info-section"> 757 <h4>Name</h4> 758 <p><strong>${b.name}</strong></p> 759 </div> 760 <div class="feature-info-section"> 761 <h4>Description</h4> 762 <div class="description-content">${h(b.description)}</div> 763 </div> 764 <div class="feature-info-section"> 765 <h4>Feature Type</h4> 766 <p>Environmental/Biodiversity Feature</p> 767 </div> 768 `:g=` 769 <div class="feature-info-section"> 770 <h4>Description</h4> 771 <p>This feature measures the biodiversity of ${((x={AmphibianRichness:"Amphibian Species Richness",BirdRichness:"Bird Species Richness",MammalRichness:"Mammal Species Richness",VascularPlantsRichness:"Vascular Plant Species Richness"}[m])==null?void 0:x.toLowerCase())||m.toLowerCase()} in the region where the language is spoken.</p> 772 </div> 773 <div class="feature-info-section"> 774 <h4>Feature Type</h4> 775 <p>Environmental/Biodiversity Feature</p> 776 </div> 777 `}else{const b=n[m];b?g=` 778 <div class="feature-info-section"> 779 <h4>Name</h4> 780 <p><strong>${b.name}</strong></p> 781 </div> 782 <div class="feature-info-section"> 783 <h4>Description</h4> 784 <div class="description-content">${h(b.description)}</div> 785 </div> 786 ${b.area?` 787 <div class="feature-info-section"> 788 <h4>Area</h4> 789 <p>${b.area}</p> 790 </div> 791 `:""} 792 ${b.chapter?` 793 <div class="feature-info-section"> 794 <h4>Chapter</h4> 795 <p>${b.chapter}</p> 796 </div> 797 `:""} 798 <div class="feature-info-section"> 799 <h4>Feature Type</h4> 800 <p>WALS Feature</p> 801 </div> 802 `:g=` 803 <div class="feature-info-section"> 804 <h4>Feature ID</h4> 805 <p><strong>${m}</strong></p> 806 </div> 807 <div class="feature-info-section"> 808 <h4>Description</h4> 809 <p>This is an unknown feature type. Detailed description not available.</p> 810 </div> 811 `}return g})(o);return y.jsx("div",{className:"feature-info-modal",onClick:s,children:y.jsxs("div",{className:"feature-info-content",children:[y.jsxs("div",{className:"feature-info-header",children:[y.jsxs("h3",{id:"feature-info-title",children:["Feature: ",o]}),y.jsx("button",{id:"close-feature-info",className:"close-btn",onClick:u,children:"Ã"})]}),y.jsx("div",{id:"feature-info-body",className:"feature-info-body",dangerouslySetInnerHTML:{__html:d}})]})})},UN=({isVisible:e,onClose:t,onApiKeySet:n})=>{const{lang:i,langs:a}=ee.useContext(Ut),[o,s]=ee.useState(""),[u,h]=ee.useState("gemini"),[f,d]=ee.useState(!1);ee.useEffect(()=>{if(e){const b=Qr();h(b);const E=hd(b);s(E||"")}},[e]);const m=b=>{h(b);const E=hd(b);s(E||"")},g=async()=>
811{if(!o.trim()){alert(i==="zh"?"请è¾å ¥ææçAPIå¯é¥":"Please enter a valid API key");return}d(!0);try{Wz(o.trim(),u),Xz(u),n&&n(),t()}catch(b){console.error("Error saving API key:",b),alert(i==="zh"?"ä¿åAPIå¯é¥æ¶åºéï¼è¯·éè¯":"Error saving API key. Please try again.")}finally{d(!1)}},x=()=>{s(""),t()};return e?y.jsx("div",{className:"modal-overlay",children:y.jsxs("div",{className:"modal-content",children:[y.jsxs("div",{className:"modal-header",children:[y.jsx("h3",{children:a[i].apiKeyTitle}),y.jsx("button",{onClick:x,className:"modal-close",children:"Ã"})]}),y.jsxs("div",{className:"modal-body",children:[y.jsxs("div",{className:"form-group",children:[y.jsxs("label",{htmlFor:"api-provider-select",children:[i==="zh"?"APIæä¾å":"API Provider",":"]}),y.jsxs("select",{id:"api-provider-select",value:u,onChange:b=>m(b.target.value),className:"form-control",style:{marginBottom:"12px"},children:[y.jsx("option",{value:"gemini",children:"Google Gemini"}),y.jsx("option",{value:"qianwen",children:"éä¹åé® (Qianwen)"})]})]}),y.jsxs("div",{className:"form-group",children:[y.jsxs("label",{htmlFor:"api-key-input",children:[a[i].apiKey,":"]}),y.jsx("input",{id:"api-key-input",type:"password",value:o,onChange:b=>s(b.target.value),placeholder:u==="qianwen"?i==="zh"?"请è¾å ¥éä¹åé®APIå¯é¥":"Enter Qianwen API Key":a[i].apiKeyPlaceholder,className:"form-control"})]}),y.jsxs("div",{className:"api-key-info",children:[y.jsx("p",{children:y.jsx("strong",{children:a[i].apiKeyDesc})}),y.jsx("ul",{children:u==="gemini"?y.jsxs(y.Fragment,{children:[y.jsx("li",{children:a[i].apiKeyNote1}),y.jsxs("li",{children:[a[i].apiKeyNote2,y.jsx("a",{href:"https://aistudio.google.com/app/apikey",target:"_blank",rel:"noopener noreferrer",children:a[i].apiKeyGet})]}),y.jsx("li",{children:a[i].apiKeyNote3})]}):y.jsxs(y.Fragment,{children:[y.jsx("li",{children:i==="zh"?"éä¹å鮿¯é¿éå·´å·´å¼åç大è¯è¨æ¨¡å":"Qianwen is a large language model developed by Alibaba"}),y.jsxs("li",{children:[i==="zh"?"è·åAPIå¯é¥ï¼":"Get API Key: ",y.jsx("a",{href:"https://dashscope.console.aliyun.com/",target:"_blank",rel:"noopener noreferrer",children:i==="zh"?"é¿éäºDashScopeæ§å¶å°":"Alibaba Cloud DashScope Console"})]}),y.jsx("li",{children:i==="zh"?"APIå¯é¥å°å®å ¨åå¨å¨æ¬å°æµè§å¨ä¸":"API key will be securely stored in your local browser"})]})})]})]}),y.jsxs("div",{className:"modal-footer",children:[y.jsx("button",{onClick:g,disabled:f||!o.trim(),className:"btn btn-primary",children:f?"Saving...":a[i].apiKeySave}),y.jsx("button",{onClick:x,className:"btn btn-secondary",children:a[i].apiKeyCancel})]})]})}):null};var Td={exports:{}};/* @preserve 812 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com 813 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade 814 */(function(e,t){(function(n,i){i(t)})(Jo,function(n){var i="1.9.4";function a(r){var l,c,p,_;for(c=1,p=arguments.length;c<p;c++){_=arguments[c];for(l in _)r[l]=_[l]}return r}var o=Object.create||function(){function r(){}return function(l){return r.prototype=l,new r}}();function s(r,l){var c=Array.prototype.slice;if(r.bind)return r.bind.apply(r,c.call(arguments,1));var p=c.call(arguments,2);return function(){return r.apply(l,p.length?p.concat(c.call(arguments)):arguments)}}var u=0;function h(r){return"_leaflet_id"in r||(r._leaflet_id=++u),r._leaflet_id}function f(r,l,c){var p,_,S,B;return B=function(){p=!1,_&&(S.apply(c,_),_=!1)},S=function(){p?_=arguments:(r.apply(c,arguments),setTimeout(B,l),p=!0)},S}function d(r,l,c){var p=l[1],_=l[0],S=p-_;return r===p&&c?r:((r-_)%S+S)%S+_}function m(){return!1}function g(r,l){if(l===!1)return r;var c=Math.pow(10,l===void 0?6:l);return Math.round(r*c)/c}function x(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function b(r){return x(r).split(/\s+/)}function E(r,l){Object.prototype.hasOwnProperty.call(r,"options")||(r.options=r.options?o(r.options):{});for(var c in l)r.options[c]=l[c];return r.options}function H(r,l,c){var p=[];for(var _ in r)p.push(encodeURIComponent(c?_.toUpperCase():_)+"="+encodeURIComponent(r[_]));return(!l||l.indexOf("?")===-1?"?":"&")+p.join("&")}var v=/\{ *([\w_ -]+) *\}/g;function w(r,l){return r.replace(v,function(c,p){var _=l[p];if(_===void 0)throw new Error("No value provided for variable "+c);return typeof _=="function"&&(_=_(l)),_})}var A=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"};function D(r,l){for(var c=0;c<r.length;c++)if(r[c]===l)return c;return-1}var G="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function j(r){return window["webkit"+r]||window["moz"+r]||window["ms"+r]}var Z=0;function Y(r){var l=+new Date,c=Math.max(0,16-(l-Z));return Z=l+c,window.setTimeout(r,c)}var q=window.requestAnimationFrame||j("RequestAnimationFrame")||Y,te=window.cancelAnimationFrame||j("CancelAnimationFrame")||j("CancelRequestAnimationFrame")||function(r){window.clearTimeout(r)};function $(r,l,c){if(c&&q===Y)r.call(l);else return q.call(window,s(r,l))}function O(r){r&&te.call(window,r)}var U={__proto__:null,extend:a,create:o,bind:s,get lastId(){return u},stamp:h,throttle:f,wrapNum:d,falseFn:m,formatNum:g,trim:x,splitWords:b,setOptions:E,getParamString:H,template:w,isArray:A,indexOf:D,emptyImageUrl:G,requestFn:q,cancelFn:te,requestAnimFrame:$,cancelAnimFrame:O};function T(){}T.extend=function(r){var l=function(){E(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},c=l.__super__=this.prototype,p=o(c);p.constructor=l,l.prototype=p;for(var _ in this)Object.prototype.hasOwnProperty.call(this,_)&&_!=="prototype"&&_!=="__super__"&&(l[_]=this[_]);return r.statics&&a(l,r.statics),r.includes&&(N(r.includes),a.apply(null,[p].concat(r.includes))),a(p,r),delete p.statics,delete p.includes,p.options&&(p.options=c.options?o(c.options):{},a(p.options,r.options)),p._initHooks=[],p.callInitHooks=function(){if(!this._initHooksCalled){c.callInitHooks&&c.callInitHooks.call(this),this._initHooksCalled=!0;for(var S=0,B=p._initHooks.length;S<B;S++)p._initHooks[S].call(this)}},l},T.include=function(r){var l=this.prototype.options;return a(this.prototype,r),r.options&&(this.prototype.options=l,this.mergeOptions(r.options)),this},T.mergeOptions=function(r){return a(this.prototype.options,r),this},T.addInitHook=function(r){var l=Array.prototype.slice.call(arguments,1
814),c=typeof r=="function"?r:function(){this[r].apply(this,l)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(c),this};function N(r){if(!(typeof L>"u"||!L||!L.Mixin)){r=A(r)?r:[r];for(var l=0;l<r.length;l++)r[l]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var C={on:function(r,l,c){if(typeof r=="object")for(var p in r)this._on(p,r[p],l);else{r=b(r);for(var _=0,S=r.length;_<S;_++)this._on(r[_],l,c)}return this},off:function(r,l,c){if(!arguments.length)delete this._events;else if(typeof r=="object")for(var p in r)this._off(p,r[p],l);else{r=b(r);for(var _=arguments.length===1,S=0,B=r.length;S<B;S++)_?this._off(r[S]):this._off(r[S],l,c)}return this},_on:function(r,l,c,p){if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}if(this._listens(r,l,c)===!1){c===this&&(c=void 0);var _={fn:l,ctx:c};p&&(_.once=!0),this._events=this._events||{},this._events[r]=this._events[r]||[],this._events[r].push(_)}},_off:function(r,l,c){var p,_,S;if(this._events&&(p=this._events[r],!!p)){if(arguments.length===1){if(this._firingCount)for(_=0,S=p.length;_<S;_++)p[_].fn=m;delete this._events[r];return}if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}var B=this._listens(r,l,c);if(B!==!1){var W=p[B];this._firingCount&&(W.fn=m,this._events[r]=p=p.slice()),p.splice(B,1)}}},fire:function(r,l,c){if(!this.listens(r,c))return this;var p=a({},l,{type:r,target:this,sourceTarget:l&&l.sourceTarget||this});if(this._events){var _=this._events[r];if(_){this._firingCount=this._firingCount+1||1;for(var S=0,B=_.length;S<B;S++){var W=_[S],ne=W.fn;W.once&&this.off(r,ne,W.ctx),ne.call(W.ctx||this,p)}this._firingCount--}}return c&&this._propagateEvent(p),this},listens:function(r,l,c,p){typeof r!="string"&&console.warn('"string" type argument expected');var _=l;typeof l!="function"&&(p=!!l,_=void 0,c=void 0);var S=this._events&&this._events[r];if(S&&S.length&&this._listens(r,_,c)!==!1)return!0;if(p){for(var B in this._eventParents)if(this._eventParents[B].listens(r,l,c,p))return!0}return!1},_listens:function(r,l,c){if(!this._events)return!1;var p=this._events[r]||[];if(!l)return!!p.length;c===this&&(c=void 0);for(var _=0,S=p.length;_<S;_++)if(p[_].fn===l&&p[_].ctx===c)return _;return!1},once:function(r,l,c){if(typeof r=="object")for(var p in r)this._on(p,r[p],l,!0);else{r=b(r);for(var _=0,S=r.length;_<S;_++)this._on(r[_],l,c,!0)}return this},addEventParent:function(r){return this._eventParents=this._eventParents||{},this._eventParents[h(r)]=r,this},removeEventParent:function(r){return this._eventParents&&delete this._eventParents[h(r)],this},_propagateEvent:function(r){for(var l in this._eventParents)this._eventParents[l].fire(r.type,a({layer:r.target,propagatedFrom:r.target},r),!0)}};C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens;var F=T.extend(C);function M(r,l,c){this.x=c?Math.round(r):r,this.y=c?Math.round(l):l}var V=Math.trunc||function(r){return r>0?Math.floor(r):Math.ceil(r)};M.prototype={clone:function(){return new M(this.x,this.y)},add:function(r){return this.clone()._add(k(r))},_add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.clone()._subtract(k(r))},_subtract:function(r){return this.x-=r.x,this.y-=r.y,this},divideBy:function(r){return this.clone()._divideBy(r)},_divideBy:function(r){return this.x/=r,this.y/=r,this},multiplyBy:function(r){return this.clone()._multiplyBy(r)},_multiplyBy:function(r){return this.x*=r,this.y*=r,this},scaleBy:function(r){return new M(this.x*r.x,this.y*r.y)},unscaleBy:function(r){return new M(this.x/r.x,this.y/r.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=V(this.x),this.y=V(this.y),this},distanceTo:function(r){r=k(r);var l=r.x-this.x,c=r.y-this.y;return Math.sqrt(l*l+c*c)},equals:function(r){return r=k(r),r.x===this.x&&r.y===this.y},contains:function(r){return r=k(r),Math.abs(r.x)<=Math.abs(this.x)&&Math.abs(r.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function k(r,l,c){return r instanceof M?r:A(r)?new M(r[0],r[1]):r==null?r:typeof r=="object"&&"x"in r&&"y"in r?new M(r.x,r.y):new M(r,l,c)}function Q(r,l){if(r)for(var c=l?[r,l]:r,p=0,_=c.length;p<_;p++)this.extend(c[p])}Q.prototype={extend:function(r){var l,c;if(!r)return this;if(r instanceof M||typeof r[0]=="number"||"x"in r)l=c=k(r);else if(r=ie(r),l=r.min,c=r.max,!l||!c)return this;return!this.min&&!this.max?(this.min=l.clone(),this.max=c.clone()):(this.min.x=Math.min(l.x,this.min.x),this.max.x=Math.max(c.x,this.max.x),this.min.y=Math.min(l.y,this.min.y),this.max.y=Math.max(c.y,this.max.y)),this},getCenter:function(r){return k((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,r)},getBottomLeft:function(){return k(this.min.x,this.max.y)},getTopRight:function(){return k(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(r){var l,c;return typeof r[0]=="number"||r instanceof M?r=k(r):r=ie(r),r instanceof Q?(l=r.min,c=r.max):l=c=r,l.x>=this.min.x&&c.x<=this.max.x&&l.y>=this.min.y&&c.y<=this.max.y},intersects:function(r){r=ie(r);
814var l=this.min,c=this.max,p=r.min,_=r.max,S=_.x>=l.x&&p.x<=c.x,B=_.y>=l.y&&p.y<=c.y;return S&&B},overlaps:function(r){r=ie(r);var l=this.min,c=this.max,p=r.min,_=r.max,S=_.x>l.x&&p.x<c.x,B=_.y>l.y&&p.y<c.y;return S&&B},isValid:function(){return!!(this.min&&this.max)},pad:function(r){var l=this.min,c=this.max,p=Math.abs(l.x-c.x)*r,_=Math.abs(l.y-c.y)*r;return ie(k(l.x-p,l.y-_),k(c.x+p,c.y+_))},equals:function(r){return r?(r=ie(r),this.min.equals(r.getTopLeft())&&this.max.equals(r.getBottomRight())):!1}};function ie(r,l){return!r||r instanceof Q?r:new Q(r,l)}function z(r,l){if(r)for(var c=l?[r,l]:r,p=0,_=c.length;p<_;p++)this.extend(c[p])}z.prototype={extend:function(r){var l=this._southWest,c=this._northEast,p,_;if(r instanceof X)p=r,_=r;else if(r instanceof z){if(p=r._southWest,_=r._northEast,!p||!_)return this}else return r?this.extend(ae(r)||ye(r)):this;return!l&&!c?(this._southWest=new X(p.lat,p.lng),this._northEast=new X(_.lat,_.lng)):(l.lat=Math.min(p.lat,l.lat),l.lng=Math.min(p.lng,l.lng),c.lat=Math.max(_.lat,c.lat),c.lng=Math.max(_.lng,c.lng)),this},pad:function(r){var l=this._southWest,c=this._northEast,p=Math.abs(l.lat-c.lat)*r,_=Math.abs(l.lng-c.lng)*r;return new z(new X(l.lat-p,l.lng-_),new X(c.lat+p,c.lng+_))},getCenter:function(){return new X((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new X(this.getNorth(),this.getWest())},getSouthEast:function(){return new X(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(r){typeof r[0]=="number"||r instanceof X||"lat"in r?r=ae(r):r=ye(r);var l=this._southWest,c=this._northEast,p,_;
814return r instanceof z?(p=r.getSouthWest(),_=r.getNorthEast()):p=_=r,p.lat>=l.lat&&_.lat<=c.lat&&p.lng>=l.lng&&_.lng<=c.lng},intersects:function(r){r=ye(r);var l=this._southWest,c=this._northEast,p=r.getSouthWest(),_=r.getNorthEast(),S=_.lat>=l.lat&&p.lat<=c.lat,B=_.lng>=l.lng&&p.lng<=c.lng;return S&&B},overlaps:function(r){r=ye(r);var l=this._southWest,c=this._northEast,p=r.getSouthWest(),_=r.getNorthEast(),S=_.lat>l.lat&&p.lat<c.lat,B=_.lng>l.lng&&p.lng<c.lng;return S&&B},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(r,l){return r?(r=ye(r),this._southWest.equals(r.getSouthWest(),l)&&this._northEast.equals(r.getNorthEast(),l)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function ye(r,l){return r instanceof z?r:new z(r,l)}function X(r,l,c){if(isNaN(r)||isNaN(l))throw new Error("Invalid LatLng object: ("+r+", "+l+")");this.lat=+r,this.lng=+l,c!==void 0&&(this.alt=+c)}X.prototype={equals:function(r,l){if(!r)return!1;r=ae(r);var c=Math.max(Math.abs(this.lat-r.lat),Math.abs(this.lng-r.lng));return c<=(l===void 0?1e-9:l)},toString:function(r){return"LatLng("+g(this.lat,r)+", "+g(this.lng,r)+")"},distanceTo:function(r){return pe.distance(this,ae(r))},wrap:function(){return pe.wrapLatLng(this)},toBounds:function(r){var l=180*r/40075017,c=l/Math.cos(Math.PI/180*this.lat);return ye([this.lat-l,this.lng-c],[this.lat+l,this.lng+c])},clone:function(){return new X(this.lat,this.lng,this.alt)}};function ae(r,l,c){return r instanceof X?r:A(r)&&typeof r[0]!="object"?r.length===3?new X(r[0],r[1],r[2]):r.length===2?new X(r[0],r[1]):null:r==null?r:typeof r=="object"&&"lat"in r?new X(r.lat,"lng"in r?r.lng:r.lon,r.alt):l===void 0?null:new X(r,l,c)}var _e={latLngToPoint:function(r,l){var c=this.projection.project(r),p=this.scale(l);return this.transformation._transform(c,p)},pointToLatLng:function(r,l){var c=this.scale(l),p=this.transformation.untransform(r,c);return this.projection.unproject(p)},project:function(r){return this.projection.project(r)},unproject:function(r){return this.projection.unproject(r)},scale:function(r){return 256*Math.pow(2,r)},zoom:function(r){return Math.log(r/256)/Math.LN2},getProjectedBounds:function(r){if(this.infinite)return null;var l=this.projection.bounds,c=this.scale(r),p=this.transformation.transform(l.min,c),_=this.transformation.transform(l.max,c);return new Q(p,_)},infinite:!1,wrapLatLng:function(r){var l=this.wrapLng?d(r.lng,this.wrapLng,!0):r.lng,c=this.wrapLat?d(r.lat,this.wrapLat,!0):r.lat,p=r.alt;return new X(c,l,p)},wrapLatLngBounds:function(r){var l=r.getCenter(),c=this.wrapLatLng(l),p=l.lat-c.lat,_=l.lng-c.lng;if(p===0&&_===0)return r;
814var S=r.getSouthWest(),B=r.getNorthEast(),W=new X(S.lat-p,S.lng-_),ne=new X(B.lat-p,B.lng-_);return new z(W,ne)}},pe=a({},_e,{wrapLng:[-180,180],R:6371e3,distance:function(r,l){var c=Math.PI/180,p=r.lat*c,_=l.lat*c,S=Math.sin((l.lat-r.lat)*c/2),B=Math.sin((l.lng-r.lng)*c/2),W=S*S+Math.cos(p)*Math.cos(_)*B*B,ne=2*Math.atan2(Math.sqrt(W),Math.sqrt(1-W));return this.R*ne}}),Re=6378137,ve={R:Re,MAX_LATITUDE:85.0511287798,project:function(r){var l=Math.PI/180,c=this.MAX_LATITUDE,p=Math.max(Math.min(c,r.lat),-c),_=Math.sin(p*l);return new M(this.R*r.lng*l,this.R*Math.log((1+_)/(1-_))/2)},unproject:function(r){var l=180/Math.PI;return new X((2*Math.atan(Math.exp(r.y/this.R))-Math.PI/2)*l,r.x*l/this.R)},bounds:function(){var r=Re*Math.PI;return new Q([-r,-r],[r,r])}()};function R(r,l,c,p){if(A(r)){this._a=r[0],this._b=r[1],this._c=r[2],this._d=r[3];return}this._a=r,this._b=l,this._c=c,this._d=p}R.prototype={transform:function(r,l){return this._transform(r.clone(),l)},_transform:function(r,l){return l=l||1,r.x=l*(this._a*r.x+this._b),r.y=l*(this._c*r.y+this._d),r},untransform:function(r,l){return l=l||1,new M((r.x/l-this._b)/this._a,(r.y/l-this._d)/this._c)}};function ce(r,l,c,p){return new R(r,l,c,p)}var Me=a({},pe,{code:"EPSG:3857",projection:ve,transformation:function(){var r=.5/(Math.PI*ve.R);return ce(r,.5,-r,.5)}()}),we=a({},Me,{code:"EPSG:900913"});function ke(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Se(r,l){var c="",p,_,S,B,W,ne;for(p=0,S=r.length;p<S;p++){for(W=r[p],_=0,B=W.length;_<B;_++)ne=W[_],c+=(_?"L":"M")+ne.x+" "+ne.y;c+=l?Ne.svg?"z":"x":""}return c||"M0 0"}var de=document.documentElement.style,Te="ActiveXObject"in window,De=Te&&!document.addEventListener,xe="msLaunchUri"in navigator&&!("documentMode"in document),he=Hn("webkit"),Oe=Hn("android"),I=Hn("android 2")||Hn("android 3"),J=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),oe=Oe&&Hn("Google")&&J<537&&!("AudioNode"in window),P=!!window.opera,K=!xe&&Hn("chrome"),re=Hn("gecko")&&!he&&!P&&!Te,le=!K&&Hn("safari"),se=Hn("phantom"),ue="OTransition"in de,Ae=navigator.platform.indexOf("Win")===0,me=Te&&"transition"in de,Le="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!I,Ee="MozPerspective"in de,Ce=!window.L_DISABLE_3D&&(me||Le||Ee)&&!ue&&!se,He=typeof orientation<"u"||Hn("mobile"),Ie=He&&he,tt=He&&Le,on=!window.PointerEvent&&window.MSPointerEvent,_t=!!(window.PointerEvent||on),Va="ontouchstart"in window||!!window.TouchEvent,Ya=!window.L_NO_TOUCH&&(Va||_t),Ni=He&&P,u1=He&&re,c1=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,h1=function(){var r=!1;try{var l=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("testPassiveEventSupport",m,l),window.removeEventListener("testPassiveEventSupport",m,l)}catch{}return r}(),f1=function(){return!!document.createElement("canvas").getContext}(),Ac=!!(document.createElementNS&&ke("svg").createSVGRect),d1=!!Ac&&function(){var r=document.createElement("div");return r.innerHTML="<svg/>",(r.firstChild&&r.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),p1=!Ac&&function(){try{var r=document.createElement("div");r.innerHTML='<v:shape adj="1"/>';var l=r.firstChild;return l.style.behavior="url(#default#VML)",l&&typeof l.adj=="object"}catch{return!1}}(),m1=navigator.platform.indexOf("Mac")===0,g1=navigator.platform.indexOf("Linux")===0;function Hn(r){return navigator.userAgent.toLowerCase().indexOf(r)>=0}var Ne={ie:Te,ielt9:De,edge:xe,webkit:he,android:Oe,android23:I,androidStock:oe,opera:P,chrome:K,gecko:re,safari:le,phantom:se,opera12:ue,win:Ae,ie3d:me,webkit3d:Le,gecko3d:Ee,any3d:Ce,mobile:He,mobileWebkit:Ie,mobileWebkit3d:tt,msPointer:on,pointer:_t,touch:Ya,touchNative:Va,mobileOpera:Ni,mobileGecko:u1,retina:c1,passiveEvents:h1,canvas:f1,svg:Ac,vml:p1,inlineSvg:d1,mac:m1,linux:g1},Wp=Ne.msPointer?"MSPointerDown":"pointerdown",Qp=Ne.msPointer?"MSPointerMove":"pointermove",Jp=Ne.msPointer?"MSPointerUp":"pointerup",em=Ne.msPointer?"MSPointerCancel":"pointercancel",zc={touchstart:Wp,touchmove:Qp,touchend:Jp,touchcancel:em},tm={touchstart:w1,touchmove:ql,touchend:ql,touchcancel:ql},Ka={},nm=!1;function y1(r,l,c){return l==="touchstart"&&b1(),tm[l]?(c=tm[l].bind(this,c),r.addEventListener(zc[l],c,!1),c):(console.warn("wrong event specified:",l),m)}function x1(r,l,c){if(!zc[l]){console.warn("wrong event specified:",l);return}r.removeEventListener(zc[l],c,!1)}function _1(r){Ka[r.pointerId]=r}function v1(r){Ka[r.pointerId]&&(Ka[r.pointerId]=r)}function im(r){delete Ka[r.pointerId]}function b1(){nm||(document.addEventListener(Wp,_1,!0),document.addEventListener(Qp,v1,!0),document.addEventListener(Jp,im,!0),document.addEventListener(em,im,!0),nm=!0)}function ql(r,l){if(l.pointerType!==(l.MSPOINTER_TYPE_MOUSE||"mouse")){l.touches=[];
814for(var c in Ka)l.touches.push(Ka[c]);l.changedTouches=[l],r(l)}}function w1(r,l){l.MSPOINTER_TYPE_TOUCH&&l.pointerType===l.MSPOINTER_TYPE_TOUCH&&Pt(l),ql(r,l)}function S1(r){var l={},c,p;for(p in r)c=r[p],l[p]=c&&c.bind?c.bind(r):c;return r=l,l.type="dblclick",l.detail=2,l.isTrusted=!1,l._simulated=!0,l}var k1=200;function T1(r,l){r.addEventListener("dblclick",l);var c=0,p;function _(S){if(S.detail!==1){p=S.detail;return}if(!(S.pointerType==="mouse"||S.sourceCapabilities&&!S.sourceCapabilities.firesTouchEvents)){var B=sm(S);if(!(B.some(function(ne){return ne instanceof HTMLLabelElement&&ne.attributes.for})&&!B.some(function(ne){return ne instanceof HTMLInputElement||ne instanceof HTMLSelectElement}))){var W=Date.now();W-c<=k1?(p++,p===2&&l(S1(S))):p=1,c=W}}}return r.addEventListener("click",_),{dblclick:l,simDblclick:_}}function E1(r,l){r.removeEventListener("dblclick",l.dblclick),r.removeEventListener("click",l.simDblclick)}var Cc=Kl(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),to=Kl(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),am=to==="webkitTransition"||to==="OTransition"?to+"End":"transitionend";function rm(r){return typeof r=="string"?document.getElementById(r):r}function no(r,l){var c=r.style[l]||r.currentStyle&&r.currentStyle[l];if((!c||c==="auto")&&document.defaultView){var p=document.defaultView.getComputedStyle(r,null);c=p?p[l]:null}return c==="auto"?null:c}function Xe(r,l,c){var p=document.createElement(r);return p.className=l||"",c&&c.appendChild(p),p}function yt(r){var l=r.parentNode;l&&l.removeChild(r)}function Vl(r){for(;r.firstChild;)r.removeChild(r.firstChild)}function Xa(r){var l=r.parentNode;l&&l.lastChild!==r&&l.appendChild(r)}function Wa(r){var l=r.parentNode;l&&l.firstChild!==r&&l.insertBefore(r,l.firstChild)}function Lc(r,l){if(r.classList!==void 0)return r.classList.contains(l);var c=Yl(r);return c.length>0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(c)}function Ue(r,l){if(r.classList!==void 0)for(var c=b(l),p=0,_=c.length;p<_;p++)r.classList.add(c[p]);else if(!Lc(r,l)){var S=Yl(r);Dc(r,(S?S+" ":"")+l)}}function wt(r,l){r.classList!==void 0?r.classList.remove(l):Dc(r,x((" "+Yl(r)+" ").replace(" "+l+" "," ")))}function Dc(r,l){r.className.baseVal===void 0?r.className=l:r.className.baseVal=l}function Yl(r){return r.correspondingElement&&(r=r.correspondingElement),r.className.baseVal===void 0?r.className:r.className.baseVal}function bn(r,l){"opacity"in r.style?r.style.opacity=l:"filter"in r.style&&A1(r,l)}function A1(r,l){var c=!1,p="DXImageTransform.Microsoft.Alpha";try{c=r.filters.item(p)}catch{if(l===1)return}l=Math.round(l*100),c?(c.Enabled=l!==100,c.Opacity=l):r.style.filter+=" progid:"+p+"(opacity="+l+")"}function Kl(r){for(var l=document.documentElement.style,c=0;c<r.length;c++)if(r[c]in l)return r[c];return!1}function ha(r,l,c){var p=l||new M(0,0);r.style[Cc]=(Ne.ie3d?"translate("+p.x+"px,"+p.y+"px)":"translate3d("+p.x+"px,"+p.y+"px,0)")+(c?" scale("+c+")":"")}function Tt(r,l){r._leaflet_pos=l,Ne.any3d?ha(r,l):(r.style.left=l.x+"px",r.style.top=l.y+"px")}function fa(r){return r._leaflet_pos||new M(0,0)}var io,ao,Mc;if("onselectstart"in document)io=function(){Fe(window,"selectstart",Pt)},ao=function(){st(window,"selectstart",Pt)};else{var ro=Kl(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);io=function(){if(ro){var r=document.documentElement.style;Mc=r[ro],r[ro]="none"}},ao=function(){ro&&(document.documentElement.style[ro]=Mc,Mc=void 0)}}function Nc(){Fe(window,"dragstart",Pt)}function Rc(){st(window,"dragstart",Pt)}var Xl,Oc;function jc(r){for(;r.tabIndex===-1;)r=r.parentNode;r.style&&(Wl(),Xl=r,Oc=r.style.outlineStyle,r.style.outlineStyle="none",Fe(window,"keydown",Wl))}function Wl(){Xl&&(Xl.style.outlineStyle=Oc,Xl=void 0,Oc=void 0,st(window,"keydown",Wl))}function om(r){do r=r.parentNode;while((!r.offsetWidth||!r.offsetHeight)&&r!==document.body);return r}function Bc(r){var l=r.getBoundingClientRect();return{x:l.width/r.offsetWidth||1,y:l.height/r.offsetHeight||1,boundingClientRect:l}}var z1={__proto__:null,TRANSFORM:Cc,TRANSITION:to,TRANSITION_END:am,get:rm,getStyle:no,create:Xe,remove:yt,empty:Vl,toFront:Xa,toBack:Wa,hasClass:Lc,addClass:Ue,removeClass:wt,setClass:Dc,getClass:Yl,setOpacity:bn,testProp:Kl,setTransform:ha,setPosition:Tt,getPosition:fa,get disableTextSelection(){return io},get enableTextSelection(){return ao},disableImageDrag:Nc,enableImageDrag:Rc,preventOutline:jc,restoreOutline:Wl,getSizedParentNode:om,getScale:Bc};function Fe(r,l,c,p){if(l&&typeof l=="object")for(var _ in l)Fc(r,_,l[_],c);else{l=b(l);for(var S=0,B=l.length;S<B;S++)Fc(r,l[S],c,p)}return this}var Gn="_leaflet_events";function st(r,l,c,p){if(arguments.length===1)lm(r),delete r[Gn];else if(l&&typeof l=="object")for(var _ in l)Ic(r,_,l[_],c);else if(l=b(l),arguments.length===2)lm(r,function(W){return D(l,W)!==-1});else for(var S=0,B=l.length;S<B;S++)Ic(r,l[S],c,p);return this}function lm(r,l){for(var c in r[Gn]){var p=c.split(/\d/)[0];
814(!l||l(p))&&Ic(r,p,null,null,c)}}var Pc={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Fc(r,l,c,p){var _=l+h(c)+(p?"_"+h(p):"");if(r[Gn]&&r[Gn][_])return this;var S=function(W){return c.call(p||r,W||window.event)},B=S;!Ne.touchNative&&Ne.pointer&&l.indexOf("touch")===0?S=y1(r,l,S):Ne.touch&&l==="dblclick"?S=T1(r,S):"addEventListener"in r?l==="touchstart"||l==="touchmove"||l==="wheel"||l==="mousewheel"?r.addEventListener(Pc[l]||l,S,Ne.passiveEvents?{passive:!1}:!1):l==="mouseenter"||l==="mouseleave"?(S=function(W){W=W||window.event,Uc(r,W)&&B(W)},r.addEventListener(Pc[l],S,!1)):r.addEventListener(l,B,!1):r.attachEvent("on"+l,S),r[Gn]=r[Gn]||{},r[Gn][_]=S}function Ic(r,l,c,p,_){_=_||l+h(c)+(p?"_"+h(p):"");var S=r[Gn]&&r[Gn][_];if(!S)return this;!Ne.touchNative&&Ne.pointer&&l.indexOf("touch")===0?x1(r,l,S):Ne.touch&&l==="dblclick"?E1(r,S):"removeEventListener"in r?r.removeEventListener(Pc[l]||l,S,!1):r.detachEvent("on"+l,S),r[Gn][_]=null}function da(r){return r.stopPropagation?r.stopPropagation():r.originalEvent?r.originalEvent._stopped=!0:r.cancelBubble=!0,this}function $c(r){return Fc(r,"wheel",da),this}function oo(r){return Fe(r,"mousedown touchstart dblclick contextmenu",da),r._leaflet_disable_click=!0,this}function Pt(r){return r.preventDefault?r.preventDefault():r.returnValue=!1,this}function pa(r){return Pt(r),da(r),this}function sm(r){if(r.composedPath)return r.composedPath();for(var l=[],c=r.target;c;)l.push(c),c=c.parentNode;return l}function um(r,l){if(!l)return new M(r.clientX,r.clientY);var c=Bc(l),p=c.boundingClientRect;return new M((r.clientX-p.left)/c.x-l.clientLeft,(r.clientY-p.top)/c.y-l.clientTop)}var C1=Ne.linux&&Ne.chrome?window.devicePixelRatio:Ne.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function cm(r){return Ne.edge?r.wheelDeltaY/2:r.deltaY&&r.deltaMode===0?-r.deltaY/C1:r.deltaY&&r.deltaMode===1?-r.deltaY*20:r.deltaY&&r.deltaMode===2?-r.deltaY*60:r.deltaX||r.deltaZ?0:r.wheelDelta?(r.wheelDeltaY||r.wheelDelta)/2:r.detail&&Math.abs(r.detail)<32765?-r.detail*20:r.detail?r.detail/-32765*60:0}function Uc(r,l){var c=l.relatedTarget;if(!c)return!0;try{for(;c&&c!==r;)c=c.parentNode}catch{return!1}return c!==r}var L1={__proto__:null,on:Fe,off:st,stopPropagation:da,disableScrollPropagation:$c,disableClickPropagation:oo,preventDefault:Pt,stop:pa,getPropagationPath:sm,getMousePosition:um,getWheelDelta:cm,isExternalTarget:Uc,addListener:Fe,removeListener:st},hm=F.extend({run:function(r,l,c,p){this.stop(),this._el=r,this._inProgress=!0,this._duration=c||.25,this._easeOutPower=1/Math.max(p||.5,.2),this._startPos=fa(r),this._offset=l.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=$(this._animate,this),this._step()},_step:function(r){var l=+new Date-this._startTime,c=this._duration*1e3;l<c?this._runFrame(this._easeOut(l/c),r):(this._runFrame(1),this._complete())},_runFrame:function(r,l){var c=this._startPos.add(this._offset.multiplyBy(r));l&&c._round(),Tt(this._el,c),this.fire("step")},_complete:function(){O(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(r){return 1-Math.pow(1-r,this._easeOutPower)}}),Ye=F.extend({options:{crs:Me,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(r,l){l=E(this,l),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(r),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),l.maxBounds&&this.setMaxBounds(l.maxBounds),l.zoom!==void 0&&(this._zoom=this._limitZoom(l.zoom)),l.center&&l.zoom!==void 0&&this.setView(ae(l.center),l.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=to&&Ne.any3d&&!Ne.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Fe(this._proxy,am,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 1,354 bytes, line 814
814,setView:function(r,l,c){if(l=l===void 0?this._zoom:this._limitZoom(l),r=this._limitCenter(ae(r),l,this.options.maxBounds),c=c||{},this._stop(),this._loaded&&!c.reset&&c!==!0){c.animate!==void 0&&(c.zoom=a({animate:c.animate},c.zoom),c.pan=a({animate:c.animate,duration:c.duration},c.pan));var p=this._zoom!==l?this._tryAnimatedZoom&&this._tryAnimatedZoom(r,l,c.zoom):this._tryAnimatedPan(r,c.pan);if(p)return clearTimeout(this._sizeTimer),this}return this._resetView(r,l,c.pan&&c.pan.noMoveStart),this},setZoom:function(r,l){return this._loaded?this.setView(this.getCenter(),r,{zoom:l}):(this._zoom=r,this)},zoomIn:function(r,l){return r=r||(Ne.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+r,l)},zoomOut:function(r,l){return r=r||(Ne.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-r,l)},setZoomAround:function(r,l,c){var p=this.getZoomScale(l),_=this.getSize().divideBy(2),S=r instanceof M?r:this.latLngToContainerPoint(r),B=S.subtract(_).multiplyBy(1-1/p),W=this.containerPointToLatLng(_.add(B));return this.setView(W,l,{zoom:c})},_getBoundsCenterZoom:function(r,l){l=l||{},r=r.getBounds?r.getBounds():ye(r);var c=k(l.paddingTopLeft||l.padding||[0,0]),p=k(l.paddingBottomRight||l.padding||[0,0]),_=this.getBoundsZoom(r,!1,c.add(p));if(_=typeof l.maxZoom=="number"?Math.min(l.maxZoom,_):_,_===1/0)return{center:r.getCenter(),zoom:_};
814var S=p.subtract(c).divideBy(2),B=this.project(r.getSouthWest(),_),W=this.project(r.getNorthEast(),_),ne=this.unproject(B.add(W).divideBy(2).add(S),_);return{center:ne,zoom:_}},fitBounds:function(r,l){if(r=ye(r),!r.isValid())throw new Error("Bounds are not valid.");var c=this._getBoundsCenterZoom(r,l);return this.setView(c.center,c.zoom,l)},fitWorld:function(r){return this.fitBounds([[-90,-180],[90,180]],r)},panTo:function(r,l){return this.setView(r,this._zoom,{pan:l})},panBy:function(r,l){if(r=k(r).round(),l=l||{},!r.x&&!r.y)return this.fire("moveend");if(l.animate!==!0&&!this.getSize().contains(r))return this._resetView(this.unproject(this.project(this.getCenter()).add(r)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new hm,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),l.noMoveStart||this.fire("movestart"),l.animate!==!1){Ue(this._mapPane,"leaflet-pan-anim");var c=this._getMapPanePos().subtract(r).round();this._panAnim.run(this._mapPane,c,l.duration||.25,l.easeLinearity)}else this._rawPanBy(r),this.fire("move").fire("moveend");return this},flyTo:function(r,l,c){if(c=c||{},c.animate===!1||!Ne.any3d)return this.setView(r,l,c);this._stop();var p=this.project(this.getCenter()),_=this.project(r),S=this.getSize(),B=this._zoom;r=ae(r),l=l===void 0?B:l;var W=Math.max(S.x,S.y),ne=W*this.getZoomScale(B,l),ge=_.distanceTo(p)||1,ze=1.42,je=ze*ze;function Ze(Et){var us=Et?-1:1,xw=Et?ne:W,_w=ne*ne-W*W+us*je*je*ge*ge,vw=2*xw*je*ge,Jc=_w/vw,Zm=Math.sqrt(Jc*Jc+1)-Jc,bw=Zm<1e-9?-18:Math.log(Zm);return bw}function qt(Et){return(Math.exp(Et)-Math.exp(-Et))/2}function Nt(Et){return(Math.exp(Et)+Math.exp(-Et))/2}function Sn(Et){return qt(Et)/Nt(Et)}var Yt=Ze(0);function ir(Et){return W*(Nt(Yt)/Nt(Yt+ze*Et))}function pw(Et){return W*(Nt(Yt)*Sn(Yt+ze*Et)-qt(Yt))/je}function mw(Et){return 1-Math.pow(1-Et,1.5)}var gw=Date.now(),Hm=(Ze(1)-Yt)/ze,yw=c.duration?1e3*c.duration:1e3*Hm*.8;function Gm(){var Et=(Date.now()-gw)/yw,us=mw(Et)*Hm;Et<=1?(this._flyToFrame=$(Gm,this),this._move(this.unproject(p.add(_.subtract(p).multiplyBy(pw(us)/ge)),B),this.get
vendor: 2,287 bytes, line 814
814ScaleZoom(W/ir(us),B),{flyTo:!0})):this._move(r,l)._moveEnd(!0)}return this._moveStart(!0,c.noMoveStart),Gm.call(this),this},flyToBounds:function(r,l){var c=this._getBoundsCenterZoom(r,l);return this.flyTo(c.center,c.zoom,l)},setMaxBounds:function(r){return r=ye(r),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),r.isValid()?(this.options.maxBounds=r,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(r){var l=this.options.minZoom;return this.options.minZoom=r,this._loaded&&l!==r&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(r):this},setMaxZoom:function(r){var l=this.options.maxZoom;return this.options.maxZoom=r,this._loaded&&l!==r&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(r):this},panInsideBounds:function(r,l){this._enforcingBounds=!0;var c=this.getCenter(),p=this._limitCenter(c,this._zoom,ye(r));return c.equals(p)||this.panTo(p,l),this._enforcingBounds=!1,this},panInside:function(r,l){l=l||{};var c=k(l.paddingTopLeft||l.padding||[0,0]),p=k(l.paddingBottomRight||l.padding||[0,0]),_=this.project(this.getCenter()),S=this.project(r),B=this.getPixelBounds(),W=ie([B.min.add(c),B.max.subtract(p)]),ne=W.getSize();if(!W.contains(S)){this._enforcingBounds=!0;var ge=S.subtract(W.getCenter()),ze=W.extend(S).getSize().subtract(ne);_.x+=ge.x<0?-ze.x:ze.x,_.y+=ge.y<0?-ze.y:ze.y,this.panTo(this.unproject(_),l),this._enforcingBounds=!1}return this},invalidateSize:function(r){if(!this._loaded)return this;r=a({animate:!1,pan:!0},r===!0?{animate:!0}:r);var l=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var c=this.getSize(),p=l.divideBy(2).round(),_=c.divideBy(2).round(),S=p.subtract(_);return!S.x&&!S.y?this:(r.animate&&r.pan?this.panBy(S):(r.pan&&this._rawPanBy(S),this.fire("move"),r.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:l,newSize:c}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(r){if(r=this._locateOptions=a({timeout:1e4,watch:!1}
814,r),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var l=s(this._handleGeolocationResponse,this),c=s(this._handleGeolocationError,this);return r.watch?this._locationWatchId=navigator.geolocation.watchPosition(l,c,r):navigator.geolocation.getCurrentPosition(l,c,r),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(r){if(this._container._leaflet_id){var l=r.code,c=r.message||(l===1?"permission denied":l===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:l,message:"Geolocation error: "+c+"."})}},_handleGeolocationResponse:function(r){if(this._container._leaflet_id){var l=r.coords.latitude,c=r.coords.longitude,p=new X(l,c),_=p.toBounds(r.coords.accuracy*2),S=this._locateOptions;if(S.setView){var B=this.getBoundsZoom(_);this.setView(p,S.maxZoom?Math.min(B,S.maxZoom):B)}var W={latlng:p,bounds:_,timestamp:r.timestamp};for(var ne in r.coords)typeof r.coords[ne]=="number"&&(W[ne]=r.coords[ne]);this.fire("locationfound",W)}},addHandler:function(r,l){if(!l)return this;var c=this[r]=new l(this);return this._handlers.push(c),this.options[r]&&c.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(),yt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(O(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var r;for(r in this._layers)this._layers[r].remove();for(r in this._panes)yt(this._panes[r]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(r,l){var c="leaflet-pane"+(r?" leaflet-"+r.replace("Pane","")+"-pane":""),p=Xe("div",c,l||this._mapPane);return r&&(this._panes[r]=p),p},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var r=this.getPixelBounds(),l=this.unproject(r.getBottomLeft()),c=this.unproject(r.getTopRight());return new z(l,c)},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(r,l,c){r=ye(r),c=k(c||[0,0]);var p=this.getZoom()||0,_=this.getMinZoom(),S=this.getMaxZoom(),B=r.getNorthWest(),W=r.getSouthEast(),ne=this.getSize().subtract(c),ge=ie(this.project(W,p),this.project(B,p)).getSize(),ze=Ne.any3d?this.options.zoomSnap:1,je=ne.x/ge.x,Ze=ne.y/ge.y,qt=l?Math.max(je,Ze):Math.min(je,Ze);return p=this.getScaleZoom(qt,p),ze&&(p=Math.round(p/(ze/100))*(ze/100),p=l?Math.ceil(p/ze)*ze:Math.floor(p/ze)*ze),Math.max(_,Math.min(S,p))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(r,l){var c=this._getTopLeftPoint(r,l);return new Q(c,c.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(r){return this.options.crs.getProjectedBounds(r===void 0?this.getZoom():r)},getPane:function(r){return typeof r=="string"?this._panes[r]:r},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(r,l){var c=this.options.crs;return l=l===void 0?this._zoom:l,c.scale(r)/c.scale(l)},getScaleZoom:function(r,l){var c=this.options.crs;l=l===void 0?this._zoom:l;var p=c.zoom(r*c.scale(l));return isNaN(p)?1/0:p},project:function(r,l){return l=l===void 0?this._zoom:l,this.options.crs.latLngToPoint(ae(r),l)},unproject:function(r,l){return l=l===void 0?this._zoom:l,this.options.crs.pointToLatLng(k(r),l)},layerPointToLatLng:function(r){var l=k(r).add(this.getPixelOrigin());return this.unproject(l)},latLngToLayerPoint:function(r){var l=this.project(ae(r))._round();return l._subtract(this.getPixelOrigin())},wrapLatLng:function(r){return this.options.crs.wrapLatLng(ae(r))},wrapLatLngBounds:function(r){return this.options.crs.wrapLatLngBounds(ye(r))},distance:function(r,l){return this.options.crs.distance(ae(r),ae(l))},containerPointToLayerPoint:function(r){return k(r).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(r){return k(r).add(this._getMapPanePos())},containerPointToLatLng:function(r){var l=this.containerPointToLayerPoint(k(r));return this.layerPointToLatLng(l)},latLngToContainerPoint:function(r){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(r)))},mouseEventToContainerPoint:function(r){return um(r,this._container)},mouseEventToLayerPoint:function(r){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(r))},mouseEventToLatLng:function(r){return this.layerPointToLatLng(this.mouseEventToLayerPoint(r))},_initContainer:function(r){var l=this._container=rm(r);if(l){if(l._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Fe(l,"scroll",this._onScroll,this),this._containerId=h(l)},_initLayout:function(){var r=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ne.any3d,Ue(r,"leaflet-container"+(Ne.touch?" leaflet-touch":"")+(Ne.retina?" leaflet-retina":"")+(Ne.ielt9?" leaflet-oldie":"")+(Ne.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var l=no(r,"position");
814l!=="absolute"&&l!=="relative"&&l!=="fixed"&&l!=="sticky"&&(r.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var r=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Tt(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ue(r.markerPane,"leaflet-zoom-hide"),Ue(r.shadowPane,"leaflet-zoom-hide"))},_resetView:function(r,l,c){Tt(this._mapPane,new M(0,0));var p=!this._loaded;this._loaded=!0,l=this._limitZoom(l),this.fire("viewprereset");var _=this._zoom!==l;this._moveStart(_,c)._move(r,l)._moveEnd(_),this.fire("viewreset"),p&&this.fire("load")},_moveStart:function(r,l){return r&&this.fire("zoomstart"),l||this.fire("movestart"),this},_move:function(r,l,c,p){l===void 0&&(l=this._zoom);var _=this._zoom!==l;return this._zoom=l,this._lastCenter=r,this._pixelOrigin=this._getNewPixelOrigin(r),p?c&&c.pinch&&this.fire("zoom",c):((_||c&&c.pinch)&&this.fire("zoom",c),this.fire("move",c)),this},_moveEnd:function(r){return r&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return O(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(r){Tt(this._mapPane,this._getMapPanePos().subtract(r))},_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(r){this._targets={},this._targets[h(this._container)]=this;var l=r?st:Fe;l(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&l(window,"resize",this._onResize,this),Ne.any3d&&this.options.transform3DLimit&&(r?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){O(this._resizeRequest),this._resizeRequest=$(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var r=this._getMapPanePos();Math.max(Math.abs(r.x),Math.abs(r.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(r,l){for(var c=[],p,_=l==="mouseout"||l==="mouseover",S=r.target||r.srcElement,B=!1;S;){if(p=this._targets[h(S)],p&&(l==="click"||l==="preclick")&&this._draggableMoved(p)){B=!0;break}if(p&&p.listens(l,!0)&&(_&&!Uc(S,r)||(c.push(p),_))||S===this._container)break;S=S.parentNode}return!c.length&&!B&&!_&&this.listens(l,!0)&&(c=[this]),c},_isClickDisabled:function(r){for(;r&&r!==this._container;){if(r._leaflet_disable_click)return!0;r=r.parentNode}},_handleDOMEvent:function(r){var l=r.target||r.srcElement;if(!(!this._loaded||l._leaflet_disable_events||r.type==="click"&&this._isClickDisabled(l))){var c=r.type;c==="mousedown"&&jc(l),this._fireDOMEvent(r,c)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(r,l,c){if(r.type==="click"){var p=a({},r);p.type="preclick",this._fireDOMEvent(p,p.type,c)}var _=this._findEventTargets(r,l);if(c){for(var S=[],B=0;B<c.length;B++)c[B].listens(l,!0)&&S.push(c[B]);_=S.concat(_)}if(_.length){l==="contextmenu"&&Pt(r);var W=_[0],ne={originalEvent:r};if(r.type!=="keypress"&&r.type!=="keydown"&&r.type!=="keyup"){var ge=W.getLatLng&&(!W._radius||W._radius<=10);ne.containerPoint=ge?this.latLngToContainerPoint(W.getLatLng()):this.mouseEventToContainerPoint(r),ne.layerPoint=this.containerPointToLayerPoint(ne.containerPoint),ne.latlng=ge?W.getLatLng():this.layerPointToLatLng(ne.layerPoint)}for(B=0;B<_.length;B++)if(_[B].fire(l,ne,!0),ne.originalEvent._stopped||_[B].options.bubblingMouseEvents===!1&&D(this._mouseEvents,l)!==-1)return}},_draggableMoved:function(r){return r=r.dragging&&r.dragging.enabled()?r:this,r.dragging&&r.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var r=0,l=this._handlers.length;r<l;r++)this._handlers[r].disable()},whenReady:function(r,l){return this._loaded?r.call(l||this,{target:this}):this.on("load",r,l),this},_getMapPanePos:function(){return fa(this._mapPane)||new M(0,0)},_moved:function(){var r=this._getMapPanePos();return r&&!r.equals([0,0])},_getTopLeftPoint:function(r,l){var c=r&&l!==void 0?this._getNewPixelOrigin(r,l):this.getPixelOrigin();return c.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(r,l){var c=this.getSize()._divideBy(2);return this.project(r,l)._subtract(c)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(r,l,c){var p=this._getNewPixelOrigin(c,l);return this.project(r,l)._subtract(p)},_latLngBoundsToNewLayerBounds:function(r,l,c){var p=this._getNewPixelOrigin(c,l);
vendor: 12,450 bytes, line 814
814return ie([this.project(r.getSouthWest(),l)._subtract(p),this.project(r.getNorthWest(),l)._subtract(p),this.project(r.getSouthEast(),l)._subtract(p),this.project(r.getNorthEast(),l)._subtract(p)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(r){return this.latLngToLayerPoint(r).subtract(this._getCenterLayerPoint())},_limitCenter:function(r,l,c){if(!c)return r;var p=this.project(r,l),_=this.getSize().divideBy(2),S=new Q(p.subtract(_),p.add(_)),B=this._getBoundsOffset(S,c,l);return Math.abs(B.x)<=1&&Math.abs(B.y)<=1?r:this.unproject(p.add(B),l)},_limitOffset:function(r,l){if(!l)return r;var c=this.getPixelBounds(),p=new Q(c.min.add(r),c.max.add(r));return r.add(this._getBoundsOffset(p,l))},_getBoundsOffset:function(r,l,c){var p=ie(this.project(l.getNorthEast(),c),this.project(l.getSouthWest(),c)),_=p.min.subtract(r.min),S=p.max.subtract(r.max),B=this._rebound(_.x,-S.x),W=this._rebound(_.y,-S.y);return new M(B,W)},_rebound:function(r,l){return r+l>0?Math.round(r-l)/2:Math.max(0,Math.ceil(r))-Math.max(0,Math.floor(l))},_limitZoom:function(r){var l=this.getMinZoom(),c=this.getMaxZoom(),p=Ne.any3d?this.options.zoomSnap:1;return p&&(r=Math.round(r/p)*p),Math.max(l,Math.min(c,r))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){wt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(r,l){var c=this._getCenterOffset(r)._trunc();return(l&&l.animate)!==!0&&!this.getSize().contains(c)?!1:(this.panBy(c,l),!0)},_createAnimProxy:function(){var r=this._proxy=Xe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(r),this.on("zoomanim",function(l){var c=Cc,p=this._proxy.style[c];ha(this._proxy,this.project(l.center,l.zoom),this.getZoomScale(l.zoom,1)),p===this._proxy.style[c]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){yt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var r=this.getCenter(),l=this.getZoom();ha(this._proxy,this.project(r,l),this.getZoomScale(l,1))},_catchTransitionEnd:function(r){this._animatingZoom&&r.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(r,l,c){if(this._animatingZoom)return!0;if(c=c||{},!this._zoomAnimated||c.animate===!1||this._nothingToAnimate()||Math.abs(l-this._zoom)>this.options.zoomAnimationThreshold)return!1;var p=this.getZoomScale(l),_=this._getCenterOffset(r)._divideBy(1-1/p);return c.animate!==!0&&!this.getSize().contains(_)?!1:($(function(){this._moveStart(!0,c.noMoveStart||!1)._animateZoom(r,l,!0)},this),!0)},_animateZoom:function(r,l,c,p){this._mapPane&&(c&&(this._animatingZoom=!0,this._animateToCenter=r,this._animateToZoom=l,Ue(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:r,zoom:l,noUpdate:p}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&wt(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 D1(r,l){return new Ye(r,l)}var On=T.extend({options:{position:"topright"},initialize:function(r){E(this,r)},getPosition:function(){return this.options.position},setPosition:function(r){var l=this._map;return l&&l.removeControl(this),this.options.position=r,l&&l.addControl(this),this},getContainer:function(){return this._container},addTo:function(r){this.remove(),this._map=r;var l=this._container=this.onAdd(r),c=this.getPosition(),p=r._controlCorners[c];return Ue(l,"leaflet-control"),c.indexOf("bottom")!==-1?p.insertBefore(l,p.firstChild):p.appendChild(l),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(yt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(r){this._map&&r&&r.screenX>0&&r.screenY>0&&this._map.getContainer().focus()}}),lo=function(r){return new On(r)};Ye.include({addControl:function(r){return r.addTo(this),this},removeControl:function(r){return r.remove(),this},_initControlPos:function(){var r=this._controlCorners={},l="leaflet-",c=this._controlContainer=Xe("div",l+"control-container",this._container);function p(_,S){var B=l+_+" "+l+S;r[_+S]=Xe("div",B,c)}p("top","left"),p("top","right"),p("bottom","left"),p("bottom","right")},_clearControlPos:function(){for(var r in this._controlCorners)yt(this._controlCorners[r]);yt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var fm=On.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(r,l,c,p){return c<p?-1:p<c?1:0}},initialize:function(r,l,c){E(this,c),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var p in r)this._addLayer(r[p],p);for(p in l)this._addLayer(l[p],p,!0)},onAdd:function(r){this._initLayout(),this._update(),this._map=r,r.on("zoomend",this._checkDisabledLayers,this);for(var l=0;l<this._layers.length;l++)this._layers[l].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(r){return On.prototype.addTo.call(this,r),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var r=0;r<this._layers.length;r++)this._layers[r].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(r,l){return this._addLayer(r,l),this._map?this._update():this},addOverlay:function(r,l){return this._addLayer(r,l,!0),this._map?this._update():this},removeLayer:function(r){r.off("add remove",this._onLayerChange,this);var l=this._getLayer(h(r));return l&&this._layers.splice(this._layers.indexOf(l),1),this._map?this._update():this},expand:function(){Ue(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var r=this._map.getSize().y-(this._container.offsetTop+50);return r<this._section.clientHeight?(Ue(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=r+"px"):wt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return wt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var r="leaflet-control-layers",l=this._container=Xe("div",r),c=this.options.collapsed;l.setAttribute("aria-haspopup",!0),oo(l),$c(l);var p=this._section=Xe("section",r+"-list");c&&(this._map.on("click",this.collapse,this),Fe(l,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var _=this._layersLink=Xe("a",r+"-toggle",l);_.href="#",_.title="Layers",_.setAttribute("role","button"),Fe(_,{keydown:function(S){S.keyCode===13&&this._expandSafely()},click:function(S){Pt(S),this._expandSafely()}},this),c||this.expand(),this._baseLayersList=Xe("div",r+"-base",p),this._separator=Xe("div",r+"-separator",p),this._overlaysList=Xe("div",r+"-overlays",p),l.appendChild(p)},_getLayer:function(r){for(var l=0;l<this._layers.length;l++)if(this._layers[l]&&h(this._layers[l].layer)===r)return this._layers[l]},_addLayer:function(r,l,c){this._map&&r.on("add remove",this._onLayerChange,this),this._layers.push({layer:r,name:l,overlay:c}),this.options.sortLayers&&this._layers.sort(s(function(p,_){return this.options.sortFunction(p.layer,_.layer,p.name,_.name)},this)),this.options.autoZIndex&&r.setZIndex&&(this._lastZIndex++,r.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Vl(this._baseLayersList),Vl(this._overlaysList),this._layerControlInputs=[];var r,l,c,p,_=0;for(c=0;c<this._layers.length;c++)p=this._layers[c],this._addItem(p),l=l||p.overlay,r=r||!p.overlay,_+=p.overlay?0:1;return this.options.hideSingleBase&&(r=r&&_>1,this._baseLayersList.style.display=r?"":"none"),this._separator.style.display=l&&r?"":"none",this},_onLayerChange:function(r){this._handlingClick||this._update();var l=this._getLayer(h(r.target)),c=l.overlay?r.type==="add"?"overlayadd":"overlayremove":r.type==="add"?"baselayerchange":null;c&&this._map.fire(c,l)},_createRadioElement:function(r,l){var c='<input type="radio" class="leaflet-control-layers-selector" name="'+r+'"'+(l?' checked="checked"':"")+"/>",p=document.createElement("div");return p.innerHTML=c,p.firstChild},_addItem:function(r){var l=document.createElement("label"),c=this._map.hasLayer(r.layer),p;r.overlay?(p=document.createElement("input"),p.type="checkbox",p.className="leaflet-control-layers-selector",p.defaultChecked=c):p=this._createRadioElement("leaflet-base-layers_"+h(this),c),this._layerControlInputs.push(p),p.layerId=h(r.layer),Fe(p,"click",this._onInputClick,this);var _=document.createElement("span");_.innerHTML=" "+r.name;var S=document.createElement("span");l.appendChild(S),S.appendChild(p),S.appendChild(_);var B=r.overlay?this._overlaysList:this._baseLayersList;return B.appendChild(l),this._checkDisabledLayers(),l},_onInputClick:function(){if(!this._preventClick){var r=this._layerControlInputs,l,c,p=[],_=[];this._handlingClick=!0;for(var S=r.length-1;S>=0;S--)l=r[S],c=this._getLayer(l.layerId).layer,l.checked?p.push(c):l.checked||_.push(c);for(S=0;S<_.length;S++)this._map.hasLayer(_[S])&&this._map.removeLayer(_[S]);for(S=0;S<p.length;S++)this._map.hasLayer(p[S])||this._map.addLayer(p[S]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var r=this._layerControlInputs,l,c,p=this._map.getZoom(),_=r.length-1;_>=0;_--)l=r[_],c=this._getLayer(l.layerId).layer,l.disabled=c.options.minZoom!==void 0&&p<c.options.minZoom||c.options.maxZoom!==void 0&&p>c.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var r=this._section;this._preventClick=!0,Fe(r,"click",Pt),this.expand();var l=this;setTimeout(function(){st(r,"click",Pt),l._preventClick=!1})}}),M1=function(r,l,c){return new fm(r,l,c)},Hc=On.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(r){var l="leaflet-control-zoom",c=Xe("div",l+" leaflet-bar"),p=this.options;return this._zoomInButton=this._createButton(p.zoomInText,p.zoomInTitle,l+"-in",c,this._zoomIn),this._zoomOutButton=this._createButton(p.zoomOutText,p.zoomOutTitle,l+"-out",c,this._zoomOut),this._updateDisabled(),r.on("zoomend zoomlevelschange",this._updateDisabled,this),c},onRemove:function(r){r.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(r){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(r.shiftKey?3:1))},_zoomOut:function(r){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(r.shiftKey?3:1))},_createButton:function(r,l,c,p,_){var S=Xe("a",c,p);return S.innerHTML=r,S.href="#",S.title=l,S.setAttribute("role","button"),S.setAttribute("aria-label",l),oo(S),Fe(S,"click",pa),Fe(S,"click",_,this),Fe(S,"click",this._refocusOnMap,this),S},_updateDisabled:function(){var r=this._map,l="leaflet-disabled";wt(this._zoomInButton,l),wt(this._zoomOutButton,l),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||r._zoom===r.getMinZoom())&&(Ue(this._zoomOutButton,l),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||r._zoom===r.getMaxZoom())&&(Ue(this._zoomInButton,l),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ye.mergeOptions({zoomControl:!0}),Ye.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Hc,this.addControl(this.zoomControl))});var N1=function(r){return new Hc(r)}
814,dm=On.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(r){var l="leaflet-control-scale",c=Xe("div",l),p=this.options;return this._addScales(p,l+"-line",c),r.on(p.updateWhenIdle?"moveend":"move",this._update,this),r.whenReady(this._update,this),c},onRemove:function(r){r.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(r,l,c){r.metric&&(this._mScale=Xe("div",l,c)),r.imperial&&(this._iScale=Xe("div",l,c))},_update:function(){var r=this._map,l=r.getSize().y/2,c=r.distance(r.containerPointToLatLng([0,l]),r.containerPointToLatLng([this.options.maxWidth,l]));this._updateScales(c)},_updateScales:function(r){this.options.metric&&r&&this._updateMetric(r),this.options.imperial&&r&&this._updateImperial(r)},_updateMetric:function(r){var l=this._getRoundNum(r),c=l<1e3?l+" m":l/1e3+" km";this._updateScale(this._mScale,c,l/r)},_updateImperial:function(r){var l=r*3.2808399,c,p,_;l>5280?(c=l/5280,p=this._getRoundNum(c),this._updateScale(this._iScale,p+" mi",p/c)):(_=this._getRoundNum(l),this._updateScale(this._iScale,_+" ft",_/l))},_updateScale:function(r,l,c){r.style.width=Math.round(this.options.maxWidth*c)+"px",r.innerHTML=l},_getRoundNum:function(r){var l=Math.pow(10,(Math.floor(r)+"").length-1),c=r/l;return c=c>=10?10:c>=5?5:c>=3?3:c>=2?2:1,l*c}}),R1=function(r){return new dm(r)},O1='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Gc=On.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ne.inlineSvg?O1+" ":"")+"Leaflet</a>"},initialize:function(r){E(this,r),this._attributions={}},onAdd:function(r){r.attributionControl=this,this._container=Xe("div","leaflet-control-attribution"),oo(this._container);for(var l in r._layers)r._layers[l].getAttribution&&this.addAttribution(r._layers[l].getAttribution());return this._update(),r.on("layeradd",this._addAttribution,this),this._container},onRemove:function(r){r.off("layeradd",this._addAttribution,this)},_addAttribution:function(r){r.layer.getAttribution&&(this.addAttribution(r.layer.getAttribution()),r.layer.once("remove",function(){this.removeAttribution(r.layer.getAttribution())},this))},setPrefix:function(r){return this.options.prefix=r,this._update(),this},addAttribution:function(r){return r?(this._attributions[r]||(this._attributions[r]=0),this._attributions[r]++,this._update(),this):this},removeAttribution:function(r){return r?(this._attributions[r]&&(this._attributions[r]--,this._update()),this):this},_update:function(){if(this._map){var r=[];for(var l in this._attributions)this._attributions[l]&&r.push(l);var c=[];this.options.prefix&&c.push(this.options.prefix),r.length&&c.push(r.join(", ")),this._container.innerHTML=c.join(' <span aria-hidden="true">|</span> ')}}});Ye.mergeOptions({attributionControl:!0}),Ye.addInitHook(function(){this.options.attributionControl&&new Gc().addTo(this)});var j1=function(r){return new Gc(r)};On.Layers=fm,On.Zoom=Hc,On.Scale=dm,On.Attribution=Gc,lo.layers=M1,lo.zoom=N1,lo.scale=R1,lo.attribution=j1;var Zn=T.extend({initialize:function(r){this._map=r},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}});Zn.addTo=function(r,l){return r.addHandler(l,this),this};var B1={Events:C},pm=Ne.touch?"touchstart mousedown":"mousedown",Ri=F.extend({options:{clickTolerance:3},initialize:function(r,l,c,p){E(this,p),this._element=r,this._dragStartTarget=l||r,this._preventOutline=c},enable:function(){this._enabled||(Fe(this._dragStartTarget,pm,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ri._dragging===this&&this.finishDrag(!0),st(this._dragStartTarget,pm,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(r){if(this._enabled&&(this._moved=!1,!Lc(this._element,"leaflet-zoom-anim"))){if(r.touches&&r.touches.length!==1){Ri._dragging===this&&this.finishDrag();return}if(!(Ri._dragging||r.shiftKey||r.which!==1&&r.button!==1&&!r.touches)&&(Ri._dragging=this,this._preventOutline&&jc(this._element),Nc(),io(),!this._moving)){this.fire("down");var l=r.touches?r.touches[0]:r,c=om(this._element);this._startPoint=new M(l.clientX,l.clientY),this._startPos=fa(this._element),this._parentScale=Bc(c);var p=r.type==="mousedown";Fe(document,p?"mousemove":"touchmove",this._onMove,this),Fe(document,p?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(r){if(this._enabled){if(r.touches&&r.touches.length>1){this._moved=!0;return}var l=r.touches&&r.touches.length===1?r.touches[0]:r,c=new M(l.clientX,l.clientY)._subtract(this._startPoint);!c.x&&!c.y||Math.abs(c.x)+Math.abs(c.y)<this.options.clickTolerance||(c.x/=this._parentScale.x,c.y/=this._parentScale.y,Pt(r),this._moved||(this.fire("dragstart"),this._moved=!0,Ue(document.body,"leaflet-dragging"),this._lastTarget=r.target||r.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Ue(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(c),this._moving=!0,this._lastEvent=r,this._updatePosition())}},_updatePosition:function(){var r={originalEvent:this._lastEvent};this.fire("predrag",r),Tt(this._element,this._newPos),this.fire("drag",r)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(r){wt(document.body,"leaflet-dragging"),this._lastTarget&&(wt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),st(document,"mousemove touchmove",this._onMove,this),st(document,"mouseup touchend touchcancel",this._onUp,this),Rc(),ao();var l=this._moved&&this._moving;this._moving=!1,Ri._dragging=!1,l&&this.fire("dragend",{noInertia:r,distance:this._newPos.distanceTo(this._startPos)})}});function mm(r,l,c){var p,_=[1,4,2,8],S,B,W,ne,ge,ze,je,Ze;for(S=0,ze=r.length;S<ze;S++)r[S]._code=ma(r[S],l);for(W=0;W<4;W++){for(je=_[W],p=[],S=0,ze=r.length,B=ze-1;S<ze;B=S++)ne=r[S],ge=r[B],ne._code&je?ge._code&je||(Ze=Ql(ge,ne,je,l,c),Ze._co
814de=ma(Ze,l),p.push(Ze)):(ge._code&je&&(Ze=Ql(ge,ne,je,l,c),Ze._code=ma(Ze,l),p.push(Ze)),p.push(ne));r=p}return r}function gm(r,l){var c,p,_,S,B,W,ne,ge,ze;if(!r||r.length===0)throw new Error("latlngs not passed");wn(r)||(console.warn("latlngs are not flat! Only the first ring will be used"),r=r[0]);var je=ae([0,0]),Ze=ye(r),qt=Ze.getNorthWest().distanceTo(Ze.getSouthWest())*Ze.getNorthEast().distanceTo(Ze.getNorthWest());qt<1700&&(je=Zc(r));var Nt=r.length,Sn=[];for(c=0;c<Nt;c++){var Yt=ae(r[c]);Sn.push(l.project(ae([Yt.lat-je.lat,Yt.lng-je.lng])))}for(W=ne=ge=0,c=0,p=Nt-1;c<Nt;p=c++)_=Sn[c],S=Sn[p],B=_.y*S.x-S.y*_.x,ne+=(_.x+S.x)*B,ge+=(_.y+S.y)*B,W+=B*3;W===0?ze=Sn[0]:ze=[ne/W,ge/W];var ir=l.unproject(k(ze));return ae([ir.lat+je.lat,ir.lng+je.lng])}function Zc(r){for(var l=0,c=0,p=0,_=0;_<r.length;_++){var S=ae(r[_]);l+=S.lat,c+=S.lng,p++}return ae([l/p,c/p])}var P1={__proto__:null,clipPolygon:mm,polygonCenter:gm,centroid:Zc};function ym(r,l){if(!l||!r.length)return r.slice();var c=l*l;return r=$1(r,c),r=I1(r,c),r}function xm(r,l,c){return Math.sqrt(so(r,l,c,!0))}function F1(r,l,c){return so(r,l,c)}function I1(r,l){var c=r.length,p=typeof Uint8Array!=void 0+""?Uint8Array:Array,_=new p(c);_[0]=_[c-1]=1,qc(r,_,l,0,c-1);var S,B=[];for(S=0;S<c;S++)_[S]&&B.push(r[S]);return B}function qc(r,l,c,p,_){var S=0,B,W,ne;for(W=p+1;W<=_-1;W++)ne=so(r[W],r[p],r[_],!0),ne>S&&(B=W,S=ne);S>c&&(l[B]=1,qc(r,l,c,p,B),qc(r,l,c,B,_))}function $1(r,l){for(var c=[r[0]],p=1,_=0,S=r.length;p<S;p++)U1(r[p],r[_])>l&&(c.push(r[p]),_=p);return _<S-1&&c.push(r[S-1]),c}var _m;function vm(r,l,c,p,_){var S=p?_m:ma(r,c),B=ma(l,c),W,ne,ge;for(_m=B;;){if(!(S|B))return[r,l];if(S&B)return!1;W=S||B,ne=Ql(r,l,W,c,_),ge=ma(ne,c),W===S?(r=ne,S=ge):(l=ne,B=ge)}}function Ql(r,l,c,p,_){var S=l.x-r.x,B=l.y-r.y,W=p.min,ne=p.max,ge,ze;return c&8?(ge=r.x+S*(ne.y-r.y)/B,ze=ne.y):c&4?(ge=r.x+S*(W.y-r.y)/B,ze=W.y):c&2?(ge=ne.x,ze=r.y+B*(ne.x-r.x)/S):c&1&&(ge=W.x,ze=r.y+B*(W.x-r.x)/S),new M(ge,ze,_)}function ma(r,l){var c=0;return r.x<l.min.x?c|=1:r.x>l.max.x&&(c|=2),r.y<l.min.y?c|=4:r.y>l.max.y&&(c|=8),c}function U1(r,l){var c=l.x-r.x,p=l.y-r.y;return c*c+p*p}function so(r,l,c,p){var _=l.x,S=l.y,B=c.x-_,W=c.y-S,ne=B*B+W*W,ge;return ne>0&&(ge=((r.x-_)*B+(r.y-S)*W)/ne,ge>1?(_=c.x,S=c.y):ge>0&&(_+=B*ge,S+=W*ge)),B=r.x-_,W=r.y-S,p?B*B+W*W:new M(_,S)}function wn(r){return!A(r[0])||typeof r[0][0]!="object"&&typeof r[0][0]<"u"}function bm(r){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),wn(r)}function wm(r,l){var c,p,_,S,B,W,ne,ge;if(!r||r.length===0)throw new Error("latlngs not passed");wn(r)||(console.warn("latlngs are not flat! Only the first ring will be used"),r=r[0]);var ze=ae([0,0]),je=ye(r),Ze=je.getNorthWest().distanceTo(je.getSouthWest
vendor: 4,235 bytes, line 814
814())*je.getNorthEast().distanceTo(je.getNorthWest());Ze<1700&&(ze=Zc(r));var qt=r.length,Nt=[];for(c=0;c<qt;c++){var Sn=ae(r[c]);Nt.push(l.project(ae([Sn.lat-ze.lat,Sn.lng-ze.lng])))}for(c=0,p=0;c<qt-1;c++)p+=Nt[c].distanceTo(Nt[c+1])/2;if(p===0)ge=Nt[0];else for(c=0,S=0;c<qt-1;c++)if(B=Nt[c],W=Nt[c+1],_=B.distanceTo(W),S+=_,S>p){ne=(S-p)/_,ge=[W.x-ne*(W.x-B.x),W.y-ne*(W.y-B.y)];break}var Yt=l.unproject(k(ge));return ae([Yt.lat+ze.lat,Yt.lng+ze.lng])}var H1={__proto__:null,simplify:ym,pointToSegmentDistance:xm,closestPointOnSegment:F1,clipSegment:vm,_getEdgeIntersection:Ql,_getBitCode:ma,_sqClosestPointOnSegment:so,isFlat:wn,_flat:bm,polylineCenter:wm},Vc={project:function(r){return new M(r.lng,r.lat)},unproject:function(r){return new X(r.y,r.x)},bounds:new Q([-180,-90],[180,90])},Yc={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Q([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(r){var l=Math.PI/180,c=this.R,p=r.lat*l,_=this.R_MINOR/c,S=Math.sqrt(1-_*_),B=S*Math.sin(p),W=Math.tan(Math.PI/4-p/2)/Math.pow((1-B)/(1+B),S/2);return p=-c*Math.log(Math.max(W,1e-10)),new M(r.lng*l*c,p)},unproject:function(r){for(var l=180/Math.PI,c=this.R,p=this.R_MINOR/c,_=Math.sqrt(1-p*p),S=Math.exp(-r.y/c),B=Math.PI/2-2*Math.atan(S),W=0,ne=.1,ge;W<15&&Math.abs(ne)>1e-7;W++)ge=_*Math.sin(B),ge=Math.pow((1-ge)/(1+ge),_/2),ne=Math.PI/2-2*Math.atan(S*ge)-B,B+=ne;return new X(B*l,r.x*l/c)}},G1={__proto__:null,LonLat:Vc,Mercator:Yc,SphericalMercator:ve},Z1=a({},pe,{code:"EPSG:3395",projection:Yc,transformation:function(){var r=.5/(Math.PI*Yc.R);return ce(r,.5,-r,.5)}()}),Sm=a({},pe,{code:"EPSG:4326",projection:Vc,transformation:ce(1/180,1,-1/180,.5)}),q1=a({},_e,{projection:Vc,transformation:ce(1,0,-1,0),scale:function(r){return Math.pow(2,r)},zoom:function(r){return Math.log(r)/Math.LN2},distance:function(r,l){var c=l.lng-r.lng,p=l.lat-r.lat;return Math.sqrt(c*c+p*p)},infinite:!0});_e.Earth=pe,_e.EPSG3395=Z1,_e.EPSG3857=Me,_e.EPSG900913=we,_e.EPSG4326=Sm,_e.Simple=q1;var jn=F.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(r){return r.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(r){return r&&r.removeLayer(this),this},getPane:function(r){return this._map.getPane(r?this.options[r]||r:this.options.pane)},addInteractiveTarget:function(r){return this._map._targets[h(r)]=this,this},removeInteractiveTarget:function(r){return delete this._map._targets[h(r)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(r){var l=r.target;if(l.hasLayer(this)){if(this._map=l,this._zoomAnimated=l._zoomAnimated,this.getEvents){var c=this.getEvents();l.on(c,this),this.once("remove",function(){l.off(c,this)},this)}this.onAdd(l),this.fire("add"),l.fire("layeradd",{layer:this})}}});Ye.include({addLayer:function(r){if(!r._layerAdd)throw new Error("The provided object is not a Layer.");var l=h(r);return this._layers[l]?this:(this._layers[l]=r,r._mapToAdd=this,r.beforeAdd&&r.beforeAdd(this),this.whenReady(r._layerAdd,r),this)},removeLayer:function(r){var l=h(r);return this._layers[l]?(this._loaded&&r.onRemove(this),delete this._layers[l],this._loaded&&(this.fire("layerremove",{layer:r}),r.fire("remove")),r._map=r._mapToAdd=null,this):this},hasLayer:function(r){return h(r)in this._layers},eachLayer:function(r,l){for(var c in this._layers)r.call(l,this._layers[c]);return this},_addLayers:function(r){r=r?A(r)?r:[r]:[];for(var l=0,c=r.length;l<c;l++)this.addLayer(r[l])},_addZoomLimit:function(r){(!isNaN(r.options.maxZoom)||!isNaN(r.options.minZoom))&&(this._zoomBoundLayers[h(r)]=r,this._updateZoomLevels())},_removeZoomLimit:function(r){var l=h(r);this._zoomBoundLayers[l]&&(delete this._zoomBoundLayers[l],this._updateZoomLevels())},_updateZoomLevels:function(){var r=1/0,l=-1/0,c=this._getZoomSpan();for(var p in this._zoomBoundLayers){var _=this._zoomBoundLayers[p].options;r=_.minZoom===void 0?r:Math.min(r,_.minZoom),l=_.maxZoom===void 0?l:Math.max(l,_.maxZoom)}this._layersMaxZoom=l===-1/0?void 0:l,this._layersMinZoom=r===1/0?void 0:r,c!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZo
vendor: 13,960 bytes, line 814
814om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Qa=jn.extend({initialize:function(r,l){E(this,l),this._layers={};var c,p;if(r)for(c=0,p=r.length;c<p;c++)this.addLayer(r[c])},addLayer:function(r){var l=this.getLayerId(r);return this._layers[l]=r,this._map&&this._map.addLayer(r),this},removeLayer:function(r){var l=r in this._layers?r:this.getLayerId(r);return this._map&&this._layers[l]&&this._map.removeLayer(this._layers[l]),delete this._layers[l],this},hasLayer:function(r){var l=typeof r=="number"?r:this.getLayerId(r);return l in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(r){var l=Array.prototype.slice.call(arguments,1),c,p;for(c in this._layers)p=this._layers[c],p[r]&&p[r].apply(p,l);return this},onAdd:function(r){this.eachLayer(r.addLayer,r)},onRemove:function(r){this.eachLayer(r.removeLayer,r)},eachLayer:function(r,l){for(var c in this._layers)r.call(l,this._layers[c]);return this},getLayer:function(r){return this._layers[r]},getLayers:function(){var r=[];return this.eachLayer(r.push,r),r},setZIndex:function(r){return this.invoke("setZIndex",r)},getLayerId:function(r){return h(r)}}),V1=function(r,l){return new Qa(r,l)},ui=Qa.extend({addLayer:function(r){return this.hasLayer(r)?this:(r.addEventParent(this),Qa.prototype.addLayer.call(this,r),this.fire("layeradd",{layer:r}))},removeLayer:function(r){return this.hasLayer(r)?(r in this._layers&&(r=this._layers[r]),r.removeEventParent(this),Qa.prototype.removeLayer.call(this,r),this.fire("layerremove",{layer:r})):this},setStyle:function(r){return this.invoke("setStyle",r)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var r=new z;for(var l in this._layers){var c=this._layers[l];r.extend(c.getBounds?c.getBounds():c.getLatLng())}return r}}),Y1=function(r,l){return new ui(r,l)},Ja=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(r){E(this,r)},createIcon:function(r){return this._createIcon("icon",r)},createShadow:function(r){return this._createIcon("shadow",r)},_createIcon:function(r,l){var c=this._getIconUrl(r);if(!c){if(r==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var p=this._createImg(c,l&&l.tagName==="IMG"?l:null);return this._setIconStyles(p,r),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),p},_setIconStyles:function(r,l){var c=this.options,p=c[l+"Size"];typeof p=="number"&&(p=[p,p]);var _=k(p),S=k(l==="shadow"&&c.shadowAnchor||c.iconAnchor||_&&_.divideBy(2,!0));r.className="leaflet-marker-"+l+" "+(c.className||""),S&&(r.style.marginLeft=-S.x+"px",r.style.marginTop=-S.y+"px"),_&&(r.style.width=_.x+"px",r.style.height=_.y+"px")},_createImg:function(r,l){return l=l||document.createElement("img"),l.src=r,l},_getIconUrl:function(r){return Ne.retina&&this.options[r+"RetinaUrl"]||this.options[r+"Url"]}});function K1(r){return new Ja(r)}var uo=Ja.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(r){return typeof uo.imagePath!="string"&&(uo.imagePath=this._detectIconPath()),(this.options.imagePath||uo.imagePath)+Ja.prototype._getIconUrl.call(this,r)},_stripUrl:function(r){var l=function(c,p,_){var S=p.exec(c);return S&&S[_]};return r=l(r,/^url\((['"])?(.+)\1\)$/,2),r&&l(r,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var r=Xe("div","leaflet-default-icon-path",document.body),l=no(r,"background-image")||no(r,"backgroundImage");if(document.body.removeChild(r),l=this._stripUrl(l),l)return l;var c=document.querySelector('link[href$="leaflet.css"]');return c?c.href.substring(0,c.href.length-11-1):""}}),km=Zn.extend({initialize:function(r){this._marker=r},addHooks:function(){var r=this._marker._icon;this._draggable||(this._draggable=new Ri(r,r,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Ue(r,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&wt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(r){var l=this._marker,c=l._map,p=this._marker.options.autoPanSpeed,_=this._marker.options.autoPanPadding,S=fa(l._icon),B=c.getPixelBounds(),W=c.getPixelOrigin(),ne=ie(B.min._subtract(W).add(_),B.max._subtract(W).subtract(_));if(!ne.contains(S)){var ge=k((Math.max(ne.max.x,S.x)-ne.max.x)/(B.max.x-ne.max.x)-(Math.min(ne.min.x,S.x)-ne.min.x)/(B.min.x-ne.min.x),(Math.max(ne.max.y,S.y)-ne.max.y)/(B.max.y-ne.max.y)-(Math.min(ne.min.y,S.y)-ne.min.y)/(B.min.y-ne.min.y)).multiplyBy(p);c.panBy(ge,{animate:!1}),this._draggable._newPos._add(ge),this._draggable._startPos._add(ge),Tt(l._icon,this._draggable._newPos),this._onDrag(r),this._panRequest=$(this._adjustPan.bind(this,r))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(r){this._marker.options.autoPan&&(O(this._panRequest),this._panRequest=$(this._adjustPan.bind(this,r)))},_onDrag:function(r){var l=this._marker,c=l._shadow,p=fa(l._icon),_=l._map.layerPointToLatLng(p);c&&Tt(c,p),l._latlng=_,r.latlng=_,r.oldLatLng=this._oldLatLng,l.fire("move",r).fire("drag",r)},_onDragEnd:function(r){O(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",r)}}),Jl=jn.extend({options:{icon:new uo,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(r,l){E(this,l),this._latlng=ae(r)},onAdd:function(r){this._zoomAnimated=this._zoomAnimated&&r.options.markerZoomAnimation,this._zoomAnimated&&r.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(r){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&r.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(r){var l=this._latlng;return this._latlng=ae(r),this.update(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},setZIndexOffset:function(r){return this.options.zIndexOffset=r,this.update()},getIcon:function(){return this.options.icon},setIcon:function(r){return this.options.icon=r,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var r=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(r)}return this},_initIcon:function(){var r=this.options,l="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),c=r.icon.createIcon(this._icon),p=!1;c!==this._icon&&(this._icon&&this._removeIcon(),p=!0,r.title&&(c.title=r.title),c.tagName==="IMG"&&(c.alt=r.alt||"")),Ue(c,l),r.keyboard&&(c.tabIndex="0",c.setAttribute("role","button")),this._icon=c,r.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Fe(c,"focus",this._panOnFocus,this);var _=r.icon.createShadow(this._shadow),S=!1;_!==this._shadow&&(this._removeShadow(),S=!0),_&&(Ue(_,l),_.alt=""),this._shadow=_,r.opacity<1&&this._updateOpacity(),p&&this.getPane().appendChild(this._icon),this._initInteraction(),_&&S&&this.getPane(r.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&st(this._icon,"focus",this._panOnFocus,this),yt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&yt(this._shadow),this._shadow=null},_setPos:function(r){this._icon&&Tt(this._icon,r),this._shadow&&Tt(this._shadow,r),this._zIndex=r.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(r){this._icon&&(this._icon.style.zIndex=this._zIndex+r)},_animateZoom:function(r){var l=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center).round();this._setPos(l)},_initInteraction:function(){if(this.options.interactive&&(Ue(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),km)){var r=this.options.draggable;this.dragging&&(r=this.dragging.enabled(),this.dragging.disable()),this.dragging=new km(this),r&&this.dragging.enable()}},setOpacity:function(r){return this.options.opacity=r,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var r=this.options.opacity;this._icon&&bn(this._icon,r),this._shadow&&bn(this._shadow,r)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var r=this._map;if(r){var l=this.options.icon.options,c=l.iconSize?k(l.iconSize):k(0,0),p=l.iconAnchor?k(l.iconAnchor):k(0,0);r.panInside(this._latlng,{paddingTopLeft:p,paddingBottomRight:c.subtract(p)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function X1(r,l){return new Jl(r,l)}var Oi=jn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(r){this._renderer=r.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(r){return E(this,r),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&r&&Object.prototype.hasOwnProperty.call(r,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),es=Oi.extend({options:{fill:!0,radius:10},initialize:function(r,l){E(this,l),this._latlng=ae(r),this._radius=this.options.radius},setLatLng:function(r){var l=this._latlng;return this._latlng=ae(r),this.redraw(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(r){return this.options.radius=this._radius=r,this.redraw()},getRadius:function(){return this._radius},setStyle:function(r){var l=r&&r.radius||this._radius;return Oi.prototype.setStyle.call(this,r),this.setRadius(l),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var r=this._radius,l=this._radiusY||r,c=this._clickTolerance(),p=[r+c,l+c];this._pxBounds=new Q(this._point.subtract(p),this._point.add(p))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(r){return r.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function W1(r,l){return new es(r,l)}var Kc=es.extend({initialize:function(r,l,c){if(typeof l=="number"&&(l=a({},c,{radius:l})),E(this,l),this._latlng=ae(r),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(r){return this._mRadius=r,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var r=[this._radius,this._radiusY||this._radius];return new z(this._map.layerPointToLatLng(this._point.subtract(r)),this._map.layerPointToLatLng(this._point.add(r)))},setStyle:Oi.prototype.setStyle,_project:function(){var r=this._latlng.lng,l=this._latlng.lat,c=this._map,p=c.options.crs;if(p.distance===pe.distance){var _=Math.PI/180,S=this._mRadius/pe.R/_,B=c.project([l+S,r]),W=c.project([l-S,r]),ne=B.add(W).divideBy(2),ge=c.unproject(ne).lat,ze=Math.acos((Math.cos(S*_)-Math.sin(l*_)*Math.sin(ge*_))/(Math.cos(l*_)*Math.cos(ge*_)))/_;(isNaN(ze)||ze===0)&&(ze=S/Math.cos(Math.PI/180*l)),this._point=ne.subtract(c.getPixelOrigin()),this._radius=isNaN(ze)?0:ne.x-c.project([ge,r-ze]).x,this._radiusY=ne.y-B.y}else{var je=p.unproject(p.project(this._latlng).subtract([this._mRadius,0]));this._point=c.latLngToLayerPoint(this._latlng),this._radius=this._point.x-c.latLngToLayerPoint(je).x}this._updateBounds()}});function Q1(r,l,c){return new Kc(r,l,c)}var ci=Oi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(r,l){E(this,l),this._setLatLngs(r)},getLatLngs:function(){return this._latlngs},setLatLngs:function(r){return this._setLatLngs(r),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(r){for(var l=1/0,c=null,p=so,_,S,B=0,W=this._parts.length;B<W;B++)for(var ne=this._parts[B],ge=1,ze=ne.length;ge<ze;ge++){_=ne[ge-1],S=ne[ge];var je=p(r,_,S,!0);je<l&&(l=je,c=p(r,_,S))}return c&&(c.distance=Math.sqrt(l)),c}
814,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return wm(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(r,l){return l=l||this._defaultShape(),r=ae(r),l.push(r),this._bounds.extend(r),this.redraw()},_setLatLngs:function(r){this._bounds=new z,this._latlngs=this._convertLatLngs(r)},_defaultShape:function(){return wn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(r){for(var l=[],c=wn(r),p=0,_=r.length;p<_;p++)c?(l[p]=ae(r[p]),this._bounds.extend(l[p])):l[p]=this._convertLatLngs(r[p]);return l},_project:function(){var r=new Q;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,r),this._bounds.isValid()&&r.isValid()&&(this._rawPxBounds=r,this._updateBounds())},_updateBounds:function(){var r=this._clickTolerance(),l=new M(r,r);this._rawPxBounds&&(this._pxBounds=new Q([this._rawPxBounds.min.subtract(l),this._rawPxBounds.max.add(l)]))},_projectLatlngs:function(r,l,c){var p=r[0]instanceof X,_=r.length,S,B;if(p){for(B=[],S=0;S<_;S++)B[S]=this._map.latLngToLayerPoint(r[S]),c.extend(B[S]);l.push(B)}else for(S=0;S<_;S++)this._projectLatlngs(r[S],l,c)},_clipPoints:function(){var r=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(r))){if(this.options.noClip){this._parts=this._rings;return}var l=this._parts,c,p,_,S,B,W,ne;for(c=0,_=0,S=this._rings.length;c<S;c++)for(ne=this._rings[c],p=0,B=ne.length;p<B-1;p++)W=vm(ne[p],ne[p+1],r,p,!0),W&&(l[_]=l[_]||[],l[_].push(W[0]),(W[1]!==ne[p+1]||p===B-2)&&(l[_].push(W[1]),_++))}},_simplifyPoints:function(){for(var r=this._parts,l=this.options.smoothFactor,c=0,p=r.length;c<p;c++)r[c]=ym(r[c],l)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(r,l){var c,p,_,S,B,W,ne=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(r))return!1;for(c=0,S=this._parts.length;c<S;c++)for(W=this._parts[c],p=0,B=W.length,_=B-1;p<B;_=p++)if(!(!l&&p===0)&&xm(r,W[_],W[p])<=ne)return!0;return!1}});function J1(r,l){return new ci(r,l)}ci._flat=bm;var er=ci.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
814,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gm(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(r){var l=ci.prototype._convertLatLngs.call(this,r),c=l.length;return c>=2&&l[0]instanceof X&&l[0].equals(l[c-1])&&l.pop(),l},_setLatLngs:function(r){ci.prototype._setLatLngs.call(this,r),wn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return wn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var r=this._renderer._bounds,l=this.options.weight,c=new M(l,l);if(r=new Q(r.min.subtract(c),r.max.add(c)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(r))){if(this.options.noClip){this._parts=this._rings;return}for(var p=0,_=this._rings.length,S;p<_;p++)S=mm(this._rings[p],r,!0),S.length&&this._parts.push(S)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(r){var l=!1,c,p,_,S,B,W,ne,ge;if(!this._pxBounds||!this._pxBounds.contains(r))return!1;for(S=0,ne=this._parts.length;S<ne;S++)for(c=this._parts[S],B=0,ge=c.length,W=ge-1;B<ge;W=B++)p=c[B],_=c[W],p.y>r.y!=_.y>r.y&&r.x<(_.x-p.x)*(r.y-p.y)/(_.y-p.y)+p.x&&(l=!l);return l||ci.prototype._containsPoint.call(this,r,!0)}});function ew(r,l){return new er(r,l)}var hi=ui.extend({initialize:function(r,l){E(this,l),this._layers={},r&&this.addData(r)},addData:function(r){var l=A(r)?r:r.features,c,p,_;if(l){for(c=0,p=l.length;c<p;c++)_=l[c],(_.geometries||_.geometry||_.features||_.coordinates)&&this.addData(_);return this}var S=this.options;if(S.filter&&!S.filter(r))return this;var B=ts(r,S);return B?(B.feature=as(r),B.defaultOptions=B.options,this.resetStyle(B),S.onEachFeature&&S.onEachFeature(r,B),this.addLayer(B)):this},resetStyle:function(r){return r===void 0?this.eachLayer(this.resetStyle,this):(r.options=a({},r.defaultOptions),this._setLayerStyle(r,this.options.style),this)},setStyle:function(r){return this.eachLayer(function(l){this._setLayerStyle(l,r)},this)},_setLayerStyle:function(r,l){r.setStyle&&(typeof l=="function"&&(l=l(r.feature)),r.setStyle(l))}});function ts(r,l){var c=r.type==="Feature"?r.geometry:r,p=c?c.coordinates:null,_=[],S=l&&l.pointToLayer,B=l&&l.coordsToLatLng||Xc,W,ne,ge,ze;if(!p&&!c)return null;switch(c.type){case"Point":return W=B(p),Tm(S,r,W,l);case"MultiPoint":for(ge=0,ze=p.length;ge<ze;ge++)W=B(p[ge]),_.push(Tm(S,r,W,l));return new ui(_);case"LineString":case"MultiLineString":return ne=ns(p,c.type==="LineString"?0:1,B),new ci(ne,l);case"Polygon":case"MultiPolygon":return ne=ns(p,c.type==="Polygon"?1:2,B),new er(ne,l);case"GeometryCollection":for(ge=0,ze=c.geometries.length;ge<ze;ge++){var je=ts({geometry:c.geometries[ge],type:"Feature",properties:r.properties},l);je&&_.push(je)}return new ui(_);case"FeatureCollection":for(ge=0,ze=c.features.length;ge<ze;ge++){var Ze=ts(c.features[ge],l);Ze&&_.push(Ze)}return new ui(_);default:throw new Error("Invalid GeoJSON object.")}}function Tm(r,l,c,p){return r?r(l,c):new Jl(c,p&&p.markersInheritOptions&&p)}function Xc(r){return new X(r[1],r[0],r[2])}function ns(r,l,c){for(var p=[],_=0,S=r.length,B;_<S;_++)B=l?ns(r[_],l-1,c):(c||Xc)(r[_]),p.push(B);return p}function Wc(r,l){return r=ae(r),r.alt!==void 0?[g(r.lng,l),g(r.lat,l),g(r.alt,l)]:[g(r.lng,l),g(r.lat,l)]}function is(r,l,c,p){for(var _=[],S=0,B=r.length;S<B;S++)_.push(l?is(r[S],wn(r[S])?0:l-1,c,p):Wc(r[S],p));return!l&&c&&_.length>0&&_.push(_[0].slice()),_}function tr(r,l){return r.feature?a({},r.feature,{geometry:l}):as(l)}function as(r){return r.type==="Feature"||r.type==="FeatureCollection"?r:{type:"Feature",properties:{},geometry:r}}var Qc={toGeoJSON:function(r){return tr(this,{type:"Point",coordinates:Wc(this.getLatLng(),r)})}};Jl.include(Qc),Kc.include(Qc),es.include(Qc),ci.include({toGeoJSON:function(r){var l=!wn(this._latlngs),c=is(this._latlngs,l?1:0,!1,r);return tr(this,{type:(l?"Multi":"")+"LineString",coordinates:c})}}),er.include({toGeoJSON:function(r){var l=!wn(this._latlngs),c=l&&!wn(this._latlngs[0]),p=is(this._latlngs,c?2:l?1:0,!0,r);return l||(p=[p]),tr(this,{type:(c?"Multi":"")+"Polygon",coordinates:p})}}),Qa.include({toMultiPoint:function(r){var l=[];return this.eachLayer(function(c){l.push(c.toGeoJSON(r).geometry.coordinates)}),tr(this,{type:"MultiPoint",coordinates:l})},toGeoJSON:function(r){var l=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(l==="MultiPoint")return this.toMultiPoint(r);var c=l==="GeometryCollection",p=[];return this.eachLayer(function(_){if(_.toGeoJSON){var S=_.toGeoJSON(r);if(c)p.push(S.geometry);else{var B=as(S);
vendor: 8,676 bytes, line 814
814B.type==="FeatureCollection"?p.push.apply(p,B.features):p.push(B)}}}),c?tr(this,{geometries:p,type:"GeometryCollection"}):{type:"FeatureCollection",features:p}}});function Em(r,l){return new hi(r,l)}var tw=Em,rs=jn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(r,l,c){this._url=r,this._bounds=ye(l),E(this,c)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ue(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){yt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(r){return this.options.opacity=r,this._image&&this._updateOpacity(),this},setStyle:function(r){return r.opacity&&this.setOpacity(r.opacity),this},bringToFront:function(){return this._map&&Xa(this._image),this},bringToBack:function(){return this._map&&Wa(this._image),this},setUrl:function(r){return this._url=r,this._image&&(this._image.src=r),this},setBounds:function(r){return this._bounds=ye(r),this._map&&this._reset(),this},getEvents:function(){var r={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},setZIndex:function(r){return this.options.zIndex=r,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var r=this._url.tagName==="IMG",l=this._image=r?this._url:Xe("img");if(Ue(l,"leaflet-image-layer"),this._zoomAnimated&&Ue(l,"leaflet-zoom-animated"),this.options.className&&Ue(l,this.options.className),l.onselectstart=m,l.onmousemove=m,l.onload=s(this.fire,this,"load"),l.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),r){this._url=l.src;return}l.src=this._url,l.alt=this.options.alt},_animateZoom:function(r){var l=this._map.getZoomScale(r.zoom),c=this._map._latLngBoundsToNewLayerBounds(this._bounds,r.zoom,r.center).min;ha(this._image,c,l)},_reset:function(){var r=this._image,l=new Q(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),c=l.getSize();Tt(r,l.min),r.style.width=c.x+"px",r.style.height=c.y+"px"},_updateOpacity:function(){bn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var r=this.options.errorOverlayUrl;r&&this._url!==r&&(this._url=r,this._image.src=r)},getCenter:function(){return this._bounds.getCenter()}}),nw=function(r,l,c){return new rs(r,l,c)},Am=rs.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var r=this._url.tagName==="VIDEO",l=this._image=r?this._url:Xe("video");if(Ue(l,"leaflet-image-layer"),this._zoomAnimated&&Ue(l,"leaflet-zoom-animated"),this.options.className&&Ue(l,this.options.className),l.onselectstart=m,l.onmousemove=m,l.onloadeddata=s(this.fire,this,"load"),r){for(var c=l.getElementsByTagName("source"),p=[],_=0;_<c.length;_++)p.push(c[_].src);this._url=c.length>0?p:[l.src];return}A(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(l.style,"objectFit")&&(l.style.objectFit="fill"),l.autoplay=!!this.options.autoplay,l.loop=!!this.options.loop,l.muted=!!this.options.muted,l.playsInline=!!this.options.playsInline;for(var S=0;S<this._url.length;S++){var B=Xe("source");B.src=this._url[S],l.appendChild(B)}}});function iw(r,l,c){return new Am(r,l,c)}var zm=rs.extend({_initImage:function(){var r=this._image=this._url;Ue(r,"leaflet-image-layer"),this._zoomAnimated&&Ue(r,"leaflet-zoom-animated"),this.options.className&&Ue(r,this.options.className),r.onselectstart=m,r.onmousemove=m}});function aw(r,l,c){return new zm(r,l,c)}var qn=jn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(r,l){r&&(r instanceof X||A(r))?(this._latlng=ae(r),E(this,l)):(E(this,r),this._source=l),this.options.content&&(this._content=this.options.content)},openOn:function(r){return r=arguments.length?r:this._source._map,r.hasLayer(this)||r.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(r){return this._map?this.close():(arguments.length?this._source=r:r=this._source,this._prepareOpen(),this.openOn(r._map)),this},onAdd:function(r){this._zoomAnimated=r._zoomAnimated,this._container||this._initLayout(),r._fadeAnimated&&bn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),r._fadeAnimated&&bn(this._container,1),this.bringToFront(),this.options.interactive&&(Ue(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(r){r._fadeAnimated?(bn(this._container,0),this._removeTimeout=setTimeout(s(yt,void 0,this._container),200)):yt(this._container),this.options.interactive&&(wt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(r){return this._latlng=ae(r),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(r){return this._content=r,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var r={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Xa(this._container),this},bringToBack:function(){return this._map&&Wa(this._container),this},_prepareOpen:function(r){var l=this._source;if(!l._map)return!1;if(l instanceof ui){l=null;var c=this._source._layers;for(var p in c)if(c[p]._map){l=c[p];break}if(!l)return!1;this._source=l}if(!r)if(l.getCenter)r=l.getCenter();else if(l.getLatLng)r=l.getLatLng();else if(l.getBounds)r=l.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(r),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var r=this._contentNode,l=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof l=="string")r.innerHTML=l;else{for(;r.hasChildNodes();)r.removeChild(r.firstChild);r.appendChild(l)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var r=this._map.latLngToLayerPoint(this._latlng),l=k(this.options.offset),c=this._getAnchor();this._zoomAnimated?Tt(this._container,r.add(c)):l=l.add(r).add(c);var p=this._containerBottom=-l.y,_=this._containerLeft=-Math.round(this._containerWidth/2)+l.x;this._container.style.bottom=p+"px",this._container.style.left=_+"px"}},_getAnchor:function(){return[0,0]}});Ye.include({_initOverlay:function(r,l,c,p){var _=l;return _ instanceof r||(_=new r(p).setContent(l)),c&&_.setLatLng(c),_}}),jn.include({_initOverlay:function(r,l,c,p){var _=c;return _ instanceof r?(E(_,p),_._source=this):(_=l&&!p?l:new r(p,this),_.setContent(c)),_}});var os=qn.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(r){return r=arguments.length?r:this._source._map,!r.hasLayer(this)&&r._popup&&r._popup.options.autoClose&&r.removeLayer(r._popup),r._popup=this,qn.prototype.openOn.call(this,r)},onAdd:function(r){qn.prototype.onAdd.call(this,r),r.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Oi||this._source.on("preclick",da))},onRemove:function(r){qn.prototype.onRemove.call(this,r),r.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Oi||this._source.off("preclick",da))},getEvents:function(){var r=qn.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(r.preclick=this.close),this.options.keepInView&&
814(r.moveend=this._adjustPan),r},_initLayout:function(){var r="leaflet-popup",l=this._container=Xe("div",r+" "+(this.options.className||"")+" leaflet-zoom-animated"),c=this._wrapper=Xe("div",r+"-content-wrapper",l);if(this._contentNode=Xe("div",r+"-content",c),oo(l),$c(this._contentNode),Fe(l,"contextmenu",da),this._tipContainer=Xe("div",r+"-tip-container",l),this._tip=Xe("div",r+"-tip",this._tipContainer),this.options.closeButton){var p=this._closeButton=Xe("a",r+"-close-button",l);p.setAttribute("role","button"),p.setAttribute("aria-label","Close popup"),p.href="#close",p.innerHTML='<span aria-hidden="true">×</span>',Fe(p,"click",function(_){Pt(_),this.close()},this)}},_updateLayout:function(){var r=this._contentNode,l=r.style;l.width="",l.whiteSpace="nowrap";var c=r.offsetWidth;c=Math.min(c,this.options.maxWidth),c=Math.max(c,this.options.minWidth),l.width=c+1+"px",l.whiteSpace="",l.height="";var p=r.offsetHeight,_=this.options.maxHeight,S="leaflet-popup-scrolled";_&&p>_?(l.height=_+"px",Ue(r,S)):wt(r,S),this._containerWidth=this._container.offsetWidth},_animateZoom:function(r){var l=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center),c=this._getAnchor();Tt(this._container,l.add(c))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var r=this._map,l=parseInt(no(this._container,"marginBottom"),10)||0,c=this._container.offsetHeight+l,p=this._containerWidth,_=new M(this._containerLeft,-c-this._containerBottom);_._add(fa(this._container));var S=r.layerPointToContainerPoint(_),B=k(this.options.autoPanPadding),W=k(this.options.autoPanPaddingTopLeft||B),ne=k(this.options.autoPanPaddingBottomRight||B),ge=r.getSize(),ze=0,je=0;S.x+p+ne.x>ge.x&&(ze=S.x+p-ge.x+ne.x),S.x-ze-W.x<0&&(ze=S.x-W.x),S.y+c+ne.y>ge.y&&(je=S.y+c-ge.y+ne.y),S.y-je-W.y<0&&(je=S.y-W.y),(ze||je)&&(this.options.keepInView&&(this._autopanning=!0),r.fire("autopanstart").panBy([ze,je]))}},_getAnchor:function(){return k(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),rw=function(r,l){return new os(r,l)};Ye.mergeOptions({closePopupOnClick:!0}),Ye.include({openPopup:function(r,l,c){return this._initOverlay(os,r,l,c).openOn(this),this},closePopup:function(r){return r=arguments.length?r:this._popup,r&&r.close(),this}}),jn.include({bindPopup:function(r,l){return this._popup=this._initOverlay(os,this._popup,r,l),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(r){return this._popup&&(this instanceof ui||(this._popup._source=this),this._popup._prepareOpen(r||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(r){return this._popup&&this._popup.setContent(r),this},getPopup:function(){return this._popup},_openPopup:function(r){if(!(!this._popup||!this._map)){pa(r);var l=r.layer||r.target;if(this._popup._source===l&&!(l instanceof Oi)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(r.latlng);return}this._popup._source=l,this.openPopup(r.latlng)}},_movePopup:function(r){this._popup.setLatLng(r.latlng)},_onKeyPress:function(r){r.originalEvent.keyCode===13&&this._openPopup(r)}});var ls=qn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(r){qn.prototype.onAdd.call(this,r),this.setOpacity(this.options.opacity),r.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(r){qn.prototype.onRemove.call(this,r),r.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var r=qn.prototype.getEvents.call(this);return this.options.permanent||(r.preclick=this.close),r},_initLayout:function(){var r="leaflet-tooltip",l=r+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Xe("div",l),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(r){var l,c,p=this._map,_=this._container,S=p.latLngToContainerPoint(p.getCenter()),B=p.layerPointToContainerPoint(r),W=this.options.direction,ne=_.offsetWidth,ge=_.offsetHeight,ze=k(this.options.offset),je=this._getAnchor();W==="top"?(l=ne/2,c=ge):W==="bottom"?(l=ne/2,c=0):W==="center"?(l=ne/2,c=ge/2):W==="right"?(l=0,c=ge/2):W==="left"?
vendor: 8,807 bytes, line 814
814(l=ne,c=ge/2):B.x<S.x?(W="right",l=0,c=ge/2):(W="left",l=ne+(ze.x+je.x)*2,c=ge/2),r=r.subtract(k(l,c,!0)).add(ze).add(je),wt(_,"leaflet-tooltip-right"),wt(_,"leaflet-tooltip-left"),wt(_,"leaflet-tooltip-top"),wt(_,"leaflet-tooltip-bottom"),Ue(_,"leaflet-tooltip-"+W),Tt(_,r)},_updatePosition:function(){var r=this._map.latLngToLayerPoint(this._latlng);this._setPosition(r)},setOpacity:function(r){this.options.opacity=r,this._container&&bn(this._container,r)},_animateZoom:function(r){var l=this._map._latLngToNewLayerPoint(this._latlng,r.zoom,r.center);this._setPosition(l)},_getAnchor:function(){return k(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),ow=function(r,l){return new ls(r,l)};Ye.include({openTooltip:function(r,l,c){return this._initOverlay(ls,r,l,c).openOn(this),this},closeTooltip:function(r){return r.close(),this}}),jn.include({bindTooltip:function(r,l){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ls,this._tooltip,r,l),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(r){if(!(!r&&this._tooltipHandlersAdded)){var l=r?"off":"on",c={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?c.add=this._openTooltip:(c.mouseover=this._openTooltip,c.mouseout=this.closeTooltip,c.click=this._openTooltip,this._map?this._addFocusListeners():c.add=this._addFocusListeners),this._tooltip.options.sticky&&(c.mousemove=this._moveTooltip),this[l](c),this._tooltipHandlersAdded=!r}},openTooltip:function(r){return this._tooltip&&(this instanceof ui||(this._tooltip._source=this),this._tooltip._prepareOpen(r)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(r){return this._tooltip&&this._tooltip.setContent(r),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(r){var l=typeof r.getElement=="function"&&r.getElement();l&&(Fe(l,"focus",function(){this._tooltip._source=r,this.openTooltip()},this),Fe(l,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(r){var l=typeof r.getElement=="function"&&r.getElement();l&&l.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(r){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var l=this;this._map.once("moveend",function(){l._openOnceFlag=!1,l._openTooltip(r)});return}this._tooltip._source=r.layer||r.target,this.openTooltip(this._tooltip.options.sticky?r.latlng:void 0)}},_moveTooltip:function(r){var l=r.latlng,c,p;this._tooltip.options.sticky&&r.originalEvent&&(c=this._map.mouseEventToContainerPoint(r.originalEvent),p=this._map.containerPointToLayerPoint(c),l=this._map.layerPointToLatLng(p)),this._tooltip.setLatLng(l)}});var Cm=Ja.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(r){var l=r&&r.tagName==="DIV"?r:document.createElement("div"),c=this.options;if(c.html instanceof Element?(Vl(l),l.appendChild(c.html)):l.innerHTML=c.html!==!1?c.html:"",c.bgPos){var p=k(c.bgPos);l.style.backgroundPosition=-p.x+"px "+-p.y+"px"}return this._setIconStyles(l,"icon"),l},createShadow:function(){return null}});function lw(r){return new Cm(r)}Ja.Default=uo;var co=jn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ne.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(r){E(this,r)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(r){r._addZoomLimit(this)},onRemove:function(r){this._removeAllTiles(),yt(this._container),r._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Xa(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Wa(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(r){return this.options.opacity=r,this._updateOpacity(),this},setZIndex:function(r){return this.options.zIndex=r,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var r=this._clampZoom(this._map.getZoom());r!==this._tileZoom&&(this._tileZoom=r,this._updateLevels()),this._update()}return this},getEvents:function(){var r={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=f(this._onMoveEnd,this.options.updateInterval,this)),r.move=this._onMove),this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},createTile:function(){return document.createElement("div")},getTileSize:function(){var r=this.options.tileSize;return r instanceof M?r:new M(r,r)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(r){for(var l=this.getPane().children,c=-r(-1/0,1/0),p=0,_=l.length,S;p<_;p++)S=l[p].style.zIndex,l[p]!==this._container&&S&&(c=r(c,+S));isFinite(c)&&(this.options.zIndex=c+r(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ne.ielt9){bn(this._container,this.options.opacity);var r=+new Date,l=!1,c=!1;for(var p in this._tiles){var _=this._tiles[p];if(!(!_.current||!_.loaded)){var S=Math.min(1,(r-_.loaded)/200);bn(_.el,S),S<1?l=!0:(_.active?c=!0:this._onOpaqueTile(_),_.active=!0)}}c&&!this._noPrune&&this._pruneTiles(),l&&(O(this._fadeFrame),this._fadeFrame=$(this._updateOpacity,this))}},_onOpaqueTile:m,_initContainer:function(){this._container||(this._container=Xe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var r=this._tileZoom,l=this.options.maxZoom;if(r!==void 0){for(var c in this._levels)c=Number(c),this._levels[c].el.children.length||c===r?(this._levels[c].el.style.zIndex=l-Math.abs(r-c),this._onUpdateLevel(c)):(yt(this._levels[c].el),this._removeTilesAtZoom(c),this._onRemoveLevel(c),delete this._levels[c]);var p=this._levels[r],_=this._map;return p||(p=this._levels[r]={},p.el=Xe("div","leaflet-tile-container leaflet-zoom-animated",this._container),p.el.style.zIndex=l,p.origin=_.project(_.unproject(_.getPixelOrigin()),r).round(),p.zoom=r,this._setZoomTransform(p,_.getCenter(),_.getZoom()),m(p.el.offsetWidth),this._onCreateLevel(p)),this._level=p,p}},_onUpdateLevel:m,_onRemoveLevel:m,_onCreateLevel:m,_pruneTiles:function(){if(this._map){var r,l,c=this._map.getZoom();if(c>this.options.maxZoom||c<this.options.minZoom){this._removeAllTiles();return}for(r in this._tiles)l=this._tiles[r],l.retain=l.current;for(r in this._tiles)if(l=this._tiles[r],l.current&&!l.active){var p=l.coords;this._retainParent(p.x,p.y,p.z,p.z-5)||this._retainChildren(p.x,p.y,p.z,p.z+2)}for(r in this._tiles)this._tiles[r].retain||this._removeTile(r)}},_removeTilesAtZoom:function(r){for(var l in this._tiles)this._tiles[l].coords.z===r&&this._removeTile(l)},_removeAllTiles:function(){for(var r in this._tiles)this._removeTile(r)},_invalidateAll:function(){for(var r in this._levels)yt(this._levels[r].el),this._onRemoveLevel(Number(r)),delete this._levels[r];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(r,l,c,p){var _=Math.floor(r/2),S=Math.floor(l/2),B=c-1,W=new M(+_,+S);W.z=+B;var ne=this._tileCoordsToKey(W),ge=this._tiles[ne];return ge&&ge.active?(ge.retain=!0,!0):(ge&&ge.loaded&&(ge.retain=!0),B>p?this._retainParent(_,S,B,p):!1)},_retainChildren:function(r,l,c,p){for(var _=2*r;_<2*r+2;_++)for(var S=2*l;S<2*l+2;S++){var B=new M(_,S);B.z=c+1;var W=this._tileCoordsToKey(B),ne=this._tiles[W];if(ne&&ne.active){ne.retain=!0;continue}else ne&&ne.loaded&&(ne.retain=!0);c+1<p&&this._retainChildren(_,S,c+1,p)}},_resetView:function(r){var l=r&&(r.pinch||r.flyTo);
vendor: 7,654 bytes, line 814
814this._setView(this._map.getCenter(),this._map.getZoom(),l,l)},_animateZoom:function(r){this._setView(r.center,r.zoom,!0,r.noUpdate)},_clampZoom:function(r){var l=this.options;return l.minNativeZoom!==void 0&&r<l.minNativeZoom?l.minNativeZoom:l.maxNativeZoom!==void 0&&l.maxNativeZoom<r?l.maxNativeZoom:r},_setView:function(r,l,c,p){var _=Math.round(l);this.options.maxZoom!==void 0&&_>this.options.maxZoom||this.options.minZoom!==void 0&&_<this.options.minZoom?_=void 0:_=this._clampZoom(_);var S=this.options.updateWhenZooming&&_!==this._tileZoom;(!p||S)&&(this._tileZoom=_,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),_!==void 0&&this._update(r),c||this._pruneTiles(),this._noPrune=!!c),this._setZoomTransforms(r,l)},_setZoomTransforms:function(r,l){for(var c in this._levels)this._setZoomTransform(this._levels[c],r,l)},_setZoomTransform:function(r,l,c){var p=this._map.getZoomScale(c,r.zoom),_=r.origin.multiplyBy(p).subtract(this._map._getNewPixelOrigin(l,c)).round();Ne.any3d?ha(r.el,_,p):Tt(r.el,_)},_resetGrid:function(){var r=this._map,l=r.options.crs,c=this._tileSize=this.getTileSize(),p=this._tileZoom,_=this._map.getPixelWorldBounds(this._tileZoom);_&&(this._globalTileRange=this._pxBoundsToTileRange(_)),this._wrapX=l.wrapLng&&!this.options.noWrap&&[Math.floor(r.project([0,l.wrapLng[0]],p).x/c.x),Math.ceil(r.project([0,l.wrapLng[1]],p).x/c.y)],this._wrapY=l.wrapLat&&!this.options.noWrap&&[Math.floor(r.project([l.wrapLat[0],0],p).y/c.x),Math.ceil(r.project([l.wrapLat[1],0],p).y/c.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(r){var l=this._map,c=l._animatingZoom?Math.max(l._animateToZoom,l.getZoom()):l.getZoom(),p=l.getZoomScale(c,this._tileZoom),_=l.project(r,this._tileZoom).floor(),S=l.getSize().divideBy(p*2);return new Q(_.subtract(S),_.add(S))},_update:function(r){var l=this._map;if(l){var c=this._clampZoom(l.getZoom());if(r===void 0&&(r=l.getCenter()),this._tileZoom!==void 0){var p=this._getTiledPixelBounds(r),_=this._pxBoundsToTileRange(p),S=_.getCenter(),B=[],W=this.options.keepBuffer,ne=new Q(_.getBottomLeft().subtract([W,-W]),_.getTopRight().add([W,-W]));if(!(isFinite(_.min.x)&&isFinite(_.min.y)&&isFinite(_.max.x)&&isFinite(_.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var ge in this._tiles){var ze=this._tiles[ge].coords;(ze.z!==this._tileZoom||!ne.contains(new M(ze.x,ze.y)))&&(this._tiles[ge].current=!1)}if(Math.abs(c-this._tileZoom)>1){this._setView(r,c);return}for(var je=_.min.y;je<=_.max.y;je++)for(var Ze=_.min.x;Ze<=_.max.x;Ze++){var qt=new M(Ze,je);if(qt.z=this._tileZoom,!!this._isValidTile(qt)){var Nt=this._tiles[this._tileCoordsToKey(qt)];Nt?Nt.current=!0:B.push(qt)}}if(B.sort(function(Yt,ir){return Yt.distanceTo(S)-ir.distanceTo(S)}),B.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Sn=document.createDocumentFragment();for(Ze=0;Ze<B.length;Ze++)this._addTile(B[Ze],Sn);this._level.el.appendChild(Sn)}}}},_isValidTile:function(r){var l=this._map.options.crs;if(!l.infinite){var c=this._globalTileRange;if(!l.wrapLng&&(r.x<c.min.x||r.x>c.max.x)||!l.wrapLat&&(r.y<c.min.y||r.y>c.max.y))return!1}if(!this.options.bounds)return!0;var p=this._tileCoordsToBounds(r);return ye(this.options.bounds).overlaps(p)},_keyToBounds:function(r){return this._tileCoordsToBounds(this._keyToTileCoords(r))},_tileCoordsToNwSe:function(r){var l=this._map,c=this.getTileSize(),p=r.scaleBy(c),_=p.add(c),S=l.unproject(p,r.z),B=l.unproject(_,r.z);return[S,B]},_tileCoordsToBounds:function(r){var l=this._tileCoordsToNwSe(r),c=new z(l[0],l[1]);return this.options.noWrap||(c=this._map.wrapLatLngBounds(c)),c},_tileCoordsToKey:function(r){return r.x+":"+r.y+":"+r.z},_keyToTileCoords:function(r){var l=r.split(":"),c=new M(+l[0],+l[1]);return c.z=+l[2],c},_removeTile:function(r){var l=this._tiles[r];l&&(yt(l.el),delete this._tiles[r],this.fire("tileunload",{tile:l.el,coords:this._keyToTileCoords(r)}))},_initTile:function(r){Ue(r,"leaflet-tile");var l=this.getTileSize();r.style.width=l.x+"px",r.style.height=l.y+"px",r.onselectstart=m,r.onmousemove=m,Ne.ielt9&&this.options.opacity<1&&bn(r,this.options.opacity)},_addTile:function(r,l){var c=this._getTilePos(r),p=this._tileCoordsToKey(r),_=this.createTile(this._wrapCoords(r),s(this._tileReady,this,r));this._initTile(_),this.createTile.length<2&&$(s(this._tileReady,this,r,null,_)),Tt(_,c),this._tiles[p]={el:_,coords:r,current:!0},l.appendChild(_),this.fire("tileloadstart",{tile:_,coords:r})},_tileReady:function(r,l,c){l&&this.fire("tileerror",{error:l,tile:c,coords:r});var p=this._tileCoordsToKey(r);c=this._tiles[p],c&&(c.loaded=+new Date,this._map._fadeAnimated?(bn(c.el,0),O(this._fadeFrame),this._fadeFrame=$(this._updateOpacity,this)):(c.active=!0,this._pruneTiles()),l||(Ue(c.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:c.el,coords:r})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ne.ielt9||!this._map._fadeAnimated?$(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(r){return r.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(r){var l=new M(this._wrapX?d(r.x,this._wrapX):r.x,this._wrapY?d(r.y,this._wrapY):r.y);return l.z=r.z,l},_pxBoundsToTileRange:function(r){var l=this.getTileSize();return new Q(r.min.unscaleBy(l).floor(),r.max.unscaleBy(l).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var r in this._tiles)if(!this._tiles[r].loaded)return!1;return!0}});function sw(r){return new co(r)}var nr=co.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(r,l){this._url=r,l=E(this,l),l.detectRetina&&Ne.retina&&l.maxZoom>0?(l.tileSize=Math.floor(l.tileSize/2),l.zoomReverse?(l.zoomOffset--,l.minZoom=Math.min(l.maxZoom,l.minZoom+1)):(l.zoomOffset++,l.maxZoom=Math.max(l.minZoom,l.maxZoom-1)),l.minZoom=Math.max(0,l.minZoom)):l.zoomReverse?l.minZoom=Math.min(l.maxZoom,l.minZoom):l.maxZoom=Math.max(l.minZoom,l.maxZoom),typeof l.subdomains=="string"&&(l.subdomains=l.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(r,l){return this._url===r&&l===void 0&&(l=!0),this._url=r,l||this.redraw(),this},createTile:function(r,l){var c=document.createElement("img");return Fe(c,"load",s(this._tileOnLoad,this,l,c)),Fe(c,"error",s(this._tileOnError,this,l,c)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(c.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(c.referrerPolicy=this.options.referrerPolicy),c.alt="",c.src=this.getTileUrl(r),c},getTileUrl:function(r){var l={r:Ne.retina?"@2x":"",s:this._getSubdomain(r),x:r.x,y:r.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var c=this._globalTileRange.max.y-r.y;this.options.tms&&(l.y=c),l["-y"]=c}return w(this._url,a(l,this.options))},_tileOnLoad:function(r,l){Ne.ielt9?setTimeout(s(r,this,null,l),0):r(null,l)},_tileOnError:function(r,l,c){var p=this.options.errorTileUrl;p&&l.getAttribute("src")!==p&&(l.src=p),r(c,l)},_onTileRemove:function(r){r.tile.onload=null},_getZoomForUrl:function(){var r=this._tileZoom,l=this.options.maxZoom,c=this.options.zoomReverse,p=this.options.zoomOffset;return c&&(r=l-r),r+p},_getSubdomain:function(r){var l=Math.abs(r.x+r.y)%this.options.subdomains.length;return this.options.subdomains[l]},_abortLoading:function(){var r,l;for(r in this._tiles)if(this._tiles[r].coords.z!==this._tileZoom&&(l=this._tiles[r].el,l.onload=m,l.onerror=m,!l.complete)){l.
vendor: 6,068 bytes, line 814
814src=G;var c=this._tiles[r].coords;yt(l),delete this._tiles[r],this.fire("tileabort",{tile:l,coords:c})}},_removeTile:function(r){var l=this._tiles[r];if(l)return l.el.setAttribute("src",G),co.prototype._removeTile.call(this,r)},_tileReady:function(r,l,c){if(!(!this._map||c&&c.getAttribute("src")===G))return co.prototype._tileReady.call(this,r,l,c)}});function Lm(r,l){return new nr(r,l)}var Dm=nr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(r,l){this._url=r;var c=a({},this.defaultWmsParams);for(var p in l)p in this.options||(c[p]=l[p]);l=E(this,l);var _=l.detectRetina&&Ne.retina?2:1,S=this.getTileSize();c.width=S.x*_,c.height=S.y*_,this.wmsParams=c},onAdd:function(r){this._crs=this.options.crs||r.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var l=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[l]=this._crs.code,nr.prototype.onAdd.call(this,r)},getTileUrl:function(r){var l=this._tileCoordsToNwSe(r),c=this._crs,p=ie(c.project(l[0]),c.project(l[1])),_=p.min,S=p.max,B=(this._wmsVersion>=1.3&&this._crs===Sm?[_.y,_.x,S.y,S.x]:[_.x,_.y,S.x,S.y]).join(","),W=nr.prototype.getTileUrl.call(this,r);return W+H(this.wmsParams,W,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+B},setParams:function(r,l){return a(this.wmsParams,r),l||this.redraw(),this}});function uw(r,l){return new Dm(r,l)}nr.WMS=Dm,Lm.wms=uw;var fi=jn.extend({options:{padding:.1},initialize:function(r){E(this,r),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ue(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 r={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(r.zoomanim=this._onAnimZoom),r},_onAnimZoom:function(r){this._updateTransform(r.center,r.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(r,l){var c=this._map.getZoomScale(l,this._zoom),p=this._map.getSize().multiplyBy(.5+this.options.padding),_=this._map.project(this._center,l),S=p.multiplyBy(-c).add(_).subtract(this._map._getNewPixelOrigin(r,l));Ne.any3d?ha(this._container,S,c):Tt(this._container,S)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var r in this._layers)this._layers[r]._reset()},_onZoomEnd:function(){for(var r in this._layers)this._layers[r]._project()},_updatePaths:function(){for(var r in this._layers)this._layers[r]._update()},_update:function(){var r=this.options.padding,l=this._map.getSize(),c=this._map.containerPointToLayerPoint(l.multiplyBy(-r)).round();this._bounds=new Q(c,c.add(l.multiplyBy(1+r*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Mm=fi.extend({options:{tolerance:0},getEvents:function(){var r=fi.prototype.getEvents.call(this);return r.viewprereset=this._onViewPreReset,r},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){fi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var r=this._container=document.createElement("canvas");Fe(r,"mousemove",this._onMouseMove,this),Fe(r,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Fe(r,"mouseout",this._handleMouseOut,this),r._leaflet_disable_events=!0,this._ctx=r.getContext("2d")},_destroyContainer:function(){O(this._redrawRequest),delete this._ctx,yt(this._container),st(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var r;this._redrawBounds=null;for(var l in this._layers)r=this._layers[l],r._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){fi.prototype._update.call(this);var r=this._bounds,l=this._container,c=r.getSize(),p=Ne.retina?2:1;Tt(l,r.min),l.width=p*c.x,l.height=p*c.y,l.style.width=c.x+"px",l.style.height=c.y+"px",Ne.retina&&this._ctx.scale(2,2),this._ctx.translate(-r.min.x,-r.min.y),this.fire("update")}},_reset:function(){fi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(r){this._updateDashArray(r),this._layers[h(r)]=r;var l=r._order={layer:r,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=l),this._drawLast=l,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(r){this._requestRedraw(r)},_removePath:function(r){var l=r._order,c=l.next,p=l.prev;c?c.prev=p:this._drawLast=p,p?p.next=c:this._drawFirst=c,delete r._order,delete this._layers[h(r)],this._requestRedraw(r)},_updatePath:function(r){this._extendRedrawBounds(r),r._project(),r._update(),this._requestRedraw(r)},_updateStyle:function(r){this._updateDashArray(r),this._requestRedraw(r)},_updateDashArray:function(r){if(typeof r.options.dashArray=="string"){var l=r.options.dashArray.split(/[, ]+/),c=[],p,_;for(_=0;_<l.length;_++){if(p=Number(l[_]),isNaN(p))return;c.push(p)}r.options._dashArray=c}else r.options._dashArray=r.options.dashArray},_requestRedraw:function(r){this._map&&(this._extendRedrawBounds(r),this._redrawRequest=this._redrawRequest||$(this._redraw,this))},_extendRedrawBounds:function(r){if(r._pxBounds){var l=(r.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Q,this._redrawBounds.extend(r._pxBounds.min.subtract([l,l])),this._redrawBounds.extend(r._pxBounds.max.add([l,l]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var r=this._redrawBounds;if(r){var l=r.getSize();this._ctx.clearRect(r.min.x,r.min.y,l.x,l.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore(
vendor: 5,914 bytes, line 814
814)},_draw:function(){var r,l=this._redrawBounds;if(this._ctx.save(),l){var c=l.getSize();this._ctx.beginPath(),this._ctx.rect(l.min.x,l.min.y,c.x,c.y),this._ctx.clip()}this._drawing=!0;for(var p=this._drawFirst;p;p=p.next)r=p.layer,(!l||r._pxBounds&&r._pxBounds.intersects(l))&&r._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(r,l){if(this._drawing){var c,p,_,S,B=r._parts,W=B.length,ne=this._ctx;if(W){for(ne.beginPath(),c=0;c<W;c++){for(p=0,_=B[c].length;p<_;p++)S=B[c][p],ne[p?"lineTo":"moveTo"](S.x,S.y);l&&ne.closePath()}this._fillStroke(ne,r)}}},_updateCircle:function(r){if(!(!this._drawing||r._empty())){var l=r._point,c=this._ctx,p=Math.max(Math.round(r._radius),1),_=(Math.max(Math.round(r._radiusY),1)||p)/p;_!==1&&(c.save(),c.scale(1,_)),c.beginPath(),c.arc(l.x,l.y/_,p,0,Math.PI*2,!1),_!==1&&c.restore(),this._fillStroke(c,r)}},_fillStroke:function(r,l){var c=l.options;c.fill&&(r.globalAlpha=c.fillOpacity,r.fillStyle=c.fillColor||c.color,r.fill(c.fillRule||"evenodd")),c.stroke&&c.weight!==0&&(r.setLineDash&&r.setLineDash(l.options&&l.options._dashArray||[]),r.globalAlpha=c.opacity,r.lineWidth=c.weight,r.strokeStyle=c.color,r.lineCap=c.lineCap,r.lineJoin=c.lineJoin,r.stroke())},_onClick:function(r){for(var l=this._map.mouseEventToLayerPoint(r),c,p,_=this._drawFirst;_;_=_.next)c=_.layer,c.options.interactive&&c._containsPoint(l)&&(!(r.type==="click"||r.type==="preclick")||!this._map._draggableMoved(c))&&(p=c);this._fireEvent(p?[p]:!1,r)},_onMouseMove:function(r){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var l=this._map.mouseEventToLayerPoint(r);this._handleMouseHover(r,l)}},_handleMouseOut:function(r){var l=this._hoveredLayer;l&&(wt(this._container,"leaflet-interactive"),this._fireEvent([l],r,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(r,l){if(!this._mouseHoverThrottled){for(var c,p,_=this._drawFirst;_;_=_.next)c=_.layer,c.options.interactive&&c._containsPoint(l)&&(p=c);p!==this._hoveredLayer&&(this._handleMouseOut(r),p&&(Ue(this._container,"leaflet-interactive"),this._fireEvent([p],r,"mouseover"),this._hoveredLayer=p)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,r),this._mouseHoverThrottled=!0,setTimeout(s(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(r,l,c){this._map._fireDOMEvent(l,c||l.type,r)},_bringToFront:function(r){var l=r._order;if(l){var c=l.next,p=l.prev;if(c)c.prev=p;else return;p?p.next=c:c&&(this._drawFirst=c),l.prev=this._drawLast,this._drawLast.next=l,l.next=null,this._drawLast=l,this._requestRedraw(r)}},_bringToBack:function(r){var l=r._order;if(l){var c=l.next,p=l.prev;if(p)p.next=c;else return;c?c.prev=p:p&&(this._drawLast=p),l.prev=null,l.next=this._drawFirst,this._drawFirst.prev=l,this._drawFirst=l,this._requestRedraw(r)}}});function Nm(r){return Ne.canvas?new Mm(r):null}var ho=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(r){return document.createElement("<lvml:"+r+' class="lvml">')}}catch{}return function(r){return document.createElement("<"+r+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),cw={_initContainer:function(){this._container=Xe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(fi.prototype._update.call(this),this.fire("update"))},_initPath:function(r){var l=r._container=ho("shape");Ue(l,"leaflet-vml-shape "+(this.options.className||"")),l.coordsize="1 1",r._path=ho("path"),l.appendChild(r._path),this._updateStyle(r),this._layers[h(r)]=r},_addPath:function(r){var l=r._container;this._container.appendChild(l),r.options.interactive&&r.addInteractiveTarget(l)},_removePath:function(r){var l=r._container;yt(l),r.removeInteractiveTarget(l),delete this._layers[h(r)]},_updateStyle:function(r){var l=r._stroke,c=r._fill,p=r.options,_=r._container;_.stroked=!!p.stroke,_.filled=!!p.fill,p.stroke?(l||(l=r._stroke=ho("stroke")),_.appendChild(l),l.weight=p.weight+"px",l.color=p.color,l.opacity=p.opacity,p.dashArray?l.dashStyle=A(p.dashArray)?p.dashArray.join(" "):p.dashArray.replace(/( *, *)/g," "):l.dashStyle="",l.endcap=p.lineCap.replace("butt","flat"),l.joinstyle=p.lineJoin):l&&(_.removeChild(l),r._stroke=null),p.fill?(c||(c=r._fill=ho("fill")),_.appendChild(c),c.color=p.fillColor||p.color,c.opacity=p.fillOpacity):c&&(_.removeChild(c),r._fill=null)},_updateCircle:function(r){var l=r._point.round(),c=Math.round(r._radius),p=Math.round(r._radiusY||c);this._setPath(r,r._empty()?"M0 0":"AL "+l.x+","+l.y+" "+c+","+p+" 0,"+65535*360)},_setPath:function(r,l){r._path.v=l},_bringToFront:function(r){Xa(r._container)},_bringToBack:function(r){Wa(r._container)}},ss=Ne.vml?ho:ke,fo=fi.extend({_initContainer:function(){this._container=ss("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ss("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){yt(this._container),st(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){fi.prototype._update.call(this);var r=this._bounds,l=r.getSize(),c=this._container;(!this._svgSize||!this._svgSize.equals(l))&&(this._svgSize=l,c.setAttribute("width",l.x),c.setAttribute("height",l.y)),Tt(c,r.min),c.setAttribute("viewBox",[r.min.x,r.min.y,l.x,l.y].join(" ")),this.fire("update")}},_initPath:function(r){var l=r._path=ss("path");r.options.className&&Ue(l,r.options.className),r.options.interactive&&Ue(l,"leaflet-interactive"),this._updateStyle(r),this._layers[h(r)]=r},_addPath:function(r){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(r._path),r.addInteractiveTarget(r._path)},_removePath:function(r){yt(r._path),r.removeInteractiveTarget(r._path),delete this._layers[h(r)]},_updatePath:function(r){r._project(),r._update()},_updateStyle:function(r){var l=r._path,c=r.options;
814l&&(c.stroke?(l.setAttribute("stroke",c.color),l.setAttribute("stroke-opacity",c.opacity),l.setAttribute("stroke-width",c.weight),l.setAttribute("stroke-linecap",c.lineCap),l.setAttribute("stroke-linejoin",c.lineJoin),c.dashArray?l.setAttribute("stroke-dasharray",c.dashArray):l.removeAttribute("stroke-dasharray"),c.dashOffset?l.setAttribute("stroke-dashoffset",c.dashOffset):l.removeAttribute("stroke-dashoffset")):l.setAttribute("stroke","none"),c.fill?(l.setAttribute("fill",c.fillColor||c.color),l.setAttribute("fill-opacity",c.fillOpacity),l.setAttribute("fill-rule",c.fillRule||"evenodd")):l.setAttribute("fill","none"))},_updatePoly:function(r,l){this._setPath(r,Se(r._parts,l))},_updateCircle:function(r){var l=r._point,c=Math.max(Math.round(r._radius),1),p=Math.max(Math.round(r._radiusY),1)||c,_="a"+c+","+p+" 0 1,0 ",S=r._empty()?"M0 0":"M"+(l.x-c)+","+l.y+_+c*2+",0 "+_+-c*2+",0 ";this._setPath(r,S)},_setPath:function(r,l){r._path.setAttribute("d",l)},_bringToFront:function(r){Xa(r._path)},_bringToBack:function(r){Wa(r._path)}});Ne.vml&&fo.include(cw);function Rm(r){return Ne.svg||Ne.vml?new fo(r):null}Ye.include({getRenderer:function(r){var l=r.options.renderer||this._getPaneRenderer(r.options.pane)||this.options.renderer||this._renderer;return l||(l=this._renderer=this._createRenderer()),this.hasLayer(l)||this.addLayer(l),l},_getPaneRenderer:function(r){if(r==="overlayPane"||r===void 0)return!1;var l=this._paneRenderers[r];return l===void 0&&(l=this._createRenderer({pane:r}),this._paneRenderers[r]=l),l},_createRenderer:function(r){return this.options.preferCanvas&&Nm(r)||Rm(r)}});var Om=er.extend({initialize:function(r,l){er.prototype.initialize.call(this,this._boundsToLatLngs(r),l)},setBounds:function(r){return this.setLatLngs(this._boundsToLatLngs(r))}
vendor: 12,349 bytes, line 814
814,_boundsToLatLngs:function(r){return r=ye(r),[r.getSouthWest(),r.getNorthWest(),r.getNorthEast(),r.getSouthEast()]}});function hw(r,l){return new Om(r,l)}fo.create=ss,fo.pointsToPath=Se,hi.geometryToLayer=ts,hi.coordsToLatLng=Xc,hi.coordsToLatLngs=ns,hi.latLngToCoords=Wc,hi.latLngsToCoords=is,hi.getFeature=tr,hi.asFeature=as,Ye.mergeOptions({boxZoom:!0});var jm=Zn.extend({initialize:function(r){this._map=r,this._container=r._container,this._pane=r._panes.overlayPane,this._resetStateTimeout=0,r.on("unload",this._destroy,this)},addHooks:function(){Fe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){st(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){yt(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(r){if(!r.shiftKey||r.which!==1&&r.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),io(),Nc(),this._startPoint=this._map.mouseEventToContainerPoint(r),Fe(document,{contextmenu:pa,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(r){this._moved||(this._moved=!0,this._box=Xe("div","leaflet-zoom-box",this._container),Ue(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(r);var l=new Q(this._point,this._startPoint),c=l.getSize();Tt(this._box,l.min),this._box.style.width=c.x+"px",this._box.style.height=c.y+"px"},_finish:function(){this._moved&&(yt(this._box),wt(this._container,"leaflet-crosshair")),ao(),Rc(),st(document,{contextmenu:pa,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(r){if(!(r.which!==1&&r.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var l=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(l).fire("boxzoomend",{boxZoomBounds:l})}},_onKeyDown:function(r){r.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ye.addInitHook("addHandler","boxZoom",jm),Ye.mergeOptions({doubleClickZoom:!0});var Bm=Zn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(r){var l=this._map,c=l.getZoom(),p=l.options.zoomDelta,_=r.originalEvent.shiftKey?c-p:c+p;l.options.doubleClickZoom==="center"?l.setZoom(_):l.setZoomAround(r.containerPoint,_)}});Ye.addInitHook("addHandler","doubleClickZoom",Bm),Ye.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Pm=Zn.extend({addHooks:function(){if(!this._draggable){var r=this._map;this._draggable=new Ri(r._mapPane,r._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),r.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),r.on("zoomend",this._onZoomEnd,this),r.whenReady(this._onZoomEnd,this))}Ue(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){wt(this._map._container,"leaflet-grab"),wt(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 r=this._map;if(r._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var l=ye(this._map.options.maxBounds);this._offsetLimit=ie(this._map.latLngToContainerPoint(l.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(l.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;r.fire("movestart").fire("dragstart"),r.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(r){if(this._map.options.inertia){var l=this._lastTime=+new Date,c=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(c),this._times.push(l),this._prunePositions(l)}this._map.fire("move",r).fire("drag",r)},_prunePositions:function(r){for(;this._positions.length>1&&r-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var r=this._map.getSize().divideBy(2),l=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=l.subtract(r).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(r,l){return r-(r-l)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var r=this._draggable._newPos.subtract(this._draggable._startPos),l=this._offsetLimit;r.x<l.min.x&&(r.x=this._viscousLimit(r.x,l.min.x)),r.y<l.min.y&&(r.y=this._viscousLimit(r.y,l.min.y)),r.x>l.max.x&&(r.x=this._viscousLimit(r.x,l.max.x)),r.y>l.max.y&&(r.y=this._viscousLimit(r.y,l.max.y)),this._draggable._newPos=this._draggable._startPos.add(r)}},_onPreDragWrap:function(){var r=this._worldWidth,l=Math.round(r/2),c=this._initialWorldOffset,p=this._draggable._newPos.x,_=(p-l+c)%r+l-c,S=(p+l+c)%r-l-c,B=Math.abs(_+c)<Math.abs(S+c)?_:S;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=B},_onDragEnd:function(r){var l=this._map,c=l.options,p=!c.inertia||r.noInertia||this._times.length<2;if(l.fire("dragend",r),p)l.fire("moveend");else{this._prunePositions(+new Date);var _=this._lastPos.subtract(this._positions[0]),S=(this._lastTime-this._times[0])/1e3,B=c.easeLinearity,W=_.multiplyBy(B/S),ne=W.distanceTo([0,0]),ge=Math.min(c.inertiaMaxSpeed,ne),ze=W.multiplyBy(ge/ne),je=ge/(c.inertiaDeceleration*B),Ze=ze.multiplyBy(-je/2).round();!Ze.x&&!Ze.y?l.fire("moveend"):(Ze=l._limitOffset(Ze,l.options.maxBounds),$(function(){l.panBy(Ze,{duration:je,easeLinearity:B,noMoveStart:!0,animate:!0})}))}}});Ye.addInitHook("addHandler","dragging",Pm),Ye.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Fm=Zn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(r){this._map=r,this._setPanDelta(r.options.keyboardPanDelta),this._setZoomDelta(r.options.zoomDelta)},addHooks:function(){var r=this._map._container;r.tabIndex<=0&&(r.tabIndex="0"),Fe(r,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),st(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var r=document.body,l=document.documentElement,c=r.scrollTop||l.scrollTop,p=r.scrollLeft||l.scrollLeft;this._map._container.focus(),window.scrollTo(p,c)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(r){var l=this._panKeys={},c=this.keyCodes,p,_;for(p=0,_=c.left.length;p<_;p++)l[c.left[p]]=[-1*r,0];for(p=0,_=c.right.length;p<_;p++)l[c.right[p]]=[r,0];for(p=0,_=c.down.length;p<_;p++)l[c.down[p]]=[0,r];for(p=0,_=c.up.length;p<_;p++)l[c.up[p]]=[0,-1*r]},_setZoomDelta:function(r){var l=this._zoomKeys={},c=this.keyCodes,p,_;for(p=0,_=c.zoomIn.length;p<_;p++)l[c.zoomIn[p]]=r;for(p=0,_=c.zoomOut.length;p<_;p++)l[c.zoomOut[p]]=-r},_addHooks:function(){Fe(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){st(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(r){if(!(r.altKey||r.ctrlKey||r.metaKey)){var l=r.keyCode,c=this._map,p;if(l in this._panKeys){if(!c._panAnim||!c._panAnim._inProgress)if(p=this._panKeys[l],r.shiftKey&&(p=k(p).multiplyBy(3)),c.options.maxBounds&&(p=c._limitOffset(k(p),c.options.maxBounds)),c.options.worldCopyJump){var _=c.wrapLatLng(c.unproject(c.project(c.getCenter()).add(p)));c.panTo(_)}else c.panBy(p)}else if(l in this._zoomKeys)c.setZoom(c.getZoom()+(r.shiftKey?3:1)*this._zoomKeys[l]);else if(l===27&&c._popup&&c._popup.options.closeOnEscapeKey)c.closePopup();else return;pa(r)}}});Ye.addInitHook("addHandler","keyboard",Fm),Ye.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Im=Zn.extend({addHooks:function(){Fe(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){st(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(r){var l=cm(r),c=this._map.options.wheelDebounceTime;this._delta+=l,this._lastMousePos=this._map.mouseEventToContainerPoint(r),this._startTime||(this._startTime=+new Date);var p=Math.max(c-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),p),pa(r)},_performZoom:function(){var r=this._map,l=r.getZoom(),c=this._map.options.zoomSnap||0;r._stop();var p=this._delta/(this._map.options.wheelPxPerZoomLevel*4),_=4*Math.log(2/(1+Math.exp(-Math.abs(p))))/Math.LN2,S=c?Math.ceil(_/c)*c:_,B=r._limitZoom(l+(this._delta>0?S:-S))-l;this._delta=0,this._startTime=null,B&&(r.options.scrollWheelZoom==="center"?r.setZoom(l+B):r.setZoomAround(this._lastMousePos,l+B))}});Ye.addInitHook("addHandler","scrollWheelZoom",Im);var fw=600;Ye.mergeOptions({tapHold:Ne.touchNative&&Ne.safari&&Ne.mobile,tapTolerance:15});var $m=Zn.extend({addHooks:function(){Fe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){st(this._map._container,"touchstart",this._onDown,this)},_onDown:function(r){if(clearTimeout(this._holdTimeout),r.touches.length===1){var l=r.touches[0];this._startPos=this._newPos=new M(l.clientX,l.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Fe(document,"touchend",Pt),Fe(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",l))},this),fw),Fe(document,"touchend touchcancel contextmenu",this._cancel,this),Fe(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function r(){st(document,"touchend",Pt),st(document,"touchend touchcancel",r)},_cancel:function(){clearTimeout(this._holdTimeout),st(document,"touchend touchcancel contextmenu",this._cancel,this),st(document,"touchmove",this._onMove,this)},_onMove:function(r){var l=r.touches[0];this._newPos=new M(l.clientX,l.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(r,l){var c=new MouseEvent(r,{bubbles:!0,cancelable:!0,view:window,screenX:l.screenX,screenY:l.screenY,clientX:l.clientX,clientY:l.clientY});c._simulated=!0,l.target.dispatchEvent(c)}});Ye.addInitHook("addHandler","tapHold",$m),Ye.mergeOptions({touchZoom:Ne.touch,bounceAtZoomLimits:!0});var Um=Zn.extend({addHooks:function(){Ue(this._map._container,"leaflet-touch-zoom"),Fe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){wt(this._map._container,"leaflet-touch-zoom"),st(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(r){var l=this._map;if(!(!r.touches||r.touches.length!==2||l._animatingZoom||this._zooming)){var c=l.mouseEventToContainerPoint(r.touches[0]),p=l.mouseEventToContainerPoint(r.touches[1]);this._centerPoint=l.getSize()._divideBy(2),this._startLatLng=l.containerPointToLatLng(this._centerPoint),l.options.touchZoom!=="center"&&(this._pinchStartLatLng=l.containerPointToLatLng(c.add(p)._divideBy(2))),this._startDist=c.distanceTo(p),this._startZoom=l.getZoom(),this._moved=!1,this._zooming=!0,l._stop(),Fe(document,"touchmove",this._onTouchMove,this),Fe(document,"touchend touchcancel",this._onTouchEnd,this),Pt(r)}},_onTouchMove:function(r){if(!(!r.touches||r.touches.length!==2||!this._zooming)){var l=this._map,c=l.mouseEventToContainerPoint(r.touches[0]),p=l.mouseEventToContainerPoint(r.touches[1]),_=c.distanceTo(p)/this._startDist;if(this._zoom=l.getScaleZoom(_,this._startZoom),!l.options.bounceAtZoomLimits&&(this._zoom<l.getMin
814Zoom()&&_<1||this._zoom>l.getMaxZoom()&&_>1)&&(this._zoom=l._limitZoom(this._zoom)),l.options.touchZoom==="center"){if(this._center=this._startLatLng,_===1)return}else{var S=c._add(p)._divideBy(2)._subtract(this._centerPoint);if(_===1&&S.x===0&&S.y===0)return;this._center=l.unproject(l.project(this._pinchStartLatLng,this._zoom).subtract(S),this._zoom)}this._moved||(l._moveStart(!0,!1),this._moved=!0),O(this._animRequest);var B=s(l._move,l,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=$(B,this,!0),Pt(r)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,O(this._animRequest),st(document,"touchmove",this._onTouchMove,this),st(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))}});Ye.addInitHook("addHandler","touchZoom",Um),Ye.BoxZoom=jm,Ye.DoubleClickZoom=Bm,Ye.Drag=Pm,Ye.Keyboard=Fm,Ye.ScrollWheelZoom=Im,Ye.TapHold=$m,Ye.TouchZoom=Um,n.Bounds=Q,n.Browser=Ne,n.CRS=_e,n.Canvas=Mm,n.Circle=Kc,n.CircleMarker=es,n.Class=T,n.Control=On,n.DivIcon=Cm,n.DivOverlay=qn,n.DomEvent=L1,n.DomUtil=z1,n.Draggable=Ri,n.Evented=F,n.FeatureGroup=ui,n.GeoJSON=hi,n.GridLayer=co,n.Handler=Zn,n.Icon=Ja,n.ImageOverlay=rs,n.LatLng=X,n.LatLngBounds=z,n.Layer=jn,n.LayerGroup=Q
814a,n.LineUtil=H1,n.Map=Ye,n.Marker=Jl,n.Mixin=B1,n.Path=Oi,n.Point=M,n.PolyUtil=P1,n.Polygon=er,n.Polyline=ci,n.Popup=os,n.PosAnimation=hm,n.Projection=G1,n.Rectangle=Om,n.Renderer=fi,n.SVG=fo,n.SVGOverlay=zm,n.TileLayer=nr,n.Tooltip=ls,n.Transformation=R,n.Util=U,n.VideoOverlay=Am,n.bind=s,n.bounds=ie,n.canvas=Nm,n.circle=Q1,n.circleMarker=W1,n.control=lo,n.divIcon=lw,n.extend=a,n.featureGroup=Y1,n.geoJSON=Em,n.geoJson=tw,n.gridLayer=sw,n.icon=K1,n.imageOverlay=nw,n.latLng=ae,n.latLngBounds=ye,n.layerGroup=V1,n.map=D1,n.marker=X1,n.point=k,n.polygon=ew,n.polyline=J1,n.popup=rw,n.rectangle=hw,n.setOptions=E,n.stamp=h,n.svg=Rm,n.svgOverlay=aw,n.tileLayer=Lm,n.tooltip=ow,n.transformation=ce,n.version=i,n.videoOverlay=iw;var dw=window.L;n.noConflict=function(){return window.L=dw,this},window.L=n})})(Td,Td.exports);var HN=Td.exports;const _a=ec(HN);const GN=e=>{try{const t=e.split(` 815`),n=[],i={};let a=!1,o=!1;for(let s=0;s<t.length;s++){const u=t[s].trim();if(u==="BEGIN TAXA;"){a=!0;continue}if(u==="END;"&&a){a=!1;continue}if(a&&u.startsWith("TAXLABELS")){let h=s+1;for(;h<t.length&&!t[h].trim().startsWith(";");){const f=t[h].trim();if(f&&!f.startsWith(";")){const d=f.split(/\s+/).filter(m=>m&&m!==";");n.push(...d)}h++}s=h;continue}if(u.startsWith("TREE")){o=!0;const h=u.match(/TREE\s+\*\s+(\w+)\s*=\s*\[&R\]\s*(.+)/);h&&(i.name=h[1],i.newick=h[2]);continue}if(u==="END;"&&o){o=!1;break}}return{taxa:n,treeData:i,success:!0}}catch(t){return console.error("è§£æNEXUSæä»¶å¤±è´¥:",t),{success:!1,error:t.message}}},ZN=e=>{try{const t=e.match(/[(),:;]|[^(),:;\s]+/g)||[];let n=0;const i=(o=null)=>{const s={children:[],branchLength:null,name:null,parent:o};if(t[n]==="("){for(n++;t[n]!==")";){t[n]===","&&n++;const u=i(s);s.children.push(u)}if(n++,t[n]&&t[n]!==","&&t[n]!==")"){const u=t[n].split(":");u.length===2?(s.name=u[0],s.branchLength=parseFloat(u[1])):s.name=t[n],n++}}else{const u=t[n].split(":");u.length===2?(s.name=u[0],s.branchLength=parseFloat(u[1])):s.name=t[n],n++}return s};return{success:!0,tree:i()}}catch(t){return console.error("è§£æNewickæ 失败:",t),{success:!1,error:t.message}}},qN=()=>{ee.useRef(null);const e=ee.useRef(null),{languageData:t,filteredLanguageData:n,loading:i,selectedGBFeatures:a,selectedEAFeatures:o,selectedWALSFeatures:s,gbWeights:u,eaWeights:h,walsWeights:f,showFeatureInfo:d,highlightedLanguages:m,dorecoHighlightedLanguages:g,featureDescriptions:x,categoricalFilters:b,lang:E}=ee.useContext(Ut),H=ee.useRef([]),v=ee.useRef(2),w=ee.useRef(null),A=ee.useRef({}),D=ee.useRef({}),G=ee.useRef({}),j=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999","#66c2a5","#fc8d62","#8da0cb"];ee.useEffect(()=>{(async()=>{try{const[T,N]=await Promise.all([(async()=>{try{const F=await(await fetch("EDGE_tree.nex")).text(),M=GN(F);if(M.success){const V=ZN(M.treeData.newick);return V.success?(w.current=V.tree,{success:!0}):(console.error("è§£æNewickæ 失败:",V.error),{success:!1,error:V.error})}else return console.error("è§£æNEXUSæä»¶å¤±è´¥:",M.error),{success:!1,error:M.error}}catch(C){return console.error("å 载系ç»åè²æ 失败:",C),{success:!1,error:C.message}}})(),zp()]);A.current=N;try{const F=await(await fetch("dplace-cldf/cldf/codes.csv")).text(),M=mt(F),V={};M.forEach(k=>{k.ID&&(V[k.ID]={name:k.Name,description:k.Description||k.Name})}),G.current=V}catch(C){console.error("å è½½EA codes失败:",C)}try{const F=await(await fetch("cldf-datasets-wals-014143f/cldf/codes.csv")).text(),M=mt(F),V={};M.forEach(k=>{k.ID&&(V[k.ID]={name:k.Name,description:k.Description||k.Name})}),D.current=V}catch(C){console.error("å è½½WALS codes失败:",C)}}catch(T){console.error("å è½½æ°æ®å¤±è´¥:",T)}})()},[]);const Z=(U,T)=>ai.includes(U)?T==1?"rgba(255, 140, 0, 1)":T==0?"rgba(255, 166, 0, 0.04)":"rgba(0, 0, 0, 0)":T==1?"rgba(0, 188, 212, 1)":T==0?"rgba(173, 216, 230, 0.08)":"rgba(0, 0, 0, 0)",Y=U=>{let T=0;for(let C=0;C<U.length;C++)T=(T<<5)-T+U.charCodeAt(C),T=T&T;const N=Math.abs(T)%j.length;return j[N]},q=(U,T,N,C,F,M)=>{const V=e.current.getZoom();v.current=V;const k=Math.max(.7,Math.min(2,V/3)),ie=Math.max(8,Math.min(14,8+T*.5))*k,z=(M==null?void 0:M.length)||0,ye=z>0?z*2+4:0,X=Math.ceil(ie*2.2+ye*2),ae=o&&o.length>0?o.filter(Se=>{const de=U[Se];return de!=null&&de!==""&&de!=="NA"}).map((Se,de)=>{const Te=U[Se];let De=Te;const xe=x[Se],he=xe!=null&&xe.type?`[${xe.type}]`:"";if(Te!=null&&Te!==""){const Oe=`${Se}-${Te}`,I=G.current[Oe];I&&(De=`${Te} (${I.name})`)}return`<span style='cursor:pointer;color:#ff6b35;text-decoration:underline' data-feature='${Se}'>${Se}</span> ${he}: ${De}<br/>`}).join(""):"",_e=s&&s.length>0?s.filter(Se=>{const de=U[Se];return de!=null&&de!==""&&de!=="NA"}).map(Se=>{const de=U[Se];let Te=de;return de&&D.current[de]&&(Te=`${de} (${D.current[de].name})`),`<span style='cursor:pointer;color:#4ecdc4;text-decoration:underline' data-feature='${Se}'>${Se}</span>: ${Te}<br/>`}).join(""):"",pe=` 816 <b>${U.Name||U.Language_ID}</b><br/> 817 Language ID: ${U.Language_ID}<br/>
817 818 ${U.Family_level_ID?`Language Family: ${_l(U.Family_level_ID,A.current)}<br/>`:"Language Family: none<br/>"} 819 ${U.region?`Region: ${U.region}<br/>`:"Region: none<br/>"} 820 ${U.Macroarea?`Macro Area: ${U.Macroarea}<br/>`:"Macro Area: none<br/>"} 821 <hr style="margin: 5px 0; border: none; border-top: 1px solid #ccc;"> 822 823 ${N.length>0?"<b>GB Features:</b><br/>":""} 824 ${N.filter(Se=>{const de=U[Se.feature];return de!=null&&de!==""}).map(Se=>{const de=U[Se.feature];let Te=de;return de===0||de==="0"?Te="0 (absent)":(de===1||de==="1")&&(Te="1 (present)"),`<span style='cursor:pointer;color:#2c7c6c;text-decoration:underline' data-feature='${Se.feature}'>${Se.feature}</span>: ${Te}<br/>`}).join("")} 825 826 ${ae?"<b>D-PLACE Features:</b><br/>"+ae:""} 827 828 ${_e?"<b>WALS Features:</b><br/>"+_e:""} 829 830 <hr style="margin: 5px 0; border: none; border-top: 1px solid #ccc;"> 831 <button id="explain-language-btn" style=" 832 background: #2c7c6c; 833 color: white; 834 border: none; 835 padding: 8px 12px; 836 border-radius: 4px; 837 cursor: pointer; 838 font-size: 12px; 839 width: 100%; 840 margin-top: 5px; 841 ">ð¬ ${E==="zh"?"è·åAI讲解":"Get AI Explanation"}</button> 842 `;if(N.length===1){const Se=N[0],de=Z(Se.feature,Se.value);let Te="#fff",De="0.5";(Se.value===null||Se.value===void 0)&&(Te="rgba(200, 200, 200, 0.3)",De="0.5");const xe=C?"tree-highlighted":F?"doreco-highlighted":"",he=M&&M.length>0?M.map((J,oe)=>{const P=Y(J),K=ie+1.5+oe*2;return`<circle cx="${X/2}" cy="${X/2}" r="${K}" fill="none" stroke="${P}" stroke-width="2" opacity="0.8" />`}).join(""):"",Oe=` 843 <svg width="${X}" height="${X}" style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)"> 844 <g class="${xe}"> 845 <circle cx="${X/2}" cy="${X/2}" r="${ie}" fill="${de}" stroke="${Te}" stroke-width="${De}" /> 846 ${he} 847 </g> 848 </svg> 849 `,I=_a.marker([U.Latitude,U.Longitude],{icon:_a.divIcon({html:Oe,className:`custom-icon${xe?` ${xe}`:""}`,iconSize:[X,X],iconAnchor:[X/2,X/2]})}).addTo(e.current);return I.bindPopup(pe,{autoPan:!0}),I.on("popupopen",J=>{setTimeout(()=>{const oe=J.popup.getElement();if(oe){oe.querySelectorAll("[data-feature]").forEach(K=>{const re=K.getAttribute("data-feature");K.onclick=le=>{re&&d(re)},K.ondblclick=le=>{if(le.preventDefault(),re&&window.explainFeature){const se=x[re];let ue="Unknown";re.startsWith("GB")?ue="Grambank":re.startsWith("EA")||re.includes("Richness")?ue="D-PLACE":ue="WALS";const Ae={id:re,name:(se==null?void 0:se.name)||re,description:(se==null?void 0:se.description)||`Feature ${re} from map view`,database:ue,type:"map_feature"};window.explainFeature(Ae)}},K.title=`${K.title||re} 850 851ç¹å»æ¥ç详æ ï¼åå»è·åAIè§£é`});const P=oe.querySelector("#explain-language-btn");P&&(P.onclick=()=>{te(U,N)})}},100)}),I}const Re=N.reduce((Se,de)=>Se+de.weight,0)||1;let ve=0;const R=N.map(Se=>{const de=Se.weight/Re*Math.PI*2,Te=ve+de,De=X/2+ie*Math.cos(ve-Math.PI/2),xe=X/2+ie*Math.sin(ve-Math.PI/2),he=X/2+ie*Math.cos(Te-Math.PI/2),Oe=X/2+ie*Math.sin(Te-Math.PI/2),I=de>Math.PI?1:0,J=[`M${X/2},${X/2}`,`L${De},${xe}`,`A${ie},${ie},0,${I},1,${he},${Oe}`,"Z"].join(" "),oe=Z(Se.feature,Se.value),P=Se.value===null||Se.value===void 0?"rgba(200, 200, 200, 0.3)":"#fff",K=(Se.value===null||Se.value===void 0,"0.5"),re=`<path d="${J}" fill="${oe}" stroke="${P}" stroke-width="${K}" />`;return ve=Te,re}),ce=C?"tree-highlighted":F?"doreco-highlighted":"",Me=M&&M.length>0?M.map((Se,de)=>{const Te=Y(Se),De=ie+1.5+de*2;return`<circle cx="${X/2}" cy="${X/2}" r="${De}" fill="none" stroke="${Te}" stroke-width="2" opacity="0.8" />`}).join(""):"",we=` 852 <svg width="${X}" height="${X}" style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)"> 853 <g class="${ce}"> 854 ${R.join("")} 855 ${Me} 856 </g> 857 </svg> 858 `,ke=_a.marker([U.Latitude,U.Longitude],{icon:_a.divIcon({html:we,className:`custom-icon${ce?` ${ce}`:""}`,iconSize:[X,X],iconAnchor:[X/2,X/2]})}).addTo(e.current);return ke.bindPopup(pe,{autoPan:!0}),ke.on("popupopen",Se=>{setTimeout(()=>{const de=Se.popup.getElement();if(de){de.querySelectorAll("[data-feature]").forEach(De=>{const xe=De.getAttribute("data-feature");De.onclick=he=>{xe&&d(xe)},De.ondblclick=he=>{if(he.preventDefault(),xe&&window.explainFeature){const Oe=x[xe];let I="Unknown";xe.startsWith("GB")?I="Grambank":xe.startsWith("EA")||xe.includes("Richness")?I="D-PLACE":I="WALS";const J={id:xe,name:(Oe==null?void 0:Oe.name)||xe,description:(Oe==null?void 0:Oe.description)||`Feature ${xe} from map view`,database:I,type:"map_feature"};window.explainFeature(J)}},De.title=`${De.title||xe} 859 860ç¹å»æ¥ç详æ ï¼åå»è·åAIè§£é`});const Te=de.querySelector("#explain-language-btn");Te&&(Te.onclick=()=>{te(U,N)})}},100)}),ke},te=(U,T)=>{if(window.explainLanguage){const N={id:U.Language_ID,name:U.Name,family:_l(U.Family_level_ID,A.current),region:U.region,macroarea:U.Macroarea,features:T.map(C=>({id:C.feature,value:U[C.feature],weight:C.weight,isOrange:C.isOrange}
860)),coordinates:{latitude:U.Latitude,longitude:U.Longitude}};window.explainLanguage(N)}else console.warn("window.explainLanguage function not found")},$=()=>{if(!e.current||m.length===0)return;const U=t.filter(T=>m.includes(T.Name)).map(T=>[T.Latitude,T.Longitude]).filter(T=>T[0]&&T[1]);if(U.length!==0)if(U.length===1)e.current.setView(U[0],8);else{const T=_a.latLngBounds(U);e.current.fitBounds(T,{padding:[20,20],maxZoom:10})}};ee.useEffect(()=>{if(!document.getElementById("map")){console.warn("Map container not found");return}e.current&&(e.current.remove(),e.current=null);try{e.current=_a.map("map",{zoomControl:!1}).setView([10,0],2),_a.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:"© OpenStreetMap © CARTO"}).addTo(e.current),setTimeout(()=>{e.current&&e.current.invalidateSize()},100)}catch(T){console.error("Error initializing map:",T)}return()=>{if(e.current){try{e.current.remove()}catch(T){console.warn("Error removing map:",T)}e.current=null}}},[]),ee.useEffect(()=>{if(!e.current)return;const U=()=>{const T=e.current.getZoom();T!==v.current&&(v.current=T,O())};return e.current.on("zoomend",U),()=>{e.current&&e.current.off("zoomend",U)}},[n,a,o,s,u,h,f,m,g,b]);const O=()=>{if(!e.current||i||!n||n.length===0)return;H.current.forEach(F=>{try{F&&F.remove&&F.remove()}catch(M){console.warn("Error removing marker:",M)}}),H.current=[];const U=a.length>0?a:[...aa,...ai],T=o;let N=0,C=0;n.forEach(F=>{if(!(!F.Latitude||!F.Longitude))try{if(T.length>0&&!T.every(ae=>{const _e=F[ae];return _e!=="NA"&&_e!==null&&_e!==void 0&&_e!==""})){N++;return}let M=0,V=0;T.forEach(X=>{const ae=parseFloat(h[X]||1),_e=F[X];_e!==null&&!isNaN(_e)&&_e!=="NA"&&(M+=_e*ae,V+=ae)}),M=V>0?M/V:0;const k=U.map(X=>{const ae=parseFloat(u[X]||1),_e=F[X],pe=_e!=null&&_e!=="";return{feature:X,value:_e,isOrange:ai.includes(X),weight:ae>0&&pe?ae:0}}).filter(X=>X.weight>0&&X.value!==void 0&&X.value!==null&&X.value!==""),Q=m.includes(F.Name),ie=g.includes(F.Name),z=[];b&&Object.keys(b).length>0&&Object.entries(b).forEach(([X,ae])=>{if(ae&&ae.length>0){const _e=F[X];_e&&ae.includes(`${X}-${_e}`)&&z.push(X)}});const ye=q(F,M,k,Q,ie,z);H.current.push(ye),C++}catch(M){console.warn("Error creating marker for language:",F.Name,M)}})};return ee.useEffect(()=>{O()},[t,i,a,o,s,u,h,f,d,m,g,b]),ee.useEffect(()=>{m.length>0&&setTimeout(()=>{$()},100)},[m]),y.jsx("div",{id:"map",style:{height:"100%",width:"100%"}})},o1=(e,t="linguistic_data.csv")=>{if(!e||e.length===0)throw new Error("没æå¯ä¸è½½çæ°æ®");try{const n=e.map(h=>({...h})),i=Object.keys(n[0]),a=[i.join(","),...n.map(h=>i.map(f=>{const d=h[f];return typeof d=="string"&&(d.includes(",")||d.includes('"')||d.includes(` 861`))?`"${d.replace(/"/g,'""')}"`:d}).join(","))].join(` 862`),o=new Blob([a],{type:"text/csv;charset=utf-8;"}),s=document.createElement("a"),u=URL.createObjectURL(o);return s.setAttribute("href",u),s.setAttribute("download",t),s.style.visibility="hidden",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(u),!0}catch(n){throw console.error("ä¸è½½CSVæ°æ®æ¶åºé:",n),n}},l1=(e,t="linguistic_data.json")=>{if(!e||e.length===0)throw new Error("没æå¯ä¸è½½çæ°æ®");try{const n=JSON.stringify(e,null,2),i=new Blob([n],{type:"application/json;charset=utf-8;"}),a=document.createElement("a"),o=URL.createObjectURL(i);return a.setAttribute("href",o),a.setAttribute("download",t),a.style.visibility="hidden",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o),!0}catch(n){throw console.error("ä¸è½½JSONæ°æ®æ¶åºé:",n),n}},s1=(e,t="linguistic_data.tsv")=>{if(!e||e.length===0)throw new Error("没æå¯ä¸è½½çæ°æ®");try{const n=e.map(h=>({...h})),i=Object.keys(n[0]),a=[i.join(" "),...n.map(h=>i.map(f=>{const d=h[f];return typeof d=="string"&&(d.includes(" ")||d.includes(` 863`))?d.replace(/\t/g," ").replace(/\n/g," "):d}).join(" "))].join(` 864`),o=new Blob([a],{type:"text/tab-separated-values;charset=utf-8;"}),s=document.createElement("a"),u=URL.createObjectURL(o);return s.setAttribute("href",u),s.setAttribute("download",t),s.style.visibility="hidden",document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(u),!0}catch(n){throw console.error("ä¸è½½TSVæ°æ®æ¶åºé:",n),n}},VN=(e,t="linguistic_data")=>{if(!e||e.length===0)throw new Error("没æå¯ä¸è½½çæ°æ®");const n=new Date().toISOString().slice(0,10);return e.length>1e4?o1(e,`${t}_${n}.csv`):e.length>1e3?s1(e,`${t}_${n}.tsv`):l1(e,`${t}_${n}.json`)},YN=e=>{if(!e||e.length===0)return null;const t={totalLanguages:e.length,features:{},regions:{},families:{},familyNames:{},macroareas:{}};return e.forEach(n=>
864{Object.keys(n).forEach(i=>{if(i.startsWith("GB")||i.startsWith("EA")){t.features[i]||(t.features[i]={values:{},total:0});const a=n[i];a!=null&&a!=="NA"&&(t.features[i].values[a]=(t.features[i].values[a]||0)+1,t.features[i].total+=1)}}),n.region&&(t.regions[n.region]=(t.regions[n.region]||0)+1),n.Family_level_ID&&(t.families[n.Family_level_ID]=(t.families[n.Family_level_ID]||0)+1),n.Family_Name&&(t.familyNames[n.Family_Name]=(t.familyNames[n.Family_Name]||0)+1),n.Macroarea&&(t.macroareas[n.Macroarea]=(t.macroareas[n.Macroarea]||0)+1)}),t},KN=(e,t="data_summary.txt")=>{const n=YN(e);if(!n)throw new Error("æ æ³çææ°æ®æè¦");try{let i=`è¯è¨æ°æ®æè¦æ¥å 865`;i+=`çææ¶é´: ${new Date().toLocaleString()} 866`,i+=`æ»è¯è¨æ°é: ${n.totalLanguages} 867 868`,i+=`å°çåå¸: 869`,i+=`åºååå¸: 870`,Object.entries(n.regions).sort(([,u],[,h])=>h-u).forEach(([u,h])=>{i+=` ${u}: ${h} 个è¯è¨ 871`}),i+=` 872è¯ç³»åå¸: 873`,Object.entries(n.families).sort(([,u],[,h])=>h-u).slice(0,20).forEach(([u,h])=>{i+=` ${u}: ${h} 个è¯è¨ 874`}),i+=` 875è¯ç³»åç§°åå¸: 876`,n.familyNames&&Object.keys(n.familyNames).length>0?Object.entries(n.familyNames).sort(([,u],[,h])=>h-u).slice(0,20).forEach(([u,h])=>{i+=` ${u}: ${h} 个è¯è¨ 877`}):i+=` æ è¯ç³»åç§°ä¿¡æ¯ 878`,i+=` 879大åºååå¸: 880`,Object.entries(n.macroareas).sort(([,u],[,h])=>h-u).forEach(([u,h])=>{i+=` ${u}: ${h} 个è¯è¨ 881`}),i+=` 882ç¹å¾ç»è®¡: 883`,Object.entries(n.features).forEach(([u,h])=>{i+=` 884${u}: 885`,i+=` ææå¼æ°é: ${h.total} 886`,i+=` å¼åå¸: 887`,Object.entries(h.values).sort(([,f],[,d])=>d-f).slice(0,10).forEach(([f,d])=>{i+=` ${f}: ${d} 个è¯è¨ 888`})});const a=new Blob([i],{type:"text/plain;charset=utf-8;"}),o=document.createElement("a"),s=URL.createObjectURL(a);return o.setAttribute("href",s),o.setAttribute("download",t),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s),!0}catch(i){throw console.error("ä¸è½½æ°æ®æè¦æ¶åºé:",i),i}},XN=()=>{var x;const{useDynamicData:e,toggleDataMode:t,reloadData:n,loading:i,languageData:a,filteredLanguageData:o,lang:s,langs:u}=ee.useContext(Ut),[h,f]=ee.useState({}),d=u[s];ee.useEffect(()=>{(async()=>{try{const E=await zp();f(E)}catch(E){console.error(d.loadFamilyMappingError||"å è½½è¯ç³»æ å°å¤±è´¥:",E)}})()},[d.loadFamilyMappingError]);const m=()=>{if(!o||o.length===0){alert(d.noDataToDownload||"没æå¯ä¸è½½çæ°æ®");return}try{const b=o.map(D=>{const G={...D};return D.Family_level_ID&&(G.Family_Name=_l(D.Family_level_ID,h)),G}),E=Object.keys(b[0]),H=[E.join(","),...b.map(D=>E.map(G=>{const j=D[G];return typeof j=="string"&&(j.includes(",")||j.includes('"')||j.includes(` 889`))?j.replace(/"/g,'""'):j}).join(","))].join(` 890`),v=new Blob([H],{type:"text/csv;charset=utf-8;"}),w=document.createElement("a"),A=URL.createObjectURL(v);w.setAttribute("href",A),w.setAttribute("download",`static_linguistic_data_${new Date().toISOString().slice(0,10)}.csv`),w.style.visibility="hidden",document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(A)}catch(b){console.error(d.downloadDataError||"ä¸è½½éææ°æ®æ¶åºé:",b),alert(d.downloadDataError||"ä¸è½½æ°æ®æ¶åºéï¼è¯·æ£æ¥æ§å¶å°")}},g=b=>{var E,H;if(!a||a.length===0){alert(d.noDataToDownload||"没æå¯ä¸è½½çæ°æ®");return}try{const v=a.map(A=>{const D={...A};return A.Family_level_ID&&(D.Family_Name=_l(A.Family_level_ID,h)),D}),w=new Date().toISOString().slice(0,10);switch(b){case"csv":o1(v,`static_linguistic_data_${w}.csv`);break;case"json":l1(v,`static_linguistic_data_${w}.json`);break;case"tsv":s1(v,`static_linguistic_data_${w}.tsv`);break;case"summary":KN(v,`static_data_summary_${w}.txt`);break;default:VN(v,`static_linguistic_data_${w}`)}}catch(v){console.error(((E=d.downloadFormatError)==null?void 0:E.replace("{format}",b))||`ä¸è½½${b}æ ¼å¼éææ°æ®æ¶åºé:`,v),alert(((H=d.downloadFormatError)==null?void 0:H.replace("{format}",b))||`ä¸è½½${b}æ ¼å¼æ°æ®æ¶åºéï¼è¯·æ£æ¥æ§å¶å°`)}};return y.jsxs("div",{className:"data-mode-toggle",style:{backgroundColor:"#f9f9f9",padding:"12px",borderRadius:"4px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid #ddd",fontSize:"11px",minWidth:"200px",marginBottom:"12px"},children:[y.jsx("div",{style:{marginBottom:"8px"},children:y.jsxs("strong",{style:{color:"#666",fontSize:"12px",fontWeight:"normal"},children:[d.dataModeTitle||"æ°æ®æ¨¡å¼",":"]}
890)}),y.jsxs("div",{style:{marginBottom:"12px"},children:[y.jsxs("label",{style:{display:"flex",alignItems:"center",marginBottom:"6px",fontSize:"10px"},children:[y.jsx("input",{type:"radio",checked:!e,onChange:()=>!e||t(),disabled:i,style:{marginRight:"6px"}}),y.jsx("span",{style:{color:"#666"},children:d.staticDataLabel||"éææ°æ® (é¢å¤ççCSV)"})]}),y.jsxs("label",{style:{display:"flex",alignItems:"center",fontSize:"10px"},children:[y.jsx("input",{type:"radio",checked:e,onChange:()=>e||t(),disabled:i,style:{marginRight:"6px"}}),y.jsx("span",{style:{color:"#666"},children:d.dynamicDataLabel||"å¨ææ°æ® (宿¶æ¥è¯¢æ°æ®åº)"})]})]}),y.jsx("div",{style:{fontSize:"10px",color:"#666",marginBottom:"12px"},children:((x=d.currentDataPoints)==null?void 0:x.replace("{count}",o.length))||`å½åæ°æ®ç¹: ${o.length} 个è¯è¨`}),y.jsxs("div",{style:{display:"flex",gap:"6px",marginBottom:"10px"},children:[y.jsx("button",{onClick:n,disabled:i,style:{flex:1,padding:"6px 8px",backgroundColor:i?"#ccc":"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:i?"not-allowed":"pointer",fontSize:"10px",fontWeight:"normal"},children:i?d.loadingData||"å è½½ä¸...":d.reloadData||"éæ°å è½½æ°æ®"}),y.jsx("button",{onClick:m,disabled:i||!a||a.length===0,style:{flex:1,padding:"6px 8px",backgroundColor:i||!a||a.length===0?"#ccc":"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:i||!a||a.length===0?"not-allowed":"pointer",fontSize:"10px",fontWeight:"normal"},children:i||!a||a.length===0?d.unavailableDownload||"ä¸å¯ä¸è½½":d.downloadStaticData||"ä¸è½½éææ°æ®"})]}),!i&&a&&a.length>0&&y.jsxs("div",{style:{marginTop:"8px",textAlign:"center"},children:[y.jsxs("div",{style:{fontSize:"10px",color:"#666",marginBottom:"4px"},children:[d.chooseDownloadFormat||"éæ©ä¸è½½æ ¼å¼",":"]}),y.jsxs("div",{style:{display:"flex",gap:"4px",justifyContent:"center",flexWrap:"wrap"},children:[y.jsx("button",{onClick:()=>g("csv"),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},title:d.csvFormatDescription||"CSVæ ¼å¼ï¼å ¼å®¹Excel",children:d.csvFormat||"CSV"}),y.jsx("button",{onClick:()=>g("tsv"),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},title:d.tsvFormatDescription||"TSVæ ¼å¼ï¼Excelå好",children:d.tsvFormat||"TSV"}),y.jsx("button",{onClick:()=>g("json"),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},title:d.jsonFormatDescription||"JSONæ ¼å¼ï¼ä¾¿äºç¨åºå¤ç",children:d.jsonFormat||"JSON"}),y.jsx("button",{onClick:()=>g("summary"),style:{padding:"3px 6px",backgroundColor:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px"},title:d.summaryFormatDescription||"æ°æ®æè¦æ¥å",children:d.summaryFormat||"æè¦"})]})]}),i&&y.jsx("div",{style:{marginTop:"8px",textAlign:"center",color:"#2c7c6c",fontSize:"10px"},children:d.loadingDataMessage||"â³ æ£å¨å¤çæ°æ®..."})]})},WN=({onUploadSuccess:e})=>{const{lang:t,langs:n}=ee.useContext(Ut),[i,a]=ee.useState([]),[o,s]=ee.useState({title:"",authors:"",abstract:"",keywords:"",publication_date:""}),[u,h]=ee.useState(!1),[f,d]=ee.useState(""),[m,g]=ee.useState(0),[x,b]=ee.useState([]),[E,H]=ee.useState(!1),[v,w]=ee.useState(!1),[A,D]=ee.useState(null),G=ee.useRef(null),j=ee.useRef(null),Z=50*1024*1024,Y=M=>{const V=Array.from(M.target.files);q(V)},q=M=>{const V=[],k=[];if(M.forEach(Q=>{const ie=["pdf","docx","txt"],z=Q.name.split(".").pop().toLowerCase();if(!ie.includes(z)){k.push(`${Q.name}: ${t==="zh"?"䏿¯æçæä»¶ç±»å":"Unsupported file type"}`);return}if(Q.size>Z){k.push(`${Q.name}: ${t==="zh"?"æä»¶è¿å¤§":"File too large"} (${(Q.size/1024/1024).toFixed(1)}MB)`);return}V.push(Q)}),k.length>0&&d(k.join(` 891`)),V.length>0&&(a(Q=>[...Q,...V]),d(""),!o.title&&V[0])){const Q=V[0].name.replace(/\.[^/.]+$/,"");s(ie=>({...ie,title:Q}))}},te=M=>{a(V=>V.filter((k,Q)=>Q!==M)),A&&A.index===M&&D(null)},$=ee.useCallback(M=>{M.preventDefault(),M.stopPropagation(),M.type==="dragenter"||M.type==="dragover"?w(!0):M.type==="dragleave"&&w(!1)},[]),O=ee.useCallback(M=>{if(M.preventDefault(),M.stopPropagation(),w(!1),M.dataTransfer.files&&M.dataTransfer.files[0]){const V=Array.from(M.dataTransfer.files);q(V)}},[t]),U=(M,V)=>{s(k=>({...k,[M]:V}))},T=(M,V)=>{if(M.type==="text/plain"){const k=new FileReader;k.onload=Q=>{D({name:M.name,content:Q.target.result,type:"text",index:V})},k.readAsText(M)}else D({name:M.name,content:null,type:M.type,index:V})},N=async()=>
891{if(i.length===0){d(t==="zh"?"è¯·éæ©è¦ä¸ä¼ çæä»¶":"Please select files to upload");return}h(!0),d(""),g(0);try{let M=0,V=0;const k=[];for(let Q=0;Q<i.length;Q++){const ie=i[Q];g(Q/i.length*100);try{const z=new FormData;z.append("file",ie),Object.keys(o).forEach(ae=>{o[ae]&&z.append(ae,o[ae])});const ye=await fetch(`${{}.VITE_API_BASE_URL||"http://localhost:8000"}/api/upload-paper`,{method:"POST",body:z});if(!ye.ok){const ae=await ye.json();throw new Error(ae.detail||"Upload failed")}const X=await ye.json();M++,k.push({filename:ie.name,status:"success",result:X,timestamp:new Date().toISOString()})}catch(z){V++,k.push({filename:ie.name,status:"error",error:z.message,timestamp:new Date().toISOString()})}}g(100),b(Q=>[...k,...Q].slice(0,50)),V===0?(d(t==="zh"?`æææä»¶ä¸ä¼ æåï¼å
± ${M} 个æä»¶`:`All files uploaded successfully! Total: ${M} files`),e&&e()):(d(t==="zh"?`ä¸ä¼ 宿ãæå: ${M}, 失败: ${V}`:`Upload completed. Success: ${M}, Failed: ${V}`),e&&e()),a([]),s({title:"",authors:"",abstract:"",keywords:"",publication_date:""}),G.current&&(G.current.value="")}catch(M){d(t==="zh"?`ä¸ä¼ 失败: ${M.message}`:`Upload failed: ${M.message}`)}finally{h(!1),setTimeout(()=>g(0),1e3)}},C=M=>{if(!M)return"ð";switch(M.split(".").pop().toLowerCase()){case"pdf":return"ð";case"docx":return"ð";case"txt":return"ð";default:return"ð"}},F=M=>{if(M===0)return"0 Bytes";const V=1024,k=["Bytes","KB","MB","GB"],Q=Math.floor(Math.log(M)/Math.log(V));return parseFloat((M/Math.pow(V,Q)).toFixed(2))+" "+k[Q]};return y.jsxs("div",{className:"paper-upload",style:{background:"white",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[y.jsxs("h3",{style:{margin:0,color:"#2c7c6c",fontSize:"16px",fontWeight:"bold"},children:["ð ",t==="zh"?"论æä¸ä¼ ":"Paper Upload"]}),y.jsx("button",{onClick:()=>H(!E),style:{padding:"4px 8px",background:E?"#2c7c6c":"#f0f0f0",color:E?"white":"#333",border:"none",borderRadius:"4px",fontSize:"10px",cursor:"pointer"},children:E?t==="zh"?"éèåå²":"Hide History":t==="zh"?"ä¸ä¼ åå²":"Upload History"})]}),E&&y.jsxs("div",{style:{marginBottom:"16px",padding:"12px",background:"#f8f9fa",borderRadius:"6px",maxHeight:"200px",overflowY:"auto"},children:[y.jsx("h4",{style:{margin:"0 0 8px 0",fontSize:"12px",color:"#333"},children:t==="zh"?"æè¿ä¸ä¼ è®°å½":"Recent Upload History"}),x.length===0?y.jsx("div",{style:{fontSize:"10px",color:"#666",textAlign:"center"},children:t==="zh"?"ææ ä¸ä¼ è®°å½":"No upload history"}):x.slice(0,10).map((M,V)=>y.jsxs("div",{style:{padding:"6px",margin:"4px 0",background:M.status==="success"?"#e8f5e8":"#ffebee",borderRadius:"4px",fontSize:"10px"},children:[y.jsx("div",{style:{fontWeight:"bold"},children:M.filename}),y.jsx("div",{style:{color:M.status==="success"?"#2e7d32":"#c62828"},children:M.status==="success"?t==="zh"?"æå":"Success":t==="zh"?"失败":"Failed"}),y.jsx("div",{style:{color:"#666",fontSize:"9px"},children:new Date(M.timestamp).toLocaleString()})]},V))]}),y.jsxs("div",{style:{marginBottom:"16px"},children:[y.jsx("label",{style:{display:"block",marginBottom:"8px",fontSize:"12px",fontWeight:"bold",color:"#333"},children:t==="zh"?"éæ©è®ºææä»¶":"Select Paper Files"}),y.jsx("div",{ref:j,style:{border:`2px dashed ${v?"#2c7c6c":"#ddd"}`,borderRadius:"6px",padding:"20px",textAlign:"center",cursor:"pointer",transition:"all 0.2s ease",backgroundColor:v?"#f0f8ff":"#fafafa"},onDragEnter:$,onDragLeave:$,onDragOver:$,onDrop:O,onClick:()=>{var M;return(M=G.current)==null?void 0:M.click()},children:i.length>0?y.jsxs("div",{children:[y.jsx("div",{style:{fontSize:"24px",marginBottom:"8px"},children:"ð"}),y.jsx("div",{style:{fontSize:"12px",color:"#2c7c6c",fontWeight:"bold"},children:t==="zh"?`已鿩 ${i.length} 个æä»¶`:`${i.length} files selected`})]}):y.jsxs("div",{children:[y.jsx("div",{style:{fontSize:"24px",marginBottom:"8px"},children:"ð"}),y.jsx("div",{style:{fontSize:"12px",color:"#666"},children:t==="zh"?"ç¹å»éæ©æä»¶æææ½å°æ¤å¤":"Click to select files or drag and drop here"}),y.jsx("div",{style:{fontSize:"10px",color:"#999",marginTop:"4px"},children:t==="zh"?"æ¯æ PDF, DOCX, TXT æ ¼å¼ï¼æå¤§50MB":"Supports PDF, DOCX, TXT formats, max 50MB"})]})}),y.jsx("input",{ref:G,type:"file",accept:".pdf,.docx,.txt",multiple:!0,onChange:Y,style:{display:"none"}})]}),i.length>
8910&&y.jsxs("div",{style:{marginBottom:"16px"},children:[y.jsx("h4",{style:{margin:"0 0 8px 0",fontSize:"12px",color:"#333"},children:t==="zh"?"å·²éæä»¶":"Selected Files"}),i.map((M,V)=>y.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"8px",margin:"4px 0",background:"#f8f9fa",borderRadius:"4px",fontSize:"11px"},children:[y.jsx("span",{style:{marginRight:"8px"},children:C(M.name)}),y.jsxs("div",{style:{flex:1},children:[y.jsx("div",{style:{fontWeight:"bold"},children:M.name}),y.jsx("div",{style:{color:"#666",fontSize:"9px"},children:F(M.size)})]}),y.jsx("button",{onClick:()=>T(M,V),style:{padding:"2px 6px",margin:"0 4px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"3px",fontSize:"9px",cursor:"pointer"},children:t==="zh"?"é¢è§":"Preview"}),y.jsx("button",{onClick:()=>te(V),style:{padding:"2px 6px",background:"#dc3545",color:"white",border:"none",borderRadius:"3px",fontSize:"9px",cursor:"pointer"},children:t==="zh"?"å é¤":"Remove"})]},V))]}),A&&y.jsxs("div",{style:{marginBottom:"16px",padding:"12px",background:"#f8f9fa",borderRadius:"6px",maxHeight:"200px",overflowY:"auto"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},children:[y.jsxs("h4",{style:{margin:0,fontSize:"12px",color:"#333"},children:[t==="zh"?"æä»¶é¢è§":"File Preview",": ",A.name]}),y.jsx("button",{onClick:()=>D(null),style:{padding:"2px 6px",background:"#6c757d",color:"white",border:"none",borderRadius:"3px",fontSize:"9px",cursor:"pointer"},children:t==="zh"?"å
³é":"Close"})]}),A.type==="text"?y.jsx("div",{style:{fontSize:"10px",color:"#333",whiteSpace:"pre-wrap",maxHeight:"150px",overflowY:"auto"},children:A.content}):y.jsx("div",{style:{fontSize:"10px",color:"#666",textAlign:"center"},children:t==="zh"?"æ¤æä»¶ç±»å䏿¯æé¢è§":"Preview not supported for this file type"})]}),y.jsxs("div",{style:{marginBottom:"16px"},children:[y.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",marginBottom:"12px"},children:[y.jsxs("div",{children:[y.jsxs("label",{style:{display:"block",marginBottom:"4px",fontSize:"11px",fontWeight:"bold",color:"#333"},children:[t==="zh"?"è®ºææ é¢":"Paper Title"," *"]}),y.jsx("input",{type:"text",value:o.title,onChange:M=>U("title",M.target.value),placeholder:t==="zh"?"è¾å
¥è®ºææ é¢":"Enter paper title",style:{width:"100%",padding:"6px 8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px"}})]}),y.jsxs("div",{children:[y.jsx("label",{style:{display:"block",marginBottom:"4px",fontSize:"11px",fontWeight:"bold",color:"#333"},children:t==="zh"?"ä½è
":"Authors"}),y.jsx("input",{type:"text",value:o.authors,onChange:M=>U("authors",M.target.value),placeholder:t==="zh"?"ä½è
1, ä½è
2":"Author1, Author2",style:{width:"100%",padding:"6px 8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px"}})]})]}),y.jsxs("div",{style:{marginBottom:"12px"},children:[y.jsx("label",{style:{display:"block",marginBottom:"4px",fontSize:"11px",fontWeight:"bold",color:"#333"},children:t==="zh"?"æè¦":"Abstract"}),y.jsx("textarea",{value:o.abstract,onChange:M=>U("abstract",M.target.value),placeholder:t==="zh"?"è¾å
¥è®ºææè¦...":"Enter paper abstract...",rows:"3",style:{width:"100%",padding:"6px 8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px",resize:"vertical"}})]}),y.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},children:[y.jsxs("div",{children:[y.jsx("label",{style:{display:"block",marginBottom:"4px",fontSize:"11px",fontWeight:"bold",color:"#333"},children:t==="zh"?"å
³é®è¯":"Keywords"}),y.jsx("input",{type:"text",value:o.keywords,onChange:M=>U("keywords",M.target.value),placeholder:t==="zh"?"å
³é®è¯1, å
³é®è¯2":"Keyword1, Keyword2",style:{width:"100%",padding:"6px 8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px"}})]}),y.jsxs("div",{children:[y.jsx("label",{style:{display:"block",marginBottom:"4px",fontSize:"11px",fontWeight:"bold",color:"#333"},children:t==="zh"?"å叿¥æ":"Publication Date"}),y.jsx("input",{type:"date",value:o.publication_date,onChange:M=>U("publication_date",M.target.value),style:{width:"100%",padding:"6px 8px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"11px"}})]})]})]}
891),u&&y.jsxs("div",{style:{marginBottom:"16px"},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"4px",fontSize:"11px",color:"#666"},children:[y.jsx("span",{children:t==="zh"?"ä¸ä¼ è¿åº¦":"Upload Progress"}),y.jsxs("span",{children:[Math.round(m),"%"]})]}),y.jsx("div",{style:{width:"100%",height:"6px",backgroundColor:"#f0f0f0",borderRadius:"3px",overflow:"hidden"},children:y.jsx("div",{style:{width:`${m}%`,height:"100%",backgroundColor:"#4CAF50",transition:"width 0.3s ease"}})})]}),y.jsx("button",{onClick:N,disabled:i.length===0||u,style:{width:"100%",padding:"10px",background:i.length>0&&!u?"#2c7c6c":"#ccc",color:"white",border:"none",borderRadius:"6px",cursor:i.length>0&&!u?"pointer":"not-allowed",fontSize:"12px",fontWeight:"bold",transition:"all 0.2s ease"},children:u?t==="zh"?"ä¸ä¼ ä¸...":"Uploading...":t==="zh"?`ä¸ä¼ ${i.length} 个æä»¶`:`Upload ${i.length} Files`}),f&&y.jsx("div",{style:{marginTop:"12px",padding:"8px 12px",background:f.includes("失败")||f.includes("failed")?"#ffebee":"#e8f5e8",color:f.includes("失败")||f.includes("failed")?"#c62828":"#2e7d32",borderRadius:"4px",fontSize:"11px",whiteSpace:"pre-line"},children:f}),y.jsxs("div",{style:{marginTop:"12px",fontSize:"10px",color:"#666",lineHeight:"1.4"},children:[y.jsx("div",{children:y.jsxs("strong",{children:[t==="zh"?"åè½è¯´æ":"Features",":"]})}),y.jsxs("div",{children:["⢠",t==="zh"?"æ¯æPDFãWordææ¡£åææ¬æä»¶ä¸ä¼ ":"Supports PDF, Word documents and text files"]}),y.jsxs("div",{children:["⢠",t==="zh"?"æ¯ææ¹éä¸ä¼ åææ½ä¸ä¼ ":"Supports batch upload and drag & drop"]}),y.jsxs("div",{children:["⢠",t==="zh"?"èªå¨æåææ¬å
容并建ç«è¯ä¹ç´¢å¼":"Automatically extracts text content and builds semantic index"]}),y.jsxs("div",{children:["⢠",t==="zh"?"æ¯æè®ºæå
æ°æ®æ æ³¨ï¼æ é¢ãä½è
ãæè¦çï¼":"Supports paper metadata annotation (title, authors, abstract, etc.)"]}),y.jsxs("div",{children:["⢠",t==="zh"?"ä¸ä¼ åå¯éè¿AIè天婿æ¥è¯¢è®ºæå
容":"After upload, you can query paper content through AI chat assistant"]})]})]})},QN=()=>{const{lang:e,langs:t}=ee.useContext(Ut),[n,i]=ee.useState(!1),[a,o]=ee.useState(null),[s,u]=ee.useState(null),[h,f]=ee.useState("unknown"),[d,m]=ee.useState(""),[g,x]=ee.useState(!1),[b,E]=ee.useState(null),[H,v]=ee.useState(null);ee.useEffect(()=>{w()},[]),ee.useEffect(()=>{let $;return H&&(b==null?void 0:b.status)==="running"&&($=setInterval(async()=>{try{const O=await ob();E(O),O.status!=="running"&&(E(null),v(null),await w(),O.status==="completed"?m(e==="zh"?"æ¹éå¤ç宿":"Batch processing completed"):O.status==="cancelled"?m(e==="zh"?"ä»»å¡å·²åæ¶":"Task cancelled"):O.status==="error"&&m(e==="zh"?`å¤çåºé: ${O.message}`:`Processing error: ${O.message}`),setTimeout(()=>{m("")},3e3))}catch(O){console.error("æ£æ¥ä»»å¡ç¶æå¤±è´¥:",O)}},2e3)),()=>{$&&clearInterval($)}},[H,b==null?void 0:b.status,e]);const w=async()=>{try{const $=await ab();if(u($),$.knowledge_base_initialized){f("available");try{const O=await eb();o(O)}catch(O){console.error("è·åç¥è¯åºä¿¡æ¯å¤±è´¥:",O),o({total_documents:0,collection_name:"unknown",embedding_method:"unknown"})}}else f("unavailable"),o(null)}catch($){console.error("æ£æ¥ç¥è¯åºç¶æå¤±è´¥:",$),console.error("é误详æ
:",$.message,$.stack),f("error"),m(`ç¶ææ£æ¥å¤±è´¥: ${$.message}`),u(null),o(null)}},A=async()=>{i(!0),m("");try{const $=localStorage.getItem("GEMINI_API_KEY");await Jv($),m(e==="zh"?"ç¥è¯åºåå§åæåï¼":"Knowledge base initialized successfully!"),await w()}catch($){m(e==="zh"?`åå§å失败: ${$.message}`:`Initialization failed: ${$.message}`)}finally{i(!1)}},D=async()=>{i(!0),m("");try{const $=await nb();$.status==="processing"?(v($.task_id),E({status:"running",message:$.message,task_id:$.task_id}),m(e==="zh"?"æ¹éå¤çå·²å¯å¨":"Batch processing started")):m($.message||"æä½å¤±è´¥")}catch($){m(e==="zh"?`æ¹éæ·»å 失败: ${$.message}`:`Batch addition failed: ${$.message}`)}finally{i(!1)}},G=async()=>
891{if(confirm(e==="zh"?"ç¡®å®è¦åæ¶å½åä»»å¡åï¼":"Are you sure you want to cancel the current task?"))try{const $=await rb();$.status==="success"?(m(e==="zh"?"ä»»å¡å·²åæ¶":"Task cancelled"),E(null),v(null),await w()):m($.message||"åæ¶ä»»å¡å¤±è´¥")}catch($){m(e==="zh"?`åæ¶ä»»å¡å¤±è´¥: ${$.message}`:`Failed to cancel task: ${$.message}`)}},j=async()=>{if(confirm(e==="zh"?"ç¡®å®è¦æ¸
空ç¥è¯åºåï¼æ¤æä½ä¸å¯æ¤éã":"Are you sure you want to clear the knowledge base? This action cannot be undone.")){i(!0),m("");try{await ib(),m(e==="zh"?"ç¥è¯åºå·²æ¸
空":"Knowledge base cleared"),await w()}catch($){m(e==="zh"?`æ¸
空失败: ${$.message}`:`Clear failed: ${$.message}`)}finally{i(!1)}}},Z=()=>{switch(h){case"available":return"#4CAF50";case"unavailable":return"#FF9800";case"error":return"#F44336";default:return"#9E9E9E"}},Y=()=>{switch(h){case"available":return e==="zh"?"å¯ç¨":"Available";case"unavailable":return e==="zh"?"ä¸å¯ç¨":"Unavailable";case"error":return e==="zh"?"é误":"Error";default:return e==="zh"?"æªç¥":"Unknown"}},q=()=>{if(!b)return"";switch(b.status){case"running":return e==="zh"?"è¿è¡ä¸":"Running";case"completed":return e==="zh"?"已宿":"Completed";case"cancelled":return e==="zh"?"已忶":"Cancelled";case"error":return e==="zh"?"åºé":"Error";case"idle":return e==="zh"?"空é²":"Idle";default:return b.status}},te=()=>{if(!b)return"#9E9E9E";switch(b.status){case"running":return"#2196F3";case"completed":return"#4CAF50";case"cancelled":return"#FF9800";case"error":return"#F44336";case"idle":return"#9E9E9E";default:return"#9E9E9E"}};return y.jsxs("div",{className:"knowledge-base-manager",style:{background:"white",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[y.jsxs("h3",{style:{margin:"0 0 12px 0",color:"#2c7c6c",fontSize:"15px",fontWeight:"bold"},children:["ð ",e==="zh"?"ç¥è¯åºç®¡ç":"Knowledge Base"]}),y.jsxs("div",{style:{marginBottom:"12px",padding:"10px",background:"#f8f9fa",borderRadius:"6px",border:"1px solid #e9ecef"},children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[y.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",background:Z(),marginRight:"8px"}}),y.jsxs("span",{style:{fontSize:"12px",fontWeight:"500",color:"#495057"},children:[e==="zh"?"ç¥è¯åºç¶æ":"KB Status",": ",Y()]})]}),b&&b.status==="running"&&y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"10px",padding:"6px",background:"#e3f2fd",borderRadius:"4px",border:"1px solid #bbdefb"},children:[y.jsxs("div",{style:{fontSize:"11px",color:"#1976d2"},children:[y.jsxs("strong",{children:[e==="zh"?"ä»»å¡ç¶æ":"Task",":"]}),y.jsx("span",{style:{color:te(),marginLeft:"6px",fontWeight:"500"},children:q()})]}),y.jsx("button",{onClick:G,style:{padding:"3px 6px",background:"#F44336",color:"white",border:"none",borderRadius:"3px",cursor:"pointer",fontSize:"9px",fontWeight:"500"},children:e==="zh"?"åæ¶":"Cancel"})]}),y.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(120px, 1fr))",gap:"8px",fontSize:"11px"},children:[a&&y.jsxs("div",{style:{padding:"6px",background:"#e8f5e8",borderRadius:"4px",border:"1px solid #c8e6c9"},children:[y.jsx("div",{style:{fontWeight:"600",color:"#2e7d32",marginBottom:"2px"},children:e==="zh"?"ææ¡£åæ°é":"Document Chunks"}),y.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",color:"#1b5e20"},children:a.total_documents})]}),s&&s.total_files_in_repository!==void 0&&y.jsxs("div",{style:{padding:"6px",background:"#fff3e0",borderRadius:"4px",border:"1px solid #ffcc02"},children:[y.jsx("div",{style:{fontWeight:"600",color:"#f57c00",marginBottom:"2px"},children:e==="zh"?"å¯ç¨PDFæä»¶":"Available PDF Files"}),y.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",color:"#e65100"},children:s.total_files_in_repository})]})]}),b&&b.status==="running"&&y.jsx("div",{style:{marginTop:"8px",padding:"6px",background:"#e8f5e8",borderRadius:"4px",fontSize:"10px",color:"#2e7d32"},children:e==="zh"?"æ£å¨å¤çææ¡£...":"Processing documents..."})]}),y.jsxs("div",{style:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"12px"},children:[y.jsx("button",{onClick:A,disabled:n,style:{padding:"6px 12px",background:"#2c7c6c",color:"white",border:"none",borderRadius:"4px",cursor:n?"not-allowed":"pointer",fontSize:"11px",fontWeight:"500",opacity:n?.6:1},children:n?e==="zh"?"å¤çä¸...":"Processing...":e==="zh"?"åå§å":"Initialize"}),y.jsx("button",{onClick:D,disabled:n||h!=="available"||b&&b.status==="running",style:{padding:"6px 12px",background:"#2196F3",color:"white",border:"none",borderRadius:"4px",cursor:n||h!=="available"||b&&b.status==="running"?"not-allowed":"pointer",fontSize:"11px",fontWeight:"500",opacity:n||h!=="available"||b&&b.status==="running"?.6:1},children:n?e==="zh"?"å¤çä¸...":"Processing...":e==="zh"?"æ·»å ææ¡£":"Add Documents"}),y.jsx("button",{onClick:()=>x(!g),disabled:n||h!=="available",style:{padding:"6px 12px",background:g?"#FF9800":"#4CAF50",color:"white",border:"none",borderRadius:"4px",cursor:n||h!=="available"?"not-allowed":"pointer",fontSize:"11px",fontWeight:"500",opacity:n||h!=="available"?.6:1},children:g?e==="zh"?"éèä¸ä¼ ":"Hide Upload":e==="zh"?"论æä¸ä¼ ":"Paper Upload"}),y.jsx("button",{onClick:j,disabled:n||h!=="available",style:{padding:"6px 12px",background:"#F44336",color:"white",border:"none",borderRadius:"4px",cursor:n||h!=="available"?"not-allowed":"pointer",fontSize:"11px",fontWeight:"500",opacity:n||h!=="available"?.6:1},children:n?e==="zh"?"å¤çä¸...":"Processing...":e==="zh"?"æ¸
空":"Clear"}),y.jsx("button",{onClick:w,disabled:n,style:{padding:"6px 12px",background:"#9E9E9E",color:"white",border:"none",borderRadius:"4px",cursor:n?"not-allowed":"pointer",fontSize:"11px",fontWeight:"500",opacity:n?.6:1},children:e==="zh"?"å·æ°ç¶æ":"Refresh"})]}),g&&h==="available"&&y.jsx("div",{style:{marginBottom:"12px"},children:y.jsx(WN,{onUploadSuccess:w})}),d&&y.jsx("div",{style:{marginTop:"8px",padding:"8px 10px",background:d.includes("失败")||d.includes("failed")?"#ffebee":"#e8f5e8",color:d.includes("失败")||d.includes("failed")?"#c62828":"#2e7d32",borderRadius:"4px",fontSize:"11px",fontWeight:"500"},children:d})]})};function JN(){const[e,t]=ee.useState(!1),[n,i]=ee.useState("map"),[a,o]=ee.useState(!1),[s,u]=ee.useState(!1),{lang:h,setLang:f,languageFilter:d,setLanguageFilter:m}=ee.useContext(Ut),g=()=>{},{languageMapping:x,setHighlightedLanguages:b}=ee.useContext(Ut),E=async(H,v)=>{try{v.innerHTML="";const{treeData:w}=await fb(H);hb(w,v,(D,G)=>{G.length>0?b(G):b([])},x)}catch(w){console.error("Error loading tree to overlay:",w),v.innerHTML='<div style="padding: 20px; text-align: center; color: #666;">Error loading tree</div>'}};return y.jsxs("div",{className:"app-root",children:[y.jsxs("div",{className:"topbar",children:[y.jsx("div",{className:"topbar-left",children:y.jsx("span",{className:"app-title",children:h==="zh"?"è¯è¨å¦æ¢ç´¢":"Linguistic Explorer"})}),y.jsx("div",{className:"topbar-center"}),y.jsxs("div",{className:"topbar-right",children:[y.jsx("button",{id:"kb-toggle",onClick:()=>u(!0),className:"lang-btn",style:{marginRight:8},children:h==="zh"?"ð ç¥è¯åº":"ð Knowledge Base"}),y.jsx("button",{id:"lang-toggle",onClick:()=>f(h==="en"?"zh":"en"),className:"lang-btn",children:"䏿/English"})]})]}),y.jsxs("div",{className:"container",children:[y.jsxs("div",{className:"left-panel",children:[y.jsx("div",{className:"combined-data-panel",children:y.jsx(XN,{})}),y.jsx(uC,{})]}),y.jsxs("div",{className:"center-panel",children:[y.jsxs("div",{className:"tabs-header",children:[y.jsx("button",{className:`tab-btn ${n==="map"?"active":""}`,onClick:()=>i("map"),children:h==="zh"?"å°å¾":"Map"}),y.jsx("button",{className:`tab-btn ${n==="correlation"?"active":""}`,onClick:()=>i("correlation"),children:h==="zh"?"ç¸å
³æ§":"Correlation"})]}),y.jsxs("div",{className:"tabs-content",children:[y.jsxs("div",{className:"tab-panel map-tab",style:{display:n==="map"?"block":"none",position:"relative",height:"100%"},children:[y.jsxs("div",{style:{padding:8,paddingBottom:0,position:"absolute",top:0,left:0,right:0,zIndex:1001,background:"rgba(255,255,255,0.9)",backdropFilter:"blur(2px)",display:"flex",flexDirection:"column",gap:8},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[y.jsx(yC,{}),y.jsx(gC,{controlOnly:!0,onLoad:H=>{o(!0),setTimeout(()=>{const v=document.getElementById("tree-overlay-container");v&&E(H,v)},100)}})]}),y.jsx(xC,{})]}),y.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0},children:[y.jsx(qN,{}),a&&y.jsxs("div",{style:{position:"absolute",top:60,right:12,width:400,height:400,background:"rgba(255,255,255,0.7)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",border:"1px solid rgba(233,236,239,0.5)",borderRadius:8,boxShadow:"0 6px 18px rgba(0,0,0,0.12)",overflow:"hidden",zIndex:1e3,pointerEvents:"auto"},children:[y.jsxs("div",{style:{padding:8,borderBottom:"1px solid #e9ecef",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[y.jsx("span",{style:{fontSize:12,fontWeight:"bold",color:"#2c7c6c"},children:h==="zh"?"ç³»ç»åè²æ ":"Phylogenetic Tree"}),y.jsx("button",{onClick:()=>o(!1),style:{background:"none",border:"none",fontSize:16,cursor:"pointer",color:"#666"},children:"Ã"})]}),y.jsx("div",{id:"tree-overlay-container",style:{padding:8,height:350,overflow:"hidden"}})]})]})]}),y.jsx("div",{className:"tab-panel",style:{display:n==="correlation"?"block":"none"},children:y.jsx(fC,{})})]})]}),y.jsx(rN,{onShowApiKeyModal:()=>t(!0)}),y.jsx($N,{}),y.jsx(UN,{isVisible:e,onClose:()=>t(!1),onApiKeySet:g})]}),s&&y.jsxs("div",{style:{position:"fixed",top:48,right:0,bottom:0,width:420,background:"rgba(255,255,255,0.98)",borderLeft:"1px solid #e9ecef",boxShadow:"0 6px 18px rgba(0,0,0,0.12)",zIndex:1200,overflow:"auto"},children:[y.jsxs("div",{style:{position:"sticky",top:0,background:"rgba(255,255,255,0.98)",borderBottom:"1px solid #e9ecef",padding:10,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[y.jsx("span",{style:{fontWeight:"bold",color:"#2c7c6c"},children:h==="zh"?"ð ç¥è¯åº":"ð Knowledge Base"}),y.jsx("button",{onClick:()=>u(!1),style:{background:"none",border:"none",fontSize:18,cursor:"pointer"},children:"Ã"})]}),y.jsx("div",{style:{padding:12},children:y.jsx(QN,{})})]})]})}function eR(){return y.jsx(Oz,{children:y.jsx(JN,{})})}iT.createRoot(document.getElementById("root")).render(y.jsx(Os.StrictMode,{children:y.jsx(eR,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.